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: 0

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