stores

package
v0.0.0-...-0e80e98 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store 是抽卡记录存储

func New

func New(logs []gacha.Log) *Store

New 创建抽卡记录存储

func (*Store) Add

func (store *Store) Add(logs ...gacha.Log)

Add 添加抽卡记录

func (*Store) BackupAndSave

func (store *Store) BackupAndSave(filename string) error

BackupAndSave 备份并将抽卡记录写入文件

func (*Store) Load

func (store *Store) Load(filename string) error

Load 从文件读取抽卡记录

func (*Store) LoadIfExists

func (store *Store) LoadIfExists(filename string) error

LoadIfExists 从文件读取抽卡记录,如果文件不存在则忽略

func (*Store) Save

func (store *Store) Save(filename string) error

Save 将抽卡记录写入文件

func (*Store) Unique

func (store *Store) Unique() []gacha.Log

func (*Store) Update

func (store *Store) Update(auth *auths.Auth, f func(log gacha.Log)) error

Update 更新抽卡记录

Jump to

Keyboard shortcuts

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