Documentation ¶
Index ¶
- Constants
- func BatchCheckVersion(param view.ReqBatchCheckResourceVersion) (resp view.RespBatchCheckResourceVersion, err error)
- func Create(uid int, param view.ReqCreateConfigResource) (err error)
- func CreateVersion(param view.ReqCreateConfigResourceVersion) (err error)
- func Detail(id uint) (resp view.RespDetailConfigResource, err error)
- func FillConfigResource(content string) string
- func GetAllConfigResource(content string) (res []string)
- func GetByName(u *db.User, param view.ReqGetConfigResourceByName) (resp view.RespDetailConfigResource, err error)
- func GetConfigResourceValueByIDWithoutCheck(id string) (resp db.ConfigResourceValue, err error)
- func GetVersionByResourceValue(value string) (version string)
- func Init(db *gorm.DB)
- func List(uid int, param view.ReqListConfigResource) (resp view.RespListConfigResource, err error)
- func Tags() (tags []string, err error)
- type ResourceItem
Constants ¶
View Source
const (
ResourceNameRegex = "^[a-zA-Z0-9_]{5,32}$"
)
Variables ¶
This section is empty.
Functions ¶
func BatchCheckVersion ¶
func BatchCheckVersion(param view.ReqBatchCheckResourceVersion) (resp view.RespBatchCheckResourceVersion, err error)
func CreateVersion ¶
func CreateVersion(param view.ReqCreateConfigResourceVersion) (err error)
func FillConfigResource ¶
FillConfigResource .. check
func GetAllConfigResource ¶
GetAllConfigResource ..
func GetByName ¶
func GetByName(u *db.User, param view.ReqGetConfigResourceByName) (resp view.RespDetailConfigResource, err error)
func GetConfigResourceValueByIDWithoutCheck ¶
func GetConfigResourceValueByIDWithoutCheck(id string) (resp db.ConfigResourceValue, err error)
GetConfigResourceValueByIDWithoutCheck ..
func List ¶
func List(uid int, param view.ReqListConfigResource) (resp view.RespListConfigResource, err error)
Types ¶
type ResourceItem ¶
ResourceItem ..
func ParseResourceFromConfig ¶
func ParseResourceFromConfig(content string) (resourceItems []ResourceItem)
ParseResourceFromConfig 从配置内容中解析出依赖的资源及其版本
Click to show internal directories.
Click to hide internal directories.