refs

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Defaults = TypeManager{
	reflect.TypeOf(intstr.IntOrString{}): intOrString, reflect.TypeOf(&intstr.IntOrString{}): intOrString,

	reflect.TypeOf(v1.ResourceList{}): resourceListParse, reflect.TypeOf(&v1.ResourceList{}): resourceListParse,
}

Functions

func GetField

func GetField(obj interface{}, name string) reflect.Value

func Unmarshal

func Unmarshal(obj interface{}, item *config.Directive)

func UnmarshalItem

func UnmarshalItem(obj interface{}, item *config.Directive)

func UnmarshalItemWith

func UnmarshalItemWith(obj interface{}, item *config.Directive, manager TypeManager)

func UnmarshalWith

func UnmarshalWith(obj interface{}, item *config.Directive, manager TypeManager)

Types

type TypeHandler

type TypeHandler func(fieldType reflect.Type, item *config.Directive) interface{}

type TypeManager

type TypeManager map[reflect.Type]TypeHandler

func (*TypeManager) DealWith

func (h *TypeManager) DealWith(fieldType reflect.Type, item *config.Directive) (reflect.Value, bool)

func (*TypeManager) With

func (h *TypeManager) With(fieldType reflect.Type, handler TypeHandler) *TypeManager

Jump to

Keyboard shortcuts

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