targetsvc

package
v0.15.14 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrRuleNotFound is returned if a rule with the supplied id already exists.
	ErrTargetGroupIdAlreadyExists = errors.New("target group id already exists")

	// ErrProviderNotFound is returned if a matching provider could not be found in the registry
	ErrProviderNotFoundInRegistry = errors.New("provider not found in registry")

	// ErrKindIsRequired is returned if a if the kind was not provided
	ErrKindIsRequired = errors.New("kind is required, provider id should be in the format `common-fate/aws@v0.1.0/Kind`")

	// ErrProviderNotFound is returned if a matching provider could not be found in the registry
	ErrProviderDoesNotImplementKind = errors.New("provider does not implement the kind")
)

Functions

This section is empty.

Types

type Provider

type Provider struct {
	Publisher string
	Name      string
	Version   string
	Kind      *string
}

func SplitProviderString

func SplitProviderString(s string) (Provider, error)

type Service

type Service struct {
	Clock                  clock.Clock
	DB                     ddb.Storage
	ProviderRegistryClient registry_types.ClientWithResponsesInterface
}

func (*Service) CreateGroup

func (s *Service) CreateGroup(ctx context.Context, req types.CreateTargetGroupRequest) (*target.Group, error)

func (*Service) CreateRoute

func (s *Service) CreateRoute(ctx context.Context, group string, req types.CreateTargetGroupLink) (*target.Route, error)

func (*Service) DeleteGroup

func (s *Service) DeleteGroup(ctx context.Context, group *target.Group) error

Jump to

Keyboard shortcuts

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