dto

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Author: Daniel TAN Date: 2021-08-18 23:45:12 LastEditors: Daniel TAN LastEditTime: 2021-09-27 23:11:21 FilePath: /trinity-micro/example/internal/application/dto/user.go Description:

  • @Author: your name
  • @Date: 2021-08-18 23:45:12
  • @LastEditTime: 2021-09-07 10:46:25
  • @LastEditors: your name
  • @Description: In User Settings Edit
  • @FilePath: /trinity-micro/example/internal/application/dto/user.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetUserByIDRequest

type GetUserByIDRequest struct {
	CurrentUserID uint64 `header_param:"current_user_id"`
	ID            uint64 `path_param:"id"`
}

type GetUserByIDResponse

type GetUserByIDResponse UserDTO

func NewGetUserByIDResponse

func NewGetUserByIDResponse(m *model.User) *GetUserByIDResponse

type ListUserRequest

type ListUserRequest struct {
	Username      string `query_param:"username"`
	CurrentUserID uint64 `header_param:"current_user_id"`
}

type ListUserResponse

type ListUserResponse []UserDTO

func NewListUserResponse

func NewListUserResponse(m []model.User) ListUserResponse

type UserDTO

type UserDTO struct {
	ID       uint64 `json:"id,string"`
	Username string `json:"username"`
	Age      int    `json:"age"`
}

func NewUserDTO

func NewUserDTO(m *model.User) *UserDTO

Jump to

Keyboard shortcuts

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