helpers

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start() func()

Start begins a new db transaction and returns a func that will roll back the transaction. This function is NOT thread-safe, but this is fine because each test within a test package runs in serial.

func TestMain

func TestMain(m *testing.M)

TestMain initialises the environment and database for the current test package, runs the tests, and then drops the test database.

Types

type Response

type Response struct {
	*http.Response
	Body string
}

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewSession

func NewSession(role int64, handlers ...func(c *fiber.Ctx) error) *Session

NewSession returns a new session with the requested auth state.

func (*Session) Get

func (self *Session) Get(path string) *Response

func (*Session) PostForm

func (self *Session) PostForm(path string, formData map[string]string) *Response

func (*Session) PostJSON

func (self *Session) PostJSON(path string, jsonData any) *Response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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