flagutil

package
v0.0.0-...-97238d6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: Apache-2.0 Imports: 13 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 *secret.Agent, dryRun bool) (client *git.Client, err error)

GitClient returns a Git client.

func (*GitHubOptions) GitHubClient

func (o *GitHubOptions) GitHubClient(secretAgent *secret.Agent, 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 KubernetesClientOptions

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

KubernetesOptions holds options for interacting with Kubernetes.

func (*KubernetesClientOptions) AddFlags

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

func (*KubernetesClientOptions) KubeClient

Client returns a Kubernetes client.

func (*KubernetesClientOptions) ProwJobClient

func (o *KubernetesClientOptions) ProwJobClient() (versioned.Interface, error)

Client returns a Kubernetes client.

func (*KubernetesClientOptions) Validate

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

Validate validates Kubernetes 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
}

Strings represents the value of a flag that accept multiple strings.

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

String returns a concatenated string of all the values joined by commas.

func (*Strings) Strings

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

Strings returns the slice of strings set for this value instance.

Jump to

Keyboard shortcuts

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