Documentation ¶
Overview ¶
Simple Ux.Print indenting mechanism.
Index ¶
- Constants
- Variables
- func GetStructTag(ref interface{}, name string) string
- func IsValidVersionType(t string) bool
- func ToolBuildDeployWp(str interface{}, args []string) string
- type Build
- type Defaults
- type DefaultsPaths
- type DefaultsRepository
- type DeployWpGetter
- type Destination
- func (d *Destination) GetBasePath() string
- func (d *Destination) GetFiles(ftype string) *FilesArray
- func (d *Destination) GetPaths(abs ...interface{}) *Paths
- func (d *Destination) GetProviderByName(provider string) *Provider
- func (d *Destination) GetProviderBySiteId(siteId string) *Provider
- func (d *Destination) GetSelectedHost() *Host
- func (d *Destination) GetTargetByHost(host string) *Target
- func (d *Destination) GetTargetByName(ref string) *Target
- func (d *Destination) IsNil() *ux.State
- func (d *Destination) IsNotValid() bool
- func (d *Destination) IsValid() bool
- func (d *Destination) New(runtime *toolRuntime.TypeRuntime) *Destination
- func (d *Destination) Process() *ux.State
- func (d *Destination) SetDestinationHost(host *Host) *ux.State
- type Files
- func (f *Files) GetCopyFiles() *FilesArray
- func (f *Files) GetDeleteFiles() *FilesArray
- func (f *Files) GetExcludeFiles() *FilesArray
- func (f *Files) GetFiles(action string) *FilesArray
- func (f *Files) GetKeepFiles() *FilesArray
- func (f *Files) IsNil() *ux.State
- func (f *Files) IsNotValid() bool
- func (f *Files) IsValid() bool
- func (f *Files) New(runtime *toolRuntime.TypeRuntime) *Files
- func (f *Files) Process(paths Paths) *ux.State
- type FilesArray
- type Host
- type Hosts
- func (h *Hosts) Count() int
- func (h *Hosts) GetByName(host string) *Host
- func (h *Hosts) GetByProvider(provider string) *Host
- func (h *Hosts) IsNotValid() bool
- func (h *Hosts) IsValid() bool
- func (h *Hosts) New(runtime *toolRuntime.TypeRuntime) *Hosts
- func (h *Hosts) Process(runtime *toolRuntime.TypeRuntime) *ux.State
- type Meta
- type Paths
- func (p *Paths) AppendBasePath(s ...string) *ux.State
- func (p *Paths) AppendContentPath(s ...string) *ux.State
- func (p *Paths) AppendCorePath(s ...string) *ux.State
- func (p *Paths) AppendRootPath(s ...string) *ux.State
- func (p *Paths) AppendVendorPath(s ...string) *ux.State
- func (p *Paths) AppendWebRootPath(s ...string) *ux.State
- func (p *Paths) ExpandPaths() *ux.State
- func (p *Paths) GetBasePath() string
- func (p *Paths) GetContentPath(absolute bool) string
- func (p *Paths) GetCorePath(absolute bool) string
- func (p *Paths) GetRootPath(absolute bool) string
- func (p *Paths) GetVendorPath(absolute bool) string
- func (p *Paths) GetWebRootPath(absolute bool) string
- func (p *Paths) IsNil() *ux.State
- func (p *Paths) IsNotValid() bool
- func (p *Paths) IsValid() bool
- func (p *Paths) New(runtime *toolRuntime.TypeRuntime) *Paths
- func (p *Paths) SetBasePath(s ...string) *ux.State
- func (p *Paths) SetContentPath(s ...string) *ux.State
- func (p *Paths) SetCorePath(s ...string) *ux.State
- func (p *Paths) SetRootPath(s ...string) *ux.State
- func (p *Paths) SetVendorPath(s ...string) *ux.State
- func (p *Paths) SetWebRootPath(s ...string) *ux.State
- type Provider
- func (p *Provider) GetRepository() string
- func (p *Provider) GetWebroot(addPrefix ...string) string
- func (p *Provider) IsNil() *ux.State
- func (p *Provider) IsNotValid() bool
- func (p *Provider) IsValid() bool
- func (p *Provider) New(runtime *toolRuntime.TypeRuntime) *Provider
- func (p *Provider) Process(runtime *toolRuntime.TypeRuntime) *ux.State
- type Providers
- func (ps *Providers) GetByName(provider string) *Provider
- func (ps *Providers) GetBySiteId(siteId string) *Provider
- func (ps *Providers) IsNotValid() bool
- func (ps *Providers) IsValid() bool
- func (ps *Providers) New(runtime *toolRuntime.TypeRuntime) *Providers
- func (ps *Providers) Process(runtime *toolRuntime.TypeRuntime) *ux.State
- type Repository
- func (r *Repository) GetProvider() string
- func (r *Repository) GetUrl() URL
- func (r *Repository) GetUrlAsDir() string
- func (r *Repository) IsGitProvider() bool
- func (r *Repository) IsNil() *ux.State
- func (r *Repository) IsNotValid() bool
- func (r *Repository) IsValid() bool
- func (r *Repository) New(runtime *toolRuntime.TypeRuntime) *Repository
- type Revision
- type Source
- func (s *Source) GetBuild() bool
- func (s *Source) GetPaths(abs ...interface{}) *Paths
- func (s *Source) GetRepository() *Repository
- func (s *Source) GetRepositoryProvider() string
- func (s *Source) GetRepositoryUrl() URL
- func (s *Source) GetRevision() *Revision
- func (s *Source) GetRevisionName() string
- func (s *Source) GetRevisionType() string
- func (s *Source) IsNil() *ux.State
- func (s *Source) IsNotValid() bool
- func (s *Source) IsValid() bool
- func (s *Source) New(runtime *toolRuntime.TypeRuntime) *Source
- func (s *Source) PrintRepo() string
- func (s *Source) Process() *ux.State
- func (s *Source) SetBasePath(path ...string) *ux.State
- type State
- type String
- type Target
- type Targets
- func (tr *Targets) GetByHost(host string) *Target
- func (tr *Targets) GetByRefName(ref string) *Target
- func (tr *Targets) IsNotValid() bool
- func (tr *Targets) IsValid() bool
- func (tr *Targets) New(runtime *toolRuntime.TypeRuntime) *Targets
- func (tr *Targets) Process(runtime *toolRuntime.TypeRuntime) *ux.State
- type ToolDeployWp
- type TypeDeployWp
- func (dwp *TypeDeployWp) Build() *ux.State
- func (dwp *TypeDeployWp) CheckoutRepo(gitRef *toolGit.TypeGit, versionType string, version string) *ux.State
- func (dwp *TypeDeployWp) CleanRepo(gitRef *toolGit.TypeGit, force bool) *ux.State
- func (dwp *TypeDeployWp) CloneRepo(url string, pathRef *toolPath.TypeOsPath) *toolGit.TypeGit
- func (dwp *TypeDeployWp) CopyFile(src string, dst string) *ux.State
- func (dwp *TypeDeployWp) CopyFiles(src string, dst string, exclude ...string) *ux.State
- func (dwp *TypeDeployWp) ExitOnError() string
- func (dwp *TypeDeployWp) ExitOnWarning() string
- func (dwp *TypeDeployWp) GetDestination() *Destination
- func (dwp *TypeDeployWp) GetDestinationAbsPaths() *Paths
- func (dwp *TypeDeployWp) GetDestinationFiles(ftype string) *FilesArray
- func (dwp *TypeDeployWp) GetDestinationPaths() *Paths
- func (dwp *TypeDeployWp) GetDestinationProvider(provider string) *Provider
- func (dwp *TypeDeployWp) GetDestinationRevision(host string) *Target
- func (dwp *TypeDeployWp) GetHost() string
- func (dwp *TypeDeployWp) GetHostByName(host string) *Host
- func (dwp *TypeDeployWp) GetHostByProvider(provider string) *Host
- func (dwp *TypeDeployWp) GetHosts() *Hosts
- func (dwp *TypeDeployWp) GetSource() *Source
- func (dwp *TypeDeployWp) GetSourceAbsPaths() *Paths
- func (dwp *TypeDeployWp) GetSourceBuild() bool
- func (dwp *TypeDeployWp) GetSourcePaths() *Paths
- func (dwp *TypeDeployWp) GetSourceRepositoryProvider() string
- func (dwp *TypeDeployWp) GetSourceRepositoryUrl() URL
- func (dwp *TypeDeployWp) GetSourceRevisionName() string
- func (dwp *TypeDeployWp) GetSourceRevisionType() string
- func (dwp *TypeDeployWp) IsNil() *ux.State
- func (dwp *TypeDeployWp) IsNotValid() bool
- func (dwp *TypeDeployWp) IsValid() bool
- func (dwp *TypeDeployWp) New(runtime *toolRuntime.TypeRuntime) *TypeDeployWp
- func (dwp *TypeDeployWp) OpenDestinationRepo() *toolGit.TypeGit
- func (dwp *TypeDeployWp) OpenRepo(url string, pathRef *toolPath.TypeOsPath) *toolGit.TypeGit
- func (dwp *TypeDeployWp) OpenSourceRepo() *toolGit.TypeGit
- func (dwp *TypeDeployWp) PrintDestinationPaths() *ux.State
- func (dwp *TypeDeployWp) PrintRepo(gitRef *toolGit.TypeGit) *ux.State
- func (dwp *TypeDeployWp) PrintSourcePaths() *ux.State
- func (dwp *TypeDeployWp) Reflect() *ToolDeployWp
- func (dwp *TypeDeployWp) RunComposer(dstDir string, args ...string) *ux.State
- func (dwp *TypeDeployWp) SelectDestinationHost() *ux.State
- func (dwp *TypeDeployWp) TestNewUxState() *ux.State
- func (dwp *TypeDeployWp) UpdateDestination(srcPath *Paths, dstPath *Paths) *ux.State
- type URL
- type UxPrint
- func (up *UxPrint) Append(format string, args ...interface{})
- func (up *UxPrint) Error(indent int, format string, args ...interface{})
- func (up *UxPrint) Intent(format string, args ...interface{})
- func (up *UxPrint) IntentAppend(format string, args ...interface{})
- func (up *UxPrint) IntentResponse(state *ux.State)
- func (up *UxPrint) Notify(indent int, format string, args ...interface{})
- func (up *UxPrint) Ok(indent int, format string, args ...interface{})
- func (up *UxPrint) PrintResponse(state *ux.State)
- func (up *UxPrint) Warning(indent int, format string, args ...interface{})
- type Wordpress
Constants ¶
const ( DestinationActionCopy = "copy" DestinationActionDelete = "delete" DestinationActionExclude = "exclude" DestinationActionKeep = "keep" )
const DefaultDestinationBasePath = "/tmp/deploywp"
const ToolPrefix = "Tool"
Variables ¶
var Consts = map[string]reflect.Value{ "DefaultDestinationBasePath": reflect.ValueOf(DefaultDestinationBasePath), "DestinationActionCopy": reflect.ValueOf(DestinationActionCopy), "DestinationActionDelete": reflect.ValueOf(DestinationActionDelete), "DestinationActionExclude": reflect.ValueOf(DestinationActionExclude), "DestinationActionKeep": reflect.ValueOf(DestinationActionKeep), "ToolPrefix": reflect.ValueOf(ToolPrefix), }
var Functions = map[string]reflect.Value{ "GetStructTag": reflect.ValueOf(GetStructTag), "IsValidVersionType": reflect.ValueOf(IsValidVersionType), "ReflectDeployWp": reflect.ValueOf(ReflectDeployWp), "ToolBuildDeployWp": reflect.ValueOf(ToolBuildDeployWp), "ToolLoadDeployWp": reflect.ValueOf(ToolLoadDeployWp), }
var GetTools template.FuncMap
var Types = map[string]reflect.Type{ "Build": reflect.TypeOf((*Build)(nil)).Elem(), "Defaults": reflect.TypeOf((*Defaults)(nil)).Elem(), "DefaultsPaths": reflect.TypeOf((*DefaultsPaths)(nil)).Elem(), "DefaultsRepository": reflect.TypeOf((*DefaultsRepository)(nil)).Elem(), "DeployWpGetter": reflect.TypeOf((*DeployWpGetter)(nil)).Elem(), "Destination": reflect.TypeOf((*Destination)(nil)).Elem(), "Files": reflect.TypeOf((*Files)(nil)).Elem(), "FilesArray": reflect.TypeOf((*FilesArray)(nil)).Elem(), "Host": reflect.TypeOf((*Host)(nil)).Elem(), "Hosts": reflect.TypeOf((*Hosts)(nil)).Elem(), "Meta": reflect.TypeOf((*Meta)(nil)).Elem(), "Paths": reflect.TypeOf((*Paths)(nil)).Elem(), "Provider": reflect.TypeOf((*Provider)(nil)).Elem(), "Providers": reflect.TypeOf((*Providers)(nil)).Elem(), "Repository": reflect.TypeOf((*Repository)(nil)).Elem(), "Revision": reflect.TypeOf((*Revision)(nil)).Elem(), "Source": reflect.TypeOf((*Source)(nil)).Elem(), "State": reflect.TypeOf((*State)(nil)).Elem(), "String": reflect.TypeOf((*String)(nil)).Elem(), "Target": reflect.TypeOf((*Target)(nil)).Elem(), "Targets": reflect.TypeOf((*Targets)(nil)).Elem(), "ToolDeployWp": reflect.TypeOf((*ToolDeployWp)(nil)).Elem(), "TypeDeployWp": reflect.TypeOf((*TypeDeployWp)(nil)).Elem(), "URL": reflect.TypeOf((*URL)(nil)).Elem(), "UxPrint": reflect.TypeOf((*UxPrint)(nil)).Elem(), "Wordpress": reflect.TypeOf((*Wordpress)(nil)).Elem(), }
Functions ¶
func GetStructTag ¶ added in v1.0.2
func IsValidVersionType ¶
func ToolBuildDeployWp ¶ added in v1.0.2
Types ¶
type Build ¶
func (*Build) IsNotValid ¶ added in v1.0.2
func (*Build) New ¶
func (b *Build) New(runtime *toolRuntime.TypeRuntime) *Build
type Defaults ¶
type Defaults struct { Paths DefaultsPaths `json:"paths"` Repository DefaultsRepository `json:"repository"` Valid bool // contains filtered or unexported fields }
func (*Defaults) IsNotValid ¶ added in v1.0.2
func (*Defaults) New ¶
func (d *Defaults) New(runtime *toolRuntime.TypeRuntime) *Defaults
type DefaultsPaths ¶
type DefaultsPaths struct {
WebrootDir string `json:"webroot_dir" mapstructure:"webroot_dir"`
}
func (*DefaultsPaths) IsNotValid ¶ added in v1.0.2
func (d *DefaultsPaths) IsNotValid() bool
func (*DefaultsPaths) IsValid ¶ added in v1.0.2
func (d *DefaultsPaths) IsValid() bool
type DefaultsRepository ¶
type DefaultsRepository struct {
URL string `json:"url"`
}
func (*DefaultsRepository) IsNotValid ¶ added in v1.0.2
func (d *DefaultsRepository) IsNotValid() bool
func (*DefaultsRepository) IsValid ¶ added in v1.0.2
func (d *DefaultsRepository) IsValid() bool
type DeployWpGetter ¶
type DeployWpGetter interface { }
type Destination ¶ added in v1.0.2
type Destination struct { Files Files `json:"files"` Paths Paths `json:"paths"` Providers Providers `json:"providers"` // mapstructure:",squash"` Targets Targets `json:"targets"` // mapstructure:",squash"` AbsPaths Paths AbsFiles Files Valid bool // contains filtered or unexported fields }
func (*Destination) GetBasePath ¶ added in v1.0.2
func (d *Destination) GetBasePath() string
func (*Destination) GetFiles ¶ added in v1.0.2
func (d *Destination) GetFiles(ftype string) *FilesArray
//////////////////////////////////////////////////////////////////////////////// Files
func (*Destination) GetPaths ¶ added in v1.0.2
func (d *Destination) GetPaths(abs ...interface{}) *Paths
//////////////////////////////////////////////////////////////////////////////// Paths
func (*Destination) GetProviderByName ¶ added in v1.0.2
func (d *Destination) GetProviderByName(provider string) *Provider
//////////////////////////////////////////////////////////////////////////////// Providers
func (*Destination) GetProviderBySiteId ¶ added in v1.0.2
func (d *Destination) GetProviderBySiteId(siteId string) *Provider
func (*Destination) GetSelectedHost ¶ added in v1.0.2
func (d *Destination) GetSelectedHost() *Host
func (*Destination) GetTargetByHost ¶ added in v1.0.2
func (d *Destination) GetTargetByHost(host string) *Target
//////////////////////////////////////////////////////////////////////////////// Revisions
func (*Destination) GetTargetByName ¶ added in v1.0.2
func (d *Destination) GetTargetByName(ref string) *Target
func (*Destination) IsNil ¶ added in v1.0.2
func (d *Destination) IsNil() *ux.State
func (*Destination) IsNotValid ¶ added in v1.0.2
func (d *Destination) IsNotValid() bool
func (*Destination) IsValid ¶ added in v1.0.2
func (d *Destination) IsValid() bool
func (*Destination) New ¶ added in v1.0.2
func (d *Destination) New(runtime *toolRuntime.TypeRuntime) *Destination
func (*Destination) Process ¶ added in v1.0.2
func (d *Destination) Process() *ux.State
func (*Destination) SetDestinationHost ¶ added in v1.0.2
func (d *Destination) SetDestinationHost(host *Host) *ux.State
type Files ¶
type Files struct { Copy FilesArray `json:"copy"` // mapstructure:",squash"` Delete FilesArray `json:"delete"` // mapstructure:",squash"` Exclude FilesArray `json:"exclude"` // mapstructure:",squash"` Keep FilesArray `json:"keep"` // mapstructure:",squash"` Valid bool // contains filtered or unexported fields }
func (*Files) GetCopyFiles ¶
func (f *Files) GetCopyFiles() *FilesArray
func (*Files) GetDeleteFiles ¶
func (f *Files) GetDeleteFiles() *FilesArray
func (*Files) GetExcludeFiles ¶
func (f *Files) GetExcludeFiles() *FilesArray
func (*Files) GetFiles ¶
func (f *Files) GetFiles(action string) *FilesArray
func (*Files) GetKeepFiles ¶
func (f *Files) GetKeepFiles() *FilesArray
func (*Files) IsNotValid ¶ added in v1.0.2
func (*Files) New ¶
func (f *Files) New(runtime *toolRuntime.TypeRuntime) *Files
type FilesArray ¶
type FilesArray []string
type FilesArray struct{ Array []string `json:"array"` Valid bool runtime *toolRuntime.TypeRuntime state *ux.State }
func (*FilesArray) Append ¶ added in v1.0.2
func (fa *FilesArray) Append(add *FilesArray)
func (*FilesArray) IsNotValid ¶ added in v1.0.2
func (fa *FilesArray) IsNotValid() bool
func (*FilesArray) IsValid ¶ added in v1.0.2
func (fa *FilesArray) IsValid() bool
func (*FilesArray) New ¶
func (fa *FilesArray) New(runtime *toolRuntime.TypeRuntime) *FilesArray
func (*FilesArray) Process ¶
func (fa *FilesArray) Process(runtime *toolRuntime.TypeRuntime) *ux.State
type Host ¶
type Host struct { HostName string `json:"host_name" mapstructure:"host_name"` Label string `json:"label"` Provider string `json:"provider"` Valid bool // contains filtered or unexported fields }
func (*Host) IsNotValid ¶ added in v1.0.2
func (*Host) New ¶
func (h *Host) New(runtime *toolRuntime.TypeRuntime) *Host
type Hosts ¶
type Hosts []Host
func (*Hosts) GetByProvider ¶
func (*Hosts) IsNotValid ¶ added in v1.0.2
func (*Hosts) New ¶
func (h *Hosts) New(runtime *toolRuntime.TypeRuntime) *Hosts
func (*Hosts) Process ¶
func (h *Hosts) Process(runtime *toolRuntime.TypeRuntime) *ux.State
type Meta ¶
type Meta struct { SiteID string `json:"site_id" mapstructure:"site_id"` SiteName string `json:"site_name" mapstructure:"site_name"` Valid bool // contains filtered or unexported fields }
func (*Meta) IsNotValid ¶ added in v1.0.2
func (*Meta) New ¶
func (m *Meta) New(runtime *toolRuntime.TypeRuntime) *Meta
func (*Meta) Process ¶
func (m *Meta) Process(runtime *toolRuntime.TypeRuntime) *ux.State
type Paths ¶
type Paths struct { BasePath string `json:"base_path" mapstructure:"base_path"` WebrootPath string `json:"webroot_path" mapstructure:"webroot_path"` Wordpress Wordpress `json:"wordpress"` Valid bool // contains filtered or unexported fields }
func (*Paths) AppendBasePath ¶ added in v1.0.2
func (*Paths) AppendContentPath ¶ added in v1.0.2
func (*Paths) AppendCorePath ¶ added in v1.0.2
func (*Paths) AppendRootPath ¶ added in v1.0.2
func (*Paths) AppendVendorPath ¶ added in v1.0.2
func (*Paths) AppendWebRootPath ¶ added in v1.0.2
func (*Paths) ExpandPaths ¶
func (*Paths) GetBasePath ¶
func (*Paths) GetContentPath ¶
func (*Paths) GetCorePath ¶
func (*Paths) GetRootPath ¶
func (*Paths) GetVendorPath ¶
func (*Paths) GetWebRootPath ¶
func (*Paths) IsNotValid ¶ added in v1.0.2
func (*Paths) New ¶
func (p *Paths) New(runtime *toolRuntime.TypeRuntime) *Paths
func (*Paths) SetContentPath ¶ added in v1.0.2
type Provider ¶
type Provider struct { Name string `json:"name"` Meta Meta `json:"meta"` Defaults Defaults `json:"defaults"` Valid bool // contains filtered or unexported fields }
func (*Provider) GetRepository ¶
func (*Provider) GetWebroot ¶
func (*Provider) IsNotValid ¶ added in v1.0.2
func (*Provider) New ¶
func (p *Provider) New(runtime *toolRuntime.TypeRuntime) *Provider
func (*Provider) Process ¶
func (p *Provider) Process(runtime *toolRuntime.TypeRuntime) *ux.State
type Providers ¶
type Providers []Provider
type Providers struct{ providersArray Valid bool runtime *toolRuntime.TypeRuntime state *ux.State }
type providersArray []Provider
func (*Providers) GetBySiteId ¶
func (*Providers) IsNotValid ¶ added in v1.0.2
func (*Providers) New ¶
func (ps *Providers) New(runtime *toolRuntime.TypeRuntime) *Providers
func (*Providers) Process ¶
func (ps *Providers) Process(runtime *toolRuntime.TypeRuntime) *ux.State
type Repository ¶
type Repository struct { Provider string `json:"provider"` URL URL `json:"url"` Valid bool // contains filtered or unexported fields }
func (*Repository) GetProvider ¶
func (r *Repository) GetProvider() string
func (*Repository) GetUrl ¶
func (r *Repository) GetUrl() URL
func (*Repository) GetUrlAsDir ¶ added in v1.0.2
func (r *Repository) GetUrlAsDir() string
func (*Repository) IsGitProvider ¶
func (r *Repository) IsGitProvider() bool
func (*Repository) IsNil ¶
func (r *Repository) IsNil() *ux.State
func (*Repository) IsNotValid ¶ added in v1.0.2
func (r *Repository) IsNotValid() bool
func (*Repository) IsValid ¶ added in v1.0.2
func (r *Repository) IsValid() bool
func (*Repository) New ¶
func (r *Repository) New(runtime *toolRuntime.TypeRuntime) *Repository
type Revision ¶
type Revision struct { RefName string `json:"ref_name" mapstructure:"ref_name"` RefType string `json:"ref_type" mapstructure:"ref_type"` Valid bool // contains filtered or unexported fields }
func (*Revision) IsNotValid ¶ added in v1.0.2
func (*Revision) New ¶
func (r *Revision) New(runtime *toolRuntime.TypeRuntime) *Revision
type Source ¶
type Source struct { Build Build `json:"build"` Paths Paths `json:"paths"` Repository Repository `json:"repository"` Revision Revision `json:"revision"` AbsPaths Paths Valid bool // contains filtered or unexported fields }
func (*Source) GetBuild ¶
//////////////////////////////////////////////////////////////////////////////// Build
func (*Source) GetPaths ¶
//////////////////////////////////////////////////////////////////////////////// Paths
func (*Source) GetRepository ¶
func (s *Source) GetRepository() *Repository
//////////////////////////////////////////////////////////////////////////////// Repository
func (*Source) GetRepositoryProvider ¶
func (*Source) GetRepositoryUrl ¶
func (*Source) GetRevision ¶
//////////////////////////////////////////////////////////////////////////////// Revision
func (*Source) GetRevisionName ¶
func (*Source) GetRevisionType ¶
func (*Source) IsNotValid ¶ added in v1.0.2
func (*Source) New ¶
func (s *Source) New(runtime *toolRuntime.TypeRuntime) *Source
type Target ¶
type Target struct { AutoDeploy bool `json:"auto_deploy" mapstructure:"auto_deploy"` HostName string `json:"host_name" mapstructure:"host_name"` RefName string `json:"ref_name" mapstructure:"ref_name"` Valid bool // contains filtered or unexported fields }
func (*Target) IsNotValid ¶ added in v1.0.2
func (*Target) New ¶
func (tr *Target) New(runtime *toolRuntime.TypeRuntime) *Target
type Targets ¶ added in v1.0.2
type Targets []Target
type Targets struct{ revisionsArray Valid bool runtime *toolRuntime.TypeRuntime state *ux.State }
type revisionsArray []Target
func (*Targets) GetByRefName ¶ added in v1.0.2
func (*Targets) IsNotValid ¶ added in v1.0.2
func (*Targets) New ¶ added in v1.0.2
func (tr *Targets) New(runtime *toolRuntime.TypeRuntime) *Targets
func (*Targets) Process ¶ added in v1.0.2
func (tr *Targets) Process(runtime *toolRuntime.TypeRuntime) *ux.State
type ToolDeployWp ¶ added in v1.0.2
type ToolDeployWp TypeDeployWp
func (*ToolDeployWp) IsNil ¶ added in v1.0.2
func (dwp *ToolDeployWp) IsNil() *ux.State
func (*ToolDeployWp) Reflect ¶ added in v1.0.2
func (dwp *ToolDeployWp) Reflect() *TypeDeployWp
type TypeDeployWp ¶
type TypeDeployWp struct { Hosts Hosts `json:"hosts"` // mapstructure:",squash"` Source Source `json:"source"` Destination Destination `json:"destination"` Print UxPrint Valid bool Runtime *toolRuntime.TypeRuntime State *ux.State }
func ReflectDeployWp ¶
func ReflectDeployWp(ref interface{}) *TypeDeployWp
func ToolLoadDeployWp ¶ added in v1.0.2
func ToolLoadDeployWp(str interface{}, args []string) *TypeDeployWp
func (*TypeDeployWp) Build ¶ added in v1.0.2
func (dwp *TypeDeployWp) Build() *ux.State
This is an alternative to running templates. In theory, the code here, should be able to be replicated in a template file without modification.
func (*TypeDeployWp) CheckoutRepo ¶
func (*TypeDeployWp) CloneRepo ¶ added in v1.0.2
func (dwp *TypeDeployWp) CloneRepo(url string, pathRef *toolPath.TypeOsPath) *toolGit.TypeGit
func (*TypeDeployWp) ExitOnError ¶
func (dwp *TypeDeployWp) ExitOnError() string
func (*TypeDeployWp) ExitOnWarning ¶
func (dwp *TypeDeployWp) ExitOnWarning() string
func (*TypeDeployWp) GetDestination ¶ added in v1.0.2
func (dwp *TypeDeployWp) GetDestination() *Destination
//////////////////////////////////////////////////////////////////////////////// Destination
func (*TypeDeployWp) GetDestinationAbsPaths ¶ added in v1.0.2
func (dwp *TypeDeployWp) GetDestinationAbsPaths() *Paths
func (*TypeDeployWp) GetDestinationFiles ¶ added in v1.0.2
func (dwp *TypeDeployWp) GetDestinationFiles(ftype string) *FilesArray
//////////////////////////////////////////////////////////////////////////////// Destination.Files
func (*TypeDeployWp) GetDestinationPaths ¶ added in v1.0.2
func (dwp *TypeDeployWp) GetDestinationPaths() *Paths
//////////////////////////////////////////////////////////////////////////////// Destination.Paths
func (*TypeDeployWp) GetDestinationProvider ¶ added in v1.0.2
func (dwp *TypeDeployWp) GetDestinationProvider(provider string) *Provider
//////////////////////////////////////////////////////////////////////////////// Destination.Providers
func (*TypeDeployWp) GetDestinationRevision ¶ added in v1.0.2
func (dwp *TypeDeployWp) GetDestinationRevision(host string) *Target
//////////////////////////////////////////////////////////////////////////////// Destination.Revisions
func (*TypeDeployWp) GetHost ¶ added in v1.0.2
func (dwp *TypeDeployWp) GetHost() string
func (*TypeDeployWp) GetHostByName ¶
func (dwp *TypeDeployWp) GetHostByName(host string) *Host
func (*TypeDeployWp) GetHostByProvider ¶
func (dwp *TypeDeployWp) GetHostByProvider(provider string) *Host
func (*TypeDeployWp) GetHosts ¶
func (dwp *TypeDeployWp) GetHosts() *Hosts
//////////////////////////////////////////////////////////////////////////////// Hosts
func (*TypeDeployWp) GetSource ¶
func (dwp *TypeDeployWp) GetSource() *Source
//////////////////////////////////////////////////////////////////////////////// Source
func (*TypeDeployWp) GetSourceAbsPaths ¶
func (dwp *TypeDeployWp) GetSourceAbsPaths() *Paths
func (*TypeDeployWp) GetSourceBuild ¶
func (dwp *TypeDeployWp) GetSourceBuild() bool
//////////////////////////////////////////////////////////////////////////////// Source.Build
func (*TypeDeployWp) GetSourcePaths ¶
func (dwp *TypeDeployWp) GetSourcePaths() *Paths
//////////////////////////////////////////////////////////////////////////////// Source.Paths
func (*TypeDeployWp) GetSourceRepositoryProvider ¶
func (dwp *TypeDeployWp) GetSourceRepositoryProvider() string
//////////////////////////////////////////////////////////////////////////////// Source.Repository
func (*TypeDeployWp) GetSourceRepositoryUrl ¶
func (dwp *TypeDeployWp) GetSourceRepositoryUrl() URL
func (*TypeDeployWp) GetSourceRevisionName ¶
func (dwp *TypeDeployWp) GetSourceRevisionName() string
func (*TypeDeployWp) GetSourceRevisionType ¶
func (dwp *TypeDeployWp) GetSourceRevisionType() string
//////////////////////////////////////////////////////////////////////////////// Source.Revision
func (*TypeDeployWp) IsNil ¶
func (dwp *TypeDeployWp) IsNil() *ux.State
func (*TypeDeployWp) IsNotValid ¶ added in v1.0.2
func (dwp *TypeDeployWp) IsNotValid() bool
func (*TypeDeployWp) IsValid ¶ added in v1.0.2
func (dwp *TypeDeployWp) IsValid() bool
func (*TypeDeployWp) New ¶
func (dwp *TypeDeployWp) New(runtime *toolRuntime.TypeRuntime) *TypeDeployWp
func (*TypeDeployWp) OpenDestinationRepo ¶ added in v1.0.2
func (dwp *TypeDeployWp) OpenDestinationRepo() *toolGit.TypeGit
func (*TypeDeployWp) OpenRepo ¶
func (dwp *TypeDeployWp) OpenRepo(url string, pathRef *toolPath.TypeOsPath) *toolGit.TypeGit
Part 2 - see docs.go Part 4 - see docs.go
func (*TypeDeployWp) OpenSourceRepo ¶
func (dwp *TypeDeployWp) OpenSourceRepo() *toolGit.TypeGit
func (*TypeDeployWp) PrintDestinationPaths ¶ added in v1.0.2
func (dwp *TypeDeployWp) PrintDestinationPaths() *ux.State
func (*TypeDeployWp) PrintRepo ¶ added in v1.0.2
func (dwp *TypeDeployWp) PrintRepo(gitRef *toolGit.TypeGit) *ux.State
func (*TypeDeployWp) PrintSourcePaths ¶ added in v1.0.2
func (dwp *TypeDeployWp) PrintSourcePaths() *ux.State
func (*TypeDeployWp) Reflect ¶
func (dwp *TypeDeployWp) Reflect() *ToolDeployWp
func (*TypeDeployWp) RunComposer ¶
func (dwp *TypeDeployWp) RunComposer(dstDir string, args ...string) *ux.State
7. Run composer, (within /tmp/deploywp/destination/).
Fixup composer.json
.extra.wordpress-webroot-path = {{ .destination.paths.wordpress.root_path }}
.extra.wordpress-core-path = {{ .destination.paths.wordpress.core_path }}
.extra.wordpress-content-path = {{ .destination.paths.wordpress.content_path }}
.config.vendor-dir = {{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.vendor_path }}
.extra.installer-paths.*
ReplacePrefix -> destination references
{{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.core_path }}/
{{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.content_path }}/
{{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.vendor_path }}/
{{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.root_path }}/
Check Mike's BASH script.
composer install
find /tmp/deploywp/destination/ -name composer.json -delete
func (*TypeDeployWp) SelectDestinationHost ¶ added in v1.0.2
func (dwp *TypeDeployWp) SelectDestinationHost() *ux.State
func (*TypeDeployWp) TestNewUxState ¶ added in v1.0.2
func (dwp *TypeDeployWp) TestNewUxState() *ux.State
func (*TypeDeployWp) UpdateDestination ¶ added in v1.0.2
func (dwp *TypeDeployWp) UpdateDestination(srcPath *Paths, dstPath *Paths) *ux.State
type UxPrint ¶ added in v1.0.2
type UxPrint struct {
// contains filtered or unexported fields
}
func (*UxPrint) IntentAppend ¶ added in v1.0.2
func (*UxPrint) IntentResponse ¶ added in v1.0.2
func (*UxPrint) PrintResponse ¶ added in v1.0.2
type Wordpress ¶
type Wordpress struct { ContentPath string `json:"content_path" mapstructure:"content_path"` CorePath string `json:"core_path" mapstructure:"core_path"` RootPath string `json:"root_path" mapstructure:"root_path"` VendorPath string `json:"vendor_path" mapstructure:"vendor_path"` Valid bool // contains filtered or unexported fields }
func (*Wordpress) IsNotValid ¶ added in v1.0.2
func (*Wordpress) New ¶
func (wp *Wordpress) New(runtime *toolRuntime.TypeRuntime) *Wordpress
Source Files ¶
- deploywp.go
- destination.go
- destination_files.go
- destination_provider.go
- destination_provider_defaults.go
- destination_provider_meta.go
- destination_providers.go
- destination_target.go
- destination_targets.go
- docs.go
- funcs.go
- host.go
- hosts.go
- init.go
- parser.go
- paths.go
- pkgreflect.go
- source.go
- source_build.go
- source_repository.go
- source_revision.go
- struct.go
- tools.go
- tools_highlevel.go
- tools_lowlevel.go
- tools_workflow.go
- utils.go
- uxPrint.go