package load
import "github.com/oslokommune/okctl/pkg/config/load"
Package load knows how to load application and repository data
Index ¶
- func PromptContinue(msg, errMsg string) error
- func UserDataFromFlagsEnvConfigDefaults(cmd *cobra.Command, notFoundFn DataNotFoundFn) config.DataLoaderFn
- type DataNotFoundErr
- type DataNotFoundFn
- func CreateOnUserDataNotFound() DataNotFoundFn
- func CreateOnUserDataNotFoundWithNoInput() DataNotFoundFn
- func ErrOnUserDataNotFound() DataNotFoundFn
- type LoaderFn
Functions ¶
func PromptContinue ¶
PromptContinue asks the user a question and does not abort if a positive response is provided
func UserDataFromFlagsEnvConfigDefaults ¶
func UserDataFromFlagsEnvConfigDefaults(cmd *cobra.Command, notFoundFn DataNotFoundFn) config.DataLoaderFn
UserDataFromFlagsEnvConfigDefaults returns the default behavior for loading application state
Types ¶
type DataNotFoundErr ¶
type DataNotFoundErr struct {
// contains filtered or unexported fields
}
DataNotFoundErr stores error returned when data is not found at location
func (*DataNotFoundErr) Error ¶
func (e *DataNotFoundErr) Error() string
Error returns the stored error
type DataNotFoundFn ¶
DataNotFoundFn determines what should be done if data is not found
func CreateOnUserDataNotFound ¶
func CreateOnUserDataNotFound() DataNotFoundFn
CreateOnUserDataNotFound will start an interactive survey that allows the end user to configure okctl for their use
func CreateOnUserDataNotFoundWithNoInput ¶
func CreateOnUserDataNotFoundWithNoInput() DataNotFoundFn
CreateOnUserDataNotFoundWithNoInput initializes a user without user input
func ErrOnUserDataNotFound ¶
func ErrOnUserDataNotFound() DataNotFoundFn
ErrOnUserDataNotFound returns a handler that errors when the app configuration cannot be loaded
type LoaderFn ¶
LoaderFn defines an interface for loading configuration
Source Files ¶
- Version
- v0.0.106 (latest)
- Published
- Oct 21, 2022
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 5 days ago –
Tools for package owners.