Documentation
¶
Index ¶
- Variables
- type Client
- type Common
- type Config
- type Server
- func (s *Server) SetAccountJWT(jwt string)
- func (s *Server) SetAccountKey(key string)
- func (s *Server) SetHost(host string)
- func (s *Server) SetOperatorJWT(jwt string)
- func (s *Server) SetOperatorKey(key string)
- func (s *Server) SetPort(port int64)
- func (s *Server) SetSystemAccountJWT(jwt string)
- func (s *Server) SetSystemAccountKey(key string)
- func (s *Server) SetTLSCert(cert string)
- func (s *Server) SetTLSKey(key string)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultClientConfigPath = userConfigDir() + string(os.PathSeparator) + "client.conf"
)
View Source
var ErrParserError = errors.New("parser error")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Server []string `toml:"server,omitempty"`
UserJWT *string `toml:"user_jwt,omitempty"`
UserKey *string `toml:"user_key,omitempty"`
AccountJWT *string `toml:"account_jwt,omitempty"`
AccountKey *string `toml:"account_key,omitempty"`
TLSCACertificate *string `toml:"tls_ca_certificate,omitempty"`
}
func MergeClient ¶
func NewDefaultClient ¶
func (*Client) SetAccountJWT ¶
func (*Client) SetAccountKey ¶
func (*Client) SetTLSCACert ¶
func (*Client) SetUserJWT ¶
func (*Client) SetUserKey ¶
type Common ¶
type Common struct {
DataDir *string `toml:"data_dir,omitempty"`
LogLevel *string `toml:"log_level,omitempty"`
NoColor *bool `toml:"no_color,omitempty"`
}
func MergeCommon ¶
func NewDefaultCommon ¶
func (*Common) SetDataDir ¶
func (*Common) SetLogLevel ¶
func (*Common) SetNoColor ¶
type Config ¶
type Config struct {
*Common `toml:",inline"`
Client *Client `toml:"client"`
Server *Server `toml:"server"`
}
func NewDefault ¶
type Server ¶
type Server struct {
Host *string `toml:"host,omitempty"`
Port *int64 `toml:"port,omitempty"`
OperatorJWT *string `toml:"operator_jwt,omitempty"`
OperatorKey *string `toml:"operator_key,omitempty"`
AccountJWT *string `toml:"account_jwt,omitempty"`
AccountKey *string `toml:"account_key,omitempty"`
SystemAccountJWT *string `toml:"system_account_jwt,omitempty"`
SystemAccountKey *string `toml:"system_account_key,omitempty"`
TLSCertificate *string `toml:"tls_certificate,omitempty"`
TLSKey *string `toml:"tls_key,omitempty"`
}
func MergeServer ¶
func NewDefaultServer ¶
func (*Server) SetAccountJWT ¶
func (*Server) SetAccountKey ¶
func (*Server) SetOperatorJWT ¶
func (*Server) SetOperatorKey ¶
func (*Server) SetSystemAccountJWT ¶
func (*Server) SetSystemAccountKey ¶
func (*Server) SetTLSCert ¶
Click to show internal directories.
Click to hide internal directories.