base

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolTrue

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

BoolTrue is a custom Yaml boolean type that defaults to true.

func (BoolTrue) Bool

func (b BoolTrue) Bool() bool

Bool returns the bool value.

func (*BoolTrue) UnmarshalYAML

func (b *BoolTrue) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements custom Yaml unmarshaling.

type MemStringOrInt

type MemStringOrInt int64

MemStringOrInt represents a string or an integer the String supports notations like 10m for then Megabyte of memory

func (*MemStringOrInt) UnmarshalYAML

func (s *MemStringOrInt) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaler interface.

type SliceOrMap

type SliceOrMap map[string]string

SliceOrMap represents a slice or a map of strings.

func (*SliceOrMap) UnmarshalYAML

func (s *SliceOrMap) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaler interface.

type StringOrInt

type StringOrInt int64

StringOrInt represents a string or an integer.

func (*StringOrInt) UnmarshalYAML

func (s *StringOrInt) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaler interface.

type StringOrSlice

type StringOrSlice []string

StringOrSlice represents a string or an array of strings. We need to override the yaml decoder to accept both options.

func (*StringOrSlice) UnmarshalYAML

func (s *StringOrSlice) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaler interface.

Jump to

Keyboard shortcuts

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