Documentation ¶
Index ¶
- Variables
- func RegisterGreeterHandler(s server.Server, hdlr GreeterHandler, opts ...server.HandlerOption) error
- func RegisterGreeterWeb(r chi.Router, i GreeterHandler, middlewares ...func(http.Handler) http.Handler)
- type GreeterHandler
- type GreeterService
- type SayRequest
- func (*SayRequest) Descriptor() ([]byte, []int)
- func (m *SayRequest) GetName() string
- func (m *SayRequest) MarshalJSON() ([]byte, error)
- func (*SayRequest) ProtoMessage()
- func (m *SayRequest) Reset()
- func (m *SayRequest) String() string
- func (m *SayRequest) UnmarshalJSON(b []byte) error
- func (m *SayRequest) XXX_DiscardUnknown()
- func (m *SayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SayRequest) XXX_Merge(src proto.Message)
- func (m *SayRequest) XXX_Size() int
- func (m *SayRequest) XXX_Unmarshal(b []byte) error
- type SayResponse
- func (*SayResponse) Descriptor() ([]byte, []int)
- func (m *SayResponse) GetErr() string
- func (m *SayResponse) GetMessage() string
- func (m *SayResponse) MarshalJSON() ([]byte, error)
- func (*SayResponse) ProtoMessage()
- func (m *SayResponse) Reset()
- func (m *SayResponse) String() string
- func (m *SayResponse) UnmarshalJSON(b []byte) error
- func (m *SayResponse) XXX_DiscardUnknown()
- func (m *SayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SayResponse) XXX_Merge(src proto.Message)
- func (m *SayResponse) XXX_Size() int
- func (m *SayResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var SayRequestJSONMarshaler = new(jsonpb.Marshaler)
SayRequestJSONMarshaler describes the default jsonpb.Marshaler used by all instances of SayRequest. This struct is safe to replace or modify but should not be done so concurrently.
var SayRequestJSONUnmarshaler = new(jsonpb.Unmarshaler)
SayRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all instances of SayRequest. This struct is safe to replace or modify but should not be done so concurrently.
var SayResponseJSONMarshaler = new(jsonpb.Marshaler)
SayResponseJSONMarshaler describes the default jsonpb.Marshaler used by all instances of SayResponse. This struct is safe to replace or modify but should not be done so concurrently.
var SayResponseJSONUnmarshaler = new(jsonpb.Unmarshaler)
SayResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all instances of SayResponse. This struct is safe to replace or modify but should not be done so concurrently.
Functions ¶
func RegisterGreeterHandler ¶
func RegisterGreeterHandler(s server.Server, hdlr GreeterHandler, opts ...server.HandlerOption) error
func RegisterGreeterWeb ¶
func RegisterGreeterWeb(r chi.Router, i GreeterHandler, middlewares ...func(http.Handler) http.Handler)
Types ¶
type GreeterHandler ¶
type GreeterHandler interface { Say(context.Context, *SayRequest, *SayResponse) error SayAnything(context.Context, *empty.Empty, *SayResponse) error }
type GreeterService ¶
type GreeterService interface { Say(ctx context.Context, in *SayRequest, opts ...client.CallOption) (*SayResponse, error) SayAnything(ctx context.Context, in *empty.Empty, opts ...client.CallOption) (*SayResponse, error) }
func NewGreeterService ¶
func NewGreeterService(name string, c client.Client) GreeterService
type SayRequest ¶
type SayRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SayRequest) Descriptor ¶
func (*SayRequest) Descriptor() ([]byte, []int)
func (*SayRequest) GetName ¶
func (m *SayRequest) GetName() string
func (*SayRequest) MarshalJSON ¶
func (m *SayRequest) MarshalJSON() ([]byte, error)
MarshalJSON satisfies the encoding/json Marshaler interface. This method uses the more correct jsonpb package to correctly marshal the message.
func (*SayRequest) ProtoMessage ¶
func (*SayRequest) ProtoMessage()
func (*SayRequest) Reset ¶
func (m *SayRequest) Reset()
func (*SayRequest) String ¶
func (m *SayRequest) String() string
func (*SayRequest) UnmarshalJSON ¶
func (m *SayRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method uses the more correct jsonpb package to correctly unmarshal the message.
func (*SayRequest) XXX_DiscardUnknown ¶
func (m *SayRequest) XXX_DiscardUnknown()
func (*SayRequest) XXX_Marshal ¶
func (m *SayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SayRequest) XXX_Merge ¶
func (m *SayRequest) XXX_Merge(src proto.Message)
func (*SayRequest) XXX_Size ¶
func (m *SayRequest) XXX_Size() int
func (*SayRequest) XXX_Unmarshal ¶
func (m *SayRequest) XXX_Unmarshal(b []byte) error
type SayResponse ¶
type SayResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SayResponse) Descriptor ¶
func (*SayResponse) Descriptor() ([]byte, []int)
func (*SayResponse) GetErr ¶
func (m *SayResponse) GetErr() string
func (*SayResponse) GetMessage ¶
func (m *SayResponse) GetMessage() string
func (*SayResponse) MarshalJSON ¶
func (m *SayResponse) MarshalJSON() ([]byte, error)
MarshalJSON satisfies the encoding/json Marshaler interface. This method uses the more correct jsonpb package to correctly marshal the message.
func (*SayResponse) ProtoMessage ¶
func (*SayResponse) ProtoMessage()
func (*SayResponse) Reset ¶
func (m *SayResponse) Reset()
func (*SayResponse) String ¶
func (m *SayResponse) String() string
func (*SayResponse) UnmarshalJSON ¶
func (m *SayResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method uses the more correct jsonpb package to correctly unmarshal the message.
func (*SayResponse) XXX_DiscardUnknown ¶
func (m *SayResponse) XXX_DiscardUnknown()
func (*SayResponse) XXX_Marshal ¶
func (m *SayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SayResponse) XXX_Merge ¶
func (m *SayResponse) XXX_Merge(src proto.Message)
func (*SayResponse) XXX_Size ¶
func (m *SayResponse) XXX_Size() int
func (*SayResponse) XXX_Unmarshal ¶
func (m *SayResponse) XXX_Unmarshal(b []byte) error