mockdb

package
v0.0.0-...-5c3d8b3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	CreateFn          func(orm.DB, twisk.User) (*twisk.User, error)
	ViewFn            func(orm.DB, int64) (*twisk.User, error)
	ListFn            func(orm.DB, string, int, int) ([]twisk.User, error)
	DeleteFn          func(orm.DB, *twisk.User) error
	UpdateFn          func(orm.DB, *twisk.User) (*twisk.User, error)
	FindByAuthFn      func(orm.DB, string) (*twisk.User, error)
	FindByTokenFn     func(orm.DB, string) (*twisk.User, error)
	UpdateLastLoginFn func(orm.DB, *twisk.User) error
}

User database mock

func (*User) Create

func (u *User) Create(db orm.DB, usr twisk.User) (*twisk.User, error)

Create mock

func (*User) Delete

func (u *User) Delete(db orm.DB, usr *twisk.User) error

Delete mock

func (*User) FindByAuth

func (u *User) FindByAuth(db orm.DB, auth string) (*twisk.User, error)

FindByAuth mock

func (*User) FindByToken

func (u *User) FindByToken(db orm.DB, auth string) (*twisk.User, error)

FindByToken mock

func (*User) List

func (u *User) List(db orm.DB, q string, limit, page int) ([]twisk.User, error)

List mock

func (*User) Update

func (u *User) Update(db orm.DB, usr *twisk.User) (*twisk.User, error)

Update mock

func (*User) UpdateLastLogin

func (u *User) UpdateLastLogin(db orm.DB, usr *twisk.User) error

UpdateLastLogin mock

func (*User) View

func (u *User) View(db orm.DB, id int64) (*twisk.User, error)

View mock

Jump to

Keyboard shortcuts

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