dtos

package
v0.0.0-...-d3454a5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserRequest

type CreateUserRequest struct {
	Username  string `json:"username" validate:"required"`
	Email     string `json:"email" validate:"required,email"`
	Firstname string `json:"firstname"`
	Lastname  string `json:"lastname"`
	Password  string `json:"password"`
}

func (CreateUserRequest) Validate

func (r CreateUserRequest) Validate() error

type GetUsersResponse

type GetUsersResponse struct {
	Users []UserResponse `json:"users"`
}

type LoginRequest

type LoginRequest struct {
	Password string `json:"password"`
	Email    string `json:"email" validate:"required,email"`
}

func (LoginRequest) Validate

func (r LoginRequest) Validate() error

type LoginResponse

type LoginResponse struct {
	Email   string    `json:"email"`
	Token   string    `json:"token"`
	Expires time.Time `json:"expires"`
}

type MessageResponse

type MessageResponse struct {
	Message string `json:"message"`
}

type UserResponse

type UserResponse struct {
	ID        string    `json:"id"`
	Username  string    `json:"username"`
	Email     string    `json:"email"`
	Firstname string    `json:"firstname"`
	Lastname  string    `json:"lastname"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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