usersettings

package
v1.58.6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Languages = struct {
	En Language
	Ja Language
}{
	"en",
	"ja",
}
View Source
var Themes = struct {
	Dark  Theme
	Light Theme
}{
	"dark",
	"light",
}

Functions

This section is empty.

Types

type Language

type Language string

type Settings

type Settings struct {
	AutoLanguage bool      `json:"auto-language"`      // Language - use browser default
	AutoRegion   bool      `json:"auto-region"`        // Region - use browser default
	AutoTheme    bool      `json:"auto-theme"`         // Theme - use browser default
	AutoTimezone bool      `json:"auto-timezone"`      // Timezone - use browser default
	Language     *Language `json:"language,omitempty"` // Possible Values: `En`, `Ja`
	Region       *string   `json:"region,omitempty"`   // Region
	Scope        string    `json:"-" scope:"scope"`    // The scope of this setting (user, userdefaults)
	Theme        *Theme    `json:"theme,omitempty"`    // Possible Values: `Dark`, `Light`
	Timezone     *string   `json:"timezone,omitempty"` // Timezone
}

func (*Settings) HandlePreconditions added in v1.43.0

func (me *Settings) HandlePreconditions() error

func (*Settings) MarshalHCL

func (me *Settings) MarshalHCL(properties hcl.Properties) error

func (*Settings) Name

func (me *Settings) Name() string

func (*Settings) Schema

func (me *Settings) Schema() map[string]*schema.Schema

func (*Settings) UnmarshalHCL

func (me *Settings) UnmarshalHCL(decoder hcl.Decoder) error

type Theme

type Theme string

Jump to

Keyboard shortcuts

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