{"modulePath":"github.com/2lambda123/openshift-origin","version":"v3.10.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package set\n\n## Functions\n\n```go\nfunc NewCmdBuildHook(fullName string, f *clientcmd.Factory, out, errOut io.Writer) *cobra.Command\n```\nNewCmdBuildHook implements the set build-hook command\n\n```go\nfunc NewCmdBuildSecret(fullName string, f *clientcmd.Factory, out, errOut io.Writer) *cobra.Command\n```\nNewCmdBuildSecret implements the set build-secret command\n\n```go\nfunc NewCmdDeploymentHook(fullName string, f *clientcmd.Factory, out, errOut io.Writer) *cobra.Command\n```\nNewCmdDeploymentHook implements the set deployment-hook command\n\n```go\nfunc NewCmdEnv(fullName string, f *clientcmd.Factory, in io.Reader, out, errout io.Writer) *cobra.Command\n```\nNewCmdEnv implements the OpenShift cli env command\n\n```go\nfunc NewCmdImage(fullName string, f *clientcmd.Factory, out, err io.Writer) *cobra.Command\n```\nNewCmdImage is a wrapper for the Kubernetes CLI set image command\n\n```go\nfunc NewCmdImageLookup(fullName, parentName string, f *clientcmd.Factory, out, errOut io.Writer) *cobra.Command\n```\nNewCmdImageLookup implements the set image-lookup command\n\n```go\nfunc NewCmdProbe(fullName string, f *clientcmd.Factory, out, errOut io.Writer) *cobra.Command\n```\nNewCmdProbe implements the set probe command\n\n```go\nfunc NewCmdResources(fullName string, f *clientcmd.Factory, out io.Writer, errOut io.Writer) *cobra.Command\n```\nNewCmdResources is a wrapper for the Kubernetes CLI set resources command\n\n```go\nfunc NewCmdRouteBackends(fullName string, f *clientcmd.Factory, out, errOut io.Writer) *cobra.Command\n```\nNewCmdRouteBackends implements the set route-backends command\n\n```go\nfunc NewCmdSet(fullName string, f *clientcmd.Factory, in io.Reader, out, errout io.Writer) *cobra.Command\n```\nNewCmdSet exposes commands for modifying objects.\n\n```go\nfunc NewCmdTriggers(fullName string, f *clientcmd.Factory, out, errOut io.Writer) *cobra.Command\n```\nNewCmdTriggers implements the set triggers command\n\n```go\nfunc NewCmdVolume(fullName string, f *clientcmd.Factory, out, errOut io.Writer) *cobra.Command\n```\n\n```go\nfunc UpdateBackendsForObject(obj runtime.Object, fn func(*Backends) error) (bool, error)\n```\nUpdateBackendsForObject extracts a backend definition array from the provided object, passes it to fn, and then applies the backend on the object. It returns true if the object was mutated and an optional error if any part of the flow returns error.\n\n```go\nfunc UpdateTriggersForObject(obj runtime.Object, fn func(*TriggerDefinition) error) (bool, error)\n```\nUpdateTriggersForObject extracts a trigger definition from the provided object, passes it to fn, and then applies the trigger definition back on the object. It returns true if the object was mutated and an optional error if the any part of the flow returns error.\n\n## Types\n\n```go\ntype AddVolumeOptions struct {\n\tType          string\n\tMountPath     string\n\tSubPath       string\n\tDefaultMode   string\n\tOverwrite     bool\n\tPath          string\n\tConfigMapName string\n\tSecretName    string\n\tSource        string\n\n\tCreateClaim bool\n\tClaimName   string\n\tClaimSize   string\n\tClaimMode   string\n\tClaimClass  string\n\n\tTypeChanged bool\n}\n```\n\n```go\nfunc (a *AddVolumeOptions) Complete() error\n```\n\n```go\nfunc (a *AddVolumeOptions) Validate() error\n```\n\n```go\ntype BackendInput struct {\n\t// Name is the name of a service.\n\tName string\n\t// Value is the amount to change.\n\tValue int32\n\t// Percentage means value should be interpreted as a percentage between -100 and 100, inclusive.\n\tPercentage bool\n\t// Relative means value is applied relative to the current values.\n\tRelative bool\n}\n```\nBackendInput describes a change to a named service.\n\n```go\nfunc ParseBackendInput(s string) (*BackendInput, error)\n```\nParseBackendInput turns the provided input into a BackendInput or returns an error.\n\n```go\nfunc (input *BackendInput) Apply(ref, to *routeapi.RouteTargetReference, backends []routeapi.RouteTargetReference)\n```\nApply alters the weights of two services.\n\n```go\ntype BackendTransform struct {\n\t// Adjust expects a single Input to transform, relative to other backends.\n\tAdjust bool\n\t// Zero sets all backend weights to zero.\n\tZero bool\n\t// Equal means backends will be set to equal weights.\n\tEqual bool\n\t// Inputs is the desired backends.\n\tInputs []BackendInput\n}\n```\nBackendTransform describes the desired transformation of backends.\n\n```go\nfunc (t BackendTransform) Apply(b *Backends) error\n```\nApply transforms the provided backends or returns an error.\n\n```go\nfunc (t BackendTransform) Empty() bool\n```\nEmpty returns true if no transformations have been specified.\n\n```go\nfunc (t BackendTransform) Validate() error\n```\nValidate returns an error if the transformations are not internally consistent.\n\n```go\ntype Backends struct {\n\tBackends []routeapi.RouteTargetReference\n}\n```\nBackends is a struct that represents the backends to be transformed.\n\n```go\nfunc (b *Backends) Names() []string\n```\nNames returns the referenced backend service names, in the order they appear.\n\n```go\ntype BackendsOptions struct {\n\tOut io.Writer\n\tErr io.Writer\n\n\tFilenames []string\n\tSelector  string\n\tAll       bool\n\tOutput    string\n\n\tCmd *cobra.Command\n\n\tBuilder *resource.Builder\n\tInfos   []*resource.Info\n\n\tEncoder runtime.Encoder\n\n\tLocal         bool\n\tShortOutput   bool\n\tMapper        meta.RESTMapper\n\tOutputVersion schema.GroupVersion\n\n\tPrintTable  bool\n\tPrintObject func(runtime.Object) error\n\n\tTransform BackendTransform\n}\n```\n\n```go\nfunc (o *BackendsOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args []string) error\n```\nComplete takes command line information to fill out BackendOptions or returns an error.\n\n```go\nfunc (o *BackendsOptions) Run() error\n```\nRun executes the BackendOptions or returns an error.\n\n```go\nfunc (o *BackendsOptions) Validate() error\n```\nValidate verifies the provided options are valid or returns an error.\n\n```go\ntype BuildHookOptions struct {\n\tOut io.Writer\n\tErr io.Writer\n\n\tBuilder *resource.Builder\n\tInfos   []*resource.Info\n\n\tEncoder runtime.Encoder\n\n\tFilenames []string\n\tSelector  string\n\tAll       bool\n\tOutput    string\n\n\tCmd *cobra.Command\n\n\tLocal       bool\n\tShortOutput bool\n\tMapper      meta.RESTMapper\n\n\tPrintObject func([]*resource.Info) error\n\n\tScript     string\n\tEntrypoint bool\n\tRemove     bool\n\tPostCommit bool\n\n\tCommand []string\n}\n```\n\n```go\nfunc (o *BuildHookOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args []string) error\n```\n\n```go\nfunc (o *BuildHookOptions) Run() error\n```\n\n```go\nfunc (o *BuildHookOptions) Validate() error\n```\n\n```go\ntype BuildSecretOptions struct {\n\tOut io.Writer\n\tErr io.Writer\n\n\tBuilder *resource.Builder\n\tInfos   []*resource.Info\n\n\tEncoder runtime.Encoder\n\n\tFilenames []string\n\tSelector  string\n\tAll       bool\n\n\tCmd *cobra.Command\n\n\tShortOutput bool\n\tLocal       bool\n\tMapper      meta.RESTMapper\n\n\tOutput string\n\n\tPrintObject func([]*resource.Info) error\n\n\tSecret string\n\tPush   bool\n\tPull   bool\n\tSource bool\n\tRemove bool\n}\n```\n\n```go\nfunc (o *BuildSecretOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args []string) error\n```\n\n```go\nfunc (o *BuildSecretOptions) Run() error\n```\n\n```go\nfunc (o *BuildSecretOptions) Validate() error\n```\n\n```go\ntype DeploymentHookOptions struct {\n\tOut io.Writer\n\tErr io.Writer\n\n\tBuilder *resource.Builder\n\tInfos   []*resource.Info\n\n\tEncoder runtime.Encoder\n\n\tFilenames []string\n\tContainer string\n\tSelector  string\n\tAll       bool\n\n\tOutput string\n\n\tShortOutput bool\n\tLocal       bool\n\tMapper      meta.RESTMapper\n\n\tPrintObject func([]*resource.Info) error\n\n\tPre    bool\n\tMid    bool\n\tPost   bool\n\tRemove bool\n\n\tCmd *cobra.Command\n\n\tCommand     []string\n\tEnvironment []string\n\tVolumes     []string\n\n\tFailurePolicy appsapi.LifecycleHookFailurePolicy\n}\n```\n\n```go\nfunc (o *DeploymentHookOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args []string) error\n```\n\n```go\nfunc (o *DeploymentHookOptions) Run() error\n```\n\n```go\nfunc (o *DeploymentHookOptions) Validate() error\n```\n\n```go\ntype EnvOptions struct {\n\tOut io.Writer\n\tErr io.Writer\n\tIn  io.Reader\n\n\tFilenames []string\n\tEnvParams []string\n\tEnvArgs   []string\n\tResources []string\n\n\tAll         bool\n\tResolve     bool\n\tList        bool\n\tShortOutput bool\n\tLocal       bool\n\tOverwrite   bool\n\n\tResourceVersion   string\n\tContainerSelector string\n\tSelector          string\n\tOutput            string\n\tFrom              string\n\tPrefix            string\n\n\tBuilder *resource.Builder\n\tInfos   []*resource.Info\n\n\tEncoder runtime.Encoder\n\n\tCmd *cobra.Command\n\n\tMapper meta.RESTMapper\n\n\tPrintObject func([]*resource.Info) error\n}\n```\n\n```go\nfunc (o *EnvOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args []string) error\n```\n\n```go\nfunc (o *EnvOptions) RunEnv(f *clientcmd.Factory) error\n```\nRunEnv contains all the necessary functionality for the OpenShift cli env command TODO: refactor to share the common \"patch resource\" pattern of probe\n\n```go\ntype ImageChangeTrigger struct {\n\t// If this trigger is automatically applied\n\tAuto bool\n\t// An ImageStreamTag name to target\n\tFrom string\n\t// The target namespace, normalized if set\n\tNamespace string\n\t// A list of names this trigger targets\n\tNames []string\n}\n```\nImageChangeTrigger represents the capabilities present in deployment config and build config objects in a consistent way.\n\n```go\ntype ImageLookupOptions struct {\n\tOut io.Writer\n\tErr io.Writer\n\n\tFilenames []string\n\tSelector  string\n\tAll       bool\n\n\tBuilder *resource.Builder\n\tInfos   []*resource.Info\n\n\tEncoder runtime.Encoder\n\n\tShortOutput   bool\n\tMapper        meta.RESTMapper\n\tOutputVersion schema.GroupVersion\n\n\tPrintTable  bool\n\tPrintObject func(runtime.Object) error\n\n\tList  bool\n\tLocal bool\n\n\tEnabled bool\n}\n```\n\n```go\nfunc (o *ImageLookupOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args []string) error\n```\nComplete takes command line information to fill out ImageLookupOptions or returns an error.\n\n```go\nfunc (o *ImageLookupOptions) Run() error\n```\nRun executes the ImageLookupOptions or returns an error.\n\n```go\nfunc (o *ImageLookupOptions) Validate() error\n```\nValidate verifies the provided options are valid or returns an error.\n\n```go\ntype Patch struct {\n\tInfo *resource.Info\n\tErr  error\n\n\tBefore []byte\n\tAfter  []byte\n\tPatch  []byte\n}\n```\nPatch represents the result of a mutation to an object.\n\n```go\nfunc CalculatePatches(infos []*resource.Info, encoder runtime.Encoder, mutateFn func(*resource.Info) (bool, error)) []*Patch\n```\nCalculatePatches calls the mutation function on each provided info object, and generates a strategic merge patch for the changes in the object. Encoder must be able to encode the info into the appropriate destination type. If mutateFn returns false, the object is not included in the final list of patches.\n\n```go\ntype ProbeOptions struct {\n\tOut io.Writer\n\tErr io.Writer\n\n\tFilenames         []string\n\tContainerSelector string\n\tSelector          string\n\tAll               bool\n\tOutput            string\n\n\tBuilder *resource.Builder\n\tInfos   []*resource.Info\n\n\tEncoder runtime.Encoder\n\n\tCmd *cobra.Command\n\n\tShortOutput bool\n\tMapper      meta.RESTMapper\n\n\tPrintObject            func([]*resource.Info) error\n\tUpdatePodSpecForObject func(runtime.Object, func(spec *v1.PodSpec) error) (bool, error)\n\n\tReadiness bool\n\tLiveness  bool\n\tRemove    bool\n\tLocal     bool\n\n\tOpenTCPSocket string\n\tHTTPGet       string\n\tCommand       []string\n\n\tFlagSet       func(string) bool\n\tHTTPGetAction *kapi.HTTPGetAction\n\n\t// Length of time before health checking is activated.  In seconds.\n\tInitialDelaySeconds *int\n\t// Length of time before health checking times out.  In seconds.\n\tTimeoutSeconds *int\n\t// How often (in seconds) to perform the probe.\n\tPeriodSeconds *int\n\t// Minimum consecutive successes for the probe to be considered successful after having failed.\n\t// Must be 1 for liveness.\n\tSuccessThreshold *int\n\t// Minimum consecutive failures for the probe to be considered failed after having succeeded.\n\tFailureThreshold *int\n}\n```\n\n```go\nfunc (o *ProbeOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args []string) error\n```\n\n```go\nfunc (o *ProbeOptions) Run() error\n```\n\n```go\nfunc (o *ProbeOptions) Validate() error\n```\n\n```go\ntype TriggerDefinition struct {\n\tConfigChange      bool\n\tImageChange       []ImageChangeTrigger\n\tGenericWebHooks   []buildapi.WebHookTrigger\n\tGitHubWebHooks    []buildapi.WebHookTrigger\n\tGitLabWebHooks    []buildapi.WebHookTrigger\n\tBitbucketWebHooks []buildapi.WebHookTrigger\n}\n```\nTriggerDefinition is the abstract representation of triggers for builds and deployment configs.\n\n```go\nfunc NewAnnotationTriggers(obj runtime.Object) (*TriggerDefinition, error)\n```\nNewAnnotationTriggers creates a trigger definition from an object that can be triggered by the image annotation.\n\n```go\nfunc NewBuildConfigTriggers(config *buildapi.BuildConfig) *TriggerDefinition\n```\nNewBuildConfigTriggers creates a trigger definition from a build config.\n\n```go\nfunc NewDeploymentConfigTriggers(config *appsapi.DeploymentConfig) *TriggerDefinition\n```\nNewDeploymentConfigTriggers creates a trigger definition from a deployment config.\n\n```go\nfunc (t *TriggerDefinition) Apply(obj runtime.Object) error\n```\nApply writes a trigger definition back to an object.\n\n```go\ntype TriggersOptions struct {\n\tOut io.Writer\n\tErr io.Writer\n\n\tFilenames []string\n\tSelector  string\n\tAll       bool\n\tOutput    string\n\n\tBuilder *resource.Builder\n\tInfos   []*resource.Info\n\n\tEncoder runtime.Encoder\n\n\tCmd *cobra.Command\n\n\tLocal       bool\n\tShortOutput bool\n\tMapper      meta.RESTMapper\n\n\tPrintTable  bool\n\tPrintObject func([]*resource.Info) error\n\n\tRemove    bool\n\tRemoveAll bool\n\tAuto      bool\n\tManual    bool\n\tReset     bool\n\n\tContainerNames      string\n\tFromConfig          bool\n\tFromGitHub          *bool\n\tFromWebHook         *bool\n\tFromWebHookAllowEnv *bool\n\tFromGitLab          *bool\n\tFromBitbucket       *bool\n\tFromImage           string\n\t// FromImageNamespace is the namespace for the FromImage\n\tFromImageNamespace string\n}\n```\n\n```go\nfunc (o *TriggersOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args []string) error\n```\n\n```go\nfunc (o *TriggersOptions) Run() error\n```\n\n```go\nfunc (o *TriggersOptions) Validate() error\n```\n\n```go\ntype VolumeOptions struct {\n\tDefaultNamespace       string\n\tExplicitNamespace      bool\n\tOut                    io.Writer\n\tErr                    io.Writer\n\tMapper                 meta.RESTMapper\n\tTyper                  runtime.ObjectTyper\n\tCategoryExpander       categories.CategoryExpander\n\tRESTClientFactory      func(mapping *meta.RESTMapping) (resource.RESTClient, error)\n\tUpdatePodSpecForObject func(obj runtime.Object, fn func(*v1.PodSpec) error) (bool, error)\n\tClient                 kcoreclient.PersistentVolumeClaimsGetter\n\tEncoder                runtime.Encoder\n\tCmd                    *cobra.Command\n\n\t// Resource selection\n\tSelector  string\n\tAll       bool\n\tFilenames []string\n\n\t// Operations\n\tAdd    bool\n\tRemove bool\n\tList   bool\n\n\t// Common optional params\n\tName        string\n\tContainers  string\n\tConfirm     bool\n\tLocal       bool\n\tOutput      string\n\tPrintObject func([]*resource.Info) error\n\n\t// Add op params\n\tAddOpts *AddVolumeOptions\n}\n```\n\n```go\nfunc (v *VolumeOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command) error\n```\n\n```go\nfunc (v *VolumeOptions) RunVolume(args []string, f *clientcmd.Factory) error\n```\n\n```go\nfunc (v *VolumeOptions) Validate(cmd *cobra.Command, args []string) error\n```\n\n","path":"github.com/2lambda123/openshift-origin/pkg/oc/cli/cmd/set","name":"set","synopsis":"","isRedistributable":true}
