shared

package
v0.0.0-...-7b751a3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TodoCreatedMsg   = "Sucessfully created todo."
	TodoUpdatedMsg   = "Sucessfully updated todo."
	TodoCompletedMsg = "Sucessfully completed todo."
)

Functions

This section is empty.

Types

type CreateTodo

type CreateTodo struct {
	Text   string    `json:"text"`
	DueAt  time.Time `json:"dueAt"`
	UserID string    `json:"userID"`
}

type Todo

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

type TodoMutationResponse struct {
	Sucess  bool    `json:"sucess"`
	Error   *string `json:"error,omitempty"`
	Message *string `json:"message,omitempty"`
	Todo    *Todo   `json:"todo,omitempty"`
}

type UpdateTodo

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

type User struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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