todo

package module
v0.0.0-...-21ca630 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

todo-app

Todo-app service

For run application:

make build && make run

If application run first time, you have to apply migration in database:

make migrate

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListItem

type ListItem struct {
	Id     int
	ListId int
	ItemId int
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Run

func (s *Server) Run(port string, handler http.Handler) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

type TodoItem

type TodoItem struct {
	Id          int    `json:"id" db:"id"`
	Title       string `json:"title" db:"title" binding:"required"`
	Description string `json:"description" db:"description"`
	Done        bool   `json:"done" db:"done"`
}

type TodoList

type TodoList struct {
	Id          int    `json:"id" db:"id"`
	Title       string `json:"title" db:"title" binding:"required"`
	Description string `json:"description" db:"description"`
}

type UpdateItemInput

type UpdateItemInput struct {
	Title       *string `json:"title"`
	Description *string `json:"description"`
	Done        *bool   `json:"done"`
}

func (UpdateItemInput) Validate

func (i UpdateItemInput) Validate() error

type UpdateListInput

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

func (UpdateListInput) Validate

func (i UpdateListInput) Validate() error

type User

type User struct {
	Id       int    `json:"-" db:"id"`
	Name     string `json:"name" binding:"required"`
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type UsersList

type UsersList struct {
	Id     int
	UserId int
	ListId int
}

Directories

Path Synopsis
pkg
service/mocks
Package mock_service is a generated GoMock package.
Package mock_service is a generated GoMock package.

Jump to

Keyboard shortcuts

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