config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAccount

func AddAccount(account Account)

func Save

func Save() error

func UpdateAccount

func UpdateAccount(phone string, cb func(account Account) Account)

Types

type Account

type Account struct {
	Phone string `json:"phone" yaml:"phone"`
	BDUSS string `json:"bduss" yaml:"bduss"`
}

func GetAccount

func GetAccount(phone string) (Account, bool)

func GetAccountOrFirst

func GetAccountOrFirst(phones ...string) Account

func (Account) GetKey

func (account Account) GetKey() string

type Config

type Config struct {
	Accounts cfg.Accounts[Account] `json:"accounts" yaml:"accounts"`
}

func C

func C() Config

Jump to

Keyboard shortcuts

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