confgov2

package
v0.4.15 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiffDefaultScene = 1 //默认最近2版本对比
	DiffSpecifyScene = 2 //指定版本与最新版本对比
)
View Source
const (
	ConfigStatusUnknown        uint32 = 0 // 配置发布状态未知
	ConfigStatusAlreadyPublish uint32 = 1 // 配置已经发布
	ConfigStatusNotPublish     uint32 = 2 // 配置未发布
)
View Source
const (
	ExpiredLockTime = 6
)

Variables

This section is empty.

Functions

func BatchClusterPublishConfigInfo added in v0.4.15

func BatchClusterPublishConfigInfo(clusters []string, configId uint64) (ret map[string]*view.ClusterConfigInfo, err error)

func CheckSyntax added in v0.3.0

func CheckSyntax(format model.ConfigFormat, content string) error

func ClusterPublishConfigInfo added in v0.4.3

func ClusterPublishConfigInfo(clusterName string, configId uint64) (configurationRes view.ClusterConfigInfo, err error)

ClusterPublishConfigInfo ..

func ClusterPublishConfigInfoByID added in v0.4.15

func ClusterPublishConfigInfoByID(configId uint64) (configurationRes view.ClusterConfigInfo, err error)

ClusterPublishConfigInfoByID ..

func Create

func Create(c echo.Context, param view.ReqCreateConfig) (resp view.RespDetailConfig, err error)

Create ..

func Delete

func Delete(c echo.Context, id uint) (err error)

Delete ..

func Detail

func Detail(param view.ReqDetailConfig) (resp view.RespDetailConfig, err error)

func Diff

func Diff(configID, historyID uint, scene int) (resp view.RespDiffConfig, err error)

Diff ..

func DiffReleaseConfig added in v0.4.3

func DiffReleaseConfig(param view.ReqDiffReleaseConfig) (resp view.RespDiffReleaseConfig, err error)

DiffReleaseConfig ..

func DiffReleaseConfigByFile added in v0.4.3

func DiffReleaseConfigByFile(param view.ReqDiffReleaseConfig) (resp view.RespDiffReleaseConfig, err error)

DiffReleaseConfigByFile ..

func DiffVersion added in v0.4.3

func DiffVersion(param view.ReqDiffConfig) (resp view.RespDiffConfig, err error)

DiffVersion ..

func GetAllConfigByEnv added in v0.4.3

func GetAllConfigByEnv(env string) (resp map[uint]struct{}, err error)

func GetAllConfigText added in v0.3.0

func GetAllConfigText() (list []db.Configuration, err error)

func HandleConfigPublishStatus added in v0.4.7

func HandleConfigPublishStatus(configList view.RespListConfig) view.RespListConfig

func History

func History(param view.ReqHistoryConfig, uid int) (resp view.RespHistoryConfig, err error)

History 发布历史分页列表,Page从0开始

func Init

func Init(d *gorm.DB)

Init ..

func Instances

func Instances(param view.ReqConfigInstanceList) (resp view.RespConfigInstanceList, err error)

Instances ..

func List

func List(param view.ReqListConfig) (resp view.RespListConfig, err error)

func Publish

func Publish(param view.ReqPublishConfig, c echo.Context) (err error)

Publish ..

func ReadInstanceConfig added in v0.3.0

func ReadInstanceConfig(param view.ReqReadInstanceConfig) (configContentList []view.RespReadInstanceConfigItem, err error)

func StatisticsCommit added in v0.3.0

func StatisticsCommit(start, end int64) (cmcCnt []view.CmcCnt, total int, err error)

func StatisticsEnv added in v0.3.0

func StatisticsEnv() (res []view.EnvStatic, total int, err error)

func TryLock added in v0.4.0

func TryLock(uid, configId uint) (err error)

func Unlock added in v0.4.0

func Unlock(uid, configId uint) (err error)

func Update

func Update(c echo.Context, param view.ReqUpdateConfig) (err error)

Update ..

Types

type ConfigStatusService added in v0.4.7

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

func NewConfigStatusService added in v0.4.7

func NewConfigStatusService(configList view.RespListConfig) (r *ConfigStatusService)

type SyntaxError added in v0.3.0

type SyntaxError struct {
	LineNumber int
	Message    string
}

func (SyntaxError) Error added in v0.3.0

func (s SyntaxError) Error() string

Jump to

Keyboard shortcuts

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