Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCarHTTPServer(s *http.Server, srv CarHTTPServer)
- func RegisterCarServer(s grpc.ServiceRegistrar, srv CarServer)
- type CarClient
- type CarCreateResponse
- type CarHTTPClient
- type CarHTTPClientImpl
- type CarHTTPServer
- type CarQueryResponse
- func (*CarQueryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CarQueryResponse) GetData() []*structpb.Struct
- func (x *CarQueryResponse) GetMeta() *CarQueryResponseMeta
- func (*CarQueryResponse) ProtoMessage()
- func (x *CarQueryResponse) ProtoReflect() protoreflect.Message
- func (x *CarQueryResponse) Reset()
- func (x *CarQueryResponse) String() string
- type CarQueryResponseMeta
- func (*CarQueryResponseMeta) Descriptor() ([]byte, []int)deprecated
- func (x *CarQueryResponseMeta) GetCount() int64
- func (*CarQueryResponseMeta) ProtoMessage()
- func (x *CarQueryResponseMeta) ProtoReflect() protoreflect.Message
- func (x *CarQueryResponseMeta) Reset()
- func (x *CarQueryResponseMeta) String() string
- type CarServer
- type UnimplementedCarServer
- type UnsafeCarServer
Constants ¶
const OperationCarCreate = "/car.v1.Car/Create"
const OperationCarQuery = "/car.v1.Car/Query"
Variables ¶
var Car_ServiceDesc = grpc.ServiceDesc{ ServiceName: "car.v1.Car", HandlerType: (*CarServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Car_Create_Handler, }, { MethodName: "Query", Handler: _Car_Query_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "car/v1/car_gen.proto", }
Car_ServiceDesc is the grpc.ServiceDesc for Car service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_car_v1_car_gen_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCarHTTPServer ¶
func RegisterCarHTTPServer(s *http.Server, srv CarHTTPServer)
func RegisterCarServer ¶
func RegisterCarServer(s grpc.ServiceRegistrar, srv CarServer)
Types ¶
type CarClient ¶
type CarClient interface { Create(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*CarCreateResponse, error) Query(ctx context.Context, in *api.QueryRequest, opts ...grpc.CallOption) (*CarQueryResponse, error) }
CarClient is the client API for Car 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 NewCarClient ¶
func NewCarClient(cc grpc.ClientConnInterface) CarClient
type CarCreateResponse ¶
type CarCreateResponse struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CarCreateResponse) Descriptor
deprecated
func (*CarCreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CarCreateResponse.ProtoReflect.Descriptor instead.
func (*CarCreateResponse) GetId ¶
func (x *CarCreateResponse) GetId() int32
func (*CarCreateResponse) ProtoMessage ¶
func (*CarCreateResponse) ProtoMessage()
func (*CarCreateResponse) ProtoReflect ¶
func (x *CarCreateResponse) ProtoReflect() protoreflect.Message
func (*CarCreateResponse) Reset ¶
func (x *CarCreateResponse) Reset()
func (*CarCreateResponse) String ¶
func (x *CarCreateResponse) String() string
type CarHTTPClient ¶
type CarHTTPClient interface { Create(ctx context.Context, req *structpb.Struct, opts ...http.CallOption) (rsp *CarCreateResponse, err error) Query(ctx context.Context, req *api.QueryRequest, opts ...http.CallOption) (rsp *CarQueryResponse, err error) }
func NewCarHTTPClient ¶
func NewCarHTTPClient(client *http.Client) CarHTTPClient
type CarHTTPClientImpl ¶
type CarHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*CarHTTPClientImpl) Create ¶
func (c *CarHTTPClientImpl) Create(ctx context.Context, in *structpb.Struct, opts ...http.CallOption) (*CarCreateResponse, error)
func (*CarHTTPClientImpl) Query ¶
func (c *CarHTTPClientImpl) Query(ctx context.Context, in *api.QueryRequest, opts ...http.CallOption) (*CarQueryResponse, error)
type CarHTTPServer ¶
type CarHTTPServer interface { Create(context.Context, *structpb.Struct) (*CarCreateResponse, error) Query(context.Context, *api.QueryRequest) (*CarQueryResponse, error) }
type CarQueryResponse ¶
type CarQueryResponse struct { Meta *CarQueryResponseMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` Data []*structpb.Struct `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*CarQueryResponse) Descriptor
deprecated
func (*CarQueryResponse) Descriptor() ([]byte, []int)
Deprecated: Use CarQueryResponse.ProtoReflect.Descriptor instead.
func (*CarQueryResponse) GetData ¶
func (x *CarQueryResponse) GetData() []*structpb.Struct
func (*CarQueryResponse) GetMeta ¶
func (x *CarQueryResponse) GetMeta() *CarQueryResponseMeta
func (*CarQueryResponse) ProtoMessage ¶
func (*CarQueryResponse) ProtoMessage()
func (*CarQueryResponse) ProtoReflect ¶
func (x *CarQueryResponse) ProtoReflect() protoreflect.Message
func (*CarQueryResponse) Reset ¶
func (x *CarQueryResponse) Reset()
func (*CarQueryResponse) String ¶
func (x *CarQueryResponse) String() string
type CarQueryResponseMeta ¶
type CarQueryResponseMeta struct { Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*CarQueryResponseMeta) Descriptor
deprecated
func (*CarQueryResponseMeta) Descriptor() ([]byte, []int)
Deprecated: Use CarQueryResponseMeta.ProtoReflect.Descriptor instead.
func (*CarQueryResponseMeta) GetCount ¶
func (x *CarQueryResponseMeta) GetCount() int64
func (*CarQueryResponseMeta) ProtoMessage ¶
func (*CarQueryResponseMeta) ProtoMessage()
func (*CarQueryResponseMeta) ProtoReflect ¶
func (x *CarQueryResponseMeta) ProtoReflect() protoreflect.Message
func (*CarQueryResponseMeta) Reset ¶
func (x *CarQueryResponseMeta) Reset()
func (*CarQueryResponseMeta) String ¶
func (x *CarQueryResponseMeta) String() string
type CarServer ¶
type CarServer interface { Create(context.Context, *structpb.Struct) (*CarCreateResponse, error) Query(context.Context, *api.QueryRequest) (*CarQueryResponse, error) // contains filtered or unexported methods }
CarServer is the server API for Car service. All implementations must embed UnimplementedCarServer for forward compatibility
type UnimplementedCarServer ¶
type UnimplementedCarServer struct { }
UnimplementedCarServer must be embedded to have forward compatible implementations.
func (UnimplementedCarServer) Create ¶
func (UnimplementedCarServer) Create(context.Context, *structpb.Struct) (*CarCreateResponse, error)
func (UnimplementedCarServer) Query ¶
func (UnimplementedCarServer) Query(context.Context, *api.QueryRequest) (*CarQueryResponse, error)
type UnsafeCarServer ¶
type UnsafeCarServer interface {
// contains filtered or unexported methods
}
UnsafeCarServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CarServer will result in compilation errors.