Documentation ¶
Index ¶
- Constants
- Variables
- func Process()
- type BaseArg
- type CacheItem
- type ExportApi
- type ExtenderData
- func (e *ExtenderData) Delete(group, project, version string) (*ExtenderProject, error)
- func (e *ExtenderData) GetConfigTypes() map[string]reflect.Type
- func (e *ExtenderData) GetInfo(group, project string) ([]*ExtenderItemInfo, bool)
- func (e *ExtenderData) GetRender(group, project, name string) (*ExtenderItemRender, bool)
- func (e *ExtenderData) IsWork() bool
- func (e *ExtenderData) List() []*ExtenderItem
- func (e *ExtenderData) SetVersion(group, project, version string) (*ExtenderProject, bool, error)
- type ExtenderItem
- type ExtenderItemInfo
- type ExtenderItemRender
- type ExtenderOpenApi
- func (oe *ExtenderOpenApi) Delete(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (oe *ExtenderOpenApi) Info(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (oe *ExtenderOpenApi) List(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (oe *ExtenderOpenApi) Register(router *httprouter.Router)
- func (oe *ExtenderOpenApi) Render(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (oe *ExtenderOpenApi) SET(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- type ExtenderProject
- type IData
- type JsonData
- type ProcessAdmin
- type ProfessionApi
- func (pi *ProfessionApi) AddDriver(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (pi *ProfessionApi) All(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (pi *ProfessionApi) Delete(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (pi *ProfessionApi) Detail(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (pi *ProfessionApi) DriverInfo(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (pi *ProfessionApi) Drivers(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (pi *ProfessionApi) Register(router *httprouter.Router)
- func (pi *ProfessionApi) ResetDrivers(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (pi *ProfessionApi) SetDriver(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (pi *ProfessionApi) Skill(req *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- type ProfessionInfo
- type ProfessionsRequire
- type SettingApi
- func (oe *SettingApi) Get(req *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (oe *SettingApi) RegisterSetting(router *httprouter.Router)
- func (oe *SettingApi) Set(req *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- type VariableApi
- type WorkerApi
- func (oe *WorkerApi) Add(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (oe *WorkerApi) Delete(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (oe *WorkerApi) Patch(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- func (oe *WorkerApi) Register(router *httprouter.Router)
- func (oe *WorkerApi) Save(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, ...)
- type WorkerDatas
- func (w *WorkerDatas) All() map[string]*WorkerInfo
- func (w *WorkerDatas) Clone() *WorkerDatas
- func (w *WorkerDatas) Count() int
- func (w *WorkerDatas) Del(id string) (*WorkerInfo, bool)
- func (w *WorkerDatas) Get(id string) (eosc.IWorker, bool)
- func (w *WorkerDatas) GetInfo(id string) (*WorkerInfo, bool)
- func (w *WorkerDatas) Keys() []string
- func (w *WorkerDatas) List() []*WorkerInfo
- func (w *WorkerDatas) Set(id string, v *WorkerInfo)
- type WorkerInfo
- type Workers
- func (oe *Workers) Delete(id string) (*WorkerInfo, error)
- func (oe *Workers) DeleteTest(ids ...string) (requires []string)
- func (oe *Workers) Export() map[string][]*WorkerInfo
- func (oe *Workers) GetEmployee(profession, name string) (*WorkerInfo, error)
- func (oe *Workers) Init(professions professions.IProfessions, data *WorkerDatas, ...)
- func (oe *Workers) ListEmployees(profession string) ([]interface{}, error)
- func (oe *Workers) Update(profession, name, driver, desc string, data IData) (*WorkerInfo, error)
- type YamlData
Constants ¶
View Source
const Setting = "setting"
Variables ¶
View Source
var ( ErrorExtenderNotWork = errors.New("not work") ErrorInnerExtenderCantChange = errors.New("is inner") ErrorNotExist = errors.New("not exist") ErrorDuplicatePath = errors.New("path duplicate") ErrorNotMatch = errors.New("not match profession") ErrorExtenderVersionIsChange = errors.New("the version of extender has changed") )
View Source
var (
ErrorUnknownContentType = errors.New("unknown content type")
)
Functions ¶
Types ¶
type CacheItem ¶ added in v0.7.0
type CacheItem struct {
// contains filtered or unexported fields
}
type ExportApi ¶
type ExportApi struct {
// contains filtered or unexported fields
}
func NewExportApi ¶
func NewExportApi(extenders *ExtenderData, profession professions.IProfessions, workers *Workers) *ExportApi
func (*ExportApi) Register ¶
func (oe *ExportApi) Register(router *httprouter.Router)
type ExtenderData ¶
type ExtenderData struct { Versions map[string]string Infos map[string]*ExtenderProject // contains filtered or unexported fields }
func NewExtenderData ¶
func NewExtenderData(conf map[string][]byte, extenderRequire eosc.IRequires) *ExtenderData
func (*ExtenderData) Delete ¶
func (e *ExtenderData) Delete(group, project, version string) (*ExtenderProject, error)
func (*ExtenderData) GetConfigTypes ¶ added in v0.7.0
func (e *ExtenderData) GetConfigTypes() map[string]reflect.Type
func (*ExtenderData) GetInfo ¶
func (e *ExtenderData) GetInfo(group, project string) ([]*ExtenderItemInfo, bool)
func (*ExtenderData) GetRender ¶
func (e *ExtenderData) GetRender(group, project, name string) (*ExtenderItemRender, bool)
func (*ExtenderData) IsWork ¶
func (e *ExtenderData) IsWork() bool
func (*ExtenderData) List ¶
func (e *ExtenderData) List() []*ExtenderItem
func (*ExtenderData) SetVersion ¶
func (e *ExtenderData) SetVersion(group, project, version string) (*ExtenderProject, bool, error)
type ExtenderItem ¶
type ExtenderItem struct { ExtenderItemInfo Id string `json:"id" yaml:"id"` }
type ExtenderItemInfo ¶
type ExtenderItemRender ¶
type ExtenderItemRender struct { ExtenderItemInfo Render interface{} `json:"render" yaml:"render"` }
type ExtenderOpenApi ¶
type ExtenderOpenApi struct {
// contains filtered or unexported fields
}
func NewExtenderOpenApi ¶
func NewExtenderOpenApi(extenders *ExtenderData) *ExtenderOpenApi
func (*ExtenderOpenApi) Delete ¶
func (oe *ExtenderOpenApi) Delete(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ExtenderOpenApi) Info ¶
func (oe *ExtenderOpenApi) Info(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ExtenderOpenApi) List ¶
func (oe *ExtenderOpenApi) List(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ExtenderOpenApi) Register ¶
func (oe *ExtenderOpenApi) Register(router *httprouter.Router)
func (*ExtenderOpenApi) Render ¶
func (oe *ExtenderOpenApi) Render(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ExtenderOpenApi) SET ¶
func (oe *ExtenderOpenApi) SET(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
type ExtenderProject ¶
type ExtenderProject struct {
// contains filtered or unexported fields
}
type ProcessAdmin ¶
type ProcessAdmin struct {
// contains filtered or unexported fields
}
func NewProcessAdmin ¶
func NewProcessAdmin(parent context.Context, arg map[string]map[string][]byte) (*ProcessAdmin, error)
NewProcessAdmin 创建新的admin进程 启动时通过stdin传输配置信息
func (*ProcessAdmin) OpenApiServer ¶
func (pa *ProcessAdmin) OpenApiServer() error
func (*ProcessAdmin) ServeHTTP ¶
func (pa *ProcessAdmin) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ProfessionApi ¶
type ProfessionApi struct {
// contains filtered or unexported fields
}
func NewProfessionApi ¶
func NewProfessionApi(data professions.IProfessions, ws *WorkerDatas) *ProfessionApi
func (*ProfessionApi) AddDriver ¶
func (pi *ProfessionApi) AddDriver(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ProfessionApi) All ¶
func (pi *ProfessionApi) All(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ProfessionApi) Delete ¶
func (pi *ProfessionApi) Delete(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ProfessionApi) Detail ¶
func (pi *ProfessionApi) Detail(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ProfessionApi) DriverInfo ¶
func (pi *ProfessionApi) DriverInfo(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ProfessionApi) Drivers ¶
func (pi *ProfessionApi) Drivers(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ProfessionApi) Register ¶
func (pi *ProfessionApi) Register(router *httprouter.Router)
func (*ProfessionApi) ResetDrivers ¶
func (pi *ProfessionApi) ResetDrivers(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ProfessionApi) SetDriver ¶
func (pi *ProfessionApi) SetDriver(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*ProfessionApi) Skill ¶
func (pi *ProfessionApi) Skill(req *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
type ProfessionInfo ¶
type ProfessionsRequire ¶
type ProfessionsRequire struct { professions.IProfessions // contains filtered or unexported fields }
func NewProfessionsRequire ¶
func NewProfessionsRequire(professions professions.IProfessions, requires eosc.IRequires) *ProfessionsRequire
func (*ProfessionsRequire) Delete ¶
func (p *ProfessionsRequire) Delete(name string) error
func (*ProfessionsRequire) Reset ¶
func (p *ProfessionsRequire) Reset(configs []*eosc.ProfessionConfig)
func (*ProfessionsRequire) Set ¶
func (p *ProfessionsRequire) Set(name string, profession *eosc.ProfessionConfig) error
type SettingApi ¶ added in v0.7.0
type SettingApi struct {
// contains filtered or unexported fields
}
func NewSettingApi ¶ added in v0.7.0
func (*SettingApi) Get ¶ added in v0.7.0
func (oe *SettingApi) Get(req *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*SettingApi) RegisterSetting ¶ added in v0.7.0
func (oe *SettingApi) RegisterSetting(router *httprouter.Router)
func (*SettingApi) Set ¶ added in v0.7.0
func (oe *SettingApi) Set(req *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
type VariableApi ¶ added in v0.7.0
type VariableApi struct {
// contains filtered or unexported fields
}
func NewVariableApi ¶ added in v0.7.0
func NewVariableApi(extenderData *ExtenderData, workers *Workers, variableData eosc.IVariable, setting eosc.ISettings) *VariableApi
func (*VariableApi) Register ¶ added in v0.7.0
func (oe *VariableApi) Register(router *httprouter.Router)
type WorkerApi ¶
type WorkerApi struct {
// contains filtered or unexported fields
}
func NewWorkerApi ¶
func (*WorkerApi) Add ¶
func (oe *WorkerApi) Add(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*WorkerApi) Delete ¶
func (oe *WorkerApi) Delete(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*WorkerApi) Patch ¶
func (oe *WorkerApi) Patch(r *http.Request, params httprouter.Params) (status int, header http.Header, events []*open_api.EventResponse, body interface{})
func (*WorkerApi) Register ¶
func (oe *WorkerApi) Register(router *httprouter.Router)
type WorkerDatas ¶
type WorkerDatas struct {
// contains filtered or unexported fields
}
func NewWorkerDatas ¶
func NewWorkerDatas(initData map[string][]byte) *WorkerDatas
func (*WorkerDatas) All ¶
func (w *WorkerDatas) All() map[string]*WorkerInfo
func (*WorkerDatas) Clone ¶
func (w *WorkerDatas) Clone() *WorkerDatas
func (*WorkerDatas) Count ¶
func (w *WorkerDatas) Count() int
func (*WorkerDatas) Del ¶
func (w *WorkerDatas) Del(id string) (*WorkerInfo, bool)
func (*WorkerDatas) GetInfo ¶
func (w *WorkerDatas) GetInfo(id string) (*WorkerInfo, bool)
func (*WorkerDatas) Keys ¶
func (w *WorkerDatas) Keys() []string
func (*WorkerDatas) List ¶
func (w *WorkerDatas) List() []*WorkerInfo
func (*WorkerDatas) Set ¶
func (w *WorkerDatas) Set(id string, v *WorkerInfo)
type WorkerInfo ¶
type WorkerInfo struct {
// contains filtered or unexported fields
}
func NewWorkerInfo ¶
func (*WorkerInfo) Body ¶ added in v0.7.0
func (w *WorkerInfo) Body() []byte
func (*WorkerInfo) ConfigType ¶ added in v0.7.0
func (w *WorkerInfo) ConfigType() reflect.Type
func (*WorkerInfo) Detail ¶
func (w *WorkerInfo) Detail() interface{}
func (*WorkerInfo) Info ¶
func (w *WorkerInfo) Info(appendLabels ...string) interface{}
type Workers ¶
type Workers struct {
// contains filtered or unexported fields
}
func NewWorkers ¶
func NewWorkers() *Workers
func (*Workers) DeleteTest ¶ added in v0.7.0
func (*Workers) Export ¶
func (oe *Workers) Export() map[string][]*WorkerInfo
func (*Workers) GetEmployee ¶
func (oe *Workers) GetEmployee(profession, name string) (*WorkerInfo, error)
func (*Workers) Init ¶ added in v0.7.0
func (oe *Workers) Init(professions professions.IProfessions, data *WorkerDatas, variables eosc.IVariable)
func (*Workers) ListEmployees ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.