date

package
v0.0.0-...-8132f3d Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleDate

func HandleDate(w http.ResponseWriter, r *http.Request)

GET date handler

Types

type DateRequest

type DateRequest struct {
	After  time.Time      `schema:"after"`
	Before time.Time      `schema:"before"`
	Group  data.DateGroup `schema:"group"`
}

GET date request URL parameters

type DateResponse

type DateResponse struct {
	Day    int    `json:"day"`
	Month  int    `json:"month"`
	Year   int    `json:"year"`
	Trivia string `json:"trivia"`
}

GET date request response body

func (*DateResponse) FromDate

func (DateResponse *DateResponse) FromDate(date data.Date)

update date response using date

Jump to

Keyboard shortcuts

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