Documentation ¶
Index ¶
- type APIError
- type Client
- func (a *Client) DeleteTopicsID(params *DeleteTopicsIDParams, authInfo client.AuthInfoWriter) (*DeleteTopicsIDOK, error)
- func (a *Client) GetTopics(params *GetTopicsParams, authInfo client.AuthInfoWriter) (*GetTopicsOK, error)
- func (a *Client) GetTopicsID(params *GetTopicsIDParams, authInfo client.AuthInfoWriter) (*GetTopicsIDOK, error)
- func (a *Client) PostTopics(params *PostTopicsParams, authInfo client.AuthInfoWriter) (*PostTopicsCreated, error)
- func (a *Client) PutTopicsID(params *PutTopicsIDParams, authInfo client.AuthInfoWriter) (*PutTopicsIDOK, error)
- func (a *Client) SetTransport(transport client.Transport)
- type DeleteTopicsIDBadRequest
- type DeleteTopicsIDForbidden
- type DeleteTopicsIDInternalServerError
- type DeleteTopicsIDNotFound
- type DeleteTopicsIDOK
- type DeleteTopicsIDParams
- type DeleteTopicsIDReader
- type DeleteTopicsIDUnauthorized
- type GetTopicsIDNotFound
- type GetTopicsIDOK
- type GetTopicsIDParams
- type GetTopicsIDReader
- type GetTopicsOK
- type GetTopicsParams
- func (o *GetTopicsParams) WithAuthorid(authorid int64) *GetTopicsParams
- func (o *GetTopicsParams) WithCategory(category int64) *GetTopicsParams
- func (o *GetTopicsParams) WithPage(page int64) *GetTopicsParams
- func (o *GetTopicsParams) WithPagesize(pagesize int64) *GetTopicsParams
- func (o *GetTopicsParams) WithResolved(resolved bool) *GetTopicsParams
- func (o *GetTopicsParams) WithStartupid(startupid int64) *GetTopicsParams
- func (o *GetTopicsParams) WithStatus(status int64) *GetTopicsParams
- func (o *GetTopicsParams) WithUnresolved(unresolved bool) *GetTopicsParams
- func (o *GetTopicsParams) WithWonderful(wonderful int64) *GetTopicsParams
- func (o *GetTopicsParams) WriteToRequest(r client.Request, reg strfmt.Registry) error
- type GetTopicsReader
- type PostTopicsBadRequest
- type PostTopicsCreated
- type PostTopicsForbidden
- type PostTopicsInternalServerError
- type PostTopicsParams
- type PostTopicsReader
- type PostTopicsUnauthorized
- type PutTopicsIDBadRequest
- type PutTopicsIDForbidden
- type PutTopicsIDInternalServerError
- type PutTopicsIDNotFound
- type PutTopicsIDOK
- type PutTopicsIDParams
- type PutTopicsIDReader
- type PutTopicsIDUnauthorized
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 topic API
func (*Client) DeleteTopicsID ¶
func (a *Client) DeleteTopicsID(params *DeleteTopicsIDParams, authInfo client.AuthInfoWriter) (*DeleteTopicsIDOK, error)
删除主题
删除指定主题
func (*Client) GetTopics ¶
func (a *Client) GetTopics(params *GetTopicsParams, authInfo client.AuthInfoWriter) (*GetTopicsOK, error)
查看主题列表
查看所有主题,支持分页和过滤器
func (*Client) GetTopicsID ¶
func (a *Client) GetTopicsID(params *GetTopicsIDParams, authInfo client.AuthInfoWriter) (*GetTopicsIDOK, error)
查询主题
得到指定主题的具体信息
func (*Client) PostTopics ¶
func (a *Client) PostTopics(params *PostTopicsParams, authInfo client.AuthInfoWriter) (*PostTopicsCreated, error)
创建主题
根据请求创建主题
func (*Client) PutTopicsID ¶
func (a *Client) PutTopicsID(params *PutTopicsIDParams, authInfo client.AuthInfoWriter) (*PutTopicsIDOK, error)
更新主题
根据请求中指定要更新的属性对主题进行更新
func (*Client) SetTransport ¶
SetTransport changes the transport on the client
type DeleteTopicsIDBadRequest ¶
DeleteTopicsIDBadRequest
无效请求
func NewDeleteTopicsIDBadRequest ¶
func NewDeleteTopicsIDBadRequest() *DeleteTopicsIDBadRequest
NewDeleteTopicsIDBadRequest creates a DeleteTopicsIDBadRequest with default headers values
func (*DeleteTopicsIDBadRequest) Error ¶
func (o *DeleteTopicsIDBadRequest) Error() string
type DeleteTopicsIDForbidden ¶
DeleteTopicsIDForbidden
无访问权限
func NewDeleteTopicsIDForbidden ¶
func NewDeleteTopicsIDForbidden() *DeleteTopicsIDForbidden
NewDeleteTopicsIDForbidden creates a DeleteTopicsIDForbidden with default headers values
func (*DeleteTopicsIDForbidden) Error ¶
func (o *DeleteTopicsIDForbidden) Error() string
type DeleteTopicsIDInternalServerError ¶
DeleteTopicsIDInternalServerError
服务端内部错误
func NewDeleteTopicsIDInternalServerError ¶
func NewDeleteTopicsIDInternalServerError() *DeleteTopicsIDInternalServerError
NewDeleteTopicsIDInternalServerError creates a DeleteTopicsIDInternalServerError with default headers values
func (*DeleteTopicsIDInternalServerError) Error ¶
func (o *DeleteTopicsIDInternalServerError) Error() string
type DeleteTopicsIDNotFound ¶
DeleteTopicsIDNotFound
没找到指定对象
func NewDeleteTopicsIDNotFound ¶
func NewDeleteTopicsIDNotFound() *DeleteTopicsIDNotFound
NewDeleteTopicsIDNotFound creates a DeleteTopicsIDNotFound with default headers values
func (*DeleteTopicsIDNotFound) Error ¶
func (o *DeleteTopicsIDNotFound) Error() string
type DeleteTopicsIDOK ¶
type DeleteTopicsIDOK struct { }
DeleteTopicsIDOK
成功删除主题
func NewDeleteTopicsIDOK ¶
func NewDeleteTopicsIDOK() *DeleteTopicsIDOK
NewDeleteTopicsIDOK creates a DeleteTopicsIDOK with default headers values
func (*DeleteTopicsIDOK) Error ¶
func (o *DeleteTopicsIDOK) Error() string
type DeleteTopicsIDParams ¶
type DeleteTopicsIDParams struct { /*ID 主题ID */ ID int64 }
DeleteTopicsIDParams contains all the parameters to send to the API endpoint for the delete topics ID operation typically these are written to a http.Request
func NewDeleteTopicsIDParams ¶
func NewDeleteTopicsIDParams() *DeleteTopicsIDParams
NewDeleteTopicsIDParams creates a new DeleteTopicsIDParams object with the default values initialized.
func (*DeleteTopicsIDParams) WithID ¶
func (o *DeleteTopicsIDParams) WithID(id int64) *DeleteTopicsIDParams
WithID adds the id to the delete topics ID params
func (*DeleteTopicsIDParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type DeleteTopicsIDReader ¶
type DeleteTopicsIDReader struct {
// contains filtered or unexported fields
}
func (*DeleteTopicsIDReader) ReadResponse ¶
type DeleteTopicsIDUnauthorized ¶
type DeleteTopicsIDUnauthorized struct {
}DeleteTopicsIDUnauthorized
未认证
func NewDeleteTopicsIDUnauthorized ¶
func NewDeleteTopicsIDUnauthorized() *DeleteTopicsIDUnauthorized
NewDeleteTopicsIDUnauthorized creates a DeleteTopicsIDUnauthorized with default headers values
func (*DeleteTopicsIDUnauthorized) Error ¶
func (o *DeleteTopicsIDUnauthorized) Error() string
type GetTopicsIDNotFound ¶
GetTopicsIDNotFound
没找到指定对象
func NewGetTopicsIDNotFound ¶
func NewGetTopicsIDNotFound() *GetTopicsIDNotFound
NewGetTopicsIDNotFound creates a GetTopicsIDNotFound with default headers values
func (*GetTopicsIDNotFound) Error ¶
func (o *GetTopicsIDNotFound) Error() string
type GetTopicsIDOK ¶
GetTopicsIDOK
成功查询主题
func NewGetTopicsIDOK ¶
func NewGetTopicsIDOK() *GetTopicsIDOK
NewGetTopicsIDOK creates a GetTopicsIDOK with default headers values
func (*GetTopicsIDOK) Error ¶
func (o *GetTopicsIDOK) Error() string
type GetTopicsIDParams ¶
type GetTopicsIDParams struct { /*ID 主题ID */ ID int64 }
GetTopicsIDParams contains all the parameters to send to the API endpoint for the get topics ID operation typically these are written to a http.Request
func NewGetTopicsIDParams ¶
func NewGetTopicsIDParams() *GetTopicsIDParams
NewGetTopicsIDParams creates a new GetTopicsIDParams object with the default values initialized.
func (*GetTopicsIDParams) WithID ¶
func (o *GetTopicsIDParams) WithID(id int64) *GetTopicsIDParams
WithID adds the id to the get topics ID params
func (*GetTopicsIDParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type GetTopicsIDReader ¶
type GetTopicsIDReader struct {
// contains filtered or unexported fields
}
func (*GetTopicsIDReader) ReadResponse ¶
type GetTopicsOK ¶
type GetTopicsOK struct {
Payload *models.TopicPageableResult
}
GetTopicsOK
主题列表
func NewGetTopicsOK ¶
func NewGetTopicsOK() *GetTopicsOK
NewGetTopicsOK creates a GetTopicsOK with default headers values
func (*GetTopicsOK) Error ¶
func (o *GetTopicsOK) Error() string
type GetTopicsParams ¶
type GetTopicsParams struct { /*Authorid 主题发布者ID */ Authorid int64 /*Category 主题类别 */ Category int64 /*Page 当前页码 */ Page int64 /*Pagesize 每页项数 */ Pagesize int64 /*Resolved 是否已解决问题优先 */ Resolved bool /*Startupid 创业公司ID */ Startupid int64 /*Status 主题状态 */ Status int64 /*Unresolved 是否未解决问题优先 */ Unresolved bool /*Wonderful 精彩问答数目, 若有此项则其他查询条件无效, 且只返回一页 */ Wonderful int64 }
GetTopicsParams contains all the parameters to send to the API endpoint for the get topics operation typically these are written to a http.Request
func NewGetTopicsParams ¶
func NewGetTopicsParams() *GetTopicsParams
NewGetTopicsParams creates a new GetTopicsParams object with the default values initialized.
func (*GetTopicsParams) WithAuthorid ¶
func (o *GetTopicsParams) WithAuthorid(authorid int64) *GetTopicsParams
WithAuthorid adds the authorid to the get topics params
func (*GetTopicsParams) WithCategory ¶
func (o *GetTopicsParams) WithCategory(category int64) *GetTopicsParams
WithCategory adds the category to the get topics params
func (*GetTopicsParams) WithPage ¶
func (o *GetTopicsParams) WithPage(page int64) *GetTopicsParams
WithPage adds the page to the get topics params
func (*GetTopicsParams) WithPagesize ¶
func (o *GetTopicsParams) WithPagesize(pagesize int64) *GetTopicsParams
WithPagesize adds the pagesize to the get topics params
func (*GetTopicsParams) WithResolved ¶
func (o *GetTopicsParams) WithResolved(resolved bool) *GetTopicsParams
WithResolved adds the resolved to the get topics params
func (*GetTopicsParams) WithStartupid ¶
func (o *GetTopicsParams) WithStartupid(startupid int64) *GetTopicsParams
WithStartupid adds the startupid to the get topics params
func (*GetTopicsParams) WithStatus ¶
func (o *GetTopicsParams) WithStatus(status int64) *GetTopicsParams
WithStatus adds the status to the get topics params
func (*GetTopicsParams) WithUnresolved ¶
func (o *GetTopicsParams) WithUnresolved(unresolved bool) *GetTopicsParams
WithUnresolved adds the unresolved to the get topics params
func (*GetTopicsParams) WithWonderful ¶
func (o *GetTopicsParams) WithWonderful(wonderful int64) *GetTopicsParams
WithWonderful adds the wonderful to the get topics params
func (*GetTopicsParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type GetTopicsReader ¶
type GetTopicsReader struct {
// contains filtered or unexported fields
}
func (*GetTopicsReader) ReadResponse ¶
type PostTopicsBadRequest ¶
PostTopicsBadRequest
无效请求
func NewPostTopicsBadRequest ¶
func NewPostTopicsBadRequest() *PostTopicsBadRequest
NewPostTopicsBadRequest creates a PostTopicsBadRequest with default headers values
func (*PostTopicsBadRequest) Error ¶
func (o *PostTopicsBadRequest) Error() string
type PostTopicsCreated ¶
PostTopicsCreated
成功创建主题
func NewPostTopicsCreated ¶
func NewPostTopicsCreated() *PostTopicsCreated
NewPostTopicsCreated creates a PostTopicsCreated with default headers values
func (*PostTopicsCreated) Error ¶
func (o *PostTopicsCreated) Error() string
type PostTopicsForbidden ¶
PostTopicsForbidden
无访问权限
func NewPostTopicsForbidden ¶
func NewPostTopicsForbidden() *PostTopicsForbidden
NewPostTopicsForbidden creates a PostTopicsForbidden with default headers values
func (*PostTopicsForbidden) Error ¶
func (o *PostTopicsForbidden) Error() string
type PostTopicsInternalServerError ¶
PostTopicsInternalServerError
服务端内部错误
func NewPostTopicsInternalServerError ¶
func NewPostTopicsInternalServerError() *PostTopicsInternalServerError
NewPostTopicsInternalServerError creates a PostTopicsInternalServerError with default headers values
func (*PostTopicsInternalServerError) Error ¶
func (o *PostTopicsInternalServerError) Error() string
type PostTopicsParams ¶
type PostTopicsParams struct { /*Body*/ Body *models.CreateTopicRequest }
PostTopicsParams contains all the parameters to send to the API endpoint for the post topics operation typically these are written to a http.Request
func NewPostTopicsParams ¶
func NewPostTopicsParams() *PostTopicsParams
NewPostTopicsParams creates a new PostTopicsParams object with the default values initialized.
func (*PostTopicsParams) WithBody ¶
func (o *PostTopicsParams) WithBody(body *models.CreateTopicRequest) *PostTopicsParams
WithBody adds the body to the post topics params
func (*PostTopicsParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type PostTopicsReader ¶
type PostTopicsReader struct {
// contains filtered or unexported fields
}
func (*PostTopicsReader) ReadResponse ¶
type PostTopicsUnauthorized ¶
type PostTopicsUnauthorized struct {
}PostTopicsUnauthorized
未认证
func NewPostTopicsUnauthorized ¶
func NewPostTopicsUnauthorized() *PostTopicsUnauthorized
NewPostTopicsUnauthorized creates a PostTopicsUnauthorized with default headers values
func (*PostTopicsUnauthorized) Error ¶
func (o *PostTopicsUnauthorized) Error() string
type PutTopicsIDBadRequest ¶
PutTopicsIDBadRequest
无效请求
func NewPutTopicsIDBadRequest ¶
func NewPutTopicsIDBadRequest() *PutTopicsIDBadRequest
NewPutTopicsIDBadRequest creates a PutTopicsIDBadRequest with default headers values
func (*PutTopicsIDBadRequest) Error ¶
func (o *PutTopicsIDBadRequest) Error() string
type PutTopicsIDForbidden ¶
PutTopicsIDForbidden
无访问权限
func NewPutTopicsIDForbidden ¶
func NewPutTopicsIDForbidden() *PutTopicsIDForbidden
NewPutTopicsIDForbidden creates a PutTopicsIDForbidden with default headers values
func (*PutTopicsIDForbidden) Error ¶
func (o *PutTopicsIDForbidden) Error() string
type PutTopicsIDInternalServerError ¶
PutTopicsIDInternalServerError
服务端内部错误
func NewPutTopicsIDInternalServerError ¶
func NewPutTopicsIDInternalServerError() *PutTopicsIDInternalServerError
NewPutTopicsIDInternalServerError creates a PutTopicsIDInternalServerError with default headers values
func (*PutTopicsIDInternalServerError) Error ¶
func (o *PutTopicsIDInternalServerError) Error() string
type PutTopicsIDNotFound ¶
PutTopicsIDNotFound
没找到指定对象
func NewPutTopicsIDNotFound ¶
func NewPutTopicsIDNotFound() *PutTopicsIDNotFound
NewPutTopicsIDNotFound creates a PutTopicsIDNotFound with default headers values
func (*PutTopicsIDNotFound) Error ¶
func (o *PutTopicsIDNotFound) Error() string
type PutTopicsIDOK ¶
PutTopicsIDOK
成功更新主题
func NewPutTopicsIDOK ¶
func NewPutTopicsIDOK() *PutTopicsIDOK
NewPutTopicsIDOK creates a PutTopicsIDOK with default headers values
func (*PutTopicsIDOK) Error ¶
func (o *PutTopicsIDOK) Error() string
type PutTopicsIDParams ¶
type PutTopicsIDParams struct { /*Body*/ Body *models.UpdateTopicRequest /*ID 主题ID */ ID int64 }
PutTopicsIDParams contains all the parameters to send to the API endpoint for the put topics ID operation typically these are written to a http.Request
func NewPutTopicsIDParams ¶
func NewPutTopicsIDParams() *PutTopicsIDParams
NewPutTopicsIDParams creates a new PutTopicsIDParams object with the default values initialized.
func (*PutTopicsIDParams) WithBody ¶
func (o *PutTopicsIDParams) WithBody(body *models.UpdateTopicRequest) *PutTopicsIDParams
WithBody adds the body to the put topics ID params
func (*PutTopicsIDParams) WithID ¶
func (o *PutTopicsIDParams) WithID(id int64) *PutTopicsIDParams
WithID adds the id to the put topics ID params
func (*PutTopicsIDParams) WriteToRequest ¶
WriteToRequest writes these params to a swagger request
type PutTopicsIDReader ¶
type PutTopicsIDReader struct {
// contains filtered or unexported fields
}
func (*PutTopicsIDReader) ReadResponse ¶
type PutTopicsIDUnauthorized ¶
type PutTopicsIDUnauthorized struct {
}PutTopicsIDUnauthorized
未认证
func NewPutTopicsIDUnauthorized ¶
func NewPutTopicsIDUnauthorized() *PutTopicsIDUnauthorized
NewPutTopicsIDUnauthorized creates a PutTopicsIDUnauthorized with default headers values
func (*PutTopicsIDUnauthorized) Error ¶
func (o *PutTopicsIDUnauthorized) Error() string