api

package
v0.0.0-...-a0d6768 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultInClusterAPIMappings = InClusterAPIMappings{
	ConfigurationService: "configuration-service:8080",
	ShipyardController:   "shipyard-controller:8080",
	ApiService:           "api-service:8080",
	SecretService:        "secret-service:8080",
	MongoDBDatastore:     "mongodb-datastore:8080",
}

DefaultInClusterAPIMappings gives you the default InClusterAPIMappings

Functions

This section is empty.

Types

type InClusterAPIMappings

type InClusterAPIMappings map[InternalService]string

InClusterAPIMappings maps a keptn service name to its reachable domain name

type InternalAPIHandler

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

func (i *InternalAPIHandler) CreateProject(project models.CreateProject) (string, *models.Error)

func (*InternalAPIHandler) CreateService

func (i *InternalAPIHandler) CreateService(project string, service models.CreateService) (string, *models.Error)

func (*InternalAPIHandler) DeleteProject

func (i *InternalAPIHandler) DeleteProject(project models.Project) (*models.DeleteProjectResponse, *models.Error)

func (*InternalAPIHandler) DeleteService

func (i *InternalAPIHandler) DeleteService(project string, service string) (*models.DeleteServiceResponse, *models.Error)

func (*InternalAPIHandler) GetMetadata

func (i *InternalAPIHandler) GetMetadata() (*models.Metadata, *models.Error)

func (*InternalAPIHandler) SendEvent

func (*InternalAPIHandler) TriggerEvaluation

func (i *InternalAPIHandler) TriggerEvaluation(project string, stage string, service string, evaluation models.Evaluation) (*models.EventContext, *models.Error)

func (*InternalAPIHandler) UpdateProject

func (i *InternalAPIHandler) UpdateProject(project models.CreateProject) (string, *models.Error)

type InternalAPISet

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

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

func (c *InternalAPISet) APIV1() api.APIV1Interface

APIV1 retrieves the APIHandler

func (*InternalAPISet) AuthV1

func (c *InternalAPISet) AuthV1() api.AuthV1Interface

AuthV1 retrieves the AuthHandler

func (*InternalAPISet) EventsV1

func (c *InternalAPISet) EventsV1() api.EventsV1Interface

EventsV1 retrieves the EventHandler

func (*InternalAPISet) LogsV1

func (c *InternalAPISet) LogsV1() api.LogsV1Interface

LogsV1 retrieves the LogHandler

func (*InternalAPISet) ProjectsV1

func (c *InternalAPISet) ProjectsV1() api.ProjectsV1Interface

ProjectsV1 retrieves the ProjectHandler

func (*InternalAPISet) ResourcesV1

func (c *InternalAPISet) ResourcesV1() api.ResourcesV1Interface

ResourcesV1 retrieves the ResourceHandler

func (*InternalAPISet) SecretsV1

func (c *InternalAPISet) SecretsV1() api.SecretsV1Interface

SecretsV1 retrieves the SecretHandler

func (*InternalAPISet) SequencesV1

func (c *InternalAPISet) SequencesV1() api.SequencesV1Interface

SequencesV1 retrieves the SequenceControlHandler

func (*InternalAPISet) ServicesV1

func (c *InternalAPISet) ServicesV1() api.ServicesV1Interface

ServicesV1 retrieves the ServiceHandler

func (*InternalAPISet) ShipyardControlV1

func (c *InternalAPISet) ShipyardControlV1() api.ShipyardControlV1Interface

ShipyardControlV1 retrieves the ShipyardControllerHandler

func (*InternalAPISet) StagesV1

func (c *InternalAPISet) StagesV1() api.StagesV1Interface

StagesV1 retrieves the StageHandler

func (*InternalAPISet) UniformV1

func (c *InternalAPISet) UniformV1() api.UniformV1Interface

UniformV1 retrieves the UniformHandler

type InternalService

type InternalService int

InternalService is used to enumerate internal Keptn services

const (
	ConfigurationService InternalService = iota
	ShipyardController
	ApiService
	SecretService
	MongoDBDatastore
)

Jump to

Keyboard shortcuts

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