storage

package
v0.0.0-...-87db3fa Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTable

func NewTable() *table

NewTable 创建table

Types

type ExtInfo

type ExtInfo struct {
	StorageVersion string `json:"storage_version"`
}

func (ExtInfo) GetDbName

func (e ExtInfo) GetDbName() string

func (ExtInfo) GetKey

func (e ExtInfo) GetKey() string

func (ExtInfo) GetTableName

func (e ExtInfo) GetTableName() string

type IDSetter

type IDSetter interface {
	SetID(ID uint64)
}

IDSetter set id

type IteratorCallback

type IteratorCallback func(k, v []byte) error

type KVModel

type KVModel interface {
	Model
	GetKey() string
}

type LastSignIn

type LastSignIn struct{}

func (LastSignIn) GetDbName

func (p LastSignIn) GetDbName() string

func (LastSignIn) GetKey

func (p LastSignIn) GetKey() string

func (LastSignIn) GetTableName

func (p LastSignIn) GetTableName() string

type LastfmUser

type LastfmUser struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	RealName   string `json:"real_name"`
	Url        string `json:"url"`
	SessionKey string `json:"session_key"`
}

func (*LastfmUser) Clear

func (u *LastfmUser) Clear()

func (*LastfmUser) GetDbName

func (u *LastfmUser) GetDbName() string

func (*LastfmUser) GetKey

func (u *LastfmUser) GetKey() string

func (*LastfmUser) GetTableName

func (u *LastfmUser) GetTableName() string

func (*LastfmUser) InitFromStorage

func (u *LastfmUser) InitFromStorage()

func (*LastfmUser) Store

func (u *LastfmUser) Store()

type LocalDB

type LocalDB struct {
	*bbolt.DB
}

func NewLocalDB

func NewLocalDB(dbName string) (*LocalDB, error)

NewLocalDB 创建本地数据库

type LocalDBManager

type LocalDBManager struct {
	// contains filtered or unexported fields
}
var DBManager *LocalDBManager

func (*LocalDBManager) GetDBFromCache

func (dm *LocalDBManager) GetDBFromCache(db interface{}) (localDB *LocalDB, err error)

GetDBFromCache 从缓存中获取 LocalDB

type Model

type Model interface {
	GetDbName() string
	GetTableName() string
}

type PlayMode

type PlayMode struct{}

func (PlayMode) GetDbName

func (p PlayMode) GetDbName() string

func (PlayMode) GetKey

func (p PlayMode) GetKey() string

func (PlayMode) GetTableName

func (p PlayMode) GetTableName() string

type PlayerSnapshot

type PlayerSnapshot struct {
	CurSongIndex     int            `json:"cur_song_index"`
	Playlist         []structs.Song `json:"playlist"`
	PlaylistUpdateAt time.Time      `json:"playlist_update_at"`
}

func (PlayerSnapshot) GetDbName

func (p PlayerSnapshot) GetDbName() string

func (PlayerSnapshot) GetKey

func (p PlayerSnapshot) GetKey() string

func (PlayerSnapshot) GetTableName

func (p PlayerSnapshot) GetTableName() string

type User

type User struct{}

func (User) GetDbName

func (u User) GetDbName() string

func (User) GetKey

func (u User) GetKey() string

func (User) GetTableName

func (u User) GetTableName() string

type Volume

type Volume struct{}

func (Volume) GetDbName

func (v Volume) GetDbName() string

func (Volume) GetKey

func (v Volume) GetKey() string

func (Volume) GetTableName

func (v Volume) GetTableName() string

type VolumeStorable

type VolumeStorable interface {
	Volume() int
	SetVolume(volume int)
}

Jump to

Keyboard shortcuts

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