model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachResult

type AttachResult struct {
	Status   string `json:"status"`
	Url      string `json:"url"`
	Replacer string `json:"replacer"`
}

type BlogItem

type BlogItem struct {
	Id     string             `json:"id"`
	UserId string             `json:"userId"`
	Blogs  []BlogItemListData `json:"blogs"`
}

type BlogItemListData

type BlogItemListData struct {
	Name                     string             `json:"name"`
	Url                      string             `json:"url"`
	SecondaryUrl             string             `json:"secondaryUrl"`
	Nickname                 string             `json:"nickname"`
	Title                    string             `json:"title"`
	Description              string             `json:"description"`
	Default                  string             `json:"default"`
	BlogIconUrl              string             `json:"blogIconUrl"`
	FaviconUrl               string             `json:"faviconUrl"`
	ProfileThumbnailImageUrl string             `json:"profileThumbnailImageUrl"`
	ProfileImageUrl          string             `json:"profileImageUrl"`
	Role                     string             `json:"role"`
	BlogId                   string             `json:"blogId"`
	Statistics               BlogStatisticsData `json:"statistics"`
}

type BlogResult

type BlogResult struct {
	Status string   `json:"status"`
	Item   BlogItem `json:"item"`
}

type BlogStatisticsData

type BlogStatisticsData struct {
	Post       string `json:"post"`
	Comment    string `json:"comment"`
	Trackback  string `json:"trackback"`
	Guestbook  string `json:"guestbook"`
	Invitation string `json:"invitation"`
}

type CategoryData

type CategoryData struct {
	Id      string `json:"id"`
	Name    string `json:"name"`
	Parent  string `json:"parent"`
	Label   string `json:"label"`
	Entries string `json:"entries"`
}

type CategoryItem

type CategoryItem struct {
	Url          string         `json:"url"`
	SecondaryUrl string         `json:"secondaryUrl"`
	Categories   []CategoryData `json:"categories"`
}

type CategoryResult

type CategoryResult struct {
	Status string       `json:"status"`
	Item   CategoryItem `json:"item"`
}

type CommentData

type CommentData struct {
	// BlogName 블로그 명 (필수)
	BlogName string `json:"blog_name"`

	// PostId	포스트 ID (필수)
	PostId string `json:"post_id"`

	// ParentId	부모 댓글 Id (대댓글 인경우에 사용할 것)
	ParentId string `json:"parent_id"`

	// Content	댓글 내용
	Content string `json:"content"`

	// Secret	비밀 댓글 여부(0: 공개[default], 1: 비밀)
	Secret string `json:"secret"`
}

CommentData 댓글 쓰기용 DTO BlogName 블로그 명 (필수) PostId 포스트 ID (필수) ParentId 부모 댓글 Id (대댓글 인경우에 사용할 것) Content 댓글 내용 Secret 비밀 댓글 여부(0: 공개[default], 1: 비밀)

type CommentDataList

type CommentDataList struct {
	// Comment [] CommentListItemData 댓글 목록 아이템 리스트
	Comment []CommentListItemData `json:"comment"`
}

CommentDataList Comment [] CommentListItemData 댓글 목록 아이템 리스트

type CommentDeleteResult

type CommentDeleteResult struct {
	// Status  HTTP 상태코드
	Status string `json:"status"`
}

CommentDeleteResult 댓글 삭제용 리턴 DTO Status HTTP 상태코드

type CommentItemModel

type CommentItemModel interface {
	CommentNewestListItem | CommentListItem | EmptyType
}

type CommentListItem

type CommentListItem struct {
	// Url			티스토리 기본 URL
	Url string `json:"url"`

	// SecondaryUrl	독립 도메인 URL
	SecondaryUrl string `json:"secondaryUrl"`

	// PostId		포스트 ID
	PostId string `json:"postId"`

	// TotalCount	총 댓글 개수
	TotalCount string `json:"totalCount"`

	// Comments 	CommentDataList 댓글 목록 데이터
	Comments CommentDataList `json:"comments"`
}

CommentListItem 포스트 상세 보기용 Item 타입 Url 티스토리 기본 URL SecondaryUrl 독립 도메인 URL PostId 포스트 ID TotalCount 총 댓글 개수 Comments CommentDataList 댓글 목록 데이터

type CommentListItemData

type CommentListItemData struct {
	// Id			댓글 ID
	Id string `json:"id"`

	// Date			댓글 작성시간 ()
	Date string `json:"date"`

	// Name			작성자 이름
	Name string `json:"name"`

	// ParentId		대댓글 ID
	ParentId string `json:"parentId"`

	// Homepage		작성자 홈페이지 주소
	Homepage string `json:"homepage"`

	// Visibility	승인 여부 (0: 승인대기, 2: 승인)
	Visibility string `json:"visibility"`

	// Comment		댓글 내용
	Comment string `json:"comment"`

	// Open			댓글 공개여부 (Y: 공개, N: 비공개)
	Open string `json:"open"`
}

CommentListItemData 댓글 목록 아이템 타입 Id 댓글 ID Date 댓글 작성시간 () Name 작성자 이름 ParentId 대댓글 ID Homepage 작성자 홈페이지 주소 Visibility 승인 여부 (0: 승인대기, 2: 승인) Comment 댓글 내용 Open 댓글 공개여부 (Y: 공개, N: 비공개)

type CommentNewestDataList

type CommentNewestDataList struct {
	// Comment [] CommentNewestItemData 최신 댓글 목록 아이템 리스트
	Comment []CommentNewestItemData
}

CommentNewestDataList Comment [] CommentNewestItemData 최신 댓글 목록 아이템 리스트

type CommentNewestItemData

type CommentNewestItemData struct {
	// Id		댓글 ID
	Id string `json:"id"`

	// Date		댓글 작성시간 (시간[TIMESTAMP], milliseconds)
	Date string `json:"date"`

	// PostId	포스트 ID
	PostId string `json:"postId"`

	// Name		작성자 이름
	Name string `json:"name"`

	// Homepage	작성자 홈페이지 주소
	Homepage string `json:"homepage"`

	// Comment	댓글 내용
	Comment string `json:"comment"`

	// Open		댓글 공개여부 (Y: 공개, N: 비공개)
	Open string `json:"open"`
}

CommentNewestItemData 최신 댓글 목록 아이템 타입 Id 댓글 ID Date 댓글 작성시간 (시간[TIMESTAMP], milliseconds) PostId 포스트 ID Name 작성자 이름 Homepage 작성자 홈페이지 주소 Comment 댓글 내용 Open 댓글 공개여부 (Y: 공개, N: 비공개)

type CommentNewestListItem

type CommentNewestListItem struct {
	// Url			티스토리 기본 URL
	Url string `json:"url"`

	// SecondaryUrl	독립 도메인 URL
	SecondaryUrl string `json:"secondaryUrl"`

	// Comments 	CommentNewestDataList 최신 댓글 목록 데이터
	Comments CommentNewestDataList `json:"comments"`
}

CommentNewestListItem 포스트 상세 보기용 Item 타입 Url 티스토리 기본 URL SecondaryUrl 독립 도메인 URL Comments CommentNewestDataList 최신 댓글 목록 데이터

type CommentResult

type CommentResult[M CommentItemModel] struct {
	// Status  HTTP 상태코드
	Status string `json:"status"`

	// Item	댓글 목록 읽기 결과 데이터
	Item M `json:"item"`
}

CommentResult 댓글 목록 읽기용 리턴 DTO Status HTTP 상태코드 Item 댓글 목록 읽기 결과 데이터

type CommentUpdateData

type CommentUpdateData struct {
	// CommentId 댓글 ID (필수)
	CommentId string `json:"comment_id"`

	// CommentData 댓글 쓰기용 DTO embed
	CommentData
}

CommentUpdateData 댓글 쓰기용 DTO CommentId 댓글 ID (필수) CommentData 댓글 쓰기용 DTO embed

type CommentWriteResult

type CommentWriteResult struct {
	// Status  HTTP 상태코드
	Status string `json:"status"`

	// Result	결과 메시지
	Result string `json:"result"`

	// CommentUrl	댓글 URL
	CommentUrl string `json:"commentUrl"`
}

CommentWriteResult 댓글 쓰기, 댓글 수정용 리턴 DTO Status HTTP 상태코드 Result 결과 메시지 CommentUrl 댓글 URL

type EmptyType

type EmptyType struct {
}

type PostData

type PostData struct {
	// BlogName 블로그 명 (필수)
	BlogName string `json:"blog_name"`

	// Title 포스트 제목 (필수)
	Title string `json:"title"`

	// Content 포스트 내용
	Content string `json:"content"`

	// Visibility 포스트 공개 여부 상태 (0: 비공개[default], 1: 보호, 3: 발행)
	Visibility string `json:"visibility"`

	// Category 포스트 카테고리 (0: 없음[default], 카테고리 ID: 미리 블로그에 생성해둔 ID, 이 카테고리는 카테고리 목록 읽기 API를 통해 확인 가능하다.)
	Category string `json:"category"`

	// Published 배포 시간 (시간[TIMESTAMP]: 현재 시간[default], POST 요청 시간보다 미래의 시간을 넣을 경우 포스트 예약으로 동작)
	Published string `json:"published"`

	// Slogan 문자 주소
	Slogan string `json:"slogan"`

	// Tag 태그 (',' 이 따옴표로 구분한다.)
	Tag string `json:"tag"`

	// AcceptComment 댓글 허용 (0: 댓글 거부, 1: 댓글 허용[default])
	AcceptComment string `json:"acceptComment"`

	// Password 보호글용 비밀 번호 (비워두면 공개)
	Password string `json:"password"`
}

PostData 글쓰기용 DTO 글 수정용 DTO도 embed로 함께 쓴다. BlogName 블로그 명 (필수) Title 포스트 제목 (필수) Content 포스트 내용 Visibility 포스트 공개 여부 상태 (0: 비공개[default], 1: 보호, 3: 발행) Category 포스트 카테고리 (0: 없음[default], 카테고리 ID: 미리 블로그에 생성해둔 ID, 이 카테고리는 카테고리 목록 읽기 API를 통해 확인 가능하다.) Published 배포 시간 (시간[TIMESTAMP]: 현재 시간[default], POST 요청 시간보다 미래의 시간을 넣을 경우 포스트 예약으로 동작) Slogan 문자 주소 Tag 태그 (',' 이 따옴표로 구분한다.) AcceptComment 댓글 허용 (0: 댓글 거부, 1: 댓글 허용[default]) Password 보호글용 비밀 번호 (비워두면 공개)

type PostDetailItem

type PostDetailItem struct {
	// Url	티스토리 기본 URL
	Url string `json:"url"`

	// SecondaryUrl	독립 도메인 URL
	SecondaryUrl string `json:"secondaryUrl"`

	// Id	포스트 ID
	Id string `json:"id"`

	// Title	포스트 제목
	Title string `json:"title"`

	// Content	포스트 내용
	Content string `json:"content"`

	// CategoryId	포스트 카테고리 ID
	CategoryId string `json:"categoryId"`

	// PostUrl	포스트 대표 주소
	PostUrl string `json:"postUrl"`

	// Visibility	포스트 공개 여부 상태 (0: 비공개[default], 1: 보호, 3: 발행)
	Visibility string `json:"visibility"`

	// AcceptComment	댓글 허용 여부 (0: 댓글 거부, 1: 댓글 허용[default])
	AcceptComment string `json:"acceptComment"`

	// AcceptTrackback	추적 허용 여부 (자세히 파악하지 못한 내용이다. 가이드에도 친절하게 나와있진 않다.)
	AcceptTrackback string `json:"acceptTrackback"`

	// Tags	[] Tag 태그 목록
	Tags struct {
		Tag []string `json:"tag"`
	} `json:"tags"`

	// Comments	댓글 개수
	Comments string `json:"comments"`

	// Trackbacks	추적 개수
	Trackbacks string `json:"trackbacks"`

	// Date	발생시간 (시간[TIMESTAMP], milliseconds)
	Date string `json:"date"`
}

PostDetailItem 포스트 상세 보기용 Item 타입 Url 티스토리 기본 URL SecondaryUrl 독립 도메인 URL Id 포스트 ID Title 포스트 제목 Content 포스트 내용 CategoryId 포스트 카테고리 ID PostUrl 포스트 대표 주소 Visibility 포스트 공개 여부 상태 (0: 비공개[default], 1: 보호, 3: 발행) AcceptComment 댓글 허용 여부 (0: 댓글 거부, 1: 댓글 허용[default]) AcceptTrackback 추적 허용 여부 (자세히 파악하지 못한 내용이다. 가이드에도 친절하게 나와있진 않다.) Tags [] Tag 태그 목록 Comments 댓글 개수 Trackbacks 추적 개수 Date 발생시간 (시간[TIMESTAMP], milliseconds)

type PostItemModel

type PostItemModel interface {
	PostListItem | PostDetailItem | EmptyType
}

PostItemModel 포스트 목록 Item 타입

type PostListItem

type PostListItem struct {
	// Url	티스토리 기본 URL
	Url string `json:"url"`

	// SecondaryUrl	독립 도메인 URL
	SecondaryUrl string `json:"secondaryUrl"`

	// Page	현재 페이지
	Page string `json:"page"`

	// Count	현재 페이지 글 개수
	Count string `json:"count"`

	// TotalCount	전체 글 수
	TotalCount string `json:"totalCount"`

	// Posts [] PostListItemData	글 리스트
	Posts []PostListItemData `json:"posts"`
}

PostListItem 포스트 목록 보기용 Item 타입 Url 티스토리 기본 URL SecondaryUrl 독립 도메인 URL Page 현재 페이지 Count 현재 페이지 글 개수 TotalCount 전체 글 수 Posts [] PostListItemData 글 리스트

type PostListItemData

type PostListItemData struct {
	// Id	포스트 ID
	Id string `json:"id"`

	// Title	포스트 제목
	Title string `json:"title"`

	// PostUrl	포스트 URL
	PostUrl string `json:"postUrl"`

	// Visibility	포스트 공개 여부 상태 (0: 비공개[default], 15: 보호, 20: 발행)
	Visibility string `json:"visibility"`

	// CategoryId	카테고리 ID
	CategoryId string `json:"categoryId"`

	// Comments		댓글 수
	Comments string `json:"comments"`

	// Trackbacks	트랙백 수
	Trackbacks string `json:"trackbacks"`

	// Date		발행 시간 (시간[TIMESTAMP], YYYY-mm-dd HH:MM:SS)
	Date string `json:"date"`
}

PostListItemData 포스트 목록 보기용 Item 상세 데이터 타입 Id 포스트 ID Title 포스트 제목 PostUrl 포스트 URL Visibility 포스트 공개 여부 상태 (0: 비공개[default], 15: 보호, 20: 발행) CategoryId 카테고리 ID Comments 댓글 수 Trackbacks 트랙백 수 Date 발행 시간 (시간[TIMESTAMP], YYYY-mm-dd HH:MM:SS)

type PostResult

type PostResult[M PostItemModel] struct {
	// Status  HTTP 상태코드
	Status string `json:"status"`

	// Item	포스트 목록 읽기 결과 데이터
	Item M `json:"item"`
}

PostResult 포스트 목록 읽기용 리턴 DTO Status HTTP 상태코드 Item 포스트 목록 읽기 결과 데이터

type PostUpdateData

type PostUpdateData struct {

	// PostId 포스트 번호 (필수)
	PostId string `json:"post_id"`

	// PostData 글 쓰기용 DTO embed
	PostData
}

PostUpdateData 글 수정용 DTO PostId 포스트 번호 (필수) PostData 글 쓰기용 DTO embed

type PostWriteResult

type PostWriteResult struct {
	// Status  HTTP 상태코드
	Status string `json:"status"`

	// PostId	포스트 ID
	PostId string `json:"postId"`

	// Url	포스트 URL
	Url string `json:"url"`
}

PostWriteResult 글쓰기, 글 수정용 리턴 DTO Status HTTP 상태코드 PostId 포스트 ID Url 포스트 URL

type TistoryResult

type TistoryResult[T Tistory[PI, CI], PI PostItemModel, CI CommentItemModel] struct {
	Tistory T `json:"tistory"`
}

type UserAuthData

type UserAuthData struct {
	// UserId 유저 아이디
	UserId string `json:"user_id"`

	// UserPwd 유저 패스워드
	UserPwd string `json:"user_pwd"`
}

UserAuthData 유저 인증용 데이터 DTO UserId 유저 아이디 UserPwd 유저 패스워드

type UserData

type UserData struct {
	// ClientId Tistory Open API에 블로그 등록시 발급받는 ClientId
	ClientId string `json:"client_id"`

	// SecretKey Tistory Open API에 블로그 등록시 발급받는 SecretKey
	SecretKey string `json:"secret_key"`

	// RedirectUrl Tistory Open API에 블로그 등록시 발급받는 RedirectUrl
	RedirectUrl string `json:"redirect_url"`

	// AuthorizationCode Selenium을 통해 얻어야하는 AuthorizationCode
	AuthorizationCode string `json:"authorization_code"`
}

UserData 유저 데이터 DTO ClientId Tistory Open API에 블로그 등록시 발급받는 ClientId SecretKey Tistory Open API에 블로그 등록시 발급받는 SecretKey RedirectUrl Tistory Open API에 블로그 등록시 발급받는 RedirectUrl AuthorizationCode Selenium을 통해 얻어야하는 AuthorizationCode

Jump to

Keyboard shortcuts

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