circle

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: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circle

type Circle struct {
	Name         string                                   `json:"name" validate:"required"`
	Author       string                                   `json:"author,omitempty"`
	Description  string                                   `json:"description,omitempty"`
	IsDefault    bool                                     `json:"isDefault,omitempty"`
	Routing      charlescdiov1alpha1.CircleRouting        `json:"routing,omitempty"`
	Modules      []CircleModule                           `json:"modules,omitempty"`
	Environments []charlescdiov1alpha1.CircleEnvironments `json:"environments,omitempty"`
	Status       charlescdiov1alpha1.CircleStatus         `json:"status"`
}

type CircleItem

type CircleItem struct {
	Name        string                            `json:"name"`
	Description string                            `json:"description"`
	Routing     charlescdiov1alpha1.CircleRouting `json:"routing,omitempty"`
	Modules     []CircleModule                    `json:"modules"`
	IsDefault   bool                              `json:"isDefault"`
	Status      charlescdiov1alpha1.CircleStatus  `json:"status"`
}

type CircleItemModel

type CircleItemModel struct {
	ID        string `json:"id"`
	CreatedAt string `json:"createdAt"`
	CircleItem
}

type CircleModel

type CircleModel struct {
	ID        string `json:"id"`
	CreatedAt string `json:"createdAt"`
	Circle
}

type CircleModule

type CircleModule struct {
	Name      string                         `json:"name,omitempty" validate:"required"`
	Revision  string                         `json:"revision,omitempty" validate:"required"`
	Overrides []charlescdiov1alpha1.Override `json:"overrides,omitempty"`
}

type CircleProvider

type CircleProvider interface {
	Sync(ctx context.Context, namespace string, name string) error
	Status(ctx context.Context, namespace string, name string) (*pbv1.StatusResponse, error)
}

func NewGrpcProvider

func NewGrpcProvider(grpcClient grpcclient.Client) CircleProvider

type CircleRepository

type CircleRepository interface {
	FindAll(ctx context.Context, namespace string, listoptions listoptions.Request) (listoptions.Response, error)
	FindById(ctx context.Context, namespace string, circleId string) (CircleModel, error)
	Create(ctx context.Context, namespace string, circle Circle) (CircleModel, error)
	Update(ctx context.Context, namespace string, circleId string, circle Circle) (CircleModel, error)
	Delete(ctx context.Context, namespace string, circleId string) error
}

func NewK8sRepository

func NewK8sRepository(clientset client.Client) CircleRepository

type CircleUseCase

type CircleUseCase interface {
	FindAll(ctx context.Context, workspaceId string, listoptions listoptions.Request) (listoptions.Response, error)
	FindById(ctx context.Context, workspaceId string, circleId string) (CircleModel, error)
	Sync(ctx context.Context, workspaceId string, circleId string) error
	Status(ctx context.Context, workspaceId string, circleId string) (*pbv1.StatusResponse, error)
	Create(ctx context.Context, workspaceId string, circle Circle) (CircleModel, error)
	Update(ctx context.Context, workspaceId string, circleId string, circle Circle) (CircleModel, error)
	Delete(ctx context.Context, workspaceId string, circleId string) error
}

func NewUseCase

func NewUseCase(workspaceUseCase workspace.WorkspaceUseCase, circleProvider CircleProvider, circleRepository CircleRepository) CircleUseCase

type EchoHandler

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

func NewEchohandler

func NewEchohandler(e *echo.Echo, logger *zap.Logger, circleUseCase CircleUseCase) 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) Status

func (h EchoHandler) Status(c echo.Context) error

func (EchoHandler) Sync

func (h EchoHandler) Sync(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(ctx context.Context, workspaceId string, circle Circle) (CircleModel, error)

Create implements CircleUseCase

func (UseCase) Delete

func (u UseCase) Delete(ctx context.Context, workspaceId string, circleId string) error

Delete implements CircleUseCase

func (UseCase) FindAll

func (u UseCase) FindAll(ctx context.Context, workspaceId string, options listoptions.Request) (listoptions.Response, error)

FindAll implements CircleUseCase

func (UseCase) FindById

func (u UseCase) FindById(ctx context.Context, workspaceId string, circleId string) (CircleModel, error)

FindByName implements CircleUseCase

func (UseCase) Status

func (u UseCase) Status(ctx context.Context, workspaceId string, circleId string) (*pbv1.StatusResponse, error)

func (UseCase) Sync

func (u UseCase) Sync(ctx context.Context, workspaceId string, circleId string) error

func (UseCase) Update

func (u UseCase) Update(ctx context.Context, workspaceId string, circleId string, circle Circle) (CircleModel, error)

Update implements CircleUseCase

Jump to

Keyboard shortcuts

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