proto

package
v0.0.0-...-d4becda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_hello_proto protoreflect.FileDescriptor
View Source
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.

View Source
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.

View Source
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.

View Source
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 NewHelloEndpoints() []*api.Endpoint

func RegisterHelloHandler

func RegisterHelloHandler(s server.Server, hdlr HelloHandler, opts ...server.HandlerOption) error

func RegisterHelloWeb

func RegisterHelloWeb(r chi.Router, i HelloHandler, middlewares ...func(http.Handler) http.Handler)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL