Documentation
¶
Index ¶
- type AddTemporaryDataOptions
- type Approval
- type CreateLogsRequest
- type CreateProject
- type CreateService
- type CreateSubscriptionResponse
- type DeleteProjectResponse
- type DeleteServiceResponse
- type Error
- type Evaluation
- type EventContext
- type EventContextInfo
- type EventSubscription
- type EventSubscriptionFilter
- type Events
- type GetLogsParams
- type GetLogsResponse
- type GetSecretResponseItem
- type GetSecretsResponse
- type Integration
- type IntegrationID
- type KeptnContextExtendedCE
- func (ce *KeptnContextExtendedCE) AddTemporaryData(key string, tmpData TemporaryData, opts AddTemporaryDataOptions) error
- func (ce *KeptnContextExtendedCE) DataAs(out interface{}) error
- func (ce *KeptnContextExtendedCE) FromJSON(b []byte) error
- func (ce *KeptnContextExtendedCE) GetTemporaryData(key string, tmpdata interface{}) error
- func (ce *KeptnContextExtendedCE) ToJSON() ([]byte, error)
- func (ce *KeptnContextExtendedCE) Validate() error
- type KubernetesMetaData
- type LogEntry
- type LogFilter
- type MetaData
- type Metadata
- type Project
- type Projects
- type RegisterIntegrationResponse
- type Resource
- type Resources
- type Secret
- type SecretMetadata
- type Service
- type Services
- type Stage
- type Stages
- type Subscription
- type SubscriptionFilter
- type TemporaryData
- type Timeframe
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddTemporaryDataOptions ¶ added in v0.10.0
type AddTemporaryDataOptions struct {
// OverwriteIfExisting indicates, that the data will be overwritten
// in case a key for that data already exists
OverwriteIfExisting bool
}
AddTemporaryDataOptions are used to modify the behavior of adding temporary data to a keptn event
type Approval ¶ added in v0.7.0
type Approval struct {
// ID of the event
EventID string `json:"eventId,omitempty"`
// image
Image string `json:"image,omitempty"`
// Keptn Context ID of the event
KeptnContext string `json:"keptnContext,omitempty"`
// tag
Tag string `json:"tag,omitempty"`
// Time of the event
Time string `json:"time,omitempty"`
}
Approval approval
type CreateLogsRequest ¶ added in v0.8.5
type CreateLogsRequest struct {
// logs
Logs []LogEntry `form:"logs" json:"logs"`
}
func (*CreateLogsRequest) FromJSON ¶ added in v0.12.0
func (l *CreateLogsRequest) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*CreateLogsRequest) ToJSON ¶ added in v0.12.0
func (l *CreateLogsRequest) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type CreateProject ¶ added in v0.6.2
type CreateProject struct {
// git remote URL
GitRemoteURL string `json:"gitRemoteURL,omitempty"`
// git token
GitToken string `json:"gitToken,omitempty"`
// git user
GitUser string `json:"gitUser,omitempty"`
// name
// Required: true
Name *string `json:"name"`
// shipyard
// Required: true
Shipyard *string `json:"shipyard"`
}
CreateProject create project
func (*CreateProject) FromJSON ¶ added in v0.12.0
func (c *CreateProject) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*CreateProject) ToJSON ¶ added in v0.12.0
func (c *CreateProject) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type CreateService ¶ added in v0.6.2
type CreateService struct {
// service name
// Required: true
ServiceName *string `json:"serviceName"`
}
CreateService create service
func (*CreateService) FromJSON ¶ added in v0.12.0
func (c *CreateService) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*CreateService) ToJSON ¶ added in v0.12.0
func (c *CreateService) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type CreateSubscriptionResponse ¶ added in v0.9.0
type CreateSubscriptionResponse struct {
ID string `json:"id"`
}
func (*CreateSubscriptionResponse) FromJSON ¶ added in v0.9.0
func (s *CreateSubscriptionResponse) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*CreateSubscriptionResponse) ToJSON ¶ added in v0.9.0
func (s *CreateSubscriptionResponse) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type DeleteProjectResponse ¶ added in v0.8.0
type DeleteProjectResponse struct {
// message
Message string `json:"message,omitempty"`
}
DeleteProjectResponse delete project response
func (*DeleteProjectResponse) FromJSON ¶ added in v0.12.0
func (d *DeleteProjectResponse) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*DeleteProjectResponse) ToJSON ¶ added in v0.12.0
func (d *DeleteProjectResponse) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type DeleteServiceResponse ¶ added in v0.8.0
type DeleteServiceResponse struct {
// message
Message string `json:"message,omitempty"`
}
DeleteServiceResponse delete service response
func (*DeleteServiceResponse) FromJSON ¶ added in v0.12.0
func (d *DeleteServiceResponse) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*DeleteServiceResponse) ToJSON ¶ added in v0.12.0
func (d *DeleteServiceResponse) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type Error ¶
type Error struct {
// Error code
Code int64 `json:"code,omitempty"`
// Error message
// Required: true
Message *string `json:"message"`
}
Error error
func (Error) GetMessage ¶ added in v0.8.5
type Evaluation ¶ added in v0.8.0
type Evaluation struct {
// Evaluation start timestamp
Start string `json:"start,omitempty"`
// labels
Labels map[string]string `json:"labels,omitempty"`
// Evaluation timeframe
Timeframe string `json:"timeframe,omitempty"`
// Evaluation end timestamp
End string `json:"end,omitempty"`
}
func (*Evaluation) FromJSON ¶ added in v0.12.0
func (e *Evaluation) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*Evaluation) ToJSON ¶ added in v0.12.0
func (e *Evaluation) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type EventContext ¶
type EventContext struct {
// keptn context
// Required: true
KeptnContext *string `json:"keptnContext"`
}
EventContext event context
func (*EventContext) FromJSON ¶ added in v0.12.0
func (ec *EventContext) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*EventContext) ToJSON ¶ added in v0.12.0
func (ec *EventContext) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type EventContextInfo ¶ added in v0.7.0
type EventContextInfo struct {
// ID of the event
EventID string `json:"eventId,omitempty"`
// Keptn Context ID of the event
KeptnContext string `json:"keptnContext,omitempty"`
// Time of the event
Time string `json:"time,omitempty"`
}
EventContextInfo event context info
func (*EventContextInfo) FromJSON ¶ added in v0.12.0
func (ec *EventContextInfo) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*EventContextInfo) ToJSON ¶ added in v0.12.0
func (ec *EventContextInfo) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type EventSubscription ¶ added in v0.9.0
type EventSubscription struct {
ID string `json:"id" bson:"id"`
Event string `json:"event" bson:"event"`
Filter EventSubscriptionFilter `json:"filter" bson:"filter"`
}
EventSubscription describes to what events the Keptn service is subscribed to
func (*EventSubscription) ToJSON ¶ added in v0.9.0
func (s *EventSubscription) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type EventSubscriptionFilter ¶ added in v0.9.0
type EventSubscriptionFilter struct {
Projects []string `json:"projects" bson:"projects"`
Stages []string `json:"stages" bson:"stages"`
Services []string `json:"services" bson:"services"`
}
EventSubscriptionFilter is used to filter subscriptions by projects stages and/or services
type Events ¶ added in v0.6.2
type Events struct {
// events
Events []*KeptnContextExtendedCE `json:"events"`
// Pointer to next page, base64 encoded
NextPageKey string `json:"nextPageKey,omitempty"`
// Size of returned page
PageSize float64 `json:"pageSize,omitempty"`
// Total number of resources
TotalCount float64 `json:"totalCount,omitempty"`
}
Events events
type GetLogsParams ¶ added in v0.8.5
type GetLogsResponse ¶ added in v0.8.5
type GetLogsResponse struct {
NextPageKey int64 `json:"nextPageKey,omitempty"`
PageSize int64 `json:"pageSize,omitempty"`
TotalCount int64 `json:"totalCount,omitempty"`
Logs []LogEntry `json:"logs"`
}
func (*GetLogsResponse) FromJSON ¶ added in v0.12.0
func (l *GetLogsResponse) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*GetLogsResponse) ToJSON ¶ added in v0.12.0
func (l *GetLogsResponse) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type GetSecretResponseItem ¶ added in v0.10.0
type GetSecretResponseItem struct {
SecretMetadata `yaml:",inline"`
Keys []string `json:"keys" yaml:"keys"`
}
type GetSecretsResponse ¶ added in v0.8.5
type GetSecretsResponse struct {
Secrets []GetSecretResponseItem `json:"secrets" yaml:"secrets"`
}
func (*GetSecretsResponse) FromJSON ¶ added in v0.12.0
func (s *GetSecretsResponse) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*GetSecretsResponse) ToJSON ¶ added in v0.12.0
func (s *GetSecretsResponse) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type Integration ¶ added in v0.8.5
type Integration struct {
ID string `json:"id" bson:"_id"`
Name string `json:"name" bson:"name"`
MetaData MetaData `json:"metadata" bson:"metadata"`
// Deprecated: for backwards compatibility Subscription is populated
// but new code shall use Subscriptions
Subscription Subscription `json:"subscription" bson:"subscription"`
Subscriptions []EventSubscription `json:"subscriptions" bson:"subscriptions"`
}
Integration represents a Keptn service a.k.a. Keptn sntegration and contains the name, id and subscription data as well as other information needed to register a Keptn service to the control plane
func (*Integration) FromJSON ¶ added in v0.8.5
func (i *Integration) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*Integration) ToJSON ¶ added in v0.8.5
func (i *Integration) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type IntegrationID ¶ added in v0.8.5
type IntegrationID struct {
Name string `json:"name" bson:"name"`
Namespace string `json:"namespace" bson:"namespace"`
NodeName string `json:"nodename" bson:"nodename"`
}
IntegrationID is the unique id of a Keptn service a.k.a "Keptn integration" It is composed by a name, the namespace the service resides in and the node name of the cluster node
func (IntegrationID) Hash ¶ added in v0.8.5
func (i IntegrationID) Hash() (string, error)
Hash computes a hash value of an IntegrationID The IntegrationID must have a name, namespace as well as a nodename set
type KeptnContextExtendedCE ¶ added in v0.2.4
type KeptnContextExtendedCE struct {
// contenttype
Contenttype string `json:"contenttype,omitempty"`
// data
// Required: true
Data interface{} `json:"data"`
// extensions
Extensions interface{} `json:"extensions,omitempty"`
// id
ID string `json:"id,omitempty"`
// shkeptncontext
Shkeptncontext string `json:"shkeptncontext,omitempty"`
// shkeptnspecversion
Shkeptnspecversion string `json:"shkeptnspecversion,omitempty"`
// source
// Required: true
Source *string `json:"source"`
// specversion
Specversion string `json:"specversion,omitempty"`
// time
// Format: date-time
Time time.Time `json:"time,omitempty"`
// triggeredid
Triggeredid string `json:"triggeredid,omitempty"`
// type
// Required: true
Type *string `json:"type"`
}
KeptnContextExtendedCE keptn context extended CloudEvent
func (*KeptnContextExtendedCE) AddTemporaryData ¶ added in v0.10.0
func (ce *KeptnContextExtendedCE) AddTemporaryData(key string, tmpData TemporaryData, opts AddTemporaryDataOptions) error
AddTemporaryData adds further (temporary) properties to the data section of the keptn event
func (*KeptnContextExtendedCE) DataAs ¶ added in v0.8.4
func (ce *KeptnContextExtendedCE) DataAs(out interface{}) error
DataAs attempts to populate the provided data object with the event payload. data should be a pointer type.
func (*KeptnContextExtendedCE) FromJSON ¶ added in v0.12.0
func (ce *KeptnContextExtendedCE) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*KeptnContextExtendedCE) GetTemporaryData ¶ added in v0.10.0
func (ce *KeptnContextExtendedCE) GetTemporaryData(key string, tmpdata interface{}) error
GetTemporaryData returns the (temporary) data eventually stored in the event
func (*KeptnContextExtendedCE) ToJSON ¶ added in v0.12.0
func (ce *KeptnContextExtendedCE) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
func (*KeptnContextExtendedCE) Validate ¶ added in v0.2.4
func (ce *KeptnContextExtendedCE) Validate() error
Validate checks whether the required properties 'time', 'type', 'id' and 'source' are defined and non-empty
type KubernetesMetaData ¶ added in v0.8.5
type KubernetesMetaData struct {
Namespace string `json:"namespace" bson:"namespace"`
PodName string `json:"podname" bson:"podname"`
DeploymentName string `json:"deploymentname" bson:"deploymentname"`
}
KubernetesMetaData represents metadata specific to Kubernetes
type LogEntry ¶ added in v0.8.5
type LogEntry struct {
IntegrationID string `json:"integrationid" bson:"integrationid"`
Message string `json:"message" bson:"message"`
Time time.Time `json:"time" bson:"time"`
KeptnContext string `json:"shkeptncontext" bson:"shkeptncontext"`
Task string `json:"task" bson:"task"`
TriggeredID string `json:"triggeredid" bson:"triggeredid"`
}
type MetaData ¶ added in v0.8.5
type MetaData struct {
Hostname string `json:"hostname" bson:"hostname"`
IntegrationVersion string `json:"integrationversion" bson:"integrationversion"`
DistributorVersion string `json:"distributorversion" bson:"distributorversion"`
Location string `json:"location" bson:"location"`
KubernetesMetaData KubernetesMetaData `json:"kubernetesmetadata" bson:"kubernetesmetadata"`
LastSeen time.Time `json:"lastseen" bson:"lastseen"`
}
MetaData contains important information about the Keptn service which is used during registering the service to the control plane
type Metadata ¶ added in v0.7.0
type Metadata struct {
// bridgeversion
Bridgeversion string `json:"bridgeversion,omitempty"`
// keptnlabel
Keptnlabel string `json:"keptnlabel,omitempty"`
// keptnservices
Keptnservices interface{} `json:"keptnservices,omitempty"`
// keptnversion
Keptnversion string `json:"keptnversion,omitempty"`
// namespace
Namespace string `json:"namespace,omitempty"`
}
Metadata metadata
type Project ¶
type Project struct {
// Creation date of the service
CreationDate string `json:"creationDate,omitempty"`
// Git remote URI
GitRemoteURI string `json:"gitRemoteURI,omitempty"`
// Git token
GitToken string `json:"gitToken,omitempty"`
// Git User
GitUser string `json:"gitUser,omitempty"`
// Project name
ProjectName string `json:"projectName,omitempty"`
// Shipyard version
ShipyardVersion string `json:"shipyardVersion,omitempty"`
// stages
Stages []*Stage `json:"stages"`
}
Project project
type Projects ¶ added in v0.6.2
type Projects struct {
// Pointer to next page, base64 encoded
NextPageKey string `json:"nextPageKey,omitempty"`
// Size of returned page
PageSize float64 `json:"pageSize,omitempty"`
// projects
Projects []*Project `json:"projects"`
// Total number of projects
TotalCount float64 `json:"totalCount,omitempty"`
}
Projects projects
type RegisterIntegrationResponse ¶ added in v0.8.5
type RegisterIntegrationResponse struct {
ID string `json:"id"`
}
func (*RegisterIntegrationResponse) FromJSON ¶ added in v0.8.5
func (i *RegisterIntegrationResponse) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*RegisterIntegrationResponse) ToJSON ¶ added in v0.8.5
func (i *RegisterIntegrationResponse) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type Resource ¶
type Resource struct {
// Metadata
Metadata *Version `json:"metadata,omitempty"`
// Resource content
ResourceContent string `json:"resourceContent,omitempty"`
// Resource URI
// Required: true
ResourceURI *string `json:"resourceURI"`
}
Resource resource
type Resources ¶ added in v0.6.2
type Resources struct {
// Pointer to next page, base64 encoded
NextPageKey string `json:"nextPageKey,omitempty"`
// Size of returned page
PageSize float64 `json:"pageSize,omitempty"`
// resources
Resources []*Resource `json:"resources"`
// Total number of resources
TotalCount float64 `json:"totalCount,omitempty"`
}
Resources resources
type Secret ¶ added in v0.8.1
type Secret struct {
// data
// Required: true
Data map[string]string `json:"data"`
SecretMetadata
}
Secret secret
type SecretMetadata ¶ added in v0.8.5
type Service ¶
type Service struct {
// Creation date of the service
CreationDate string `json:"creationDate,omitempty"`
// Currently deployed image
DeployedImage string `json:"deployedImage,omitempty"`
// last event types
LastEventTypes map[string]EventContextInfo `json:"lastEventTypes,omitempty"`
// open approvals
OpenApprovals []*Approval `json:"openApprovals"`
// Service name
ServiceName string `json:"serviceName,omitempty"`
}
Service service
type Services ¶ added in v0.6.2
type Services struct {
// Pointer to next page, base64 encoded
NextPageKey string `json:"nextPageKey,omitempty"`
// Size of returned page
PageSize float64 `json:"pageSize,omitempty"`
// services
Services []*Service `json:"services"`
// Total number of services
TotalCount float64 `json:"totalCount,omitempty"`
}
Services services
type Stage ¶ added in v0.6.2
type Stage struct {
// services
Services []*Service `json:"services"`
// Stage name
StageName string `json:"stageName,omitempty"`
}
Stage stage
type Stages ¶ added in v0.6.2
type Stages struct {
// Pointer to next page, base64 encoded
NextPageKey string `json:"nextPageKey,omitempty"`
// Size of returned page
PageSize float64 `json:"pageSize,omitempty"`
// stages
Stages []*Stage `json:"stages"`
// Total number of stages
TotalCount float64 `json:"totalCount,omitempty"`
}
Stages stages
type Subscription ¶ added in v0.8.5
type Subscription struct {
Topics []string `json:"topics" bson:"topics"`
Status string `json:"status" bson:"status"`
Filter SubscriptionFilter `json:"filter" bson:"filter"`
}
Subscription describes to what events the Keptn service is subscribed to Deprecated
type SubscriptionFilter ¶ added in v0.8.5
type SubscriptionFilter struct {
Project string `json:"project" bson:"project"`
Stage string `json:"stage" bson:"stage"`
Service string `json:"service" bson:"service"`
}
SubscriptionFilter is used to filter subscriptions by project stage or service Deprecated
type TemporaryData ¶ added in v0.10.0
type TemporaryData interface{}
TemporaryData represents additional (temporary) data to be added to the data section of a keptn event
type Timeframe ¶ added in v0.8.0
type Timeframe struct {
// Evaluation start timestamp
From string `json:"from,omitempty"`
// Evaluation timeframe
Timeframe string `json:"timeframe,omitempty"`
// Evaluation end timestamp
To string `json:"to,omitempty"`
}
Timeframe timeframe
type Version ¶ added in v0.6.2
type Version struct {
// Branch in repository containing the resource
Branch string `json:"branch,omitempty"`
// Upstream respository containing the resource
UpstreamURL string `json:"upstreamURL,omitempty"`
// Version identifier
Version string `json:"version,omitempty"`
}
Version version
Source Files
¶
- approval.go
- create_project.go
- create_service.go
- delete_project_response.go
- delete_service_response.go
- error.go
- evaluation.go
- event_context.go
- event_context_info.go
- events.go
- keptn_context_extended_c_e.go
- log.go
- metadata.go
- project.go
- projects.go
- resource.go
- resources.go
- secret.go
- service.go
- services.go
- stage.go
- stages.go
- timeframe.go
- uniform.go
- uniform_response.go
- version.go