Documentation ¶
Index ¶
- Variables
- func RegisterAdviceServiceServer(s grpc.ServiceRegistrar, srv AdviceServiceServer)
- type AdviceServiceClient
- type AdviceServiceServer
- type CreateUpdateAdviceRequest
- func (*CreateUpdateAdviceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUpdateAdviceRequest) GetAdvice() string
- func (x *CreateUpdateAdviceRequest) GetOperation() Operation
- func (x *CreateUpdateAdviceRequest) GetUserId() string
- func (*CreateUpdateAdviceRequest) ProtoMessage()
- func (x *CreateUpdateAdviceRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUpdateAdviceRequest) Reset()
- func (x *CreateUpdateAdviceRequest) String() string
- type CreateUpdateAdviceResponse
- type GetUserAdviceRequest
- func (*GetUserAdviceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserAdviceRequest) GetUserId() string
- func (*GetUserAdviceRequest) ProtoMessage()
- func (x *GetUserAdviceRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserAdviceRequest) Reset()
- func (x *GetUserAdviceRequest) String() string
- type GetUserAdviceResponse
- func (*GetUserAdviceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserAdviceResponse) GetAdvice() string
- func (x *GetUserAdviceResponse) GetCreatedAt() *timestamppb.Timestamp
- func (*GetUserAdviceResponse) ProtoMessage()
- func (x *GetUserAdviceResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserAdviceResponse) Reset()
- func (x *GetUserAdviceResponse) String() string
- type Operation
- type UnimplementedAdviceServiceServer
- type UnsafeAdviceServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Operation_name = map[int32]string{ 0: "CREATE", 1: "UPDATE", } Operation_value = map[string]int32{ "CREATE": 0, "UPDATE": 1, } )
Enum value maps for Operation.
var AdviceService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "advicepb.AdviceService", HandlerType: (*AdviceServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAdvice", Handler: _AdviceService_GetAdvice_Handler, }, { MethodName: "CreateUpdateAdvice", Handler: _AdviceService_CreateUpdateAdvice_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "advice.proto", }
AdviceService_ServiceDesc is the grpc.ServiceDesc for AdviceService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_advice_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAdviceServiceServer ¶
func RegisterAdviceServiceServer(s grpc.ServiceRegistrar, srv AdviceServiceServer)
Types ¶
type AdviceServiceClient ¶
type AdviceServiceClient interface { GetAdvice(ctx context.Context, in *GetUserAdviceRequest, opts ...grpc.CallOption) (*GetUserAdviceResponse, error) CreateUpdateAdvice(ctx context.Context, in *CreateUpdateAdviceRequest, opts ...grpc.CallOption) (*CreateUpdateAdviceResponse, error) }
AdviceServiceClient is the client API for AdviceService 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 NewAdviceServiceClient ¶
func NewAdviceServiceClient(cc grpc.ClientConnInterface) AdviceServiceClient
type AdviceServiceServer ¶
type AdviceServiceServer interface { GetAdvice(context.Context, *GetUserAdviceRequest) (*GetUserAdviceResponse, error) CreateUpdateAdvice(context.Context, *CreateUpdateAdviceRequest) (*CreateUpdateAdviceResponse, error) // contains filtered or unexported methods }
AdviceServiceServer is the server API for AdviceService service. All implementations must embed UnimplementedAdviceServiceServer for forward compatibility
type CreateUpdateAdviceRequest ¶
type CreateUpdateAdviceRequest struct { Operation Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=advicepb.Operation" json:"operation,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Advice string `protobuf:"bytes,3,opt,name=advice,proto3" json:"advice,omitempty"` // contains filtered or unexported fields }
func (*CreateUpdateAdviceRequest) Descriptor
deprecated
func (*CreateUpdateAdviceRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUpdateAdviceRequest.ProtoReflect.Descriptor instead.
func (*CreateUpdateAdviceRequest) GetAdvice ¶
func (x *CreateUpdateAdviceRequest) GetAdvice() string
func (*CreateUpdateAdviceRequest) GetOperation ¶
func (x *CreateUpdateAdviceRequest) GetOperation() Operation
func (*CreateUpdateAdviceRequest) GetUserId ¶
func (x *CreateUpdateAdviceRequest) GetUserId() string
func (*CreateUpdateAdviceRequest) ProtoMessage ¶
func (*CreateUpdateAdviceRequest) ProtoMessage()
func (*CreateUpdateAdviceRequest) ProtoReflect ¶
func (x *CreateUpdateAdviceRequest) ProtoReflect() protoreflect.Message
func (*CreateUpdateAdviceRequest) Reset ¶
func (x *CreateUpdateAdviceRequest) Reset()
func (*CreateUpdateAdviceRequest) String ¶
func (x *CreateUpdateAdviceRequest) String() string
type CreateUpdateAdviceResponse ¶
type CreateUpdateAdviceResponse struct {
// contains filtered or unexported fields
}
func (*CreateUpdateAdviceResponse) Descriptor
deprecated
func (*CreateUpdateAdviceResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUpdateAdviceResponse.ProtoReflect.Descriptor instead.
func (*CreateUpdateAdviceResponse) ProtoMessage ¶
func (*CreateUpdateAdviceResponse) ProtoMessage()
func (*CreateUpdateAdviceResponse) ProtoReflect ¶
func (x *CreateUpdateAdviceResponse) ProtoReflect() protoreflect.Message
func (*CreateUpdateAdviceResponse) Reset ¶
func (x *CreateUpdateAdviceResponse) Reset()
func (*CreateUpdateAdviceResponse) String ¶
func (x *CreateUpdateAdviceResponse) String() string
type GetUserAdviceRequest ¶
type GetUserAdviceRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*GetUserAdviceRequest) Descriptor
deprecated
func (*GetUserAdviceRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserAdviceRequest.ProtoReflect.Descriptor instead.
func (*GetUserAdviceRequest) GetUserId ¶
func (x *GetUserAdviceRequest) GetUserId() string
func (*GetUserAdviceRequest) ProtoMessage ¶
func (*GetUserAdviceRequest) ProtoMessage()
func (*GetUserAdviceRequest) ProtoReflect ¶
func (x *GetUserAdviceRequest) ProtoReflect() protoreflect.Message
func (*GetUserAdviceRequest) Reset ¶
func (x *GetUserAdviceRequest) Reset()
func (*GetUserAdviceRequest) String ¶
func (x *GetUserAdviceRequest) String() string
type GetUserAdviceResponse ¶
type GetUserAdviceResponse struct { Advice string `protobuf:"bytes,1,opt,name=advice,proto3" json:"advice,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*GetUserAdviceResponse) Descriptor
deprecated
func (*GetUserAdviceResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserAdviceResponse.ProtoReflect.Descriptor instead.
func (*GetUserAdviceResponse) GetAdvice ¶
func (x *GetUserAdviceResponse) GetAdvice() string
func (*GetUserAdviceResponse) GetCreatedAt ¶
func (x *GetUserAdviceResponse) GetCreatedAt() *timestamppb.Timestamp
func (*GetUserAdviceResponse) ProtoMessage ¶
func (*GetUserAdviceResponse) ProtoMessage()
func (*GetUserAdviceResponse) ProtoReflect ¶
func (x *GetUserAdviceResponse) ProtoReflect() protoreflect.Message
func (*GetUserAdviceResponse) Reset ¶
func (x *GetUserAdviceResponse) Reset()
func (*GetUserAdviceResponse) String ¶
func (x *GetUserAdviceResponse) String() string
type Operation ¶
type Operation int32
func (Operation) Descriptor ¶
func (Operation) Descriptor() protoreflect.EnumDescriptor
func (Operation) EnumDescriptor
deprecated
func (Operation) Number ¶
func (x Operation) Number() protoreflect.EnumNumber
func (Operation) Type ¶
func (Operation) Type() protoreflect.EnumType
type UnimplementedAdviceServiceServer ¶
type UnimplementedAdviceServiceServer struct { }
UnimplementedAdviceServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAdviceServiceServer) CreateUpdateAdvice ¶
func (UnimplementedAdviceServiceServer) CreateUpdateAdvice(context.Context, *CreateUpdateAdviceRequest) (*CreateUpdateAdviceResponse, error)
func (UnimplementedAdviceServiceServer) GetAdvice ¶
func (UnimplementedAdviceServiceServer) GetAdvice(context.Context, *GetUserAdviceRequest) (*GetUserAdviceResponse, error)
type UnsafeAdviceServiceServer ¶
type UnsafeAdviceServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAdviceServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdviceServiceServer will result in compilation errors.