Documentation ¶
Index ¶
- Variables
- func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
- type DefaultJSONMarshaller
- type Encoder
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetResponse) GetField1() int32
- func (x *GetResponse) GetField2() string
- func (x *GetResponse) GetField3() *Message1
- func (x *GetResponse) GetField4() *Message2
- func (x *GetResponse) GetField5() []*Message3
- func (x *GetResponse) GetField6() *Message4
- func (x *GetResponse) GetField7() map[string]bool
- func (x *GetResponse) GetField8() bool
- func (*GetResponse) ProtoMessage()
- func (x *GetResponse) ProtoReflect() protoreflect.Message
- func (x *GetResponse) Reset()
- func (x *GetResponse) String() string
- type Marshaller
- type Message1
- type Message2
- type Message3
- type Message4
- type Options
- type SensitiveMessageOptions
- type TestClient
- type TestServer
- type UnimplementedTestServer
- type UnsafeTestServer
Constants ¶
This section is empty.
Variables ¶
var (
// optional bool sensitive_message = 50001;
E_SensitiveMessage = &file_encoder_proto_extTypes[0]
)
Extension fields to descriptorpb.FieldOptions.
var File_encoder_proto protoreflect.FileDescriptor
var Test_ServiceDesc = grpc.ServiceDesc{ ServiceName: "com.Mahes2.encoder.Test", HandlerType: (*TestServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Test_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "encoder.proto", }
Test_ServiceDesc is the grpc.ServiceDesc for Test service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTestServer ¶
func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
Types ¶
type DefaultJSONMarshaller ¶
type DefaultJSONMarshaller struct{}
func (DefaultJSONMarshaller) Marshal ¶
func (DefaultJSONMarshaller) Marshal(v interface{}) ([]byte, error)
type Encoder ¶
type Encoder struct { Options // contains filtered or unexported fields }
func Init ¶
func Init(o Options, m Marshaller) Encoder
type GetResponse ¶
type GetResponse struct { Field1 int32 `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"` Field2 string `protobuf:"bytes,2,opt,name=field2,proto3" json:"field2,omitempty"` Field3 *Message1 `protobuf:"bytes,3,opt,name=field3,proto3" json:"field3,omitempty"` Field4 *Message2 `protobuf:"bytes,4,opt,name=field4,proto3" json:"field4,omitempty"` Field5 []*Message3 `protobuf:"bytes,5,rep,name=field5,proto3" json:"field5,omitempty"` Field6 *Message4 `protobuf:"bytes,6,opt,name=field6,proto3" json:"field6,omitempty"` Field7 map[string]bool `` /* 154-byte string literal not displayed */ Field8 bool `protobuf:"varint,8,opt,name=field8,proto3" json:"field8,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetField1 ¶
func (x *GetResponse) GetField1() int32
func (*GetResponse) GetField2 ¶
func (x *GetResponse) GetField2() string
func (*GetResponse) GetField3 ¶
func (x *GetResponse) GetField3() *Message1
func (*GetResponse) GetField4 ¶
func (x *GetResponse) GetField4() *Message2
func (*GetResponse) GetField5 ¶
func (x *GetResponse) GetField5() []*Message3
func (*GetResponse) GetField6 ¶
func (x *GetResponse) GetField6() *Message4
func (*GetResponse) GetField7 ¶
func (x *GetResponse) GetField7() map[string]bool
func (*GetResponse) GetField8 ¶
func (x *GetResponse) GetField8() bool
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type Marshaller ¶
type Message1 ¶
type Message1 struct { Field1 int32 `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"` Field2 string `protobuf:"bytes,2,opt,name=field2,proto3" json:"field2,omitempty"` // contains filtered or unexported fields }
func (*Message1) Descriptor
deprecated
func (*Message1) ProtoMessage ¶
func (*Message1) ProtoMessage()
func (*Message1) ProtoReflect ¶
func (x *Message1) ProtoReflect() protoreflect.Message
type Message2 ¶
type Message2 struct { Field1 bool `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"` Field2 string `protobuf:"bytes,2,opt,name=field2,proto3" json:"field2,omitempty"` // contains filtered or unexported fields }
func (*Message2) Descriptor
deprecated
func (*Message2) ProtoMessage ¶
func (*Message2) ProtoMessage()
func (*Message2) ProtoReflect ¶
func (x *Message2) ProtoReflect() protoreflect.Message
type Message3 ¶
type Message3 struct { Field1 int32 `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"` Field2 []string `protobuf:"bytes,2,rep,name=field2,proto3" json:"field2,omitempty"` // contains filtered or unexported fields }
func (*Message3) Descriptor
deprecated
func (*Message3) ProtoMessage ¶
func (*Message3) ProtoMessage()
func (*Message3) ProtoReflect ¶
func (x *Message3) ProtoReflect() protoreflect.Message
type Message4 ¶
type Message4 struct { Field1 []*Message2 `protobuf:"bytes,1,rep,name=field1,proto3" json:"field1,omitempty"` // contains filtered or unexported fields }
func (*Message4) Descriptor
deprecated
func (*Message4) ProtoMessage ¶
func (*Message4) ProtoMessage()
func (*Message4) ProtoReflect ¶
func (x *Message4) ProtoReflect() protoreflect.Message
type Options ¶
type Options struct {
SensitiveMessageOptions
}
type SensitiveMessageOptions ¶
type SensitiveMessageOptions struct { HideSensitiveMessage bool Extension protoreflect.ExtensionType }
type TestClient ¶
type TestClient interface {
Get(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetResponse, error)
}
TestClient is the client API for Test 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 NewTestClient ¶
func NewTestClient(cc grpc.ClientConnInterface) TestClient
type TestServer ¶
type TestServer interface { Get(context.Context, *emptypb.Empty) (*GetResponse, error) // contains filtered or unexported methods }
TestServer is the server API for Test service. All implementations must embed UnimplementedTestServer for forward compatibility
type UnimplementedTestServer ¶
type UnimplementedTestServer struct { }
UnimplementedTestServer must be embedded to have forward compatible implementations.
func (UnimplementedTestServer) Get ¶
func (UnimplementedTestServer) Get(context.Context, *emptypb.Empty) (*GetResponse, error)
type UnsafeTestServer ¶
type UnsafeTestServer interface {
// contains filtered or unexported methods
}
UnsafeTestServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestServer will result in compilation errors.