mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-09 09:35:03 +09:00
file-node
This commit is contained in:
parent
f4809905b9
commit
0ed7b8162a
33 changed files with 1476 additions and 1398 deletions
|
@ -2,12 +2,12 @@ package config
|
|||
|
||||
import (
|
||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/app"
|
||||
config2 "github.com/anytypeio/go-anytype-infrastructure-experiments/common/config"
|
||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/config"
|
||||
"gopkg.in/yaml.v3"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
const CName = "config"
|
||||
const CName = config.CName
|
||||
|
||||
func NewFromFile(path string) (c *Config, err error) {
|
||||
c = &Config{}
|
||||
|
@ -22,11 +22,11 @@ func NewFromFile(path string) (c *Config, err error) {
|
|||
}
|
||||
|
||||
type Config struct {
|
||||
GrpcServer config2.GrpcServer `yaml:"grpcServer"`
|
||||
Account config2.Account `yaml:"account"`
|
||||
Mongo Mongo `yaml:"mongo"`
|
||||
Metric config2.Metric `yaml:"metric"`
|
||||
Log config2.Log `yaml:"log"`
|
||||
GrpcServer config.GrpcServer `yaml:"grpcServer"`
|
||||
Account config.Account `yaml:"account"`
|
||||
Mongo Mongo `yaml:"mongo"`
|
||||
Metric config.Metric `yaml:"metric"`
|
||||
Log config.Log `yaml:"log"`
|
||||
}
|
||||
|
||||
func (c *Config) Init(a *app.App) (err error) {
|
||||
|
@ -41,14 +41,14 @@ func (c Config) GetMongo() Mongo {
|
|||
return c.Mongo
|
||||
}
|
||||
|
||||
func (c Config) GetGRPCServer() config2.GrpcServer {
|
||||
func (c Config) GetGRPCServer() config.GrpcServer {
|
||||
return c.GrpcServer
|
||||
}
|
||||
|
||||
func (c Config) GetAccount() config2.Account {
|
||||
func (c Config) GetAccount() config.Account {
|
||||
return c.Account
|
||||
}
|
||||
|
||||
func (c Config) GetMetric() config2.Metric {
|
||||
func (c Config) GetMetric() config.Metric {
|
||||
return c.Metric
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue