handler

package
v0.0.0-...-5f68cd4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest     = errors.New("bad request")
	ErrInvalidImage   = errors.New("invalid image")
	ErrPeopleNotFound = errors.New("people not found in image")
	ErrEncode         = errors.New("encode image error")
)

Functions

This section is empty.

Types

type CommonResp

type CommonResp struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data,omitempty"`
}

func NewCommonRespWithData

func NewCommonRespWithData(data interface{}) *CommonResp

func NewCommonRespWithError

func NewCommonRespWithError(code int, err error) *CommonResp

type Image

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

func NewImage

func NewImage(xmlPath string) *Image

func (*Image) Draw

func (i *Image) Draw(c *gin.Context)

func (*Image) Html

func (i *Image) Html(c *gin.Context)

func (*Image) Rectangles

func (i *Image) Rectangles(c *gin.Context)

type Point

type Point struct {
	X int `json:"x"`
	Y int `json:"y"`
}

type RectangleResp

type RectangleResp struct {
	Min Point `json:"min"`
	Max Point `json:"max"`
}

Jump to

Keyboard shortcuts

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