Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AuthToken string
AuthToken is the authorization token that will be used for API calls
var ConfigFilePath string
ConfigFilePath is where the agent will try to load the configuration from
var CredentialsPath string
CredentialsPath is where the agent will try to loads the credentials. (Experimental)
var Period uint
Period is the number of seconds between scans
Functions ¶
Types ¶
type Config ¶
type Config struct {
Schedule string `yaml:"schedule"`
Token string `yaml:"token"`
Endpoint Endpoint `yaml:"endpoint"`
DataGatherers []dataGatherer `yaml:"data-gatherers"`
}
Config wraps the options for a run of the agent.
func ParseConfig ¶
ParseConfig reads config into a struct used to configure running agents
type Credentials ¶
type Credentials struct {
// UserID is the ID or email for the user or service account.
UserID string `json:"user_id"`
// UserSecret is the secret for the user or service account.
UserSecret string `json:"user_secret"`
}
Credentials defines the format of the credentials.json file.
func ParseCredentials ¶
func ParseCredentials(data []byte) (*Credentials, error)
ParseCredentials reads credentials into a struct used. Performs validations.