flagutil

package
v0.0.0-...-d7867ec Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package flagutil contains utilities and interfaces shared between several Prow commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubOptions

type GitHubOptions struct {
	TokenPath string
	// contains filtered or unexported fields
}

GitHubOptions holds options for interacting with GitHub.

func (*GitHubOptions) AddFlags

func (o *GitHubOptions) AddFlags(fs *flag.FlagSet)

AddFlags injects GitHub options into the given FlagSet.

func (*GitHubOptions) GitClient

func (o *GitHubOptions) GitClient(secretAgent *config.SecretAgent, dryRun bool) (client *git.Client, err error)

GitClient returns a Git client.

func (*GitHubOptions) GitHubClient

func (o *GitHubOptions) GitHubClient(secretAgent *config.SecretAgent, dryRun bool) (client *github.Client, err error)

GitHubClient returns a GitHub client.

func (*GitHubOptions) Validate

func (o *GitHubOptions) Validate(dryRun bool) error

Validate validates GitHub options.

type KubernetesOptions

type KubernetesOptions struct {
	// contains filtered or unexported fields
}

KubernetesOptions holds options for interacting with Kubernetes.

func (*KubernetesOptions) AddFlags

func (o *KubernetesOptions) AddFlags(fs *flag.FlagSet)

AddFlags injects Kubernetes options into the given FlagSet.

func (*KubernetesOptions) Client

func (o *KubernetesOptions) Client(namespace string, dryRun bool) (client *kube.Client, err error)

Client returns a Kubernetes client.

func (*KubernetesOptions) Validate

func (o *KubernetesOptions) Validate(dryRun bool) error

Validate validates Kubernetes options.

type Strings

type Strings struct {
	// contains filtered or unexported fields
}

func NewStrings

func NewStrings(def ...string) Strings

NewStrings returns a Strings struct that defaults to the value of def if left unset.

func (*Strings) Set

func (s *Strings) Set(value string) error

Set records the value passed

func (*Strings) String

func (s *Strings) String() string

func (*Strings) Strings

func (s *Strings) Strings() []string

Jump to

Keyboard shortcuts

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