model

package
v0.0.0-...-646f264 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DateLayout is a layout used for dates
	DateLayout = "2006-01-02"
	// AuthHeaderKey is a header key used for authorization
	AuthHeaderKey = "Authorization"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentRequest

type ContentRequest struct {
	ID int `json:"id" binding:"required"`
}

ContentRequest is a request expected in the /content PUT endpoint

type ContentResponse

type ContentResponse struct {
	ID     int    `json:"id"`
	Name   string `json:"name"`
	Status int    `json:"status"`
}

ContentResponse is a response provided by the /content GET endpoint

type Item

type Item struct {
	ID            int
	Name          string
	LastUsageDate string
	IntervalDays  int
}

Item is a model of entity from mysql database

type UpdateItem

type UpdateItem struct {
	ID            int
	LastUsageDate string
}

UpdateItem is used for updating item in mysql database

Jump to

Keyboard shortcuts

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