Documentation ¶
Index ¶
- Constants
- Variables
- func AddInnerExtendProject(group, project string, registerFunc ...RegisterFunc)
- func Arch() string
- func CheckExtender(group, project, version string) (*service.ExtendsInfo, error)
- func CheckExtends(exts ...string) ([]*service.ExtendsInfo, []*service.ExtendsBasicInfo, error)
- func DecodeExtenderId(id string) (group, project, version string, err error)
- func DownLoadToRepository(group, project, version string) error
- func DownLoadToRepositoryById(id string) error
- func DownloadCheck(group string, project string, version string) error
- func FormatDriverId(group, project, fac string) string
- func FormatFileName(group, project, version string) string
- func FormatProject(group, project string) string
- func GetInners() map[string]string
- func IsInner(group, project string) bool
- func LoadCheck(group, project, version string) error
- func LoadInner(register eosc.IExtenderDriverRegister)
- func LoadPlugins(plugins map[string]string, register IExtenderRegister)
- func LoadProject(group, project, version string, register IExtenderRegister)
- func LocalCheck(group, project, version string) error
- func LocalExtendTarPath(group, project, version string) string
- func LocalExtenderPath(group, project, version string) string
- func ReadProject(id string) (string, string, bool)
- type ExtenderInfo
- type ExtenderRegister
- type ExtenderVersion
- type IExtenderRegister
- type RegisterFunc
- type VersionInfo
Constants ¶
View Source
const InNertVersion = "innert"
Variables ¶
View Source
var ( ErrorInvalidExtenderId = errors.New("invalid extender id") ErrorExtenderNameDuplicate = errors.New("duplicate extender factory name") ErrorExtenderBuilderInvalid = errors.New("invalid builder") ErrorExtenderNotFindLocal = errors.New("not find extender on local") ErrorExtenderNotFindMark = errors.New("not find extender on market") ErrorExtenderNoLatest = errors.New("no latest for extender") )
View Source
var (
ErrorFileCorrupted = errors.New("the file corrupted")
)
Functions ¶
func AddInnerExtendProject ¶
func AddInnerExtendProject(group, project string, registerFunc ...RegisterFunc)
func CheckExtender ¶ added in v0.5.0
func CheckExtender(group, project, version string) (*service.ExtendsInfo, error)
func CheckExtends ¶ added in v0.5.0
func CheckExtends(exts ...string) ([]*service.ExtendsInfo, []*service.ExtendsBasicInfo, error)
func DecodeExtenderId ¶
func DownLoadToRepository ¶
DownLoadToRepository 下载指定版本的插件项目,并解压到仓库
func DownLoadToRepositoryById ¶
DownLoadToRepositoryById 下载插件, id格式为 {group}:{project}[:{version}]
func DownloadCheck ¶ added in v0.5.0
func FormatDriverId ¶
func FormatFileName ¶
func FormatProject ¶
func LoadPlugins ¶ added in v0.5.0
func LoadPlugins(plugins map[string]string, register IExtenderRegister)
func LoadProject ¶ added in v0.5.0
func LoadProject(group, project, version string, register IExtenderRegister)
func LocalExtendTarPath ¶
func LocalExtenderPath ¶
Types ¶
type ExtenderInfo ¶
type ExtenderInfo struct { ID string `json:"id"` Description string `json:"description"` Group string `json:"group"` Project string `json:"project"` Version string `json:"version"` Go string `json:"go"` Arch string `json:"arch"` Eosc string `json:"eosc"` Sha string `json:"Sha"` Status int `json:"status"` IsLatest bool `json:"is_latest"` Create string `json:"create"` Update string `json:"update"` URL string `json:"url"` }
func ExtenderInfoRequest ¶
func ExtenderInfoRequest(group, project, version string) (*ExtenderInfo, error)
type ExtenderRegister ¶
type ExtenderRegister struct {
// contains filtered or unexported fields
}
func NewExtenderRegister ¶
func NewExtenderRegister(group string, project string) *ExtenderRegister
func ReadExtenderProject ¶
func ReadExtenderProject(group, project, version string) (*ExtenderRegister, error)
func (*ExtenderRegister) All ¶
func (r *ExtenderRegister) All() map[string]eosc.IExtenderDriverFactory
func (*ExtenderRegister) RegisterExtenderDriver ¶
func (r *ExtenderRegister) RegisterExtenderDriver(name string, factory eosc.IExtenderDriverFactory) error
func (*ExtenderRegister) RegisterTo ¶
func (r *ExtenderRegister) RegisterTo(register eosc.IExtenderDriverRegister)
type ExtenderVersion ¶
type ExtenderVersion struct { *VersionInfo Arches []string `json:"arches"` }
func ExtendersRequest ¶
func ExtendersRequest(group, project string) ([]*ExtenderVersion, error)
type IExtenderRegister ¶ added in v0.5.0
type IExtenderRegister interface { eosc.IExtenderDriverManager eosc.IExtenderDrivers }
func InitRegister ¶ added in v0.5.0
func InitRegister() IExtenderRegister
type VersionInfo ¶
type VersionInfo struct { Version string `json:"version"` Description string `json:"description"` IsLatest bool `json:"is_latest"` }
func GetAvailableVersions ¶
func GetAvailableVersions(group, project string) ([]*VersionInfo, error)
Click to show internal directories.
Click to hide internal directories.