test

package
v0.0.0-...-d5e8507 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package test provides test package for testing gosiege

Index

Constants

View Source
const (
	PathPrefix  = "gosiege/"
	SessionPath = PathPrefix + "sessions/"
	NodePath    = PathPrefix + "nodes/"

	MethodNewSession    = "PUT"
	MethodStopSession   = "PUT"
	MethodUpdateSession = "PUT"
)

Variables

This section is empty.

Functions

func StartTestServer

func StartTestServer(handler func(w http.ResponseWriter, r *http.Request)) (server *httptest.Server, port string)

Types

type EndSessionReq

type EndSessionReq struct {
	SessionId string
}

type NewSessionReq

type NewSessionReq struct {
	Url        string
	Target     string `schema:"target"`
	Port       string `schema:"port"`
	Concurrent string `schema:"concurrent"`
	Delay      string `schema:"delay"`
}

func (*NewSessionReq) Send

func (r *NewSessionReq) Send() (resp *http.Response, err error)

type StopSessionReq

type StopSessionReq struct {
	SessionId string
}

func (StopSessionReq) Send

func (r StopSessionReq) Send() (resp *http.Response, err error)

type UpdateSessionReq

type UpdateSessionReq struct {
	Url        string
	SessionId  string `schema:"Id"`
	Target     string `schema:"target"`
	Port       int    `schema:"port"`
	Concurrent int    `schema:"concurrent"`
	Delay      string `schema:"delay"`
}

Jump to

Keyboard shortcuts

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