handlers

package
v0.0.0-...-a4a6259 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Key []byte
)

Functions

This section is empty.

Types

type Handler

type Handler struct {
	DB *mgo.Session
}

func New

func New(key []byte, db *mgo.Session) *Handler

func (*Handler) CreatePost

func (h *Handler) CreatePost(c echo.Context) (err error)

func (*Handler) CreateSave

func (h *Handler) CreateSave(c echo.Context) (err error)

func (*Handler) FetchAllSaves

func (h *Handler) FetchAllSaves(c echo.Context) (err error)

func (*Handler) FetchPost

func (h *Handler) FetchPost(c echo.Context) (err error)

func (*Handler) FetchSave

func (h *Handler) FetchSave(c echo.Context) (err error)

func (*Handler) Follow

func (h *Handler) Follow(c echo.Context) (err error)

func (*Handler) HandleUpsert

func (h *Handler) HandleUpsert(saveData, owner string) map[string]bson.M

func (*Handler) InitUpdateSave

func (h *Handler) InitUpdateSave(saveData []byte) bson.M

func (*Handler) InitUpsertIDMsg

func (h *Handler) InitUpsertIDMsg(saveData []byte) bson.M

func (*Handler) InitUpsertSave

func (h *Handler) InitUpsertSave(id, name, owner string, saveData []byte) bson.M

func (*Handler) Login

func (h *Handler) Login(c echo.Context) (err error)

func (*Handler) Signup

func (h *Handler) Signup(c echo.Context) (err error)

func (*Handler) UpdateSave

func (h *Handler) UpdateSave(c echo.Context) (err error)

func (*Handler) UpsertSave

func (h *Handler) UpsertSave(c echo.Context) (err error)

type HandlerErr

type HandlerErr struct {
	Code   string `json:"code"`
	Reason string `json:"reason"`
}

func NewErr

func NewErr(msg string) *HandlerErr

Jump to

Keyboard shortcuts

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