plugin

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTypeAssertionFailed = errors.New("type assertion failed")

Functions

This section is empty.

Types

type AWS

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

func NewAWS

func NewAWS(plugin *Plugin) AWS

func (*AWS) Delete

func (a *AWS) Delete(remote string) error

func (*AWS) Invalidate

func (a *AWS) Invalidate(invalidatePath string) error

func (*AWS) List

func (a *AWS) List(path string) ([]string, error)

func (*AWS) Redirect

func (a *AWS) Redirect(path, location string) error

func (*AWS) Upload

func (a *AWS) Upload(local, remote string) error

type Job

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

type Plugin

type Plugin struct {
	*wp.Plugin
	Settings *Settings
}

Plugin implements provide the plugin implementation.

func New

func New(options wp.Options, settings *Settings) *Plugin

func (*Plugin) Execute

func (p *Plugin) Execute() error

Execute provides the implementation of the plugin.

func (*Plugin) Validate

func (p *Plugin) Validate() error

Validate handles the settings validation of the plugin.

type Result

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

type Settings

type Settings struct {
	Endpoint               string
	AccessKey              string
	SecretKey              string
	Bucket                 string
	Region                 string
	Source                 string
	Target                 string
	Delete                 bool
	ACL                    map[string]string
	CacheControl           map[string]string
	ContentType            map[string]string
	ContentEncoding        map[string]string
	Metadata               map[string]map[string]string
	Redirects              map[string]string
	CloudFrontDistribution string
	DryRun                 bool
	PathStyle              bool
	Client                 AWS
	Jobs                   []Job
	MaxConcurrency         int
}

Settings for the Plugin.

Jump to

Keyboard shortcuts

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