test

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Create

type Create struct {
	Test         string
	ForBench     bool            `spiderweb:"query=for_bench"`
	RequestBody  *CreateRequest  `spiderweb:"request,mime=application/json,validate"`
	ResponseBody *CreateResponse `spiderweb:"response,mime=application/json,validate"`
}

func (*Create) Handle

func (self *Create) Handle(ctx context.Context) (int, error)

type CreateRequest

type CreateRequest struct {
	MyString   string `json:"my_string"`
	MyInt      int    `json:"my_int"`
	ShouldFail bool   `json:"fail"`
}

type CreateResponse

type CreateResponse struct {
	MyString string `json:"output_string"`
	MyInt    int    `json:"output_int"`
}

type Database

type Database struct{}

func (*Database) RetrieveValue

func (self *Database) RetrieveValue() string

type Datastore

type Datastore interface {
	RetrieveValue() string
}

type Get

type Get struct {
	Test         string
	Db           Datastore         `spiderweb:"resource=datastore"`
	ResourceId   int               `spiderweb:"path=id"`
	ResponseBody *fooResponseModel `spiderweb:"response,mime=application/json,validate"`
}

func (*Get) Handle

func (self *Get) Handle(ctx context.Context) (int, error)

type MockDatastore

type MockDatastore struct {
	mock.Mock
}

Datastore is an autogenerated mock type for the Datastore type

func (*MockDatastore) RetrieveValue

func (_m *MockDatastore) RetrieveValue() string

RetreiveValue provides a mock function with given fields:

type NoRoute

type NoRoute struct{}

func (*NoRoute) Handle

func (self *NoRoute) Handle(ctx context.Context) (int, error)

type NoopLogConfig

type NoopLogConfig struct {
	*log.Config
}

func (*NoopLogConfig) Out

func (self *NoopLogConfig) Out() io.Writer

Jump to

Keyboard shortcuts

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