views

package
v0.0.0-...-f48d556 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAnime

func DeleteAnime(c echo.Context) error

DeleteAnime deletes an anime from the database, then returns a deleted document.

func GetAnime

func GetAnime(c echo.Context) error

GetAnime finds an anime by title and returns a title if any.

func PostAnime

func PostAnime(c echo.Context) error

PostAnime posts an anime and returns a posted anime if succeed.

func SearchAnime

func SearchAnime(c echo.Context) error

SearchAnime searches for matching anime and returns an anime page JSON response.

Types

type AnimeView

type AnimeView struct {
	ID           int64     `json:"_id"`
	Title        string    `json:"title"`
	Summary      string    `json:"summary"`
	Description  string    `json:"description"`
	Image        string    `json:"image_url"`
	CreatedAt    time.Time `json:"created_at"`
	AverageScore float64   `json:"average_score"`
	ScoreCount   int       `json:"score_count"`
}

AnimeView is an anime view that is being sent over by the server.

type JSONObject

type JSONObject map[string]interface{}

JSONObject is a type alias for map[string]interface{}

Jump to

Keyboard shortcuts

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