Documentation ¶
Index ¶
- Variables
- func NewHelloEndpoints() []*api.Endpoint
- 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)deprecated
- func (x *GreetRequest) GetName() string
- func (m *GreetRequest) MarshalJSON() ([]byte, error)
- func (*GreetRequest) ProtoMessage()
- func (x *GreetRequest) ProtoReflect() protoreflect.Message
- func (x *GreetRequest) Reset()
- func (x *GreetRequest) String() string
- func (m *GreetRequest) UnmarshalJSON(b []byte) error
- type GreetResponse
- func (*GreetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GreetResponse) GetErr() string
- func (x *GreetResponse) GetMessage() string
- func (m *GreetResponse) MarshalJSON() ([]byte, error)
- func (*GreetResponse) ProtoMessage()
- func (x *GreetResponse) ProtoReflect() protoreflect.Message
- func (x *GreetResponse) Reset()
- func (x *GreetResponse) String() string
- func (m *GreetResponse) UnmarshalJSON(b []byte) error
- type HelloHandler
- type HelloService
Constants ¶
This section is empty.
Variables ¶
var File_hello_proto protoreflect.FileDescriptor
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 NewHelloEndpoints ¶
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"` // contains filtered or unexported fields }
func (*GreetRequest) Descriptor
deprecated
func (*GreetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GreetRequest.ProtoReflect.Descriptor instead.
func (*GreetRequest) GetName ¶
func (x *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) ProtoReflect ¶
func (x *GreetRequest) ProtoReflect() protoreflect.Message
func (*GreetRequest) Reset ¶
func (x *GreetRequest) Reset()
func (*GreetRequest) String ¶
func (x *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.
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"` // contains filtered or unexported fields }
func (*GreetResponse) Descriptor
deprecated
func (*GreetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GreetResponse.ProtoReflect.Descriptor instead.
func (*GreetResponse) GetErr ¶
func (x *GreetResponse) GetErr() string
func (*GreetResponse) GetMessage ¶
func (x *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) ProtoReflect ¶
func (x *GreetResponse) ProtoReflect() protoreflect.Message
func (*GreetResponse) Reset ¶
func (x *GreetResponse) Reset()
func (*GreetResponse) String ¶
func (x *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.
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