Documentation ¶
Index ¶
- Variables
- func RegisterHelloHandler(s server.Server, hdlr HelloHandler, opts ...server.HandlerOption) error
- func RegisterHelloWeb(r chi.Router, i HelloHandler, middlewares ...func(http.Handler) http.Handler)
- type GreetRequest
- func (*GreetRequest) Descriptor() ([]byte, []int)
- func (m *GreetRequest) GetName() string
- func (m *GreetRequest) MarshalJSON() ([]byte, error)
- func (*GreetRequest) ProtoMessage()
- func (m *GreetRequest) Reset()
- func (m *GreetRequest) String() string
- func (m *GreetRequest) UnmarshalJSON(b []byte) error
- func (m *GreetRequest) XXX_DiscardUnknown()
- func (m *GreetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GreetRequest) XXX_Merge(src proto.Message)
- func (m *GreetRequest) XXX_Size() int
- func (m *GreetRequest) XXX_Unmarshal(b []byte) error
- type GreetResponse
- func (*GreetResponse) Descriptor() ([]byte, []int)
- func (m *GreetResponse) GetErr() string
- func (m *GreetResponse) GetMessage() string
- func (m *GreetResponse) MarshalJSON() ([]byte, error)
- func (*GreetResponse) ProtoMessage()
- func (m *GreetResponse) Reset()
- func (m *GreetResponse) String() string
- func (m *GreetResponse) UnmarshalJSON(b []byte) error
- func (m *GreetResponse) XXX_DiscardUnknown()
- func (m *GreetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GreetResponse) XXX_Merge(src proto.Message)
- func (m *GreetResponse) XXX_Size() int
- func (m *GreetResponse) XXX_Unmarshal(b []byte) error
- type HelloHandler
- type HelloService
Constants ¶
This section is empty.
Variables ¶
var GreetRequestJSONMarshaler = new(jsonpb.Marshaler)
GreetRequestJSONMarshaler describes the default jsonpb.Marshaler used by all instances of GreetRequest. This struct is safe to replace or modify but should not be done so concurrently.
var GreetRequestJSONUnmarshaler = new(jsonpb.Unmarshaler)
GreetRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all instances of GreetRequest. This struct is safe to replace or modify but should not be done so concurrently.
var GreetResponseJSONMarshaler = new(jsonpb.Marshaler)
GreetResponseJSONMarshaler describes the default jsonpb.Marshaler used by all instances of GreetResponse. This struct is safe to replace or modify but should not be done so concurrently.
var GreetResponseJSONUnmarshaler = new(jsonpb.Unmarshaler)
GreetResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all instances of GreetResponse. This struct is safe to replace or modify but should not be done so concurrently.
Functions ¶
func RegisterHelloHandler ¶
func RegisterHelloHandler(s server.Server, hdlr HelloHandler, opts ...server.HandlerOption) error
func RegisterHelloWeb ¶
Types ¶
type GreetRequest ¶
type GreetRequest 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 (*GreetRequest) Descriptor ¶
func (*GreetRequest) Descriptor() ([]byte, []int)
func (*GreetRequest) GetName ¶
func (m *GreetRequest) GetName() string
func (*GreetRequest) MarshalJSON ¶
func (m *GreetRequest) MarshalJSON() ([]byte, error)
MarshalJSON satisfies the encoding/json Marshaler interface. This method uses the more correct jsonpb package to correctly marshal the message.
func (*GreetRequest) ProtoMessage ¶
func (*GreetRequest) ProtoMessage()
func (*GreetRequest) Reset ¶
func (m *GreetRequest) Reset()
func (*GreetRequest) String ¶
func (m *GreetRequest) String() string
func (*GreetRequest) UnmarshalJSON ¶
func (m *GreetRequest) 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 (*GreetRequest) XXX_DiscardUnknown ¶
func (m *GreetRequest) XXX_DiscardUnknown()
func (*GreetRequest) XXX_Marshal ¶
func (m *GreetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GreetRequest) XXX_Merge ¶
func (m *GreetRequest) XXX_Merge(src proto.Message)
func (*GreetRequest) XXX_Size ¶
func (m *GreetRequest) XXX_Size() int
func (*GreetRequest) XXX_Unmarshal ¶
func (m *GreetRequest) XXX_Unmarshal(b []byte) error
type GreetResponse ¶
type GreetResponse 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 (*GreetResponse) Descriptor ¶
func (*GreetResponse) Descriptor() ([]byte, []int)
func (*GreetResponse) GetErr ¶
func (m *GreetResponse) GetErr() string
func (*GreetResponse) GetMessage ¶
func (m *GreetResponse) GetMessage() string
func (*GreetResponse) MarshalJSON ¶
func (m *GreetResponse) MarshalJSON() ([]byte, error)
MarshalJSON satisfies the encoding/json Marshaler interface. This method uses the more correct jsonpb package to correctly marshal the message.
func (*GreetResponse) ProtoMessage ¶
func (*GreetResponse) ProtoMessage()
func (*GreetResponse) Reset ¶
func (m *GreetResponse) Reset()
func (*GreetResponse) String ¶
func (m *GreetResponse) String() string
func (*GreetResponse) UnmarshalJSON ¶
func (m *GreetResponse) 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 (*GreetResponse) XXX_DiscardUnknown ¶
func (m *GreetResponse) XXX_DiscardUnknown()
func (*GreetResponse) XXX_Marshal ¶
func (m *GreetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GreetResponse) XXX_Merge ¶
func (m *GreetResponse) XXX_Merge(src proto.Message)
func (*GreetResponse) XXX_Size ¶
func (m *GreetResponse) XXX_Size() int
func (*GreetResponse) XXX_Unmarshal ¶
func (m *GreetResponse) XXX_Unmarshal(b []byte) error
type HelloHandler ¶
type HelloHandler interface {
Greet(context.Context, *GreetRequest, *GreetResponse) error
}
type HelloService ¶
type HelloService interface {
Greet(ctx context.Context, in *GreetRequest, opts ...client.CallOption) (*GreetResponse, error)
}
func NewHelloService ¶
func NewHelloService(name string, c client.Client) HelloService