update
This commit is contained in:
@@ -4,97 +4,97 @@
|
||||
package types
|
||||
|
||||
type CreatePostReq struct {
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
Cover_image_key string `json:"cover_image_key"`
|
||||
Title string `json:"title"` // Title of the blog post
|
||||
Content string `json:"content"` // Content/body of the blog post
|
||||
CoverImageKey string `json:"coverImageKey"` // Key of the cover image file (optional)
|
||||
}
|
||||
|
||||
type CreatePostResp struct {
|
||||
Post_id string `json:"post_id"`
|
||||
PostId string `json:"postId"` // Unique identifier of the created post
|
||||
}
|
||||
|
||||
type DeletePostReq struct {
|
||||
Post_id string `json:"post_id"`
|
||||
PostId string `json:"postId"` // Unique identifier of the post to delete
|
||||
}
|
||||
|
||||
type DeletePostResp struct {
|
||||
}
|
||||
|
||||
type DownloadPresignedURLReq struct {
|
||||
File_key string `json:"file_key"` // Key to identify the file to download
|
||||
FileKey string `json:"fileKey"` // Unique key of the file to be downloaded
|
||||
}
|
||||
|
||||
type DownloadPresignedURLResp struct {
|
||||
Url string `json:"url"` // Presigned URL for download
|
||||
Expire_at int64 `json:"expire_at"` // Expiration timestamp
|
||||
Url string `json:"url"` // Presigned URL for downloading the file
|
||||
ExpireAt int64 `json:"expireAt"` // Timestamp when the presigned URL expires
|
||||
}
|
||||
|
||||
type EditPostReq struct {
|
||||
Post_id string `json:"post_id"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
Cover_image_key string `json:"cover_image_key"`
|
||||
PostId string `json:"postId"` // Unique identifier of the post to edit
|
||||
Title string `json:"title"` // New title of the blog post
|
||||
Content string `json:"content"` // New content/body of the blog post
|
||||
CoverImageKey string `json:"coverImageKey"` // New key of the cover image file (optional)
|
||||
}
|
||||
|
||||
type EditPostResp struct {
|
||||
}
|
||||
|
||||
type GetPostReq struct {
|
||||
Post_id string `json:"post_id"`
|
||||
PostId string `json:"postId"` // Unique identifier of the post to retrieve
|
||||
}
|
||||
|
||||
type GetPostResp struct {
|
||||
Post_id string `json:"post_id"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
Cover_image_url string `json:"cover_image_url"`
|
||||
Created_at int64 `json:"created_at"`
|
||||
Updated_at int64 `json:"updated_at"`
|
||||
PostId string `json:"postId"` // Unique identifier of the post
|
||||
Title string `json:"title"` // Title of the blog post
|
||||
Content string `json:"content"` // Content/body of the blog post
|
||||
CoverImageUrl string `json:"coverImageUrl"` // URL of the cover image (if exists)
|
||||
CreatedAt int64 `json:"createdAt"` // Timestamp when the post was created
|
||||
UpdatedAt int64 `json:"updatedAt"` // Timestamp when the post was last updated
|
||||
}
|
||||
|
||||
type ListPostsReq struct {
|
||||
Page int `json:"page"`
|
||||
Page_size int `json:"page_size"`
|
||||
Page int `json:"page"` // Page number for pagination (1-based)
|
||||
PageSize int `json:"pageSize"` // Number of posts per page
|
||||
}
|
||||
|
||||
type ListPostsResp struct {
|
||||
Posts []ListPostsRespPosts `json:"posts"`
|
||||
Total_count int `json:"total_count"`
|
||||
Posts []ListPostsRespPosts `json:"posts"` // Array of blog posts
|
||||
TotalCount int `json:"totalCount"` // Total number of posts available
|
||||
}
|
||||
|
||||
type ListPostsRespPosts struct {
|
||||
Post_id string `json:"post_id"`
|
||||
Title string `json:"title"`
|
||||
Cover_image_url string `json:"cover_image_url"`
|
||||
Created_at int64 `json:"created_at"`
|
||||
Updated_at int64 `json:"updated_at"`
|
||||
PostId string `json:"postId"` // Unique identifier of the post
|
||||
Title string `json:"title"` // Title of the blog post
|
||||
CoverImageUrl string `json:"coverImageUrl"` // URL of the cover image (if exists)
|
||||
CreatedAt int64 `json:"createdAt"` // Timestamp when the post was created
|
||||
UpdatedAt int64 `json:"updatedAt"` // Timestamp when the post was last updated
|
||||
}
|
||||
|
||||
type ListTagsReq struct {
|
||||
}
|
||||
|
||||
type ListTagsResp struct {
|
||||
Tags []ListTagsRespTags `json:"tags"`
|
||||
Tags []ListTagsRespTags `json:"tags"` // Array of blog tags
|
||||
}
|
||||
|
||||
type ListTagsRespTags struct {
|
||||
Tag_id string `json:"tag_id"`
|
||||
Tag_name string `json:"tag_name"`
|
||||
TagId string `json:"tagId"` // Unique identifier of the tag
|
||||
TagName string `json:"tagName"` // Name of the tag
|
||||
}
|
||||
|
||||
type PingReq struct {
|
||||
}
|
||||
|
||||
type PingResp struct {
|
||||
Ok bool `json:"ok"`
|
||||
OK bool `json:"ok"` // Indicates if the server is healthy
|
||||
}
|
||||
|
||||
type UploadPresignedURLReq struct {
|
||||
File_name string `json:"file_name"` // Original file name
|
||||
FileName string `json:"fileName"` // Name of the file to be uploaded
|
||||
}
|
||||
|
||||
type UploadPresignedURLResp struct {
|
||||
Url string `json:"url"` // Presigned URL for upload
|
||||
File_key string `json:"file_key"` // Key to identify the uploaded file
|
||||
Expire_at int64 `json:"expire_at"` // Expiration timestamp
|
||||
Url string `json:"url"` // Presigned URL for uploading the file
|
||||
FileKey string `json:"fileKey"` // Unique key to identify the uploaded file
|
||||
ExpireAt int64 `json:"expireAt"` // Timestamp when the presigned URL expires
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user