apiutils

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Of

func Of[E any](e E) *E

Of returns a pointer to the provided literal/const input

func SafeString

func SafeString(s *string) string

SafeString returns a string representation of a string pointer.

func StrPtr

func StrPtr(notEmpty string) *string

func ValidateIDAsInt32

func ValidateIDAsInt32(id string, entityName string) (int32, error)

ValidateIDAsInt32 validates and converts a string ID to int32

func ValidateIDAsInt32Ptr

func ValidateIDAsInt32Ptr(id *string, entityName string) (*int32, error)

ValidateIDAsInt32Ptr validates and converts a string pointer ID to int32 pointer

func ValidateIDAsInt64

func ValidateIDAsInt64(id string, entityName string) (int64, error)

ValidateIDAsInt64 validates and converts a string ID to int64

func ValidateIDAsInt64Ptr

func ValidateIDAsInt64Ptr(id *string, entityName string) (*int64, error)

ValidateIDAsInt64Ptr validates and converts a string pointer ID to int64 pointer

func ZeroIfNil

func ZeroIfNil[T any](input *T) T

ZeroIfNil return the zeroed value if input is a nil pointer

Types

This section is empty.

Jump to

Keyboard shortcuts

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