Documentation
¶
Overview ¶
Package dirbuild interprets a tony build directory
Index ¶
- Constants
- func LoadEnv() (map[string]any, error)
- type Dir
- func (s *Dir) FromTony(data []byte, opts ...gomap.UnmapOption) error
- func (s *Dir) FromTonyIR(node *ir.Node, opts ...gomap.UnmapOption) error
- func (d *Dir) LoadProfile(profile string, env map[string]any) error
- func (d *Dir) Profiles() ([]string, error)
- func (d *Dir) Run(w io.WriteCloser, opts ...encode.EncodeOption) ([]*ir.Node, error)
- func (s *Dir) ToTony(opts ...gomap.MapOption) ([]byte, error)
- func (s *Dir) ToTonyIR(opts ...gomap.MapOption) (*ir.Node, error)
- type DirPatch
- func (s *DirPatch) FromTony(data []byte, opts ...gomap.UnmapOption) error
- func (s *DirPatch) FromTonyIR(node *ir.Node, opts ...gomap.UnmapOption) error
- func (d *DirPatch) String() string
- func (s *DirPatch) ToTony(opts ...gomap.MapOption) ([]byte, error)
- func (s *DirPatch) ToTonyIR(opts ...gomap.MapOption) (*ir.Node, error)
- type DirSource
- func (s *DirSource) Fetch(root string, env map[string]any) ([]*ir.Node, error)
- func (s *DirSource) FromTony(data []byte, opts ...gomap.UnmapOption) error
- func (s *DirSource) FromTonyIR(node *ir.Node, opts ...gomap.UnmapOption) error
- func (s *DirSource) ToTony(opts ...gomap.MapOption) ([]byte, error)
- func (s *DirSource) ToTonyIR(opts ...gomap.MapOption) (*ir.Node, error)
Constants ¶
View Source
const (
DefaultSuffix = "-ytool" + ".yaml"
)
View Source
const (
EnvEnv = "TONY_DIRBUILD_ENV"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dir ¶
type Dir struct {
Root string `tony:"omit"`
Suffix string `tony:"field=suffix"`
DestDir string `tony:"field=destDir"`
Sources []DirSource `tony:"field=sources"`
Patches []DirPatch `tony:"field=patches"`
Env map[string]*ir.Node `tony:"field=env"`
// contains filtered or unexported fields
}
func (*Dir) FromTony ¶ added in v0.0.2
func (s *Dir) FromTony(data []byte, opts ...gomap.UnmapOption) error
FromTony parses Tony format bytes and populates Dir.
func (*Dir) FromTonyIR ¶ added in v0.0.6
FromTonyIR populates Dir from a Tony IR node.
func (*Dir) Run ¶
func (d *Dir) Run(w io.WriteCloser, opts ...encode.EncodeOption) ([]*ir.Node, error)
type DirPatch ¶
type DirPatch struct {
Match *ir.Node `tony:"field=match"`
Patch *ir.Node `tony:"field=patch"`
File string `tony:"field=file"`
If string `tony:"field=if"`
// contains filtered or unexported fields
}
func (*DirPatch) FromTony ¶ added in v0.0.2
func (s *DirPatch) FromTony(data []byte, opts ...gomap.UnmapOption) error
FromTony parses Tony format bytes and populates DirPatch.
func (*DirPatch) FromTonyIR ¶ added in v0.0.6
FromTonyIR populates DirPatch from a Tony IR node.
type DirSource ¶
type DirSource struct {
Format *format.Format `tony:"field=format"`
Exec *string `tony:"field=exec"`
Dir *string `tony:"field=dir"`
URL *string `tony:"field=url"`
// contains filtered or unexported fields
}
DirSource represents a data source for a dirbuild.
func (*DirSource) FromTony ¶ added in v0.0.2
func (s *DirSource) FromTony(data []byte, opts ...gomap.UnmapOption) error
FromTony parses Tony format bytes and populates DirSource.
func (*DirSource) FromTonyIR ¶ added in v0.0.6
FromTonyIR populates DirSource from a Tony IR node.
Click to show internal directories.
Click to hide internal directories.