topic

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 topic API

func New

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

New creates a new topic API client.

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

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

SetTransport changes the transport on the client

type DeleteTopicsIDBadRequest

type DeleteTopicsIDBadRequest struct {
	Payload *models.Error
}

DeleteTopicsIDBadRequest

无效请求

func NewDeleteTopicsIDBadRequest

func NewDeleteTopicsIDBadRequest() *DeleteTopicsIDBadRequest

NewDeleteTopicsIDBadRequest creates a DeleteTopicsIDBadRequest with default headers values

func (*DeleteTopicsIDBadRequest) Error

func (o *DeleteTopicsIDBadRequest) Error() string

type DeleteTopicsIDForbidden

type DeleteTopicsIDForbidden struct {
	Payload *models.Error
}

DeleteTopicsIDForbidden

无访问权限

func NewDeleteTopicsIDForbidden

func NewDeleteTopicsIDForbidden() *DeleteTopicsIDForbidden

NewDeleteTopicsIDForbidden creates a DeleteTopicsIDForbidden with default headers values

func (*DeleteTopicsIDForbidden) Error

func (o *DeleteTopicsIDForbidden) Error() string

type DeleteTopicsIDInternalServerError

type DeleteTopicsIDInternalServerError struct {
	Payload *models.Error
}

DeleteTopicsIDInternalServerError

服务端内部错误

func NewDeleteTopicsIDInternalServerError

func NewDeleteTopicsIDInternalServerError() *DeleteTopicsIDInternalServerError

NewDeleteTopicsIDInternalServerError creates a DeleteTopicsIDInternalServerError with default headers values

func (*DeleteTopicsIDInternalServerError) Error

type DeleteTopicsIDNotFound

type DeleteTopicsIDNotFound struct {
	Payload *models.Error
}

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

WithID adds the id to the delete topics ID params

func (*DeleteTopicsIDParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type DeleteTopicsIDReader

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

func (*DeleteTopicsIDReader) ReadResponse

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

type DeleteTopicsIDUnauthorized

type DeleteTopicsIDUnauthorized struct {
	Payload *models.Error
}

DeleteTopicsIDUnauthorized

未认证

func NewDeleteTopicsIDUnauthorized

func NewDeleteTopicsIDUnauthorized() *DeleteTopicsIDUnauthorized

NewDeleteTopicsIDUnauthorized creates a DeleteTopicsIDUnauthorized with default headers values

func (*DeleteTopicsIDUnauthorized) Error

type GetTopicsIDNotFound

type GetTopicsIDNotFound struct {
	Payload *models.Error
}

GetTopicsIDNotFound

没找到指定对象

func NewGetTopicsIDNotFound

func NewGetTopicsIDNotFound() *GetTopicsIDNotFound

NewGetTopicsIDNotFound creates a GetTopicsIDNotFound with default headers values

func (*GetTopicsIDNotFound) Error

func (o *GetTopicsIDNotFound) Error() string

type GetTopicsIDOK

type GetTopicsIDOK struct {
	Payload *models.Topic
}

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

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

WriteToRequest writes these params to a swagger request

type GetTopicsIDReader

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

func (*GetTopicsIDReader) ReadResponse

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

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

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

WriteToRequest writes these params to a swagger request

type GetTopicsReader

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

func (*GetTopicsReader) ReadResponse

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

type PostTopicsBadRequest

type PostTopicsBadRequest struct {
	Payload *models.Error
}

PostTopicsBadRequest

无效请求

func NewPostTopicsBadRequest

func NewPostTopicsBadRequest() *PostTopicsBadRequest

NewPostTopicsBadRequest creates a PostTopicsBadRequest with default headers values

func (*PostTopicsBadRequest) Error

func (o *PostTopicsBadRequest) Error() string

type PostTopicsCreated

type PostTopicsCreated struct {
	Payload *models.Topic
}

PostTopicsCreated

成功创建主题

func NewPostTopicsCreated

func NewPostTopicsCreated() *PostTopicsCreated

NewPostTopicsCreated creates a PostTopicsCreated with default headers values

func (*PostTopicsCreated) Error

func (o *PostTopicsCreated) Error() string

type PostTopicsForbidden

type PostTopicsForbidden struct {
	Payload *models.Error
}

PostTopicsForbidden

无访问权限

func NewPostTopicsForbidden

func NewPostTopicsForbidden() *PostTopicsForbidden

NewPostTopicsForbidden creates a PostTopicsForbidden with default headers values

func (*PostTopicsForbidden) Error

func (o *PostTopicsForbidden) Error() string

type PostTopicsInternalServerError

type PostTopicsInternalServerError struct {
	Payload *models.Error
}

PostTopicsInternalServerError

服务端内部错误

func NewPostTopicsInternalServerError

func NewPostTopicsInternalServerError() *PostTopicsInternalServerError

NewPostTopicsInternalServerError creates a PostTopicsInternalServerError with default headers values

func (*PostTopicsInternalServerError) Error

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

WithBody adds the body to the post topics params

func (*PostTopicsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PostTopicsReader

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

func (*PostTopicsReader) ReadResponse

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

type PostTopicsUnauthorized

type PostTopicsUnauthorized struct {
	Payload *models.Error
}

PostTopicsUnauthorized

未认证

func NewPostTopicsUnauthorized

func NewPostTopicsUnauthorized() *PostTopicsUnauthorized

NewPostTopicsUnauthorized creates a PostTopicsUnauthorized with default headers values

func (*PostTopicsUnauthorized) Error

func (o *PostTopicsUnauthorized) Error() string

type PutTopicsIDBadRequest

type PutTopicsIDBadRequest struct {
	Payload *models.Error
}

PutTopicsIDBadRequest

无效请求

func NewPutTopicsIDBadRequest

func NewPutTopicsIDBadRequest() *PutTopicsIDBadRequest

NewPutTopicsIDBadRequest creates a PutTopicsIDBadRequest with default headers values

func (*PutTopicsIDBadRequest) Error

func (o *PutTopicsIDBadRequest) Error() string

type PutTopicsIDForbidden

type PutTopicsIDForbidden struct {
	Payload *models.Error
}

PutTopicsIDForbidden

无访问权限

func NewPutTopicsIDForbidden

func NewPutTopicsIDForbidden() *PutTopicsIDForbidden

NewPutTopicsIDForbidden creates a PutTopicsIDForbidden with default headers values

func (*PutTopicsIDForbidden) Error

func (o *PutTopicsIDForbidden) Error() string

type PutTopicsIDInternalServerError

type PutTopicsIDInternalServerError struct {
	Payload *models.Error
}

PutTopicsIDInternalServerError

服务端内部错误

func NewPutTopicsIDInternalServerError

func NewPutTopicsIDInternalServerError() *PutTopicsIDInternalServerError

NewPutTopicsIDInternalServerError creates a PutTopicsIDInternalServerError with default headers values

func (*PutTopicsIDInternalServerError) Error

type PutTopicsIDNotFound

type PutTopicsIDNotFound struct {
	Payload *models.Error
}

PutTopicsIDNotFound

没找到指定对象

func NewPutTopicsIDNotFound

func NewPutTopicsIDNotFound() *PutTopicsIDNotFound

NewPutTopicsIDNotFound creates a PutTopicsIDNotFound with default headers values

func (*PutTopicsIDNotFound) Error

func (o *PutTopicsIDNotFound) Error() string

type PutTopicsIDOK

type PutTopicsIDOK struct {
	Payload *models.Topic
}

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

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

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

WriteToRequest writes these params to a swagger request

type PutTopicsIDReader

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

func (*PutTopicsIDReader) ReadResponse

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

type PutTopicsIDUnauthorized

type PutTopicsIDUnauthorized struct {
	Payload *models.Error
}

PutTopicsIDUnauthorized

未认证

func NewPutTopicsIDUnauthorized

func NewPutTopicsIDUnauthorized() *PutTopicsIDUnauthorized

NewPutTopicsIDUnauthorized creates a PutTopicsIDUnauthorized with default headers values

func (*PutTopicsIDUnauthorized) Error

func (o *PutTopicsIDUnauthorized) Error() string

Jump to

Keyboard shortcuts

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