pb

package
v0.0.0-...-d72a74b Latest Latest
Warning

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

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

README

生成目标文件

1. linux

生成 xxx.pb.go 文件

protoc --go_out=plugins=grpc:./ *.proto
# 或
protoc -I=. *.proto --gogofast_out=plugins=grpc:./gogofastgen

2. windows下需要全路径:

$env:dir="D:/project/go/src/github.com/lxt1045/utils"
protoc -I="$env:dir" $env:dir/rpc/test/socks/pb/*.proto --gogofast_out=plugins=grpc:"$env:dir/rpc/test/socks/pb/" 

protoc -I="$env:dir" $env:dir/rpc/test/socks/pb/*.proto --go_out=plugins=grpc:"$env:dir/rpc/test/socks/pb/" 

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthService        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowService          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
)
View Source
var AuthRsp_STATUS_name = map[int32]string{
	0: "Succ",
	1: "Fail",
}
View Source
var AuthRsp_STATUS_value = map[string]int32{
	"Succ": 0,
	"Fail": 1,
}
View Source
var ConnPeerRsp_STATUS_name = map[int32]string{
	0: "Succ",
	1: "Fail",
}
View Source
var ConnPeerRsp_STATUS_value = map[string]int32{
	"Succ": 0,
	"Fail": 1,
}
View Source
var Network_name = map[int32]string{
	0: "TCP",
	1: "UDP",
}
View Source
var Network_value = map[string]int32{
	"TCP": 0,
	"UDP": 1,
}

Functions

func RegisterClientServer

func RegisterClientServer(s *grpc.Server, srv ClientServer)

func RegisterServiceServer

func RegisterServiceServer(s *grpc.Server, srv ServiceServer)

func RegisterSocksCliServer

func RegisterSocksCliServer(s *grpc.Server, srv SocksCliServer)

func RegisterSocksSvcServer

func RegisterSocksSvcServer(s *grpc.Server, srv SocksSvcServer)

Types

type AuthReq

type AuthReq struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthReq) Descriptor

func (*AuthReq) Descriptor() ([]byte, []int)

func (*AuthReq) GetName

func (m *AuthReq) GetName() string

func (*AuthReq) Marshal

func (m *AuthReq) Marshal() (dAtA []byte, err error)

func (*AuthReq) MarshalTo

func (m *AuthReq) MarshalTo(dAtA []byte) (int, error)

func (*AuthReq) MarshalToSizedBuffer

func (m *AuthReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AuthReq) ProtoMessage

func (*AuthReq) ProtoMessage()

func (*AuthReq) Reset

func (m *AuthReq) Reset()

func (*AuthReq) Size

func (m *AuthReq) Size() (n int)

func (*AuthReq) String

func (m *AuthReq) String() string

func (*AuthReq) Unmarshal

func (m *AuthReq) Unmarshal(dAtA []byte) error

func (*AuthReq) XXX_DiscardUnknown

func (m *AuthReq) XXX_DiscardUnknown()

func (*AuthReq) XXX_Marshal

func (m *AuthReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthReq) XXX_Merge

func (m *AuthReq) XXX_Merge(src proto.Message)

func (*AuthReq) XXX_Size

func (m *AuthReq) XXX_Size() int

func (*AuthReq) XXX_Unmarshal

func (m *AuthReq) XXX_Unmarshal(b []byte) error

type AuthRsp

type AuthRsp struct {
	Status               AuthRsp_STATUS `protobuf:"varint,1,opt,name=status,proto3,enum=pb.AuthRsp_STATUS" json:"status,omitempty"`
	Err                  *Err           `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*AuthRsp) Descriptor

func (*AuthRsp) Descriptor() ([]byte, []int)

func (*AuthRsp) GetErr

func (m *AuthRsp) GetErr() *Err

func (*AuthRsp) GetStatus

func (m *AuthRsp) GetStatus() AuthRsp_STATUS

func (*AuthRsp) Marshal

func (m *AuthRsp) Marshal() (dAtA []byte, err error)

func (*AuthRsp) MarshalTo

func (m *AuthRsp) MarshalTo(dAtA []byte) (int, error)

func (*AuthRsp) MarshalToSizedBuffer

func (m *AuthRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AuthRsp) ProtoMessage

func (*AuthRsp) ProtoMessage()

func (*AuthRsp) Reset

func (m *AuthRsp) Reset()

func (*AuthRsp) Size

func (m *AuthRsp) Size() (n int)

func (*AuthRsp) String

func (m *AuthRsp) String() string

func (*AuthRsp) Unmarshal

func (m *AuthRsp) Unmarshal(dAtA []byte) error

func (*AuthRsp) XXX_DiscardUnknown

func (m *AuthRsp) XXX_DiscardUnknown()

func (*AuthRsp) XXX_Marshal

func (m *AuthRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthRsp) XXX_Merge

func (m *AuthRsp) XXX_Merge(src proto.Message)

func (*AuthRsp) XXX_Size

func (m *AuthRsp) XXX_Size() int

func (*AuthRsp) XXX_Unmarshal

func (m *AuthRsp) XXX_Unmarshal(b []byte) error

type AuthRsp_STATUS

type AuthRsp_STATUS int32
const (
	AuthRsp_Succ AuthRsp_STATUS = 0
	AuthRsp_Fail AuthRsp_STATUS = 1
)

func (AuthRsp_STATUS) EnumDescriptor

func (AuthRsp_STATUS) EnumDescriptor() ([]byte, []int)

func (AuthRsp_STATUS) String

func (x AuthRsp_STATUS) String() string

type ClientClient

type ClientClient interface {
	Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*CloseRsp, error)
	Latency(ctx context.Context, in *LatencyReq, opts ...grpc.CallOption) (*LatencyRsp, error)
	ConnPeer(ctx context.Context, in *ConnPeerReq, opts ...grpc.CallOption) (*ConnPeerRsp, error)
}

ClientClient is the client API for Client service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewClientClient

func NewClientClient(cc *grpc.ClientConn) ClientClient

type ClientInfo

type ClientInfo struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Addr                 string   `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Network              Network  `protobuf:"varint,3,opt,name=network,proto3,enum=pb.Network" json:"network,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ClientInfo) Descriptor

func (*ClientInfo) Descriptor() ([]byte, []int)

func (*ClientInfo) GetAddr

func (m *ClientInfo) GetAddr() string

func (*ClientInfo) GetName

func (m *ClientInfo) GetName() string

func (*ClientInfo) GetNetwork

func (m *ClientInfo) GetNetwork() Network

func (*ClientInfo) Marshal

func (m *ClientInfo) Marshal() (dAtA []byte, err error)

func (*ClientInfo) MarshalTo

func (m *ClientInfo) MarshalTo(dAtA []byte) (int, error)

func (*ClientInfo) MarshalToSizedBuffer

func (m *ClientInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) Reset

func (m *ClientInfo) Reset()

func (*ClientInfo) Size

func (m *ClientInfo) Size() (n int)

func (*ClientInfo) String

func (m *ClientInfo) String() string

func (*ClientInfo) Unmarshal

func (m *ClientInfo) Unmarshal(dAtA []byte) error

func (*ClientInfo) XXX_DiscardUnknown

func (m *ClientInfo) XXX_DiscardUnknown()

func (*ClientInfo) XXX_Marshal

func (m *ClientInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientInfo) XXX_Merge

func (m *ClientInfo) XXX_Merge(src proto.Message)

func (*ClientInfo) XXX_Size

func (m *ClientInfo) XXX_Size() int

func (*ClientInfo) XXX_Unmarshal

func (m *ClientInfo) XXX_Unmarshal(b []byte) error

type ClientServer

type ClientServer interface {
	Close(context.Context, *CloseReq) (*CloseRsp, error)
	Latency(context.Context, *LatencyReq) (*LatencyRsp, error)
	ConnPeer(context.Context, *ConnPeerReq) (*ConnPeerRsp, error)
}

ClientServer is the server API for Client service.

type ClientsReq

type ClientsReq struct {
	MyName               string   `protobuf:"bytes,1,opt,name=my_name,json=myName,proto3" json:"my_name,omitempty"`
	Names                []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ClientsReq) Descriptor

func (*ClientsReq) Descriptor() ([]byte, []int)

func (*ClientsReq) GetMyName

func (m *ClientsReq) GetMyName() string

func (*ClientsReq) GetNames

func (m *ClientsReq) GetNames() []string

func (*ClientsReq) Marshal

func (m *ClientsReq) Marshal() (dAtA []byte, err error)

func (*ClientsReq) MarshalTo

func (m *ClientsReq) MarshalTo(dAtA []byte) (int, error)

func (*ClientsReq) MarshalToSizedBuffer

func (m *ClientsReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClientsReq) ProtoMessage

func (*ClientsReq) ProtoMessage()

func (*ClientsReq) Reset

func (m *ClientsReq) Reset()

func (*ClientsReq) Size

func (m *ClientsReq) Size() (n int)

func (*ClientsReq) String

func (m *ClientsReq) String() string

func (*ClientsReq) Unmarshal

func (m *ClientsReq) Unmarshal(dAtA []byte) error

func (*ClientsReq) XXX_DiscardUnknown

func (m *ClientsReq) XXX_DiscardUnknown()

func (*ClientsReq) XXX_Marshal

func (m *ClientsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientsReq) XXX_Merge

func (m *ClientsReq) XXX_Merge(src proto.Message)

func (*ClientsReq) XXX_Size

func (m *ClientsReq) XXX_Size() int

func (*ClientsReq) XXX_Unmarshal

func (m *ClientsReq) XXX_Unmarshal(b []byte) error

type ClientsRsp

type ClientsRsp struct {
	Clients              []*ClientInfo `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*ClientsRsp) Descriptor

func (*ClientsRsp) Descriptor() ([]byte, []int)

func (*ClientsRsp) GetClients

func (m *ClientsRsp) GetClients() []*ClientInfo

func (*ClientsRsp) Marshal

func (m *ClientsRsp) Marshal() (dAtA []byte, err error)

func (*ClientsRsp) MarshalTo

func (m *ClientsRsp) MarshalTo(dAtA []byte) (int, error)

func (*ClientsRsp) MarshalToSizedBuffer

func (m *ClientsRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClientsRsp) ProtoMessage

func (*ClientsRsp) ProtoMessage()

func (*ClientsRsp) Reset

func (m *ClientsRsp) Reset()

func (*ClientsRsp) Size

func (m *ClientsRsp) Size() (n int)

func (*ClientsRsp) String

func (m *ClientsRsp) String() string

func (*ClientsRsp) Unmarshal

func (m *ClientsRsp) Unmarshal(dAtA []byte) error

func (*ClientsRsp) XXX_DiscardUnknown

func (m *ClientsRsp) XXX_DiscardUnknown()

func (*ClientsRsp) XXX_Marshal

func (m *ClientsRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientsRsp) XXX_Merge

func (m *ClientsRsp) XXX_Merge(src proto.Message)

func (*ClientsRsp) XXX_Size

func (m *ClientsRsp) XXX_Size() int

func (*ClientsRsp) XXX_Unmarshal

func (m *ClientsRsp) XXX_Unmarshal(b []byte) error

type CloseReq

type CloseReq struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CloseReq) Descriptor

func (*CloseReq) Descriptor() ([]byte, []int)

func (*CloseReq) Marshal

func (m *CloseReq) Marshal() (dAtA []byte, err error)

func (*CloseReq) MarshalTo

func (m *CloseReq) MarshalTo(dAtA []byte) (int, error)

func (*CloseReq) MarshalToSizedBuffer

func (m *CloseReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CloseReq) ProtoMessage

func (*CloseReq) ProtoMessage()

func (*CloseReq) Reset

func (m *CloseReq) Reset()

func (*CloseReq) Size

func (m *CloseReq) Size() (n int)

func (*CloseReq) String

func (m *CloseReq) String() string

func (*CloseReq) Unmarshal

func (m *CloseReq) Unmarshal(dAtA []byte) error

func (*CloseReq) XXX_DiscardUnknown

func (m *CloseReq) XXX_DiscardUnknown()

func (*CloseReq) XXX_Marshal

func (m *CloseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CloseReq) XXX_Merge

func (m *CloseReq) XXX_Merge(src proto.Message)

func (*CloseReq) XXX_Size

func (m *CloseReq) XXX_Size() int

func (*CloseReq) XXX_Unmarshal

func (m *CloseReq) XXX_Unmarshal(b []byte) error

type CloseRsp

type CloseRsp struct {
	Err                  *Err     `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CloseRsp) Descriptor

func (*CloseRsp) Descriptor() ([]byte, []int)

func (*CloseRsp) GetErr

func (m *CloseRsp) GetErr() *Err

func (*CloseRsp) Marshal

func (m *CloseRsp) Marshal() (dAtA []byte, err error)

func (*CloseRsp) MarshalTo

func (m *CloseRsp) MarshalTo(dAtA []byte) (int, error)

func (*CloseRsp) MarshalToSizedBuffer

func (m *CloseRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CloseRsp) ProtoMessage

func (*CloseRsp) ProtoMessage()

func (*CloseRsp) Reset

func (m *CloseRsp) Reset()

func (*CloseRsp) Size

func (m *CloseRsp) Size() (n int)

func (*CloseRsp) String

func (m *CloseRsp) String() string

func (*CloseRsp) Unmarshal

func (m *CloseRsp) Unmarshal(dAtA []byte) error

func (*CloseRsp) XXX_DiscardUnknown

func (m *CloseRsp) XXX_DiscardUnknown()

func (*CloseRsp) XXX_Marshal

func (m *CloseRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CloseRsp) XXX_Merge

func (m *CloseRsp) XXX_Merge(src proto.Message)

func (*CloseRsp) XXX_Size

func (m *CloseRsp) XXX_Size() int

func (*CloseRsp) XXX_Unmarshal

func (m *CloseRsp) XXX_Unmarshal(b []byte) error

type ConnPeerReq

type ConnPeerReq struct {
	Client               *ClientInfo `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"`
	Timestamp            int64       `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Frequency            int32       `protobuf:"varint,3,opt,name=frequency,proto3" json:"frequency,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*ConnPeerReq) Descriptor

func (*ConnPeerReq) Descriptor() ([]byte, []int)

func (*ConnPeerReq) GetClient

func (m *ConnPeerReq) GetClient() *ClientInfo

func (*ConnPeerReq) GetFrequency

func (m *ConnPeerReq) GetFrequency() int32

func (*ConnPeerReq) GetTimestamp

func (m *ConnPeerReq) GetTimestamp() int64

func (*ConnPeerReq) Marshal

func (m *ConnPeerReq) Marshal() (dAtA []byte, err error)

func (*ConnPeerReq) MarshalTo

func (m *ConnPeerReq) MarshalTo(dAtA []byte) (int, error)

func (*ConnPeerReq) MarshalToSizedBuffer

func (m *ConnPeerReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnPeerReq) ProtoMessage

func (*ConnPeerReq) ProtoMessage()

func (*ConnPeerReq) Reset

func (m *ConnPeerReq) Reset()

func (*ConnPeerReq) Size

func (m *ConnPeerReq) Size() (n int)

func (*ConnPeerReq) String

func (m *ConnPeerReq) String() string

func (*ConnPeerReq) Unmarshal

func (m *ConnPeerReq) Unmarshal(dAtA []byte) error

func (*ConnPeerReq) XXX_DiscardUnknown

func (m *ConnPeerReq) XXX_DiscardUnknown()

func (*ConnPeerReq) XXX_Marshal

func (m *ConnPeerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnPeerReq) XXX_Merge

func (m *ConnPeerReq) XXX_Merge(src proto.Message)

func (*ConnPeerReq) XXX_Size

func (m *ConnPeerReq) XXX_Size() int

func (*ConnPeerReq) XXX_Unmarshal

func (m *ConnPeerReq) XXX_Unmarshal(b []byte) error

type ConnPeerRsp

type ConnPeerRsp struct {
	Client               *ClientInfo        `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"`
	Timestamp            int64              `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Status               ConnPeerRsp_STATUS `protobuf:"varint,3,opt,name=status,proto3,enum=pb.ConnPeerRsp_STATUS" json:"status,omitempty"`
	Err                  *Err               `protobuf:"bytes,4,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*ConnPeerRsp) Descriptor

func (*ConnPeerRsp) Descriptor() ([]byte, []int)

func (*ConnPeerRsp) GetClient

func (m *ConnPeerRsp) GetClient() *ClientInfo

func (*ConnPeerRsp) GetErr

func (m *ConnPeerRsp) GetErr() *Err

func (*ConnPeerRsp) GetStatus

func (m *ConnPeerRsp) GetStatus() ConnPeerRsp_STATUS

func (*ConnPeerRsp) GetTimestamp

func (m *ConnPeerRsp) GetTimestamp() int64

func (*ConnPeerRsp) Marshal

func (m *ConnPeerRsp) Marshal() (dAtA []byte, err error)

func (*ConnPeerRsp) MarshalTo

func (m *ConnPeerRsp) MarshalTo(dAtA []byte) (int, error)

func (*ConnPeerRsp) MarshalToSizedBuffer

func (m *ConnPeerRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnPeerRsp) ProtoMessage

func (*ConnPeerRsp) ProtoMessage()

func (*ConnPeerRsp) Reset

func (m *ConnPeerRsp) Reset()

func (*ConnPeerRsp) Size

func (m *ConnPeerRsp) Size() (n int)

func (*ConnPeerRsp) String

func (m *ConnPeerRsp) String() string

func (*ConnPeerRsp) Unmarshal

func (m *ConnPeerRsp) Unmarshal(dAtA []byte) error

func (*ConnPeerRsp) XXX_DiscardUnknown

func (m *ConnPeerRsp) XXX_DiscardUnknown()

func (*ConnPeerRsp) XXX_Marshal

func (m *ConnPeerRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnPeerRsp) XXX_Merge

func (m *ConnPeerRsp) XXX_Merge(src proto.Message)

func (*ConnPeerRsp) XXX_Size

func (m *ConnPeerRsp) XXX_Size() int

func (*ConnPeerRsp) XXX_Unmarshal

func (m *ConnPeerRsp) XXX_Unmarshal(b []byte) error

type ConnPeerRsp_STATUS

type ConnPeerRsp_STATUS int32
const (
	ConnPeerRsp_Succ ConnPeerRsp_STATUS = 0
	ConnPeerRsp_Fail ConnPeerRsp_STATUS = 1
)

func (ConnPeerRsp_STATUS) EnumDescriptor

func (ConnPeerRsp_STATUS) EnumDescriptor() ([]byte, []int)

func (ConnPeerRsp_STATUS) String

func (x ConnPeerRsp_STATUS) String() string

type ConnReq

type ConnReq struct {
	Addr                 string   `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Network              Network  `protobuf:"varint,2,opt,name=network,proto3,enum=pb.Network" json:"network,omitempty"`
	Body                 []byte   `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ConnReq) Descriptor

func (*ConnReq) Descriptor() ([]byte, []int)

func (*ConnReq) GetAddr

func (m *ConnReq) GetAddr() string

func (*ConnReq) GetBody

func (m *ConnReq) GetBody() []byte

func (*ConnReq) GetNetwork

func (m *ConnReq) GetNetwork() Network

func (*ConnReq) Marshal

func (m *ConnReq) Marshal() (dAtA []byte, err error)

func (*ConnReq) MarshalTo

func (m *ConnReq) MarshalTo(dAtA []byte) (int, error)

func (*ConnReq) MarshalToSizedBuffer

func (m *ConnReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnReq) ProtoMessage

func (*ConnReq) ProtoMessage()

func (*ConnReq) Reset

func (m *ConnReq) Reset()

func (*ConnReq) Size

func (m *ConnReq) Size() (n int)

func (*ConnReq) String

func (m *ConnReq) String() string

func (*ConnReq) Unmarshal

func (m *ConnReq) Unmarshal(dAtA []byte) error

func (*ConnReq) XXX_DiscardUnknown

func (m *ConnReq) XXX_DiscardUnknown()

func (*ConnReq) XXX_Marshal

func (m *ConnReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnReq) XXX_Merge

func (m *ConnReq) XXX_Merge(src proto.Message)

func (*ConnReq) XXX_Size

func (m *ConnReq) XXX_Size() int

func (*ConnReq) XXX_Unmarshal

func (m *ConnReq) XXX_Unmarshal(b []byte) error

type ConnRsp

type ConnRsp struct {
	Body                 []byte   `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	Err                  *Err     `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ConnRsp) Descriptor

func (*ConnRsp) Descriptor() ([]byte, []int)

func (*ConnRsp) GetBody

func (m *ConnRsp) GetBody() []byte

func (*ConnRsp) GetErr

func (m *ConnRsp) GetErr() *Err

func (*ConnRsp) Marshal

func (m *ConnRsp) Marshal() (dAtA []byte, err error)

func (*ConnRsp) MarshalTo

func (m *ConnRsp) MarshalTo(dAtA []byte) (int, error)

func (*ConnRsp) MarshalToSizedBuffer

func (m *ConnRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnRsp) ProtoMessage

func (*ConnRsp) ProtoMessage()

func (*ConnRsp) Reset

func (m *ConnRsp) Reset()

func (*ConnRsp) Size

func (m *ConnRsp) Size() (n int)

func (*ConnRsp) String

func (m *ConnRsp) String() string

func (*ConnRsp) Unmarshal

func (m *ConnRsp) Unmarshal(dAtA []byte) error

func (*ConnRsp) XXX_DiscardUnknown

func (m *ConnRsp) XXX_DiscardUnknown()

func (*ConnRsp) XXX_Marshal

func (m *ConnRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnRsp) XXX_Merge

func (m *ConnRsp) XXX_Merge(src proto.Message)

func (*ConnRsp) XXX_Size

func (m *ConnRsp) XXX_Size() int

func (*ConnRsp) XXX_Unmarshal

func (m *ConnRsp) XXX_Unmarshal(b []byte) error

type Err

type Err struct {
	Code                 int64    `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg                  string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Err) Descriptor

func (*Err) Descriptor() ([]byte, []int)

func (*Err) GetCode

func (m *Err) GetCode() int64

func (*Err) GetMsg

func (m *Err) GetMsg() string

func (*Err) Marshal

func (m *Err) Marshal() (dAtA []byte, err error)

func (*Err) MarshalTo

func (m *Err) MarshalTo(dAtA []byte) (int, error)

func (*Err) MarshalToSizedBuffer

func (m *Err) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Err) ProtoMessage

func (*Err) ProtoMessage()

func (*Err) Reset

func (m *Err) Reset()

func (*Err) Size

func (m *Err) Size() (n int)

func (*Err) String

func (m *Err) String() string

func (*Err) Unmarshal

func (m *Err) Unmarshal(dAtA []byte) error

func (*Err) XXX_DiscardUnknown

func (m *Err) XXX_DiscardUnknown()

func (*Err) XXX_Marshal

func (m *Err) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Err) XXX_Merge

func (m *Err) XXX_Merge(src proto.Message)

func (*Err) XXX_Size

func (m *Err) XXX_Size() int

func (*Err) XXX_Unmarshal

func (m *Err) XXX_Unmarshal(b []byte) error

type LatencyReq

type LatencyReq struct {
	Ts                   int64    `protobuf:"varint,1,opt,name=ts,proto3" json:"ts,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LatencyReq) Descriptor

func (*LatencyReq) Descriptor() ([]byte, []int)

func (*LatencyReq) GetTs

func (m *LatencyReq) GetTs() int64

func (*LatencyReq) Marshal

func (m *LatencyReq) Marshal() (dAtA []byte, err error)

func (*LatencyReq) MarshalTo

func (m *LatencyReq) MarshalTo(dAtA []byte) (int, error)

func (*LatencyReq) MarshalToSizedBuffer

func (m *LatencyReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LatencyReq) ProtoMessage

func (*LatencyReq) ProtoMessage()

func (*LatencyReq) Reset

func (m *LatencyReq) Reset()

func (*LatencyReq) Size

func (m *LatencyReq) Size() (n int)

func (*LatencyReq) String

func (m *LatencyReq) String() string

func (*LatencyReq) Unmarshal

func (m *LatencyReq) Unmarshal(dAtA []byte) error

func (*LatencyReq) XXX_DiscardUnknown

func (m *LatencyReq) XXX_DiscardUnknown()

func (*LatencyReq) XXX_Marshal

func (m *LatencyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LatencyReq) XXX_Merge

func (m *LatencyReq) XXX_Merge(src proto.Message)

func (*LatencyReq) XXX_Size

func (m *LatencyReq) XXX_Size() int

func (*LatencyReq) XXX_Unmarshal

func (m *LatencyReq) XXX_Unmarshal(b []byte) error

type LatencyRsp

type LatencyRsp struct {
	Ts                   int64    `protobuf:"varint,1,opt,name=ts,proto3" json:"ts,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LatencyRsp) Descriptor

func (*LatencyRsp) Descriptor() ([]byte, []int)

func (*LatencyRsp) GetTs

func (m *LatencyRsp) GetTs() int64

func (*LatencyRsp) Marshal

func (m *LatencyRsp) Marshal() (dAtA []byte, err error)

func (*LatencyRsp) MarshalTo

func (m *LatencyRsp) MarshalTo(dAtA []byte) (int, error)

func (*LatencyRsp) MarshalToSizedBuffer

func (m *LatencyRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LatencyRsp) ProtoMessage

func (*LatencyRsp) ProtoMessage()

func (*LatencyRsp) Reset

func (m *LatencyRsp) Reset()

func (*LatencyRsp) Size

func (m *LatencyRsp) Size() (n int)

func (*LatencyRsp) String

func (m *LatencyRsp) String() string

func (*LatencyRsp) Unmarshal

func (m *LatencyRsp) Unmarshal(dAtA []byte) error

func (*LatencyRsp) XXX_DiscardUnknown

func (m *LatencyRsp) XXX_DiscardUnknown()

func (*LatencyRsp) XXX_Marshal

func (m *LatencyRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LatencyRsp) XXX_Merge

func (m *LatencyRsp) XXX_Merge(src proto.Message)

func (*LatencyRsp) XXX_Size

func (m *LatencyRsp) XXX_Size() int

func (*LatencyRsp) XXX_Unmarshal

func (m *LatencyRsp) XXX_Unmarshal(b []byte) error

type Network

type Network int32
const (
	Network_TCP Network = 0
	Network_UDP Network = 1
)

func (Network) EnumDescriptor

func (Network) EnumDescriptor() ([]byte, []int)

func (Network) String

func (x Network) String() string

type ServiceClient

type ServiceClient interface {
	Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*CloseRsp, error)
	Latency(ctx context.Context, in *LatencyReq, opts ...grpc.CallOption) (*LatencyRsp, error)
	Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*AuthRsp, error)
	Clients(ctx context.Context, in *ClientsReq, opts ...grpc.CallOption) (*ClientsRsp, error)
	ConnPeer(ctx context.Context, in *ConnPeerReq, opts ...grpc.CallOption) (*ConnPeerRsp, error)
}

ServiceClient is the client API for Service service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewServiceClient

func NewServiceClient(cc *grpc.ClientConn) ServiceClient

type ServiceServer

type ServiceServer interface {
	Close(context.Context, *CloseReq) (*CloseRsp, error)
	Latency(context.Context, *LatencyReq) (*LatencyRsp, error)
	Auth(context.Context, *AuthReq) (*AuthRsp, error)
	Clients(context.Context, *ClientsReq) (*ClientsRsp, error)
	ConnPeer(context.Context, *ConnPeerReq) (*ConnPeerRsp, error)
}

ServiceServer is the server API for Service service.

type SocksCliClient

type SocksCliClient interface {
	Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*CloseRsp, error)
}

SocksCliClient is the client API for SocksCli service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSocksCliClient

func NewSocksCliClient(cc *grpc.ClientConn) SocksCliClient

type SocksCliServer

type SocksCliServer interface {
	Close(context.Context, *CloseReq) (*CloseRsp, error)
}

SocksCliServer is the server API for SocksCli service.

type SocksSvcClient

type SocksSvcClient interface {
	Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*CloseRsp, error)
	Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*AuthRsp, error)
	Conn(ctx context.Context, in *ConnReq, opts ...grpc.CallOption) (*ConnRsp, error)
}

SocksSvcClient is the client API for SocksSvc service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSocksSvcClient

func NewSocksSvcClient(cc *grpc.ClientConn) SocksSvcClient

type SocksSvcServer

type SocksSvcServer interface {
	Close(context.Context, *CloseReq) (*CloseRsp, error)
	Auth(context.Context, *AuthReq) (*AuthRsp, error)
	Conn(context.Context, *ConnReq) (*ConnRsp, error)
}

SocksSvcServer is the server API for SocksSvc service.

type UnimplementedClientServer

type UnimplementedClientServer struct {
}

UnimplementedClientServer can be embedded to have forward compatible implementations.

func (*UnimplementedClientServer) Close

func (*UnimplementedClientServer) ConnPeer

func (*UnimplementedClientServer) Latency

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedServiceServer) Auth

func (*UnimplementedServiceServer) Clients

func (*UnimplementedServiceServer) Close

func (*UnimplementedServiceServer) ConnPeer

func (*UnimplementedServiceServer) Latency

type UnimplementedSocksCliServer

type UnimplementedSocksCliServer struct {
}

UnimplementedSocksCliServer can be embedded to have forward compatible implementations.

func (*UnimplementedSocksCliServer) Close

type UnimplementedSocksSvcServer

type UnimplementedSocksSvcServer struct {
}

UnimplementedSocksSvcServer can be embedded to have forward compatible implementations.

func (*UnimplementedSocksSvcServer) Auth

func (*UnimplementedSocksSvcServer) Close

func (*UnimplementedSocksSvcServer) Conn

Jump to

Keyboard shortcuts

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