helpers

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(x, y interface{}) string

Diff prints the diff between two structs. It is useful in testing to compare two structs when they are large. In such a case, without Diff it will be difficult to pinpoint the difference between the two structs.

func GetHTTPMethodPointer

func GetHTTPMethodPointer(m v1beta1.HTTPMethod) *v1beta1.HTTPMethod

GetHTTPMethodPointer takes an HTTPMethod and returns a pointer to it. Useful in unit tests when initializing structs.

func GetHeaderMatchTypePointer

func GetHeaderMatchTypePointer(t v1beta1.HeaderMatchType) *v1beta1.HeaderMatchType

GetHeaderMatchTypePointer takes an HeaderMatchType and returns a pointer to it. Useful in unit tests when initializing structs.

func GetInt32Pointer

func GetInt32Pointer(i int32) *int32

GetInt32Pointer takes an int32 and returns a pointer to it. Useful in unit tests when initializing structs.

func GetQueryParamMatchTypePointer

func GetQueryParamMatchTypePointer(t v1beta1.QueryParamMatchType) *v1beta1.QueryParamMatchType

GetQueryParamMatchTypePointer takes an QueryParamMatchType and returns a pointer to it. Useful in unit tests when initializing structs.

func GetStringPointer

func GetStringPointer(s string) *string

GetStringPointer takes a string and returns a pointer to it. Useful in unit tests when initializing structs.

func GetTLSModePointer

func GetTLSModePointer(t v1beta1.TLSModeType) *v1beta1.TLSModeType

GetTLSModePointer takes a TLSModeType and returns a pointer to it. Useful in unit tests when initializing structs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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