config

package
v0.0.0-...-f6cc6f7 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	comfig.Logger
	pgdb.Databaser
	comfig.Listenerer

	JwtConfig() *JwtConfig
	OAuth2GoogleConfig() *oauth2.Config
	OAuth2GoogleStateConfig() *OAuth2GoogleStateConfig
	EvmChainConfig(chain types.EVMChain) *EvmChainConfig
	RefreshCookieConfig() *RefreshCookieConfig
	PasswordRecoveryConfig() *PasswordRecoveryConfig
	EmailVerificationConfig() *EmailVerificationConfig
	WebConfig() *WebConfig

	Notificator() notificator.Connector
}

func New

func New(getter kv.Getter) Config

type EmailVerificationConfig

type EmailVerificationConfig struct {
	Secret    string
	TokenLife time.Duration
}

type EvmChainConfig

type EvmChainConfig struct {
	Client           *ethclient.Client
	Contract         *posts.Posts
	SenderPrivateKey *ecdsa.PrivateKey
}

type JwtConfig

type JwtConfig struct {
	Secret      string
	RefreshLife time.Duration
	AccessLife  time.Duration
}

type OAuth2GoogleStateConfig

type OAuth2GoogleStateConfig struct {
	StateSecret string
	StateLife   time.Duration
}

type PasswordRecoveryConfig

type PasswordRecoveryConfig struct {
	Secret    string
	TokenLife time.Duration
}

type RefreshCookieConfig

type RefreshCookieConfig struct {
	Name     string `figure:"name"`
	Path     string `figure:"path"`
	HttpOnly bool   `figure:"http_only"`
	Secure   bool   `figure:"secure"`
}

type WebConfig

type WebConfig struct {
	ConfirmationEndpoint *url.URL `fig:"confirmation_endpoint,required"`
	RecoveryEndpoint     *url.URL `fig:"recovery_endpoint,required"`
}

Jump to

Keyboard shortcuts

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