models

package
v0.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SequenceTriggeredState          = "triggered"
	SequenceStartedState            = "started"
	SequenceWaitingState            = "waiting"
	SequenceWaitingForApprovalState = "waitingForApproval"
	SequenceFinished                = "finished"
	TimedOut                        = "timedOut"
	SequencePaused                  = "paused"
	SequenceAborted                 = "aborted"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddTemporaryDataOptions

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

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

func (*Approval) FromJSON

func (a *Approval) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Approval) ToJSON

func (a *Approval) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type CreateLogsRequest

type CreateLogsRequest struct {
	// logs
	Logs []LogEntry `form:"logs" json:"logs"`
}

func (*CreateLogsRequest) FromJSON

func (l *CreateLogsRequest) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*CreateLogsRequest) ToJSON

func (l *CreateLogsRequest) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type CreateProject

type CreateProject struct {
	// name
	// Required: true
	Name *string `json:"name"`

	// shipyard
	// Required: true
	Shipyard *string `json:"shipyard"`

	// git auth credentials
	GitCredentials *GitAuthCredentials `json:"gitCredentials,omitempty"`
}

CreateProject create project

func (*CreateProject) FromJSON

func (c *CreateProject) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*CreateProject) ToJSON

func (c *CreateProject) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type CreateService

type CreateService struct {

	// service name
	// Required: true
	ServiceName *string `json:"serviceName"`
}

CreateService create service

func (*CreateService) FromJSON

func (c *CreateService) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*CreateService) ToJSON

func (c *CreateService) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type CreateSubscriptionResponse

type CreateSubscriptionResponse struct {
	ID string `json:"id"`
}

func (*CreateSubscriptionResponse) FromJSON

func (s *CreateSubscriptionResponse) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*CreateSubscriptionResponse) ToJSON

func (s *CreateSubscriptionResponse) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type DeleteProjectResponse

type DeleteProjectResponse struct {

	// message
	Message string `json:"message,omitempty"`
}

DeleteProjectResponse delete project response

func (*DeleteProjectResponse) FromJSON

func (d *DeleteProjectResponse) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*DeleteProjectResponse) ToJSON

func (d *DeleteProjectResponse) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type DeleteServiceResponse

type DeleteServiceResponse struct {

	// message
	Message string `json:"message,omitempty"`
}

DeleteServiceResponse delete service response

func (*DeleteServiceResponse) FromJSON

func (d *DeleteServiceResponse) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*DeleteServiceResponse) ToJSON

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) FromJSON

func (e *Error) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (Error) GetMessage

func (e Error) GetMessage() string

func (*Error) ToError

func (e *Error) ToError() error

ToError converts model to fmt.Error

func (*Error) ToJSON

func (e *Error) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Evaluation

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"`

	// Evaluation commit ID context
	GitCommitID string `json:"gitcommitid,omitempty"`
}

func (*Evaluation) FromJSON

func (e *Evaluation) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Evaluation) ToJSON

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

func (ec *EventContext) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*EventContext) ToJSON

func (ec *EventContext) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type EventContextInfo

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

func (ec *EventContextInfo) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*EventContextInfo) ToJSON

func (ec *EventContextInfo) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type EventSubscription

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

func (s *EventSubscription) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type EventSubscriptionFilter

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

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

func (*Events) FromJSON

func (e *Events) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Events) ToJSON

func (e *Events) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type ExpandedProject

type ExpandedProject struct {

	// Creation date of the project
	CreationDate string `json:"creationDate,omitempty"`

	// last event context
	LastEventContext *EventContextInfo `json:"lastEventContext,omitempty"`

	// Project name
	ProjectName string `json:"projectName,omitempty"`

	// Shipyard file content
	Shipyard string `json:"shipyard,omitempty"`

	// Version of the shipyard file
	ShipyardVersion string `json:"shipyardVersion,omitempty"`

	// stages
	Stages []*ExpandedStage `json:"stages"`

	// git auth credentials
	GitCredentials *GitAuthCredentialsSecure `json:"gitCredentials,omitempty"`

	// is upstream auto provisioned
	IsUpstreamAutoProvisioned bool `json:"isUpstreamAutoProvisioned"`
}

ExpandedProject expanded project

swagger:model ExpandedProject

func (*ExpandedProject) FromJSON

func (a *ExpandedProject) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*ExpandedProject) ToJSON

func (a *ExpandedProject) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type ExpandedProjects

type ExpandedProjects struct {

	// Pointer to next page, base64 encoded
	NextPageKey string `json:"nextPageKey,omitempty"`

	// Size of returned page
	PageSize float64 `json:"pageSize,omitempty"`

	// projects
	Projects []*ExpandedProject `json:"projects"`

	// Total number of projects
	TotalCount float64 `json:"totalCount,omitempty"`
}

ExpandedProjects expanded projects

swagger:model ExpandedProjects

type ExpandedService

type ExpandedService 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 remediations
	OpenRemediations []*Remediation `json:"openRemediations"`

	// Service name
	ServiceName string `json:"serviceName,omitempty"`
}

ExpandedService service expanded with remediaitons

swagger:model ExpandedService

type ExpandedServices

type ExpandedServices struct {

	// Pointer to next page, base64 encoded
	NextPageKey string `json:"nextPageKey,omitempty"`

	// Size of returned page
	PageSize float64 `json:"pageSize,omitempty"`

	// projects
	Services []*ExpandedService `json:"services"`

	// Total number of projects
	TotalCount float64 `json:"totalCount,omitempty"`
}

ExpandedServices expanded services

swagger:model ExpandedProjects

type ExpandedStage

type ExpandedStage struct {

	// last event context
	LastEventContext *EventContextInfo `json:"lastEventContext,omitempty"`

	// services
	Services []*ExpandedService `json:"services"`

	// Stage name
	StageName string `json:"stageName,omitempty"`

	// Parent Stages
	ParentStages []string `json:"parentStages,omitempty"`
}

ExpandedStage stage with expanded service

swagger:model ExpandedStage

type ExpandedStages

type ExpandedStages struct {

	// Pointer to next page, base64 encoded
	NextPageKey string `json:"nextPageKey,omitempty"`

	// Size of returned page
	PageSize float64 `json:"pageSize,omitempty"`

	// stages
	Stages []*ExpandedStage `json:"stages"`

	// Total number of stages
	TotalCount float64 `json:"totalCount,omitempty"`
}

ExpandedStages stores ExpandedStage

type GetLogsParams

type GetLogsParams struct {
	LogFilter
	PageSize    int
	NextPageKey int
}

type GetLogsResponse

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

func (l *GetLogsResponse) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*GetLogsResponse) ToJSON

func (l *GetLogsResponse) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type GetSecretResponseItem

type GetSecretResponseItem struct {
	SecretMetadata `yaml:",inline"`
	Keys           []string `json:"keys" yaml:"keys"`
}

type GetSecretsResponse

type GetSecretsResponse struct {
	Secrets []GetSecretResponseItem `json:"secrets" yaml:"secrets"`
}

func (*GetSecretsResponse) FromJSON

func (s *GetSecretsResponse) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*GetSecretsResponse) ToJSON

func (s *GetSecretsResponse) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type GetSequenceStateParams

type GetSequenceStateParams struct {
	/*Pointer to the next set of items
	  In: query
	*/
	NextPageKey int64 `form:"nextPageKey" json:"nextPageKey"`
	/*The number of items to return
	  Maximum: 50
	  Minimum: 1
	  In: query
	  Default: 20
	*/
	PageSize int64 `form:"pageSize" json:"pageSize"`
	/*Project name
	  In: query
	*/
	Project string `form:"project" json:"project"`

	/*Sequence name
	  In: query
	*/
	Name string `form:"name" json:"name"`

	/*Sequence status
	  In: query
	*/
	State string `form:"state" json:"state"`

	/*From time to fetch sequence states
	  In: query
	*/
	FromTime string `form:"fromTime" json:"fromTime"`

	/*Before time to fetch sequence states
	  In: query
	*/
	BeforeTime string `form:"beforeTime" json:"beforeTime"`

	/** Keptn context
	  In: query
	*/
	KeptnContext string `form:"keptnContext" json:"keptnContext"`
}

type GitAuthCredentials

type GitAuthCredentials struct {

	// git remote URL
	RemoteURL string `json:"remoteURL" bson:"remoteURL"`

	// git user
	User string `json:"user,omitempty" bson:"user"`

	// https git credentials
	HttpsAuth *HttpsGitAuth `json:"https,omitempty" bson:"https"`

	//ssh git credentials
	SshAuth *SshGitAuth `json:"ssh,omitempty" bson:"ssh"`
}

GitAuthCredentials stores git credentials

func (*GitAuthCredentials) FromJSON

func (p *GitAuthCredentials) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*GitAuthCredentials) ToJSON

func (p *GitAuthCredentials) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type GitAuthCredentialsSecure

type GitAuthCredentialsSecure struct {
	// git remote URL
	RemoteURL string `json:"remoteURL" bson:"remoteURL"`

	// git user
	User string `json:"user,omitempty" bson:"user"`

	// https git credentials
	HttpsAuth *HttpsGitAuthSecure `json:"https,omitempty" bson:"https"`
}

GitAuthCredentialsSecure stores git credentials without secure information model for retrieving credentials data with GET request

func (*GitAuthCredentialsSecure) FromJSON

func (p *GitAuthCredentialsSecure) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*GitAuthCredentialsSecure) ToJSON

func (p *GitAuthCredentialsSecure) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type HttpsGitAuth

type HttpsGitAuth struct {
	// Git token
	Token string `json:"token" bson:"token"`

	//git PEM Certificate
	Certificate string `json:"certificate,omitempty" bson:"certificate"`

	// insecure skip tls
	InsecureSkipTLS bool `json:"insecureSkipTLS" bson:"insecureSkipTLS"`

	// git proxy credentials
	Proxy *ProxyGitAuth `json:"proxy,omitempty" bson:"proxy"`
}

HttpsGitAuth stores HTTPS git credentials

func (*HttpsGitAuth) FromJSON

func (p *HttpsGitAuth) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*HttpsGitAuth) ToJSON

func (p *HttpsGitAuth) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type HttpsGitAuthSecure

type HttpsGitAuthSecure struct {
	// insecure skip tls
	InsecureSkipTLS bool `json:"insecureSkipTLS" bson:"insecureSkipTLS"`

	// git proxy credentials
	Proxy *ProxyGitAuthSecure `json:"proxy,omitempty" bson:"proxy"`
}

HttpsGitAuthSecure stores HTTPS git credentials without secure information model for retrieving credentials data with GET request

func (*HttpsGitAuthSecure) FromJSON

func (p *HttpsGitAuthSecure) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*HttpsGitAuthSecure) ToJSON

func (p *HttpsGitAuthSecure) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Integration

type Integration struct {
	ID            string              `json:"id" bson:"_id"`
	Name          string              `json:"name" bson:"name"`
	MetaData      MetaData            `json:"metadata" bson:"metadata"`
	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

func (i *Integration) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Integration) ToJSON

func (i *Integration) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type IntegrationID

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

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

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"`

	// gitcommitid
	GitCommitID string `json:"gitcommitid,omitempty"`

	// type
	// Required: true
	Type *string `json:"type"`
}

KeptnContextExtendedCE keptn context extended CloudEvent

func (*KeptnContextExtendedCE) AddTemporaryData

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

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

func (ce *KeptnContextExtendedCE) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*KeptnContextExtendedCE) GetTemporaryData

func (ce *KeptnContextExtendedCE) GetTemporaryData(key string, tmpdata interface{}) error

GetTemporaryData returns the (temporary) data eventually stored in the event

func (*KeptnContextExtendedCE) ToJSON

func (ce *KeptnContextExtendedCE) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

func (*KeptnContextExtendedCE) Validate

func (ce *KeptnContextExtendedCE) Validate() error

Validate checks whether the required properties 'time', 'type', 'id' and 'source' are defined and non-empty

type KubernetesMetaData

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

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"`
	GitCommitID   string    `json:"gitcommitid" bson:"gitcommitid"`
}

func (*LogEntry) FromJSON

func (l *LogEntry) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*LogEntry) ToJSON

func (l *LogEntry) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type LogFilter

type LogFilter struct {
	IntegrationID string
	FromTime      string
	BeforeTime    string
}

type MetaData

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

type Metadata struct {

	// automaticprovisioning
	// Required: true
	Automaticprovisioning *bool `json:"automaticprovisioning"`

	// 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"`

	// shipyardversion
	Shipyardversion string `json:"shipyardversion,omitempty"`
}

Metadata metadata

func (*Metadata) FromJSON

func (m *Metadata) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Metadata) ToJSON

func (m *Metadata) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Project

type Project struct {

	// Creation date of the service
	CreationDate string `json:"creationDate,omitempty"`

	// Project name
	ProjectName string `json:"projectName,omitempty"`

	// Shipyard version
	ShipyardVersion string `json:"shipyardVersion,omitempty"`

	// stages
	Stages []*Stage `json:"stages"`

	// git auth credentials
	GitCredentials *GitAuthCredentials `json:"gitCredentials,omitempty"`
}

Project project

func (*Project) FromJSON

func (p *Project) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Project) ToJSON

func (p *Project) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Projects

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

func (*Projects) FromJSON

func (p *Projects) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Projects) ToJSON

func (p *Projects) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type ProxyGitAuth

type ProxyGitAuth struct {
	// git proxy URL
	URL string `json:"url" bson:"url"`

	// git proxy scheme
	Scheme string `json:"scheme" bson:"scheme"`

	// git proxy user
	User string `json:"user,omitempty" bson:"user"`

	// git proxy password
	Password string `json:"password,omitempty" bson:"password"`
}

ProxyGitAuth stores proxy git credentials

func (*ProxyGitAuth) FromJSON

func (p *ProxyGitAuth) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*ProxyGitAuth) ToJSON

func (p *ProxyGitAuth) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type ProxyGitAuthSecure

type ProxyGitAuthSecure struct {
	// git proxy URL
	URL string `json:"url" bson:"url"`

	// git proxy scheme
	Scheme string `json:"scheme" bson:"scheme"`

	// git proxy user
	User string `json:"user,omitempty" bson:"user"`
}

ProxyGitAuthSecure stores proxy git credentials without secure information model for retrieving credentials data with GET request

func (*ProxyGitAuthSecure) FromJSON

func (p *ProxyGitAuthSecure) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*ProxyGitAuthSecure) ToJSON

func (p *ProxyGitAuthSecure) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type RegisterIntegrationResponse

type RegisterIntegrationResponse struct {
	ID string `json:"id"`
}

func (*RegisterIntegrationResponse) FromJSON

func (i *RegisterIntegrationResponse) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*RegisterIntegrationResponse) ToJSON

func (i *RegisterIntegrationResponse) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Remediation

type Remediation struct {

	// Executed action
	Action string `json:"action,omitempty"`

	// 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"`

	// Type of the event
	Type string `json:"type,omitempty"`
}

Remediation remediation

swagger:model Remediation

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

func (*Resource) FromJSON

func (r *Resource) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Resource) ToJSON

func (r *Resource) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Resources

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

func (*Resources) FromJSON

func (r *Resources) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Resources) ToJSON

func (r *Resources) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Secret

type Secret struct {

	// data
	// Required: true
	Data map[string]string `json:"data"`

	SecretMetadata
}

Secret secret

func (*Secret) FromJSON

func (s *Secret) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Secret) ToJSON

func (s *Secret) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type SecretMetadata

type SecretMetadata struct {
	// The name of the secret
	// Required: true
	Name *string `json:"name" yaml:"name"`

	// The scope of the secret
	// Required: true
	Scope *string `json:"scope,omitempty" yaml:"scope,omitempty"`
}

type SequenceControl

type SequenceControl struct {
	State        SequenceControlState
	KeptnContext string
	Stage        string
	Project      string
}

SequenceControl represents the wanted SequenceControlState for a certain Project Stage and Context

type SequenceControlCommand

type SequenceControlCommand struct {
	State SequenceControlState `json:"state" binding:"required"`
	Stage string               `json:"stage"`
}

SequenceControlCommand contains instructions to issue a Sequence state change request

type SequenceControlResponse

type SequenceControlResponse struct {
}

type SequenceControlState

type SequenceControlState string

SequenceControlState represent the wanted state of a sequence

const (
	// PauseSequence represent a paused sequence
	PauseSequence SequenceControlState = "pause"

	// ResumeSequence represent a sequence that was paused and should now be resumed
	ResumeSequence SequenceControlState = "resume"

	// AbortSequence represent a sequence that needs to be aborted
	AbortSequence SequenceControlState = "abort"
)

type SequenceState

type SequenceState struct {
	Name           string               `json:"name" bson:"name"`
	Service        string               `json:"service" bson:"service"`
	Project        string               `json:"project" bson:"project"`
	Time           string               `json:"time" bson:"time"`
	Shkeptncontext string               `json:"shkeptncontext" bson:"shkeptncontext"`
	State          string               `json:"state" bson:"state"`
	Stages         []SequenceStateStage `json:"stages" bson:"stages"`
	ProblemTitle   string               `json:"problemTitle,omitempty" bson:"problemTitle"`
}

SequenceState represent the current state of a sequence

type SequenceStateEvaluation

type SequenceStateEvaluation struct {
	Result string  `json:"result" bson:"result"`
	Score  float64 `json:"score" bson:"score"`
}

SequenceStateEvaluation returns evaluation details

type SequenceStateEvent

type SequenceStateEvent struct {
	Type string `json:"type" bson:"type"`
	ID   string `json:"id" bson:"id"`
	Time string `json:"time" bson:"time"`
}

SequenceStateEvent contains information about the Event type time and ID

type SequenceStateStage

type SequenceStateStage struct {
	Name              string                   `json:"name" bson:"name"`
	Image             string                   `json:"image,omitempty" bson:"image"`
	State             string                   `json:"state" bson:"state"`
	LatestEvaluation  *SequenceStateEvaluation `json:"latestEvaluation,omitempty" bson:"latestEvaluation"`
	LatestEvent       *SequenceStateEvent      `json:"latestEvent,omitempty" bson:"latestEvent"`
	LatestFailedEvent *SequenceStateEvent      `json:"latestFailedEvent,omitempty" bson:"latestFailedEvent"`
}

SequenceStateStage represent current state of a stage in a sequence

type SequenceStates

type SequenceStates struct {
	States []SequenceState `json:"states"`
	// Pointer to next page
	NextPageKey int64 `json:"nextPageKey,omitempty"`

	// Size of returned page
	PageSize int64 `json:"pageSize,omitempty"`

	// Total number of events
	TotalCount int64 `json:"totalCount,omitempty"`
}

SequenceStates collects all states of a sequence

type SequenceTimeout

type SequenceTimeout struct {
	KeptnContext string
	LastEvent    KeptnContextExtendedCE
}

SequenceTimeout is used to signal via channel that a sequence needs to be timed out

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

func (*Service) FromJSON

func (s *Service) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Service) ToJSON

func (s *Service) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Services

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

func (*Services) FromJSON

func (s *Services) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Services) ToJSON

func (s *Services) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type SshGitAuth

type SshGitAuth struct {
	// git private key
	PrivateKey string `json:"privateKey" bson:"privateKey"`

	// git private key passphrase
	PrivateKeyPass string `json:"privateKeyPass,omitempty" bson:"privateKeyPass"`
}

SshGitAuth stores SSH git credentials

func (*SshGitAuth) FromJSON

func (p *SshGitAuth) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*SshGitAuth) ToJSON

func (p *SshGitAuth) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Stage

type Stage struct {

	// services
	Services []*Service `json:"services"`

	// Stage name
	StageName string `json:"stageName,omitempty"`
}

Stage stage

func (*Stage) FromJSON

func (s *Stage) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Stage) ToJSON

func (s *Stage) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Stages

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

func (*Stages) FromJSON

func (s *Stages) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Stages) ToJSON

func (s *Stages) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type StateFilter

type StateFilter struct {
	GetSequenceStateParams
}

type TemporaryData

type TemporaryData interface{}

TemporaryData represents additional (temporary) data to be added to the data section of a keptn event

type Timeframe

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

func (*Timeframe) FromJSON

func (t *Timeframe) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Timeframe) ToJSON

func (t *Timeframe) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

type Version

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

func (*Version) FromJSON

func (v *Version) FromJSON(b []byte) error

FromJSON converts JSON string to object

func (*Version) ToJSON

func (v *Version) ToJSON() ([]byte, error)

ToJSON converts object to JSON string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL