utils

package
v0.0.0-...-f30a32e Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreSameUUID

func AreSameUUID(pb1, pb2 *uuidpb.UUID) bool

AreSameUUID tells you if the two protos refer to the same underlying UUID.

func HashUUIDs

func HashUUIDs(ids []uuid.UUID) string

HashUUIDs generates a unique hash for a list of UUIDs.

func IsNilUUID

func IsNilUUID(u uuid.UUID) bool

IsNilUUID tells you if the given UUID is nil.

func IsNilUUIDProto

func IsNilUUIDProto(pb *uuidpb.UUID) bool

IsNilUUIDProto tells you if the given UUID is nil.

func ProtoFromUUID

func ProtoFromUUID(u uuid.UUID) *uuidpb.UUID

ProtoFromUUID converts a UUID to proto.

func ProtoFromUUIDStrOrNil

func ProtoFromUUIDStrOrNil(u string) *uuidpb.UUID

ProtoFromUUIDStrOrNil generates proto from string representation of a UUID (nil value is used if parsing fails).

func ProtoToUUIDStr

func ProtoToUUIDStr(pb *uuidpb.UUID) string

ProtoToUUIDStr generates an expensive string representation of a UUID proto.

func UUIDFromProto

func UUIDFromProto(pb *uuidpb.UUID) (uuid.UUID, error)

UUIDFromProto converts a proto message to uuid.

func UUIDFromProtoOrNil

func UUIDFromProtoOrNil(pb *uuidpb.UUID) uuid.UUID

UUIDFromProtoOrNil converts a proto message to uuid if error sets to nil uuid.

func ValidateOrgName

func ValidateOrgName(name string) error

ValidateOrgName checks to see if the specified org name is valid or not and returns nil for valid orgs, else returns and error informing why the name is considered invalid.

Types

type ErrorAccumulator

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

ErrorAccumulator is the struct that stores accumulated errors.

func MakeErrorAccumulator

func MakeErrorAccumulator() *ErrorAccumulator

MakeErrorAccumulator constructs the ErrorAccumulator.

func (*ErrorAccumulator) AddError

func (ea *ErrorAccumulator) AddError(e error)

AddError accumulates the passed in error if its not nil.

func (*ErrorAccumulator) Merge

func (ea *ErrorAccumulator) Merge() error

Merge returns a merged representation of the accumulated errors.

Directories

Path Synopsis
artifacts
Package namesgenerator generates random names.
Package namesgenerator generates random names.
shared
k8s
tar

Jump to

Keyboard shortcuts

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