namespace

package
v0.0.0-...-7c3836c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidArgument   = errors.New("invalid argument")
	ErrNamespaceIsExists = errors.New("空间已经存在.")
	ErrNamespaceCreate   = errors.New("空间创建失败.")
	ErrNamespaceList     = errors.New("空间获取获取失败.")
)

Functions

func MakeHandler

func MakeHandler(svc Service, logger kitlog.Logger) http.Handler

Types

type Service

type Service interface {
	// 详情信息
	Get(ctx context.Context, name string) (resp *types.Namespace, err error)

	// 创建namespace
	Post(ctx context.Context, name, displayName string) error

	// 同步namespace
	Sync(ctx context.Context) error

	// 删除namespace
	Delete(ctx context.Context) error

	// 更新Namespaces
	Update(ctx context.Context, name, displayName string) error

	// 空间列表
	List(ctx context.Context) (res []*types.Namespace, err error)
}

func NewLoggingService

func NewLoggingService(logger log.Logger, s Service) Service

func NewService

func NewService(logger log.Logger, cf *config.Config, client kubernetes.K8sClient, store repository.Repository) Service

Jump to

Keyboard shortcuts

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