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
Click to show internal directories.
Click to hide internal directories.