api

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteBadGatewayJSON

func WriteBadGatewayJSON(rw http.ResponseWriter, message string)

func WriteBadGatewayText

func WriteBadGatewayText(rw http.ResponseWriter, message string)

func WriteBadRequestJSON

func WriteBadRequestJSON(rw http.ResponseWriter, message string)

func WriteBadRequestText

func WriteBadRequestText(rw http.ResponseWriter, message string)

func WriteJSONError

func WriteJSONError(rw http.ResponseWriter, code int, message string)

func WriteJSONResponse added in v0.0.5

func WriteJSONResponse(rw http.ResponseWriter, code int, response interface{})

func WriteResult

func WriteResult(rw http.ResponseWriter, code int, result string)

func WriteTextError

func WriteTextError(rw http.ResponseWriter, code int, message string)

Types

type AgentConfig

type AgentConfig struct {
	ServerID   string
	MeshName   string
	MeshType   int
	MeshID     string
	MeshIDHex  string
	MeshServer string
}

type Error

type Error struct {
	Error       string
	Description string
}

type ListSessionsItem added in v0.0.5

type ListSessionsItem struct {
	ID              string
	SessionURL      string
	AgentMSH        string
	SessionUsername string `json:",omitempty"`
	SessionPassword string `json:",omitempty"`
	ExpiresAt       time.Time
}

type PairedSession added in v0.0.6

type PairedSession struct {
	AgentMSH        string
	SupporterName   string
	SupporterAvatar string
	CompanyName     string
	ExpiresAt       time.Time
}

type Result

type Result struct {
	Result string
}

type Session

type Session struct {
	ID          string
	SessionURL  string
	AgentMSH    string
	PairingCode string `json:"PairingCode,omitempty"`
	PairingURL  string `json:"PairingURL,omitempty"`
	AgentConfig AgentConfig
	ExpiresAt   time.Time
}

type URLResponse

type URLResponse struct {
	URL string `json:"url"`
}

Jump to

Keyboard shortcuts

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