Documentation
¶
Index ¶
- func ClientPath(id string) (string, error)
- func GetClientFromID(id string) (*client.Client, error)
- type ClientConfig
- func (c *ClientConfig) GetCaFile() string
- func (c *ClientConfig) GetCert() string
- func (c *ClientConfig) GetDataplane() string
- func (c *ClientConfig) GetGwIP() string
- func (c *ClientConfig) GetGwPort() uint16
- func (c *ClientConfig) GetID() string
- func (c *ClientConfig) GetKeyFile() string
- func (c *ClientConfig) GetMetricsManagerIP() string
- func (c *ClientConfig) GetPolicyEngineIP() string
- func (c *ClientConfig) SetDefaultClient(id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientPath ¶
ClientPath get CLI config file from id.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
GwIP string `json:"gwIp"`
GwPort uint16 `json:"gwPort"`
ID string `json:"id"`
CaFile string `json:"caFile"`
CertFile string `json:"certFile"`
KeyFile string `json:"keyFile"`
Dataplane string `json:"dataplane"`
PolicyEngineIP string `json:"policyEngineIp"`
MetricsManagerIP string `json:"metricsManagerIp"`
// contains filtered or unexported fields
}
ClientConfig contain all Client configuration to send requests to the GW.
func GetConfigFromID ¶
func GetConfigFromID(id string) (*ClientConfig, error)
GetConfigFromID return configuration of Client according to the Client ID.
func NewClientConfig ¶
func NewClientConfig(cfg *ClientConfig) (*ClientConfig, error)
NewClientConfig create config file with all the configuration of the Client.
func (*ClientConfig) GetCaFile ¶
func (c *ClientConfig) GetCaFile() string
GetCaFile return the Client certificate Authority.
func (*ClientConfig) GetCert ¶
func (c *ClientConfig) GetCert() string
GetCert return the Client certificate.
func (*ClientConfig) GetDataplane ¶
func (c *ClientConfig) GetDataplane() string
GetDataplane return the Client dataplane type (MTLS or TCP).
func (*ClientConfig) GetGwIP ¶
func (c *ClientConfig) GetGwIP() string
GetGwIP return the gw IP that the Client is connected.
func (*ClientConfig) GetGwPort ¶
func (c *ClientConfig) GetGwPort() uint16
GetGwPort return the gw port that the Client is connected.
func (*ClientConfig) GetKeyFile ¶
func (c *ClientConfig) GetKeyFile() string
GetKeyFile return the Client key file.
func (*ClientConfig) GetMetricsManagerIP ¶
func (c *ClientConfig) GetMetricsManagerIP() string
GetMetricsManagerIP return the metrics manager address.
func (*ClientConfig) GetPolicyEngineIP ¶
func (c *ClientConfig) GetPolicyEngineIP() string
GetPolicyEngineIP return the policy server address.
func (*ClientConfig) SetDefaultClient ¶
func (c *ClientConfig) SetDefaultClient(id string) error
SetDefaultClient set the default Client the CLI will use.