user

package
v0.0.0-...-e4ee237 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	ID        uint64    `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"`
}

type LoginRequest

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

type LoginResponse

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

type Pagination

type Pagination struct {
	CurrentPage int32 `json:"current_page"`
	TotalPages  int32 `json:"total_pages"`
	PerPage     int32 `json:"per_page"`
	TotalItems  int32 `json:"total_items"`
}

type ProfileRequest

type ProfileRequest struct {
	ID uint64 `json:"id"`
}

type ProfileResponse

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

func (ProfileResponse) ToProtobuf

func (p ProfileResponse) ToProtobuf() *pb.ProfileResponse

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 {
	Data        Data              `json:"data"`
	FieldErrors map[string]string `json:"field_errors,omitempty"`
}

type Tokens

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

Jump to

Keyboard shortcuts

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