Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface { // DeleteBook makes a DELETE request to /books/{id}. DeleteBook(ctx context.Context, i *models.DeleteBookInput) error }
Controller defines the interface for the swagger-test service.
type MockController ¶
type MockController struct {
// contains filtered or unexported fields
}
Mock of Controller interface
func NewMockController ¶
func NewMockController(ctrl *gomock.Controller) *MockController
func (*MockController) DeleteBook ¶
func (_m *MockController) DeleteBook(ctx context.Context, i *models.DeleteBookInput) error
func (*MockController) EXPECT ¶
func (_m *MockController) EXPECT() *_MockControllerRecorder
type Server ¶
type Server struct { // Handler should generally not be changed. It exposed to make testing easier. Handler http.Handler // contains filtered or unexported fields }
Server defines a HTTP server that implements the Controller interface.
func New ¶
func New(c Controller, addr string) *Server
New returns a Server that implements the Controller interface. It will start when "Serve" is called.
Click to show internal directories.
Click to hide internal directories.