util

package
v0.0.0-...-b42a24c Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadEnvFile

func LoadEnvFile(filename string) error

LoadEnvFile sets all the valid environment variables from the given filename

func SetupTestCareerProfile

func SetupTestCareerProfile(email string) (careerProfile *types.CareerProfile, message string, err error)

SetupTestCareerProfile inserts a fake CareerProfile in MongoDB that can be used for testing

func SetupTestEnvironment

func SetupTestEnvironment(t *testing.T)

SetupTestEnvironment sets fake environment variables used for testing. These should match the variables from .env

func SetupTestRouter

func SetupTestRouter() (router *gin.Engine, recorder *httptest.ResponseRecorder)

SetupTestRouter initializes a gin router and a httptest recorder to mock http calls

Types

type Util

type Util interface {
	LoadEnvFile(string) error
}

Jump to

Keyboard shortcuts

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