Documentation ¶
Index ¶
- Constants
- func NewEchohandler(e *echo.Echo, logger *zap.Logger, moduleUseCase ModuleUseCase)
- type EchoHandler
- type Module
- type ModuleAuth
- type ModuleModel
- type ModuleRepository
- type ModuleUseCase
- type UseCase
- func (u UseCase) Create(ctx context.Context, workspaceId string, module Module) (ModuleModel, error)
- func (u UseCase) Delete(ctx context.Context, workspaceId string, moduleId string) error
- func (u UseCase) FindAll(ctx context.Context, workspaceId string, options listoptions.Request) (listoptions.Response, error)
- func (u UseCase) FindById(ctx context.Context, workspaceId string, moduleId string) (ModuleModel, error)
- func (u UseCase) Update(ctx context.Context, workspaceId string, name string, module Module) (ModuleModel, error)
Constants ¶
View Source
const ( PrivateModule = "PRIVATE" PublicModule = "PUBLIC" )
Variables ¶
This section is empty.
Functions ¶
func NewEchohandler ¶
func NewEchohandler(e *echo.Echo, logger *zap.Logger, moduleUseCase ModuleUseCase)
Types ¶
type EchoHandler ¶
type EchoHandler struct {
// contains filtered or unexported fields
}
func (EchoHandler) Create ¶
func (h EchoHandler) Create(c echo.Context) error
func (EchoHandler) Delete ¶
func (h EchoHandler) Delete(c echo.Context) error
func (EchoHandler) FindAll ¶
func (h EchoHandler) FindAll(c echo.Context) error
func (EchoHandler) FindById ¶
func (h EchoHandler) FindById(c echo.Context) error
func (EchoHandler) Update ¶
func (h EchoHandler) Update(c echo.Context) error
type Module ¶
type Module struct { Name string `json:"name" validate:"required"` Visibility string `json:"visibility" validate:"required,oneof=PRIVATE PUBLIC"` charlescdiov1alpha1.ModuleSpec Auth *ModuleAuth `json:"auth"` }
type ModuleAuth ¶
type ModuleModel ¶
type ModuleRepository ¶
type ModuleRepository interface { FindAll(ctx context.Context, namespace string, listoptions listoptions.Request) (listoptions.Response, error) FindById(ctx context.Context, namespace string, moduleId string) (ModuleModel, error) Create(ctx context.Context, namespace string, module Module) (ModuleModel, error) Update(ctx context.Context, namespace string, moduleId string, module Module) (ModuleModel, error) Delete(ctx context.Context, namespace string, moduleId string) error }
func NewK8sRepository ¶
func NewK8sRepository(clientset client.Client) ModuleRepository
type ModuleUseCase ¶
type ModuleUseCase interface { FindAll(ctx context.Context, workspaceId string, listoptions listoptions.Request) (listoptions.Response, error) FindById(ctx context.Context, workspaceId string, moduleId string) (ModuleModel, error) Create(ctx context.Context, workspaceId string, module Module) (ModuleModel, error) Update(ctx context.Context, workspaceId string, moduleId string, module Module) (ModuleModel, error) Delete(ctx context.Context, workspaceId string, moduleId string) error }
func NewUseCase ¶
func NewUseCase(workspaceUseCase workspace.WorkspaceUseCase, moduleRepository ModuleRepository) ModuleUseCase
type UseCase ¶
type UseCase struct {
// contains filtered or unexported fields
}
func (UseCase) Create ¶
func (u UseCase) Create(ctx context.Context, workspaceId string, module Module) (ModuleModel, error)
Create implements ModuleUseCase
func (UseCase) FindAll ¶
func (u UseCase) FindAll(ctx context.Context, workspaceId string, options listoptions.Request) (listoptions.Response, error)
FindAll implements ModuleUseCase
Click to show internal directories.
Click to hide internal directories.