config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigDir

func GetConfigDir() (string, error)

GetConfigDir : 設定ディレクトリを取得

func GetConfigFileNames

func GetConfigFileNames() ([]string, error)

GetConfigFileNames : 設定ディレクトリ以下のファイル名を取得

Types

type Config

type Config struct {
	// Cred : 認証
	Cred *Cred
	// Settings : 環境設定
	Settings *Settings
	// Style : スタイル
	Style *Style
	// contains filtered or unexported fields
}

Config : 設定

func New

func New() *Config

New : 新規作成

func (*Config) LoadCred

func (c *Config) LoadCred() (bool, error)

LoadCred : 認証情報を読込む

func (*Config) LoadSettings

func (c *Config) LoadSettings() error

LoadSettings : 環境設定を読込む

func (*Config) LoadStyle

func (c *Config) LoadStyle() error

LoadStyle : スタイルを読込む

func (*Config) SaveAll

func (c *Config) SaveAll() error

SaveAll : 一括保存

func (*Config) SaveCred

func (c *Config) SaveCred() error

SaveCred : 認証情報を保存

func (*Config) SaveSettings

func (c *Config) SaveSettings() error

SaveSettings : 環境設定を保存

type Cred

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

Cred : 認証情報

func (*Cred) Delete

func (c *Cred) Delete(userName string) error

Delete : 削除

func (*Cred) Get

func (c *Cred) Get(userName string) (*api.User, error)

Get : 取得

func (*Cred) GetAllNames

func (c *Cred) GetAllNames() []string

GetAllNames : 全てのユーザ名を取得

func (*Cred) Write

func (c *Cred) Write(newUser *api.User)

Write : 書込む

type Settings

type Settings struct {
	Feature    feature
	Appearance appearance
	Texts      texts
	Icon       icon
}

Settings : 環境設定

type Style

type Style struct {
	App          appStyle
	StatusBar    statusBarStyle
	Autocomplete autocompleteStyle
	Tweet        tweetStyle
	User         userStyle
}

Style : スタイル

Jump to

Keyboard shortcuts

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