configresource

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceNameRegex = "^[a-zA-Z0-9_]{5,32}$"
)

Variables

This section is empty.

Functions

func Create

func Create(uid int, param view.ReqCreateConfigResource) (err error)

func CreateVersion

func CreateVersion(param view.ReqCreateConfigResourceVersion) (err error)

func Detail

func Detail(id uint) (resp view.RespDetailConfigResource, err error)

func FillConfigResource

func FillConfigResource(content string) string

FillConfigResource .. check

func GetAllConfigResource

func GetAllConfigResource(content string) (res []string)

GetAllConfigResource ..

func GetConfigResourceValueByIDWithoutCheck

func GetConfigResourceValueByIDWithoutCheck(id string) (resp db.ConfigResourceValue, err error)

GetConfigResourceValueByIDWithoutCheck ..

func GetVersionByResourceValue

func GetVersionByResourceValue(value string) (version string)

func Init

func Init(db *gorm.DB)

func List

func List(uid int, param view.ReqListConfigResource) (resp view.RespListConfigResource, err error)

func Tags

func Tags() (tags []string, err error)

Tags ..

Types

type ResourceItem

type ResourceItem struct {
	Name    string `json:"name"`
	Version uint   `json:"version"`
}

ResourceItem ..

func ParseResourceFromConfig

func ParseResourceFromConfig(content string) (resourceItems []ResourceItem)

ParseResourceFromConfig 从配置内容中解析出依赖的资源及其版本

Jump to

Keyboard shortcuts

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