user

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2015 License: Apache-2.0 Imports: 8 Imported by: 156

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUser

type CreateUser struct {
	Context *middleware.Context
	Params  CreateUserParams
	Handler CreateUserHandler
}

CreateUser swagger:route POST /user user createUser

Create user

This can only be done by the logged in user.

func NewCreateUser

func NewCreateUser(ctx *middleware.Context, handler CreateUserHandler) *CreateUser

NewCreateUser creates a new http.Handler for the create user operation

func (*CreateUser) ServeHTTP

func (o *CreateUser) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type CreateUserHandler

type CreateUserHandler interface {
	Handle(CreateUserParams) middleware.Responder
}

CreateUserHandler interface for that can handle valid create user params

type CreateUserHandlerFunc

type CreateUserHandlerFunc func(CreateUserParams) middleware.Responder

CreateUserHandlerFunc turns a function with the right signature into a create user handler

func (CreateUserHandlerFunc) Handle

Handle executing the request and returning a response

type CreateUserParams

type CreateUserParams struct {
	/*Created user object
	  Required: true
	  In: body
	*/
	Body *models.User
}

CreateUserParams contains all the bound params for the create user operation typically these are obtained from a http.Request

swagger:parameters createUser

func NewCreateUserParams added in v0.2.0

func NewCreateUserParams() CreateUserParams

NewCreateUserParams creates a new CreateUserParams object with the default values initialized.

func (*CreateUserParams) BindRequest

func (o *CreateUserParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type CreateUsersWithArrayInput

type CreateUsersWithArrayInput struct {
	Context *middleware.Context
	Params  CreateUsersWithArrayInputParams
	Handler CreateUsersWithArrayInputHandler
}

CreateUsersWithArrayInput swagger:route POST /user/createWithArray user createUsersWithArrayInput

Creates list of users with given input array

func NewCreateUsersWithArrayInput

func NewCreateUsersWithArrayInput(ctx *middleware.Context, handler CreateUsersWithArrayInputHandler) *CreateUsersWithArrayInput

NewCreateUsersWithArrayInput creates a new http.Handler for the create users with array input operation

func (*CreateUsersWithArrayInput) ServeHTTP

type CreateUsersWithArrayInputHandler

type CreateUsersWithArrayInputHandler interface {
	Handle(CreateUsersWithArrayInputParams) middleware.Responder
}

CreateUsersWithArrayInputHandler interface for that can handle valid create users with array input params

type CreateUsersWithArrayInputHandlerFunc

type CreateUsersWithArrayInputHandlerFunc func(CreateUsersWithArrayInputParams) middleware.Responder

CreateUsersWithArrayInputHandlerFunc turns a function with the right signature into a create users with array input handler

func (CreateUsersWithArrayInputHandlerFunc) Handle

Handle executing the request and returning a response

type CreateUsersWithArrayInputParams

type CreateUsersWithArrayInputParams struct {
	/*List of user object
	  Required: true
	  In: body
	*/
	Body []*models.User
}

CreateUsersWithArrayInputParams contains all the bound params for the create users with array input operation typically these are obtained from a http.Request

swagger:parameters createUsersWithArrayInput

func NewCreateUsersWithArrayInputParams added in v0.2.0

func NewCreateUsersWithArrayInputParams() CreateUsersWithArrayInputParams

NewCreateUsersWithArrayInputParams creates a new CreateUsersWithArrayInputParams object with the default values initialized.

func (*CreateUsersWithArrayInputParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type CreateUsersWithListInput

type CreateUsersWithListInput struct {
	Context *middleware.Context
	Params  CreateUsersWithListInputParams
	Handler CreateUsersWithListInputHandler
}

CreateUsersWithListInput swagger:route POST /user/createWithList user createUsersWithListInput

Creates list of users with given input array

func NewCreateUsersWithListInput

func NewCreateUsersWithListInput(ctx *middleware.Context, handler CreateUsersWithListInputHandler) *CreateUsersWithListInput

NewCreateUsersWithListInput creates a new http.Handler for the create users with list input operation

func (*CreateUsersWithListInput) ServeHTTP

type CreateUsersWithListInputHandler

type CreateUsersWithListInputHandler interface {
	Handle(CreateUsersWithListInputParams) middleware.Responder
}

CreateUsersWithListInputHandler interface for that can handle valid create users with list input params

type CreateUsersWithListInputHandlerFunc

type CreateUsersWithListInputHandlerFunc func(CreateUsersWithListInputParams) middleware.Responder

CreateUsersWithListInputHandlerFunc turns a function with the right signature into a create users with list input handler

func (CreateUsersWithListInputHandlerFunc) Handle

Handle executing the request and returning a response

type CreateUsersWithListInputParams

type CreateUsersWithListInputParams struct {
	/*List of user object
	  Required: true
	  In: body
	*/
	Body []*models.User
}

CreateUsersWithListInputParams contains all the bound params for the create users with list input operation typically these are obtained from a http.Request

swagger:parameters createUsersWithListInput

func NewCreateUsersWithListInputParams added in v0.2.0

func NewCreateUsersWithListInputParams() CreateUsersWithListInputParams

NewCreateUsersWithListInputParams creates a new CreateUsersWithListInputParams object with the default values initialized.

func (*CreateUsersWithListInputParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type DeleteUser

type DeleteUser struct {
	Context *middleware.Context
	Params  DeleteUserParams
	Handler DeleteUserHandler
}

DeleteUser swagger:route DELETE /user/{username} user deleteUser

Delete user

This can only be done by the logged in user.

func NewDeleteUser

func NewDeleteUser(ctx *middleware.Context, handler DeleteUserHandler) *DeleteUser

NewDeleteUser creates a new http.Handler for the delete user operation

func (*DeleteUser) ServeHTTP

func (o *DeleteUser) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type DeleteUserBadRequest

type DeleteUserBadRequest struct {
}

DeleteUserBadRequest Invalid username supplied

swagger:response deleteUserBadRequest

func NewDeleteUserBadRequest added in v0.2.0

func NewDeleteUserBadRequest() DeleteUserBadRequest

NewDeleteUserBadRequest creates DeleteUserBadRequest with default headers values

func (*DeleteUserBadRequest) WriteResponse

func (o *DeleteUserBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type DeleteUserHandler

type DeleteUserHandler interface {
	Handle(DeleteUserParams) middleware.Responder
}

DeleteUserHandler interface for that can handle valid delete user params

type DeleteUserHandlerFunc

type DeleteUserHandlerFunc func(DeleteUserParams) middleware.Responder

DeleteUserHandlerFunc turns a function with the right signature into a delete user handler

func (DeleteUserHandlerFunc) Handle

Handle executing the request and returning a response

type DeleteUserNotFound

type DeleteUserNotFound struct {
}

DeleteUserNotFound User not found

swagger:response deleteUserNotFound

func NewDeleteUserNotFound added in v0.2.0

func NewDeleteUserNotFound() DeleteUserNotFound

NewDeleteUserNotFound creates DeleteUserNotFound with default headers values

func (*DeleteUserNotFound) WriteResponse

func (o *DeleteUserNotFound) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type DeleteUserParams

type DeleteUserParams struct {
	/*The name that needs to be deleted
	  Required: true
	  In: path
	*/
	Username string
}

DeleteUserParams contains all the bound params for the delete user operation typically these are obtained from a http.Request

swagger:parameters deleteUser

func NewDeleteUserParams added in v0.2.0

func NewDeleteUserParams() DeleteUserParams

NewDeleteUserParams creates a new DeleteUserParams object with the default values initialized.

func (*DeleteUserParams) BindRequest

func (o *DeleteUserParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type GetUserByName

type GetUserByName struct {
	Context *middleware.Context
	Params  GetUserByNameParams
	Handler GetUserByNameHandler
}

GetUserByName swagger:route GET /user/{username} user getUserByName

Get user by user name

func NewGetUserByName

func NewGetUserByName(ctx *middleware.Context, handler GetUserByNameHandler) *GetUserByName

NewGetUserByName creates a new http.Handler for the get user by name operation

func (*GetUserByName) ServeHTTP

func (o *GetUserByName) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetUserByNameBadRequest

type GetUserByNameBadRequest struct {
}

GetUserByNameBadRequest Invalid username supplied

swagger:response getUserByNameBadRequest

func NewGetUserByNameBadRequest added in v0.2.0

func NewGetUserByNameBadRequest() GetUserByNameBadRequest

NewGetUserByNameBadRequest creates GetUserByNameBadRequest with default headers values

func (*GetUserByNameBadRequest) WriteResponse

func (o *GetUserByNameBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetUserByNameHandler

type GetUserByNameHandler interface {
	Handle(GetUserByNameParams) middleware.Responder
}

GetUserByNameHandler interface for that can handle valid get user by name params

type GetUserByNameHandlerFunc

type GetUserByNameHandlerFunc func(GetUserByNameParams) middleware.Responder

GetUserByNameHandlerFunc turns a function with the right signature into a get user by name handler

func (GetUserByNameHandlerFunc) Handle

Handle executing the request and returning a response

type GetUserByNameNotFound

type GetUserByNameNotFound struct {
}

GetUserByNameNotFound User not found

swagger:response getUserByNameNotFound

func NewGetUserByNameNotFound added in v0.2.0

func NewGetUserByNameNotFound() GetUserByNameNotFound

NewGetUserByNameNotFound creates GetUserByNameNotFound with default headers values

func (*GetUserByNameNotFound) WriteResponse

func (o *GetUserByNameNotFound) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetUserByNameOK

type GetUserByNameOK struct {

	// In: body
	Payload *models.User `json:"body,omitempty"`
}

GetUserByNameOK successful operation

swagger:response getUserByNameOK

func NewGetUserByNameOK added in v0.2.0

func NewGetUserByNameOK() GetUserByNameOK

NewGetUserByNameOK creates GetUserByNameOK with default headers values

func (*GetUserByNameOK) WithPayload added in v0.2.0

func (o *GetUserByNameOK) WithPayload(payload *models.User) *GetUserByNameOK

WithPayload adds the payload to the get user by name o k response

func (*GetUserByNameOK) WriteResponse

func (o *GetUserByNameOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetUserByNameParams

type GetUserByNameParams struct {
	/*The name that needs to be fetched. Use user1 for testing.
	  Required: true
	  In: path
	*/
	Username string
}

GetUserByNameParams contains all the bound params for the get user by name operation typically these are obtained from a http.Request

swagger:parameters getUserByName

func NewGetUserByNameParams added in v0.2.0

func NewGetUserByNameParams() GetUserByNameParams

NewGetUserByNameParams creates a new GetUserByNameParams object with the default values initialized.

func (*GetUserByNameParams) BindRequest

func (o *GetUserByNameParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type LoginUser

type LoginUser struct {
	Context *middleware.Context
	Params  LoginUserParams
	Handler LoginUserHandler
}

LoginUser swagger:route GET /user/login user loginUser

Logs user into the system

func NewLoginUser

func NewLoginUser(ctx *middleware.Context, handler LoginUserHandler) *LoginUser

NewLoginUser creates a new http.Handler for the login user operation

func (*LoginUser) ServeHTTP

func (o *LoginUser) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type LoginUserBadRequest

type LoginUserBadRequest struct {
}

LoginUserBadRequest Invalid username/password supplied

swagger:response loginUserBadRequest

func NewLoginUserBadRequest added in v0.2.0

func NewLoginUserBadRequest() LoginUserBadRequest

NewLoginUserBadRequest creates LoginUserBadRequest with default headers values

func (*LoginUserBadRequest) WriteResponse

func (o *LoginUserBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type LoginUserHandler

type LoginUserHandler interface {
	Handle(LoginUserParams) middleware.Responder
}

LoginUserHandler interface for that can handle valid login user params

type LoginUserHandlerFunc

type LoginUserHandlerFunc func(LoginUserParams) middleware.Responder

LoginUserHandlerFunc turns a function with the right signature into a login user handler

func (LoginUserHandlerFunc) Handle

Handle executing the request and returning a response

type LoginUserOK

type LoginUserOK struct {
	/*date in UTC when toekn expires
	  Required: true
	*/
	XExpiresAfter strfmt.DateTime `json:"X-Expires-After,omitempty"`
	/*calls per hour allowed by the user
	  Required: true
	*/
	XRateLimit int32 `json:"X-Rate-Limit,omitempty"`

	// In: body
	Payload string `json:"body,omitempty"`
}

LoginUserOK successful operation

swagger:response loginUserOK

func NewLoginUserOK added in v0.2.0

func NewLoginUserOK() LoginUserOK

NewLoginUserOK creates LoginUserOK with default headers values

func (*LoginUserOK) WithPayload added in v0.2.0

func (o *LoginUserOK) WithPayload(payload string) *LoginUserOK

WithPayload adds the payload to the login user o k response

func (*LoginUserOK) WithXExpiresAfter added in v0.2.0

func (o *LoginUserOK) WithXExpiresAfter(xExpiresAfter strfmt.DateTime) *LoginUserOK

WithXExpiresAfter adds the xExpiresAfter to the login user o k response

func (*LoginUserOK) WithXRateLimit added in v0.2.0

func (o *LoginUserOK) WithXRateLimit(xRateLimit int32) *LoginUserOK

WithXRateLimit adds the xRateLimit to the login user o k response

func (*LoginUserOK) WriteResponse

func (o *LoginUserOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type LoginUserParams

type LoginUserParams struct {
	/*The password for login in clear text
	  Required: true
	  In: query
	*/
	Password string
	/*The user name for login
	  Required: true
	  In: query
	*/
	Username string
}

LoginUserParams contains all the bound params for the login user operation typically these are obtained from a http.Request

swagger:parameters loginUser

func NewLoginUserParams added in v0.2.0

func NewLoginUserParams() LoginUserParams

NewLoginUserParams creates a new LoginUserParams object with the default values initialized.

func (*LoginUserParams) BindRequest

func (o *LoginUserParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type LogoutUser

type LogoutUser struct {
	Context *middleware.Context
	Handler LogoutUserHandler
}

LogoutUser swagger:route GET /user/logout user logoutUser

Logs out current logged in user session

func NewLogoutUser

func NewLogoutUser(ctx *middleware.Context, handler LogoutUserHandler) *LogoutUser

NewLogoutUser creates a new http.Handler for the logout user operation

func (*LogoutUser) ServeHTTP

func (o *LogoutUser) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type LogoutUserHandler

type LogoutUserHandler interface {
	Handle() middleware.Responder
}

LogoutUserHandler interface for that can handle valid logout user params

type LogoutUserHandlerFunc

type LogoutUserHandlerFunc func() middleware.Responder

LogoutUserHandlerFunc turns a function with the right signature into a logout user handler

func (LogoutUserHandlerFunc) Handle

Handle executing the request and returning a response

type UpdateUser

type UpdateUser struct {
	Context *middleware.Context
	Params  UpdateUserParams
	Handler UpdateUserHandler
}

UpdateUser swagger:route PUT /user/{username} user updateUser

Updated user

This can only be done by the logged in user.

func NewUpdateUser

func NewUpdateUser(ctx *middleware.Context, handler UpdateUserHandler) *UpdateUser

NewUpdateUser creates a new http.Handler for the update user operation

func (*UpdateUser) ServeHTTP

func (o *UpdateUser) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type UpdateUserBadRequest

type UpdateUserBadRequest struct {
}

UpdateUserBadRequest Invalid user supplied

swagger:response updateUserBadRequest

func NewUpdateUserBadRequest added in v0.2.0

func NewUpdateUserBadRequest() UpdateUserBadRequest

NewUpdateUserBadRequest creates UpdateUserBadRequest with default headers values

func (*UpdateUserBadRequest) WriteResponse

func (o *UpdateUserBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type UpdateUserHandler

type UpdateUserHandler interface {
	Handle(UpdateUserParams) middleware.Responder
}

UpdateUserHandler interface for that can handle valid update user params

type UpdateUserHandlerFunc

type UpdateUserHandlerFunc func(UpdateUserParams) middleware.Responder

UpdateUserHandlerFunc turns a function with the right signature into a update user handler

func (UpdateUserHandlerFunc) Handle

Handle executing the request and returning a response

type UpdateUserNotFound

type UpdateUserNotFound struct {
}

UpdateUserNotFound User not found

swagger:response updateUserNotFound

func NewUpdateUserNotFound added in v0.2.0

func NewUpdateUserNotFound() UpdateUserNotFound

NewUpdateUserNotFound creates UpdateUserNotFound with default headers values

func (*UpdateUserNotFound) WriteResponse

func (o *UpdateUserNotFound) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type UpdateUserParams

type UpdateUserParams struct {
	/*Updated user object
	  Required: true
	  In: body
	*/
	Body *models.User
	/*name that need to be deleted
	  Required: true
	  In: path
	*/
	Username string
}

UpdateUserParams contains all the bound params for the update user operation typically these are obtained from a http.Request

swagger:parameters updateUser

func NewUpdateUserParams added in v0.2.0

func NewUpdateUserParams() UpdateUserParams

NewUpdateUserParams creates a new UpdateUserParams object with the default values initialized.

func (*UpdateUserParams) BindRequest

func (o *UpdateUserParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

Jump to

Keyboard shortcuts

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