config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthData

type AuthData struct {
	Username string `json:"username"`
	UserID   int64  `json:"id"`
	Tokens   struct {
		Refresh string `json:"refresh"`
	} `json:"tokens"`
}

func InitAuthData

func InitAuthData() *AuthData

func (*AuthData) Save

func (a *AuthData) Save()

type Config

type Config struct {
	Theme Theme `json:"theme"`
}
var DefaultConfig Config

func InitConfig

func InitConfig() (*Config, error)

func (*Config) Save

func (c *Config) Save()

func (*Config) Validate

func (c *Config) Validate() error

type ConfigColors

type ConfigColors struct {
	BoardColor        int `json:"board"`
	BoardColorAlt     int `json:"board_alt"`
	BlackColor        int `json:"black"`
	BlackColorAlt     int `json:"black_alt"`
	WhiteColor        int `json:"white"`
	WhiteColorAlt     int `json:"white_alt"`
	CursorColorFG     int `json:"cursor_fg"`
	CursorColorBG     int `json:"cursor_bg"`
	LastPlayedColorBG int `json:"last_played_bg"`
}

type ConfigSymbols

type ConfigSymbols struct {
	BlackStone  rune `json:"black"`
	WhiteStone  rune `json:"white"`
	BoardSquare rune `json:"board"`
	Cursor      rune `json:"cursor"`
	LastPlayed  rune `json:"last_played"`
}

type InvalidConfig

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

func (*InvalidConfig) Error

func (e *InvalidConfig) Error() string

type Theme

type Theme struct {
	DrawStoneBackground      bool          `json:"draw_stone_bg"`
	DrawCursorBackground     bool          `json:"draw_cursor_bg"`
	DrawLastPlayedBackground bool          `json:"draw_last_played_bg"`
	FullWidthLetters         bool          `json:"fullwidth_letters"`
	Colors                   ConfigColors  `json:"colors"`
	Symbols                  ConfigSymbols `json:"symbols"`
}
var CatdogTheme Theme
var DefaultTheme Theme
var HongokuTheme Theme
var UnicodeTheme Theme
var VaporwaveTheme Theme

Jump to

Keyboard shortcuts

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