Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterVoucherServiceServer(s grpc.ServiceRegistrar, srv VoucherServiceServer)
- type CreateRequest
- type CreateResponse
- type GetByUserIDRequest
- func (*GetByUserIDRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetByUserIDRequest) GetUserId() int64
- func (*GetByUserIDRequest) ProtoMessage()
- func (x *GetByUserIDRequest) ProtoReflect() protoreflect.Message
- func (x *GetByUserIDRequest) Reset()
- func (x *GetByUserIDRequest) String() string
- type GetByUserIDResponse
- func (*GetByUserIDResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetByUserIDResponse) GetVoucher() *Voucher
- func (*GetByUserIDResponse) ProtoMessage()
- func (x *GetByUserIDResponse) ProtoReflect() protoreflect.Message
- func (x *GetByUserIDResponse) Reset()
- func (x *GetByUserIDResponse) String() string
- type UnimplementedVoucherServiceServer
- type UnsafeVoucherServiceServer
- type Voucher
- func (*Voucher) Descriptor() ([]byte, []int)deprecated
- func (x *Voucher) GetCreatedAt() *timestamppb.Timestamp
- func (x *Voucher) GetId() int64
- func (x *Voucher) GetUserId() int64
- func (x *Voucher) GetValue() string
- func (*Voucher) ProtoMessage()
- func (x *Voucher) ProtoReflect() protoreflect.Message
- func (x *Voucher) Reset()
- func (x *Voucher) String() string
- type VoucherServiceClient
- type VoucherServiceServer
Constants ¶
const ( VoucherService_Create_FullMethodName = "/voucherservice.proto.user.v1.VoucherService/Create" VoucherService_GetByUserID_FullMethodName = "/voucherservice.proto.user.v1.VoucherService/GetByUserID" )
Variables ¶
var File_voucher_v1_voucher_proto protoreflect.FileDescriptor
var VoucherService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "voucherservice.proto.user.v1.VoucherService", HandlerType: (*VoucherServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _VoucherService_Create_Handler, }, { MethodName: "GetByUserID", Handler: _VoucherService_GetByUserID_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "voucher/v1/voucher.proto", }
VoucherService_ServiceDesc is the grpc.ServiceDesc for VoucherService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterVoucherServiceServer ¶
func RegisterVoucherServiceServer(s grpc.ServiceRegistrar, srv VoucherServiceServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetUserId ¶
func (x *CreateRequest) GetUserId() int64
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Voucher *Voucher `protobuf:"bytes,1,opt,name=voucher,proto3" json:"voucher,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetVoucher ¶
func (x *CreateResponse) GetVoucher() *Voucher
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type GetByUserIDRequest ¶
type GetByUserIDRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*GetByUserIDRequest) Descriptor
deprecated
func (*GetByUserIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetByUserIDRequest.ProtoReflect.Descriptor instead.
func (*GetByUserIDRequest) GetUserId ¶
func (x *GetByUserIDRequest) GetUserId() int64
func (*GetByUserIDRequest) ProtoMessage ¶
func (*GetByUserIDRequest) ProtoMessage()
func (*GetByUserIDRequest) ProtoReflect ¶
func (x *GetByUserIDRequest) ProtoReflect() protoreflect.Message
func (*GetByUserIDRequest) Reset ¶
func (x *GetByUserIDRequest) Reset()
func (*GetByUserIDRequest) String ¶
func (x *GetByUserIDRequest) String() string
type GetByUserIDResponse ¶
type GetByUserIDResponse struct { Voucher *Voucher `protobuf:"bytes,1,opt,name=voucher,proto3" json:"voucher,omitempty"` // contains filtered or unexported fields }
func (*GetByUserIDResponse) Descriptor
deprecated
func (*GetByUserIDResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetByUserIDResponse.ProtoReflect.Descriptor instead.
func (*GetByUserIDResponse) GetVoucher ¶
func (x *GetByUserIDResponse) GetVoucher() *Voucher
func (*GetByUserIDResponse) ProtoMessage ¶
func (*GetByUserIDResponse) ProtoMessage()
func (*GetByUserIDResponse) ProtoReflect ¶
func (x *GetByUserIDResponse) ProtoReflect() protoreflect.Message
func (*GetByUserIDResponse) Reset ¶
func (x *GetByUserIDResponse) Reset()
func (*GetByUserIDResponse) String ¶
func (x *GetByUserIDResponse) String() string
type UnimplementedVoucherServiceServer ¶
type UnimplementedVoucherServiceServer struct { }
UnimplementedVoucherServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedVoucherServiceServer) Create ¶
func (UnimplementedVoucherServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedVoucherServiceServer) GetByUserID ¶
func (UnimplementedVoucherServiceServer) GetByUserID(context.Context, *GetByUserIDRequest) (*GetByUserIDResponse, error)
type UnsafeVoucherServiceServer ¶
type UnsafeVoucherServiceServer interface {
// contains filtered or unexported methods
}
UnsafeVoucherServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VoucherServiceServer will result in compilation errors.
type Voucher ¶
type Voucher struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
Voucher represents a voucher.
func (*Voucher) Descriptor
deprecated
func (*Voucher) GetCreatedAt ¶
func (x *Voucher) GetCreatedAt() *timestamppb.Timestamp
func (*Voucher) ProtoMessage ¶
func (*Voucher) ProtoMessage()
func (*Voucher) ProtoReflect ¶
func (x *Voucher) ProtoReflect() protoreflect.Message
type VoucherServiceClient ¶
type VoucherServiceClient interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) GetByUserID(ctx context.Context, in *GetByUserIDRequest, opts ...grpc.CallOption) (*GetByUserIDResponse, error) }
VoucherServiceClient is the client API for VoucherService 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 NewVoucherServiceClient ¶
func NewVoucherServiceClient(cc grpc.ClientConnInterface) VoucherServiceClient
type VoucherServiceServer ¶
type VoucherServiceServer interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) GetByUserID(context.Context, *GetByUserIDRequest) (*GetByUserIDResponse, error) // contains filtered or unexported methods }
VoucherServiceServer is the server API for VoucherService service. All implementations must embed UnimplementedVoucherServiceServer for forward compatibility