Documentation ¶
Index ¶
- func ApplyTemplate(t string, data any) (string, error)
- func ApplyTemplateFrom(fs shared.FileSystem, f string, obj any) (string, error)
- func Copy(fs shared.FileSystem, f shared.File, destination shared.File) error
- func CopyAndApply(logger shared.BaseLogger, fs shared.FileSystem, root shared.Dir, ...) error
- func CopyAndApplyTemplate(fs shared.FileSystem, f shared.File, destination shared.File, obj any) error
- func CopyAndReplace(fs shared.FileSystem, f shared.File, destination shared.File, ...) error
- func CopyAndVisit(logger shared.BaseLogger, fs shared.FileSystem, root shared.Dir, ...) error
- func Walk(logger shared.BaseLogger, fs shared.FileSystem, root shared.Dir, ignore Ignore, ...) error
- type AlreadyExistError
- type FileVisitor
- type Ignore
- type IgnorePatterns
- type NoIgnore
- type NoOpIgnore
- type Override
- type OverrideAll
- type Replacer
- type ServiceReplacer
- type SkipOnExist
- type Source
- type TemplateOption
- type TemplateOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTemplate ¶
ApplyTemplate takes a YAML template as []byte, populates it using data, and returns the result as a string.
func ApplyTemplateFrom ¶ added in v0.0.26
func CopyAndApply ¶
func CopyAndApply(logger shared.BaseLogger, fs shared.FileSystem, root shared.Dir, destination shared.Dir, obj any, opts ...TemplateOptionFunc) error
func CopyAndApplyTemplate ¶
func CopyAndReplace ¶
func CopyAndVisit ¶
func CopyAndVisit(logger shared.BaseLogger, fs shared.FileSystem, root shared.Dir, destination shared.Dir, visitor FileVisitor) error
Types ¶
type AlreadyExistError ¶
type AlreadyExistError struct {
// contains filtered or unexported fields
}
func (AlreadyExistError) Error ¶
func (a AlreadyExistError) Error() string
type FileVisitor ¶
type IgnorePatterns ¶ added in v0.0.15
type IgnorePatterns struct {
// contains filtered or unexported fields
}
func NewIgnore ¶ added in v0.0.15
func NewIgnore(patterns ...string) IgnorePatterns
type NoOpIgnore ¶
type NoOpIgnore struct{}
type OverrideAll ¶ added in v0.0.31
type OverrideAll struct{}
func (*OverrideAll) Override ¶ added in v0.0.31
func (o *OverrideAll) Override(string) bool
type ServiceReplacer ¶
type ServiceReplacer struct {
// contains filtered or unexported fields
}
func NewServiceReplacer ¶
func NewServiceReplacer(gen *generation.Service) *ServiceReplacer
type SkipOnExist ¶ added in v0.0.31
type SkipOnExist struct{}
func (*SkipOnExist) Override ¶ added in v0.0.31
func (o *SkipOnExist) Override(string) bool
type TemplateOption ¶ added in v0.0.31
func Option ¶ added in v0.0.31
func Option(relativePath string, opts ...TemplateOptionFunc) *TemplateOption
type TemplateOptionFunc ¶ added in v0.0.31
type TemplateOptionFunc func(*TemplateOption)
func WithIgnore ¶ added in v0.0.31
func WithIgnore(ignore Ignore) TemplateOptionFunc
func WithOverrideAll ¶ added in v0.0.31
func WithOverrideAll() TemplateOptionFunc
func WithOverridePolicy ¶ added in v0.0.31
func WithOverridePolicy(override Override) TemplateOptionFunc
Click to show internal directories.
Click to hide internal directories.