Documentation
¶
Overview ¶
Package scaffoldrc contains the runtime configuration for users
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RCValidationError ¶
type RcValidationErrors ¶
type RcValidationErrors []RCValidationError
func (RcValidationErrors) Error ¶
func (e RcValidationErrors) Error() string
type RunHooksOption ¶
type RunHooksOption string
var ( RunHooksNever RunHooksOption = "never" RunHooksAlways RunHooksOption = "always" RunHooksPrompt RunHooksOption = "prompt" )
func ParseRunHooksOption ¶
func ParseRunHooksOption(s string) RunHooksOption
func (RunHooksOption) IsValid ¶
func (r RunHooksOption) IsValid() bool
func (RunHooksOption) String ¶
func (r RunHooksOption) String() string
func (*RunHooksOption) UnmarshalText ¶
func (r *RunHooksOption) UnmarshalText(text []byte) error
type ScaffoldRC ¶
type ScaffoldRC struct { // Settings define the settings for the scaffold application. Settings Settings `yaml:"settings"` // Defaults define a default value for a variable. // name: myproject // git_user: hay-kot // // These are injected into the template as variables for // every scaffold. Defaults map[string]any `yaml:"defaults"` // Aliases define a alias for a repository. // or filepath. // // component: https://githublcom/hay-kot/scaffold-go-component // cli: https://github.com/hay-kot/scaffold-go-cli Aliases map[string]string `yaml:"aliases"` // Shorts define a short name for a repository. // the key will be expanded into the value. // gh: https://github.com // gt: https://gitea.com // // This will allow you to use the short name in the scaffold // gh:myorg/myrepo Shorts map[string]string `yaml:"shorts"` // Auth defines a list of auth entries that can be used to // authenticate with a remote SCM. Auth []AuthEntry `yaml:"auth"` }
func New ¶
func New(r io.Reader) (*ScaffoldRC, error)
New reads a scaffold rc file from the reader and returns a ScaffoldRC struct.
func (*ScaffoldRC) Authenticator ¶
func (rc *ScaffoldRC) Authenticator(pkgurl string) (transport.AuthMethod, bool)
func (*ScaffoldRC) Validate ¶
func (rc *ScaffoldRC) Validate() error
type Settings ¶
type Settings struct { Theme styles.HuhTheme `yaml:"theme"` RunHooks RunHooksOption `yaml:"run_hooks"` }
Click to show internal directories.
Click to hide internal directories.