Documentation ¶
Index ¶
- Variables
- func RegisterEchoServiceHTTPServer(s http1.ServiceRegistrar, srv EchoServiceHTTPServer)
- func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
- type Corpus
- type DynamicMessage
- func (*DynamicMessage) Descriptor() ([]byte, []int)deprecated
- func (x *DynamicMessage) GetStructField() *_struct.Struct
- func (x *DynamicMessage) GetValueField() *_struct.Value
- func (*DynamicMessage) ProtoMessage()
- func (x *DynamicMessage) ProtoReflect() protoreflect.Message
- func (x *DynamicMessage) Reset()
- func (x *DynamicMessage) String() string
- type DynamicMessageUpdate
- func (*DynamicMessageUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *DynamicMessageUpdate) GetBody() *DynamicMessage
- func (x *DynamicMessageUpdate) GetUpdateMask() *field_mask.FieldMask
- func (*DynamicMessageUpdate) ProtoMessage()
- func (x *DynamicMessageUpdate) ProtoReflect() protoreflect.Message
- func (x *DynamicMessageUpdate) Reset()
- func (x *DynamicMessageUpdate) String() string
- type EchoServiceClient
- type EchoServiceHTTPServer
- type EchoServiceServer
- type Embedded
- func (*Embedded) Descriptor() ([]byte, []int)deprecated
- func (m *Embedded) GetMark() isEmbedded_Mark
- func (x *Embedded) GetNote() string
- func (x *Embedded) GetProgress() int64
- func (*Embedded) ProtoMessage()
- func (x *Embedded) ProtoReflect() protoreflect.Message
- func (x *Embedded) Reset()
- func (x *Embedded) String() string
- type Embedded_Note
- type Embedded_Progress
- type SimpleMessage
- func (*SimpleMessage) Descriptor() ([]byte, []int)deprecated
- func (m *SimpleMessage) GetCode() isSimpleMessage_Code
- func (x *SimpleMessage) GetCorpus() Corpus
- func (x *SimpleMessage) GetEn() int64
- func (m *SimpleMessage) GetExt() isSimpleMessage_Ext
- func (x *SimpleMessage) GetId() string
- func (x *SimpleMessage) GetLang() string
- func (x *SimpleMessage) GetLineNum() int64
- func (x *SimpleMessage) GetNo() *Embedded
- func (x *SimpleMessage) GetNum() int64
- func (x *SimpleMessage) GetStatus() *Embedded
- func (*SimpleMessage) ProtoMessage()
- func (x *SimpleMessage) ProtoReflect() protoreflect.Message
- func (x *SimpleMessage) Reset()
- func (x *SimpleMessage) String() string
- type SimpleMessage_En
- type SimpleMessage_Lang
- type SimpleMessage_LineNum
- type SimpleMessage_No
- type UnimplementedEchoServiceServer
- func (UnimplementedEchoServiceServer) Echo(context.Context, *SimpleMessage) (*SimpleMessage, error)
- func (UnimplementedEchoServiceServer) EchoBody(context.Context, *SimpleMessage) (*SimpleMessage, error)
- func (UnimplementedEchoServiceServer) EchoDelete(context.Context, *SimpleMessage) (*SimpleMessage, error)
- func (UnimplementedEchoServiceServer) EchoPatch(context.Context, *DynamicMessageUpdate) (*DynamicMessageUpdate, error)
- type UnsafeEchoServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Corpus_name = map[int32]string{ 0: "UNIVERSAL", 1: "WEB", 2: "IMAGES", 3: "LOCAL", 4: "NEWS", 5: "PRODUCTS", 6: "VIDEO", } Corpus_value = map[string]int32{ "UNIVERSAL": 0, "WEB": 1, "IMAGES": 2, "LOCAL": 3, "NEWS": 4, "PRODUCTS": 5, "VIDEO": 6, } )
Enum value maps for Corpus.
var File_echo_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServiceHTTPServer ¶
func RegisterEchoServiceHTTPServer(s http1.ServiceRegistrar, srv EchoServiceHTTPServer)
func RegisterEchoServiceServer ¶
func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
Types ¶
type Corpus ¶
type Corpus int32
func (Corpus) Descriptor ¶
func (Corpus) Descriptor() protoreflect.EnumDescriptor
func (Corpus) EnumDescriptor
deprecated
func (Corpus) Number ¶
func (x Corpus) Number() protoreflect.EnumNumber
func (Corpus) Type ¶
func (Corpus) Type() protoreflect.EnumType
type DynamicMessage ¶
type DynamicMessage struct { StructField *_struct.Struct `protobuf:"bytes,1,opt,name=struct_field,json=structField,proto3" json:"struct_field,omitempty"` ValueField *_struct.Value `protobuf:"bytes,2,opt,name=value_field,json=valueField,proto3" json:"value_field,omitempty"` // contains filtered or unexported fields }
DynamicMessage represents a message which can have its structure built dynamically using Struct and Values.
func (*DynamicMessage) Descriptor
deprecated
func (*DynamicMessage) Descriptor() ([]byte, []int)
Deprecated: Use DynamicMessage.ProtoReflect.Descriptor instead.
func (*DynamicMessage) GetStructField ¶
func (x *DynamicMessage) GetStructField() *_struct.Struct
func (*DynamicMessage) GetValueField ¶
func (x *DynamicMessage) GetValueField() *_struct.Value
func (*DynamicMessage) ProtoMessage ¶
func (*DynamicMessage) ProtoMessage()
func (*DynamicMessage) ProtoReflect ¶
func (x *DynamicMessage) ProtoReflect() protoreflect.Message
func (*DynamicMessage) Reset ¶
func (x *DynamicMessage) Reset()
func (*DynamicMessage) String ¶
func (x *DynamicMessage) String() string
type DynamicMessageUpdate ¶
type DynamicMessageUpdate struct { Body *DynamicMessage `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` // contains filtered or unexported fields }
func (*DynamicMessageUpdate) Descriptor
deprecated
func (*DynamicMessageUpdate) Descriptor() ([]byte, []int)
Deprecated: Use DynamicMessageUpdate.ProtoReflect.Descriptor instead.
func (*DynamicMessageUpdate) GetBody ¶
func (x *DynamicMessageUpdate) GetBody() *DynamicMessage
func (*DynamicMessageUpdate) GetUpdateMask ¶
func (x *DynamicMessageUpdate) GetUpdateMask() *field_mask.FieldMask
func (*DynamicMessageUpdate) ProtoMessage ¶
func (*DynamicMessageUpdate) ProtoMessage()
func (*DynamicMessageUpdate) ProtoReflect ¶
func (x *DynamicMessageUpdate) ProtoReflect() protoreflect.Message
func (*DynamicMessageUpdate) Reset ¶
func (x *DynamicMessageUpdate) Reset()
func (*DynamicMessageUpdate) String ¶
func (x *DynamicMessageUpdate) String() string
type EchoServiceClient ¶
type EchoServiceClient interface { // Echo method receives a simple message and returns it. // // The message posted as the id parameter will also be // returned. Echo(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) // EchoBody method receives a simple message and returns it. EchoBody(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) // EchoDelete method receives a simple message and returns it. EchoDelete(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) // EchoPatch method receives a NonStandardUpdateRequest and returns it. EchoPatch(ctx context.Context, in *DynamicMessageUpdate, opts ...grpc.CallOption) (*DynamicMessageUpdate, error) }
EchoServiceClient is the client API for EchoService 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 NewEchoServiceClient ¶
func NewEchoServiceClient(cc grpc.ClientConnInterface) EchoServiceClient
type EchoServiceHTTPServer ¶
type EchoServiceHTTPServer interface { Echo(context.Context, *SimpleMessage) (*SimpleMessage, error) EchoBody(context.Context, *SimpleMessage) (*SimpleMessage, error) EchoDelete(context.Context, *SimpleMessage) (*SimpleMessage, error) EchoPatch(context.Context, *DynamicMessageUpdate) (*DynamicMessageUpdate, error) }
type EchoServiceServer ¶
type EchoServiceServer interface { // Echo method receives a simple message and returns it. // // The message posted as the id parameter will also be // returned. Echo(context.Context, *SimpleMessage) (*SimpleMessage, error) // EchoBody method receives a simple message and returns it. EchoBody(context.Context, *SimpleMessage) (*SimpleMessage, error) // EchoDelete method receives a simple message and returns it. EchoDelete(context.Context, *SimpleMessage) (*SimpleMessage, error) // EchoPatch method receives a NonStandardUpdateRequest and returns it. EchoPatch(context.Context, *DynamicMessageUpdate) (*DynamicMessageUpdate, error) // contains filtered or unexported methods }
EchoServiceServer is the server API for EchoService service. All implementations must embed UnimplementedEchoServiceServer for forward compatibility
type Embedded ¶
type Embedded struct { // Types that are assignable to Mark: // *Embedded_Progress // *Embedded_Note Mark isEmbedded_Mark `protobuf_oneof:"mark"` // contains filtered or unexported fields }
Embedded represents a message embedded in SimpleMessage.
func (*Embedded) Descriptor
deprecated
func (*Embedded) GetProgress ¶
func (*Embedded) ProtoMessage ¶
func (*Embedded) ProtoMessage()
func (*Embedded) ProtoReflect ¶
func (x *Embedded) ProtoReflect() protoreflect.Message
type Embedded_Note ¶
type Embedded_Note struct {
Note string `protobuf:"bytes,2,opt,name=note,proto3,oneof"`
}
type Embedded_Progress ¶
type Embedded_Progress struct {
Progress int64 `protobuf:"varint,1,opt,name=progress,proto3,oneof"`
}
type SimpleMessage ¶
type SimpleMessage struct { // Id represents the message identifier. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Num int64 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"` // Types that are assignable to Code: // *SimpleMessage_LineNum // *SimpleMessage_Lang Code isSimpleMessage_Code `protobuf_oneof:"code"` Status *Embedded `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` // Types that are assignable to Ext: // *SimpleMessage_En // *SimpleMessage_No Ext isSimpleMessage_Ext `protobuf_oneof:"ext"` Corpus Corpus `protobuf:"varint,8,opt,name=corpus,proto3,enum=testproto.Corpus" json:"corpus,omitempty"` // contains filtered or unexported fields }
SimpleMessage represents a simple message sent to the Echo service.
func (*SimpleMessage) Descriptor
deprecated
func (*SimpleMessage) Descriptor() ([]byte, []int)
Deprecated: Use SimpleMessage.ProtoReflect.Descriptor instead.
func (*SimpleMessage) GetCode ¶
func (m *SimpleMessage) GetCode() isSimpleMessage_Code
func (*SimpleMessage) GetCorpus ¶
func (x *SimpleMessage) GetCorpus() Corpus
func (*SimpleMessage) GetEn ¶
func (x *SimpleMessage) GetEn() int64
func (*SimpleMessage) GetExt ¶
func (m *SimpleMessage) GetExt() isSimpleMessage_Ext
func (*SimpleMessage) GetId ¶
func (x *SimpleMessage) GetId() string
func (*SimpleMessage) GetLang ¶
func (x *SimpleMessage) GetLang() string
func (*SimpleMessage) GetLineNum ¶
func (x *SimpleMessage) GetLineNum() int64
func (*SimpleMessage) GetNo ¶
func (x *SimpleMessage) GetNo() *Embedded
func (*SimpleMessage) GetNum ¶
func (x *SimpleMessage) GetNum() int64
func (*SimpleMessage) GetStatus ¶
func (x *SimpleMessage) GetStatus() *Embedded
func (*SimpleMessage) ProtoMessage ¶
func (*SimpleMessage) ProtoMessage()
func (*SimpleMessage) ProtoReflect ¶
func (x *SimpleMessage) ProtoReflect() protoreflect.Message
func (*SimpleMessage) Reset ¶
func (x *SimpleMessage) Reset()
func (*SimpleMessage) String ¶
func (x *SimpleMessage) String() string
type SimpleMessage_En ¶
type SimpleMessage_En struct {
En int64 `protobuf:"varint,6,opt,name=en,proto3,oneof"`
}
type SimpleMessage_Lang ¶
type SimpleMessage_Lang struct {
Lang string `protobuf:"bytes,4,opt,name=lang,proto3,oneof"`
}
type SimpleMessage_LineNum ¶
type SimpleMessage_LineNum struct {
LineNum int64 `protobuf:"varint,3,opt,name=line_num,json=lineNum,proto3,oneof"`
}
type SimpleMessage_No ¶
type SimpleMessage_No struct {
No *Embedded `protobuf:"bytes,7,opt,name=no,proto3,oneof"`
}
type UnimplementedEchoServiceServer ¶
type UnimplementedEchoServiceServer struct { }
UnimplementedEchoServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEchoServiceServer) Echo ¶
func (UnimplementedEchoServiceServer) Echo(context.Context, *SimpleMessage) (*SimpleMessage, error)
func (UnimplementedEchoServiceServer) EchoBody ¶
func (UnimplementedEchoServiceServer) EchoBody(context.Context, *SimpleMessage) (*SimpleMessage, error)
func (UnimplementedEchoServiceServer) EchoDelete ¶
func (UnimplementedEchoServiceServer) EchoDelete(context.Context, *SimpleMessage) (*SimpleMessage, error)
func (UnimplementedEchoServiceServer) EchoPatch ¶
func (UnimplementedEchoServiceServer) EchoPatch(context.Context, *DynamicMessageUpdate) (*DynamicMessageUpdate, error)
type UnsafeEchoServiceServer ¶
type UnsafeEchoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServiceServer will result in compilation errors.