Documentation
¶
Index ¶
- Variables
- func RegisterProxyServer(s grpc.ServiceRegistrar, srv ProxyServer)
- func SetServiceName(name string)
- type DnsRequest
- func (*DnsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DnsRequest) GetFqdn() string
- func (x *DnsRequest) GetIpv6() bool
- func (x *DnsRequest) GetUuid() string
- func (*DnsRequest) ProtoMessage()
- func (x *DnsRequest) ProtoReflect() protoreflect.Message
- func (x *DnsRequest) Reset()
- func (x *DnsRequest) String() string
- type DnsResponse
- func (*DnsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DnsResponse) GetDomain() string
- func (x *DnsResponse) GetResult() string
- func (*DnsResponse) ProtoMessage()
- func (x *DnsResponse) ProtoReflect() protoreflect.Message
- func (x *DnsResponse) Reset()
- func (x *DnsResponse) String() string
- type ProxyClient
- type ProxyDST
- func (*ProxyDST) Descriptor() ([]byte, []int)deprecated
- func (x *ProxyDST) GetAddr() string
- func (x *ProxyDST) GetData() []byte
- func (x *ProxyDST) GetStatus() ProxyStatus
- func (*ProxyDST) ProtoMessage()
- func (x *ProxyDST) ProtoReflect() protoreflect.Message
- func (x *ProxyDST) Reset()
- func (x *ProxyDST) String() string
- type ProxySRC
- func (*ProxySRC) Descriptor() ([]byte, []int)deprecated
- func (x *ProxySRC) GetData() []byte
- func (x *ProxySRC) GetFqdn() string
- func (x *ProxySRC) GetId() string
- func (x *ProxySRC) GetPort() uint32
- func (*ProxySRC) ProtoMessage()
- func (x *ProxySRC) ProtoReflect() protoreflect.Message
- func (x *ProxySRC) Reset()
- func (x *ProxySRC) String() string
- type ProxyServer
- type ProxyStatus
- func (ProxyStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ProxyStatus) Enum() *ProxyStatus
- func (ProxyStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProxyStatus) Number() protoreflect.EnumNumber
- func (x ProxyStatus) String() string
- func (ProxyStatus) Type() protoreflect.EnumType
- type Proxy_DnsResolveClient
- type Proxy_DnsResolveServer
- type Proxy_ProxyClient
- type Proxy_ProxyServer
- type UnimplementedProxyServer
- type UnsafeProxyServer
Constants ¶
This section is empty.
Variables ¶
var ( ProxyStatus_name = map[int32]string{ 0: "Error", 1: "Accepted", 3: "Session", 4: "EOF", } ProxyStatus_value = map[string]int32{ "Error": 0, "Accepted": 1, "Session": 3, "EOF": 4, } )
Enum value maps for ProxyStatus.
var ( DnsResolvePath = "/proxy.Proxy/DnsResolve" ProxyPath = "/proxy.Proxy/Proxy" )
var File_proxy_proto protoreflect.FileDescriptor
var Proxy_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proxy.Proxy", HandlerType: (*ProxyServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "DnsResolve", Handler: _Proxy_DnsResolve_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Proxy", Handler: _Proxy_Proxy_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proxy.proto", }
Proxy_ServiceDesc is the grpc.ServiceDesc for Proxy service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProxyServer ¶
func RegisterProxyServer(s grpc.ServiceRegistrar, srv ProxyServer)
func SetServiceName ¶
func SetServiceName(name string)
Types ¶
type DnsRequest ¶
type DnsRequest struct { // user uuid Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // fqdn name Fqdn string `protobuf:"bytes,2,opt,name=fqdn,proto3" json:"fqdn,omitempty"` // enable ipv6 Ipv6 bool `protobuf:"varint,3,opt,name=ipv6,proto3" json:"ipv6,omitempty"` // contains filtered or unexported fields }
func (*DnsRequest) Descriptor
deprecated
func (*DnsRequest) Descriptor() ([]byte, []int)
Deprecated: Use DnsRequest.ProtoReflect.Descriptor instead.
func (*DnsRequest) GetFqdn ¶
func (x *DnsRequest) GetFqdn() string
func (*DnsRequest) GetIpv6 ¶
func (x *DnsRequest) GetIpv6() bool
func (*DnsRequest) GetUuid ¶
func (x *DnsRequest) GetUuid() string
func (*DnsRequest) ProtoMessage ¶
func (*DnsRequest) ProtoMessage()
func (*DnsRequest) ProtoReflect ¶
func (x *DnsRequest) ProtoReflect() protoreflect.Message
func (*DnsRequest) Reset ¶
func (x *DnsRequest) Reset()
func (*DnsRequest) String ¶
func (x *DnsRequest) String() string
type DnsResponse ¶
type DnsResponse struct { // fqdn name Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // fqdn resolved result Result string `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*DnsResponse) Descriptor
deprecated
func (*DnsResponse) Descriptor() ([]byte, []int)
Deprecated: Use DnsResponse.ProtoReflect.Descriptor instead.
func (*DnsResponse) GetDomain ¶
func (x *DnsResponse) GetDomain() string
func (*DnsResponse) GetResult ¶
func (x *DnsResponse) GetResult() string
func (*DnsResponse) ProtoMessage ¶
func (*DnsResponse) ProtoMessage()
func (*DnsResponse) ProtoReflect ¶
func (x *DnsResponse) ProtoReflect() protoreflect.Message
func (*DnsResponse) Reset ¶
func (x *DnsResponse) Reset()
func (*DnsResponse) String ¶
func (x *DnsResponse) String() string
type ProxyClient ¶
type ProxyClient interface { DnsResolve(ctx context.Context, opts ...grpc.CallOption) (Proxy_DnsResolveClient, error) Proxy(ctx context.Context, opts ...grpc.CallOption) (Proxy_ProxyClient, error) }
ProxyClient is the client API for Proxy service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewProxyClient ¶
func NewProxyClient(cc grpc.ClientConnInterface) ProxyClient
type ProxyDST ¶
type ProxyDST struct { // status Status ProxyStatus `protobuf:"varint,1,opt,name=status,proto3,enum=proxy.ProxyStatus" json:"status,omitempty"` // data bytes Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // EOF if failed // bind addr Addr string `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"` // contains filtered or unexported fields }
func (*ProxyDST) Descriptor
deprecated
func (*ProxyDST) GetStatus ¶
func (x *ProxyDST) GetStatus() ProxyStatus
func (*ProxyDST) ProtoMessage ¶
func (*ProxyDST) ProtoMessage()
func (*ProxyDST) ProtoReflect ¶
func (x *ProxyDST) ProtoReflect() protoreflect.Message
type ProxySRC ¶
type ProxySRC struct { // user id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // bytes Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // fqdn Fqdn string `protobuf:"bytes,3,opt,name=fqdn,proto3" json:"fqdn,omitempty"` // port Port uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` // contains filtered or unexported fields }
func (*ProxySRC) Descriptor
deprecated
func (*ProxySRC) ProtoMessage ¶
func (*ProxySRC) ProtoMessage()
func (*ProxySRC) ProtoReflect ¶
func (x *ProxySRC) ProtoReflect() protoreflect.Message
type ProxyServer ¶
type ProxyServer interface { DnsResolve(Proxy_DnsResolveServer) error Proxy(Proxy_ProxyServer) error // contains filtered or unexported methods }
ProxyServer is the server API for Proxy service. All implementations must embed UnimplementedProxyServer for forward compatibility
type ProxyStatus ¶
type ProxyStatus int32
const ( ProxyStatus_Error ProxyStatus = 0 ProxyStatus_Accepted ProxyStatus = 1 ProxyStatus_Session ProxyStatus = 3 ProxyStatus_EOF ProxyStatus = 4 )
func (ProxyStatus) Descriptor ¶
func (ProxyStatus) Descriptor() protoreflect.EnumDescriptor
func (ProxyStatus) Enum ¶
func (x ProxyStatus) Enum() *ProxyStatus
func (ProxyStatus) EnumDescriptor
deprecated
func (ProxyStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProxyStatus.Descriptor instead.
func (ProxyStatus) Number ¶
func (x ProxyStatus) Number() protoreflect.EnumNumber
func (ProxyStatus) String ¶
func (x ProxyStatus) String() string
func (ProxyStatus) Type ¶
func (ProxyStatus) Type() protoreflect.EnumType
type Proxy_DnsResolveClient ¶
type Proxy_DnsResolveClient interface { Send(*DnsRequest) error Recv() (*DnsResponse, error) grpc.ClientStream }
type Proxy_DnsResolveServer ¶
type Proxy_DnsResolveServer interface { Send(*DnsResponse) error Recv() (*DnsRequest, error) grpc.ServerStream }
type Proxy_ProxyClient ¶
type Proxy_ProxyServer ¶
type UnimplementedProxyServer ¶
type UnimplementedProxyServer struct { }
UnimplementedProxyServer must be embedded to have forward compatible implementations.
func (UnimplementedProxyServer) DnsResolve ¶
func (UnimplementedProxyServer) DnsResolve(Proxy_DnsResolveServer) error
func (UnimplementedProxyServer) Proxy ¶
func (UnimplementedProxyServer) Proxy(Proxy_ProxyServer) error
type UnsafeProxyServer ¶
type UnsafeProxyServer interface {
// contains filtered or unexported methods
}
UnsafeProxyServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProxyServer will result in compilation errors.