config

package
v0.0.0-...-f40eccb Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTotpStr

func DecodeTotpStr(encoded string) string

DecodeTotpStr Decode TOTP string from base32

func EncodeTotpStr

func EncodeTotpStr(input string) string

EncodeTotpStr Encode TOTP string to base32

Types

type Data

type Data struct {
	DefaultQuality    string   `json:"quality"`
	SpDc              string   `json:"sp_dc"`
	AccessToken       string   `json:"accessToken"`
	ClientID          string   `json:"clientId"`
	ClientToken       string   `json:"clientToken"`
	AccessTokenExpire int64    `json:"accessTokenExpire"`
	AcceptLanguage    []string `json:"accept-language"`
	TOTP              TOTP     `json:"totp"`
}

type Manager

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

func NewConfigManager

func NewConfigManager() *Manager

func (*Manager) Get

func (cm *Manager) Get() Data

func (*Manager) GetDefault

func (cm *Manager) GetDefault() Data

func (*Manager) Initialize

func (cm *Manager) Initialize() *Manager

func (*Manager) ReadAndGet

func (cm *Manager) ReadAndGet() (Data, error)

func (*Manager) ReadConfig

func (cm *Manager) ReadConfig() error

func (*Manager) Set

func (cm *Manager) Set(newConfig Data)

func (*Manager) SetConfigPath

func (cm *Manager) SetConfigPath(path string) *Manager

type TOTP

type TOTP struct {
	Secret  string `json:"secret"`
	Version int    `json:"version"`
}

Jump to

Keyboard shortcuts

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