Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { Name string `json:"name" yaml:"name" mapstructure:"name"` HTTP HTTP `json:"http" yaml:"http" mapstructure:"http"` GRPC GRPC `json:"grpc" yaml:"grpc" mapstructure:"grpc"` Storage struct { Mongodb struct { DSN string `json:"dsn" yaml:"dsn" mapstructure:"dsn"` } `json:"mongodb" yaml:"mongodb" mapstructure:"mongodb"` DSN string `json:"dsn" yaml:"dsn" mapstructure:"dsn"` } `json:"storage" yaml:"storage" mapstructure:"storage"` Etherscan struct { APIKey string `json:"api_key" yaml:"apiKey" mapstructure:"apiKey"` } `json:"etherscan" yaml:"etherscan" mapstructure:"etherscan"` Infura struct { ProjectID string `json:"project_id" yaml:"projectID" mapstructure:"projectID"` } `json:"infura" yaml:"infura" mapstructure:"infura"` }
Application is the application configuration.
type Configx ¶
type Configx struct { // Logger is the logger configuration. Logger logger.Options `json:"logger" yaml:"logger" mapstructure:"logger"` // Services is the services configuration. Services map[string]*Application `json:"services" yaml:"services" mapstructure:"services"` // contains filtered or unexported fields }
Configx is the application configuration.
func LoadConfig ¶
LoadConfig is used to load the configuration.
func (*Configx) GetService ¶
func (x *Configx) GetService(name string) (*Application, error)
GetService is used to get the service by name.
type GRPC ¶
type GRPC struct { URL string `json:"url" yaml:"url"` Host string `json:"host" yaml:"host"` Port int `json:"port" yaml:"port"` }
GRPC is the gRPC configuration.
Click to show internal directories.
Click to hide internal directories.