cli

package
v0.0.0-...-49a7d7b Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2018 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(config *Configuration)

Run statup

Types

type Action

type Action struct {
	If   string
	When *Response
}

type Configuration

type Configuration struct {
	Port        string
	Latency     int
	ContentType string
	Services    map[string]Service
	MockDir     string
	Cors        *Cors
}

type Cors

type Cors struct {
	AllowOrigin      string `json:"allow_origin"`
	AllowHeaders     string `json:"allow_headers"`
	AllowMethods     string `json:"allow_methods"`
	AllowCredentials string `json:"allow_credentials"`
	ExposeHeaders    string `json:"expose_headers"`
}

type EndpointFactory

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

type JWTPlugin

type JWTPlugin struct {
	Status         int
	Alg            string
	Payload        string
	Secret         string
	MockDir        string
	Output         string
	Context        echo.Context
	TemplateTokens map[string]string
}

func (*JWTPlugin) Create

func (q *JWTPlugin) Create() (int, interface{})

type QrCodePlugin

type QrCodePlugin struct {
	Status         int
	Content        string
	Quality        string
	Size           string
	Context        echo.Context
	MockDir        string
	ContentType    string
	TemplateTokens map[string]string
}

func (*QrCodePlugin) Create

func (q *QrCodePlugin) Create() (int, interface{})

type RandomPlugin

type RandomPlugin struct {
	Status         []int
	Body           []string
	BodyFile       []string
	MockDir        string
	TemplateTokens map[string]string
}

func (*RandomPlugin) Create

func (r *RandomPlugin) Create() (int, interface{})

type Response

type Response struct {
	Status   int
	Body     string
	BodyFile string
	Headers  map[string]string
	Dynamic  map[string]interface{}
}

type RouterFactory

type RouterFactory interface {
	CreateGET(settings *RouterSettings)
	CreatePOST(settings *RouterSettings)
	CreatePUT(settings *RouterSettings)
	CreateDELETE(settings *RouterSettings)
}

func NewRouterFactory

func NewRouterFactory(s *echo.Echo) RouterFactory

type RouterSettings

type RouterSettings struct {
	Uri            string
	ContentType    string
	Status         int
	Body           string
	BodyFile       string
	Latency        int
	Dynamic        map[string]interface{}
	Headers        map[string]string
	MockDir        string
	TemplateTokens map[string]string
}

type Service

type Service struct {
	ContentType string
	Headers     map[string]string
	Cors        bool
	Responses   map[string]Response
	Latency     int
}

type SwitchPlugin

type SwitchPlugin struct {
	Input          interface{}
	Context        echo.Context
	MockDir        string
	TemplateTokens map[string]string
}

func (*SwitchPlugin) Create

func (s *SwitchPlugin) Create() (int, interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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