package
Version:
v0.0.0-...-7b751a3
Opens a new window with list of versions in this module.
Published: Nov 21, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
var (
TodoCreatedMsg = "Sucessfully created todo."
TodoUpdatedMsg = "Sucessfully updated todo."
TodoCompletedMsg = "Sucessfully completed todo."
)
type CreateTodo struct {
Text string `json:"text"`
DueAt time.Time `json:"dueAt"`
UserID string `json:"userID"`
}
type Todo struct {
ID string `json:"id"`
Text string `json:"text"`
Done bool `json:"done"`
CreatedAt time.Time `json:"createdAt"`
CompletedAt *time.Time `json:"completedAt,omitempty"`
DueAt time.Time `json:"dueAt"`
UserID string `json:"userID"`
}
type TodoMutationResponse struct {
Sucess bool `json:"sucess"`
Error *string `json:"error,omitempty"`
Message *string `json:"message,omitempty"`
Todo *Todo `json:"todo,omitempty"`
}
type UpdateTodo struct {
ID string `json:"id"`
Text string `json:"text"`
Done bool `json:"done"`
DueAt time.Time `json:"dueAt"`
UserID string `json:"userID"`
}
type User struct {
ID string `json:"id"`
Name string `json:"name"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.