Documentation
¶
Index ¶
- Variables
- func FindResource(list []db.CmcResource, call func(val db.CmcResource) bool) (resource db.CmcResource)
- func FormatByKvs(items []db.CmcConfig, format string, value string) (text, md5Str string, err error)
- func GenConfig(configID int, itemID int, value, key string) (text string, err error)
- func GetConfig(configID int, itemID int) (text string, err error)
- func GetConfuContent(aid int, fileName string) string
- func Init()
- func JSONMarshal(v interface{}, safeEncoding bool) string
- func ParseGoDepPkg(content []byte, aid int) error
- func ParseGoModPkg(content []byte, aid int) error
- func PublishSign(text string, textMd5, format string) (signText, md5Str string, err error)
- type CmcTpl
- type ConfuData
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Cmc ... Cmc *cmc // ConfuSrv ... ConfuSrv *confu // CmcAppSrv ... CmcAppSrv *configApp // PublishSrv ... PublishSrv *publish // ResourceSrv ... ResourceSrv *resources // HistorySrv ... HistorySrv *history // Confgo ... Confgo *confgo )
View Source
var ( CmcIp = "{{IP}}" CmcPort = "{{PORT}}" CmcAddr = "{{ADDR}}" CmcDsn = "{{DSN}}" CmcUrl = "{{URL}}" CmcUserName = "{{USERNAME}}" CmcPassword = "{{PASSWORD}}" CmcAll = "{{ALL}}" // 全部解析 CmcArr = []string{CmcIp, CmcPort, CmcUserName, CmcPassword, CmcAddr, CmcDsn, CmcUrl, CmcAll} )
Functions ¶
func FindResource ¶
func FindResource(list []db.CmcResource, call func(val db.CmcResource) bool) (resource db.CmcResource)
FindResource Replace when the associated resource is published, save an external template diff file
func FormatByKvs ¶
func FormatByKvs(items []db.CmcConfig, format string, value string) (text, md5Str string, err error)
FormatByKvs ..
func GetConfuContent ¶
func JSONMarshal ¶
JSONMarshal Auxiliary function
func ParseGoDepPkg ¶
parse packages dependencies ParseGoDepPkg parse content of Gopkg.lock
func ParseGoModPkg ¶
ParseGoModPkg parse content of go.mod
Types ¶
type CmcTpl ¶
type CmcTpl struct { Ip string `json:"ip"` Port string `json:"port"` UserName string `json:"user_name"` Password string `json:"password"` Scheme string `json:"scheme"` DbName string `json:"db_name"` Key string `json:"key"` TplId int `json:"tpl_id"` TplType string `json:"tpl_type"` view.RespOneConfig Metadata map[string]string `json:"metadata"` // contains filtered or unexported fields }
func InitCmcTpl ¶
func InitCmcTpl(db *gorm.DB, value view.RespOneConfig) *CmcTpl
func ParseConfig ¶
Click to show internal directories.
Click to hide internal directories.