storage

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEngine

func NewEngine(cfg *conf.Config, logger *log.Logger) (*xorm.Engine, error)

Types

type Storage

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

func NewStorage

func NewStorage(engine *xorm.Engine, logger *log.Helper) *Storage

NewStorage is the constructor of Storage

func NewTestStorage

func NewTestStorage() (*Storage, error)

func (*Storage) AutoMigrate

func (s *Storage) AutoMigrate() error

func (*Storage) DB

func (s *Storage) DB(ctx context.Context) *xorm.Session

func (*Storage) TX

func (s *Storage) TX(ctx context.Context, fn func(db *xorm.Session) error) error

Directories

Path Synopsis
try

Jump to

Keyboard shortcuts

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