package
Version:
v0.0.0-...-ab52134
Opens a new window with list of versions in this module.
Published: Sep 15, 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
¶
type CreateTodoRequest struct {
Title string `json:"title"`
Description string `json:"description"`
}
type CreateUserRequest struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
UserName string `json:"user_name"`
Email string `json:"email"`
Password string `json:"password"`
}
type LoginRequest struct {
UserName string `json:"user_name"`
Password string `json:"password"`
}
type LoginResponse struct {
UserName string `json:"user_name"`
Token string `json:"token"`
}
type Todo struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Completed bool `json:"completed"`
}
type UpdateTodoRequest struct {
Title string `json:"title"`
Description string `json:"description"`
Completed bool `json:"completed"`
}
type User struct {
ID int `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
UserName string `json:"user_name"`
Password string `json:"password"`
UserType string `json:"user_type"`
Email string `json:"email"`
CreatedAt time.Time `json:"created_at"`
}
func NewAccount(first_name, last_name, password, email, user_name string) (*User, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.