config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityPub added in v0.4.0

type ActivityPub struct {
	PubKeyPath  string `yaml:"pubkey"`
	PrivKeyPath string `yaml:"privkey"`
	PubK        *rsa.PublicKey
	PrivK       *rsa.PrivateKey
}

func (*ActivityPub) ExportPrivKey added in v0.4.0

func (ap *ActivityPub) ExportPrivKey() ([]byte, error)

func (*ActivityPub) ExportPubKey added in v0.4.0

func (ap *ActivityPub) ExportPubKey() ([]byte, error)

func (*ActivityPub) ParsePrivKey added in v0.4.0

func (ap *ActivityPub) ParsePrivKey(privPEM []byte) error

func (*ActivityPub) ParsePubKey added in v0.4.0

func (ap *ActivityPub) ParsePubKey(pubPEM []byte) error

type App added in v0.2.0

type App struct {
	LogLevel                 string `yaml:"log_level"`
	ResultsPerPage           int64  `yaml:"results_per_page"`
	DisableSignup            bool   `yaml:"disable_signup"`
	StaticDir                string `yaml:"static_dir"` // Deprecated: use Storage.Filesystem.RootDir instead
	CreateBookmarkFromWebapp bool   `yaml:"create_bookmark_from_webapp"`
	WebappSnapshotterTimeout int    `yaml:"webapp_snapshotter_timeout"`
	DebugSQL                 bool   `yaml:"debug_sql"`
}

type Config

type Config struct {
	App         App          `yaml:"app"`
	Server      Server       `yaml:"server"`
	DB          DB           `yaml:"db"`
	Storage     Storage      `yaml:"storage"`
	SMTP        SMTP         `yaml:"smtp"`
	ActivityPub *ActivityPub `yaml:"activitypub"`
	OAuth       OAuth        `yaml:"oauth"`
	// contains filtered or unexported fields
}

func CreateDefaultConfig added in v0.5.0

func CreateDefaultConfig() *Config

func Load

func Load(filename string) (*Config, error)

func (*Config) Filename added in v0.5.0

func (c *Config) Filename() string

type DB added in v0.2.0

type DB struct {
	Connection string `yaml:"connection"`
	Type       string `yaml:"type"`
}

type OAuth added in v0.3.0

type OAuth map[string]OAuthEntry

type OAuthEntry added in v0.3.0

type OAuthEntry struct {
	ClientID         string   `yaml:"client_id"`
	ClientSecret     string   `yaml:"client_secret"`
	ConfigurationURL string   `yaml:"configuration_url"`
	AuthURL          string   `yaml:"auth_url"`
	TokenURL         string   `yaml:"token_url"`
	Icon             string   `yaml:"icon"`
	Scopes           []string `yaml:"scopes"`
}

type SMTP added in v0.2.0

type SMTP struct {
	Host              string `yaml:"host"`
	Port              int    `yaml:"port"`
	Username          string `yaml:"username"`
	Password          string `yaml:"password"`
	Sender            string `yaml:"sender"`
	TLS               bool   `yaml:"tls"`
	TLSAllowInsecure  bool   `yaml:"tls_allow_insecure"`
	SendTimeout       int    `yaml:"send_timeout"`
	ConnectionTimeout int    `yaml:"connection_timeout"`
}

type Server added in v0.2.0

type Server struct {
	Address          string `yaml:"address"`
	BaseURL          string `yaml:"base_url"`
	SecureCookie     bool   `yaml:"secure_cookie"`
	RemoteUserHeader string `yaml:"remote_user_header"`
}

type Storage added in v0.2.0

type Storage struct {
	Filesystem *StorageFilesystem `yaml:"fs"`
}

type StorageFilesystem added in v0.5.0

type StorageFilesystem struct {
	RootDir string `yaml:"root_dir"`
}

Jump to

Keyboard shortcuts

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