Documentation
¶
Index ¶
- Variables
- func RegisterTranslationServer(s grpc.ServiceRegistrar, srv TranslationServer)
- type GetHistoryRequest
- type GetHistoryResponse
- func (*GetHistoryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetHistoryResponse) GetHistory() []*TranslationHistory
- func (*GetHistoryResponse) ProtoMessage()
- func (x *GetHistoryResponse) ProtoReflect() protoreflect.Message
- func (x *GetHistoryResponse) Reset()
- func (x *GetHistoryResponse) String() string
- type TranslationClient
- type TranslationHistory
- func (*TranslationHistory) Descriptor() ([]byte, []int)deprecated
- func (x *TranslationHistory) GetDestination() string
- func (x *TranslationHistory) GetOriginal() string
- func (x *TranslationHistory) GetSource() string
- func (x *TranslationHistory) GetTranslation() string
- func (*TranslationHistory) ProtoMessage()
- func (x *TranslationHistory) ProtoReflect() protoreflect.Message
- func (x *TranslationHistory) Reset()
- func (x *TranslationHistory) String() string
- type TranslationServer
- type UnimplementedTranslationServer
- type UnsafeTranslationServer
Constants ¶
This section is empty.
Variables ¶
var File_docs_proto_v1_translation_history_proto protoreflect.FileDescriptor
var Translation_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.v1.Translation", HandlerType: (*TranslationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetHistory", Handler: _Translation_GetHistory_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "docs/proto/v1/translation.history.proto", }
Translation_ServiceDesc is the grpc.ServiceDesc for Translation service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTranslationServer ¶
func RegisterTranslationServer(s grpc.ServiceRegistrar, srv TranslationServer)
Types ¶
type GetHistoryRequest ¶
type GetHistoryRequest struct {
// contains filtered or unexported fields
}
Request message for GetHistory.
func (*GetHistoryRequest) Descriptor
deprecated
func (*GetHistoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetHistoryRequest.ProtoReflect.Descriptor instead.
func (*GetHistoryRequest) ProtoMessage ¶
func (*GetHistoryRequest) ProtoMessage()
func (*GetHistoryRequest) ProtoReflect ¶
func (x *GetHistoryRequest) ProtoReflect() protoreflect.Message
func (*GetHistoryRequest) Reset ¶
func (x *GetHistoryRequest) Reset()
func (*GetHistoryRequest) String ¶
func (x *GetHistoryRequest) String() string
type GetHistoryResponse ¶
type GetHistoryResponse struct {
History []*TranslationHistory `protobuf:"bytes,1,rep,name=history,proto3" json:"history,omitempty"`
// contains filtered or unexported fields
}
Response message for GetHistory.
func (*GetHistoryResponse) Descriptor
deprecated
func (*GetHistoryResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetHistoryResponse.ProtoReflect.Descriptor instead.
func (*GetHistoryResponse) GetHistory ¶
func (x *GetHistoryResponse) GetHistory() []*TranslationHistory
func (*GetHistoryResponse) ProtoMessage ¶
func (*GetHistoryResponse) ProtoMessage()
func (*GetHistoryResponse) ProtoReflect ¶
func (x *GetHistoryResponse) ProtoReflect() protoreflect.Message
func (*GetHistoryResponse) Reset ¶
func (x *GetHistoryResponse) Reset()
func (*GetHistoryResponse) String ¶
func (x *GetHistoryResponse) String() string
type TranslationClient ¶
type TranslationClient interface {
// RPC method to get translation history.
GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc.CallOption) (*GetHistoryResponse, error)
}
TranslationClient is the client API for Translation 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 NewTranslationClient ¶
func NewTranslationClient(cc grpc.ClientConnInterface) TranslationClient
type TranslationHistory ¶
type TranslationHistory struct {
Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
Original string `protobuf:"bytes,3,opt,name=original,proto3" json:"original,omitempty"`
Translation string `protobuf:"bytes,4,opt,name=translation,proto3" json:"translation,omitempty"`
// contains filtered or unexported fields
}
Translation message structure.
func (*TranslationHistory) Descriptor
deprecated
func (*TranslationHistory) Descriptor() ([]byte, []int)
Deprecated: Use TranslationHistory.ProtoReflect.Descriptor instead.
func (*TranslationHistory) GetDestination ¶
func (x *TranslationHistory) GetDestination() string
func (*TranslationHistory) GetOriginal ¶
func (x *TranslationHistory) GetOriginal() string
func (*TranslationHistory) GetSource ¶
func (x *TranslationHistory) GetSource() string
func (*TranslationHistory) GetTranslation ¶
func (x *TranslationHistory) GetTranslation() string
func (*TranslationHistory) ProtoMessage ¶
func (*TranslationHistory) ProtoMessage()
func (*TranslationHistory) ProtoReflect ¶
func (x *TranslationHistory) ProtoReflect() protoreflect.Message
func (*TranslationHistory) Reset ¶
func (x *TranslationHistory) Reset()
func (*TranslationHistory) String ¶
func (x *TranslationHistory) String() string
type TranslationServer ¶
type TranslationServer interface {
// RPC method to get translation history.
GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error)
// contains filtered or unexported methods
}
TranslationServer is the server API for Translation service. All implementations must embed UnimplementedTranslationServer for forward compatibility
type UnimplementedTranslationServer ¶
type UnimplementedTranslationServer struct {
}
UnimplementedTranslationServer must be embedded to have forward compatible implementations.
func (UnimplementedTranslationServer) GetHistory ¶
func (UnimplementedTranslationServer) GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error)
type UnsafeTranslationServer ¶
type UnsafeTranslationServer interface {
// contains filtered or unexported methods
}
UnsafeTranslationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TranslationServer will result in compilation errors.