Documentation
¶
Index ¶
- func CreateIdentifier(elem ...string) string
- func CreateProjectIdentifier(filename string) string
- func HashSiteComponent(sc *SiteComponent) (string, error)
- func SortSiteComponentNodes(nodes []*SiteComponent)
- type EdgeMock
- type Graph
- type Node
- type NodeMock
- func (n *NodeMock) Ancestor() Node
- func (n *NodeMock) GetOldHash() string
- func (n *NodeMock) HasChanges() (bool, error)
- func (n *NodeMock) Hash() (string, error)
- func (n *NodeMock) Identifier() string
- func (n *NodeMock) Independent() bool
- func (n *NodeMock) Parents() ([]Node, error)
- func (n *NodeMock) Path() string
- func (n *NodeMock) SetOldHash(hash string)
- func (n *NodeMock) SetTainted(tainted bool)
- func (n *NodeMock) Tainted() bool
- func (n *NodeMock) Type() Type
- type Path
- type Project
- func (n *Project) Ancestor() Node
- func (n *Project) GetOldHash() string
- func (p *Project) Hash() (string, error)
- func (n *Project) Identifier() string
- func (n *Project) Independent() bool
- func (n *Project) Parents() ([]Node, error)
- func (n *Project) Path() string
- func (n *Project) SetOldHash(hash string)
- func (n *Project) SetTainted(tainted bool)
- func (n *Project) Tainted() bool
- func (n *Project) Type() Type
- type Site
- func (n *Site) Ancestor() Node
- func (n *Site) GetOldHash() string
- func (s *Site) Hash() (string, error)
- func (n *Site) Identifier() string
- func (n *Site) Independent() bool
- func (n *Site) Parents() ([]Node, error)
- func (n *Site) Path() string
- func (n *Site) SetOldHash(hash string)
- func (n *Site) SetTainted(tainted bool)
- func (n *Site) Tainted() bool
- func (n *Site) Type() Type
- type SiteComponent
- func (n *SiteComponent) Ancestor() Node
- func (n *SiteComponent) GetOldHash() string
- func (sc *SiteComponent) Hash() (string, error)
- func (n *SiteComponent) Identifier() string
- func (n *SiteComponent) Independent() bool
- func (n *SiteComponent) Parents() ([]Node, error)
- func (n *SiteComponent) Path() string
- func (n *SiteComponent) SetOldHash(hash string)
- func (n *SiteComponent) SetTainted(tainted bool)
- func (n *SiteComponent) Tainted() bool
- func (n *SiteComponent) Type() Type
- type Type
- type ValidationError
- type Vertices
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIdentifier ¶
func CreateProjectIdentifier ¶
func HashSiteComponent ¶
func HashSiteComponent(sc *SiteComponent) (string, error)
func SortSiteComponentNodes ¶
func SortSiteComponentNodes(nodes []*SiteComponent)
Types ¶
type Graph ¶
func CreateGraphMock ¶
func ToDependencyGraph ¶
func ToDependencyGraph(cfg *config.MachConfig, outPath string) (*Graph, error)
ToDependencyGraph will transform a MachConfig into a graph of dependencies connected by different relations
func ToDeploymentGraph ¶
func ToDeploymentGraph(cfg *config.MachConfig, outPath string) (*Graph, error)
ToDeploymentGraph converts a MachConfig to a Graph ready for deployment. This means that all nodes that are not independently deployable are pruned from the graph.
type Node ¶
type Node interface { //Path returns the directory path of the node, relative to the global output directory Path() string //Identifier returns the identifier of the node as set in the configurations Identifier() string //Type returns the type of the node Type() Type //Ancestor returns the ancestor of the node. The ancestor is specific to the type of the node. For example, //a site will have the project as ancestor, a site component will have the site as ancestor, //and project will have no ancestor Ancestor() Node //Parents returns the direct parents of the node Parents() ([]Node, error) //Independent returns true if the node can be deployed independently, false otherwise Independent() bool //Tainted indicates if. Tainted() bool //Hash returns the hash of the node. The hash is based on the node's configuration as well as the configuration of any //related components. This can be compared to other hashes to determine whether a node has changed Hash() (string, error) //SetTainted sets the tainted status of the node SetTainted(tainted bool) //SetOldHash sets the old hash of the node. This is used to determine if the node has changed SetOldHash(hash string) //GetOldHash returns the old hash of the node GetOldHash() string // contains filtered or unexported methods }
type NodeMock ¶
func (*NodeMock) GetOldHash ¶
func (*NodeMock) HasChanges ¶
func (*NodeMock) Identifier ¶
func (*NodeMock) Independent ¶
func (*NodeMock) SetOldHash ¶
func (*NodeMock) SetTainted ¶
type Project ¶
type Project struct { ProjectConfig config.MachConfig // contains filtered or unexported fields }
func NewProject ¶
func NewProject(g graph.Graph[string, Node], path, identifier string, deploymentType config.DeploymentType, projectConfig config.MachConfig) *Project
func (*Project) GetOldHash ¶
func (n *Project) GetOldHash() string
func (*Project) Identifier ¶
func (n *Project) Identifier() string
func (*Project) Independent ¶
func (n *Project) Independent() bool
func (*Project) SetOldHash ¶
func (n *Project) SetOldHash(hash string)
func (*Project) SetTainted ¶
func (n *Project) SetTainted(tainted bool)
type Site ¶
type Site struct { NestedNodes []*SiteComponent ProjectConfig config.MachConfig SiteConfig config.SiteConfig // contains filtered or unexported fields }
func NewSite ¶
func NewSite(g graph.Graph[string, Node], path, identifier string, deploymentType config.DeploymentType, ancestor Node, projectConfig config.MachConfig, siteConfig config.SiteConfig) *Site
func (*Site) GetOldHash ¶
func (n *Site) GetOldHash() string
func (*Site) Identifier ¶
func (n *Site) Identifier() string
func (*Site) Independent ¶
func (n *Site) Independent() bool
func (*Site) SetOldHash ¶
func (n *Site) SetOldHash(hash string)
func (*Site) SetTainted ¶
func (n *Site) SetTainted(tainted bool)
type SiteComponent ¶
type SiteComponent struct { ProjectConfig config.MachConfig SiteConfig config.SiteConfig SiteComponentConfig config.SiteComponentConfig // contains filtered or unexported fields }
func NewSiteComponent ¶
func NewSiteComponent( g graph.Graph[string, Node], path, identifier string, deploymentType config.DeploymentType, ancestor Node, projectConfig config.MachConfig, siteConfig config.SiteConfig, siteComponentConfig config.SiteComponentConfig, ) *SiteComponent
func (*SiteComponent) GetOldHash ¶
func (n *SiteComponent) GetOldHash() string
func (*SiteComponent) Hash ¶
func (sc *SiteComponent) Hash() (string, error)
func (*SiteComponent) Identifier ¶
func (n *SiteComponent) Identifier() string
func (*SiteComponent) Independent ¶
func (n *SiteComponent) Independent() bool
func (*SiteComponent) SetOldHash ¶
func (n *SiteComponent) SetOldHash(hash string)
func (*SiteComponent) SetTainted ¶
func (n *SiteComponent) SetTainted(tainted bool)
type ValidationError ¶
func (*ValidationError) Error ¶
func (v *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.