Documentation ¶
Index ¶
- Constants
- Variables
- func GetPluginFsService(id primitive.ObjectID, opts ...FsOption) (svc interfaces.PluginFsService, err error)
- func GetPluginService(path string, opts ...Option) (svc interfaces.PluginService, err error)
- func NewPluginFsService(id primitive.ObjectID, opts ...FsOption) (svc2 interfaces.PluginFsService, err error)
- func NewPluginService(opts ...Option) (svc2 interfaces.PluginService, err error)
- func ProvideGetPluginFsService(id primitive.ObjectID, opts ...FsOption) func() (svc interfaces.PluginFsService, err error)
- func ProvideGetPluginService(path string, opts ...Option) func() (svr interfaces.PluginService, err error)
- func ProvidePluginFsService(id primitive.ObjectID, opts ...FsOption) func() (svc interfaces.PluginFsService, err error)
- type FsOption
- type FsService
- func (svc *FsService) GetConfigPath() (path string)
- func (svc *FsService) GetFsPath() (res string)
- func (svc *FsService) GetFsService() (fsSvc interfaces.FsService)
- func (svc *FsService) GetWorkspacePath() (res string)
- func (svc *FsService) Init() (err error)
- func (svc *FsService) SetConfigPath(path string)
- func (svc *FsService) SetFsPathBase(path string)
- func (svc *FsService) SetId(id primitive.ObjectID)
- func (svc *FsService) SetWorkspacePathBase(path string)
- type Option
- type Service
- func (svc *Service) GetPublicPluginInfo(fullName string) (res interface{}, err error)
- func (svc *Service) GetPublicPluginList() (res interface{}, err error)
- func (svc *Service) Init() (err error)
- func (svc *Service) InstallPlugin(id primitive.ObjectID) (err error)
- func (svc *Service) SetFsPathBase(path string)
- func (svc *Service) SetMonitorInterval(interval time.Duration)
- func (svc *Service) Start()
- func (svc *Service) StartPlugin(id primitive.ObjectID) (err error)
- func (svc *Service) Stop()
- func (svc *Service) StopPlugin(id primitive.ObjectID) (err error)
- func (svc *Service) UninstallPlugin(id primitive.ObjectID) (err error)
- func (svc *Service) Wait()
Constants ¶
View Source
const DefaultPluginBinName = "plugin"
View Source
const DefaultPluginDirName = "plugins"
View Source
const DefaultPluginFsPathBase = "plugins"
View Source
const DefaultPluginInstallCmd = "go build -o ./build/start"
View Source
const DefaultWindowsPluginInstallCmd = DefaultPluginInstallCmd + ".exe"
Variables ¶
View Source
var DefaultPluginDirPath = path.Join(config.DefaultConfigDirPath, DefaultPluginDirName)
Functions ¶
func GetPluginFsService ¶
func GetPluginFsService(id primitive.ObjectID, opts ...FsOption) (svc interfaces.PluginFsService, err error)
func GetPluginService ¶
func GetPluginService(path string, opts ...Option) (svc interfaces.PluginService, err error)
func NewPluginFsService ¶
func NewPluginFsService(id primitive.ObjectID, opts ...FsOption) (svc2 interfaces.PluginFsService, err error)
func NewPluginService ¶
func NewPluginService(opts ...Option) (svc2 interfaces.PluginService, err error)
func ProvideGetPluginFsService ¶
func ProvideGetPluginFsService(id primitive.ObjectID, opts ...FsOption) func() (svc interfaces.PluginFsService, err error)
func ProvideGetPluginService ¶
func ProvideGetPluginService(path string, opts ...Option) func() (svr interfaces.PluginService, err error)
func ProvidePluginFsService ¶
func ProvidePluginFsService(id primitive.ObjectID, opts ...FsOption) func() (svc interfaces.PluginFsService, err error)
Types ¶
type FsOption ¶
type FsOption func(svc interfaces.PluginFsService)
func WithFsConfigPath ¶
func WithFsFsPathBase ¶
func WithFsWorkspacePathBase ¶
type FsService ¶
type FsService struct {
// contains filtered or unexported fields
}
func (*FsService) GetConfigPath ¶
func (*FsService) GetFsService ¶
func (svc *FsService) GetFsService() (fsSvc interfaces.FsService)
func (*FsService) GetWorkspacePath ¶
func (*FsService) SetConfigPath ¶
func (*FsService) SetFsPathBase ¶
func (*FsService) SetWorkspacePathBase ¶
type Option ¶
type Option func(svc interfaces.PluginService)
func WithFsPathBase ¶
func WithMonitorInterval ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) GetPublicPluginInfo ¶
func (*Service) GetPublicPluginList ¶
func (*Service) InstallPlugin ¶
func (*Service) SetFsPathBase ¶
func (*Service) SetMonitorInterval ¶
func (*Service) UninstallPlugin ¶
Click to show internal directories.
Click to hide internal directories.