gomock

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App added in v0.0.2

type App struct {
	Config Configurations `json:"configurations"`
}

App ...

type ConfigNSQ added in v0.0.2

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

ConfigNSQ ...

type ConfigRedis added in v0.0.2

type ConfigRedis struct {
	Protocol string `json:"protocol"`
	Address  string `json:"address"`
	Size     int    `json:"size"`
}

ConfigRedis ...

type ConfigSQL added in v0.0.2

type ConfigSQL struct {
	Driver     string `json:"driver"`
	DataSource string `json:"datasource"`
}

ConfigSQL ...

type Configurations added in v0.0.2

type Configurations struct {
	NSQ   ConfigNSQ   `json:"nsq"`
	SQL   ConfigSQL   `json:"sql"`
	Redis ConfigRedis `json:"redis"`
}

Configurations ...

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) RunSingleNoWait added in v0.0.2

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

RunSingleNoWait ...

func (*Mock) RunSingleWait added in v0.0.2

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

RunSingle ...

func (*Mock) Stop

func (mock *Mock) Stop() error

Stop ...

type MockOption

type MockOption func(mock *Mock)

MockOption ...

func WithConfiguration added in v0.0.2

func WithConfiguration(file string) MockOption

WithConfiguration ...

func WithConfigurationNSQ added in v0.0.2

func WithConfigurationNSQ(config *ConfigNSQ) MockOption

WithConfigurationNSQ ...

func WithConfigurationRedis added in v0.0.2

func WithConfigurationRedis(config *ConfigRedis) MockOption

WithConfigurationRedis ...

func WithConfigurationSQL added in v0.0.2

func WithConfigurationSQL(config *ConfigSQL) MockOption

WithConfigurationSQL ...

func WithConfigurations added in v0.0.2

func WithConfigurations(config *Configurations) MockOption

WithConfigurations ...

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"`
	Description   string     `json:"description"`
	Configuration *ConfigNSQ `json:"configuration"`
	Connection    *string    `json:"connection"`
	Run           struct {
		Setup    []NSQMessage `json:"setup"`
		Teardown []NSQMessage `json:"teardown"`
	} `json:"run"`
}

NSQ

type NSQMessage

type NSQMessage struct {
	Description string           `json:"description"`
	Topic       string           `json:"topic"`
	Body        *json.RawMessage `json:"body"`
	File        *string          `json:"file"`
}

NSQMessage

type Redis

type Redis struct {
	Name          string       `json:"name"`
	Description   string       `json:"description"`
	Configuration *ConfigRedis `json:"configuration"`
	Connection    *string      `json:"connection"`
	Run           struct {
		Setup    []RedisCommand `json:"setup"`
		Teardown []RedisCommand `json:"teardown"`
	} `json:"run"`
}

Redis

type RedisCommand

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

RedisCommand

type Response

type Response struct {
	Status int         `json:"status"`
	Body   interface{} `json:"body"`
	File   *string     `json:"file"`
}

Response

type Route

type Route struct {
	Description string          `json:"description"`
	Route       string          `json"route"`
	Method      string          `json:"method"`
	Body        json.RawMessage `json:"body"`
	File        *string         `json:"file"`
	Response    Response        `json:"response"`
}

Route

type SQL

type SQL struct {
	Name          string     `json:"name"`
	Description   string     `json:"description"`
	Configuration *ConfigSQL `json:"configuration"`
	Connection    *string    `json:"connection"`
	Run           struct {
		Setup    *SQLData `json:"setup"`
		Teardown *SQLData `json:"teardown"`
	} `json:"run"`
}

SQL

type SQLData added in v0.0.2

type SQLData struct {
	Files   []string `json:"files"`
	Queries []string `json:"queries"`
}

type ServicesConfig added in v0.0.2

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

ServicesConfig

type WebService

type WebService struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	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