Documentation ¶
Index ¶
- Constants
- Variables
- func AddSyncExtension(addr string) error
- func ConvertFieldI18n(key string, locale map[string]map[string]string) string
- func RegisterExtensionSource(source Source)
- func RemoveSyncExtension(addr string) error
- func StartSyncExtensionSource()
- type FileExtensionSource
- type GitExtensionSource
- type Interface
- type MenuItem
- type MenuMap
- type Repo
- type SortMapNode
- type Source
- type Version
Constants ¶
View Source
const DicehubExtensionsMenu = "dicehub.extensions.menu"
Variables ¶
View Source
var CategoryTypes = map[string][]string{
"action": {
"source_code_management",
"build_management",
"deploy_management",
"version_management",
"test_management",
"data_management",
"custom_task",
},
"addon": {
"database",
"distributed_cooperation",
"search",
"message",
"content_management",
"security",
"traffic_load",
"monitoring&logging",
"content",
"image_processing",
"document_processing",
"sound_processing",
"custom",
"general_ability",
"new_retail",
"srm",
"solution",
},
}
Functions ¶
func AddSyncExtension ¶
func ConvertFieldI18n ¶
func RegisterExtensionSource ¶
func RegisterExtensionSource(source Source)
func RemoveSyncExtension ¶
func StartSyncExtensionSource ¶
func StartSyncExtensionSource()
Types ¶
type FileExtensionSource ¶
type FileExtensionSource struct { AddrRWLock map[string]*sync.RWMutex // contains filtered or unexported fields }
local file source match matches the local folder add Add a folder address to the file change monitoring remove removes a folder from file change monitoring start Open file monitoring, continuously monitor file changes, and update extension
func NewFileExtensionSource ¶
func NewFileExtensionSource(s *provider) *FileExtensionSource
type GitExtensionSource ¶
type GitExtensionSource struct { Cfg *config GitCloneAddr sync.Map GitCloneRepoName sync.Map // contains filtered or unexported fields }
git source Pull the code when adding, and then use FileExtensionSource to monitor the file, and wait for the regular pull to update the file remove remove file monitoring and associated information start continues to pull and update local files according to the association relationship
func NewGitExtensionSource ¶
func NewGitExtensionSource(cfg *config, f *FileExtensionSource) *GitExtensionSource
type Interface ¶
type Interface interface { GetExtension(name string, version string, yamlFormat bool) (*pb.ExtensionVersion, error) MenuExtWithLocale(extensions []*pb.Extension, locale *i18n.LocaleResource, all bool) (map[string][]pb.ExtensionMenu, error) CreateExtensionVersionByRequest(req *pb.ExtensionVersionCreateRequest) (*pb.ExtensionVersionCreateResponse, error) QueryExtensionList(all bool, typ string, labels string) ([]*pb.Extension, error) QueryExtensionVersions(ctx context.Context, req *pb.ExtensionVersionQueryRequest) (*pb.ExtensionVersionQueryResponse, error) DeleteExtensionVersion(name, version string) error ToProtoValue(i interface{}) (*structpb.Value, error) }
type MenuMap ¶
type MenuMap []*SortMapNode
func (*MenuMap) MarshalJSON ¶
func (*MenuMap) ToSortedMapJson ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func LoadExtensions ¶
LoadExtensions loads all extensions from the repo (contains all versions below)
type SortMapNode ¶
type SortMapNode struct { Key string Val interface{} }
type Version ¶
type Version struct { Name string Dirname string Spec *apistructs.Spec // structure of spec.yml SpecContent []byte // content of spec.yml DiceContent []byte // content of dice.yml ReadmeContent []byte // content of readme.md SwaggerContent []byte // content of swagger.yml UpdateAt *timestamppb.Timestamp }
Version is a version of an Extension
func NewVersion ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.