test

package
v0.0.0-...-57f2031 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuthCookie

func CheckAuthCookie(cookies []*http.Cookie, conf *configuration.GlobalConf, t *testing.T) *jwt.Token

func CleanDB

func CleanDB(db *sql.DB)

Clean empty all table in the training model

func Conf

func Conf() *configuration.GlobalConf

func CreateToken

func CreateToken(secret string, exp time.Time, id uuid.UUID, t *testing.T) string

func ExtractToken

func ExtractToken(tokenString string, jwtSecret string) (*jwt.Token, error)

func GetCookieByName

func GetCookieByName(cookies []*http.Cookie, name string) *http.Cookie

func InsertPlan

func InsertPlan(plan *model.Plan, db *sql.DB)

func InsertPlanSession

func InsertPlanSession(planSession *model.PlanSession, db *sql.DB)

func InsertUser

func InsertUser(user *model.User, db *sql.DB)

Types

This section is empty.

Jump to

Keyboard shortcuts

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