config

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Subdomain   string      `config:"subdomain"`
	SocialLogin SocialLogin `config:"social_login"`
	AppFolder   string      `config:"app_folder"`
	Themes      Themes      `config:"themes"`
}

func (APIConfig) Defaults

func (A APIConfig) Defaults() map[string]any

type BackgroundImages

type BackgroundImages struct {
	Register      string `config:"register" json:"register" yaml:"register"`
	ResetPassword string `config:"reset_password" json:"reset_password" yaml:"reset_password"`
	Login         string `config:"login" json:"login" yaml:"login"`
}

type Color

type Color struct {
	Hue        int `config:"hue" json:"hue"`
	Saturation int `config:"saturation" json:"saturation"`
	Lightness  int `config:"lightness" json:"lightness"`
}

func (Color) Validate

func (c Color) Validate() error

type ProviderConfig

type ProviderConfig struct {
	Enabled bool   `config:"enabled"`
	Key     string `config:"key"`
	Secret  string `config:"secret"`
}

type SocialLogin

type SocialLogin struct {
	Enabled  bool                      `config:"enabled"`
	Provider map[string]ProviderConfig `config:"provider"`
	Order    []string                  `config:"order"`
}

func (SocialLogin) Defaults

func (A SocialLogin) Defaults() map[string]any

type SystemColors

type SystemColors struct {
	Background           Color `config:"background" json:"system-color-1" yaml:"background"`
	SubtleBackground     Color `config:"subtle_background" json:"system-color-2" yaml:"subtle_background"`
	UIElementBackground  Color `config:"ui_element_background" json:"system-color-3" yaml:"ui_element_background"`
	HoveredUIElement     Color `config:"hovered_ui_element" json:"system-color-4" yaml:"hovered_ui_element"`
	ActiveUIElement      Color `config:"active_ui_element" json:"system-color-5" yaml:"active_ui_element"`
	Borders              Color `config:"borders" json:"system-color-6" yaml:"borders"`
	UIElementBorder      Color `config:"ui_element_border" json:"system-color-7" yaml:"ui_element_border"`
	HoveredElementBorder Color `config:"hovered_element_border" json:"system-color-8" yaml:"hovered_element_border"`
	SolidBackground      Color `config:"solid_background" json:"system-color-9" yaml:"solid_background"`
	HoveredSolidBg       Color `config:"hovered_solid_bg" json:"system-color-10" yaml:"hovered_solid_bg"`
	LowContrastText      Color `config:"low_contrast_text" json:"system-color-11" yaml:"low_contrast_text"`
	HighContrastText     Color `config:"high_contrast_text" json:"system-color-12" yaml:"high_contrast_text"`
}

type Theme

type Theme struct {
	Name             string           `config:"name" json:"name" yaml:"name"`
	ID               string           `config:"id" json:"id" yaml:"id"`
	SystemColors     SystemColors     `config:"system_colors" json:"system_colors" yaml:"system_colors"`
	BackgroundImages BackgroundImages `config:"background_images" json:"background_images" yaml:"background_images"`
	Default          bool             `config:"default" json:"default" yaml:"default"`
}

func (Theme) Validate

func (t Theme) Validate() error

type Themes

type Themes []Theme

func (Themes) Validate

func (t Themes) Validate() error

Jump to

Keyboard shortcuts

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