conf

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C struct {
	JsonLogger           bool      `yaml:"jsonLogger"`
	RateLimiting         bool      `yaml:"rateLimiting"`
	BaseURL              string    `yaml:"baseURL"`
	Port                 uint16    `yaml:"port"`
	KeyStore             string    `yaml:"keyStore"`
	SessionEncryptionKey string    `yaml:"sessionEncryptionKey"`
	DB                   DB        `yaml:"db"`
	Providers            Providers `yaml:"providers"`
	S3                   S3        `yaml:"s3"`
	Captcha              Captcha   `yaml:"captcha"`

	Key Key
}

func New

func New(path string) (*C, error)

func (*C) Validate

func (c *C) Validate() error

type Captcha

type Captcha struct {
	Turnstile Turnstile `yaml:"turnstile"`
}

type DB

type DB struct {
	Mysql  Mysql  `yaml:"mysql"`
	Sqlite Sqlite `yaml:"sqlite"`
	Turso  Turso  `yaml:"turso"`
}

type Key

type Key struct {
	Priv ed25519.PrivateKey
	Pub  ed25519.PublicKey
}

type Mysql

type Mysql struct {
	Enable   bool   `yaml:"enable"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

type Provider

type Provider struct {
	Enable       bool   `yaml:"enable"`
	ClientID     string `yaml:"clientID"`
	ClientSecret string `yaml:"clientSecret"`
}

type Providers

type Providers struct {
	Google Provider `yaml:"google"`
	Github Provider `yaml:"github"`
}

type S3

type S3 struct {
	Bucket string `yaml:"bucket"`
	Region string `yaml:"region"`
}

type Sqlite

type Sqlite struct {
	Enable bool   `yaml:"enable"`
	Path   string `yaml:"path"`
}

type Turnstile

type Turnstile struct {
	Enable    bool   `yaml:"enable"`
	SiteKey   string `yaml:"siteKey"`
	SecretKey string `yaml:"secretKey"`
}

type Turso

type Turso struct {
	Enable    bool   `yaml:"enable"`
	Database  string `yaml:"database"`
	AuthToken string `yaml:"authToken"`
}

Jump to

Keyboard shortcuts

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