helpers

package
v0.0.0-...-31a1c6c Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbedMigrations embed.FS

Functions

func CreateFormImagePart

func CreateFormImagePart(writer *multipart.Writer, fieldname string, filename string, contentType string) (io.Writer, error)

func CreateImage

func CreateImage() image.Image

Creating an image in memory for testing: https://yourbasic.org/golang/create-image/

func CreateTestDatabase

func CreateTestDatabase(name string) *memory.DbProvider

func CreateTextFormHeader

func CreateTextFormHeader(writer *multipart.Writer, fieldname string) (io.Writer, error)

func GetAppSettings

func GetAppSettings(app_num int) common.AppSettings

GetAppSettings gets the settings for the http servers taking into account a unique port. Very hacky way to get a unique port: manually have to pass a new number for every test... TODO : Find a way to assign a unique port at compile

time

func RunDatabaseServer

func RunDatabaseServer(app_settings common.AppSettings)

func WaitForDb

func WaitForDb(app_settings common.AppSettings) (database.SqlDatabase, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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