settings

package
v0.15.7 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: AGPL-3.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailTemplate

type EmailTemplate struct {
	Body    string `json:"body"`
	Subject string `json:"subject"`
}

type Meta

type Meta struct {
	AppName               string        `json:"appName"`
	AppURL                string        `json:"appUrl"`
	SenderName            string        `json:"senderName"`
	SenderAddress         string        `json:"senderAddress"`
	ResetPasswordTemplate EmailTemplate `json:"resetPasswordTemplate"`
}

type SMTP

type SMTP struct {
	Enabled    bool   `json:"enabled"`
	Host       string `json:"host"`
	Port       int    `json:"port"`
	Username   string `json:"username"`
	Password   string `json:"password"`
	AuthMethod string `json:"authMethod"`
	TLS        bool   `json:"tls"`
	LocalName  string `json:"localName"`
}

type Settings

type Settings struct {
	Meta                     Meta        `json:"meta"`
	SMTP                     SMTP        `json:"smtp"`
	RecordAuthToken          TokenConfig `json:"recordAuthToken"`
	RecordPasswordResetToken TokenConfig `json:"recordPasswordResetToken"`
	RecordVerificationToken  TokenConfig `json:"recordVerificationToken"`
}

func Load

func Load(ctx context.Context, queries *sqlc.Queries) (*Settings, error)

func Update

func Update(ctx context.Context, queries *sqlc.Queries, update func(settings *Settings)) (*Settings, error)

type TokenConfig

type TokenConfig struct {
	Secret   string `json:"secret"`
	Duration int    `json:"duration"`
}

Jump to

Keyboard shortcuts

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