extends

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

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 Arch

func Arch() string

Arch 当前架构环境,[{go版本}-{eosc版本}-{架构}]

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 DecodeExtenderId(id string) (group, project, version string, err error)

func DownLoadToRepository

func DownLoadToRepository(group, project, version string) error

DownLoadToRepository 下载指定版本的插件项目,并解压到仓库

func DownLoadToRepositoryById

func DownLoadToRepositoryById(id string) error

DownLoadToRepositoryById 下载插件, id格式为 {group}:{project}[:{version}]

func DownloadCheck added in v0.5.0

func DownloadCheck(group string, project string, version string) error

func FormatDriverId

func FormatDriverId(group, project, fac string) string

func FormatFileName

func FormatFileName(group, project, version string) string

func FormatProject

func FormatProject(group, project string) string

func GetInners

func GetInners() map[string]string

func IsInner

func IsInner(group, project string) bool

func LoadCheck added in v0.5.0

func LoadCheck(group, project, version string) error

LoadCheck 加载插件前检查

func LoadInner

func LoadInner(register eosc.IExtenderDriverRegister)

LoadInner 加载内置插件

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 LocalCheck

func LocalCheck(group, project, version string) error

LocalCheck 检查本地拓展文件是否存在

func LocalExtendTarPath

func LocalExtendTarPath(group, project, version string) string

func LocalExtenderPath

func LocalExtenderPath(group, project, version string) string

func ReadProject added in v0.5.0

func ReadProject(id string) (string, string, bool)

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 (*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 RegisterFunc

type RegisterFunc func(eosc.IExtenderDriverRegister)

RegisterFunc 注册函数

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)

Jump to

Keyboard shortcuts

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