Documentation ¶
Index ¶
- Constants
- Variables
- func HealthEndpointHandler(w http.ResponseWriter, r *http.Request)
- func RunHealthEndpoint(port string, opts ...HealthHandlerOption)
- func SortByTime(events []*models.KeptnContextExtendedCE)
- func WithAuthToken(authToken string, authHeader ...string) func(*APISet)
- func WithHTTPClient(client *http.Client) func(*APISet)
- func WithScheme(scheme string) func(*APISet)
- type APIHandler
- func (a *APIHandler) CreateProject(project models.CreateProject) (string, *models.Error)
- func (a *APIHandler) CreateService(project string, service models.CreateService) (string, *models.Error)
- func (a *APIHandler) DeleteProject(project models.Project) (*models.DeleteProjectResponse, *models.Error)
- func (a *APIHandler) DeleteService(project, service string) (*models.DeleteServiceResponse, *models.Error)
- func (a *APIHandler) GetMetadata() (*models.Metadata, *models.Error)
- func (a *APIHandler) SendEvent(event models.KeptnContextExtendedCE) (*models.EventContext, *models.Error)
- func (a *APIHandler) TriggerEvaluation(project, stage, service string, evaluation models.Evaluation) (*models.EventContext, *models.Error)
- func (a *APIHandler) UpdateProject(project models.CreateProject) (string, *models.Error)
- type APIService
- type APISet
- func (c *APISet) APIV1() APIV1Interface
- func (c *APISet) AuthV1() AuthV1Interface
- func (c *APISet) Endpoint() *url.URL
- func (c *APISet) EventsV1() EventsV1Interface
- func (c *APISet) LogsV1() LogsV1Interface
- func (c *APISet) ProjectsV1() ProjectsV1Interface
- func (c *APISet) ResourcesV1() ResourcesV1Interface
- func (c *APISet) SecretsV1() SecretsV1Interface
- func (c *APISet) SequencesV1() SequencesV1Interface
- func (c *APISet) ServicesV1() ServicesV1Interface
- func (c *APISet) ShipyardControlV1() ShipyardControlV1Interface
- func (c *APISet) StagesV1() StagesV1Interface
- func (c *APISet) Token() string
- func (c *APISet) UniformV1() UniformV1Interface
- type APIV1Interface
- type AuthHandler
- type AuthV1Interface
- type ConfigurableSleeper
- type EventFilter
- type EventHandler
- type EventHandlerInterface
- type EventManipulatorFunc
- type EventWatcher
- type EventWatcherOption
- type EventsV1Interface
- type FakeSleeper
- type HealthHandlerOption
- type ILogHandler
- type InClusterAPIMappings
- type InternalAPIHandler
- func (i *InternalAPIHandler) CreateProject(project models.CreateProject) (string, *models.Error)
- func (i *InternalAPIHandler) CreateService(project string, service models.CreateService) (string, *models.Error)
- func (i *InternalAPIHandler) DeleteProject(project models.Project) (*models.DeleteProjectResponse, *models.Error)
- func (i *InternalAPIHandler) DeleteService(project string, service string) (*models.DeleteServiceResponse, *models.Error)
- func (i *InternalAPIHandler) GetMetadata() (*models.Metadata, *models.Error)
- func (i *InternalAPIHandler) SendEvent(event models.KeptnContextExtendedCE) (*models.EventContext, *models.Error)
- func (i *InternalAPIHandler) TriggerEvaluation(project string, stage string, service string, evaluation models.Evaluation) (*models.EventContext, *models.Error)
- func (i *InternalAPIHandler) UpdateProject(project models.CreateProject) (string, *models.Error)
- type InternalAPISet
- func (c *InternalAPISet) APIV1() APIV1Interface
- func (c *InternalAPISet) AuthV1() AuthV1Interface
- func (c *InternalAPISet) EventsV1() EventsV1Interface
- func (c *InternalAPISet) LogsV1() LogsV1Interface
- func (c *InternalAPISet) ProjectsV1() ProjectsV1Interface
- func (c *InternalAPISet) ResourcesV1() ResourcesV1Interface
- func (c *InternalAPISet) SecretsV1() SecretsV1Interface
- func (c *InternalAPISet) SequencesV1() SequencesV1Interface
- func (c *InternalAPISet) ServicesV1() ServicesV1Interface
- func (c *InternalAPISet) ShipyardControlV1() ShipyardControlV1Interface
- func (c *InternalAPISet) StagesV1() StagesV1Interface
- func (c *InternalAPISet) UniformV1() UniformV1Interface
- type InternalService
- type KeptnInterface
- type LogHandler
- type LogsV1Interface
- type ProjectHandler
- func (p *ProjectHandler) CreateProject(project models.Project) (*models.EventContext, *models.Error)
- func (p *ProjectHandler) DeleteProject(project models.Project) (*models.EventContext, *models.Error)
- func (p *ProjectHandler) GetAllProjects() ([]*models.Project, error)
- func (p *ProjectHandler) GetProject(project models.Project) (*models.Project, *models.Error)
- func (p *ProjectHandler) UpdateConfigurationServiceProject(project models.Project) (*models.EventContext, *models.Error)
- type ProjectsV1Interface
- type ReadinessConditionFunc
- type ResourceHandler
- func (r *ResourceHandler) CreateProjectResources(project string, resources []*models.Resource) (string, error)
- func (r *ResourceHandler) CreateResource(resource []*models.Resource, scope ResourceScope, options ...URIOption) (string, error)
- func (r *ResourceHandler) CreateResources(project string, stage string, service string, resources []*models.Resource) (*models.EventContext, *models.Error)
- func (r *ResourceHandler) CreateServiceResources(project string, stage string, service string, resources []*models.Resource) (string, error)
- func (r *ResourceHandler) CreateStageResources(project string, stage string, resources []*models.Resource) (string, error)
- func (r *ResourceHandler) DeleteProjectResource(project string, resourceURI string) error
- func (r *ResourceHandler) DeleteResource(scope ResourceScope, options ...URIOption) error
- func (r *ResourceHandler) DeleteServiceResource(project string, stage string, service string, resourceURI string) error
- func (r *ResourceHandler) DeleteStageResource(project string, stage string, resourceURI string) error
- func (r *ResourceHandler) GetAllServiceResources(project string, stage string, service string) ([]*models.Resource, error)
- func (r *ResourceHandler) GetAllStageResources(project string, stage string) ([]*models.Resource, error)
- func (r *ResourceHandler) GetProjectResource(project string, resourceURI string) (*models.Resource, error)
- func (r *ResourceHandler) GetResource(scope ResourceScope, options ...URIOption) (*models.Resource, error)
- func (r *ResourceHandler) GetServiceResource(project string, stage string, service string, resourceURI string) (*models.Resource, error)
- func (r *ResourceHandler) GetStageResource(project string, stage string, resourceURI string) (*models.Resource, error)
- func (r *ResourceHandler) UpdateProjectResource(project string, resource *models.Resource) (string, error)
- func (r *ResourceHandler) UpdateProjectResources(project string, resources []*models.Resource) (string, error)
- func (r *ResourceHandler) UpdateResource(resource *models.Resource, scope ResourceScope, options ...URIOption) (string, error)
- func (r *ResourceHandler) UpdateServiceResource(project string, stage string, service string, resource *models.Resource) (string, error)
- func (r *ResourceHandler) UpdateServiceResources(project string, stage string, service string, resources []*models.Resource) (string, error)
- func (r *ResourceHandler) UpdateStageResource(project string, stage string, resource *models.Resource) (string, error)
- func (r *ResourceHandler) UpdateStageResources(project string, stage string, resources []*models.Resource) (string, error)
- type ResourceScope
- func (s *ResourceScope) GetProject() string
- func (s *ResourceScope) GetProjectPath() string
- func (s *ResourceScope) GetResource() string
- func (s *ResourceScope) GetResourcePath() string
- func (s *ResourceScope) GetService() string
- func (s *ResourceScope) GetServicePath() string
- func (s *ResourceScope) GetStage() string
- func (s *ResourceScope) GetStagePath() string
- func (s *ResourceScope) Project(project string) *ResourceScope
- func (s *ResourceScope) Resource(resource string) *ResourceScope
- func (s *ResourceScope) Service(service string) *ResourceScope
- func (s *ResourceScope) Stage(stage string) *ResourceScope
- type ResourcesV1Interface
- type SecretHandler
- type SecretHandlerInterface
- type SecretsV1Interface
- type SequenceControlBody
- type SequenceControlHandler
- func NewAuthenticatedSequenceControlHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, ...) *SequenceControlHandler
- func NewSequenceControlHandler(baseURL string) *SequenceControlHandler
- func NewSequenceControlHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *SequenceControlHandler
- type SequenceControlParams
- type SequencesV1Interface
- type ServiceHandler
- func (s *ServiceHandler) CreateServiceInStage(project string, stage string, serviceName string) (*models.EventContext, *models.Error)
- func (s *ServiceHandler) DeleteServiceFromStage(project string, stage string, serviceName string) (*models.EventContext, *models.Error)
- func (s *ServiceHandler) GetAllServices(project string, stage string) ([]*models.Service, error)
- func (s *ServiceHandler) GetService(project, stage, service string) (*models.Service, error)
- type ServicesV1Interface
- type ShipyardControlV1Interface
- type ShipyardControllerHandler
- func NewAuthenticatedShipyardControllerHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, ...) *ShipyardControllerHandler
- func NewShipyardControllerHandler(baseURL string) *ShipyardControllerHandler
- func NewShipyardControllerHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *ShipyardControllerHandler
- type Sleeper
- type StageHandler
- type StagesV1Interface
- type StatusBody
- type URIOption
- type UniformHandler
- func (u *UniformHandler) CreateSubscription(integrationID string, subscription models.EventSubscription) (string, error)
- func (u *UniformHandler) GetRegistrations() ([]*models.Integration, error)
- func (u *UniformHandler) Ping(integrationID string) (*models.Integration, error)
- func (u *UniformHandler) RegisterIntegration(integration models.Integration) (string, error)
- func (u *UniformHandler) UnregisterIntegration(integrationID string) error
- type UniformV1Interface
Constants ¶
const ErrWithStatusCode = v2.ErrWithStatusCode
ErrWithStatusCode message
Variables ¶
var DefaultInClusterAPIMappings = InClusterAPIMappings{ ConfigurationService: "resource-service:8080", ShipyardController: "shipyard-controller:8080", ApiService: "api-service:8080", SecretService: "secret-service:8080", MongoDBDatastore: "mongodb-datastore:8080", }
DefaultInClusterAPIMappings gives you the default InClusterAPIMappings
var ResourceNotFoundError = v2.ResourceNotFoundError
Functions ¶
func HealthEndpointHandler ¶ added in v0.10.0
func HealthEndpointHandler(w http.ResponseWriter, r *http.Request)
func RunHealthEndpoint ¶ added in v0.7.0
func RunHealthEndpoint(port string, opts ...HealthHandlerOption)
RunHealthEndpoint starts an http server on the specified port and provides a simple HTTP Get endpoint that can be used for health checks per default, the endpoint will be reachable under the path '/health'
func SortByTime ¶ added in v0.8.0
func SortByTime(events []*models.KeptnContextExtendedCE)
SortByTime sorts the event slice by time (oldest to newest)
func WithAuthToken ¶ added in v0.13.0
WithAuthToken sets the given auth token. Optionally a custom auth header can be set (default x-token)
func WithHTTPClient ¶ added in v0.13.0
WithHTTPClient configures a custom http client to use
func WithScheme ¶ added in v0.13.0
WithScheme sets the scheme If this option is not used, then default scheme "http" is used by the APISet
Types ¶
type APIHandler ¶ added in v0.7.0
type APIHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
APIHandler handles projects
func NewAPIHandler ¶ added in v0.17.0
func NewAPIHandler(baseURL string) *APIHandler
NewAPIHandler returns a new APIHandler
func NewAPIHandlerWithHTTPClient ¶ added in v0.17.0
func NewAPIHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *APIHandler
NewAPIHandlerWithHTTPClient returns a new APIHandler that uses the specified http.Client
func NewAuthenticatedAPIHandler ¶ added in v0.7.0
func NewAuthenticatedAPIHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *APIHandler
NewAuthenticatedAPIHandler returns a new APIHandler that authenticates at the api-service endpoint via the provided token Deprecated: use APISet instead
func (*APIHandler) CreateProject ¶ added in v0.7.0
func (a *APIHandler) CreateProject(project models.CreateProject) (string, *models.Error)
CreateProject creates a new project.
func (*APIHandler) CreateService ¶ added in v0.7.0
func (a *APIHandler) CreateService(project string, service models.CreateService) (string, *models.Error)
CreateService creates a new service.
func (*APIHandler) DeleteProject ¶ added in v0.7.0
func (a *APIHandler) DeleteProject(project models.Project) (*models.DeleteProjectResponse, *models.Error)
DeleteProject deletes a project.
func (*APIHandler) DeleteService ¶ added in v0.7.1
func (a *APIHandler) DeleteService(project, service string) (*models.DeleteServiceResponse, *models.Error)
DeleteService deletes a service.
func (*APIHandler) GetMetadata ¶ added in v0.7.0
func (a *APIHandler) GetMetadata() (*models.Metadata, *models.Error)
GetMetadata retrieves Keptn metadata information.
func (*APIHandler) SendEvent ¶ added in v0.7.0
func (a *APIHandler) SendEvent(event models.KeptnContextExtendedCE) (*models.EventContext, *models.Error)
SendEvent sends an event to Keptn.
func (*APIHandler) TriggerEvaluation ¶ added in v0.8.0
func (a *APIHandler) TriggerEvaluation(project, stage, service string, evaluation models.Evaluation) (*models.EventContext, *models.Error)
TriggerEvaluation triggers a new evaluation.
func (*APIHandler) UpdateProject ¶ added in v0.8.0
func (a *APIHandler) UpdateProject(project models.CreateProject) (string, *models.Error)
UpdateProject updates a project.
type APIService ¶
type APIService interface {
// contains filtered or unexported methods
}
APIService represents the interface for accessing the configuration service
type APISet ¶ added in v0.13.0
type APISet struct {
// contains filtered or unexported fields
}
APISet contains the API utils for all Keptn APIs
func (*APISet) APIV1 ¶ added in v0.13.0
func (c *APISet) APIV1() APIV1Interface
APIV1 retrieves the APIHandler
func (*APISet) AuthV1 ¶ added in v0.13.0
func (c *APISet) AuthV1() AuthV1Interface
AuthV1 retrieves the AuthHandler
func (*APISet) EventsV1 ¶ added in v0.13.0
func (c *APISet) EventsV1() EventsV1Interface
EventsV1 retrieves the EventHandler
func (*APISet) LogsV1 ¶ added in v0.13.0
func (c *APISet) LogsV1() LogsV1Interface
LogsV1 retrieves the LogHandler
func (*APISet) ProjectsV1 ¶ added in v0.13.0
func (c *APISet) ProjectsV1() ProjectsV1Interface
ProjectsV1 retrieves the ProjectHandler
func (*APISet) ResourcesV1 ¶ added in v0.13.0
func (c *APISet) ResourcesV1() ResourcesV1Interface
ResourcesV1 retrieves the ResourceHandler
func (*APISet) SecretsV1 ¶ added in v0.13.0
func (c *APISet) SecretsV1() SecretsV1Interface
SecretsV1 retrieves the SecretHandler
func (*APISet) SequencesV1 ¶ added in v0.13.0
func (c *APISet) SequencesV1() SequencesV1Interface
SequencesV1 retrieves the SequenceControlHandler
func (*APISet) ServicesV1 ¶ added in v0.13.0
func (c *APISet) ServicesV1() ServicesV1Interface
ServicesV1 retrieves the ServiceHandler
func (*APISet) ShipyardControlV1 ¶ added in v0.13.0
func (c *APISet) ShipyardControlV1() ShipyardControlV1Interface
ShipyardControlV1 retrieves the ShipyardControllerHandler
func (*APISet) StagesV1 ¶ added in v0.13.0
func (c *APISet) StagesV1() StagesV1Interface
StagesV1 retrieves the StageHandler
func (*APISet) UniformV1 ¶ added in v0.13.0
func (c *APISet) UniformV1() UniformV1Interface
UniformV1 retrieves the UniformHandler
type APIV1Interface ¶ added in v0.13.0
type APIV1Interface interface { // SendEvent sends an event to Keptn. SendEvent(event models.KeptnContextExtendedCE) (*models.EventContext, *models.Error) // TriggerEvaluation triggers a new evaluation. TriggerEvaluation(project string, stage string, service string, evaluation models.Evaluation) (*models.EventContext, *models.Error) // CreateProject creates a new project. CreateProject(project models.CreateProject) (string, *models.Error) // UpdateProject updates a project. UpdateProject(project models.CreateProject) (string, *models.Error) // DeleteProject deletes a project. DeleteProject(project models.Project) (*models.DeleteProjectResponse, *models.Error) // CreateService creates a new service. CreateService(project string, service models.CreateService) (string, *models.Error) // DeleteService deletes a service. DeleteService(project string, service string) (*models.DeleteServiceResponse, *models.Error) // GetMetadata retrieves Keptn metadata information. GetMetadata() (*models.Metadata, *models.Error) }
type AuthHandler ¶
type AuthHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
AuthHandler handles projects
func NewAuthHandler ¶
func NewAuthHandler(baseURL string) *AuthHandler
NewAuthHandler returns a new AuthHandler
func NewAuthHandlerWithHTTPClient ¶ added in v0.17.0
func NewAuthHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *AuthHandler
NewAuthHandlerWithHTTPClient returns a new AuthHandler that uses the specified http.Client
func NewAuthenticatedAuthHandler ¶
func NewAuthenticatedAuthHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *AuthHandler
NewAuthenticatedAuthHandler returns a new AuthHandler that authenticates at the endpoint via the provided token Deprecated: use APISet instead
func (*AuthHandler) Authenticate ¶
func (a *AuthHandler) Authenticate() (*models.EventContext, *models.Error)
Authenticate authenticates the client request against the server.
type AuthV1Interface ¶ added in v0.13.0
type AuthV1Interface interface { // Authenticate authenticates the client request against the server. Authenticate() (*models.EventContext, *models.Error) }
type ConfigurableSleeper ¶ added in v0.8.0
type ConfigurableSleeper struct {
// contains filtered or unexported fields
}
ConfigurableSleeper is an implementation of a sleeper that can be configured to sleep for a specific duration
func NewConfigurableSleeper ¶ added in v0.8.0
func NewConfigurableSleeper(duration time.Duration) *ConfigurableSleeper
NewConfigurableSleeper creates a new instance of a configurable sleeper which will pause execution of the current thread for a given duration
func (*ConfigurableSleeper) Sleep ¶ added in v0.8.0
func (c *ConfigurableSleeper) Sleep()
Sleep pauses the execution
type EventFilter ¶ added in v0.7.0
type EventFilter struct { Project string Stage string Service string EventType string KeptnContext string EventID string PageSize string NumberOfPages int FromTime string }
EventFilter allows to filter events based on the provided properties
type EventHandler ¶
type EventHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
EventHandler handles services
func NewAuthenticatedEventHandler ¶
func NewAuthenticatedEventHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *EventHandler
NewAuthenticatedEventHandler returns a new EventHandler that authenticates at the endpoint via the provided token Deprecated: use APISet instead
func NewEventHandler ¶
func NewEventHandler(baseURL string) *EventHandler
NewEventHandler returns a new EventHandler
func NewEventHandlerWithHTTPClient ¶ added in v0.17.0
func NewEventHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *EventHandler
NewEventHandlerWithHTTPClient returns a new EventHandler that uses the specified http.Client
func (*EventHandler) GetEvents ¶ added in v0.7.0
func (e *EventHandler) GetEvents(filter *EventFilter) ([]*models.KeptnContextExtendedCE, *models.Error)
GetEvents returns all events matching the properties in the passed filter object.
func (*EventHandler) GetEventsWithRetry ¶ added in v0.8.0
func (e *EventHandler) GetEventsWithRetry(filter *EventFilter, maxRetries int, retrySleepTime time.Duration) ([]*models.KeptnContextExtendedCE, error)
GetEventsWithRetry tries to retrieve events matching the passed filter.
type EventHandlerInterface ¶ added in v0.8.0
type EventHandlerInterface interface { GetEventsWithRetry(filter *EventFilter, maxRetries int, retrySleepTime time.Duration) ([]*models.KeptnContextExtendedCE, error) GetEvents(filter *EventFilter) ([]*models.KeptnContextExtendedCE, *models.Error) }
EventHandlerInterface is the api to fetch events from the event store
type EventManipulatorFunc ¶ added in v0.8.0
type EventManipulatorFunc func([]*models.KeptnContextExtendedCE)
EventManipulatorFunc can be used to manipulate a slice of events
type EventWatcher ¶ added in v0.8.0
type EventWatcher struct {
// contains filtered or unexported fields
}
EventWatcher implements the logic to query for events and provide them to the client
func NewEventWatcher ¶ added in v0.8.0
func NewEventWatcher(eventHandler EventHandlerInterface, opts ...EventWatcherOption) *EventWatcher
NewEventWatcher creates a new event watcher with the given options
func (*EventWatcher) Watch ¶ added in v0.8.0
func (ew *EventWatcher) Watch(ctx context.Context) (<-chan []*models.KeptnContextExtendedCE, context.CancelFunc)
Watch starts the watch loop and returns a channel to get the actual events as well as a context.CancelFunc in order to stop the watch routine
type EventWatcherOption ¶ added in v0.8.0
type EventWatcherOption func(*EventWatcher)
EventWatcherOption can be used to configure the EventWatcher
func WithEventFilter ¶ added in v0.8.0
func WithEventFilter(filter EventFilter) EventWatcherOption
WithEventFilter configures the EventWatcher to use a filter
func WithInterval ¶ added in v0.8.0
func WithInterval(ticker *time.Ticker) EventWatcherOption
WithInterval configures the EventWatcher to use a custom delay between each query You can use this to overwrite the default which is 10 * time.Second
func WithStartTime ¶ added in v0.8.0
func WithStartTime(startTime time.Time) EventWatcherOption
WithStartTime configures the EventWatcher to use a specific start timestamp for the first query
func WithTimeout ¶ added in v0.8.0
func WithTimeout(duration time.Duration) EventWatcherOption
WithTimeout configures the EventWatcher to use a custom timeout specifying after which duration the watcher shall stop
type EventsV1Interface ¶ added in v0.13.0
type EventsV1Interface interface { // GetEvents returns all events matching the properties in the passed filter object. GetEvents(filter *EventFilter) ([]*models.KeptnContextExtendedCE, *models.Error) // GetEventsWithRetry tries to retrieve events matching the passed filter. GetEventsWithRetry(filter *EventFilter, maxRetries int, retrySleepTime time.Duration) ([]*models.KeptnContextExtendedCE, error) }
type FakeSleeper ¶ added in v0.8.0
type FakeSleeper struct { }
FakeSleeper is a sleeper that does not sleep
func NewFakeSleeper ¶ added in v0.8.0
func NewFakeSleeper() *FakeSleeper
NewFakeSleeper creates a new instance of a FakeSleeper
func (*FakeSleeper) Sleep ¶ added in v0.8.0
func (f *FakeSleeper) Sleep()
Sleep does nothing, not even sleep
type HealthHandlerOption ¶ added in v0.16.0
type HealthHandlerOption func(h *healthHandler)
func WithPath ¶ added in v0.16.0
func WithPath(path string) HealthHandlerOption
WithPath allows to specify the path under which the endpoint should be reachable
func WithReadinessConditionFunc ¶ added in v0.16.0
func WithReadinessConditionFunc(rc ReadinessConditionFunc) HealthHandlerOption
WithReadinessConditionFunc allows to specify a function that should determine if the endpoint should return an HTTP 200 (OK), or a 412 (Precondition failed) response
type ILogHandler ¶ added in v0.8.5
type ILogHandler interface { // Log appends the specified logs to the log cache. Log(logs []models.LogEntry) // Flush flushes the log cache. Flush() error // GetLogs gets logs with the specified parameters. GetLogs(params models.GetLogsParams) (*models.GetLogsResponse, error) // DeleteLogs deletes logs matching the specified log filter. DeleteLogs(filter models.LogFilter) error Start(ctx context.Context) }
type InClusterAPIMappings ¶ added in v0.17.0
type InClusterAPIMappings map[InternalService]string
InClusterAPIMappings maps a keptn service name to its reachable domain name
type InternalAPIHandler ¶ added in v0.17.0
type InternalAPIHandler struct {
// contains filtered or unexported fields
}
InternalAPIHandler is used instead of APIHandler from go-utils because we cannot support (unauthenticated) internal calls to the api-service at the moment. So this implementation will panic as soon as a client wants to call these methods
func (*InternalAPIHandler) CreateProject ¶ added in v0.17.0
func (i *InternalAPIHandler) CreateProject(project models.CreateProject) (string, *models.Error)
func (*InternalAPIHandler) CreateService ¶ added in v0.17.0
func (i *InternalAPIHandler) CreateService(project string, service models.CreateService) (string, *models.Error)
func (*InternalAPIHandler) DeleteProject ¶ added in v0.17.0
func (i *InternalAPIHandler) DeleteProject(project models.Project) (*models.DeleteProjectResponse, *models.Error)
func (*InternalAPIHandler) DeleteService ¶ added in v0.17.0
func (i *InternalAPIHandler) DeleteService(project string, service string) (*models.DeleteServiceResponse, *models.Error)
func (*InternalAPIHandler) GetMetadata ¶ added in v0.17.0
func (i *InternalAPIHandler) GetMetadata() (*models.Metadata, *models.Error)
func (*InternalAPIHandler) SendEvent ¶ added in v0.17.0
func (i *InternalAPIHandler) SendEvent(event models.KeptnContextExtendedCE) (*models.EventContext, *models.Error)
func (*InternalAPIHandler) TriggerEvaluation ¶ added in v0.17.0
func (i *InternalAPIHandler) TriggerEvaluation(project string, stage string, service string, evaluation models.Evaluation) (*models.EventContext, *models.Error)
func (*InternalAPIHandler) UpdateProject ¶ added in v0.17.0
func (i *InternalAPIHandler) UpdateProject(project models.CreateProject) (string, *models.Error)
type InternalAPISet ¶ added in v0.17.0
type InternalAPISet struct {
// contains filtered or unexported fields
}
InternalAPISet is an implementation of APISet which can be used from within the Keptn control plane
func NewInternal ¶ added in v0.17.0
func NewInternal(client *http.Client, apiMappings ...InClusterAPIMappings) (*InternalAPISet, error)
NewInternal creates a new InternalAPISet usable for calling keptn services from within the control plane
func (*InternalAPISet) APIV1 ¶ added in v0.17.0
func (c *InternalAPISet) APIV1() APIV1Interface
APIV1 retrieves the APIHandler
func (*InternalAPISet) AuthV1 ¶ added in v0.17.0
func (c *InternalAPISet) AuthV1() AuthV1Interface
AuthV1 retrieves the AuthHandler
func (*InternalAPISet) EventsV1 ¶ added in v0.17.0
func (c *InternalAPISet) EventsV1() EventsV1Interface
EventsV1 retrieves the EventHandler
func (*InternalAPISet) LogsV1 ¶ added in v0.17.0
func (c *InternalAPISet) LogsV1() LogsV1Interface
LogsV1 retrieves the LogHandler
func (*InternalAPISet) ProjectsV1 ¶ added in v0.17.0
func (c *InternalAPISet) ProjectsV1() ProjectsV1Interface
ProjectsV1 retrieves the ProjectHandler
func (*InternalAPISet) ResourcesV1 ¶ added in v0.17.0
func (c *InternalAPISet) ResourcesV1() ResourcesV1Interface
ResourcesV1 retrieves the ResourceHandler
func (*InternalAPISet) SecretsV1 ¶ added in v0.17.0
func (c *InternalAPISet) SecretsV1() SecretsV1Interface
SecretsV1 retrieves the SecretHandler
func (*InternalAPISet) SequencesV1 ¶ added in v0.17.0
func (c *InternalAPISet) SequencesV1() SequencesV1Interface
SequencesV1 retrieves the SequenceControlHandler
func (*InternalAPISet) ServicesV1 ¶ added in v0.17.0
func (c *InternalAPISet) ServicesV1() ServicesV1Interface
ServicesV1 retrieves the ServiceHandler
func (*InternalAPISet) ShipyardControlV1 ¶ added in v0.17.0
func (c *InternalAPISet) ShipyardControlV1() ShipyardControlV1Interface
ShipyardControlV1 retrieves the ShipyardControllerHandler
func (*InternalAPISet) StagesV1 ¶ added in v0.17.0
func (c *InternalAPISet) StagesV1() StagesV1Interface
StagesV1 retrieves the StageHandler
func (*InternalAPISet) UniformV1 ¶ added in v0.17.0
func (c *InternalAPISet) UniformV1() UniformV1Interface
UniformV1 retrieves the UniformHandler
type InternalService ¶ added in v0.17.0
type InternalService int
InternalService is used to enumerate internal Keptn services
const ( ConfigurationService InternalService = iota ShipyardController ApiService SecretService MongoDBDatastore )
type KeptnInterface ¶ added in v0.13.0
type KeptnInterface interface { APIV1() APIV1Interface AuthV1() AuthV1Interface EventsV1() EventsV1Interface LogsV1() LogsV1Interface ProjectsV1() ProjectsV1Interface ResourcesV1() ResourcesV1Interface SecretsV1() SecretsV1Interface SequencesV1() SequencesV1Interface ServicesV1() ServicesV1Interface StagesV1() StagesV1Interface UniformV1() UniformV1Interface ShipyardControlV1() ShipyardControlV1Interface }
type LogHandler ¶ added in v0.8.5
type LogHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string LogCache []models.LogEntry TheClock clock.Clock SyncInterval time.Duration // contains filtered or unexported fields }
func NewAuthenticatedLogHandler ¶ added in v0.8.5
func NewAuthenticatedLogHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *LogHandler
NewAuthenticatedLogHandler returns a new EventHandler that authenticates at the endpoint via the provided token Deprecated: use APISet instead
func NewLogHandler ¶ added in v0.8.5
func NewLogHandler(baseURL string) *LogHandler
NewLogHandler returns a new LogHandler
func NewLogHandlerWithHTTPClient ¶ added in v0.17.0
func NewLogHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *LogHandler
NewLogHandlerWithHTTPClient returns a new LogHandler that uses the specified http.Client
func (*LogHandler) DeleteLogs ¶ added in v0.8.5
func (lh *LogHandler) DeleteLogs(params models.LogFilter) error
DeleteLogs deletes logs matching the specified log filter.
func (*LogHandler) Flush ¶ added in v0.8.5
func (lh *LogHandler) Flush() error
Flush flushes the log cache.
func (*LogHandler) GetLogs ¶ added in v0.8.5
func (lh *LogHandler) GetLogs(params models.GetLogsParams) (*models.GetLogsResponse, error)
GetLogs gets logs with the specified parameters.
func (*LogHandler) Log ¶ added in v0.8.5
func (lh *LogHandler) Log(logs []models.LogEntry)
Log appends the specified logs to the log cache.
func (*LogHandler) Start ¶ added in v0.8.5
func (lh *LogHandler) Start(ctx context.Context)
type LogsV1Interface ¶ added in v0.13.0
type LogsV1Interface interface { ILogHandler }
type ProjectHandler ¶
type ProjectHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
ProjectHandler handles projects
func NewAuthenticatedProjectHandler ¶
func NewAuthenticatedProjectHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ProjectHandler
NewAuthenticatedProjectHandler returns a new ProjectHandler that authenticates at the api via the provided token and sends all requests directly to the resource-service Deprecated: use APISet instead
func NewProjectHandler ¶
func NewProjectHandler(baseURL string) *ProjectHandler
NewProjectHandler returns a new ProjectHandler which sends all requests directly to the resource-service
func NewProjectHandlerWithHTTPClient ¶ added in v0.17.0
func NewProjectHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *ProjectHandler
NewProjectHandlerWithHTTPClient returns a new ProjectHandler which sends all requests directly to the resource-service using the specified http.Client
func (*ProjectHandler) CreateProject ¶
func (p *ProjectHandler) CreateProject(project models.Project) (*models.EventContext, *models.Error)
CreateProject creates a new project.
func (*ProjectHandler) DeleteProject ¶
func (p *ProjectHandler) DeleteProject(project models.Project) (*models.EventContext, *models.Error)
DeleteProject deletes a project.
func (*ProjectHandler) GetAllProjects ¶ added in v0.6.2
func (p *ProjectHandler) GetAllProjects() ([]*models.Project, error)
GetAllProjects returns all projects.
func (*ProjectHandler) GetProject ¶
GetProject returns a project.
func (*ProjectHandler) UpdateConfigurationServiceProject ¶ added in v0.7.0
func (p *ProjectHandler) UpdateConfigurationServiceProject(project models.Project) (*models.EventContext, *models.Error)
UpdateConfigurationServiceProject updates a configuration service project.
type ProjectsV1Interface ¶ added in v0.13.0
type ProjectsV1Interface interface { // CreateProject creates a new project. CreateProject(project models.Project) (*models.EventContext, *models.Error) // DeleteProject deletes a project. DeleteProject(project models.Project) (*models.EventContext, *models.Error) // GetProject returns a project. GetProject(project models.Project) (*models.Project, *models.Error) // GetAllProjects returns all projects. GetAllProjects() ([]*models.Project, error) // UpdateConfigurationServiceProject updates a configuration service project. UpdateConfigurationServiceProject(project models.Project) (*models.EventContext, *models.Error) }
type ReadinessConditionFunc ¶ added in v0.16.0
type ReadinessConditionFunc func() bool
type ResourceHandler ¶
type ResourceHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
ResourceHandler handles resources
func NewAuthenticatedResourceHandler ¶
func NewAuthenticatedResourceHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ResourceHandler
NewAuthenticatedResourceHandler returns a new ResourceHandler that authenticates at the api via the provided token and sends all requests directly to the resource-service Deprecated: use APISet instead
func NewResourceHandler ¶
func NewResourceHandler(baseURL string) *ResourceHandler
NewResourceHandler returns a new ResourceHandler which sends all requests directly to the resource-service
func NewResourceHandlerWithHTTPClient ¶ added in v0.17.0
func NewResourceHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *ResourceHandler
NewResourceHandlerWithHTTPClient returns a new ResourceHandler which sends all requests directly to the resource-service using the specified http.Client
func (*ResourceHandler) CreateProjectResources ¶ added in v0.6.2
func (r *ResourceHandler) CreateProjectResources(project string, resources []*models.Resource) (string, error)
CreateProjectResources creates multiple project resources.
func (*ResourceHandler) CreateResource ¶ added in v0.13.0
func (r *ResourceHandler) CreateResource(resource []*models.Resource, scope ResourceScope, options ...URIOption) (string, error)
CreateResource creates one or more resources at the URI defined by ResourceScope and modified by the URIOption.
func (*ResourceHandler) CreateResources ¶ added in v0.6.0
func (r *ResourceHandler) CreateResources(project string, stage string, service string, resources []*models.Resource) (*models.EventContext, *models.Error)
CreateResources creates a resource for the specified entity.
func (*ResourceHandler) CreateServiceResources ¶
func (r *ResourceHandler) CreateServiceResources(project string, stage string, service string, resources []*models.Resource) (string, error)
CreateServiceResources creates a service resource. Deprecated: use CreateResource instead.
func (*ResourceHandler) CreateStageResources ¶ added in v0.6.2
func (r *ResourceHandler) CreateStageResources(project string, stage string, resources []*models.Resource) (string, error)
CreateStageResources creates a stage resource. Deprecated: use CreateResource instead.
func (*ResourceHandler) DeleteProjectResource ¶ added in v0.6.2
func (r *ResourceHandler) DeleteProjectResource(project string, resourceURI string) error
DeleteProjectResource deletes a project resource. Deprecated: use DeleteResource instead.
func (*ResourceHandler) DeleteResource ¶ added in v0.13.0
func (r *ResourceHandler) DeleteResource(scope ResourceScope, options ...URIOption) error
DeleteResource delete a resource from the URI defined by ResourceScope and modified by the URIOption.
func (*ResourceHandler) DeleteServiceResource ¶ added in v0.6.2
func (r *ResourceHandler) DeleteServiceResource(project string, stage string, service string, resourceURI string) error
DeleteServiceResource deletes a service resource. Deprecated: use DeleteResource instead.
func (*ResourceHandler) DeleteStageResource ¶ added in v0.6.2
func (r *ResourceHandler) DeleteStageResource(project string, stage string, resourceURI string) error
DeleteStageResource deletes a stage resource. Deprecated: use DeleteResource instead.
func (*ResourceHandler) GetAllServiceResources ¶ added in v0.6.2
func (r *ResourceHandler) GetAllServiceResources(project string, stage string, service string) ([]*models.Resource, error)
GetAllServiceResources returns a list of all resources.
func (*ResourceHandler) GetAllStageResources ¶ added in v0.6.2
func (r *ResourceHandler) GetAllStageResources(project string, stage string) ([]*models.Resource, error)
GetAllStageResources returns a list of all resources.
func (*ResourceHandler) GetProjectResource ¶ added in v0.6.2
func (r *ResourceHandler) GetProjectResource(project string, resourceURI string) (*models.Resource, error)
GetProjectResource retrieves a project resource from the configuration service. Deprecated: use GetResource instead.
func (*ResourceHandler) GetResource ¶ added in v0.13.0
func (r *ResourceHandler) GetResource(scope ResourceScope, options ...URIOption) (*models.Resource, error)
GetResource returns a resource from the defined ResourceScope after applying all URI change configured in the options.
func (*ResourceHandler) GetServiceResource ¶ added in v0.6.2
func (r *ResourceHandler) GetServiceResource(project string, stage string, service string, resourceURI string) (*models.Resource, error)
GetServiceResource retrieves a service resource from the configuration service. Deprecated: use GetResource instead.
func (*ResourceHandler) GetStageResource ¶ added in v0.6.2
func (r *ResourceHandler) GetStageResource(project string, stage string, resourceURI string) (*models.Resource, error)
GetStageResource retrieves a stage resource from the configuration service. Deprecated: use GetResource instead.
func (*ResourceHandler) UpdateProjectResource ¶ added in v0.6.2
func (r *ResourceHandler) UpdateProjectResource(project string, resource *models.Resource) (string, error)
UpdateProjectResource updates a project resource. Deprecated: use UpdateResource instead.
func (*ResourceHandler) UpdateProjectResources ¶ added in v0.6.2
func (r *ResourceHandler) UpdateProjectResources(project string, resources []*models.Resource) (string, error)
UpdateProjectResources updates multiple project resources.
func (*ResourceHandler) UpdateResource ¶ added in v0.13.0
func (r *ResourceHandler) UpdateResource(resource *models.Resource, scope ResourceScope, options ...URIOption) (string, error)
UpdateResource updates a resource from the URI defined by ResourceScope and modified by the URIOption.
func (*ResourceHandler) UpdateServiceResource ¶ added in v0.6.2
func (r *ResourceHandler) UpdateServiceResource(project string, stage string, service string, resource *models.Resource) (string, error)
UpdateServiceResource updates a service resource. Deprecated: use UpdateResource instead.
func (*ResourceHandler) UpdateServiceResources ¶ added in v0.6.2
func (r *ResourceHandler) UpdateServiceResources(project string, stage string, service string, resources []*models.Resource) (string, error)
UpdateServiceResources updates multiple service resources.
func (*ResourceHandler) UpdateStageResource ¶ added in v0.6.2
func (r *ResourceHandler) UpdateStageResource(project string, stage string, resource *models.Resource) (string, error)
UpdateStageResource updates a stage resource. Deprecated: use UpdateResource instead.
func (*ResourceHandler) UpdateStageResources ¶ added in v0.6.2
func (r *ResourceHandler) UpdateStageResources(project string, stage string, resources []*models.Resource) (string, error)
UpdateStageResources updates multiple stage resources. Deprecated: use UpdateResource instead.
type ResourceScope ¶ added in v0.13.0
type ResourceScope struct {
// contains filtered or unexported fields
}
ResourceScope contains the necessary information to get a resource
func NewResourceScope ¶ added in v0.13.0
func NewResourceScope() *ResourceScope
NewResourceScope returns an empty ResourceScope to fill in calling Project Stage Service or Resource functions
func (*ResourceScope) GetProject ¶ added in v0.19.0
func (s *ResourceScope) GetProject() string
GetProject returns the project name
func (*ResourceScope) GetProjectPath ¶ added in v0.13.0
func (s *ResourceScope) GetProjectPath() string
GetProjectPath returns a string to construct the url to path eg. /<api-version>/project/<project-name> or an empty string if the project is not set
func (*ResourceScope) GetResource ¶ added in v0.19.0
func (s *ResourceScope) GetResource() string
GetResource returns the resource name
func (*ResourceScope) GetResourcePath ¶ added in v0.13.0
func (s *ResourceScope) GetResourcePath() string
GetResourcePath returns a string to construct the url to a resource eg. /resource/<escaped-resource-name> or /resource if the resource scope is empty
func (*ResourceScope) GetService ¶ added in v0.19.0
func (s *ResourceScope) GetService() string
GetService returns the service name
func (*ResourceScope) GetServicePath ¶ added in v0.13.0
func (s *ResourceScope) GetServicePath() string
GetServicePath returns a string to construct the url to a service eg. /service/<service-name> or an empty string if the service is unset
func (*ResourceScope) GetStage ¶ added in v0.19.0
func (s *ResourceScope) GetStage() string
GetStage returns the stage name
func (*ResourceScope) GetStagePath ¶ added in v0.13.0
func (s *ResourceScope) GetStagePath() string
GetStagePath returns a string to construct the url to a stage eg. /stage/<stage-name> or an empty string if the stage is unset
func (*ResourceScope) Project ¶ added in v0.13.0
func (s *ResourceScope) Project(project string) *ResourceScope
Project sets the resource scope project value
func (*ResourceScope) Resource ¶ added in v0.13.0
func (s *ResourceScope) Resource(resource string) *ResourceScope
Resource sets the resource scope resource
func (*ResourceScope) Service ¶ added in v0.13.0
func (s *ResourceScope) Service(service string) *ResourceScope
Service sets the resource scope service value
func (*ResourceScope) Stage ¶ added in v0.13.0
func (s *ResourceScope) Stage(stage string) *ResourceScope
Stage sets the resource scope stage value
type ResourcesV1Interface ¶ added in v0.13.0
type ResourcesV1Interface interface { // CreateResources creates a resource for the specified entity. CreateResources(project string, stage string, service string, resources []*models.Resource) (*models.EventContext, *models.Error) // CreateProjectResources creates multiple project resources. CreateProjectResources(project string, resources []*models.Resource) (string, error) // GetProjectResource retrieves a project resource from the configuration service. // Deprecated: use GetResource instead. GetProjectResource(project string, resourceURI string) (*models.Resource, error) // UpdateProjectResource updates a project resource. // Deprecated: use UpdateResource instead. UpdateProjectResource(project string, resource *models.Resource) (string, error) // DeleteProjectResource deletes a project resource. // Deprecated: use DeleteResource instead. DeleteProjectResource(project string, resourceURI string) error // UpdateProjectResources updates multiple project resources. UpdateProjectResources(project string, resources []*models.Resource) (string, error) // CreateStageResources creates a stage resource. // Deprecated: use CreateResource instead. CreateStageResources(project string, stage string, resources []*models.Resource) (string, error) // GetStageResource retrieves a stage resource from the configuration service. // Deprecated: use GetResource instead. GetStageResource(project string, stage string, resourceURI string) (*models.Resource, error) // UpdateStageResource updates a stage resource. // Deprecated: use UpdateResource instead. UpdateStageResource(project string, stage string, resource *models.Resource) (string, error) // UpdateStageResources updates multiple stage resources. // Deprecated: use UpdateResource instead. UpdateStageResources(project string, stage string, resources []*models.Resource) (string, error) // DeleteStageResource deletes a stage resource. // Deprecated: use DeleteResource instead. DeleteStageResource(project string, stage string, resourceURI string) error // CreateServiceResources creates a service resource. // Deprecated: use CreateResource instead. CreateServiceResources(project string, stage string, service string, resources []*models.Resource) (string, error) // GetServiceResource retrieves a service resource from the configuration service. // Deprecated: use GetResource instead. GetServiceResource(project string, stage string, service string, resourceURI string) (*models.Resource, error) // UpdateServiceResource updates a service resource. // Deprecated: use UpdateResource instead. UpdateServiceResource(project string, stage string, service string, resource *models.Resource) (string, error) // UpdateServiceResources updates multiple service resources. UpdateServiceResources(project string, stage string, service string, resources []*models.Resource) (string, error) // DeleteServiceResource deletes a service resource. // Deprecated: use DeleteResource instead. DeleteServiceResource(project string, stage string, service string, resourceURI string) error // GetAllStageResources returns a list of all resources. GetAllStageResources(project string, stage string) ([]*models.Resource, error) // GetAllServiceResources returns a list of all resources. GetAllServiceResources(project string, stage string, service string) ([]*models.Resource, error) }
type SecretHandler ¶ added in v0.8.1
type SecretHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
SecretHandler handles services
func NewAuthenticatedSecretHandler ¶ added in v0.8.1
func NewAuthenticatedSecretHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *SecretHandler
NewAuthenticatedSecretHandler returns a new SecretHandler that authenticates at the api via the provided token and sends all requests directly to the secret-service Deprecated: use APISet instead
func NewSecretHandler ¶ added in v0.8.1
func NewSecretHandler(baseURL string) *SecretHandler
NewSecretHandler returns a new SecretHandler which sends all requests directly to the secret-service
func NewSecretHandlerWithHTTPClient ¶ added in v0.17.0
func NewSecretHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *SecretHandler
NewSecretHandlerWithHTTPClient returns a new SecretHandler which sends all requests directly to the secret-service using the specified http.Client
func (*SecretHandler) CreateSecret ¶ added in v0.8.1
func (s *SecretHandler) CreateSecret(secret models.Secret) error
CreateSecret creates a new secret.
func (*SecretHandler) DeleteSecret ¶ added in v0.8.1
func (s *SecretHandler) DeleteSecret(secretName, secretScope string) error
DeleteSecret deletes a secret.
func (*SecretHandler) GetSecrets ¶ added in v0.8.5
func (s *SecretHandler) GetSecrets() (*models.GetSecretsResponse, error)
GetSecrets returns a list of created secrets.
func (*SecretHandler) UpdateSecret ¶ added in v0.8.1
func (s *SecretHandler) UpdateSecret(secret models.Secret) error
UpdateSecret creates a new secret.
type SecretHandlerInterface ¶ added in v0.8.1
type SecretHandlerInterface interface { // CreateSecret creates a new secret. CreateSecret(secret models.Secret) error // UpdateSecret creates a new secret. UpdateSecret(secret models.Secret) error // DeleteSecret deletes a secret. DeleteSecret(secretName, secretScope string) error // GetSecrets returns a list of created secrets. GetSecrets() (*models.GetSecretsResponse, error) }
type SecretsV1Interface ¶ added in v0.13.0
type SecretsV1Interface interface { SecretHandlerInterface }
type SequenceControlBody ¶ added in v0.9.0
func (*SequenceControlBody) FromJSON ¶ added in v0.12.0
func (s *SequenceControlBody) FromJSON(b []byte) error
FromJSON converts JSON string to object
func (*SequenceControlBody) ToJSON ¶ added in v0.9.0
func (s *SequenceControlBody) ToJSON() ([]byte, error)
Converts object to JSON string
type SequenceControlHandler ¶ added in v0.9.0
type SequenceControlHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
func NewAuthenticatedSequenceControlHandler ¶ added in v0.9.0
func NewAuthenticatedSequenceControlHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *SequenceControlHandler
NewAuthenticatedSequenceControlHandler returns a new SequenceControlHandler that authenticates at the api via the provided token Deprecated: use APISet instead
func NewSequenceControlHandler ¶ added in v0.9.0
func NewSequenceControlHandler(baseURL string) *SequenceControlHandler
NewSequenceControlHandler returns a new SequenceControlHandler
func NewSequenceControlHandlerWithHTTPClient ¶ added in v0.17.0
func NewSequenceControlHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *SequenceControlHandler
NewSequenceControlHandlerWithHTTPClient returns a new SequenceControlHandler using the specified http.Client
func (*SequenceControlHandler) ControlSequence ¶ added in v0.9.0
func (s *SequenceControlHandler) ControlSequence(params SequenceControlParams) error
type SequenceControlParams ¶ added in v0.9.0
type SequenceControlParams struct { Project string `json:"project"` KeptnContext string `json:"keptnContext"` Stage string `json:"stage"` State string `json:"state"` }
func (*SequenceControlParams) Validate ¶ added in v0.9.0
func (s *SequenceControlParams) Validate() error
type SequencesV1Interface ¶ added in v0.13.0
type SequencesV1Interface interface {
ControlSequence(params SequenceControlParams) error
}
type ServiceHandler ¶
type ServiceHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
ServiceHandler handles services
func NewAuthenticatedServiceHandler ¶
func NewAuthenticatedServiceHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ServiceHandler
NewAuthenticatedServiceHandler returns a new ServiceHandler that authenticates at the api via the provided token and sends all requests directly to the resource-service Deprecated: use APISet instead
func NewServiceHandler ¶
func NewServiceHandler(baseURL string) *ServiceHandler
NewServiceHandler returns a new ServiceHandler which sends all requests directly to the resource-service
func NewServiceHandlerWithHTTPClient ¶ added in v0.17.0
func NewServiceHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *ServiceHandler
NewServiceHandlerWithHTTPClient returns a new ServiceHandler which sends all requests directly to the resource-service using the specified http.Client
func (*ServiceHandler) CreateServiceInStage ¶ added in v0.6.2
func (s *ServiceHandler) CreateServiceInStage(project string, stage string, serviceName string) (*models.EventContext, *models.Error)
CreateServiceInStage creates a new service.
func (*ServiceHandler) DeleteServiceFromStage ¶ added in v0.7.1
func (s *ServiceHandler) DeleteServiceFromStage(project string, stage string, serviceName string) (*models.EventContext, *models.Error)
DeleteServiceFromStage deletes a service from a stage.
func (*ServiceHandler) GetAllServices ¶ added in v0.6.2
GetAllServices returns a list of all services.
func (*ServiceHandler) GetService ¶ added in v0.7.0
func (s *ServiceHandler) GetService(project, stage, service string) (*models.Service, error)
GetService gets a service.
type ServicesV1Interface ¶ added in v0.13.0
type ServicesV1Interface interface { // CreateServiceInStage creates a new service. CreateServiceInStage(project string, stage string, serviceName string) (*models.EventContext, *models.Error) // DeleteServiceFromStage deletes a service from a stage. DeleteServiceFromStage(project string, stage string, serviceName string) (*models.EventContext, *models.Error) // GetService gets a service. GetService(project, stage, service string) (*models.Service, error) // GetAllServices returns a list of all services. GetAllServices(project string, stage string) ([]*models.Service, error) }
type ShipyardControlV1Interface ¶ added in v0.13.0
type ShipyardControlV1Interface interface { // GetOpenTriggeredEvents returns all open triggered events. GetOpenTriggeredEvents(filter EventFilter) ([]*models.KeptnContextExtendedCE, error) }
type ShipyardControllerHandler ¶ added in v0.8.0
type ShipyardControllerHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
ShipyardControllerHandler handles services
func NewAuthenticatedShipyardControllerHandler ¶ added in v0.8.0
func NewAuthenticatedShipyardControllerHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ShipyardControllerHandler
NewAuthenticatedShipyardControllerHandler returns a new ShipyardControllerHandler that authenticates at the api via the provided token and sends all requests directly to the resource-service Deprecated: use APISet instead
func NewShipyardControllerHandler ¶ added in v0.8.0
func NewShipyardControllerHandler(baseURL string) *ShipyardControllerHandler
NewShipyardControllerHandler returns a new ShipyardControllerHandler which sends all requests directly to the resource-service
func NewShipyardControllerHandlerWithHTTPClient ¶ added in v0.17.0
func NewShipyardControllerHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *ShipyardControllerHandler
NewShipyardControllerHandlerWithHTTPClient returns a new ShipyardControllerHandler which sends all requests directly to the resource-service using the specified http.Client
func (*ShipyardControllerHandler) GetOpenTriggeredEvents ¶ added in v0.8.0
func (s *ShipyardControllerHandler) GetOpenTriggeredEvents(filter EventFilter) ([]*models.KeptnContextExtendedCE, error)
GetOpenTriggeredEvents returns all open triggered events.
type Sleeper ¶ added in v0.8.0
type Sleeper interface {
Sleep()
}
Sleeper defines the interface to sleep
type StageHandler ¶ added in v0.6.2
type StageHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
StageHandler handles stages
func NewAuthenticatedStageHandler ¶ added in v0.6.2
func NewAuthenticatedStageHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *StageHandler
NewAuthenticatedStageHandler returns a new StageHandler that authenticates at the api via the provided token and sends all requests directly to the resource-service Deprecated: use APISet instead
func NewStageHandler ¶ added in v0.6.2
func NewStageHandler(baseURL string) *StageHandler
NewStageHandler returns a new StageHandler which sends all requests directly to the resource-service
func NewStageHandlerWithHTTPClient ¶ added in v0.17.0
func NewStageHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *StageHandler
NewStageHandlerWithHTTPClient returns a new StageHandler which sends all requests directly to the resource-service using the specified http.Client
func (*StageHandler) CreateStage ¶ added in v0.6.2
func (s *StageHandler) CreateStage(project string, stageName string) (*models.EventContext, *models.Error)
CreateStage creates a new stage with the provided name.
func (*StageHandler) GetAllStages ¶ added in v0.6.2
func (s *StageHandler) GetAllStages(project string) ([]*models.Stage, error)
GetAllStages returns a list of all stages.
type StagesV1Interface ¶ added in v0.13.0
type StatusBody ¶ added in v0.7.0
type StatusBody struct {
Status string `json:"status"`
}
func (*StatusBody) ToJSON ¶ added in v0.12.0
func (s *StatusBody) ToJSON() ([]byte, error)
ToJSON converts object to JSON string
type URIOption ¶ added in v0.13.0
URIOption returns a function that modifies an url
func AppendQuery ¶ added in v0.13.0
AppendQuery returns an option function that can modify an URI by appending a map of url query values
type UniformHandler ¶ added in v0.8.5
type UniformHandler struct { BaseURL string AuthToken string AuthHeader string HTTPClient *http.Client Scheme string // contains filtered or unexported fields }
func NewAuthenticatedUniformHandler ¶ added in v0.8.5
func NewAuthenticatedUniformHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *UniformHandler
NewAuthenticatedUniformHandler returns a new UniformHandler that authenticates at the api via the provided token Deprecated: use APISet instead
func NewUniformHandler ¶ added in v0.8.5
func NewUniformHandler(baseURL string) *UniformHandler
NewUniformHandler returns a new UniformHandler
func NewUniformHandlerWithHTTPClient ¶ added in v0.17.0
func NewUniformHandlerWithHTTPClient(baseURL string, httpClient *http.Client) *UniformHandler
NewUniformHandlerWithHTTPClient returns a new UniformHandler using the specified http.Client
func (*UniformHandler) CreateSubscription ¶ added in v0.9.0
func (u *UniformHandler) CreateSubscription(integrationID string, subscription models.EventSubscription) (string, error)
func (*UniformHandler) GetRegistrations ¶ added in v0.8.5
func (u *UniformHandler) GetRegistrations() ([]*models.Integration, error)
func (*UniformHandler) Ping ¶ added in v0.9.0
func (u *UniformHandler) Ping(integrationID string) (*models.Integration, error)
func (*UniformHandler) RegisterIntegration ¶ added in v0.8.5
func (u *UniformHandler) RegisterIntegration(integration models.Integration) (string, error)
func (*UniformHandler) UnregisterIntegration ¶ added in v0.8.5
func (u *UniformHandler) UnregisterIntegration(integrationID string) error
type UniformV1Interface ¶ added in v0.13.0
type UniformV1Interface interface { Ping(integrationID string) (*models.Integration, error) RegisterIntegration(integration models.Integration) (string, error) CreateSubscription(integrationID string, subscription models.EventSubscription) (string, error) UnregisterIntegration(integrationID string) error GetRegistrations() ([]*models.Integration, error) }