Documentation ¶
Index ¶
- func ValidateNamespace(code string) error
- type Service
- func (s Service) CreateNamespace(ctx context.Context, code, description string) (*models.Namespace, error)
- func (s Service) DeleteNamespace(ctx context.Context, id uint) error
- func (s Service) GetNamespace(ctx context.Context, id uint) (*models.Namespace, error)
- func (s Service) ListNamespaces(ctx context.Context) ([]models.Namespace, error)
- func (s Service) UpdateNamespace(ctx context.Context, id uint, code, description string) (*models.Namespace, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateNamespace ¶
ValidateNamespace validates namespace code
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides service layer to work with `namespace` business logic.
func NewService ¶
func NewService( config *config.Config, namespaceRepository repositories.NamespaceRepositoryProvider, experimentRepository repositories.ExperimentRepositoryProvider, ) *Service
NewService creates new Service instance.
func (Service) CreateNamespace ¶
func (s Service) CreateNamespace(ctx context.Context, code, description string) (*models.Namespace, error)
CreateNamespace creates a new namespace and default experiment.
func (Service) DeleteNamespace ¶
DeleteNamespace deletes the namespace.
func (Service) GetNamespace ¶
GetNamespace returns one namespace by ID.
func (Service) ListNamespaces ¶
ListNamespaces returns all namespaces.
Click to show internal directories.
Click to hide internal directories.