namespace

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DynamicNamespaceMaxLength = 32
	StaticNamespaceMaxLength  = 255
	NamespaceFormat           = "^[a-zA-Z0-9\\-]+$"
	NotDeleteValue            = "N"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

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

Namespace 命名空间参数

func New

func New(options ...Option) *Namespace

New 新建 Namespace 实例

func (*Namespace) Create

func (n *Namespace) Create(createReq *apistructs.NamespaceCreateRequest) (int64, error)

Create 创建 namespace

func (*Namespace) CreateRelation

func (n *Namespace) CreateRelation(createReq *apistructs.NamespaceRelationCreateRequest) error

CreateRelation 创建 namespace 关联关系

func (*Namespace) DeleteNamespace

func (n *Namespace) DeleteNamespace(permission *permission.Permission, name string, identityInfo apistructs.IdentityInfo) error

DeleteNamespace 删除 namespace

func (*Namespace) DeleteRelation

func (n *Namespace) DeleteRelation(permission *permission.Permission, locale *i18n.LocaleResource, name, userID string) error

DeleteRelation 删除 namespace 关联关系

func (*Namespace) FixDataErr

func (n *Namespace) FixDataErr(namespaceName, projectID string) error

FixDataErr 修复命名空间不全

type Option

type Option func(*Namespace)

Option 定义 Namespace 对象的配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithDBClient

func WithDBClient(db *dao.DBClient) Option

WithDBClient 配置 db client

Jump to

Keyboard shortcuts

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