Documentation ¶
Overview ¶
Package datum is our cobra/viper cli implementation
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // RootHost contains the root url for the Datum API RootHost string // GraphAPIHost contains the url for the Datum graph api GraphAPIHost string )
View Source
var (
Logger *zap.SugaredLogger
)
View Source
var RootCmd = &cobra.Command{ Use: appName, Short: fmt.Sprintf("a %s cli", appName), }
RootCmd represents the base command when called without any subcommands
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ViperBindFlag ¶
ViperBindFlag provides a wrapper around the viper bindings that panics if an error occurs
Types ¶
type CLI ¶
type CLI struct { Interceptor clientv2.RequestInterceptor AccessToken string }
type RequiredFieldMissingError ¶
type RequiredFieldMissingError struct { // Field contains the required field that was missing from the input Field string }
RequiredFieldMissingError is returned when a field is required but not provided
func NewRequiredFieldMissingError ¶
func NewRequiredFieldMissingError(f string) *RequiredFieldMissingError
NewRequiredFieldMissingError returns an error for a missing required field
func (*RequiredFieldMissingError) Error ¶
func (e *RequiredFieldMissingError) Error() string
Error returns the RequiredFieldMissingError in string format
Click to show internal directories.
Click to hide internal directories.