Documentation
¶
Index ¶
- Constants
- Variables
- func Command(provider, resource string) string
- func CommandName(name string) string
- func CommandRunFunc(resource string) jen.Code
- func OutputPath(destination Destination, provider, resource string) string
- func Save(path string, content []byte) error
- func Template(fields map[string]string, sourceFile string) []byte
- func TemplateData(fields map[string]string, provider, resource string) string
- type Destination
Constants ¶
View Source
const ( MODULE_FUSION = "github.com/slalombuild/fusion/" MODULE_ZEROLOG = "github.com/rs/zerolog/log" MODULE_ERRORS = "github.com/pkg/errors" MODULE_TEMPLATES = MODULE_FUSION + "templates" MODULE_COMMANDS = MODULE_FUSION + "internal/commands" )
Variables ¶
View Source
var ( ErrWriteFile = "failed to write file %s" ErrReadFile = "failed to read file" ErrCreateDirs = "failed to recursively create directories" )
Functions ¶
func CommandName ¶
CommandName properly formats the name of the go command from the provided resource
func CommandRunFunc ¶
func OutputPath ¶
func OutputPath(destination Destination, provider, resource string) string
Types ¶
type Destination ¶
type Destination int
const ( DESTINATION_COMMAND Destination = iota DESTINATION_TEMPLATE DESTINATION_TEMPLATE_DATA )
Click to show internal directories.
Click to hide internal directories.