workspace

package
v0.0.0-...-3794c23 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IstioNetworking = "istio"
	GateNetworking  = "gate"
)
View Source
const (
	CircleDeployStrategy = "circle"
	CanaryDeployStrategy = "canary"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoHandler

type EchoHandler struct {
	// contains filtered or unexported fields
}

func NewEchohandler

func NewEchohandler(e *echo.Echo, logger *zap.Logger, workspaceUseCase WorkspaceUseCase) EchoHandler

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 UseCase

type UseCase struct {
	// contains filtered or unexported fields
}

func (UseCase) Create

func (u UseCase) Create(workspace Workspace) (WorkspaceModel, error)

Create implements WorkspaceModelUseCase

func (UseCase) Delete

func (u UseCase) Delete(id string) error

Delete implements WorkspaceModelUseCase

func (UseCase) FindAll

func (u UseCase) FindAll() ([]WorkspaceModel, error)

FindAll implements WorkspaceModelUseCase

func (UseCase) FindById

func (u UseCase) FindById(id string) (WorkspaceModel, error)

FindById implements WorkspaceModelUseCase

func (UseCase) GetKebabCaseNameById

func (u UseCase) GetKebabCaseNameById(id string) (string, error)

func (UseCase) Update

func (u UseCase) Update(id string, workspace Workspace) (WorkspaceModel, error)

Update implements WorkspaceModelUseCase

type Workspace

type Workspace struct {
	Name            string `json:"name" validate:"required"`
	Description     string `json:"description" validate:"required"`
	RoutingStrategy string `json:"routingStrategy" validate:"required,oneof=MATCH CANARY"`
}

type WorkspaceModel

type WorkspaceModel struct {
	ID        string `json:"id"`
	CreatedAt string `json:"createdAt"`
	Circles   int    `json:"circles"`
	Modules   int    `json:"modules"`
	Workspace
}

type WorkspaceRepository

type WorkspaceRepository interface {
	FindAll() ([]WorkspaceModel, error)
	FindById(id string) (WorkspaceModel, error)
	Create(workspace Workspace) (WorkspaceModel, error)
	Update(id string, workspace Workspace) (WorkspaceModel, error)
	Delete(id string) error
}

func NewRepository

func NewRepository(clientset client.Client) WorkspaceRepository

type WorkspaceUseCase

type WorkspaceUseCase interface {
	FindAll() ([]WorkspaceModel, error)
	FindById(id string) (WorkspaceModel, error)
	Create(workspace Workspace) (WorkspaceModel, error)
	Update(id string, workspace Workspace) (WorkspaceModel, error)
	Delete(id string) error
	GetKebabCaseNameById(id string) (string, error)
}

func NewUseCase

func NewUseCase(repository WorkspaceRepository) WorkspaceUseCase

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL