go-lemmy/types/comment.gen.go

95 lines
4.5 KiB
Go
Raw Normal View History

// Source: lemmy/crates/api_common/src/comment.rs
2023-01-07 22:45:01 +00:00
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types
type CreateComment struct {
2023-01-31 03:38:57 +00:00
Content string `json:"content" url:"content,omitempty"`
PostID int `json:"post_id" url:"post_id,omitempty"`
ParentID Optional[int] `json:"parent_id" url:"parent_id,omitempty"`
LanguageID Optional[int] `json:"language_id" url:"language_id,omitempty"`
FormID Optional[string] `json:"form_id" url:"form_id,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"`
}
type GetComment struct {
ID int `json:"id" url:"id,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
}
type EditComment struct {
2023-01-31 03:38:57 +00:00
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
Content Optional[string] `json:"content" url:"content,omitempty"`
Distinguished Optional[bool] `json:"distinguished" url:"distinguished,omitempty"`
LanguageID Optional[int] `json:"language_id" url:"language_id,omitempty"`
FormID Optional[string] `json:"form_id" url:"form_id,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"`
}
type DeleteComment struct {
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
Deleted bool `json:"deleted" url:"deleted,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"`
}
type RemoveComment struct {
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
Removed bool `json:"removed" url:"removed,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"`
}
type SaveComment struct {
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
Save bool `json:"save" url:"save,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"`
}
type CommentResponse struct {
CommentView CommentView `json:"comment_view" url:"comment_view,omitempty"`
RecipientIds []int `json:"recipient_ids" url:"recipient_ids,omitempty"`
FormID Optional[string] `json:"form_id" url:"form_id,omitempty"`
LemmyResponse
}
type CreateCommentLike struct {
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
Score int16 `json:"score" url:"score,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"`
}
type GetComments struct {
2023-01-31 03:38:57 +00:00
Type Optional[ListingType] `json:"type_" url:"type_,omitempty"`
Sort Optional[CommentSortType] `json:"sort" url:"sort,omitempty"`
MaxDepth Optional[int32] `json:"max_depth" url:"max_depth,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"`
PostID Optional[int] `json:"post_id" url:"post_id,omitempty"`
ParentID Optional[int] `json:"parent_id" url:"parent_id,omitempty"`
SavedOnly Optional[bool] `json:"saved_only" url:"saved_only,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
}
type GetCommentsResponse struct {
Comments []CommentView `json:"comments" url:"comments,omitempty"`
LemmyResponse
}
type CreateCommentReport struct {
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
Reason string `json:"reason" url:"reason,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"`
}
type CommentReportResponse struct {
CommentReportView CommentReportView `json:"comment_report_view" url:"comment_report_view,omitempty"`
LemmyResponse
}
type ResolveCommentReport struct {
ReportID int `json:"report_id" url:"report_id,omitempty"`
Resolved bool `json:"resolved" url:"resolved,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"`
}
type ListCommentReports struct {
Page Optional[int64] `json:"page" url:"page,omitempty"`
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"`
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"`
}
type ListCommentReportsResponse struct {
CommentReports []CommentReportView `json:"comment_reports" url:"comment_reports,omitempty"`
LemmyResponse
}