todosvc

package module
v0.0.0-...-7035f31 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 10 Imported by: 0

README

todosvc

A todo service.

$ git clone https://github.com/miku/todosvc.git
$ cd todosvc
$ make
$ ./todosvc

Go to http://localhost:3000.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalid = errors.New("invalid")

Functions

This section is empty.

Types

type Server

type Server struct {
	DB     *sqlx.DB
	Router *mux.Router
}

func (*Server) Routes

func (s *Server) Routes()

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Todo

type Todo struct {
	Id      int
	Title   string
	Done    bool
	Created time.Time
}

Todo item.

func (*Todo) Finish

func (t *Todo) Finish() error

Directories

Path Synopsis
cmd
todosvc command

Jump to

Keyboard shortcuts

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