comment

package
v0.0.0-...-64063fb Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	OperationName string
	Response      interface{}
	Code          int
}

APIError wraps an error model and captures the status code

func NewAPIError

func NewAPIError(opName string, response interface{}, code int) APIError

NewAPIError creates a new API error

func (APIError) Error

func (a APIError) Error() string

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for comment API

func New

func New(transport client.Transport, formats strfmt.Registry) *Client

New creates a new comment API client.

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

func (a *Client) SetTransport(transport client.Transport)

SetTransport changes the transport on the client

type DeleteCommentsIDBadRequest

type DeleteCommentsIDBadRequest struct {
	Payload *models.Error
}

DeleteCommentsIDBadRequest

无效请求

func NewDeleteCommentsIDBadRequest

func NewDeleteCommentsIDBadRequest() *DeleteCommentsIDBadRequest

NewDeleteCommentsIDBadRequest creates a DeleteCommentsIDBadRequest with default headers values

func (*DeleteCommentsIDBadRequest) Error

type DeleteCommentsIDForbidden

type DeleteCommentsIDForbidden struct {
	Payload *models.Error
}

DeleteCommentsIDForbidden

无访问权限

func NewDeleteCommentsIDForbidden

func NewDeleteCommentsIDForbidden() *DeleteCommentsIDForbidden

NewDeleteCommentsIDForbidden creates a DeleteCommentsIDForbidden with default headers values

func (*DeleteCommentsIDForbidden) Error

func (o *DeleteCommentsIDForbidden) Error() string

type DeleteCommentsIDInternalServerError

type DeleteCommentsIDInternalServerError struct {
	Payload *models.Error
}

DeleteCommentsIDInternalServerError

服务端内部错误

func NewDeleteCommentsIDInternalServerError

func NewDeleteCommentsIDInternalServerError() *DeleteCommentsIDInternalServerError

NewDeleteCommentsIDInternalServerError creates a DeleteCommentsIDInternalServerError with default headers values

func (*DeleteCommentsIDInternalServerError) Error

type DeleteCommentsIDNotFound

type DeleteCommentsIDNotFound struct {
	Payload *models.Error
}

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

WithID adds the id to the delete comments ID params

func (*DeleteCommentsIDParams) WriteToRequest

func (o *DeleteCommentsIDParams) WriteToRequest(r client.Request, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type DeleteCommentsIDReader

type DeleteCommentsIDReader struct {
	// contains filtered or unexported fields
}

func (*DeleteCommentsIDReader) ReadResponse

func (o *DeleteCommentsIDReader) ReadResponse(response client.Response, consumer httpkit.Consumer) (interface{}, error)

type DeleteCommentsIDUnauthorized

type DeleteCommentsIDUnauthorized struct {
	Payload *models.Error
}

DeleteCommentsIDUnauthorized

未认证

func NewDeleteCommentsIDUnauthorized

func NewDeleteCommentsIDUnauthorized() *DeleteCommentsIDUnauthorized

NewDeleteCommentsIDUnauthorized creates a DeleteCommentsIDUnauthorized with default headers values

func (*DeleteCommentsIDUnauthorized) Error

type GetCommentsIDNotFound

type GetCommentsIDNotFound struct {
	Payload *models.Error
}

GetCommentsIDNotFound

没找到指定对象

func NewGetCommentsIDNotFound

func NewGetCommentsIDNotFound() *GetCommentsIDNotFound

NewGetCommentsIDNotFound creates a GetCommentsIDNotFound with default headers values

func (*GetCommentsIDNotFound) Error

func (o *GetCommentsIDNotFound) Error() string

type GetCommentsIDOK

type GetCommentsIDOK struct {
	Payload *models.Comment
}

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

WithID adds the id to the get comments ID params

func (*GetCommentsIDParams) WriteToRequest

func (o *GetCommentsIDParams) WriteToRequest(r client.Request, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetCommentsIDReader

type GetCommentsIDReader struct {
	// contains filtered or unexported fields
}

func (*GetCommentsIDReader) ReadResponse

func (o *GetCommentsIDReader) ReadResponse(response client.Response, consumer httpkit.Consumer) (interface{}, error)

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

func (o *GetCommentsParams) WriteToRequest(r client.Request, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetCommentsReader

type GetCommentsReader struct {
	// contains filtered or unexported fields
}

func (*GetCommentsReader) ReadResponse

func (o *GetCommentsReader) ReadResponse(response client.Response, consumer httpkit.Consumer) (interface{}, error)

type PostCommentsBadRequest

type PostCommentsBadRequest struct {
	Payload *models.Error
}

PostCommentsBadRequest

无效请求

func NewPostCommentsBadRequest

func NewPostCommentsBadRequest() *PostCommentsBadRequest

NewPostCommentsBadRequest creates a PostCommentsBadRequest with default headers values

func (*PostCommentsBadRequest) Error

func (o *PostCommentsBadRequest) Error() string

type PostCommentsCreated

type PostCommentsCreated struct {
	Payload *models.Comment
}

PostCommentsCreated

成功创建评论

func NewPostCommentsCreated

func NewPostCommentsCreated() *PostCommentsCreated

NewPostCommentsCreated creates a PostCommentsCreated with default headers values

func (*PostCommentsCreated) Error

func (o *PostCommentsCreated) Error() string

type PostCommentsForbidden

type PostCommentsForbidden struct {
	Payload *models.Error
}

PostCommentsForbidden

无访问权限

func NewPostCommentsForbidden

func NewPostCommentsForbidden() *PostCommentsForbidden

NewPostCommentsForbidden creates a PostCommentsForbidden with default headers values

func (*PostCommentsForbidden) Error

func (o *PostCommentsForbidden) Error() string

type PostCommentsInternalServerError

type PostCommentsInternalServerError struct {
	Payload *models.Error
}

PostCommentsInternalServerError

服务端内部错误

func NewPostCommentsInternalServerError

func NewPostCommentsInternalServerError() *PostCommentsInternalServerError

NewPostCommentsInternalServerError creates a PostCommentsInternalServerError with default headers values

func (*PostCommentsInternalServerError) Error

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

WithBody adds the body to the post comments params

func (*PostCommentsParams) WriteToRequest

func (o *PostCommentsParams) WriteToRequest(r client.Request, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type PostCommentsReader

type PostCommentsReader struct {
	// contains filtered or unexported fields
}

func (*PostCommentsReader) ReadResponse

func (o *PostCommentsReader) ReadResponse(response client.Response, consumer httpkit.Consumer) (interface{}, error)

type PostCommentsUnauthorized

type PostCommentsUnauthorized struct {
	Payload *models.Error
}

PostCommentsUnauthorized

未认证

func NewPostCommentsUnauthorized

func NewPostCommentsUnauthorized() *PostCommentsUnauthorized

NewPostCommentsUnauthorized creates a PostCommentsUnauthorized with default headers values

func (*PostCommentsUnauthorized) Error

func (o *PostCommentsUnauthorized) Error() string

type PutCommentsIDBadRequest

type PutCommentsIDBadRequest struct {
	Payload *models.Error
}

PutCommentsIDBadRequest

无效请求

func NewPutCommentsIDBadRequest

func NewPutCommentsIDBadRequest() *PutCommentsIDBadRequest

NewPutCommentsIDBadRequest creates a PutCommentsIDBadRequest with default headers values

func (*PutCommentsIDBadRequest) Error

func (o *PutCommentsIDBadRequest) Error() string

type PutCommentsIDForbidden

type PutCommentsIDForbidden struct {
	Payload *models.Error
}

PutCommentsIDForbidden

无访问权限

func NewPutCommentsIDForbidden

func NewPutCommentsIDForbidden() *PutCommentsIDForbidden

NewPutCommentsIDForbidden creates a PutCommentsIDForbidden with default headers values

func (*PutCommentsIDForbidden) Error

func (o *PutCommentsIDForbidden) Error() string

type PutCommentsIDInternalServerError

type PutCommentsIDInternalServerError struct {
	Payload *models.Error
}

PutCommentsIDInternalServerError

服务端内部错误

func NewPutCommentsIDInternalServerError

func NewPutCommentsIDInternalServerError() *PutCommentsIDInternalServerError

NewPutCommentsIDInternalServerError creates a PutCommentsIDInternalServerError with default headers values

func (*PutCommentsIDInternalServerError) Error

type PutCommentsIDNotFound

type PutCommentsIDNotFound struct {
	Payload *models.Error
}

PutCommentsIDNotFound

没找到指定对象

func NewPutCommentsIDNotFound

func NewPutCommentsIDNotFound() *PutCommentsIDNotFound

NewPutCommentsIDNotFound creates a PutCommentsIDNotFound with default headers values

func (*PutCommentsIDNotFound) Error

func (o *PutCommentsIDNotFound) Error() string

type PutCommentsIDOK

type PutCommentsIDOK struct {
	Payload *models.Comment
}

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

WithBody adds the body to the put comments ID params

func (*PutCommentsIDParams) WithID

WithID adds the id to the put comments ID params

func (*PutCommentsIDParams) WriteToRequest

func (o *PutCommentsIDParams) WriteToRequest(r client.Request, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type PutCommentsIDReader

type PutCommentsIDReader struct {
	// contains filtered or unexported fields
}

func (*PutCommentsIDReader) ReadResponse

func (o *PutCommentsIDReader) ReadResponse(response client.Response, consumer httpkit.Consumer) (interface{}, error)

type PutCommentsIDUnauthorized

type PutCommentsIDUnauthorized struct {
	Payload *models.Error
}

PutCommentsIDUnauthorized

未认证

func NewPutCommentsIDUnauthorized

func NewPutCommentsIDUnauthorized() *PutCommentsIDUnauthorized

NewPutCommentsIDUnauthorized creates a PutCommentsIDUnauthorized with default headers values

func (*PutCommentsIDUnauthorized) Error

func (o *PutCommentsIDUnauthorized) Error() string

Jump to

Keyboard shortcuts

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