v1

package
v0.0.0-...-ccdf309 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAdminUser = "root"

	DefaultUser = "root"

	DefaultTTL = 15 * time.Second

	DefaultTokenMinTTL     = time.Minute
	DefaultTokenMaxTTL     = time.Hour
	DefaultTokenDefaultTTL = time.Hour

	DefaultMaxTokenSize = 64
)
View Source
const MaxSize = 128

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, cfg Configuration) (svc.Handler, error)

Types

type Configuration

type Configuration struct {
	Enabled bool

	TTL time.Duration

	Path string

	Create Token
}

func NewConfiguration

func NewConfiguration() Configuration

func (Configuration) Validate

func (c Configuration) Validate() error

func (Configuration) With

func (c Configuration) With(mods ...Mod) Configuration

type Mod

type Mod func(c Configuration) Configuration

type Token

type Token struct {
	DefaultUser string

	AllowedUsers []string

	MinTTL, MaxTTL, DefaultTTL time.Duration

	MaxSize uint16
}

func (Token) Validate

func (t Token) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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