namespace

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: AGPL-3.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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