settings

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appearance

type Appearance struct {
	SiteTitle   string `json:"site_title" title:"Title" formType:"textarea" description:"The title of this site."`
	SiteFavicon string `` /* 155-byte string literal not displayed */
	SiteHead    string `` /* 130-byte string literal not displayed */
	SiteHeader  string `json:"site_header" title:"Header" formType:"textarea" description:"Injected at page start."`
	SiteFooter  string `json:"site_footer" title:"Footer" formType:"textarea" description:"Injected at page end."`

	FeaturedAlbumName string `` /* 153-byte string literal not displayed */

	Languages []string `json:"languages" title:"Languages" description:"Supported content languages."`
	// contains filtered or unexported fields
}

func (Appearance) LanguageMatcher

func (a Appearance) LanguageMatcher() (language.Matcher, []string)

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(r Repository, dc *dep.Cache) (*Manager, error)

func (*Manager) Appearance

func (m *Manager) Appearance() Appearance

func (*Manager) Maps

func (m *Manager) Maps() Maps

func (*Manager) Privacy

func (m *Manager) Privacy() Privacy

func (*Manager) Security

func (m *Manager) Security() Security

func (*Manager) SetAppearance

func (m *Manager) SetAppearance(ctx context.Context, value Appearance) (err error)

func (*Manager) SetMaps

func (m *Manager) SetMaps(ctx context.Context, value Maps) error

func (*Manager) SetPrivacy

func (m *Manager) SetPrivacy(ctx context.Context, value Privacy) error

func (*Manager) SetSecurity

func (m *Manager) SetSecurity(ctx context.Context, value Security) error

func (*Manager) SetStorage

func (m *Manager) SetStorage(ctx context.Context, value Storage) error

func (*Manager) SetVisitors

func (m *Manager) SetVisitors(ctx context.Context, value Visitors) error

func (*Manager) Storage

func (m *Manager) Storage() Storage

func (*Manager) Visitors

func (m *Manager) Visitors() Visitors

type Maps

type Maps struct {
	Tiles       string `` /* 174-byte string literal not displayed */
	Attribution string `json:"attribution" title:"Attribution" description:"Map tiles attribution."`
	Cache       bool   `json:"cache" inlineTitle:"Cache tiles." noTitle:"true" title:"Cache" description:"Enable local cache of map tiles."`
}

type Privacy

type Privacy struct {
	HideTechDetails   bool `` /* 131-byte string literal not displayed */
	HideGeoPosition   bool `` /* 127-byte string literal not displayed */
	HideOriginal      bool `` /* 168-byte string literal not displayed */
	HideBatchDownload bool `` /* 146-byte string literal not displayed */
	HideLoginButton   bool `` /* 213-byte string literal not displayed */
	PublicHelp        bool `json:"public_help" inlineTitle:"Publicly show help page." noTitle:"true" description:"Disables auth requirement for '/help'."`
}

type Repository

type Repository interface {
	Get(ctx context.Context, name string, value any) error
	Set(ctx context.Context, name string, value any) error
}

type Security

type Security struct {
	PassHash string `json:"pass_hash"`
	PassSalt string `json:"pass_salt"`
}

func (Security) Disabled

func (s Security) Disabled() bool

type Storage

type Storage struct {
	WebDAV bool `` /* 185-byte string literal not displayed */
}

type Values

type Values interface {
	Security() Security
	Appearance() Appearance
	Maps() Maps
	Visitors() Visitors
	Storage() Storage
	Privacy() Privacy
}

type Visitors

type Visitors struct {
	Tag       bool `json:"tag" inlineTitle:"Tag unique visitors with cookies." noTitle:"true"`
	AccessLog bool `json:"access_log" inlineTitle:"Enable access log." noTitle:"true"`
}

Jump to

Keyboard shortcuts

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