Documentation ¶
Index ¶
- func SetupLocalPlugins(plugins map[string]LocalDescriptor) error
- func SetupRemotePlugins(client *Client, plugins map[string]Descriptor) error
- type Builder
- type Client
- func (c *Client) Check(ctx context.Context, pName, pVersion, hash string) error
- func (c *Client) CleanArchives(plugins map[string]Descriptor) error
- func (c *Client) Download(ctx context.Context, pName, pVersion string) (string, error)
- func (c *Client) GoPath() string
- func (c *Client) ReadManifest(moduleName string) (*Manifest, error)
- func (c *Client) ResetAll() error
- func (c *Client) Unzip(pName, pVersion string) error
- func (c *Client) WriteState(plugins map[string]Descriptor) error
- type ClientOptions
- type Constructor
- type Descriptor
- type LocalDescriptor
- type Manifest
- type Middleware
- type PP
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupLocalPlugins ¶ added in v2.5.0
func SetupLocalPlugins(plugins map[string]LocalDescriptor) error
SetupLocalPlugins setup local plugins environment.
func SetupRemotePlugins ¶ added in v2.5.0
func SetupRemotePlugins(client *Client, plugins map[string]Descriptor) error
SetupRemotePlugins setup remote plugins environment.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a plugin builder.
func NewBuilder ¶
func NewBuilder(client *Client, plugins map[string]Descriptor, localPlugins map[string]LocalDescriptor) (*Builder, error)
NewBuilder creates a new Builder.
type Client ¶
Client a Traefik plugins client.
func NewClient ¶
func NewClient(opts ClientOptions) (*Client, error)
NewClient creates a new Traefik plugins client.
func (*Client) CleanArchives ¶
func (c *Client) CleanArchives(plugins map[string]Descriptor) error
CleanArchives cleans plugins archives.
func (*Client) ReadManifest ¶
ReadManifest reads a plugin manifest.
func (*Client) WriteState ¶
func (c *Client) WriteState(plugins map[string]Descriptor) error
WriteState writes the plugins state files.
type ClientOptions ¶
type ClientOptions struct {
Output string
}
ClientOptions the options of a Traefik plugins client.
type Constructor ¶
Constructor creates a plugin handler.
type Descriptor ¶
type Descriptor struct { // ModuleName (required) ModuleName string `` /* 133-byte string literal not displayed */ // Version (required) Version string `description:"plugin's version." json:"version,omitempty" toml:"version,omitempty" yaml:"version,omitempty" export:"true"` }
Descriptor The static part of a plugin configuration.
type LocalDescriptor ¶ added in v2.5.0
type LocalDescriptor struct { // ModuleName (required) ModuleName string `` /* 133-byte string literal not displayed */ }
LocalDescriptor The static part of a local plugin configuration.
type Manifest ¶
type Manifest struct { DisplayName string `yaml:"displayName"` Type string `yaml:"type"` Import string `yaml:"import"` BasePkg string `yaml:"basePkg"` Compatibility string `yaml:"compatibility"` Summary string `yaml:"summary"` TestData map[string]interface{} `yaml:"testData"` }
Manifest The plugin manifest.
func ReadManifest ¶
ReadManifest reads a plugin manifest.
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware is an HTTP handler plugin wrapper.
func (*Middleware) NewHandler ¶
NewHandler creates a new HTTP handler.