storage

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryOptions

type QueryOptions struct {
	Method    string
	HasError  *bool
	StartTime *time.Time
	EndTime   *time.Time
	Limit     int
	Offset    int
	OrderBy   string
}

type SQLiteStorage

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

func NewSQLiteStorage

func NewSQLiteStorage(dbPath string, db *gorm.DB) *SQLiteStorage

func (*SQLiteStorage) Close

func (s *SQLiteStorage) Close() error

func (*SQLiteStorage) CreateTable

func (s *SQLiteStorage) CreateTable(table any) error

func (*SQLiteStorage) Delete

func (s *SQLiteStorage) Delete(record any) error

func (*SQLiteStorage) HasTable

func (s *SQLiteStorage) HasTable(table any) (bool, error)

func (*SQLiteStorage) Init

func (s *SQLiteStorage) Init() error

Init db and check the path and permission if user not provide the db, it will create a default db in the given path(dbPath)

func (*SQLiteStorage) Insert

func (s *SQLiteStorage) Insert(record any) error

func (*SQLiteStorage) QueryRpcCallRecords

func (s *SQLiteStorage) QueryRpcCallRecords(opts QueryOptions) ([]models.RpcCallRecord, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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