store

package
v0.0.0-...-119f62b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const UserTable = "users"

Variables

This section is empty.

Functions

func Init

func Init() error

func Transaction

func Transaction(st Store, txFunc func(Store) error) (err error)

Transaction automatically commit/rollback the transaction.

Types

type Store

type Store interface {
	Users() UserStore
}

Store collected the storage APIs for the app.

func Get

func Get() Store

Get retrieves a global Store instance.

func NewStore

func NewStore(sqlstore internal.SqlStore) Store

type User

type User = models.User

type UserStore

type UserStore interface {
	Create(*User) error
	GetUserById(int64) (*User, error)
	GetUserByLogin(string) (*User, error)
	GetUserByGithubId(int64) (*User, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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