app

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyExists       = core.NewValidationErrorMessage("an app already exists with the provided name")
	ErrInvalidAppName      = core.NewValidationErrorMessage("the app name does not match the app ID: you may not change the app's name after creation")
	ErrInvalidAppNamespace = core.NewValidationErrorMessage("the app namespace does not match app ID: you may not change the app's namespace after creation")
	// TODO: Consider removing and coming up with a better client error for non-fatal not founds (core.ErrorNotFound is considered fatal by default)
	ErrAppNotFound = errors.New("app not found")
)

Functions

This section is empty.

Types

type FakeService added in v0.0.16

type FakeService struct {
	CheckAppNameFn func(id uuid.UUID, name *core.NamespacedName) error
}

func (*FakeService) CheckAppName added in v0.0.16

func (f *FakeService) CheckAppName(id uuid.UUID, name *core.NamespacedName) error

func (*FakeService) CreateApp added in v0.0.16

func (f *FakeService) CreateApp(name *core.NamespacedName) (*core.App, error)

type Service

type Service interface {
	CreateApp(name *core.NamespacedName) (*core.App, error)
	// CheckAppName ensures that the app name and namespace belongs to the app ID. This prevents an accidental or otherwise name change in the app config.
	CheckAppName(id uuid.UUID, name *core.NamespacedName) error
}

func NewService

func NewService(apps core.AppRepository, namespaceService namespace.Service) Service

Jump to

Keyboard shortcuts

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