lib

package
v0.6.27 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SelfSignedCertOrganization = "Development"
	SelfSignedCertValidity     = 365 * 24 * time.Hour
	SelfSignedKeyLength        = 2048
)

Variables

This section is empty.

Functions

func ArraysCopy

func ArraysCopy[T any](items ...[]T) []T

func CaseInsensitiveSet added in v0.6.26

func CaseInsensitiveSet(m *map[string]any, key string, value any)

func CryptoGetRandomBytes

func CryptoGetRandomBytes(size int) []byte

func EnvAwareFilenames

func EnvAwareFilenames(env string, filename string) []string

func EnvGetCurrent

func EnvGetCurrent() string

func EnvOverrideVariables

func EnvOverrideVariables(m *map[string]any, keyCaseInsensitive bool)

func GenerateSelfSignedCert added in v0.6.6

func GenerateSelfSignedCert() (tls.Certificate, error)

func IdsGenerateUnique

func IdsGenerateUnique() string

func PathsSplit

func PathsSplit(filename string) (string, string, string)

func SerializeSlogAttrs

func SerializeSlogAttrs(attrs []slog.Attr) string

func StringsTrimLeadingSpace

func StringsTrimLeadingSpace(src string) string

func StringsTrimLeadingSpaceFromBytes

func StringsTrimLeadingSpaceFromBytes(src []byte) []byte

func StringsTrimTrailingSpace

func StringsTrimTrailingSpace(src string) string

func StringsTrimTrailingSpaceFromBytes

func StringsTrimTrailingSpaceFromBytes(src []byte) []byte

Types

type NullString

type NullString struct {
	String string
	Valid  bool
}

func (NullString) MarshalJSON

func (ns NullString) MarshalJSON() ([]byte, error)

func (*NullString) Scan

func (ns *NullString) Scan(value any) error

func (*NullString) UnmarshalJSON

func (ns *NullString) UnmarshalJSON(data []byte) error

func (NullString) Value

func (ns NullString) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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