generator

package
v0.0.0-...-ee8e30b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrAliasNotFound        = "Alias '%s' not found in registry"
	ErrInvalidAlias         = "Invalid alias '%s'"
	ErrInvalidAliasTemplate = "Invalid alias template: '%s' must be a filepath or url"
)
View Source
const (
	ErrBlankTemplateID           = "Template ID not provided"
	ErrTemplateRootNotFound      = "Template root not found %s"
	ErrSkelpTemplatesDirNotFound = "Skelp templates dir not found %s"
	ErrCacheNotFoundNoDownload   = "Cached template not found and downloads are turned off: %s"
)
View Source
const (
	TIDTypeRepo    = "REPO"
	TIDTypeFile    = "FILE"
	TIDTypeAlias   = "ALIAS"
	TIDTypeUnknown = "UNKNOWN"
)

Variables

This section is empty.

Functions

func AuthMethodForURL

func AuthMethodForURL(url string) transport.AuthMethod

func FilepathFromURL

func FilepathFromURL(u string) (string, error)

func IsAlias

func IsAlias(templateID string) bool

func IsFilePath

func IsFilePath(templateID string) bool

func IsRepoURL

func IsRepoURL(templateID string) bool

func IsSSH

func IsSSH(templateID string) bool

func TypeForTemplateID

func TypeForTemplateID(templateID string) string

Types

type SkelpGenerator

type SkelpGenerator struct {
	SkelpHome string
	// contains filtered or unexported fields
}

func New

func New(options SkelpOptions) *SkelpGenerator

func (*SkelpGenerator) AddAlias

func (sg *SkelpGenerator) AddAlias(alias, fileOrUrl string) error

func (*SkelpGenerator) AliasMap

func (sg *SkelpGenerator) AliasMap() (map[string]string, error)

func (*SkelpGenerator) Generate

func (sg *SkelpGenerator) Generate(templateID string, dataProvider provider.DataProvider) error

func (*SkelpGenerator) IDForAlias

func (sg *SkelpGenerator) IDForAlias(alias string) (string, error)

func (*SkelpGenerator) InitSkelpHome

func (sg *SkelpGenerator) InitSkelpHome() (string, error)

func (*SkelpGenerator) RemoveAlias

func (sg *SkelpGenerator) RemoveAlias(alias string) error

type SkelpOptions

type SkelpOptions struct {
	Download          bool
	CheckForUpdates   bool
	OutputDir         string
	HomeDirOverride   string
	SkelpDirOverride  string
	OverwriteProvider provider.OverwriteProvider
	BasicAuthProvider provider.BasicAuthProvider
}

func DefaultOptions

func DefaultOptions() SkelpOptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL