mockdb

package
v0.0.0-...-8e92a4a Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 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, gorsk.User) (*gorsk.User, error)
	ViewFn           func(orm.DB, int) (*gorsk.User, error)
	FindByUsernameFn func(orm.DB, string) (*gorsk.User, error)
	FindByTokenFn    func(orm.DB, string) (*gorsk.User, error)
	ListFn           func(orm.DB, *gorsk.ListQuery, *gorsk.Pagination) ([]gorsk.User, error)
	DeleteFn         func(orm.DB, *gorsk.User) error
	UpdateFn         func(orm.DB, *gorsk.User) error
}

User database mock

func (*User) Create

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

Create mock

func (*User) Delete

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

Delete mock

func (*User) FindByToken

func (u *User) FindByToken(db orm.DB, token string) (*gorsk.User, error)

FindByToken mock

func (*User) FindByUsername

func (u *User) FindByUsername(db orm.DB, uname string) (*gorsk.User, error)

FindByUsername mock

func (*User) List

func (u *User) List(db orm.DB, lq *gorsk.ListQuery, p *gorsk.Pagination) ([]gorsk.User, error)

List mock

func (*User) Update

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

Update mock

func (*User) View

func (u *User) View(db orm.DB, id int) (*gorsk.User, error)

View mock

Jump to

Keyboard shortcuts

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