tests

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DBEngine *sqldb.EngineGroup
)

Functions

func InsertAuthGroup

func InsertAuthGroup(ids ...int)

func InsertAuthUserWithId

func InsertAuthUserWithId(ids ...int)

func InsertAuthUserWithName

func InsertAuthUserWithName(names ...string)

func InsertUserGroup

func InsertUserGroup(userId int, groupId int)

func RunWithDB

func RunWithDB(t *testing.T, test func(t *testing.T))

Types

type AuthGroup

type AuthGroup struct {
	Id   int
	Name string
}

type AuthUser

type AuthUser struct {
	ModelTime
	Id          int
	UserName    string `db:"username"`
	Age         int
	IsSuperuser bool `db:"is_superuser"`
}

type AuthUserGroups

type AuthUserGroups struct {
	Id      int
	UserId  int `db:"user_id"`
	GroupId int `db:"group_id"`
}

type ModelTime

type ModelTime struct {
	DateJoined time.Time      `db:"date_joined"`
	LastLogin  sql.NullString `db:"last_login"`
}

type SimpleAuthUser

type SimpleAuthUser struct {
	Id       int
	UserName string
}

Jump to

Keyboard shortcuts

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