mockdb

package
v1.0.0-13 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 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, model.User) (*model.User, error)
	// ViewFn            func(orm.DB, int64) (*model.User, error)
	// ListFn            func(orm.DB, string, int, int) ([]model.User, error)
	// DeleteFn          func(orm.DB, *model.User) error
	// UpdateFn          func(orm.DB, *model.User) (*model.User, error)
	FindByAuthFn      func(orm.DB, string) (*model.User, error)
	FindByTokenFn     func(orm.DB, string) (*model.User, error)
	UpdateLastLoginFn func(orm.DB, *model.User) error
}

User database mock

func (*User) FindByAuth

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

FindByAuth mock

func (*User) FindByToken

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

FindByToken mock

func (*User) UpdateLastLogin

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

UpdateLastLogin mock

Jump to

Keyboard shortcuts

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