http_api

package
v0.0.0-...-27c307a Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractError

func ExtractError(buf []byte) error

func NewHttpServer

func NewHttpServer(opts ...api.NewServerOption) (api.Server, error)

func NewHttpServerOption

func NewHttpServerOption() ofn.Option

func ParseError

func ParseError(err error) map[string]interface{}

func WithHost

func WithHost(host string) api.NewServerOption

func WithPort

func WithPort(port int32) api.NewServerOption

Types

type CloseTeleportationRequest

type CloseTeleportationRequest struct {
	Name string `json:"name" binding:"required"`
}

type CloseTransportRequest

type CloseTransportRequest struct {
	PeerID string `json:"peerID" binding:"required"`
}

type HttpServer

type HttpServer struct {
	// contains filtered or unexported fields
}

func (*HttpServer) CloseTeleportation

func (s *HttpServer) CloseTeleportation(c *gin.Context)

func (*HttpServer) CloseTransport

func (s *HttpServer) CloseTransport(c *gin.Context)

func (*HttpServer) Healthz

func (*HttpServer) Healthz(c *gin.Context)

func (*HttpServer) ListTeleportations

func (s *HttpServer) ListTeleportations(c *gin.Context)

func (*HttpServer) ListTransports

func (s *HttpServer) ListTransports(c *gin.Context)

func (*HttpServer) NewTeleportation

func (s *HttpServer) NewTeleportation(c *gin.Context)

func (*HttpServer) NewTransport

func (s *HttpServer) NewTransport(c *gin.Context)

func (*HttpServer) Ping

func (s *HttpServer) Ping(c *gin.Context)

func (*HttpServer) Shutdown

func (s *HttpServer) Shutdown(c *gin.Context)

func (*HttpServer) Start

func (s *HttpServer) Start(ctx context.Context) error

func (*HttpServer) Stop

func (s *HttpServer) Stop(ctx context.Context) error

func (*HttpServer) Teleport

func (s *HttpServer) Teleport(c *gin.Context)

func (*HttpServer) Version

func (s *HttpServer) Version(c *gin.Context)

func (*HttpServer) Wait

func (s *HttpServer) Wait() error

func (*HttpServer) Whaomi

func (s *HttpServer) Whaomi(c *gin.Context)

type ListTeleportationsResponse

type ListTeleportationsResponse struct {
	Teleportations []*encoding_api.Teleportation `json:"teleportations"`
}

type ListTransportsResponse

type ListTransportsResponse struct {
	Transports []*encoding_api.Transport `json:"transports"`
}

type NewTeleportationRequest

type NewTeleportationRequest struct {
	PeerID        string `json:"peerID" binding:"required"`
	RemoteNetwork string `json:"remoteNetwork" binding:"required"`
	RemoteAddress string `json:"remoteAddress" binding:"required"`
	Name          string `json:"name,omitempty"`
	LocalNetwork  string `json:"localNetwork,omitempty"`
	LocalAddress  string `json:"localAddress,omitempty"`
	Secret        string `json:"secret,omitempty"`
}

type NewTeleportationResponse

type NewTeleportationResponse struct {
	Teleportation *encoding_api.Teleportation `json:"teleportation"`
}

type NewTransportRequest

type NewTransportRequest struct {
	PeerID string `json:"peerID" binding:"required"`
}

type NewTransportResponse

type NewTransportResponse struct {
	Transport *encoding_api.Transport `json:"transport"`
}

type PingRequest

type PingRequest struct {
	PeerID  string `json:"peerID" binding:"required"`
	Payload string `json:"payload,omitempty"`
}

type TeleportRequest

type TeleportRequest struct {
	ID            string `json:"id" binding:"required"`
	Name          string `json:"name,omitempty"`
	RemoteNetwork string `json:"remoteNetwork"`
	RemoteAddress string `json:"remoteAddress" binding:"required"`
	LocalNetwork  string `json:"localNetwork,omitempty"`
	LocalAddress  string `json:"localAddress,omitempty"`
	Secret        string `json:"secret,omitempty"`
}

type TeleportResponse

type TeleportResponse struct {
	LocalNetwork string `json:"localNetwork"`
	LocalAddress string `json:"localAddress"`
}

type VersionResponse

type VersionResponse = encoding_api.Version

type WhoamiResponse

type WhoamiResponse struct {
	ID string `json:"id"`
}

Jump to

Keyboard shortcuts

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