Documentation ¶
Index ¶
- type APIError
- type Client
- func (a *Client) DeleteCommentsID(params *DeleteCommentsIDParams, authInfo client.AuthInfoWriter) (*DeleteCommentsIDOK, error)
- func (a *Client) GetComments(params *GetCommentsParams, authInfo client.AuthInfoWriter) (*GetCommentsOK, error)
- func (a *Client) GetCommentsID(params *GetCommentsIDParams, authInfo client.AuthInfoWriter) (*GetCommentsIDOK, error)
- func (a *Client) PostComments(params *PostCommentsParams, authInfo client.AuthInfoWriter) (*PostCommentsCreated, error)
- func (a *Client) PutCommentsID(params *PutCommentsIDParams, authInfo client.AuthInfoWriter) (*PutCommentsIDOK, error)
- func (a *Client) SetTransport(transport client.Transport)
- type DeleteCommentsIDBadRequest
- type DeleteCommentsIDForbidden
- type DeleteCommentsIDInternalServerError
- type DeleteCommentsIDNotFound
- type DeleteCommentsIDOK
- type DeleteCommentsIDParams
- type DeleteCommentsIDReader
- type DeleteCommentsIDUnauthorized
- type GetCommentsIDNotFound
- type GetCommentsIDOK
- type GetCommentsIDParams
- type GetCommentsIDReader
- type GetCommentsOK
- type GetCommentsParams
- func (o *GetCommentsParams) WithPage(page int64) *GetCommentsParams
- func (o *GetCommentsParams) WithPagesize(pagesize int64) *GetCommentsParams
- func (o *GetCommentsParams) WithReplyid(replyid int64) *GetCommentsParams
- func (o *GetCommentsParams) WithTopicid(topicid int64) *GetCommentsParams
- func (o *GetCommentsParams) WriteToRequest(r client.Request, reg strfmt.Registry) error
- type GetCommentsReader
- type PostCommentsBadRequest
- type PostCommentsCreated
- type PostCommentsForbidden
- type PostCommentsInternalServerError
- type PostCommentsParams
- type PostCommentsReader
- type PostCommentsUnauthorized
- type PutCommentsIDBadRequest
- type PutCommentsIDForbidden
- type PutCommentsIDInternalServerError
- type PutCommentsIDNotFound
- type PutCommentsIDOK
- type PutCommentsIDParams
- type PutCommentsIDReader
- type PutCommentsIDUnauthorized
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError wraps an error model and captures the status code
func NewAPIError ¶
NewAPIError creates a new API error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for comment API
func (*Client) DeleteCommentsID ¶
func (a *Client) DeleteCommentsID(params *DeleteCommentsIDParams, authInfo client.AuthInfoWriter) (*DeleteCommentsIDOK, error)
删除评论
删除指定评论
func (*Client) GetComments ¶
func (a *Client) GetComments(params *GetCommentsParams, authInfo client.AuthInfoWriter) (*GetCommentsOK, error)
查看评论列表
查看所有评论,支持分页和过滤器
func (*Client) GetCommentsID ¶
func (a *Client) GetCommentsID(params *GetCommentsIDParams, authInfo client.AuthInfoWriter) (*GetCommentsIDOK, error)
查询评论
得到指定评论的具体信息
func (*Client) PostComments ¶
func (a *Client) PostComments(params *PostCommentsParams, authInfo client.AuthInfoWriter) (*PostCommentsCreated, error)
创建评论
根据请求创建评论
func (*Client) PutCommentsID ¶
func (a *Client) PutCommentsID(params *PutCommentsIDParams, authInfo client.AuthInfoWriter) (*PutCommentsIDOK, error)
更新评论
根据请求中指定要更新的属性对评论进行更新
func (*Client) SetTransport ¶
SetTransport changes the transport on the client
type DeleteCommentsIDBadRequest ¶
DeleteCommentsIDBadRequest
无效请求
func NewDeleteCommentsIDBadRequest ¶
func NewDeleteCommentsIDBadRequest() *DeleteCommentsIDBadRequest
NewDeleteCommentsIDBadRequest creates a DeleteCommentsIDBadRequest with default headers values
func (*DeleteCommentsIDBadRequest) Error ¶
func (o *DeleteCommentsIDBadRequest) Error() string
type DeleteCommentsIDForbidden ¶
DeleteCommentsIDForbidden
无访问权限
func NewDeleteCommentsIDForbidden ¶
func NewDeleteCommentsIDForbidden() *DeleteCommentsIDForbidden
NewDeleteCommentsIDForbidden creates a DeleteCommentsIDForbidden with default headers values
func (*DeleteCommentsIDForbidden) Error ¶
func (o *DeleteCommentsIDForbidden) Error() string
type DeleteCommentsIDInternalServerError ¶
DeleteCommentsIDInternalServerError
服务端内部错误
func NewDeleteCommentsIDInternalServerError ¶
func NewDeleteCommentsIDInternalServerError() *DeleteCommentsIDInternalServerError
NewDeleteCommentsIDInternalServerError creates a DeleteCommentsIDInternalServerError with default headers values
func (*DeleteCommentsIDInternalServerError) Error ¶
func (o *DeleteCommentsIDInternalServerError) Error() string
type DeleteCommentsIDNotFound ¶
DeleteCommentsIDNotFound
没找到指定对象
func NewDeleteCommentsIDNotFound ¶
func NewDeleteCommentsIDNotFound() *DeleteCommentsIDNotFound
NewDeleteCommentsIDNotFound creates a DeleteCommentsIDNotFound with default headers values
func (*DeleteCommentsIDNotFound) Error ¶
func (o *DeleteCommentsIDNotFound) Error() string
type DeleteCommentsIDOK ¶
type DeleteCommentsIDOK struct { }
DeleteCommentsIDOK
成功删除评论
func NewDeleteCommentsIDOK ¶
func NewDeleteCommentsIDOK() *DeleteCommentsIDOK
NewDeleteCommentsIDOK creates a DeleteCommentsIDOK with default headers values
func (*DeleteCommentsIDOK) Error ¶
func (o *DeleteCommentsIDOK) Error() string
type DeleteCommentsIDParams ¶
type DeleteCommentsIDParams struct { /*ID 评论ID */ ID int64 }
DeleteCommentsIDParams contains all the parameters to send to the API endpoint for the delete comments ID operation typically these are written to a http.Request
func NewDeleteCommentsIDParams ¶
func NewDeleteCommentsIDParams() *DeleteCommentsIDParams
NewDeleteCommentsIDParams creates a new DeleteCommentsIDParams object with the default values initialized.
func (*DeleteCommentsIDParams) WithID ¶
func (o *DeleteCommentsIDParams) WithID(id int64) *DeleteCommentsIDParams
WithID adds the id to the delete comments ID params
func (*DeleteCommentsIDParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type DeleteCommentsIDReader ¶
type DeleteCommentsIDReader struct {
// contains filtered or unexported fields
}
func (*DeleteCommentsIDReader) ReadResponse ¶
type DeleteCommentsIDUnauthorized ¶
type DeleteCommentsIDUnauthorized struct {
}DeleteCommentsIDUnauthorized
未认证
func NewDeleteCommentsIDUnauthorized ¶
func NewDeleteCommentsIDUnauthorized() *DeleteCommentsIDUnauthorized
NewDeleteCommentsIDUnauthorized creates a DeleteCommentsIDUnauthorized with default headers values
func (*DeleteCommentsIDUnauthorized) Error ¶
func (o *DeleteCommentsIDUnauthorized) Error() string
type GetCommentsIDNotFound ¶
GetCommentsIDNotFound
没找到指定对象
func NewGetCommentsIDNotFound ¶
func NewGetCommentsIDNotFound() *GetCommentsIDNotFound
NewGetCommentsIDNotFound creates a GetCommentsIDNotFound with default headers values
func (*GetCommentsIDNotFound) Error ¶
func (o *GetCommentsIDNotFound) Error() string
type GetCommentsIDOK ¶
GetCommentsIDOK
成功查询评论
func NewGetCommentsIDOK ¶
func NewGetCommentsIDOK() *GetCommentsIDOK
NewGetCommentsIDOK creates a GetCommentsIDOK with default headers values
func (*GetCommentsIDOK) Error ¶
func (o *GetCommentsIDOK) Error() string
type GetCommentsIDParams ¶
type GetCommentsIDParams struct { /*ID 评论ID */ ID int64 }
GetCommentsIDParams contains all the parameters to send to the API endpoint for the get comments ID operation typically these are written to a http.Request
func NewGetCommentsIDParams ¶
func NewGetCommentsIDParams() *GetCommentsIDParams
NewGetCommentsIDParams creates a new GetCommentsIDParams object with the default values initialized.
func (*GetCommentsIDParams) WithID ¶
func (o *GetCommentsIDParams) WithID(id int64) *GetCommentsIDParams
WithID adds the id to the get comments ID params
func (*GetCommentsIDParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type GetCommentsIDReader ¶
type GetCommentsIDReader struct {
// contains filtered or unexported fields
}
func (*GetCommentsIDReader) ReadResponse ¶
type GetCommentsOK ¶
type GetCommentsOK struct {
Payload *models.CommentPageableResult
}
GetCommentsOK
评论列表
func NewGetCommentsOK ¶
func NewGetCommentsOK() *GetCommentsOK
NewGetCommentsOK creates a GetCommentsOK with default headers values
func (*GetCommentsOK) Error ¶
func (o *GetCommentsOK) Error() string
type GetCommentsParams ¶
type GetCommentsParams struct { /*Page 当前页码 */ Page int64 /*Pagesize 每页项数 */ Pagesize int64 /*Replyid 评论的回复ID */ Replyid int64 /*Topicid 评论的主题ID */ Topicid int64 }
GetCommentsParams contains all the parameters to send to the API endpoint for the get comments operation typically these are written to a http.Request
func NewGetCommentsParams ¶
func NewGetCommentsParams() *GetCommentsParams
NewGetCommentsParams creates a new GetCommentsParams object with the default values initialized.
func (*GetCommentsParams) WithPage ¶
func (o *GetCommentsParams) WithPage(page int64) *GetCommentsParams
WithPage adds the page to the get comments params
func (*GetCommentsParams) WithPagesize ¶
func (o *GetCommentsParams) WithPagesize(pagesize int64) *GetCommentsParams
WithPagesize adds the pagesize to the get comments params
func (*GetCommentsParams) WithReplyid ¶
func (o *GetCommentsParams) WithReplyid(replyid int64) *GetCommentsParams
WithReplyid adds the replyid to the get comments params
func (*GetCommentsParams) WithTopicid ¶
func (o *GetCommentsParams) WithTopicid(topicid int64) *GetCommentsParams
WithTopicid adds the topicid to the get comments params
func (*GetCommentsParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type GetCommentsReader ¶
type GetCommentsReader struct {
// contains filtered or unexported fields
}
func (*GetCommentsReader) ReadResponse ¶
type PostCommentsBadRequest ¶
PostCommentsBadRequest
无效请求
func NewPostCommentsBadRequest ¶
func NewPostCommentsBadRequest() *PostCommentsBadRequest
NewPostCommentsBadRequest creates a PostCommentsBadRequest with default headers values
func (*PostCommentsBadRequest) Error ¶
func (o *PostCommentsBadRequest) Error() string
type PostCommentsCreated ¶
PostCommentsCreated
成功创建评论
func NewPostCommentsCreated ¶
func NewPostCommentsCreated() *PostCommentsCreated
NewPostCommentsCreated creates a PostCommentsCreated with default headers values
func (*PostCommentsCreated) Error ¶
func (o *PostCommentsCreated) Error() string
type PostCommentsForbidden ¶
PostCommentsForbidden
无访问权限
func NewPostCommentsForbidden ¶
func NewPostCommentsForbidden() *PostCommentsForbidden
NewPostCommentsForbidden creates a PostCommentsForbidden with default headers values
func (*PostCommentsForbidden) Error ¶
func (o *PostCommentsForbidden) Error() string
type PostCommentsInternalServerError ¶
PostCommentsInternalServerError
服务端内部错误
func NewPostCommentsInternalServerError ¶
func NewPostCommentsInternalServerError() *PostCommentsInternalServerError
NewPostCommentsInternalServerError creates a PostCommentsInternalServerError with default headers values
func (*PostCommentsInternalServerError) Error ¶
func (o *PostCommentsInternalServerError) Error() string
type PostCommentsParams ¶
type PostCommentsParams struct { /*Body*/ Body *models.CreateCommentRequest }
PostCommentsParams contains all the parameters to send to the API endpoint for the post comments operation typically these are written to a http.Request
func NewPostCommentsParams ¶
func NewPostCommentsParams() *PostCommentsParams
NewPostCommentsParams creates a new PostCommentsParams object with the default values initialized.
func (*PostCommentsParams) WithBody ¶
func (o *PostCommentsParams) WithBody(body *models.CreateCommentRequest) *PostCommentsParams
WithBody adds the body to the post comments params
func (*PostCommentsParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type PostCommentsReader ¶
type PostCommentsReader struct {
// contains filtered or unexported fields
}
func (*PostCommentsReader) ReadResponse ¶
type PostCommentsUnauthorized ¶
type PostCommentsUnauthorized struct {
}PostCommentsUnauthorized
未认证
func NewPostCommentsUnauthorized ¶
func NewPostCommentsUnauthorized() *PostCommentsUnauthorized
NewPostCommentsUnauthorized creates a PostCommentsUnauthorized with default headers values
func (*PostCommentsUnauthorized) Error ¶
func (o *PostCommentsUnauthorized) Error() string
type PutCommentsIDBadRequest ¶
PutCommentsIDBadRequest
无效请求
func NewPutCommentsIDBadRequest ¶
func NewPutCommentsIDBadRequest() *PutCommentsIDBadRequest
NewPutCommentsIDBadRequest creates a PutCommentsIDBadRequest with default headers values
func (*PutCommentsIDBadRequest) Error ¶
func (o *PutCommentsIDBadRequest) Error() string
type PutCommentsIDForbidden ¶
PutCommentsIDForbidden
无访问权限
func NewPutCommentsIDForbidden ¶
func NewPutCommentsIDForbidden() *PutCommentsIDForbidden
NewPutCommentsIDForbidden creates a PutCommentsIDForbidden with default headers values
func (*PutCommentsIDForbidden) Error ¶
func (o *PutCommentsIDForbidden) Error() string
type PutCommentsIDInternalServerError ¶
PutCommentsIDInternalServerError
服务端内部错误
func NewPutCommentsIDInternalServerError ¶
func NewPutCommentsIDInternalServerError() *PutCommentsIDInternalServerError
NewPutCommentsIDInternalServerError creates a PutCommentsIDInternalServerError with default headers values
func (*PutCommentsIDInternalServerError) Error ¶
func (o *PutCommentsIDInternalServerError) Error() string
type PutCommentsIDNotFound ¶
PutCommentsIDNotFound
没找到指定对象
func NewPutCommentsIDNotFound ¶
func NewPutCommentsIDNotFound() *PutCommentsIDNotFound
NewPutCommentsIDNotFound creates a PutCommentsIDNotFound with default headers values
func (*PutCommentsIDNotFound) Error ¶
func (o *PutCommentsIDNotFound) Error() string
type PutCommentsIDOK ¶
PutCommentsIDOK
成功更新评论
func NewPutCommentsIDOK ¶
func NewPutCommentsIDOK() *PutCommentsIDOK
NewPutCommentsIDOK creates a PutCommentsIDOK with default headers values
func (*PutCommentsIDOK) Error ¶
func (o *PutCommentsIDOK) Error() string
type PutCommentsIDParams ¶
type PutCommentsIDParams struct { /*Body*/ Body *models.UpdateCommentRequest /*ID 评论ID */ ID int64 }
PutCommentsIDParams contains all the parameters to send to the API endpoint for the put comments ID operation typically these are written to a http.Request
func NewPutCommentsIDParams ¶
func NewPutCommentsIDParams() *PutCommentsIDParams
NewPutCommentsIDParams creates a new PutCommentsIDParams object with the default values initialized.
func (*PutCommentsIDParams) WithBody ¶
func (o *PutCommentsIDParams) WithBody(body *models.UpdateCommentRequest) *PutCommentsIDParams
WithBody adds the body to the put comments ID params
func (*PutCommentsIDParams) WithID ¶
func (o *PutCommentsIDParams) WithID(id int64) *PutCommentsIDParams
WithID adds the id to the put comments ID params
func (*PutCommentsIDParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type PutCommentsIDReader ¶
type PutCommentsIDReader struct {
// contains filtered or unexported fields
}
func (*PutCommentsIDReader) ReadResponse ¶
type PutCommentsIDUnauthorized ¶
type PutCommentsIDUnauthorized struct {
}PutCommentsIDUnauthorized
未认证
func NewPutCommentsIDUnauthorized ¶
func NewPutCommentsIDUnauthorized() *PutCommentsIDUnauthorized
NewPutCommentsIDUnauthorized creates a PutCommentsIDUnauthorized with default headers values
func (*PutCommentsIDUnauthorized) Error ¶
func (o *PutCommentsIDUnauthorized) Error() string
Source Files ¶
- comment_client.go
- delete_comments_id_parameters.go
- delete_comments_id_responses.go
- get_comments_id_parameters.go
- get_comments_id_responses.go
- get_comments_parameters.go
- get_comments_responses.go
- post_comments_parameters.go
- post_comments_responses.go
- put_comments_id_parameters.go
- put_comments_id_responses.go