creator

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceNameMinimumLength    = 1
	ServiceNameMaximumLength    = 24
	ServiceNameExpr             = schema.ResourceNameSchemaPattern
	EC2ComputeNameMaximumLength = ec2compute_v2.MaximumServiceNameLength
)

Variables

Functions

func IsBlackListError

func IsBlackListError(e error) bool

IsBlackListError checks if 'e' is a BlackListError. Returns true when it is a BlackListError and is not nil.

func NewBlackListError

func NewBlackListError(blackListedClass string, blackListedInstance string) error

NewBlackListError creates a BlackListError. blackListedClass is the the type of thing that is blacklisted, like a name or URL, and blackListedInstance is the actual instance that was inputted, like the name "voyager" or the URL "https://atlassian.com".

Types

type BlackListError

type BlackListError struct {
	// contains filtered or unexported fields
}

lackListError is for cases where a particular input has been reserved.

func (*BlackListError) Error

func (e *BlackListError) Error() string

Error is to implement the 'error' interface.

type ExtraConfig

type ExtraConfig struct {
	Logger            *zap.Logger
	SSAMURL           *url.URL
	ServiceCentralURL *url.URL
	LuigiURL          *url.URL
	PagerDuty         pagerduty.ClientConfig
	ASAPClientConfig  pkiutil.ASAP
	HTTPClient        *http.Client
}

type LuigiClientInterface

type LuigiClientInterface interface {
	FindOrCreateService(ctx context.Context, meta *luigi.ServiceMetadata) (*luigi.BasicServiceData, error)
	DeleteService(ctx context.Context, loggingID string) error
}

type PagerDutyClientInterface

type PagerDutyClientInterface interface {
	FindOrCreate(serviceName voyager.ServiceName, user auth.User, email string) (creator_v1.PagerDutyMetadata, error)
	Delete(serviceName voyager.ServiceName) error
}

type SSAMClientInterface

type SSAMClientInterface interface {
	GetExpectedServiceContainerName(ctx context.Context, metadata *ssam.ServiceMetadata) string
	CreateService(ctx context.Context, metadata *ssam.ServiceMetadata) (string, ssam.AccessLevels, error)
	DeleteService(ctx context.Context, metadata *ssam.ServiceMetadata) error
}

type ServiceCentralStoreInterface

type ServiceCentralStoreInterface interface {
	FindOrCreateService(ctx context.Context, user auth.User, service *creator_v1.Service) (*creator_v1.Service, error)
	GetService(ctx context.Context, user auth.OptionalUser, name servicecentral.ServiceName) (*creator_v1.Service, error)
	ListServices(ctx context.Context, user auth.OptionalUser) ([]creator_v1.Service, error)
	ListModifiedServices(ctx context.Context, user auth.OptionalUser, modifiedSince time.Time) ([]creator_v1.Service, error)
	PatchService(ctx context.Context, user auth.User, service *creator_v1.Service) error
	DeleteService(ctx context.Context, user auth.User, name servicecentral.ServiceName) error
}

type ServiceHandler

type ServiceHandler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(config *ExtraConfig) (*ServiceHandler, error)

func (*ServiceHandler) ServiceCreate

func (h *ServiceHandler) ServiceCreate(ctx context.Context, service *creator_v1.Service) (*creator_v1.Service, error)

func (*ServiceHandler) ServiceDelete

func (h *ServiceHandler) ServiceDelete(ctx context.Context, name voyager.ServiceName) (*creator_v1.Service, error)

func (*ServiceHandler) ServiceGet

func (*ServiceHandler) ServiceList

func (h *ServiceHandler) ServiceList(w http.ResponseWriter, r *http.Request)

func (*ServiceHandler) ServiceListNew

func (h *ServiceHandler) ServiceListNew(ctx context.Context) (*creator_v1.ServiceList, error)

func (*ServiceHandler) ServiceUpdate

Directories

Path Synopsis
This package has the automatically generated clientset.
This package has the automatically generated clientset.
fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
typed/creator/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
typed/creator/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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