Documentation
¶
Overview ¶
Package api provides types for Preflight reports and some common helpers.
Index ¶
Constants ¶
View Source
const TimeFormat = time.RFC3339
TimeFormat defines the format used for timestamps across all this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentMetadata ¶ added in v0.1.17
type AgentMetadata struct {
Version string `json:"version"`
// ClusterID is the name of the cluster or host where the agent is running.
// It may send data for other clusters in its datareadings.
ClusterID string `json:"cluster_id"`
}
AgentMetadata is metadata about the agent.
type DataReading ¶
type DataReading struct {
// ClusterID is optional as it can be inferred from the agent
// token when using basic authentication.
ClusterID string `json:"cluster_id,omitempty"`
DataGatherer string `json:"data-gatherer"`
Timestamp Time `json:"timestamp"`
Data interface{} `json:"data"`
SchemaVersion string `json:"schema_version"`
}
DataReading is the output of a DataGatherer.
type DataReadingsPost ¶ added in v0.1.17
type DataReadingsPost struct {
AgentMetadata *AgentMetadata `json:"agent_metadata"`
// DataGatherTime represents the time that the data readings were gathered
DataGatherTime time.Time `json:"data_gather_time"`
DataReadings []*DataReading `json:"data_readings"`
}
DataReadingsPost is the payload in the upload request.
type GatheredResource ¶ added in v0.1.29
type GatheredResource struct {
// Resource is a reference to a k8s object that was found by the informer
// should be of type unstructured.Unstructured, raw Object
Resource interface{}
DeletedAt Time
}
GatheredResource wraps the raw k8s resource that is sent to the jetstack secure backend
func (GatheredResource) MarshalJSON ¶ added in v0.1.29
func (v GatheredResource) MarshalJSON() ([]byte, error)
type Time ¶
Time is a wrapper around time.Time that overrides how it is marshaled into JSON
func (Time) MarshalJSON ¶
MarshalJSON marshals the timestamp with RFC3339 format
Click to show internal directories.
Click to hide internal directories.