handlers

package
v0.0.0-...-d11079c Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"error"`
}

ErrorResponse holds an error message

type Handler

type Handler struct {
	Storage storage.Storage
}

Handler represents the structure of our resource

func (*Handler) Asset

func (h *Handler) Asset(c echo.Context) error

func (*Handler) Root

func (h *Handler) Root(c echo.Context) error

Root returns the welcome message

func (*Handler) Stats

func (h *Handler) Stats(c echo.Context) error

Stats returns runtime and vips stats

func (*Handler) Upload

func (h *Handler) Upload(c echo.Context) error

type Response

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

type Runtime

type Runtime struct {
	Alloc      uint64 `json:"alloc"`
	HeapInuse  uint64 `json:"heap_inuse"`
	Sys        uint64 `json:"sys"`
	TotalAlloc uint64 `json:"total_alloc"`
}

type Stats

type Stats struct {
	Vips    Vips    `json:"vips"`
	Runtime Runtime `json:"runtime"`
}

type Vips

type Vips struct {
	Mem     VipsMem     `json:"mem"`
	Runtime VipsRuntime `json:"runtime"`
}

type VipsMem

type VipsMem struct {
	Mem     int64 `json:"mem"`
	MemHigh int64 `json:"mem_high"`
	Files   int64 `json:"files"`
	Allocs  int64 `json:"allocs"`
}

type VipsRuntime

type VipsRuntime struct {
	OperationCounts map[string]int64 `json:"operations_counts"`
}

Jump to

Keyboard shortcuts

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