environment

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 8 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 (
	Web             = "WEB"
	DeployEnvFormat = "^[A-Za-z_][A-Za-z0-9_]*"
	NotDeleteValue  = "N"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvConfig

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

EnvConfig 命名空间参数

func New

func New(options ...Option) *EnvConfig

New 新建 EnvConfig 实例

func (*EnvConfig) Add

func (e *EnvConfig) Add(createReq *apistructs.EnvConfigAddOrUpdateRequest, namespace string, encrypt bool) error

Add 添加 env config

func (*EnvConfig) DeleteConfig

func (e *EnvConfig) DeleteConfig(permission *permission.Permission, namespace, key, userID string) error

DeleteConfig 删除指定 namespace 下的某个配置

func (*EnvConfig) GetConfigs

func (e *EnvConfig) GetConfigs(permission *permission.Permission, namespace, userID string, decrypt bool) ([]apistructs.EnvConfig, error)

GetConfigs 根据指定 namespace 获取 env config

func (*EnvConfig) GetDeployConfigs

func (e *EnvConfig) GetDeployConfigs(permission *permission.Permission, userID, namespace string) ([]apistructs.EnvConfig, error)

GetDeployConfigs 根据指定 namespace 获取部署环境变量配置

func (*EnvConfig) GetMultiNamespaceConfigs

func (e *EnvConfig) GetMultiNamespaceConfigs(permission *permission.Permission, userID string, namespaceParams []apistructs.NamespaceParam) (map[string][]apistructs.EnvConfig, error)

GetMultiNamespaceConfigs 根据多个 namespace 获取所有配置信息

func (*EnvConfig) ListConfigs added in v1.3.1

func (e *EnvConfig) ListConfigs(namespaceParams []apistructs.NamespaceParam) (map[string][]apistructs.EnvConfig, error)

func (*EnvConfig) Update

func (e *EnvConfig) Update(permission *permission.Permission, createReq *apistructs.EnvConfigAddOrUpdateRequest, namespace, userID string, encrypt bool) error

Update 更新 env config

type Option

type Option func(*EnvConfig)

Option 定义 EnvConfig 对象的配置选项

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