ec

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 40

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

Bool creates a new bool pointer from a boolean

func CompareStructs

func CompareStructs(a, b interface{}) (equals bool, diff string, err error)

CompareStructs two structs and return the differences

func Int added in v1.2.0

func Int(i int) *int

Int creates a new int pointer from an int

func Int32

func Int32(i int32) *int32

Int32 creates a new int32 pointer from an int32

func Int64

func Int64(i int64) *int64

Int64 creates a new int64 pointer from an int64

func RandomResourceID

func RandomResourceID() string

RandomResourceID generates a random string of 32 characters which emulates a real Elastic Cloud resource ID.

func RandomResourceLength

func RandomResourceLength(n int) string

RandomResourceLength generates a random string of n characters.

func RequireRegionSet

func RequireRegionSet(region string) error

RequireRegionSet takes in a string and returns an error when it's empty or when the contents are spaces.

func String

func String(s string) *string

String creates a new string pointer from a string

Types

type Validator

type Validator interface {
	Validate() error
}

Validator interface is mostly used for parameter structures that need to check a set of conditions and act as a gate before running expensive external calls

Jump to

Keyboard shortcuts

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