api

package
v0.0.0-...-fdd2a27 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MegaByte int64 = 10 << 10

Variables

View Source
var ErrDbPasswordMissing = errors.New("database password not given or found (usage: --dbpass <password> or DBPASS=<password>)")
View Source
var ErrDbUsernameMissing = errors.New("database username not given or found (usage: --dbuser <user> or DBUSER=<user>)")

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int
	Err        error
}

func InternalServerError

func InternalServerError(message string) *APIError

TODO determine if we actually need to return a pointer

func NewAPIError

func NewAPIError(code int, err error) *APIError

func (*APIError) Error

func (ae *APIError) Error() string

type APIServer

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

func NewAPIServer

func NewAPIServer(apiConfig config.APIConfig, s3Service s3.DownloadUploader, fileService file.Storer) *APIServer

func (*APIServer) StartRouter

func (a *APIServer) StartRouter()

StartRouter starts up a Gin router for the API

Jump to

Keyboard shortcuts

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