utils

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertUint16

func ConvertUint16(str string) uint16

func ConvertUint8

func ConvertUint8(str string) uint8

func CopyAndSetField

func CopyAndSetField[T any, V any](input *T, fieldName string, newValue *V) *T

CopyAndSetField creates a copy of the provided struct and sets the specified field to the new value.

func ExtractBearerToken

func ExtractBearerToken(authHeader string) string

func FormatEndpoint

func FormatEndpoint(endpoint string) string

func GenerateRandomString

func GenerateRandomString(n uint64) (string, error)

func IsValidObjectID

func IsValidObjectID(id string) bool

func LoadPEMFileInto

func LoadPEMFileInto(path string) ([]byte, error)

func MapTo

func MapTo[T any, V any](from *V) (*T, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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