Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.3.0
type Config struct {
Server struct {
Address string
}
Client struct {
Address string
}
Log struct {
Format string
ForceColors bool
Level string
}
Core struct {
Image string
Name string
Path string
Database struct {
ServiceRelativePath string
ExecutionRelativePath string
}
}
// You can add any attribute that will be a `ServiceConfig` type
// example: `Foo ServiceConfig`
// You can then access it with config.Service.Foo.Sid in order to access the Sid of this service.
// The services in this struct are automatically started when Core starts based on the URL and Env.
// Sid and Hash are populated only after the deployment.
// You need to initialize these services in the `New` function
// example: `c.Service.Foo = ServiceConfig{URL: "https://api.github.com/repos/mesg-foundation/service-ethereum-erc20/tarball/master"}`
// Also add it in the `Services()` function
// example: `return []*ServiceConfig{ &c.Foo }`
Service struct {
}
Docker struct {
Socket string
Core struct {
Path string
}
}
}
Config contains all the configuration needed.
func Global ¶ added in v0.3.0
Global returns a singleton of a Config after loaded ENV and validate the values.
func (*Config) DaemonEnv ¶ added in v0.3.0
DaemonEnv returns the needed environmental variable for the Daemon.
func (*Config) Prepare ¶ added in v0.3.0
Prepare setups local directories or any other required thing based on config
func (*Config) Services ¶ added in v0.8.0
func (c *Config) Services() []*ServiceConfig
Services returns all services that the configuration package is aware of
Click to show internal directories.
Click to hide internal directories.