Documentation ¶
Index ¶
- func AssertServers(t testing.TB, expected []string, actual []servers.Server)
- func CalcReqLength(req []byte) int
- func GenBrowserChallenge(l uint) []byte
- func GenBrowserChallenge8() []byte
- func GenExtraServerParams(extra map[string]string) map[string]string
- func GenRandomIP() net.IP
- func GenServerParams() map[string]string
- func PackBrowserRequest(fields []string, filters string, options []byte, getChallenge func() []byte, ...) []byte
- func PackHeartbeatRequest(instanceID []byte, params map[string]string) []byte
- func PrepareTestServer(tb fxtest.TB, extra ...fx.Option) (*httptest.Server, func())
- func SendBrowserRequest(service *browsing.Service, filters string, getAddrFunc func() (net.IP, int)) ([]byte, error)
- func SendHeartbeat(service *reporting.Service, instanceID []byte, ...) ([]byte, error)
- func StandardAddr() (net.IP, int)
- func UnpackServerList(resp []byte) []map[string]string
- func WithBrowserChallengeLength(l int) func([]byte) int
- func WithCustomAddr(ip string, port int) func() (net.IP, int)
- func WithExtraServerParams(extra map[string]string) func() map[string]string
- func WithRandomAddr() func() (net.IP, int)
- func WithServerParams(params map[string]string) func() map[string]string
- type Response
- type TestRequestOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertServers ¶ added in v0.3.0
func CalcReqLength ¶
func GenBrowserChallenge ¶
func GenBrowserChallenge8 ¶
func GenBrowserChallenge8() []byte
func GenRandomIP ¶
func GenServerParams ¶
func PackBrowserRequest ¶
func PackHeartbeatRequest ¶
func PrepareTestServer ¶
func SendBrowserRequest ¶
func SendHeartbeat ¶
func StandardAddr ¶
func UnpackServerList ¶
func WithExtraServerParams ¶
func WithRandomAddr ¶
Types ¶
type Response ¶
func DoTestRequest ¶
type TestRequestOpt ¶
func MustBindJSON ¶
func MustBindJSON(v interface{}) TestRequestOpt
func MustHaveNoBody ¶
func MustHaveNoBody() TestRequestOpt
Click to show internal directories.
Click to hide internal directories.