user

package
v0.0.0-...-02269d1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 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 LoginRequest

type LoginRequest struct {
	Mobile   string `json:"mobile"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	UserInfo    UserInfo          `json:"user"`
	Tokens      Tokens            `json:"tokens"`
	FieldErrors map[string]string `json:"field_errors,omitempty"`
}

type ProfileRequest

type ProfileRequest struct {
	ID types.ID `json:"id"`
}

type ProfileResponse

type ProfileResponse struct {
	UserInfo    UserInfo          `json:"user"`
	FieldErrors map[string]string `json:"field_errors,omitempty"`
}

type RefreshTokenRequest

type RefreshTokenRequest struct {
	RefreshToken string `form:"refresh_token" json:"refresh_token"`
}

type RefreshTokenResponse

type RefreshTokenResponse struct {
	Tokens      Tokens            `json:"tokens"`
	FieldErrors map[string]string `json:"field_errors,omitempty"`
}

type RegisterRequest

type RegisterRequest struct {
	Name     string `json:"name"`
	Mobile   string `json:"mobile"`
	Password string `json:"password"`
}

type RegisterResponse

type RegisterResponse struct {
	UserInfo    UserInfo          `json:"user"`
	FieldErrors map[string]string `json:"field_errors,omitempty"`
}

type Tokens

type Tokens struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

type UserInfo

type UserInfo struct {
	ID        types.ID  `json:"id"`
	Name      string    `json:"name"`
	Mobile    string    `json:"mobile"`
	Email     string    `json:"email"`
	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