Documentation ¶
Index ¶
- Variables
- func RegisterBillingServiceServer(s grpc.ServiceRegistrar, srv BillingServiceServer)
- func RegisterSubscriptionServiceServer(s grpc.ServiceRegistrar, srv SubscriptionServiceServer)
- type BillingServiceClient
- type BillingServiceServer
- type GetSubscriptionRequest
- func (*GetSubscriptionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetSubscriptionRequest) GetUserId() string
- func (*GetSubscriptionRequest) ProtoMessage()
- func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message
- func (x *GetSubscriptionRequest) Reset()
- func (x *GetSubscriptionRequest) String() string
- type Purchase
- func (*Purchase) Descriptor() ([]byte, []int)deprecated
- func (x *Purchase) GetAmount() int64
- func (x *Purchase) GetCreatedAt() int64
- func (x *Purchase) GetCreditCardId() string
- func (x *Purchase) GetId() string
- func (*Purchase) ProtoMessage()
- func (x *Purchase) ProtoReflect() protoreflect.Message
- func (x *Purchase) Reset()
- func (x *Purchase) String() string
- type Subscription
- func (*Subscription) Descriptor() ([]byte, []int)deprecated
- func (x *Subscription) GetCreatedAt() int64
- func (x *Subscription) GetExpiresAt() int64
- func (x *Subscription) GetLogin() string
- func (x *Subscription) GetSubscription() string
- func (x *Subscription) GetUserId() string
- func (*Subscription) ProtoMessage()
- func (x *Subscription) ProtoReflect() protoreflect.Message
- func (x *Subscription) Reset()
- func (x *Subscription) String() string
- type SubscriptionServiceClient
- type SubscriptionServiceServer
- type UnimplementedBillingServiceServer
- type UnimplementedSubscriptionServiceServer
- type UnsafeBillingServiceServer
- type UnsafeSubscriptionServiceServer
- type WithdrawUserCreditCardRequest
- func (*WithdrawUserCreditCardRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WithdrawUserCreditCardRequest) GetAmount() int64
- func (x *WithdrawUserCreditCardRequest) GetCreditCardId() string
- func (x *WithdrawUserCreditCardRequest) GetUserId() string
- func (*WithdrawUserCreditCardRequest) ProtoMessage()
- func (x *WithdrawUserCreditCardRequest) ProtoReflect() protoreflect.Message
- func (x *WithdrawUserCreditCardRequest) Reset()
- func (x *WithdrawUserCreditCardRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var BillingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "billing.BillingService", HandlerType: (*BillingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "WithdrawUserCreditCard", Handler: _BillingService_WithdrawUserCreditCard_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "billing.proto", }
BillingService_ServiceDesc is the grpc.ServiceDesc for BillingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_billing_proto protoreflect.FileDescriptor
var File_subscription_proto protoreflect.FileDescriptor
var SubscriptionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "subscription.SubscriptionService", HandlerType: (*SubscriptionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSubscription", Handler: _SubscriptionService_GetSubscription_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "subscription.proto", }
SubscriptionService_ServiceDesc is the grpc.ServiceDesc for SubscriptionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterBillingServiceServer ¶
func RegisterBillingServiceServer(s grpc.ServiceRegistrar, srv BillingServiceServer)
func RegisterSubscriptionServiceServer ¶
func RegisterSubscriptionServiceServer(s grpc.ServiceRegistrar, srv SubscriptionServiceServer)
Types ¶
type BillingServiceClient ¶
type BillingServiceClient interface {
WithdrawUserCreditCard(ctx context.Context, in *WithdrawUserCreditCardRequest, opts ...grpc.CallOption) (*Purchase, error)
}
BillingServiceClient is the client API for BillingService 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 NewBillingServiceClient ¶
func NewBillingServiceClient(cc grpc.ClientConnInterface) BillingServiceClient
type BillingServiceServer ¶
type BillingServiceServer interface { WithdrawUserCreditCard(context.Context, *WithdrawUserCreditCardRequest) (*Purchase, error) // contains filtered or unexported methods }
BillingServiceServer is the server API for BillingService service. All implementations must embed UnimplementedBillingServiceServer for forward compatibility
type GetSubscriptionRequest ¶
type GetSubscriptionRequest struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*GetSubscriptionRequest) Descriptor
deprecated
func (*GetSubscriptionRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*GetSubscriptionRequest) GetUserId ¶
func (x *GetSubscriptionRequest) GetUserId() string
func (*GetSubscriptionRequest) ProtoMessage ¶
func (*GetSubscriptionRequest) ProtoMessage()
func (*GetSubscriptionRequest) ProtoReflect ¶
func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message
func (*GetSubscriptionRequest) Reset ¶
func (x *GetSubscriptionRequest) Reset()
func (*GetSubscriptionRequest) String ¶
func (x *GetSubscriptionRequest) String() string
type Purchase ¶
type Purchase struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreditCardId string `protobuf:"bytes,2,opt,name=creditCardId,proto3" json:"creditCardId,omitempty"` Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` CreatedAt int64 `protobuf:"varint,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // contains filtered or unexported fields }
func (*Purchase) Descriptor
deprecated
func (*Purchase) GetCreatedAt ¶
func (*Purchase) GetCreditCardId ¶
func (*Purchase) ProtoMessage ¶
func (*Purchase) ProtoMessage()
func (*Purchase) ProtoReflect ¶
func (x *Purchase) ProtoReflect() protoreflect.Message
type Subscription ¶
type Subscription struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` Subscription string `protobuf:"bytes,2,opt,name=subscription,proto3" json:"subscription,omitempty"` Login string `protobuf:"bytes,3,opt,name=login,proto3" json:"login,omitempty"` ExpiresAt int64 `protobuf:"varint,4,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` CreatedAt int64 `protobuf:"varint,5,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // contains filtered or unexported fields }
func (*Subscription) Descriptor
deprecated
func (*Subscription) Descriptor() ([]byte, []int)
Deprecated: Use Subscription.ProtoReflect.Descriptor instead.
func (*Subscription) GetCreatedAt ¶
func (x *Subscription) GetCreatedAt() int64
func (*Subscription) GetExpiresAt ¶
func (x *Subscription) GetExpiresAt() int64
func (*Subscription) GetLogin ¶
func (x *Subscription) GetLogin() string
func (*Subscription) GetSubscription ¶
func (x *Subscription) GetSubscription() string
func (*Subscription) GetUserId ¶
func (x *Subscription) GetUserId() string
func (*Subscription) ProtoMessage ¶
func (*Subscription) ProtoMessage()
func (*Subscription) ProtoReflect ¶
func (x *Subscription) ProtoReflect() protoreflect.Message
func (*Subscription) Reset ¶
func (x *Subscription) Reset()
func (*Subscription) String ¶
func (x *Subscription) String() string
type SubscriptionServiceClient ¶
type SubscriptionServiceClient interface {
GetSubscription(ctx context.Context, in *GetSubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)
}
SubscriptionServiceClient is the client API for SubscriptionService 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 NewSubscriptionServiceClient ¶
func NewSubscriptionServiceClient(cc grpc.ClientConnInterface) SubscriptionServiceClient
type SubscriptionServiceServer ¶
type SubscriptionServiceServer interface { GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error) // contains filtered or unexported methods }
SubscriptionServiceServer is the server API for SubscriptionService service. All implementations must embed UnimplementedSubscriptionServiceServer for forward compatibility
type UnimplementedBillingServiceServer ¶
type UnimplementedBillingServiceServer struct { }
UnimplementedBillingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBillingServiceServer) WithdrawUserCreditCard ¶
func (UnimplementedBillingServiceServer) WithdrawUserCreditCard(context.Context, *WithdrawUserCreditCardRequest) (*Purchase, error)
type UnimplementedSubscriptionServiceServer ¶
type UnimplementedSubscriptionServiceServer struct { }
UnimplementedSubscriptionServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSubscriptionServiceServer) GetSubscription ¶
func (UnimplementedSubscriptionServiceServer) GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error)
type UnsafeBillingServiceServer ¶
type UnsafeBillingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBillingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BillingServiceServer will result in compilation errors.
type UnsafeSubscriptionServiceServer ¶
type UnsafeSubscriptionServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSubscriptionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SubscriptionServiceServer will result in compilation errors.
type WithdrawUserCreditCardRequest ¶
type WithdrawUserCreditCardRequest struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` CreditCardId string `protobuf:"bytes,2,opt,name=creditCardId,proto3" json:"creditCardId,omitempty"` Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*WithdrawUserCreditCardRequest) Descriptor
deprecated
func (*WithdrawUserCreditCardRequest) Descriptor() ([]byte, []int)
Deprecated: Use WithdrawUserCreditCardRequest.ProtoReflect.Descriptor instead.
func (*WithdrawUserCreditCardRequest) GetAmount ¶
func (x *WithdrawUserCreditCardRequest) GetAmount() int64
func (*WithdrawUserCreditCardRequest) GetCreditCardId ¶
func (x *WithdrawUserCreditCardRequest) GetCreditCardId() string
func (*WithdrawUserCreditCardRequest) GetUserId ¶
func (x *WithdrawUserCreditCardRequest) GetUserId() string
func (*WithdrawUserCreditCardRequest) ProtoMessage ¶
func (*WithdrawUserCreditCardRequest) ProtoMessage()
func (*WithdrawUserCreditCardRequest) ProtoReflect ¶
func (x *WithdrawUserCreditCardRequest) ProtoReflect() protoreflect.Message
func (*WithdrawUserCreditCardRequest) Reset ¶
func (x *WithdrawUserCreditCardRequest) Reset()
func (*WithdrawUserCreditCardRequest) String ¶
func (x *WithdrawUserCreditCardRequest) String() string