db

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatInfo

type ChatInfo struct {
	ChatID int64
}

type DB

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

func NewDB

func NewDB(path string) (DB, error)

NewDB open and load db if exist, or create new one if not exist

func (*DB) Delete

func (db *DB) Delete(key int64)

func (*DB) Get

func (db *DB) Get(key int64) ChatInfo

func (*DB) List

func (db *DB) List() []ChatInfo

func (*DB) Save

func (db *DB) Save() error

func (*DB) Update

func (db *DB) Update(key int64, value ChatInfo)

Jump to

Keyboard shortcuts

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