config

package
v0.0.0-...-98cd694 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DatabaseConfigProviders represents this package's offering to the dependency manager.
	DatabaseConfigProviders = wire.NewSet(
		ProvideSessionManager,
	)
)

Functions

func ProvideSessionManager

func ProvideSessionManager(cookieConfig *authservice.CookieConfig, dm database.DataManager) (*scs.SessionManager, error)

ProvideSessionManager provides a session manager based on some settings. There's not a great place to put this function. I don't think it belongs in Auth because it accepts a DB connection, but it obviously doesn't belong in the database package, or maybe it does.

Types

type Config

type Config struct {
	OAuth2TokenEncryptionKey string        `json:"oauth2TokenEncryptionKey" toml:"oauth2_token_encryption_key,omitempty"`
	ConnectionDetails        string        `json:"connectionDetails"        toml:"connection_details,omitempty"`
	Debug                    bool          `json:"debug"                    toml:"debug,omitempty"`
	LogQueries               bool          `json:"logQueries"               toml:"log_queries,omitempty"`
	RunMigrations            bool          `json:"runMigrations"            toml:"run_migrations,omitempty"`
	MaxPingAttempts          uint64        `json:"maxPingAttempts"          toml:"max_ping_attempts,omitempty"`
	PingWaitPeriod           time.Duration `json:"pingWaitPeriod"           toml:"ping_wait_period,omitempty"`
	// contains filtered or unexported fields
}

Config represents our database configuration.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates an DatabaseSettings struct.

Jump to

Keyboard shortcuts

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