entity

package
v0.0.0-...-f068abf Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "gokit-service"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTodoRequest

type CreateTodoRequest struct {
	Title       string `json:"title"`
	Description string `json:"description"`
}

type CreateTodoResponse

type CreateTodoResponse struct {
	Code    int32  `json:"code"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

type DeleteTodoRequest

type DeleteTodoRequest struct {
	ID string `json:"id"`
}

type DeleteTodoResponse

type DeleteTodoResponse struct {
	Code    int32  `json:"code"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

type GetAllTodoRequest

type GetAllTodoRequest struct{}

type GetAllTodoResponse

type GetAllTodoResponse struct {
	Code    int32  `json:"code"`
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    []Todo `json:"data"`
}

type GetTodoByIDRequest

type GetTodoByIDRequest struct {
	ID string `json:"id"`
}

type GetTodoByIDResponse

type GetTodoByIDResponse struct {
	Code    int32  `json:"code"`
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    Todo   `json:"data"`
}

type Status

type Status string
const (
	DRAFT       Status = "DRAFT"
	IN_PROGRESS Status = "IN_PROGRESS"
	CANCEL      Status = "CANCEL"
	DONE        Status = "DONE"
)

func (Status) ToLower

func (s Status) ToLower() string

func (Status) ToNumber

func (s Status) ToNumber() int32

func (Status) ToUpper

func (s Status) ToUpper() string

type Todo

type Todo struct {
	ID          string `json:"id,omitempty"`
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Status      Status `json:"status,omitempty"`
}

type UpdateTodoRequest

type UpdateTodoRequest struct {
	ID          string `json:"id,omitempty"`
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Status      Status `json:"status,omitempty"`
}

type UpdateTodoResponse

type UpdateTodoResponse struct {
	Code    int32  `json:"code"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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