tests

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseRouter

func BaseRouter() *gin.Engine

func InsertUser

func InsertUser(email string, password string) (user models.User)

func ResetDB

func ResetDB()

Types

type JSONRequest

type JSONRequest struct {
	Method string
	Url    string
	Body   interface{}
}

type JSONResonse

type JSONResonse struct {
	Code          int
	ResponseBytes []byte
}

func (*JSONResonse) ResponseString

func (res *JSONResonse) ResponseString() string

type Requester

type Requester struct {
	Engine  *gin.Engine
	Cookies map[string]string
}

func NewRequester

func NewRequester(engine *gin.Engine) (requester *Requester)

func (*Requester) DoRequest

func (requester *Requester) DoRequest(method string, url string, body interface{}) JSONResonse

func (*Requester) Get

func (requester *Requester) Get(url string) JSONResonse

func (*Requester) Post

func (requester *Requester) Post(url string, body interface{}) JSONResonse

Jump to

Keyboard shortcuts

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