flagparser

package
v0.0.0-...-bc8cfc3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddServiceFlags

func AddServiceFlags(flags *pflag.FlagSet)

AddServiceFlags add all supported service flags to the flagset.

func Merge

func Merge(cmd *cobra.Command, spec *api.ServiceSpec, c api.ControlClient) error

Merge merges a flagset into a service spec.

func ParseAddConfig

func ParseAddConfig(cmd *cobra.Command, spec *api.ServiceSpec, flagName string) error

ParseAddConfig validates configs passed on the command line

func ParseAddSecret

func ParseAddSecret(cmd *cobra.Command, spec *api.ServiceSpec, flagName string) error

ParseAddSecret validates secrets passed on the command line

func ParseRemoveConfig

func ParseRemoveConfig(cmd *cobra.Command, spec *api.ServiceSpec, flagName string) error

ParseRemoveConfig removes a set of configs from the task spec's config references

func ParseRemoveSecret

func ParseRemoveSecret(cmd *cobra.Command, spec *api.ServiceSpec, flagName string) error

ParseRemoveSecret removes a set of secrets from the task spec's secret references

Types

This section is empty.

Notes

Bugs

  • Cobra stringslice actually doesn't correctly handle comma separated values, so multiple flags aren't really supported. We'll have to replace StringSlice with a type that doesn't use the csv parser. This is good enough for now.

Jump to

Keyboard shortcuts

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