config

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

func NewBranca added in v1.10.3

func NewBranca(cfg *Config) service.BrancaSecret

NewBranca for config.

func NewEd25519PrivateKey added in v1.10.3

func NewEd25519PrivateKey(cfg *Config) (ed25519.PrivateKey, error)

PrivateRSA from key.

func NewRSAPrivateKey added in v1.10.3

func NewRSAPrivateKey(cfg *Config) (*rsa.PrivateKey, error)

NewRSAPrivateKey from key.

func NewRSAPublicKey added in v1.10.3

func NewRSAPublicKey(cfg *Config) (*rsa.PublicKey, error)

NewRSAPublicKey from key.

Types

type Admin

type Admin struct {
	ID   string `yaml:"id"`
	Hash string `yaml:"hash"`
}

Admin for v1.

type Config

type Config struct {
	Issuer   string    `yaml:"issuer"`
	Key      Key       `yaml:"key"`
	Secret   Secret    `yaml:"secret"`
	Admins   []Admin   `yaml:"admins"`
	Services []Service `yaml:"services"`
}

Config for v1.

type Key

type Key struct {
	RSA     KeyPair `yaml:"rsa"`
	Ed25519 KeyPair `yaml:"ed25519"`
}

Key for v1.

func (*Key) Pair added in v1.10.0

func (k *Key) Pair(kind string) *KeyPair

Pair from kind.

type KeyPair added in v1.9.0

type KeyPair struct {
	Public  string `yaml:"public"`
	Private string `yaml:"private"`
}

RSA for v1.

type Secret added in v1.8.0

type Secret struct {
	Branca string `yaml:"branca"`
}

Secret for v1.

type Service added in v1.7.0

type Service struct {
	ID       string        `yaml:"id"`
	Hash     string        `yaml:"hash"`
	Duration time.Duration `yaml:"duration"`
}

Service for v1.

Jump to

Keyboard shortcuts

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