domain

package
v0.0.0-...-d481519 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTodoNotFound = errors.New("todo not found")
)

Functions

This section is empty.

Types

type Todo

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"`
}

func (Todo) TableName

func (Todo) TableName() string

type TodoCreatePayload

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

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

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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