Documentation ¶
Index ¶
- type BindPlane
- func (bp BindPlane) APICall(method string, relativePath string, payload []byte) ([]byte, error)
- func (bp BindPlane) CreateCredential(payload []byte) (CredentialCreateResponse, error)
- func (bp BindPlane) CreateLogDestConfig(config []byte) (LogDestType, error)
- func (bp BindPlane) CreateLogSourceConfig(config []byte) (LogSourceConfig, error)
- func (bp BindPlane) CreateLogTemplate(t LogTemplateCreate) error
- func (bp BindPlane) CreateSource(payload []byte) (SourceCreateResponse, error)
- func (bp BindPlane) DelLogDestConfig(id string) error
- func (bp BindPlane) DeleteCollector(id string) error
- func (bp BindPlane) DeleteCredential(id string) error
- func (bp BindPlane) DeleteLogAgent(id string) error
- func (bp BindPlane) DeleteLogAgentDest(agentID, destID string) error
- func (bp BindPlane) DeleteLogAgentSource(agentID, sourceID string) error
- func (bp BindPlane) DeleteLogSourceConfig(id string) error
- func (bp BindPlane) DeleteLogTemplate(id string) error
- func (bp BindPlane) DeleteSource(id string) ([]byte, error)
- func (bp BindPlane) DeployLogAgentDest(agentID, configID string) (LogAgentDest, error)
- func (bp BindPlane) DeployLogAgentSource(agentID, configID string) (LogAgentSource, error)
- func (bp BindPlane) GetCollector(id string) (Collector, error)
- func (bp BindPlane) GetCollectorGroup(id string) (CollectorGroup, error)
- func (bp BindPlane) GetCollectors() ([]CollectorGroup, error)
- func (bp BindPlane) GetCredential(id string) (Credential, error)
- func (bp BindPlane) GetCredentialTemplate(id string) (CredentialTypeTemplate, error)
- func (bp BindPlane) GetCredentialType(id string) (CredentialType, error)
- func (bp BindPlane) GetCredentials() ([]Credential, error)
- func (bp BindPlane) GetJob(id string) (Job, error)
- func (bp BindPlane) GetLogAgent(id string) (LogAgent, error)
- func (bp BindPlane) GetLogAgentDest(agentID, destID string) (LogAgentDest, error)
- func (bp BindPlane) GetLogAgentSource(agentID, sourceID string) (LogAgentSource, error)
- func (bp BindPlane) GetLogAgentTask(agentID, taskID string) (LogAgentTask, error)
- func (bp BindPlane) GetLogDestConfig(id string) (LogDestConfig, error)
- func (bp BindPlane) GetLogDestType(id string) (LogDestType, error)
- func (bp BindPlane) GetLogDestTypeParameters(id string) ([]byte, error)
- func (bp BindPlane) GetLogSourceConfig(id string) (LogSourceConfig, error)
- func (bp BindPlane) GetLogSourceType(id string) (LogSourceType, error)
- func (bp BindPlane) GetLogSourceTypeParameters(id string) ([]byte, error)
- func (bp BindPlane) GetLogTemplate(id string) (LogTemplate, error)
- func (bp BindPlane) GetSource(id string) (SourceConfigGet, error)
- func (bp BindPlane) GetSourceTemplate(id string) (SourceTypeTemplate, error)
- func (bp BindPlane) GetSourceType(id string) (SourceType, error)
- func (bp BindPlane) GetSources() ([]SourceConfigGet, error)
- func (bp BindPlane) GetStatus(job Job) int
- func (bp *BindPlane) Init() error
- func (bp BindPlane) InstallCMDLogAgent() ([]byte, error)
- func (bp BindPlane) ListJobs() ([]Job, error)
- func (bp BindPlane) ListLogAgentDest(id string) ([]LogAgentDest, error)
- func (bp BindPlane) ListLogAgentSources(id string) ([]LogAgentSource, error)
- func (bp BindPlane) ListLogAgents() ([]LogAgent, error)
- func (bp BindPlane) ListLogDestConfigs() ([]LogDestConfig, error)
- func (bp BindPlane) ListLogDestTypes() ([]LogDestType, error)
- func (bp BindPlane) ListLogSourceConfigs() ([]LogSourceConfig, error)
- func (bp BindPlane) ListLogSourceTypes() ([]LogSourceType, error)
- func (bp BindPlane) ListLogTemplates() ([]LogTemplate, error)
- func (bp BindPlane) ListSourceTypes() ([]SourceType, error)
- func (bp BindPlane) UpdateLogAgent(id string) (LogAgentUpdateResp, error)
- func (bp BindPlane) UpdateLogDestConfig(id string) (LogDestConfig, error)
- func (bp BindPlane) UpdateLogTemplate(id string, t LogTemplateCreate) error
- func (bp BindPlane) UpdateVersionLogSourceConfig(id string) (LogSourceConfig, error)
- type Collector
- type CollectorGroup
- type Credential
- type CredentialCreateResponse
- type CredentialSource
- type CredentialType
- type CredentialTypeTemplate
- type Job
- type LogAgent
- type LogAgentDest
- type LogAgentSource
- type LogAgentTask
- type LogAgentUpdateResp
- type LogDestConfig
- type LogDestType
- type LogSourceConfig
- type LogSourceType
- type LogTemplate
- type LogTemplateCreate
- type SourceConfigCreate
- type SourceConfigGet
- type SourceCreateResponse
- type SourceType
- type SourceTypeTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindPlane ¶
type BindPlane struct { BaseURL string APIKey string APIVersion string // contains filtered or unexported fields }
BindPlane type stores the global configuration
func (BindPlane) APICall ¶
APICall takes a HTTP method, relative api path, and payload returns the API response and an error example: APICall("GET", "/v1/collectors", nil)
func (BindPlane) CreateCredential ¶
func (bp BindPlane) CreateCredential(payload []byte) (CredentialCreateResponse, error)
CreateCredential will configure a credential
func (BindPlane) CreateLogDestConfig ¶ added in v1.3.0
func (bp BindPlane) CreateLogDestConfig(config []byte) (LogDestType, error)
CreateLogDestConfig creates a destination config
func (BindPlane) CreateLogSourceConfig ¶ added in v1.3.0
func (bp BindPlane) CreateLogSourceConfig(config []byte) (LogSourceConfig, error)
CreateLogSourceConfig creates a log source config
func (BindPlane) CreateLogTemplate ¶ added in v1.3.0
func (bp BindPlane) CreateLogTemplate(t LogTemplateCreate) error
CreateLogTemplate returns a log template
func (BindPlane) CreateSource ¶
func (bp BindPlane) CreateSource(payload []byte) (SourceCreateResponse, error)
CreateSource will configure a new source, returning the http response body, http status code, and an error
func (BindPlane) DelLogDestConfig ¶ added in v1.3.0
DelLogDestConfig deletes a log destination config
func (BindPlane) DeleteCollector ¶
DeleteCollector will delete a configured collector
func (BindPlane) DeleteCredential ¶
DeleteCredential will delete a configured credential
func (BindPlane) DeleteLogAgent ¶ added in v1.3.0
DeleteLogAgent deletes a log agent
func (BindPlane) DeleteLogAgentDest ¶ added in v1.3.0
DeleteLogAgentDest deletes a destination config from a log agent
func (BindPlane) DeleteLogAgentSource ¶ added in v1.3.0
DeleteLogAgentSource deletes a source config from a log agent
func (BindPlane) DeleteLogSourceConfig ¶ added in v1.3.0
DeleteLogSourceConfig deletes a log source config
func (BindPlane) DeleteLogTemplate ¶ added in v1.3.0
DeleteLogTemplate returns a log template
func (BindPlane) DeleteSource ¶
DeleteSource will delete a configured source
func (BindPlane) DeployLogAgentDest ¶ added in v1.3.0
func (bp BindPlane) DeployLogAgentDest(agentID, configID string) (LogAgentDest, error)
DeployLogAgentDest deploys a destination config to a log agent
func (BindPlane) DeployLogAgentSource ¶ added in v1.3.0
func (bp BindPlane) DeployLogAgentSource(agentID, configID string) (LogAgentSource, error)
DeployLogAgentSource deploys a source config to a log agent
func (BindPlane) GetCollector ¶
GetCollector will return a collector object
func (BindPlane) GetCollectorGroup ¶
func (bp BindPlane) GetCollectorGroup(id string) (CollectorGroup, error)
GetCollectorGroup will return a collector group object
func (BindPlane) GetCollectors ¶
func (bp BindPlane) GetCollectors() ([]CollectorGroup, error)
GetCollectors will return an array of collector group objects
func (BindPlane) GetCredential ¶
func (bp BindPlane) GetCredential(id string) (Credential, error)
GetCredential will return a credential type
func (BindPlane) GetCredentialTemplate ¶
func (bp BindPlane) GetCredentialTemplate(id string) (CredentialTypeTemplate, error)
GetCredentialTemplate will return a Credential configuration
func (BindPlane) GetCredentialType ¶
func (bp BindPlane) GetCredentialType(id string) (CredentialType, error)
GetCredentialType returns a credentials type
func (BindPlane) GetCredentials ¶
func (bp BindPlane) GetCredentials() ([]Credential, error)
GetCredentials will return a credential type
func (BindPlane) GetLogAgent ¶ added in v1.3.0
GetLogAgent returns a log agent
func (BindPlane) GetLogAgentDest ¶ added in v1.3.0
func (bp BindPlane) GetLogAgentDest(agentID, destID string) (LogAgentDest, error)
GetLogAgentDest returns a log agent's destination by id
func (BindPlane) GetLogAgentSource ¶ added in v1.3.0
func (bp BindPlane) GetLogAgentSource(agentID, sourceID string) (LogAgentSource, error)
GetLogAgentSource returns a log agent's source by id
func (BindPlane) GetLogAgentTask ¶ added in v1.3.0
func (bp BindPlane) GetLogAgentTask(agentID, taskID string) (LogAgentTask, error)
GetLogAgentTask returns a task for a given agent
func (BindPlane) GetLogDestConfig ¶ added in v1.3.0
func (bp BindPlane) GetLogDestConfig(id string) (LogDestConfig, error)
GetLogDestConfig returns a log destination config
func (BindPlane) GetLogDestType ¶ added in v1.3.0
func (bp BindPlane) GetLogDestType(id string) (LogDestType, error)
GetLogDestType returns a logging destination type
func (BindPlane) GetLogDestTypeParameters ¶ added in v1.3.0
GetLogDestTypeParameters returns a logging destination's configuraton parameters
func (BindPlane) GetLogSourceConfig ¶ added in v1.3.0
func (bp BindPlane) GetLogSourceConfig(id string) (LogSourceConfig, error)
GetLogSourceConfig returns a specified log source config
func (BindPlane) GetLogSourceType ¶ added in v1.3.0
func (bp BindPlane) GetLogSourceType(id string) (LogSourceType, error)
GetLogSourceType returns a source type
func (BindPlane) GetLogSourceTypeParameters ¶ added in v1.3.0
GetLogSourceTypeParameters returns a source type template
func (BindPlane) GetLogTemplate ¶ added in v1.3.0
func (bp BindPlane) GetLogTemplate(id string) (LogTemplate, error)
GetLogTemplate returns a log template
func (BindPlane) GetSource ¶
func (bp BindPlane) GetSource(id string) (SourceConfigGet, error)
GetSource will return a source object
func (BindPlane) GetSourceTemplate ¶
func (bp BindPlane) GetSourceTemplate(id string) (SourceTypeTemplate, error)
GetSourceTemplate will return a SourceTypeTemplate with default values
func (BindPlane) GetSourceType ¶
func (bp BindPlane) GetSourceType(id string) (SourceType, error)
GetSourceType will return a source type
func (BindPlane) GetSources ¶
func (bp BindPlane) GetSources() ([]SourceConfigGet, error)
GetSources will return a source object
func (BindPlane) InstallCMDLogAgent ¶ added in v1.3.0
InstallCMDLogAgent returns the install commands for installing the bindplane log agent
func (BindPlane) ListLogAgentDest ¶ added in v1.3.0
func (bp BindPlane) ListLogAgentDest(id string) ([]LogAgentDest, error)
ListLogAgentDest returns a log agent
func (BindPlane) ListLogAgentSources ¶ added in v1.3.0
func (bp BindPlane) ListLogAgentSources(id string) ([]LogAgentSource, error)
ListLogAgentSources returns all log agents
func (BindPlane) ListLogAgents ¶ added in v1.3.0
ListLogAgents returns all log agents
func (BindPlane) ListLogDestConfigs ¶ added in v1.3.0
func (bp BindPlane) ListLogDestConfigs() ([]LogDestConfig, error)
ListLogDestConfigs lists available log destination types
func (BindPlane) ListLogDestTypes ¶ added in v1.3.0
func (bp BindPlane) ListLogDestTypes() ([]LogDestType, error)
ListLogDestTypes lists available log destination types
func (BindPlane) ListLogSourceConfigs ¶ added in v1.3.0
func (bp BindPlane) ListLogSourceConfigs() ([]LogSourceConfig, error)
ListLogSourceConfigs returns all configured log sources
func (BindPlane) ListLogSourceTypes ¶ added in v1.3.0
func (bp BindPlane) ListLogSourceTypes() ([]LogSourceType, error)
ListLogSourceTypes returns all available log source types
func (BindPlane) ListLogTemplates ¶ added in v1.3.0
func (bp BindPlane) ListLogTemplates() ([]LogTemplate, error)
ListLogTemplates returns all log templates
func (BindPlane) ListSourceTypes ¶
func (bp BindPlane) ListSourceTypes() ([]SourceType, error)
ListSourceTypes will return an array of available source types
func (BindPlane) UpdateLogAgent ¶ added in v1.3.0
func (bp BindPlane) UpdateLogAgent(id string) (LogAgentUpdateResp, error)
UpdateLogAgent returns a log agent
func (BindPlane) UpdateLogDestConfig ¶ added in v1.3.0
func (bp BindPlane) UpdateLogDestConfig(id string) (LogDestConfig, error)
UpdateLogDestConfig updates the log destination config version to the latest
func (BindPlane) UpdateLogTemplate ¶ added in v1.3.0
func (bp BindPlane) UpdateLogTemplate(id string, t LogTemplateCreate) error
UpdateLogTemplate returns a log template
func (BindPlane) UpdateVersionLogSourceConfig ¶ added in v1.3.0
func (bp BindPlane) UpdateVersionLogSourceConfig(id string) (LogSourceConfig, error)
UpdateVersionLogSourceConfig updates the log source config version
type Collector ¶
type Collector struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` Version string `json:"version"` Hostname string `json:"hostname"` Status string `json:"status"` NumSources int `json:"num_sources"` }
Collector type describes a collector configuration
type CollectorGroup ¶
type CollectorGroup struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` Group bool `json:"group"` Status string `json:"status"` NumSources int `json:"num_sources"` Collectors []Collector `json:"collectors"` }
CollectorGroup type describes a collector group configuration
func (CollectorGroup) Print ¶
func (g CollectorGroup) Print(j bool) error
Print prints a collector group
type Credential ¶
type Credential struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` CredentialTypeID string `json:"credential_type_id"` Parameters interface{} `json:"parameters"` Sources []CredentialSource `json:"sources"` }
Credential describes a source credential configuration
func (Credential) Print ¶
func (c Credential) Print(j bool) error
Print will print a Credential object
type CredentialCreateResponse ¶
type CredentialCreateResponse struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` CredentialTypeID string `json:"credential_type_id"` Parameters interface{} `json:"parameters"` }
CredentialCreateResponse type describes the json body returned by the credential create endpoint
func (CredentialCreateResponse) Print ¶
func (c CredentialCreateResponse) Print(j bool) error
Print will print a CredentialCreateResponse object
type CredentialSource ¶ added in v1.1.0
type CredentialSource struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` Stopped bool `json:"stopped"` Status string `json:"status"` SourceType struct { ID string `json:"id"` URL string `json:"url"` DocURL string `json:"doc_url"` } }
CredentialSource describes the soure object returned inside a Credential object's list of sources
type CredentialType ¶
type CredentialType struct { ID string `json:"id"` Name string `json:"name"` Parameters []interface{} `json:"parameters"` Credentials []Credential `json:"credentials"` }
CredentialType describes a credential type object
func (CredentialType) Print ¶
func (c CredentialType) Print() error
Print will print the CredentialType object
type CredentialTypeTemplate ¶
type CredentialTypeTemplate struct { Name string `json:"name"` CredentialTypeID string `json:"credential_type_id"` Parameters interface{} `json:"parameters"` }
CredentialTypeTemplate describes a credential type template object
func (CredentialTypeTemplate) Print ¶
func (c CredentialTypeTemplate) Print() error
Print will print the CredentialTypeTemplate object
type Job ¶
type Job struct { ID string `json:"id"` Status string `json:"status"` Message string `json:"message"` URL string `json:"url"` Result interface{} `json:"result"` }
Job describes a job object
type LogAgent ¶ added in v1.3.0
type LogAgent struct { ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` LatestVersion string `json:"latest_version"` Status string `json:"status"` }
LogAgent represents a BindPlane log agent
type LogAgentDest ¶ added in v1.3.0
type LogAgentDest struct { DestinationConfigID string `json:"destination_config_id"` Name string `json:"name"` Version string `json:"version"` LatestVersion string `json:"latest_version"` TypeID string `json:"type_id"` }
LogAgentDest represents a Bindplane Log agent destination config
func (LogAgentDest) Print ¶ added in v1.3.0
func (d LogAgentDest) Print(j bool) error
Print prints a LogAgentDest
type LogAgentSource ¶ added in v1.3.0
type LogAgentSource struct { SourceConfigID string `json:"source_config_id"` Name string `json:"name"` Version string `json:"version"` LatestVersion string `json:"latest_version"` TypeID string `json:"type_id"` }
LogAgentSource represents a BindPlane log agent's source configuration
func (LogAgentSource) Print ¶ added in v1.3.0
func (s LogAgentSource) Print(j bool) error
Print prints a LogAgentSource
type LogAgentTask ¶ added in v1.3.0
type LogAgentTask struct { ID string `json:"id"` AgentID string `json:"agent_id"` Name string `json:"name"` State string `json:"state"` }
LogAgentTask represents a BindPlane log agent task
func (LogAgentTask) Print ¶ added in v1.3.0
func (t LogAgentTask) Print(j bool) error
Print prints a LogAgent
type LogAgentUpdateResp ¶ added in v1.3.0
LogAgentUpdateResp represents the object returned by the api when an update command is issued
func (LogAgentUpdateResp) Print ¶ added in v1.3.0
func (a LogAgentUpdateResp) Print(j bool) error
Print prints a LogAgentUpdateResp
type LogDestConfig ¶ added in v1.3.0
type LogDestConfig struct { ID string `json:"id"` Name string `json:"name"` Destination struct { ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` } `json:"destination"` }
LogDestConfig represents a logging destination configuration
func (LogDestConfig) Print ¶ added in v1.3.0
func (d LogDestConfig) Print(j bool) error
Print print a LogDestConfig type
type LogDestType ¶ added in v1.3.0
type LogDestType struct { ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` DocURL string `json:"doc_url"` }
LogDestType represents a logging destination
func (LogDestType) Print ¶ added in v1.3.0
func (d LogDestType) Print(j bool) error
Print prints a LogDestType type
type LogSourceConfig ¶ added in v1.3.0
type LogSourceConfig struct { // ID is always returned from the API but it is // not required when creating a new config ID string `json:"id,omitempty"` Name string `json:"name"` Source struct { ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` } `json:"source"` // configuration is only returned when getting a specific // config, not during a list operation, therefore we omit // it when it is not present Configuration map[string]interface{} `json:"configuration,omitempty"` CustomTemplate string `json:"custom_template,omitempty"` }
LogSourceConfig type represents a log source config
func (LogSourceConfig) Print ¶ added in v1.3.0
func (c LogSourceConfig) Print(j bool) error
Print prints a LogSourceConfig
type LogSourceType ¶ added in v1.3.0
type LogSourceType struct { ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` DocURL string `json:"doc_url"` }
LogSourceType type represents a log source type
func (LogSourceType) Print ¶ added in v1.3.0
func (s LogSourceType) Print(j bool) error
Print prints a LogSourceType
type LogTemplate ¶ added in v1.3.0
type LogTemplate struct { ID string `json:"id"` Name string `json:"name"` AgentGroup string `json:"agent_group"` }
LogTemplate represents a bindplane logs template
func (LogTemplate) Print ¶ added in v1.3.0
func (t LogTemplate) Print(j bool) error
Print prints a LogTemplate
type LogTemplateCreate ¶
type LogTemplateCreate struct { Name string `json:"name"` SourceConfigIds []string `json:"source_config_ids"` DestinationConfigID string `json:"destination_config_id"` AgentGroup string `json:"agent_group"` }
LogTemplateCreate represents the object used to create a bindplane logs template
func (LogTemplateCreate) Verify ¶
func (t LogTemplateCreate) Verify() error
Verify validates a LogTemplateCreate type
type SourceConfigCreate ¶
type SourceConfigCreate struct { CollectionInterval int `json:"collection_interval"` CollectorID string `json:"collector_id"` Configuration interface{} `json:"configuration"` Credentials struct { Credentials string `json:"credentials"` } `json:"credentials"` Name string `json:"name"` SourceType string `json:"source_type"` }
SourceConfigCreate type describes a source configuration to be created
func (SourceConfigCreate) Validate ¶
func (s SourceConfigCreate) Validate() error
Validate validates a SourceConfigCreate configuration
type SourceConfigGet ¶
type SourceConfigGet struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` SourceType struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` DocURL string `json:"doc_url"` } `json:"source_type"` CollectionInterval int `json:"collection_interval"` CreatedAt string `json:"created_at"` Credentials []Credential `json:"credentials"` Configuration interface{} `json:"configuration"` Status string `json:"status"` StatusReportedAt string `json:"status_reported_at"` StatusMessage string `json:"status_message"` Stopped bool `json:"stopped"` Collector struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` Version string `json:"version"` Hostname string `json:"hostname"` Status string `json:"status"` NumSources int `json:"num_sources"` } `json:"collector"` }
SourceConfigGet type describes a source configuration
type SourceCreateResponse ¶
SourceCreateResponse type describes the json body returned by the source create endpoint
func (SourceCreateResponse) Print ¶
func (s SourceCreateResponse) Print(j bool) error
Print prints a SourceCreateResponse
type SourceType ¶
type SourceType struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` DocURL string `json:"doc_url"` Version string `json:"version"` DefaultCollectionInterval int `json:"default_collection_interval"` CredentialTypes []CredentialType `json:"credential_types"` ConnectionParameters interface{} `json:"connection_parameters"` }
SourceType type describes a source type configuration
type SourceTypeTemplate ¶
type SourceTypeTemplate struct { Name string `json:"name"` SourceType string `json:"source_type"` CollectorID string `json:"collector_id"` CollectionInterval int `json:"collection_interval"` Credentials struct { Credentials string `json:"credentials"` } `json:"credentials"` Configuration interface{} `json:"configuration"` }
SourceTypeTemplate type describes a source type template configuration
func (SourceTypeTemplate) Print ¶
func (s SourceTypeTemplate) Print() error
Print prints a SourceTypeTemplate