config

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(cfg interface{}, path string) (err error)

func SaveToFile

func SaveToFile(cfg interface{}, f *os.File) error

func Store

func Store(cfg interface{}, path string) error

Types

type APIsConfig

type APIsConfig struct {
	HTTP HTTPConfig `yaml:"http" json:"http"`
	GRPC GRPCConfig `yaml:"grpc" json:"grpc"`
}

func (*APIsConfig) Validate

func (c *APIsConfig) Validate() error

type ClientsConfig

type ClientsConfig struct {
	Device device.Config `yaml:"device" json:"device"`
}

func (*ClientsConfig) Validate

func (c *ClientsConfig) Validate() error

type Config

type Config struct {
	Log                log.Config                 `yaml:"log" json:"log"`
	APIs               APIsConfig                 `yaml:"apis" json:"apis"`
	Clients            ClientsConfig              `yaml:"clients" json:"clients"`
	RemoteProvisioning *remoteProvisioning.Config `yaml:"remoteProvisioning" json:"remoteProvisioning"`
	// contains filtered or unexported fields
}

Config represent application configuration

func DefaultConfig

func DefaultConfig(directory string) Config

func New

func New(configPath string) (Config, error)

func (*Config) SetConfigPath

func (c *Config) SetConfigPath(configPath string)

func (Config) Store

func (c Config) Store() error

func (Config) String

func (c Config) String() string

String return string representation of Config

func (*Config) Validate

func (c *Config) Validate() error

type GRPCConfig

type GRPCConfig struct {
	Enabled     bool `yaml:"enabled" json:"enabled"`
	grpc.Config `yaml:",inline" json:",inline"`
}

type HTTPConfig

type HTTPConfig struct {
	Enabled     bool `yaml:"enabled" json:"enabled"`
	http.Config `yaml:",inline" json:",inline"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL