Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInternal indicates the item could not be processed. ErrInternal = errors.New("internal error") // ErrInvalidCredentials indicates the auth token is incorrect ErrInvalidCredentials = errors.New("invalid credentials") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
SignSSHKey(ctx context.Context, key []byte) (*SigningResponse, error)
}
Client is a PDC API client
type Config ¶
type Config struct { Token string HostedGrafanaID string URL *url.URL RetryMax int // The version of pdc-agent thats running, defined by goreleaser during the build process. Version string // The PDC api endpoint used to sign public keys. // It is not a constant only to make it easier to override the endpoint in local development. SignPublicKeyEndpoint string // Used for local development. // Contains headers that are included in each http request send to the pdc api. DevHeaders map[string]string // Used for local development. // DevNetwork is the network that the agent will connect to. DevNetwork string }
Config describes all properties that can be configured for the PDC package
func (*Config) RegisterFlags ¶
type SigningResponse ¶
type SigningResponse struct { Certificate ssh.Certificate KnownHosts []byte }
SigningResponse is the response received from a SSH key signing request
func (*SigningResponse) UnmarshalJSON ¶
func (sr *SigningResponse) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.