app

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 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")
	ErrAppNotFound         = core.NewValidationErrorMessage("the app could not be found")
)

Functions

This section is empty.

Types

type FakeService added in v0.0.16

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

func (*FakeService) CheckID added in v0.0.36

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

func (*FakeService) Create added in v0.0.36

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

func (*FakeService) GetByName added in v0.0.36

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

type Service

type Service interface {
	Create(name *core.NamespacedName) (*core.App, error)
	// CheckID ensures that the app name and namespace belongs to the app ID. This prevents an accidental or otherwise name change in the app config.
	CheckID(id uuid.UUID, name *core.NamespacedName) error
	GetByName(name *core.NamespacedName) (*core.App, 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