proto

package
v0.0.0-...-9865f96 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorMessage

type ErrorMessage struct {
	Error string `json:"error"`
}

type HTTPRequest

type HTTPRequest struct {
	Method    string            `json:"method"`
	Path      string            `json:"path"`
	Headers   map[string]string `json:"headers"`
	Body      []byte            `json:"body"`
	RequestId string            `json:"request_id"`
}

type HTTPResponse

type HTTPResponse struct {
	StatusCode int               `json:"status_code"`
	Headers    map[string]string `json:"headers"`
	Body       []byte            `json:"body"`
	RequestId  string            `json:"request_id"`
}

type Message

type Message struct {
	Type    MessageType `json:"type"`
	Payload interface{} `json:"payload,omitempty"`
}

type MessageType

type MessageType string
const (
	MessageTypePing MessageType = "ping"
	MessageTypePong MessageType = "pong"

	MessageTypeTunnelReq  MessageType = "tunnel_req"
	MessageTypeTunnelResp MessageType = "tunnel_resp"

	MessageTypeHTTPRequest  MessageType = "http_request"
	MessageTypeHTTPResponse MessageType = "http_response"

	MessageTypeError MessageType = "error"
)

type TunnelRequest

type TunnelRequest struct {
	// LocalPort is the local port to tunnel and expose to the public internet
	LocalPort   int    `json:"local_port"`
	RequestedId string `json:"requested_id"`
}

type TunnelResponse

type TunnelResponse struct {
	// URL is the public URL of the tunnel to the local port
	URL string `json:"url"`
}

Jump to

Keyboard shortcuts

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