utils

package
v0.0.0-...-4f57c4f Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComboErr

func ComboErr(input string, first error, second error) error

ComboErr combines a custom comment and two error messages into one formatted error.

func GetDirPath

func GetDirPath(r *http.Request) string

GetDirPath gets a directory path name from the URL and formats it

func NewErr

func NewErr(input string, err error) error

NewErr combines a custom comment and error into a new formatted error.

Types

type Context

type Context struct {
	Db     *sql.DB
	Bucket string
	Store  s3iface.S3API
	Port   string
}

Context contains general state variables for the server

func NewContext

func NewContext() *Context

NewContext initializes new general state variables

func (*Context) SetupDatabase

func (ctx *Context) SetupDatabase()

SetupDatabase sets up the db and checks connection conditions

Jump to

Keyboard shortcuts

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