controllers

package
v0.0.0-...-f23655a Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JokeHandler

func JokeHandler(c *gin.Context)

JokeHandler retrieves a list of available jokes

func LikeJoke

func LikeJoke(c *gin.Context)

LikeJoke increments the likes of a particular joke Item

func RenderQRExport

func RenderQRExport(c *gin.Context)

Types

type Joke

type Joke struct {
	ID    int    `json:"id" binding:"required"`
	Likes int    `json:"likes"`
	Joke  string `json:"joke" binding:"required"`
}

Joke contains information about a single Joke

Jump to

Keyboard shortcuts

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