dtos

package
v0.0.0-...-68e8b16 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrUpdateUser

type CreateOrUpdateUser struct {
	Register
	Role     types.Role `json:"role"`
	Verified *bool      `json:"verified,omitempty"`
}

type DTO

type DTO struct {
	utils.Validatable
}

func (*DTO) Validate

func (dto *DTO) Validate() (errs []string)

type GoogleSignInRequest

type GoogleSignInRequest struct {
	DTO
	IdToken string `json:"id_token"`
}

func (*GoogleSignInRequest) Validate

func (dto *GoogleSignInRequest) Validate() (errs []string)

Validate implements validatable returns any validation errors

type GoogleSignUpRequest

type GoogleSignUpRequest struct {
	DTO
	IdToken   string `json:"id_token"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Username  string `json:"username"`
}

func (*GoogleSignUpRequest) Validate

func (dto *GoogleSignUpRequest) Validate() (errs []string)

Validate implements validatable returns any validation errors

type Login

type Login struct {
	DTO
	Email    string `json:"email"`
	Password string `json:"password"`
}

type LoginSuccess

type LoginSuccess struct {
	User        LoginUser `json:"user"`
	AccessToken string    `json:"access_token"`
}

type LoginUser

type LoginUser struct {
	ID        string     `json:"id"`
	Username  string     `json:"username"`
	FirstName string     `json:"first_name"`
	LastName  string     `json:"last_name"`
	Role      types.Role `json:"role"`
}

type Register

type Register struct {
	DTO
	Email     string `json:"email"`
	Password  string `json:"password"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Username  string `json:"username"`
}

func (*Register) Validate

func (reg *Register) Validate() (errs []string)

Validate implements validatable returns any validation errors

Jump to

Keyboard shortcuts

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