Documentation
¶
Index ¶
- Variables
- func FromProtoIP(m *IP) net.IP
- func FromProtoIPRange(m *IPRange) net.IPNet
- func FromProtoTimestamp(t *Timestamp) time.Time
- func IsInternal(resp interface{}) bool
- func RegisterZeropsVpnProtocolServer(s *grpc.Server, srv ZeropsVpnProtocolServer)
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetCode() ErrorCode
- func (x *Error) GetCodeInt() int
- func (x *Error) GetMessage() string
- func (x *Error) GetMeta() []byte
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- type ErrorCode
- type IP
- type IPRange
- type ProlongVpnRequest
- func (*ProlongVpnRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProlongVpnRequest) GetAccessToken() string
- func (*ProlongVpnRequest) ProtoMessage()
- func (x *ProlongVpnRequest) ProtoReflect() protoreflect.Message
- func (x *ProlongVpnRequest) Reset()
- func (x *ProlongVpnRequest) String() string
- type ProlongVpnResponse
- func (*ProlongVpnResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProlongVpnResponse) GetError() *Error
- func (*ProlongVpnResponse) ProtoMessage()
- func (x *ProlongVpnResponse) ProtoReflect() protoreflect.Message
- func (x *ProlongVpnResponse) Reset()
- func (x *ProlongVpnResponse) String() string
- type StartVpnOutDto
- func (*StartVpnOutDto) Descriptor() ([]byte, []int)deprecated
- func (x *StartVpnOutDto) GetAssignedClientIp() *IP
- func (x *StartVpnOutDto) GetDnsIp() *IP
- func (x *StartVpnOutDto) GetPort() int64
- func (x *StartVpnOutDto) GetServerIp() *IP
- func (x *StartVpnOutDto) GetServerPublicKey() string
- func (x *StartVpnOutDto) GetVpnIpRange() *IPRange
- func (*StartVpnOutDto) ProtoMessage()
- func (x *StartVpnOutDto) ProtoReflect() protoreflect.Message
- func (x *StartVpnOutDto) Reset()
- func (x *StartVpnOutDto) String() string
- type StartVpnRequest
- func (*StartVpnRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StartVpnRequest) GetAccessToken() string
- func (x *StartVpnRequest) GetPreferredPortMax() uint32
- func (x *StartVpnRequest) GetPreferredPortMin() uint32
- func (*StartVpnRequest) ProtoMessage()
- func (x *StartVpnRequest) ProtoReflect() protoreflect.Message
- func (x *StartVpnRequest) Reset()
- func (x *StartVpnRequest) String() string
- type StartVpnResponse
- func (*StartVpnResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StartVpnResponse) GetError() *Error
- func (x *StartVpnResponse) GetVpn() *StartVpnOutDto
- func (*StartVpnResponse) ProtoMessage()
- func (x *StartVpnResponse) ProtoReflect() protoreflect.Message
- func (x *StartVpnResponse) Reset()
- func (x *StartVpnResponse) String() string
- type Timestamp
- func (*Timestamp) Descriptor() ([]byte, []int)deprecated
- func (x *Timestamp) GetIsSet() bool
- func (x *Timestamp) GetNanos() int32
- func (x *Timestamp) GetSeconds() int64
- func (*Timestamp) ProtoMessage()
- func (x *Timestamp) ProtoReflect() protoreflect.Message
- func (x *Timestamp) Reset()
- func (x *Timestamp) String() string
- type UnimplementedZeropsVpnProtocolServer
- type ZeropsVpnProtocolClient
- type ZeropsVpnProtocolServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrorCode_name = map[int32]string{ 0: "NO_ERROR", 1: "INTERNAL_SERVER_ERROR", 2: "INSTANCE_NOT_FOUND", 3: "PROXY_IS_FULL", 4: "INVALID_ACCESS_TOKEN", 5: "VPN_SESSION_EXPIRED", 6: "MAX_PARALLEL_VPN_LIMIT", 7: "INVALID_PREFERRED_PORT", 8: "PREFERRED_PORT_UNAVAILABLE", } ErrorCode_value = map[string]int32{ "NO_ERROR": 0, "INTERNAL_SERVER_ERROR": 1, "INSTANCE_NOT_FOUND": 2, "PROXY_IS_FULL": 3, "INVALID_ACCESS_TOKEN": 4, "VPN_SESSION_EXPIRED": 5, "MAX_PARALLEL_VPN_LIMIT": 6, "INVALID_PREFERRED_PORT": 7, "PREFERRED_PORT_UNAVAILABLE": 8, } )
Enum value maps for ErrorCode.
var File_zeropsVpnProtocol_proto protoreflect.FileDescriptor
Functions ¶
func FromProtoIP ¶
func FromProtoIPRange ¶
func FromProtoTimestamp ¶
func IsInternal ¶
func IsInternal(resp interface{}) bool
func RegisterZeropsVpnProtocolServer ¶
func RegisterZeropsVpnProtocolServer(s *grpc.Server, srv ZeropsVpnProtocolServer)
Types ¶
type Error ¶
type Error struct {
Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=zeropsVpnProtocol.ErrorCode" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*Error) Descriptor
deprecated
func (*Error) GetCodeInt ¶
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type ErrorCode ¶
type ErrorCode int32
const ( ErrorCode_NO_ERROR ErrorCode = 0 ErrorCode_INTERNAL_SERVER_ERROR ErrorCode = 1 ErrorCode_INSTANCE_NOT_FOUND ErrorCode = 2 ErrorCode_PROXY_IS_FULL ErrorCode = 3 ErrorCode_INVALID_ACCESS_TOKEN ErrorCode = 4 ErrorCode_VPN_SESSION_EXPIRED ErrorCode = 5 ErrorCode_MAX_PARALLEL_VPN_LIMIT ErrorCode = 6 ErrorCode_INVALID_PREFERRED_PORT ErrorCode = 7 ErrorCode_PREFERRED_PORT_UNAVAILABLE ErrorCode = 8 )
func (ErrorCode) Descriptor ¶
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
func (ErrorCode) Number ¶
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶
func (ErrorCode) Type() protoreflect.EnumType
type IP ¶
type IP struct {
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
// contains filtered or unexported fields
}
func (*IP) Descriptor
deprecated
func (*IP) GetAddress ¶
func (*IP) ProtoMessage ¶
func (*IP) ProtoMessage()
func (*IP) ProtoReflect ¶
func (x *IP) ProtoReflect() protoreflect.Message
type IPRange ¶
type IPRange struct {
Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
Mask []byte `protobuf:"bytes,2,opt,name=mask,proto3" json:"mask,omitempty"`
// contains filtered or unexported fields
}
func ToProtoIpNet ¶
func (*IPRange) Descriptor
deprecated
func (*IPRange) ProtoMessage ¶
func (*IPRange) ProtoMessage()
func (*IPRange) ProtoReflect ¶
func (x *IPRange) ProtoReflect() protoreflect.Message
type ProlongVpnRequest ¶
type ProlongVpnRequest struct {
AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
// contains filtered or unexported fields
}
func (*ProlongVpnRequest) Descriptor
deprecated
func (*ProlongVpnRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProlongVpnRequest.ProtoReflect.Descriptor instead.
func (*ProlongVpnRequest) GetAccessToken ¶
func (x *ProlongVpnRequest) GetAccessToken() string
func (*ProlongVpnRequest) ProtoMessage ¶
func (*ProlongVpnRequest) ProtoMessage()
func (*ProlongVpnRequest) ProtoReflect ¶
func (x *ProlongVpnRequest) ProtoReflect() protoreflect.Message
func (*ProlongVpnRequest) Reset ¶
func (x *ProlongVpnRequest) Reset()
func (*ProlongVpnRequest) String ¶
func (x *ProlongVpnRequest) String() string
type ProlongVpnResponse ¶
type ProlongVpnResponse struct {
Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
func (*ProlongVpnResponse) Descriptor
deprecated
func (*ProlongVpnResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProlongVpnResponse.ProtoReflect.Descriptor instead.
func (*ProlongVpnResponse) GetError ¶
func (x *ProlongVpnResponse) GetError() *Error
func (*ProlongVpnResponse) ProtoMessage ¶
func (*ProlongVpnResponse) ProtoMessage()
func (*ProlongVpnResponse) ProtoReflect ¶
func (x *ProlongVpnResponse) ProtoReflect() protoreflect.Message
func (*ProlongVpnResponse) Reset ¶
func (x *ProlongVpnResponse) Reset()
func (*ProlongVpnResponse) String ¶
func (x *ProlongVpnResponse) String() string
type StartVpnOutDto ¶
type StartVpnOutDto struct {
Port int64 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
ServerPublicKey string `protobuf:"bytes,2,opt,name=serverPublicKey,proto3" json:"serverPublicKey,omitempty"`
AssignedClientIp *IP `protobuf:"bytes,3,opt,name=assignedClientIp,proto3" json:"assignedClientIp,omitempty"`
ServerIp *IP `protobuf:"bytes,4,opt,name=serverIp,proto3" json:"serverIp,omitempty"`
VpnIpRange *IPRange `protobuf:"bytes,5,opt,name=vpnIpRange,proto3" json:"vpnIpRange,omitempty"`
DnsIp *IP `protobuf:"bytes,6,opt,name=dnsIp,proto3" json:"dnsIp,omitempty"`
// contains filtered or unexported fields
}
func (*StartVpnOutDto) Descriptor
deprecated
func (*StartVpnOutDto) Descriptor() ([]byte, []int)
Deprecated: Use StartVpnOutDto.ProtoReflect.Descriptor instead.
func (*StartVpnOutDto) GetAssignedClientIp ¶
func (x *StartVpnOutDto) GetAssignedClientIp() *IP
func (*StartVpnOutDto) GetDnsIp ¶
func (x *StartVpnOutDto) GetDnsIp() *IP
func (*StartVpnOutDto) GetPort ¶
func (x *StartVpnOutDto) GetPort() int64
func (*StartVpnOutDto) GetServerIp ¶
func (x *StartVpnOutDto) GetServerIp() *IP
func (*StartVpnOutDto) GetServerPublicKey ¶
func (x *StartVpnOutDto) GetServerPublicKey() string
func (*StartVpnOutDto) GetVpnIpRange ¶
func (x *StartVpnOutDto) GetVpnIpRange() *IPRange
func (*StartVpnOutDto) ProtoMessage ¶
func (*StartVpnOutDto) ProtoMessage()
func (*StartVpnOutDto) ProtoReflect ¶
func (x *StartVpnOutDto) ProtoReflect() protoreflect.Message
func (*StartVpnOutDto) Reset ¶
func (x *StartVpnOutDto) Reset()
func (*StartVpnOutDto) String ¶
func (x *StartVpnOutDto) String() string
type StartVpnRequest ¶
type StartVpnRequest struct {
AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
PreferredPortMin uint32 `protobuf:"varint,2,opt,name=preferredPortMin,proto3" json:"preferredPortMin,omitempty"`
PreferredPortMax uint32 `protobuf:"varint,3,opt,name=preferredPortMax,proto3" json:"preferredPortMax,omitempty"`
// contains filtered or unexported fields
}
func (*StartVpnRequest) Descriptor
deprecated
func (*StartVpnRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartVpnRequest.ProtoReflect.Descriptor instead.
func (*StartVpnRequest) GetAccessToken ¶
func (x *StartVpnRequest) GetAccessToken() string
func (*StartVpnRequest) GetPreferredPortMax ¶
func (x *StartVpnRequest) GetPreferredPortMax() uint32
func (*StartVpnRequest) GetPreferredPortMin ¶
func (x *StartVpnRequest) GetPreferredPortMin() uint32
func (*StartVpnRequest) ProtoMessage ¶
func (*StartVpnRequest) ProtoMessage()
func (*StartVpnRequest) ProtoReflect ¶
func (x *StartVpnRequest) ProtoReflect() protoreflect.Message
func (*StartVpnRequest) Reset ¶
func (x *StartVpnRequest) Reset()
func (*StartVpnRequest) String ¶
func (x *StartVpnRequest) String() string
type StartVpnResponse ¶
type StartVpnResponse struct {
Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Vpn *StartVpnOutDto `protobuf:"bytes,2,opt,name=vpn,proto3" json:"vpn,omitempty"`
// contains filtered or unexported fields
}
func (*StartVpnResponse) Descriptor
deprecated
func (*StartVpnResponse) Descriptor() ([]byte, []int)
Deprecated: Use StartVpnResponse.ProtoReflect.Descriptor instead.
func (*StartVpnResponse) GetError ¶
func (x *StartVpnResponse) GetError() *Error
func (*StartVpnResponse) GetVpn ¶
func (x *StartVpnResponse) GetVpn() *StartVpnOutDto
func (*StartVpnResponse) ProtoMessage ¶
func (*StartVpnResponse) ProtoMessage()
func (*StartVpnResponse) ProtoReflect ¶
func (x *StartVpnResponse) ProtoReflect() protoreflect.Message
func (*StartVpnResponse) Reset ¶
func (x *StartVpnResponse) Reset()
func (*StartVpnResponse) String ¶
func (x *StartVpnResponse) String() string
type Timestamp ¶
type Timestamp struct {
IsSet bool `protobuf:"varint,1,opt,name=isSet,proto3" json:"isSet,omitempty"`
Seconds int64 `protobuf:"varint,2,opt,name=seconds,proto3" json:"seconds,omitempty"`
Nanos int32 `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"`
// contains filtered or unexported fields
}
func ToProtoTimestamp ¶
func (*Timestamp) Descriptor
deprecated
func (*Timestamp) GetSeconds ¶
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
func (*Timestamp) ProtoReflect ¶
func (x *Timestamp) ProtoReflect() protoreflect.Message
type UnimplementedZeropsVpnProtocolServer ¶
type UnimplementedZeropsVpnProtocolServer struct {
}
UnimplementedZeropsVpnProtocolServer can be embedded to have forward compatible implementations.
func (*UnimplementedZeropsVpnProtocolServer) ProlongVpn ¶
func (*UnimplementedZeropsVpnProtocolServer) ProlongVpn(context.Context, *ProlongVpnRequest) (*ProlongVpnResponse, error)
func (*UnimplementedZeropsVpnProtocolServer) StartVpn ¶
func (*UnimplementedZeropsVpnProtocolServer) StartVpn(context.Context, *StartVpnRequest) (*StartVpnResponse, error)
type ZeropsVpnProtocolClient ¶
type ZeropsVpnProtocolClient interface {
StartVpn(ctx context.Context, in *StartVpnRequest, opts ...grpc.CallOption) (*StartVpnResponse, error)
ProlongVpn(ctx context.Context, in *ProlongVpnRequest, opts ...grpc.CallOption) (*ProlongVpnResponse, error)
}
ZeropsVpnProtocolClient is the client API for ZeropsVpnProtocol service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func CreateClient ¶
func CreateClient(ctx context.Context, targetAddress string) (_ ZeropsVpnProtocolClient, closeFunc func(), _ error)
func NewZeropsVpnProtocolClient ¶
func NewZeropsVpnProtocolClient(cc grpc.ClientConnInterface) ZeropsVpnProtocolClient
type ZeropsVpnProtocolServer ¶
type ZeropsVpnProtocolServer interface {
StartVpn(context.Context, *StartVpnRequest) (*StartVpnResponse, error)
ProlongVpn(context.Context, *ProlongVpnRequest) (*ProlongVpnResponse, error)
}
ZeropsVpnProtocolServer is the server API for ZeropsVpnProtocol service.