utils

package
v2.10.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SecretSize = 32

Variables

This section is empty.

Functions

func Err

func Err(err error) []zap.Field

func GenerateClientID

func GenerateClientID() (string, error)

func GenerateClientSecret

func GenerateClientSecret() (string, error)

func GenerateKeyID

func GenerateKeyID(publicKey *rsa.PublicKey) (string, error)

func GenerateState

func GenerateState() (string, error)

func LoadOrGeneratePrivateKey

func LoadOrGeneratePrivateKey(keyPath string) (*rsa.PrivateKey, error)

func LoadOrGenerateSecret

func LoadOrGenerateSecret(secretPath string) ([]byte, error)

func LoadPrivateKey

func LoadPrivateKey(keyPath string) (*rsa.PrivateKey, error)

func Must

func Must[T any](v T, err error) T

func PrivateKeyFromPEM

func PrivateKeyFromPEM(pemStr string) (*rsa.PrivateKey, error)

func SavePrivateKey

func SavePrivateKey(keyPath string, privateKey *rsa.PrivateKey) error

func SecretFromBase64

func SecretFromBase64(encoded string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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