populate

package
v10.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DummyCertsAndKeys

func DummyCertsAndKeys(v interface{})

func DummyImagePullSecret

func DummyImagePullSecret(registry string) []byte

DummyImagePullSecret return dummy ImagePullSecrets with the registry as key

func Walk

func Walk(v interface{}, prepare func(v reflect.Value))

Walk is a recursive struct value population function. Given a pointer to an arbitrarily complex value v, it fills in the complete structure of that value, setting each string with the path taken to reach it. An optional prepare function may be supplied by the caller of Walk. If supplied, prepare will be called prior to walking v. The prepare function is useful for setting custom values to certain fields before walking v.

This function has the following caveats:

  • Signed integers are set to int(1)
  • Unsigned integers are set to uint(1)
  • Floating point numbers are set to float(1.0)
  • Booleans are set to True
  • Arrays and slices are allocated 1 element
  • Maps are allocated 1 element
  • Only map[string][string] types are supported
  • strings are set to the value of the path taken to reach the string

Types

This section is empty.

Jump to

Keyboard shortcuts

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