wordpress

package
v0.0.0-...-87e39d3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNotDir = errors.New("source is not a directory")
)
View Source
var (
	ErrorTypeNotHandled = errors.New("type is not handled")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Envs map[string]*Env `yaml:"envs,omitempty" json:",omitempty"`
}

Config represents configuration of wordpress environments.

func NewConfigFromReader

func NewConfigFromReader(r io.Reader) (*Config, error)

func (*Config) Parse

func (c *Config) Parse(kinds []Kind) error

type Env

type Env struct {
	Name     string     `yaml:"name" json:"name"`
	Packages []*Package `yaml:"packages" json:"packages"`
}

Env represents specific wordpress environment

type Kind

type Kind interface {
	New() Kind
	Name() string
	Fetch(source string) error
}

type KindLocalDirectory

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

func (*KindLocalDirectory) Fetch

func (k *KindLocalDirectory) Fetch(source string) error

func (*KindLocalDirectory) Name

func (k *KindLocalDirectory) Name() string

func (*KindLocalDirectory) New

func (k *KindLocalDirectory) New() Kind

type Package

type Package struct {
	// Type determines way of fetching the files.
	Type string `yaml:"kind" json:"kind"`
	// Source is the location of files.
	Source string `yaml:"source" json:"source"`
	// Kind determines interface used to fetch files.
	Kind Kind
}

Package represents a plugin/theme or other kind of files that needs to be installed.

Jump to

Keyboard shortcuts

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