data

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String2StringPtr

func String2StringPtr(s string, nilIfEmpty bool) *string

Types

type ClubAddOrModifyRequestDto

type ClubAddOrModifyRequestDto struct {
	Title   string
	Content string
}

유저가 동아리를 추가하거나 수정해달라고 보낸 요청의 Body

type ClubDto

type ClubDto struct {
	ID          int      `json:"id"`
	Name        *string  `json:"name"`
	Summary     *string  `json:"summary"`
	Description *string  `json:"description"`
	Categories  []string `json:"categories"`
	Images      []string `json:"images"`
	Homepage    *string  `json:"homepage"`
	Instagram   *string  `json:"instagram"`
	Facebook    *string  `json:"facebook"`
	Phone       *string  `json:"phone"`
	Email       *string  `json:"email"`
	Recommended *bool    `json:"recommended"`
	Liked       *bool    `json:"liked"`
	LikeCount   int      `json:"like_count"`
}

유저의 요청에서의 입력용으로도 사용하고 유저의 요청에 대한 응답용으로도 사용

func MapClubToClubDto

func MapClubToClubDto(source *ent.Club) *ClubDto

type Group

type Group struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

내부적으로 사용하기 위함

type User

type User struct {
	ID     string   `json:"id"`
	Groups []string `json:"groups"`
}

내부적으로 사용하기 위함

func MapUserDto2User

func MapUserDto2User(src *UserDto) *User

type UserDto

type UserDto struct {
	Username string   `json:"username"`
	Groups   []*Group `json:"groups"`
}

유저 서비스에 API 요청에 대한 응답에 사용되는 User 타입

type UserResp

type UserResp struct {
	Message *string  `json:"message"`
	Data    *UserDto `json:"data"`
}

유저 서비스의 API 요청 형태

Jump to

Keyboard shortcuts

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