Documentation
¶
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func DefaultBindings(opts Options) []string
- func DumpManifest(manifest *Manifest)
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type ActionOpts
- type AppConfig
- type Base
- func (self *Base) GetManifest() *Manifest
- func (s *Base) GetName() string
- func (s *Base) GetVersion() int
- func (self *Base) RegisterRPC(server *rpc.Server)
- func (self *Base) Restart(opts *AppConfig) error
- func (self *Base) Start(opts *AppConfig) error
- func (self *Base) Status(opts *AppConfig) (*docker.State, error)
- func (self *Base) Stop(opts *AppConfig) error
- func (self *Base) Uninstall(opts *AppConfig) error
- func (s *Base) WriteTemplate(templateName string, outputFile string, object Options) error
- type BaseOpts
- type BaseRPC
- func (self *BaseRPC) Restart(opts *ActionOpts, success *bool) error
- func (self *BaseRPC) Start(opts *ActionOpts, success *bool) error
- func (self *BaseRPC) Status(opts *ActionOpts, state *docker.State) error
- func (self *BaseRPC) Stop(opts *ActionOpts, success *bool) error
- func (self *BaseRPC) Uninstall(opts *ActionOpts, success *bool) error
- type FakeType
- type Manifest
- type MethodOption
- type Options
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/
foo.txt
img/
a.png
b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func DefaultBindings ¶
func DumpManifest ¶
func DumpManifest(manifest *Manifest)
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type ActionOpts ¶
type Base ¶
type Base struct {
Name string `json:"name"`
Version int `json:"version"`
Manifest *Manifest
DockerClient *docker.Client
// contains filtered or unexported fields
}
func (*Base) GetManifest ¶
func (*Base) GetVersion ¶
func (*Base) RegisterRPC ¶
type BaseOpts ¶
type BaseOpts struct {
ContainerId string `json:"container_id,omitempty"`
Password string `json:"password,omitempty"`
WebPort string `json:"web_port,omitempty"`
RunAsUser string `json:"run_as_user,omitempty"`
Username string `json:"username,omitempty"`
ConfigFolder string `json:"config_folder,omitempty"`
DataFolder string `json:"data_folder,omitempty"`
MediaFolder string `json:"media_folder,omitempty"`
NoTemplates string `json:"no_templates"`
User *user.User `json:"user,omitempty"`
}
func (*BaseOpts) GetBaseOpts ¶
func (*BaseOpts) SetDefault ¶
type BaseRPC ¶
type BaseRPC struct {
// contains filtered or unexported fields
}
func NewBaseRPC ¶
func NewBaseRPC(parent appPlugin) *BaseRPC
func (*BaseRPC) Status ¶
func (self *BaseRPC) Status(opts *ActionOpts, state *docker.State) error
type Manifest ¶
type Manifest struct {
Version float32 `json:"version"`
ExposedMethods []string `json:"exposed_methods"`
MethodOptions map[string][]MethodOption `json:"method_options",yaml: "method_options,flow"`
ShowOptions []string `json:"show_options"`
Name string `json:"name"`
RpcName string `json:"rpc_name"`
WebUrlFormat string `json:"web_url_format"`
Description string `json:"description"`
}