expert

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

func New

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

New creates a new expert API client.

func (*Client) DeleteExpertsID

func (a *Client) DeleteExpertsID(params *DeleteExpertsIDParams, authInfo client.AuthInfoWriter) (*DeleteExpertsIDOK, error)

删除专家

删除指定专家

func (*Client) GetExperts

func (a *Client) GetExperts(params *GetExpertsParams, authInfo client.AuthInfoWriter) (*GetExpertsOK, error)

查看专家列表

查看所有专家,支持分页和过滤器

func (*Client) GetExpertsID

func (a *Client) GetExpertsID(params *GetExpertsIDParams, authInfo client.AuthInfoWriter) (*GetExpertsIDOK, error)

查询专家

得到指定专家的具体信息

func (*Client) PostExperts

func (a *Client) PostExperts(params *PostExpertsParams, authInfo client.AuthInfoWriter) (*PostExpertsCreated, error)

创建专家

根据请求创建专家

func (*Client) PutExpertsID

func (a *Client) PutExpertsID(params *PutExpertsIDParams, authInfo client.AuthInfoWriter) (*PutExpertsIDOK, error)

更新专家

根据请求中指定要更新的属性对专家进行更新

Example:

  1. 更新专家姓名和邮件 ```json { "name":"newName", "email": "new@email.com" } ```

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type DeleteExpertsIDBadRequest

type DeleteExpertsIDBadRequest struct {
	Payload *models.Error
}

DeleteExpertsIDBadRequest

无效请求

func NewDeleteExpertsIDBadRequest

func NewDeleteExpertsIDBadRequest() *DeleteExpertsIDBadRequest

NewDeleteExpertsIDBadRequest creates a DeleteExpertsIDBadRequest with default headers values

func (*DeleteExpertsIDBadRequest) Error

func (o *DeleteExpertsIDBadRequest) Error() string

type DeleteExpertsIDForbidden

type DeleteExpertsIDForbidden struct {
	Payload *models.Error
}

DeleteExpertsIDForbidden

无访问权限

func NewDeleteExpertsIDForbidden

func NewDeleteExpertsIDForbidden() *DeleteExpertsIDForbidden

NewDeleteExpertsIDForbidden creates a DeleteExpertsIDForbidden with default headers values

func (*DeleteExpertsIDForbidden) Error

func (o *DeleteExpertsIDForbidden) Error() string

type DeleteExpertsIDInternalServerError

type DeleteExpertsIDInternalServerError struct {
	Payload *models.Error
}

DeleteExpertsIDInternalServerError

服务端内部错误

func NewDeleteExpertsIDInternalServerError

func NewDeleteExpertsIDInternalServerError() *DeleteExpertsIDInternalServerError

NewDeleteExpertsIDInternalServerError creates a DeleteExpertsIDInternalServerError with default headers values

func (*DeleteExpertsIDInternalServerError) Error

type DeleteExpertsIDNotFound

type DeleteExpertsIDNotFound struct {
	Payload *models.Error
}

DeleteExpertsIDNotFound

没找到指定对象

func NewDeleteExpertsIDNotFound

func NewDeleteExpertsIDNotFound() *DeleteExpertsIDNotFound

NewDeleteExpertsIDNotFound creates a DeleteExpertsIDNotFound with default headers values

func (*DeleteExpertsIDNotFound) Error

func (o *DeleteExpertsIDNotFound) Error() string

type DeleteExpertsIDOK

type DeleteExpertsIDOK struct {
}

DeleteExpertsIDOK

成功删除专家

func NewDeleteExpertsIDOK

func NewDeleteExpertsIDOK() *DeleteExpertsIDOK

NewDeleteExpertsIDOK creates a DeleteExpertsIDOK with default headers values

func (*DeleteExpertsIDOK) Error

func (o *DeleteExpertsIDOK) Error() string

type DeleteExpertsIDParams

type DeleteExpertsIDParams struct {

	/*ID
	  专家ID

	*/
	ID int64
}

DeleteExpertsIDParams contains all the parameters to send to the API endpoint for the delete experts ID operation typically these are written to a http.Request

func NewDeleteExpertsIDParams

func NewDeleteExpertsIDParams() *DeleteExpertsIDParams

NewDeleteExpertsIDParams creates a new DeleteExpertsIDParams object with the default values initialized.

func (*DeleteExpertsIDParams) WithID

WithID adds the id to the delete experts ID params

func (*DeleteExpertsIDParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type DeleteExpertsIDReader

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

func (*DeleteExpertsIDReader) ReadResponse

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

type DeleteExpertsIDUnauthorized

type DeleteExpertsIDUnauthorized struct {
	Payload *models.Error
}

DeleteExpertsIDUnauthorized

未认证

func NewDeleteExpertsIDUnauthorized

func NewDeleteExpertsIDUnauthorized() *DeleteExpertsIDUnauthorized

NewDeleteExpertsIDUnauthorized creates a DeleteExpertsIDUnauthorized with default headers values

func (*DeleteExpertsIDUnauthorized) Error

type GetExpertsIDNotFound

type GetExpertsIDNotFound struct {
	Payload *models.Error
}

GetExpertsIDNotFound

没找到指定对象

func NewGetExpertsIDNotFound

func NewGetExpertsIDNotFound() *GetExpertsIDNotFound

NewGetExpertsIDNotFound creates a GetExpertsIDNotFound with default headers values

func (*GetExpertsIDNotFound) Error

func (o *GetExpertsIDNotFound) Error() string

type GetExpertsIDOK

type GetExpertsIDOK struct {
	Payload *models.Expert
}

GetExpertsIDOK

成功查询专家

func NewGetExpertsIDOK

func NewGetExpertsIDOK() *GetExpertsIDOK

NewGetExpertsIDOK creates a GetExpertsIDOK with default headers values

func (*GetExpertsIDOK) Error

func (o *GetExpertsIDOK) Error() string

type GetExpertsIDParams

type GetExpertsIDParams struct {

	/*ID
	  专家ID

	*/
	ID int64
}

GetExpertsIDParams contains all the parameters to send to the API endpoint for the get experts ID operation typically these are written to a http.Request

func NewGetExpertsIDParams

func NewGetExpertsIDParams() *GetExpertsIDParams

NewGetExpertsIDParams creates a new GetExpertsIDParams object with the default values initialized.

func (*GetExpertsIDParams) WithID

WithID adds the id to the get experts ID params

func (*GetExpertsIDParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetExpertsIDReader

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

func (*GetExpertsIDReader) ReadResponse

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

type GetExpertsOK

type GetExpertsOK struct {
	Payload *models.ExpertPageableResult
}

GetExpertsOK

专家列表

func NewGetExpertsOK

func NewGetExpertsOK() *GetExpertsOK

NewGetExpertsOK creates a GetExpertsOK with default headers values

func (*GetExpertsOK) Error

func (o *GetExpertsOK) Error() string

type GetExpertsParams

type GetExpertsParams struct {

	/*Category
	  专长类别

	*/
	Category int64
	/*Page
	  当前页码

	*/
	Page int64
	/*Pagesize
	  每页项数

	*/
	Pagesize int64
}

GetExpertsParams contains all the parameters to send to the API endpoint for the get experts operation typically these are written to a http.Request

func NewGetExpertsParams

func NewGetExpertsParams() *GetExpertsParams

NewGetExpertsParams creates a new GetExpertsParams object with the default values initialized.

func (*GetExpertsParams) WithCategory

func (o *GetExpertsParams) WithCategory(category int64) *GetExpertsParams

WithCategory adds the category to the get experts params

func (*GetExpertsParams) WithPage

func (o *GetExpertsParams) WithPage(page int64) *GetExpertsParams

WithPage adds the page to the get experts params

func (*GetExpertsParams) WithPagesize

func (o *GetExpertsParams) WithPagesize(pagesize int64) *GetExpertsParams

WithPagesize adds the pagesize to the get experts params

func (*GetExpertsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetExpertsReader

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

func (*GetExpertsReader) ReadResponse

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

type PostExpertsBadRequest

type PostExpertsBadRequest struct {
	Payload *models.Error
}

PostExpertsBadRequest

无效请求

func NewPostExpertsBadRequest

func NewPostExpertsBadRequest() *PostExpertsBadRequest

NewPostExpertsBadRequest creates a PostExpertsBadRequest with default headers values

func (*PostExpertsBadRequest) Error

func (o *PostExpertsBadRequest) Error() string

type PostExpertsCreated

type PostExpertsCreated struct {
	Payload *models.AuthenticationResponse
}

PostExpertsCreated

成功创建专家

func NewPostExpertsCreated

func NewPostExpertsCreated() *PostExpertsCreated

NewPostExpertsCreated creates a PostExpertsCreated with default headers values

func (*PostExpertsCreated) Error

func (o *PostExpertsCreated) Error() string

type PostExpertsForbidden

type PostExpertsForbidden struct {
	Payload *models.Error
}

PostExpertsForbidden

无访问权限

func NewPostExpertsForbidden

func NewPostExpertsForbidden() *PostExpertsForbidden

NewPostExpertsForbidden creates a PostExpertsForbidden with default headers values

func (*PostExpertsForbidden) Error

func (o *PostExpertsForbidden) Error() string

type PostExpertsInternalServerError

type PostExpertsInternalServerError struct {
	Payload *models.Error
}

PostExpertsInternalServerError

服务端内部错误

func NewPostExpertsInternalServerError

func NewPostExpertsInternalServerError() *PostExpertsInternalServerError

NewPostExpertsInternalServerError creates a PostExpertsInternalServerError with default headers values

func (*PostExpertsInternalServerError) Error

type PostExpertsParams

type PostExpertsParams struct {

	/*Body*/
	Body *models.CreateExpertRequest
}

PostExpertsParams contains all the parameters to send to the API endpoint for the post experts operation typically these are written to a http.Request

func NewPostExpertsParams

func NewPostExpertsParams() *PostExpertsParams

NewPostExpertsParams creates a new PostExpertsParams object with the default values initialized.

func (*PostExpertsParams) WithBody

WithBody adds the body to the post experts params

func (*PostExpertsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PostExpertsReader

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

func (*PostExpertsReader) ReadResponse

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

type PostExpertsUnauthorized

type PostExpertsUnauthorized struct {
	Payload *models.Error
}

PostExpertsUnauthorized

未认证

func NewPostExpertsUnauthorized

func NewPostExpertsUnauthorized() *PostExpertsUnauthorized

NewPostExpertsUnauthorized creates a PostExpertsUnauthorized with default headers values

func (*PostExpertsUnauthorized) Error

func (o *PostExpertsUnauthorized) Error() string

type PutExpertsIDBadRequest

type PutExpertsIDBadRequest struct {
	Payload *models.Error
}

PutExpertsIDBadRequest

无效请求

func NewPutExpertsIDBadRequest

func NewPutExpertsIDBadRequest() *PutExpertsIDBadRequest

NewPutExpertsIDBadRequest creates a PutExpertsIDBadRequest with default headers values

func (*PutExpertsIDBadRequest) Error

func (o *PutExpertsIDBadRequest) Error() string

type PutExpertsIDForbidden

type PutExpertsIDForbidden struct {
	Payload *models.Error
}

PutExpertsIDForbidden

无访问权限

func NewPutExpertsIDForbidden

func NewPutExpertsIDForbidden() *PutExpertsIDForbidden

NewPutExpertsIDForbidden creates a PutExpertsIDForbidden with default headers values

func (*PutExpertsIDForbidden) Error

func (o *PutExpertsIDForbidden) Error() string

type PutExpertsIDInternalServerError

type PutExpertsIDInternalServerError struct {
	Payload *models.Error
}

PutExpertsIDInternalServerError

服务端内部错误

func NewPutExpertsIDInternalServerError

func NewPutExpertsIDInternalServerError() *PutExpertsIDInternalServerError

NewPutExpertsIDInternalServerError creates a PutExpertsIDInternalServerError with default headers values

func (*PutExpertsIDInternalServerError) Error

type PutExpertsIDNotFound

type PutExpertsIDNotFound struct {
	Payload *models.Error
}

PutExpertsIDNotFound

没找到指定对象

func NewPutExpertsIDNotFound

func NewPutExpertsIDNotFound() *PutExpertsIDNotFound

NewPutExpertsIDNotFound creates a PutExpertsIDNotFound with default headers values

func (*PutExpertsIDNotFound) Error

func (o *PutExpertsIDNotFound) Error() string

type PutExpertsIDOK

type PutExpertsIDOK struct {
	Payload *models.Expert
}

PutExpertsIDOK

成功更新专家

func NewPutExpertsIDOK

func NewPutExpertsIDOK() *PutExpertsIDOK

NewPutExpertsIDOK creates a PutExpertsIDOK with default headers values

func (*PutExpertsIDOK) Error

func (o *PutExpertsIDOK) Error() string

type PutExpertsIDParams

type PutExpertsIDParams struct {

	/*Body*/
	Body *models.UpdateExpertRequest
	/*ID
	  专家ID

	*/
	ID int64
}

PutExpertsIDParams contains all the parameters to send to the API endpoint for the put experts ID operation typically these are written to a http.Request

func NewPutExpertsIDParams

func NewPutExpertsIDParams() *PutExpertsIDParams

NewPutExpertsIDParams creates a new PutExpertsIDParams object with the default values initialized.

func (*PutExpertsIDParams) WithBody

WithBody adds the body to the put experts ID params

func (*PutExpertsIDParams) WithID

WithID adds the id to the put experts ID params

func (*PutExpertsIDParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PutExpertsIDReader

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

func (*PutExpertsIDReader) ReadResponse

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

type PutExpertsIDUnauthorized

type PutExpertsIDUnauthorized struct {
	Payload *models.Error
}

PutExpertsIDUnauthorized

未认证

func NewPutExpertsIDUnauthorized

func NewPutExpertsIDUnauthorized() *PutExpertsIDUnauthorized

NewPutExpertsIDUnauthorized creates a PutExpertsIDUnauthorized with default headers values

func (*PutExpertsIDUnauthorized) Error

func (o *PutExpertsIDUnauthorized) Error() string

Jump to

Keyboard shortcuts

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