Documentation
¶
Index ¶
- type Builder
- func (b *Builder) Build(ctx context.Context, orgSlug string) (*Node, error)
- func (b *Builder) BuildProject(ctx context.Context, projectSlug string) (*Node, error)
- func (b *Builder) BuildTarget(ctx context.Context, projectSlug, targetSlug string) (*Node, error)
- func (b *Builder) ClearCache()
- func (b *Builder) LoadChildren(ctx context.Context, node *Node) error
- type Node
- type NodeType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder builds resource hierarchies from the DotEnv API
func NewBuilder ¶
NewBuilder creates a new hierarchy builder
func (*Builder) BuildProject ¶
BuildProject builds hierarchy for a specific project
func (*Builder) BuildTarget ¶
BuildTarget builds hierarchy for a specific target
type Node ¶
type Node struct {
Type NodeType
Name string
Slug string
Path string
Children []*Node
Metadata interface{} // Can hold *dotenv.Project, *dotenv.Target, or *dotenv.Environment
}
Node represents a node in the resource hierarchy
func (*Node) CountDescendants ¶
CountDescendants returns the total number of descendants
func (*Node) SortChildren ¶
func (n *Node) SortChildren()
SortChildren sorts children alphabetically by name
Click to show internal directories.
Click to hide internal directories.