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