Documentation
¶
Index ¶
- Constants
- Variables
- func Connect(cfg *configs.Config) *sql.DB
- type AdminBoardLevelPolicy
- type AdminBoardPointPolicy
- type AdminBoardResult
- type AdminCreateBoardResult
- type AdminDashboardItem
- type AdminDashboardLatest
- type AdminDashboardLatestContent
- type AdminDashboardReport
- type AdminDashboardStatistic
- type AdminDashboardStatisticResult
- type AdminDashboardStatus
- type AdminGroupBoardItem
- type AdminGroupBoardStatus
- type AdminGroupConfig
- type AdminGroupListResult
- type AdminLatestComment
- type AdminLatestCommentResult
- type AdminLatestCommon
- type AdminLatestParameter
- type AdminLatestPost
- type AdminLatestPostResult
- type AdminReportItem
- type AdminReportParameter
- type AdminReportResult
- type AdminUserInfo
- type AdminUserItem
- type AdminUserItemResult
- type AdminUserParameter
- type Board
- type BoardAction
- type BoardActionLevel
- type BoardActionPoint
- type BoardAttachedImage
- type BoardAttachment
- type BoardBasicConfig
- type BoardBasicSettingResult
- type BoardCommonListItem
- type BoardCommonPostItem
- type BoardConfig
- type BoardExif
- type BoardFile
- type BoardHomePostItem
- type BoardHomePostResult
- type BoardItem
- type BoardListItem
- type BoardListParameter
- type BoardListResult
- type BoardMovePostParameter
- type BoardThumbnail
- type BoardViewCommonParameter
- type BoardViewDownloadResult
- type BoardViewLikeParameter
- type BoardViewParameter
- type BoardViewResult
- type BoardWriter
- type BoardWriterLatestComment
- type BoardWriterLatestCommon
- type BoardWriterLatestPost
- type ChangeUserPointParameter
- type ChatHistory
- type ChatItem
- type Code
- type CommentItem
- type CommentLikeParameter
- type CommentListParameter
- type CommentListResult
- type CommentModifyParameter
- type CommentReplyParameter
- type CommentWriteParameter
- type ContextKey
- type EditorConfigResult
- type EditorInsertImageParameter
- type EditorInsertImageResult
- type EditorLoadPostResult
- type EditorModifyParameter
- type EditorRemoveAttachedParameter
- type EditorSaveExifParameter
- type EditorSaveFileParameter
- type EditorSaveThumbnailParameter
- type EditorTagItem
- type EditorWriteParameter
- type GalleryGridItem
- type GalleryListResult
- type GalleryPhotoResult
- type GoogleUser
- type HomeMainArticle
- type HomeMainComment
- type HomeMainPage
- type HomePostItem
- type HomePostParameter
- type HomeSidebarBoardResult
- type HomeSidebarGroupResult
- type HomeSitemapURL
- type HomeVisitResult
- type InsertNotificationParameter
- type KakaoUser
- type MyInfoResult
- type NaverUser
- type Noti
- type NotificationItem
- type Paging
- type Pair
- type PointAction
- type ResetPasswordResult
- type ResponseCommon
- type Search
- type SignupParameter
- type SignupResult
- type StatisticColumn
- type Status
- type SyncImageItem
- type SyncPostItem
- type Table
- type Triple
- type UpdatePointParameter
- type UpdateUserInfoParameter
- type UploadCategory
- type UserAction
- type UserBasicInfo
- type UserInfoResult
- type UserPermissionReportResult
- type UserPermissionResult
- type VerifyParameter
Constants ¶
const ( CREATE_BOARD_ADMIN = 1 CREATE_BOARD_TYPE = 0 /* board */ CREATE_BOARD_NAME = "board name" CREATE_BOARD_INFO = "description for this board" CREATE_BOARD_ROWS = 15 CREATE_BOARD_WIDTH = 1000 CREATE_BOARD_USE_CAT = 1 CREATE_BOARD_LV_LIST = 0 CREATE_BOARD_LV_VIEW = 0 CREATE_BOARD_LV_WRITE = 1 /* 0 is not allowed */ CREATE_BOARD_LV_COMMENT = 1 /* 0 is not allowed */ CREATE_BOARD_LV_DOWNLOAD = 1 /* 0 is not allowed */ CREATE_BOARD_PT_VIEW = 0 CREATE_BOARD_PT_WRITE = 5 CREATE_BOARD_PT_COMMENT = 2 CREATE_BOARD_PT_DOWNLOAD = -10 )
게시판 생성 시 기본값 정의
const ( JWT_EMPTY_TOKEN = -10 + iota JWT_NOT_BEARER JWT_INVALID_TOKEN JWT_NO_CLAIMS JWT_NO_UID )
JWT 오류 코드 정의
const CREATE_GROUP_ADMIN = 1
그룹 생성 시 기본값 정의
const EXIF_APERTURE_FACTOR = 100
const EXIF_EXPOSURE_FACTOR = 1000000
const FAILED = 0
기본값들 정의
Variables ¶
var JwtClaimsKey = ContextKey("jwtClaims")
Functions ¶
Types ¶
type AdminBoardLevelPolicy ¶
type AdminBoardLevelPolicy struct { Uid uint `json:"uid"` Admin BoardWriter `json:"admin"` Level BoardActionLevel `json:"level"` }
게시판 레벨 제한 반환값 정의
type AdminBoardPointPolicy ¶
type AdminBoardPointPolicy struct { Uid uint `json:"uid"` BoardActionPoint }
게시판 포인트 정책 반환값 정의
type AdminBoardResult ¶
type AdminBoardResult struct { Config BoardConfig `json:"config"` Groups []Pair `json:"groups"` }
게시판 설정 반환값 정의
type AdminCreateBoardResult ¶
type AdminCreateBoardResult struct { Uid uint `json:"uid"` Type Board `json:"type"` Name string `json:"name"` Info string `json:"info"` Manager Pair `json:"manager"` }
게시판 생성하기 시 반환값 정의
type AdminDashboardItem ¶
type AdminDashboardItem struct { Groups []Pair `json:"groups"` Boards []Pair `json:"boards"` Members []BoardWriter `json:"members"` }
대시보드 아이템(그룹, 게시판, 회원 최신순 목록) 반환값 정의
type AdminDashboardLatest ¶
type AdminDashboardLatest struct { Posts []AdminDashboardLatestContent `json:"posts"` Comments []AdminDashboardLatestContent `json:"comments"` Reports []AdminDashboardReport `json:"reports"` }
대시보드 최근 (댓)글, 신고 목록 최신순 반환값 정의
type AdminDashboardLatestContent ¶
type AdminDashboardLatestContent struct { AdminDashboardReport Id string `json:"id"` Type Board `json:"type"` }
대시보드 최근 (댓)글 목록 반환값 정의
type AdminDashboardReport ¶
type AdminDashboardReport struct { Uid uint `json:"uid"` Content string `json:"content"` Writer BoardWriter `json:"writer"` }
대시보드 최근 신고 목록 반환값 정의
type AdminDashboardStatistic ¶
type AdminDashboardStatistic struct { History []AdminDashboardStatus `json:"history"` Total uint `json:"total"` }
대시보드 최근 통계 반환값 정의
type AdminDashboardStatisticResult ¶
type AdminDashboardStatisticResult struct { Visit AdminDashboardStatistic `json:"visit"` Member AdminDashboardStatistic `json:"member"` Post AdminDashboardStatistic `json:"post"` Reply AdminDashboardStatistic `json:"reply"` File AdminDashboardStatistic `json:"file"` Image AdminDashboardStatistic `json:"image"` }
대시보드 최근 통계들 반환값 정의
type AdminDashboardStatus ¶
대시보드 일자별 데이터 반환값 정의
type AdminGroupBoardItem ¶
type AdminGroupBoardItem struct { AdminGroupConfig Id string `json:"id"` Type Board `json:"type"` Name string `json:"name"` Info string `json:"info"` Total AdminGroupBoardStatus `json:"total"` }
그룹 관리화면 게시판 (및 통계) 목록 반환값 정의
type AdminGroupBoardStatus ¶
type AdminGroupBoardStatus struct { Post uint `json:"post"` Comment uint `json:"comment"` File uint `json:"file"` Image uint `json:"image"` }
게시판 별 간단 통계 반환값 정의
type AdminGroupConfig ¶
type AdminGroupConfig struct { Uid uint `json:"uid"` Id string `json:"id"` Count uint `json:"count"` Manager BoardWriter `json:"manager"` }
그룹 관리화면 일반 설정들 반환값 정의
type AdminGroupListResult ¶
type AdminGroupListResult struct { Config AdminGroupConfig `json:"config"` Boards []AdminGroupBoardItem `json:"boards"` }
그룹 설정 및 소속 게시판들 정보 반환값 정의
type AdminLatestComment ¶
type AdminLatestComment struct { AdminLatestCommon Content string `json:"content"` PostUid uint `json:"postUid"` }
최근 댓글 반환값 정의
type AdminLatestCommentResult ¶
type AdminLatestCommentResult struct { Comments []AdminLatestComment `json:"comments"` MaxUid uint `json:"maxUid"` }
최근 댓글 및 max uid 반환값 정의
type AdminLatestCommon ¶
type AdminLatestCommon struct { Uid uint `json:"uid"` Id string `json:"id"` Type Board `json:"type"` Like uint `json:"like"` Date uint64 `json:"date"` Status Status `json:"status"` Writer BoardWriter `json:"writer"` }
최근 (댓)글 출력에 필요한 공통 반환값 정의
type AdminLatestParameter ¶
(댓)글 검색하기에 필요한 파라미터 정의
type AdminLatestPost ¶
type AdminLatestPost struct { AdminLatestCommon Title string `json:"title"` Comment uint `json:"comment"` Hit uint `json:"hit"` }
최근 글 반환값 정의
type AdminLatestPostResult ¶
type AdminLatestPostResult struct { Posts []AdminLatestPost `json:"posts"` MaxUid uint `json:"maxUid"` }
최근 글 및 max uid 반환값 정의
type AdminReportItem ¶
type AdminReportItem struct { To BoardWriter `json:"to"` From BoardWriter `json:"from"` Request string `json:"request"` Response string `json:"response"` Date uint64 `json:"date"` }
신고 목록 반환값 정의
type AdminReportParameter ¶
type AdminReportParameter struct { AdminLatestParameter IsSolved bool }
신고 목록 검색하기에 필요한 파라미터 정의
type AdminReportResult ¶
type AdminReportResult struct { Reports []AdminReportItem `json:"reports"` MaxUid uint `json:"maxUid"` }
신고 목록 및 max uid 반환값 정의
type AdminUserInfo ¶
type AdminUserInfo struct { BoardWriter Id string `json:"id"` Level uint `json:"level"` Point uint `json:"point"` }
사용자 정보 반환값 정의
type AdminUserItem ¶
type AdminUserItem struct { UserBasicInfo Id string `json:"id"` Level uint `json:"level"` Point uint `json:"point"` Signup uint64 `json:"signup"` }
사용자 목록 검색하기 반환값 정의
type AdminUserItemResult ¶
type AdminUserItemResult struct { User []AdminUserItem `json:"user"` MaxUid uint `json:"maxUid"` }
사용자 목록 검색 결과 및 max uid 반환값 정의
type AdminUserParameter ¶
type AdminUserParameter struct { AdminLatestParameter IsBlocked bool }
사용자 목록 검색하기에 필요한 파라미터 정의
type BoardAction ¶
type BoardAction uint
게시판 관련 액션 정의
const ( BOARD_ACTION_LIST BoardAction = iota BOARD_ACTION_VIEW BOARD_ACTION_COMMENT BOARD_ACTION_WRITE BOARD_ACTION_DOWNLOAD )
게시판 관련 액션들
type BoardActionLevel ¶
type BoardActionLevel struct { BoardActionPoint List int `json:"list"` }
활동별로 필요한 레벨 정의
type BoardActionPoint ¶
type BoardActionPoint struct { View int `json:"view"` Write int `json:"write"` Comment int `json:"comment"` Download int `json:"download"` }
활동별로 필요한 포인트 정의
type BoardAttachedImage ¶
type BoardAttachedImage struct { File BoardFile `json:"file"` Thumbnail BoardThumbnail `json:"thumbnail"` Exif BoardExif `json:"exif"` Description string `json:"description"` }
게시판 첨부 이미지 구조체 정의
type BoardBasicConfig ¶
type BoardBasicConfig struct { Id string `json:"id"` Type Board `json:"type"` Name string `json:"name"` }
게시글 작성자의 최근 글/댓글에 전달할 게시판 기본 설정값 정의
type BoardBasicSettingResult ¶
게시판 기본 설정값들 반환 타입 정의
type BoardCommonListItem ¶
type BoardCommonListItem struct { Category Pair `json:"category"` Cover string `json:"cover"` Comment uint `json:"comment"` Like uint `json:"like"` Liked bool `json:"liked"` Writer BoardWriter `json:"writer"` }
게시글 목록보기에 추가로 필요한 리턴 타입 정의
type BoardCommonPostItem ¶
type BoardCommonPostItem struct { Uid uint `json:"uid"` Title string `json:"title"` Content string `json:"content"` Submitted uint64 `json:"submitted"` Modified uint64 `json:"modified"` Hit uint `json:"hit"` Status Status `json:"status"` }
홈화면 게시글 공통 리턴 타입 정의
type BoardConfig ¶
type BoardConfig struct { Uid uint `json:"uid"` Id string `json:"id"` GroupUid uint `json:"groupUid"` Admin struct { Group uint `json:"group"` Board uint `json:"board"` } `json:"admin"` Type Board `json:"type"` Name string `json:"name"` Info string `json:"info"` RowCount uint `json:"rowCount"` Width uint `json:"width"` UseCategory bool `json:"useCategory"` Category []Pair `json:"category"` Level BoardActionLevel `json:"level"` Point BoardActionPoint `json:"point"` }
게시판 설정 타입 정의
type BoardExif ¶
type BoardExif struct { Make string `json:"make"` Model string `json:"model"` Aperture uint `json:"aperture"` ISO uint `json:"iso"` FocalLength uint `json:"focalLength"` Exposure uint `json:"exposure"` Width uint `json:"width"` Height uint `json:"height"` Date uint64 `json:"date"` }
EXIF 구조체 정의
type BoardHomePostItem ¶
type BoardHomePostItem struct { BoardCommonPostItem BoardCommonListItem Id string `json:"id"` Type Board `json:"type"` UseCategory bool `json:"useCategory"` }
최근 게시글들 최종 리턴 타입 정의
type BoardHomePostResult ¶
type BoardHomePostResult struct { Items []BoardHomePostItem `json:"items"` Config BoardConfig `json:"config"` }
최근 게시글들 최종 리턴 타입 및 게시판 정보 정의
type BoardListItem ¶
type BoardListItem struct { BoardCommonPostItem BoardCommonListItem }
게시글 목록보기용 리턴 타입 정의
type BoardListParameter ¶
type BoardListParameter struct { HomePostParameter Page uint Direction Paging NoticeCount uint }
게시글 가져오기 시 필요한 파라미터 정의
type BoardListResult ¶
type BoardListResult struct { TotalPostCount uint `json:"totalPostCount"` Config BoardConfig `json:"config"` Notices []BoardListItem `json:"notices"` Posts []BoardListItem `json:"posts"` BlackList []uint `json:"blackList"` IsAdmin bool `json:"isAdmin"` }
게시글 목록보기 리턴 값 정의
type BoardMovePostParameter ¶
type BoardMovePostParameter struct { BoardViewCommonParameter TargetBoardUid uint }
게시글 이동에 필요한 파라미터 정의
type BoardThumbnail ¶
썸네일 크기별 종류 정의
type BoardViewCommonParameter ¶
게시글 보기에서 공통으로 쓰이는 파라미터 정의
type BoardViewDownloadResult ¶
첨부파일 다운로드 결과 정의
type BoardViewLikeParameter ¶
type BoardViewLikeParameter struct { BoardViewCommonParameter Liked bool }
게시글 좋아하기에 필요한 파라미터 정의
type BoardViewParameter ¶
type BoardViewParameter struct { BoardViewCommonParameter UpdateHit bool Limit uint }
게시글 보기에 필요한 파라미터 정의
type BoardViewResult ¶
type BoardViewResult struct { Config BoardConfig `json:"config"` Post BoardListItem `json:"post"` Images []BoardAttachedImage `json:"images"` Files []BoardAttachment `json:"files"` Tags []Pair `json:"tags"` PrevPostUid uint `json:"prevPostUid"` NextPostUid uint `json:"nextPostUid"` WriterPosts []BoardWriterLatestPost `json:"writerPosts"` WriterComments []BoardWriterLatestComment `json:"writerComments"` }
게시글 보기에 반환 타입 정의
type BoardWriter ¶
type BoardWriter struct { UserBasicInfo Signature string `json:"signature"` }
게시글 작성자 타입 정의
type BoardWriterLatestComment ¶
type BoardWriterLatestComment struct { BoardWriterLatestCommon Content string `json:"content"` }
게시글 작성자의 최근 댓글 정의
type BoardWriterLatestCommon ¶
type BoardWriterLatestCommon struct { Board BoardBasicConfig `json:"board"` PostUid uint `json:"postUid"` Like uint `json:"like"` Submitted uint `json:"submitted"` }
게시글 작성자의 최근 글/댓글 공통 요소 정의
type BoardWriterLatestPost ¶
type BoardWriterLatestPost struct { BoardWriterLatestCommon Comment uint `json:"comment"` Title string `json:"title"` }
게시글 작성자의 최근 글 정의
type ChangeUserPointParameter ¶
type ChangeUserPointParameter struct { BoardUid uint UserUid uint Action PointAction }
사용자의 포인트 변경하기에 필요한 파라미터 정의
type ChatHistory ¶
type ChatHistory struct { Uid uint `json:"uid"` UserUid uint `json:"userUid"` Message string `json:"message"` Timestamp uint64 `json:"timestamp"` }
쪽지 내용 보기용 정보
type ChatItem ¶
type ChatItem struct { Sender UserBasicInfo `json:"sender"` Uid uint `json:"uid"` Message string `json:"message"` Timestamp uint64 `json:"timestamp"` }
쪽지 목록용 정보
type CommentItem ¶
type CommentItem struct { Uid uint `json:"uid"` ReplyUid uint `json:"replyUid"` PostUid uint `json:"postUid"` Writer BoardWriter `json:"writer"` Like uint `json:"like"` Liked bool `json:"liked"` Submitted uint64 `json:"submitted"` Modified uint64 `json:"modified"` Status Status `json:"status"` Content string `json:"content"` }
댓글 내용 항목 정의
type CommentLikeParameter ¶
댓글에 좋아요 처리에 필요한 파라미터 정의
type CommentListParameter ¶
type CommentListParameter struct { BoardUid uint PostUid uint UserUid uint Page uint Bunch uint SinceUid uint Direction Paging }
댓글 목록 가져오기에 필요한 파라미터 정의
type CommentListResult ¶
type CommentListResult struct { BoardUid uint `json:"boardUid"` SinceUid uint `json:"sinceUid"` TotalCommentCount uint `json:"totalCommentCount"` Comments []CommentItem `json:"comments"` }
댓글 목록 가져오기 결과 정의
type CommentModifyParameter ¶
type CommentModifyParameter struct { CommentWriteParameter CommentUid uint }
댓글 수정하기에 필요한 파라미터 정의
type CommentReplyParameter ¶
type CommentReplyParameter struct { CommentWriteParameter ReplyTargetUid uint }
답글 작성하기에 필요한 파라미터 정의
type CommentWriteParameter ¶
새 댓글 작성하기에 필요한 파라미터 정의
type EditorConfigResult ¶
type EditorConfigResult struct { Config BoardConfig `json:"config"` IsAdmin bool `json:"isAdmin"` Categories []Pair `json:"categories"` }
에디터에서 게시판 설정 및 카테고리 불러오기 결과 타입 정의
type EditorInsertImageParameter ¶
게시글에 삽입한 이미지 목록 가져오는 파라미터 정의
type EditorInsertImageResult ¶
type EditorInsertImageResult struct { Images []Pair `json:"images"` MaxImageUid uint `json:"maxImageUid"` TotalImageCount uint `json:"totalImageCount"` }
게시글에 삽입한 이미지 목록 반환 타입 정의
type EditorLoadPostResult ¶
type EditorLoadPostResult struct { Post BoardListItem `json:"post"` Files []BoardAttachment `json:"files"` Tags []Pair `json:"tags"` }
게시글 수정 시 가져오는 정보들 반환 타입 정의
type EditorModifyParameter ¶
type EditorModifyParameter struct { EditorWriteParameter PostUid uint }
게시글 수정 시 필요한 파라미터 정의
type EditorRemoveAttachedParameter ¶
게시글 수정 시 첨부된 파일 삭제하기에 필요한 파라미터 정의
type EditorSaveExifParameter ¶
EXIF 저장할 때 필요한 파라미터 정의
type EditorSaveFileParameter ¶
첨부파일 저장할 때 필요한 파라미터 정의
type EditorSaveThumbnailParameter ¶
type EditorSaveThumbnailParameter struct { BoardThumbnail FileUid uint PostUid uint }
썸네일 이미지 저장할 때 필요한 파라미터 정의
type EditorWriteParameter ¶
type EditorWriteParameter struct { BoardUid uint UserUid uint CategoryUid uint Title string Content string Files []*multipart.FileHeader Tags []string IsNotice bool IsSecret bool }
게시글 작성 시 필요한 파라미터 정의
type GalleryGridItem ¶
type GalleryGridItem struct { Uid uint `json:"uid"` Like uint `json:"like"` Liked bool `json:"liked"` Writer BoardWriter `json:"writer"` Comment uint `json:"comment"` Title string `json:"title"` Images []BoardAttachedImage `json:"images"` }
갤러리 그리드형 반환타입 정의
type GalleryListResult ¶
type GalleryListResult struct { Config BoardConfig `json:"config"` Images []GalleryGridItem `json:"images"` TotalPostCount uint `json:"totalPostCount"` }
갤러리 리스트 반환 타입 정의
type GalleryPhotoResult ¶
type GalleryPhotoResult struct { Config BoardConfig `json:"config"` Images []BoardAttachedImage `json:"images"` }
갤러리 사진 보기 반환 타입 정의
type GoogleUser ¶
type GoogleUser struct { ID string `json:"id"` Email string `json:"email"` Name string `json:"name"` Picture string `json:"picture"` }
구글 OAuth 응답
type HomeMainArticle ¶
type HomeMainArticle struct { Cover string Content template.HTML Comments []HomeMainComment Date string Like uint Name string Title string Url string }
SEO 메인화면에 보여줄 article 구조체 정의
type HomeMainComment ¶
SEO 메인화면에 보여줄 댓글 구조체 정의
type HomeMainPage ¶
type HomeMainPage struct { PageTitle string PageUrl string Version string Articles []HomeMainArticle }
SEO 메인화면에 출력할 구조체 정의
type HomePostItem ¶
type HomePostItem struct { BoardCommonPostItem BoardUid uint `json:"boardUid"` UserUid uint `json:"userUid"` CategoryUid uint `json:"categoryUid"` }
최근 게시글 리턴 타입 정의
type HomePostParameter ¶
type HomePostParameter struct { SinceUid uint Bunch uint Option Search Keyword string UserUid uint BoardUid uint }
최근 게시글 가져올 때 필요한 파라미터 정의
type HomeSidebarBoardResult ¶
type HomeSidebarBoardResult struct { Id string `json:"id"` Type Board `json:"type"` Name string `json:"name"` Info string `json:"info"` }
홈 사이드바에 출력할 게시판 목록 형태 정의
type HomeSidebarGroupResult ¶
type HomeSidebarGroupResult struct { Group string `json:"group"` Boards []HomeSidebarBoardResult `json:"boards"` }
홈 사이드바에 출력할 그룹 목록 형태 정의
type HomeSitemapURL ¶
사이트맵 구조체 정의
type HomeVisitResult ¶
type HomeVisitResult struct { Success bool `json:"success"` OfficialWebsite string `json:"officialWebsite"` Version string `json:"version"` License string `json:"license"` Github string `json:"github"` }
버전 응답 구조체
type InsertNotificationParameter ¶
type InsertNotificationParameter struct { ActionUserUid uint TargetUserUid uint NotiType Noti PostUid uint CommentUid uint }
새 알림 추가 파라미터 정의
type KakaoUser ¶
type KakaoUser struct { ID int64 `json:"id"` KakaoAccount struct { Email string `json:"email"` Profile struct { Nickname string `json:"nickname"` ProfileImageUrl string `json:"profile_image_url"` } `json:"profile"` } `json:"kakao_account"` }
카카오 OAuth 응답
type MyInfoResult ¶
type MyInfoResult struct { UserInfoResult Id string `json:"id"` Point uint `json:"point"` Token string `json:"token"` Refresh string `json:"refresh"` }
(로그인 한) 내 정보
type NaverUser ¶
type NaverUser struct { string `json:"email"` Nickname string `json:"nickname"` ProfileImage string `json:"profile_image"` } `json:"response"` }Email
네이버 OAuth 응답
type NotificationItem ¶
type NotificationItem struct { Uid uint `json:"uid"` FromUser UserBasicInfo `json:"fromUser"` Type Noti `json:"type"` Id string `json:"id"` BoardType Board `json:"boardType"` PostUid uint `json:"postUid"` Checked bool `json:"checked"` Timestamp uint64 `json:"timestamp"` }
알림내용 조회 항목 정의
type PointAction ¶
type PointAction uint
사용자 포인트 변경 이력 타입 정의
const ( POINT_ACTION_VIEW PointAction = iota POINT_ACTION_WRITE POINT_ACTION_COMMENT POINT_ACTION_DOWNLOAD )
포인트 변경 액션들
type ResetPasswordResult ¶
type ResetPasswordResult struct {
Sendmail bool `json:"sendmail"`
}
비밀번호 초기화 시 리턴 타입
type ResponseCommon ¶
type ResponseCommon struct { Success bool `json:"success"` Error string `json:"error"` Code Code `json:"code"` Result interface{} `json:"result"` }
가장 기본적인 서버 응답
type Search ¶
type Search uint8
검색 옵션 정의
type SignupParameter ¶
인증 메일 발송에 필요한 파라미터 정의
type SignupResult ¶
회원가입 시 리턴 타입
type StatisticColumn ¶
type StatisticColumn uint8
대시보드 통계 추출 시 필요한 컬럼 타입 정의
const ( COLUMN_TIMESTAMP StatisticColumn = iota COLUMN_SIGNUP COLUMN_SUBMITTED )
통계용 컬럼 타입 목록
func (StatisticColumn) String ¶
func (s StatisticColumn) String() string
type SyncImageItem ¶
type SyncImageItem struct { Uid uint `json:"uid"` File string `json:"file"` Name string `json:"name"` Thumb string `json:"thumb"` Full string `json:"full"` Desc string `json:"desc"` Exif BoardExif `json:"exif"` }
첨부 파일 및 이미지 썸네일 반환 타입 정의
type SyncPostItem ¶
type SyncPostItem struct { Id string `json:"id"` No uint `json:"no"` Title string `json:"title"` Content string `json:"content"` Submitted uint64 `json:"submitted"` Name string `json:"name"` Tags []string `json:"tags"` Images []SyncImageItem `json:"images"` }
동기화 시킬 데이터 결과 타입 정의
type Table ¶
type Table string
게시판 테이블 정의
const ( TABLE_BOARD Table = "board" TABLE_BOARD_CAT Table = "board_category" TABLE_CHAT Table = "chat" TABLE_COMMENT Table = "comment" TABLE_COMMENT_LIKE Table = "comment_like" TABLE_EXIF Table = "exif" TABLE_FILE Table = "file" TABLE_FILE_THUMB Table = "file_thumbnail" TABLE_GROUP Table = "group" TABLE_HASHTAG Table = "hashtag" TABLE_IMAGE Table = "image" TABLE_IMAGE_DESC Table = "image_description" TABLE_NOTI Table = "notification" TABLE_POINT_HISTORY Table = "point_history" TABLE_POST Table = "post" TABLE_POST_HASHTAG Table = "post_hashtag" TABLE_POST_LIKE Table = "post_like" TABLE_REPORT Table = "report" TABLE_USER Table = "user" TABLE_USER_ACCESS Table = "user_access_log" TABLE_USER_BLOCK Table = "user_black_list" TABLE_USER_PERM Table = "user_permission" TABLE_USER_TOKEN Table = "user_token" TABLE_USER_VERIFY Table = "user_verification" )
게시판 테이블 이름들 정리
type UpdatePointParameter ¶
type UpdatePointParameter struct { UserUid uint BoardUid uint Action PointAction Point int }
포인트 변경 파라미터 정의
type UpdateUserInfoParameter ¶
type UpdateUserInfoParameter struct { UserUid uint Name string Signature string Password string Profile *multipart.FileHeader OldProfile string }
내 정보 수정하기 파라미터 정의
type UploadCategory ¶
type UploadCategory string
업로드 폴더의 하위 폴더들
const ( UPLOAD_ATTACH UploadCategory = "attachments" UPLOAD_IMAGE UploadCategory = "images" UPLOAD_PROFILE UploadCategory = "profile" UPLOAD_TEMP UploadCategory = "temp" UPLOAD_THUMB UploadCategory = "thumbnails" )
하위 폴더들의 상수 정의
type UserAction ¶
type UserAction uint8
액션 타입 재정의
const ( USER_ACTION_WRITE_POST UserAction = iota USER_ACTION_WRITE_COMMENT USER_ACTION_SEND_CHAT USER_ACTION_SEND_REPORT )
액션 고유 값들
type UserBasicInfo ¶
type UserBasicInfo struct { UserUid uint `json:"uid"` Name string `json:"name"` Profile string `json:"profile"` }
사용자의 최소 기본 정보들
type UserInfoResult ¶
type UserInfoResult struct { Uid uint `json:"uid"` Name string `json:"name"` Profile string `json:"profile"` Level uint `json:"level"` Signature string `json:"signature"` Signup uint64 `json:"signup"` Signin uint64 `json:"signin"` Admin bool `json:"admin"` Blocked bool `json:"blocked"` }
(공개된) 사용자 정보
type UserPermissionReportResult ¶
type UserPermissionReportResult struct { UserPermissionResult Login bool `json:"login"` UserUid uint `json:"userUid"` Response string `json:"response"` }
사용자 권한 및 로그인, 신고 내역 정의