plugin

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

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

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 WithFsConfigPath(path string) FsOption

func WithFsFsPathBase

func WithFsFsPathBase(path string) FsOption

func WithFsId

func WithFsId(id primitive.ObjectID) FsOption

func WithFsWorkspacePathBase

func WithFsWorkspacePathBase(path string) FsOption

type FsService

type FsService struct {
	// contains filtered or unexported fields
}

func (*FsService) GetConfigPath

func (svc *FsService) GetConfigPath() (path string)

func (*FsService) GetFsPath

func (svc *FsService) GetFsPath() (res string)

func (*FsService) GetFsService

func (svc *FsService) GetFsService() (fsSvc interfaces.FsService)

func (*FsService) GetWorkspacePath

func (svc *FsService) GetWorkspacePath() (res string)

func (*FsService) Init

func (svc *FsService) Init() (err error)

func (*FsService) SetConfigPath

func (svc *FsService) SetConfigPath(path string)

func (*FsService) SetFsPathBase

func (svc *FsService) SetFsPathBase(path string)

func (*FsService) SetId

func (svc *FsService) SetId(id primitive.ObjectID)

func (*FsService) SetWorkspacePathBase

func (svc *FsService) SetWorkspacePathBase(path string)

type Option

type Option func(svc interfaces.PluginService)

func WithFsPathBase

func WithFsPathBase(path string) Option

func WithMonitorInterval

func WithMonitorInterval(interval time.Duration) Option

type Service

type Service struct {
	// contains filtered or unexported fields
}

func (*Service) GetPublicPluginInfo

func (svc *Service) GetPublicPluginInfo(fullName string) (res interface{}, err error)

func (*Service) GetPublicPluginList

func (svc *Service) GetPublicPluginList() (res interface{}, err error)

func (*Service) Init

func (svc *Service) Init() (err error)

func (*Service) InstallPlugin

func (svc *Service) InstallPlugin(id primitive.ObjectID) (err error)

func (*Service) SetFsPathBase

func (svc *Service) SetFsPathBase(path string)

func (*Service) SetMonitorInterval

func (svc *Service) SetMonitorInterval(interval time.Duration)

func (*Service) Start

func (svc *Service) Start()

func (*Service) StartPlugin

func (svc *Service) StartPlugin(id primitive.ObjectID) (err error)

func (*Service) Stop

func (svc *Service) Stop()

func (*Service) StopPlugin

func (svc *Service) StopPlugin(id primitive.ObjectID) (err error)

func (*Service) UninstallPlugin

func (svc *Service) UninstallPlugin(id primitive.ObjectID) (err error)

func (*Service) Wait

func (svc *Service) Wait()

Jump to

Keyboard shortcuts

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