handler

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountResponse added in v1.4.0

type CountResponse struct {
	Count int `json:"count"`
}

type DeleteResponse added in v1.1.0

type DeleteResponse struct {
	Status  string `json:"status"`
	PhotoID uint   `json:"photoId"`
}

type Handler

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

func New

func New(db *gorm.DB, config *data.Config) *Handler

func (*Handler) Count added in v1.4.0

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

func (*Handler) Delete added in v1.1.0

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

func (*Handler) First added in v1.4.0

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

func (*Handler) Index

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

func (*Handler) List

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

func (*Handler) Title

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

func (*Handler) Upload

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

type ListResponse

type ListResponse struct {
	Status string      `json:"status"`
	Page   int         `json:"page"`
	Next   string      `json:"next"`
	Photos []*ResPhoto `json:"photos"`
}

type ResPhoto

type ResPhoto struct {
	ID       uint   `json:"id"`
	Url      string `json:"url"`
	Img      string `json:"img"`
	Thumb    string `json:"thumb"`
	Width    int    `json:"width"`
	Height   int    `json:"height"`
	FileSize string `json:"filesize"`
	Posted   string `json:"posted"`
}

type UploadResponse

type UploadResponse struct {
	Status        string    `json:"status"`
	Photo         *ResPhoto `json:"photo"`
	DeletePhotoID uint      `json:"deletePhotoId"`
}

Jump to

Keyboard shortcuts

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