enrollment

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidAgentToken = errors.New("invalid agent token")

Functions

func BuildAgentToken

func BuildAgentToken(credentialID, secret string) string

func GenerateCredential

func GenerateCredential() (credentialID, secret, token string, err error)

func GeneratePairingToken

func GeneratePairingToken() (string, error)

GeneratePairingToken returns a UUID v4 suitable for a short-lived, single-use enrollment URL.

func GenerateSecret

func GenerateSecret() (string, error)

func GenerateUUID

func GenerateUUID() (string, error)

func HashSecret

func HashSecret(secret string) string

func LooksLikeUUID

func LooksLikeUUID(value string) bool

func ParseAgentToken

func ParseAgentToken(token string) (credentialID, secret string, err error)

Types

type RateLimiter

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

func NewRateLimiter

func NewRateLimiter(limit int, window time.Duration) *RateLimiter

func (*RateLimiter) Allow

func (l *RateLimiter) Allow(key string) (bool, time.Duration)

Jump to

Keyboard shortcuts

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