Documentation
¶
Overview ¶
Package todostatus represents the status of a todo in the system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Complete = newStatus("COMPLETE") Incomplete = newStatus("INCOMPLETE") )
The set of status types that can be used.
Functions ¶
Types ¶
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status represents a status type in the system.
func MustParse ¶
MustParse parses the string value and returns a status type if one exists. If an error occurs, the function panics.
func (Status) MarshalText ¶
MarshalText provides support for logging and any marshal needs.
type Todo ¶
type Todo struct { ID int `json:"id,omitempty"` Title string `json:"title" validate:"required, min=1,max=25" ` Status string `json:"status" validate:"required"` ExpiredAt *time.Time `json:"expired_at,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
type TodoRepository ¶
type TodoRepository interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.