module

package
v0.0.0-...-9ef13ba Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Name string `json:"name"`
	charlescdiov1alpha1.ModuleSpec
	Auth ModuleAuth `json:"auth"`
}

type ModuleAuth

type ModuleAuth struct {
	AuthType      string `json:"type,omitempty"`
	SshPrivateKey string `json:"sshPrivateKey,omitempty"`
	Username      string `json:"username,omitempty"`
	Password      string `json:"password,omitempty"`
	AccessToken   string `json:"accessToken,omitempty"`
}

type ModuleRepository

type ModuleRepository interface {
	FindAll(ctx context.Context, namespace string, listoptions listoptions.Request) (listoptions.Response, error)
	FindByName(ctx context.Context, namespace string, name string) (Module, error)
	Create(ctx context.Context, namespace string, module Module) (Module, error)
	Update(ctx context.Context, namespace string, name string, module Module) (Module, error)
	Delete(ctx context.Context, namespace string, name 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)
	FindByName(ctx context.Context, workspaceId string, name string) (Module, error)
	Create(ctx context.Context, workspaceId string, module Module) (Module, error)
	Update(ctx context.Context, workspaceId string, name string, module Module) (Module, error)
	Delete(ctx context.Context, workspaceId string, name 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) (Module, error)

Create implements ModuleUseCase

func (UseCase) Delete

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

Delete implements ModuleUseCase

func (UseCase) FindAll

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

FindAll implements ModuleUseCase

func (UseCase) FindByName

func (u UseCase) FindByName(ctx context.Context, workspaceId string, name string) (Module, error)

FindByName implements ModuleUseCase

func (UseCase) Update

func (u UseCase) Update(ctx context.Context, workspaceId string, name string, module Module) (Module, error)

Update implements ModuleUseCase

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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