Documentation
¶
Index ¶
- Variables
- func RegisterBackupServer(s grpc.ServiceRegistrar, srv BackupServer)
- type BackupClient
- type BackupServer
- type Client
- type QueryType
- type RetrieveReply
- func (*RetrieveReply) Descriptor() ([]byte, []int)deprecated
- func (x *RetrieveReply) GetAddress() string
- func (x *RetrieveReply) GetArea() string
- func (x *RetrieveReply) GetCreateTime() int64
- func (x *RetrieveReply) GetEmail() string
- func (x *RetrieveReply) GetMnemonic() string
- func (x *RetrieveReply) GetPhone() string
- func (x *RetrieveReply) GetPrivateKey() string
- func (x *RetrieveReply) GetUpdateTime() int64
- func (*RetrieveReply) ProtoMessage()
- func (x *RetrieveReply) ProtoReflect() protoreflect.Message
- func (x *RetrieveReply) Reset()
- func (x *RetrieveReply) String() string
- type RetrieveReq
- type UnimplementedBackupServer
- type UnsafeBackupServer
Constants ¶
This section is empty.
Variables ¶
var ( QueryType_name = map[int32]string{ 0: "Phone", 1: "Email", 2: "Address", } QueryType_value = map[string]int32{ "Phone": 0, "Email": 1, "Address": 2, } )
Enum value maps for QueryType.
var Backup_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dtalk.backup.Backup", HandlerType: (*BackupServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Retrieve", Handler: _Backup_Retrieve_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api.proto", }
Backup_ServiceDesc is the grpc.ServiceDesc for Backup service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBackupServer ¶
func RegisterBackupServer(s grpc.ServiceRegistrar, srv BackupServer)
Types ¶
type BackupClient ¶
type BackupClient interface {
Retrieve(ctx context.Context, in *RetrieveReq, opts ...grpc.CallOption) (*RetrieveReply, error)
}
BackupClient is the client API for Backup 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 NewBackupClient ¶
func NewBackupClient(cc grpc.ClientConnInterface) BackupClient
type BackupServer ¶
type BackupServer interface { Retrieve(context.Context, *RetrieveReq) (*RetrieveReply, error) // contains filtered or unexported methods }
BackupServer is the server API for Backup service. All implementations must embed UnimplementedBackupServer for forward compatibility
type QueryType ¶
type QueryType int32
func (QueryType) Descriptor ¶
func (QueryType) Descriptor() protoreflect.EnumDescriptor
func (QueryType) EnumDescriptor
deprecated
func (QueryType) Number ¶
func (x QueryType) Number() protoreflect.EnumNumber
func (QueryType) Type ¶
func (QueryType) Type() protoreflect.EnumType
type RetrieveReply ¶
type RetrieveReply struct { Address string `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` Area string `protobuf:"bytes,2,opt,name=Area,proto3" json:"Area,omitempty"` Phone string `protobuf:"bytes,3,opt,name=Phone,proto3" json:"Phone,omitempty"` Email string `protobuf:"bytes,4,opt,name=Email,proto3" json:"Email,omitempty"` Mnemonic string `protobuf:"bytes,5,opt,name=Mnemonic,proto3" json:"Mnemonic,omitempty"` PrivateKey string `protobuf:"bytes,6,opt,name=PrivateKey,proto3" json:"PrivateKey,omitempty"` UpdateTime int64 `protobuf:"varint,7,opt,name=UpdateTime,proto3" json:"UpdateTime,omitempty"` CreateTime int64 `protobuf:"varint,8,opt,name=CreateTime,proto3" json:"CreateTime,omitempty"` // contains filtered or unexported fields }
func (*RetrieveReply) Descriptor
deprecated
func (*RetrieveReply) Descriptor() ([]byte, []int)
Deprecated: Use RetrieveReply.ProtoReflect.Descriptor instead.
func (*RetrieveReply) GetAddress ¶
func (x *RetrieveReply) GetAddress() string
func (*RetrieveReply) GetArea ¶
func (x *RetrieveReply) GetArea() string
func (*RetrieveReply) GetCreateTime ¶
func (x *RetrieveReply) GetCreateTime() int64
func (*RetrieveReply) GetEmail ¶
func (x *RetrieveReply) GetEmail() string
func (*RetrieveReply) GetMnemonic ¶
func (x *RetrieveReply) GetMnemonic() string
func (*RetrieveReply) GetPhone ¶
func (x *RetrieveReply) GetPhone() string
func (*RetrieveReply) GetPrivateKey ¶
func (x *RetrieveReply) GetPrivateKey() string
func (*RetrieveReply) GetUpdateTime ¶
func (x *RetrieveReply) GetUpdateTime() int64
func (*RetrieveReply) ProtoMessage ¶
func (*RetrieveReply) ProtoMessage()
func (*RetrieveReply) ProtoReflect ¶
func (x *RetrieveReply) ProtoReflect() protoreflect.Message
func (*RetrieveReply) Reset ¶
func (x *RetrieveReply) Reset()
func (*RetrieveReply) String ¶
func (x *RetrieveReply) String() string
type RetrieveReq ¶
type RetrieveReq struct { Type QueryType `protobuf:"varint,1,opt,name=type,proto3,enum=dtalk.backup.QueryType" json:"type,omitempty"` Val string `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"` // contains filtered or unexported fields }
func (*RetrieveReq) Descriptor
deprecated
func (*RetrieveReq) Descriptor() ([]byte, []int)
Deprecated: Use RetrieveReq.ProtoReflect.Descriptor instead.
func (*RetrieveReq) GetType ¶
func (x *RetrieveReq) GetType() QueryType
func (*RetrieveReq) GetVal ¶
func (x *RetrieveReq) GetVal() string
func (*RetrieveReq) ProtoMessage ¶
func (*RetrieveReq) ProtoMessage()
func (*RetrieveReq) ProtoReflect ¶
func (x *RetrieveReq) ProtoReflect() protoreflect.Message
func (*RetrieveReq) Reset ¶
func (x *RetrieveReq) Reset()
func (*RetrieveReq) String ¶
func (x *RetrieveReq) String() string
type UnimplementedBackupServer ¶
type UnimplementedBackupServer struct { }
UnimplementedBackupServer must be embedded to have forward compatible implementations.
func (UnimplementedBackupServer) Retrieve ¶
func (UnimplementedBackupServer) Retrieve(context.Context, *RetrieveReq) (*RetrieveReply, error)
type UnsafeBackupServer ¶
type UnsafeBackupServer interface {
// contains filtered or unexported methods
}
UnsafeBackupServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BackupServer will result in compilation errors.