parser

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AnnotationsPrefix defines the common prefix used in the ALB ingress controller
	AnnotationsPrefix = "alb.ingress.kubernetes.io"
)

Functions

func GetAnnotationWithPrefix

func GetAnnotationWithPrefix(suffix string) string

GetAnnotationWithPrefix returns the prefix of ingress annotations

func GetBoolAnnotation

func GetBoolAnnotation(name string, ing AnnotationInterface) (*bool, error)

GetBoolAnnotation extracts a boolean from an Ingress annotation

func GetInt64Annotation

func GetInt64Annotation(name string, ing AnnotationInterface) (*int64, error)

GetInt64Annotation extracts an int from an Ingress annotation

func GetStringAnnotation

func GetStringAnnotation(name string, ing AnnotationInterface) (*string, error)

GetStringAnnotation extracts a string from an Ingress annotation

func GetStringAnnotations

func GetStringAnnotations(name string, ing AnnotationInterface) (map[string]string, error)

GetStringAnnotations extracts a set of string annotations from an Ingress annotation

func GetStringSliceAnnotation

func GetStringSliceAnnotation(name string, ing AnnotationInterface) (out []string)

GetStringSliceAnnotation extracts a comma separated string list from an Ingress annotation

func MergeBool

func MergeBool(a, b *bool, d bool) *bool

MergeBool replaces a with b if it is undefined or the default value d

func MergeInt64

func MergeInt64(a, b *int64, d int64) *int64

MergeInt64 replaces a with b if it is undefined or the default value d

func MergeString

func MergeString(a, b *string, d string) *string

MergeString replaces a with b if it is undefined or the default value d

Types

type AnnotationInterface

type AnnotationInterface interface {
	GetAnnotations() map[string]string
}

type IngressAnnotation

type IngressAnnotation interface {
	Parse(ing AnnotationInterface) (interface{}, error)
}

IngressAnnotation has a method to parse annotations located in Ingress

type ServiceAnnotation

type ServiceAnnotation interface {
	Parse(svc AnnotationInterface) (interface{}, error)
}

ServiceAnnotation has a method to parse annotations located in Service

type String

type String interface {
	Merge(*String)
}

Jump to

Keyboard shortcuts

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