package
Version:
v0.0.0-...-d481519
Opens a new window with list of versions in this module.
Published: May 4, 2021
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Todo struct {
ID string `json:"id" bson:"id"`
Title string `json:"title" bson:"title,omitempty"`
Description string `json:"description" bson:"description,omitempty"`
Completed bool `json:"completed" bson:"completed,omitempty"`
Timestamp time.Time `json:"timestamp" bson:"timestamp,omitempty"`
}
type TodoCreatePayload struct {
ID string `json:"id"`
Title string `json:"title" validate:"required"`
Description string `json:"description" validate:"required"`
Timestamp time.Time `json:"timestamp"`
}
type TodoReplacePayload struct {
ID string `json:"id"`
Title string `json:"title" validate:"required,min=5"`
Description string `json:"description" validate:"required,min=15"`
Completed bool `json:"completed" validate:"omitempty"`
}
type TodoUpdatePayload struct {
ID string `json:"id"`
Title string `json:"title" validate:"omitempty,min=5"`
Description string `json:"description" validate:"omitempty,min=15"`
Completed bool `json:"completed" validate:"omitempty"`
}
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.