configure

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(filename string) (e error)

Types

type Auth

type Auth struct {
	Auth bool
	Rule []AuthRule
}

type AuthRule

type AuthRule struct {
	URL    []string
	Bearer []string
}

type Configure

type Configure struct {
	Auth     Auth
	Server   Server
	Manager  Manager
	Provider Provider
	Logger   logger.Options
}

func DefaultConfigure

func DefaultConfigure() *Configure

type Manager

type Manager struct {
	// Token signature algorithm
	Method string
	// Signing key
	Key string
}

type Provider

type Provider struct {
	Backend string
	Memory  ProviderMemory
	Redis   ProviderRedis
	Bolt    ProviderBolt
}

type ProviderBolt

type ProviderBolt struct {
	Filename string

	Access  time.Duration
	Refresh time.Duration
	MaxSize int
	Batch   int
	Clear   time.Duration
}

type ProviderMemory

type ProviderMemory struct {
	Access  time.Duration
	Refresh time.Duration
	MaxSize int
	Batch   int
	Clear   time.Duration
}

type ProviderRedis

type ProviderRedis struct {
	URL     string
	Access  time.Duration
	Refresh time.Duration

	Batch       int
	KeyPrefix   string
	MetadataKey string
}

type Server

type Server struct {
	// http addr
	Addr string
	// if not empty use https
	CertFile string
	KeyFile  string
}

Jump to

Keyboard shortcuts

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