server

package
v0.0.0-...-9c93be3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIG_PATH = "config/"

Variables

This section is empty.

Functions

func PrintResponse

func PrintResponse(response ApiResponse)

func SaveToConfig

func SaveToConfig(configFile string, apiRequest ApiRequest, index int) error

func WriteToConfig

func WriteToConfig(configFile string, apiRequest ApiRequest) error

Types

type ApiRequest

type ApiRequest struct {
	Desc   string
	Host   string
	Param  map[string]string
	Method HttpMethod
}

type ApiResponse

type ApiResponse struct {
	Code   int
	Result string
}

func RunTest

func RunTest(request ApiRequest) (reqp *ApiResponse, err error)

type AppForm

type AppForm struct {
	Index  int
	Host   string
	Desc   string
	Method HttpMethod
	Param  []struct {
		Key   string
		Value string
	}
}

func (*AppForm) FieldMap

func (l *AppForm) FieldMap() binding.FieldMap

type HttpMethod

type HttpMethod int
const (
	GET  HttpMethod = 0
	POST HttpMethod = 1
)

type JsonResponse

type JsonResponse struct {
	Code    int
	Message string
	Data    interface{}
}

type ListForm

type ListForm struct {
}

Jump to

Keyboard shortcuts

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