images

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Serves images to user interfaces

DB Tables | Image ID | Image Name | Relative Path |

The images repository stores physical graphics fles mapped to image IDs. All image files paths are stored in directory defined in the bungolow enviroment confguration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImage

func GetImage(w http.ResponseWriter, r *http.Request)

func GetImages

func GetImages(w http.ResponseWriter, r *http.Request)

func HandleError

func HandleError(w http.ResponseWriter, status int, err error)

func PostImage

func PostImage(w http.ResponseWriter, r *http.Request)

func UseImageHandlers

func UseImageHandlers(mux *chi.Mux)

Types

type Image

type Image struct {
	Id   ImageId
	Name string
	Path string
}

func CreateImage

func CreateImage(filename string, filebytes []byte) (Image, error)

func GetAllImages

func GetAllImages() []Image

func GetImageById

func GetImageById(id ImageId) (Image, error)

type ImageId

type ImageId string

func CreateExistingId

func CreateExistingId(id string) ImageId

func CreateNewId

func CreateNewId() ImageId

Jump to

Keyboard shortcuts

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