v1

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Translation_GetHistory_FullMethodName = "/grpc.v1.Translation/GetHistory"
)

Variables

View Source
var File_docs_proto_v1_translation_history_proto protoreflect.FileDescriptor
View Source
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.

The Translation service definition.

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.

The Translation service definition.

type UnimplementedTranslationServer

type UnimplementedTranslationServer struct{}

UnimplementedTranslationServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedTranslationServer) GetHistory

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.

Jump to

Keyboard shortcuts

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