Documentation ¶
Index ¶
- func TypeToString(t Type) string
- func Validate(fldPath *field.Path, source *ConfigSource) field.ErrorList
- type ConfigSource
- type StringOrConfig
- func (strsec *StringOrConfig) Config() *ConfigSource
- func (in *StringOrConfig) DeepCopy() *StringOrConfig
- func (in *StringOrConfig) DeepCopyInto(out *StringOrConfig)
- func (strsec *StringOrConfig) MarshalJSON() ([]byte, error)
- func (_ StringOrConfig) OpenAPISchemaFormat() string
- func (_ StringOrConfig) OpenAPISchemaType() []string
- func (strsec *StringOrConfig) String() string
- func (strsec *StringOrConfig) UnmarshalJSON(value []byte) error
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TypeToString ¶
TypeToString returns the human readable type of a stringOrConfig type.
Types ¶
type ConfigSource ¶
type ConfigSource struct { // Selects a key of a ConfigMap. // +optional ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty"` // Selects a key of a secret in the pod's namespace // +optional SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"` }
ConfigSource represents a source for the value of a config element. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (*ConfigSource) DeepCopy ¶
func (in *ConfigSource) DeepCopy() *ConfigSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSource.
func (*ConfigSource) DeepCopyInto ¶
func (in *ConfigSource) DeepCopyInto(out *ConfigSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StringOrConfig ¶
type StringOrConfig struct { Type Type StrVal string ConfigVal ConfigSource }
StringOrConfig represents a type that could be from a string or a configuration +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func FromConfig ¶
func FromConfig(c ConfigSource) *StringOrConfig
FromConfig creates a StringOrConfoig from a ConfigSoource.
func FromString ¶
func FromString(s string) *StringOrConfig
FromString creates a StringOrConfig from a string.
func (*StringOrConfig) Config ¶
func (strsec *StringOrConfig) Config() *ConfigSource
Config returns the strconf as a Config struct
func (*StringOrConfig) DeepCopy ¶
func (in *StringOrConfig) DeepCopy() *StringOrConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringOrConfig.
func (*StringOrConfig) DeepCopyInto ¶
func (in *StringOrConfig) DeepCopyInto(out *StringOrConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StringOrConfig) MarshalJSON ¶
func (strsec *StringOrConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface.
func (StringOrConfig) OpenAPISchemaFormat ¶
func (_ StringOrConfig) OpenAPISchemaFormat() string
OpenAPISchemaFormat is used by the kube-openapi generator when constructing the OpenAPI spec of this type.
func (StringOrConfig) OpenAPISchemaType ¶
func (_ StringOrConfig) OpenAPISchemaType() []string
OpenAPISchemaType is used by the kube-openapi generator when constructing the OpenAPI spec of this type.
See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
func (*StringOrConfig) String ¶
func (strsec *StringOrConfig) String() string
String returns the strconf as a string value
func (*StringOrConfig) UnmarshalJSON ¶
func (strsec *StringOrConfig) UnmarshalJSON(value []byte) error
UnmarshalJSON implements the json.Unmarshaller interface.