iris/_examples/tutorial/vuejs-todo-mvc/src/todo/item.go
Gerasimos (Makis) Maropoulos 0b2dcc76f5 start of the vue + mvc example and a simple session binding
Former-commit-id: 994f00952352c93d270ad197cb843f3222fb37c0
2017-12-14 05:56:23 +02:00

25 lines
315 B
Go

package todo
type State uint32
const (
StateActive State = iota
StateCompleted
)
func ParseState(s string) State {
switch s {
case "completed":
return StateCompleted
default:
return StateActive
}
}
type Item struct {
OwnerID string
ID int64
Body string
CurrentState State
}