http

package
v0.0.0-...-98d7c9a Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const HeaderAccept = "Accept"

Variables

View Source
var MessageBadRequest = Message{Message: "bad request"}
View Source
var MessageInternalServerError = Message{Message: "internal server error"}
View Source
var MessageNotFound = Message{Message: "not found"}

Functions

func BadRequest

func BadRequest(c *fiber.Ctx) error

Types

type Config

type Config interface {
	DisableExternalParams() bool
}

type ConvParam

type ConvParam struct {
	Type        string `query:"type"`
	Width       *int   `query:"w"`
	Height      *int   `query:"h"`
	Crop        string `query:"crop"`
	Quality     *int   `query:"quality"`
	WebpQuality *int   `query:"webpq"`
	AvifQuality *int   `query:"avifq"`
	JpegQuality *int   `query:"jpegq"`
	Lossless    *bool  `query:"lossless"`
	Upscale     *bool  `query:"upscale"`
}

func (*ConvParam) GetCrop

func (c *ConvParam) GetCrop() internal.Crop

type Handler

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

func (*Handler) Get

func (h *Handler) Get(c *fiber.Ctx) error

func (*Handler) Put

func (h *Handler) Put(c *fiber.Ctx) error

type Message

type Message struct {
	Message string `json:"message"`
}

type Server

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

func ProvideServer

func ProvideServer(
	config Config,
	storage internal.Storage,
	converter internal.Converter,
	convertParamRepository internal.ConvertParamsRepository,
) *Server

func (*Server) Start

func (s *Server) Start() error

Jump to

Keyboard shortcuts

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