models

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultBadRequest

type DefaultBadRequest struct {
	Msg string `json:"msg"`
}

DefaultBadRequest represents a generic 400 response. It used internally by Swagger as the response when a request fails the validation defined in the Swagger yml file.

func (DefaultBadRequest) Error

func (d DefaultBadRequest) Error() string

Error returns the validation error that caused the 400.

type DefaultInternalError

type DefaultInternalError struct {
	Msg string `json:"msg"`
}

DefaultInternalError represents a generic 500 response.

func (DefaultInternalError) Error

func (d DefaultInternalError) Error() string

Error returns the internal error that caused the 500.

type GetBook404Output

type GetBook404Output struct{}

GetBook404Output defines the 404 status code response for GetBook.

func (GetBook404Output) Error

func (o GetBook404Output) Error() string

Error returns "Status Code: X". We implemented in to satisfy the error interface. For a more descriptive error message see the output type.

type GetBookInput

type GetBookInput struct {
	ID int64
}

GetBookInput holds the input parameters for a getBook operation.

func (GetBookInput) Validate

func (i GetBookInput) Validate() error

Validate returns an error if any of the GetBookInput parameters don't satisfy the requirements from the swagger yml file.

Directories

Path Synopsis
module

Jump to

Keyboard shortcuts

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