Documentation
¶
Index ¶
- Variables
- func NewTunnelEndpoints() []*api.Endpoint
- func RegisterTunnelHandler(s server.Server, hdlr TunnelHandler, opts ...server.HandlerOption) error
- type SendRequest
- func (*SendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendRequest) GetBody() string
- func (x *SendRequest) GetHeaders() map[string]string
- func (x *SendRequest) GetHost() string
- func (x *SendRequest) GetMethod() string
- func (x *SendRequest) GetParams() map[string]string
- func (x *SendRequest) GetPath() string
- func (x *SendRequest) GetUrl() string
- func (*SendRequest) ProtoMessage()
- func (x *SendRequest) ProtoReflect() protoreflect.Message
- func (x *SendRequest) Reset()
- func (x *SendRequest) String() string
- type SendResponse
- func (*SendResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SendResponse) GetBody() string
- func (x *SendResponse) GetHeaders() map[string]string
- func (x *SendResponse) GetStatus() string
- func (x *SendResponse) GetStatusCode() int32
- func (*SendResponse) ProtoMessage()
- func (x *SendResponse) ProtoReflect() protoreflect.Message
- func (x *SendResponse) Reset()
- func (x *SendResponse) String() string
- type TunnelHandler
- type TunnelService
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_tunnel_proto protoreflect.FileDescriptor
Functions ¶
func NewTunnelEndpoints ¶
func RegisterTunnelHandler ¶
func RegisterTunnelHandler(s server.Server, hdlr TunnelHandler, opts ...server.HandlerOption) error
Types ¶
type SendRequest ¶
type SendRequest struct { // method of the request e.g GET, POST, DELETE Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` // host to send to e.g www.google.com Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` // path to request e.g /news Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // headers to include e.g Content-Type: application/json Headers map[string]string `` /* 155-byte string literal not displayed */ // request params to include Params map[string]string `` /* 153-byte string literal not displayed */ // body of the request Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` // alternative full url e.g https://www.google.com/news Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
Send a request through the tunnel
func (*SendRequest) Descriptor
deprecated
func (*SendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
func (*SendRequest) GetBody ¶
func (x *SendRequest) GetBody() string
func (*SendRequest) GetHeaders ¶
func (x *SendRequest) GetHeaders() map[string]string
func (*SendRequest) GetHost ¶
func (x *SendRequest) GetHost() string
func (*SendRequest) GetMethod ¶
func (x *SendRequest) GetMethod() string
func (*SendRequest) GetParams ¶
func (x *SendRequest) GetParams() map[string]string
func (*SendRequest) GetPath ¶
func (x *SendRequest) GetPath() string
func (*SendRequest) GetUrl ¶
func (x *SendRequest) GetUrl() string
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) ProtoReflect ¶
func (x *SendRequest) ProtoReflect() protoreflect.Message
func (*SendRequest) Reset ¶
func (x *SendRequest) Reset()
func (*SendRequest) String ¶
func (x *SendRequest) String() string
type SendResponse ¶
type SendResponse struct { // the status Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // the status code StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // headers to include e.g Content-Type: application/json Headers map[string]string `` /* 155-byte string literal not displayed */ // body of the response Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*SendResponse) Descriptor
deprecated
func (*SendResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendResponse.ProtoReflect.Descriptor instead.
func (*SendResponse) GetBody ¶
func (x *SendResponse) GetBody() string
func (*SendResponse) GetHeaders ¶
func (x *SendResponse) GetHeaders() map[string]string
func (*SendResponse) GetStatus ¶
func (x *SendResponse) GetStatus() string
func (*SendResponse) GetStatusCode ¶
func (x *SendResponse) GetStatusCode() int32
func (*SendResponse) ProtoMessage ¶
func (*SendResponse) ProtoMessage()
func (*SendResponse) ProtoReflect ¶
func (x *SendResponse) ProtoReflect() protoreflect.Message
func (*SendResponse) Reset ¶
func (x *SendResponse) Reset()
func (*SendResponse) String ¶
func (x *SendResponse) String() string
type TunnelHandler ¶
type TunnelHandler interface {
Send(context.Context, *SendRequest, *SendResponse) error
}
type TunnelService ¶
type TunnelService interface {
Send(ctx context.Context, in *SendRequest, opts ...client.CallOption) (*SendResponse, error)
}
func NewTunnelService ¶
func NewTunnelService(name string, c client.Client) TunnelService
Click to show internal directories.
Click to hide internal directories.