gomock

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

Mock ...

func NewGoMock

func NewGoMock(options ...MockOption) *Mock

NewGoMock ...

func (*Mock) Reconfigure

func (mock *Mock) Reconfigure(options ...MockOption)

Reconfigure ...

func (*Mock) Run

func (mock *Mock) Run() error

Run ...

func (*Mock) RunSingle

func (mock *Mock) RunSingle(file string) error

RunSingle ...

func (*Mock) Stop

func (mock *Mock) Stop() error

Stop ...

type MockOption

type MockOption func(mock *Mock)

MockOption ...

func WithPath

func WithPath(path string) MockOption

WithPath ...

func WithRunInBackground

func WithRunInBackground(background bool) MockOption

WithRunInBackground ...

type NSQ

type NSQ struct {
	Name          string    `json:"name"`
	Configuration NSQConfig `json:"configuration"`
	Messages      struct {
		Setup    []NSQMessage `json:"setup"`
		Teardown []NSQMessage `json:"teardown"`
	} `json:"messages"`
}

NSQ

type NSQConfig

type NSQConfig struct {
	Lookupd      string `json:"lookupd"`
	RequeueDelay int64  `json:"requeue_delay"`
	MaxInFlight  int    `json:"max_in_flight"`
	MaxAttempts  uint16 `json:"max_attempts"`
}

NSQConfig ...

type NSQMessage

type NSQMessage struct {
	Description string          `json:"description"`
	Topic       string          `json:"topic"`
	Message     json.RawMessage `json:"message"`
	File        string          `json:"file"`
}

NSQMessage

type Redis

type Redis struct {
	Name          string      `json:"name"`
	Configuration RedisConfig `json:"configuration"`
	Commands      struct {
		Setup    []RedisCommand `json:"setup"`
		Teardown []RedisCommand `json:"teardown"`
	} `json:"commands"`
}

Redis

type RedisCommand

type RedisCommand struct {
	Command   string   `json:"command"`
	Arguments []string `json:"arguments"`
}

RedisCommand

type RedisConfig

type RedisConfig struct {
	Protocol string `json:"protocol"`
	Addr     string `json:"addr"`
	Size     int    `json:"size"`
}

RedisConfig

type Response

type Response struct {
	Status int         `json:"status"`
	Body   interface{} `json:"body"`
}

Response

type Route

type Route struct {
	Description string          `json:"description"`
	Route       string          `json"route"`
	Method      string          `json:"method"`
	Payload     json.RawMessage `json:"payload"`
	Response    Response        `json:"response"`
}

Route

type SQL

type SQL struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Driver      string `json:"driver"`
	DataSource  string `json:"datasource"`
	Commands    struct {
		Setup    []string `json:"setup"`
		Teardown []string `json:"teardown"`
	} `json:"commands"`
}

SQL

type Services

type Services struct {
	WebServices []WebService `json:"webservices,omitempty"`
	Redis       []Redis      `json:"redis,omitempty"`
	NSQ         []NSQ        `json:"nsq,omitempty"`
	SQL         []SQL        `json:"sql,omitempty"`
}

Services

type WebService

type WebService struct {
	Name   string  `json:"name"`
	Host   string  `json:"host"`
	Routes []Route `json:"routes"`
}

WebService

Jump to

Keyboard shortcuts

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