senseutil

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpRequest

func DumpRequest(log *log.Logger, r *http.Request)

func DumpResponse

func DumpResponse(log *log.Logger, r *http.Response)

func PrefixLines

func PrefixLines(prefix string, lines string) string

Types

type MockRTClient

type MockRTClient struct {
	Ch <-chan RTMsg
}

func (*MockRTClient) Stream

func (c *MockRTClient) Stream(ctx context.Context, deviceID int, f realtime.Callback) error

type MockTransport

type MockTransport struct {
	RT func(req *http.Request) (*http.Response, error)
}

func (*MockTransport) RoundTrip

func (t *MockTransport) RoundTrip(req *http.Request) (*http.Response, error)

type MockWSConn

type MockWSConn struct {
	Ch <-chan WSMsg
}

func (*MockWSConn) Close

func (mc *MockWSConn) Close(_ websocket.StatusCode, _ string) error

func (*MockWSConn) Read

type MockWSDialer

type MockWSDialer struct {
	Dialed string
	Ch     <-chan WSMsg
}

func (*MockWSDialer) Dial

type RTMsg

type RTMsg struct {
	M realtime.Message
	E error
}

type WSMsg

type WSMsg struct {
	T websocket.MessageType
	D string
	E error
}

Jump to

Keyboard shortcuts

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