utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 13 Imported by: 74

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveXipIo added in v0.2.4

func ResolveXipIo(network, addr string) (net.Conn, error)

ResolveXipIo resolves a xip io address

func ResolveXipIoWithContext added in v0.2.4

func ResolveXipIoWithContext(ctx context.Context, network, addr string) (net.Conn, error)

ResolveXipIoWithContext resolves a xip io address

Types

type APIService

type APIService interface {
	// contains filtered or unexported methods
}

APIService represents the interface for accessing the configuration service

type AuthHandler

type AuthHandler struct {
	BaseURL    string
	AuthToken  string
	AuthHeader string
	HTTPClient *http.Client
	Scheme     string
}

AuthHandler handles projects

func NewAuthHandler

func NewAuthHandler(baseURL string) *AuthHandler

NewAuthHandler returns a new AuthHandler

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

func (*AuthHandler) Authenticate

func (a *AuthHandler) Authenticate() (*models.EventContext, *models.Error)

Authenticate authenticates the client request against the server

type EventHandler

type EventHandler struct {
	BaseURL    string
	AuthToken  string
	AuthHeader string
	HTTPClient *http.Client
	Scheme     string
}

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

func NewEventHandler

func NewEventHandler(baseURL string) *EventHandler

NewEventHandler returns a new EventHandler

func (*EventHandler) GetEvent

func (e *EventHandler) GetEvent(keptnContext string, eventType string) (*models.KeptnContextExtendedCE, *models.Error)

GetEvent returns an event specified by keptnContext and eventType

func (*EventHandler) SendEvent

func (e *EventHandler) SendEvent(event models.Event) (*models.EventContext, *models.Error)

SendEvent sends an event to Keptn

type ProjectHandler

type ProjectHandler struct {
	BaseURL    string
	AuthToken  string
	AuthHeader string
	HTTPClient *http.Client
	Scheme     string
}

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 endpoint via the provided token

func NewProjectHandler

func NewProjectHandler(baseURL string) *ProjectHandler

NewProjectHandler returns a new ProjectHandler

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

func (p *ProjectHandler) GetProject(project models.Project) (*models.Project, *models.Error)

GetProject returns a project

type ResourceHandler

type ResourceHandler struct {
	BaseURL    string
	AuthToken  string
	AuthHeader string
	HTTPClient *http.Client
	Scheme     string
}

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 endpoint via the provided token

func NewResourceHandler

func NewResourceHandler(baseURL string) *ResourceHandler

NewResourceHandler returns a new ResourceHandler

func (*ResourceHandler) CreateServiceResources

func (r *ResourceHandler) CreateServiceResources(project string, stage string, service string, resources []*models.Resource) (*models.EventContext, *models.Error)

CreateServiceResources creates a service resource

type ServiceHandler

type ServiceHandler struct {
	BaseURL    string
	AuthToken  string
	AuthHeader string
	HTTPClient *http.Client
	Scheme     string
}

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 endpoint via the provided token

func NewServiceHandler

func NewServiceHandler(baseURL string) *ServiceHandler

NewServiceHandler returns a new ServiceHandler

func (*ServiceHandler) CreateService

func (s *ServiceHandler) CreateService(project string, service models.Service) (*models.EventContext, *models.Error)

CreateService creates a new service

Jump to

Keyboard shortcuts

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