Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterIapServer(s grpc.ServiceRegistrar, srv IapServer)
- type IapClient
- type IapServer
- type OnPurchaseCompletedRequest
- func (*OnPurchaseCompletedRequest) Descriptor() ([]byte, []int)deprecated
- func (x *OnPurchaseCompletedRequest) GetAuth() *v1.Auth
- func (x *OnPurchaseCompletedRequest) GetPlatform() v1.Platform
- func (x *OnPurchaseCompletedRequest) GetReceipt() *Receipt
- func (*OnPurchaseCompletedRequest) ProtoMessage()
- func (x *OnPurchaseCompletedRequest) ProtoReflect() protoreflect.Message
- func (x *OnPurchaseCompletedRequest) Reset()
- func (x *OnPurchaseCompletedRequest) String() string
- func (m *OnPurchaseCompletedRequest) Validate() error
- func (m *OnPurchaseCompletedRequest) ValidateAll() error
- type OnPurchaseCompletedRequestMultiError
- type OnPurchaseCompletedRequestValidationError
- func (e OnPurchaseCompletedRequestValidationError) Cause() error
- func (e OnPurchaseCompletedRequestValidationError) Error() string
- func (e OnPurchaseCompletedRequestValidationError) ErrorName() string
- func (e OnPurchaseCompletedRequestValidationError) Field() string
- func (e OnPurchaseCompletedRequestValidationError) Key() bool
- func (e OnPurchaseCompletedRequestValidationError) Reason() string
- type OnPurchaseCompletedResponse
- func (*OnPurchaseCompletedResponse) Descriptor() ([]byte, []int)deprecated
- func (x *OnPurchaseCompletedResponse) GetResult() OnPurchaseCompletedResponse_Result
- func (*OnPurchaseCompletedResponse) ProtoMessage()
- func (x *OnPurchaseCompletedResponse) ProtoReflect() protoreflect.Message
- func (x *OnPurchaseCompletedResponse) Reset()
- func (x *OnPurchaseCompletedResponse) String() string
- func (m *OnPurchaseCompletedResponse) Validate() error
- func (m *OnPurchaseCompletedResponse) ValidateAll() error
- type OnPurchaseCompletedResponseMultiError
- type OnPurchaseCompletedResponseValidationError
- func (e OnPurchaseCompletedResponseValidationError) Cause() error
- func (e OnPurchaseCompletedResponseValidationError) Error() string
- func (e OnPurchaseCompletedResponseValidationError) ErrorName() string
- func (e OnPurchaseCompletedResponseValidationError) Field() string
- func (e OnPurchaseCompletedResponseValidationError) Key() bool
- func (e OnPurchaseCompletedResponseValidationError) Reason() string
- type OnPurchaseCompletedResponse_Result
- func (OnPurchaseCompletedResponse_Result) Descriptor() protoreflect.EnumDescriptor
- func (x OnPurchaseCompletedResponse_Result) Enum() *OnPurchaseCompletedResponse_Result
- func (OnPurchaseCompletedResponse_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x OnPurchaseCompletedResponse_Result) Number() protoreflect.EnumNumber
- func (x OnPurchaseCompletedResponse_Result) String() string
- func (OnPurchaseCompletedResponse_Result) Type() protoreflect.EnumType
- type Receipt
- func (*Receipt) Descriptor() ([]byte, []int)deprecated
- func (x *Receipt) GetValue() string
- func (*Receipt) ProtoMessage()
- func (x *Receipt) ProtoReflect() protoreflect.Message
- func (x *Receipt) Reset()
- func (x *Receipt) String() string
- func (m *Receipt) Validate() error
- func (m *Receipt) ValidateAll() error
- type ReceiptMultiError
- type ReceiptValidationError
- type UnimplementedIapServer
- type UnsafeIapServer
Constants ¶
const (
Iap_OnPurchaseCompleted_FullMethodName = "/flipchat.iap.v1.Iap/OnPurchaseCompleted"
)
Variables ¶
var ( OnPurchaseCompletedResponse_Result_name = map[int32]string{ 0: "OK", 1: "DENIED", 2: "INVALID_RECEIPT", } OnPurchaseCompletedResponse_Result_value = map[string]int32{ "OK": 0, "DENIED": 1, "INVALID_RECEIPT": 2, } )
Enum value maps for OnPurchaseCompletedResponse_Result.
var File_iap_v1_iap_service_proto protoreflect.FileDescriptor
var Iap_ServiceDesc = grpc.ServiceDesc{ ServiceName: "flipchat.iap.v1.Iap", HandlerType: (*IapServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "OnPurchaseCompleted", Handler: _Iap_OnPurchaseCompleted_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "iap/v1/iap_service.proto", }
Iap_ServiceDesc is the grpc.ServiceDesc for Iap service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterIapServer ¶
func RegisterIapServer(s grpc.ServiceRegistrar, srv IapServer)
Types ¶
type IapClient ¶
type IapClient interface { // OnPurchaseCompleted is called when an IAP has been completed OnPurchaseCompleted(ctx context.Context, in *OnPurchaseCompletedRequest, opts ...grpc.CallOption) (*OnPurchaseCompletedResponse, error) }
IapClient is the client API for Iap 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 NewIapClient ¶
func NewIapClient(cc grpc.ClientConnInterface) IapClient
type IapServer ¶
type IapServer interface { // OnPurchaseCompleted is called when an IAP has been completed OnPurchaseCompleted(context.Context, *OnPurchaseCompletedRequest) (*OnPurchaseCompletedResponse, error) // contains filtered or unexported methods }
IapServer is the server API for Iap service. All implementations must embed UnimplementedIapServer for forward compatibility.
type OnPurchaseCompletedRequest ¶
type OnPurchaseCompletedRequest struct { Platform v1.Platform `protobuf:"varint,1,opt,name=platform,proto3,enum=flipchat.common.v1.Platform" json:"platform,omitempty"` Receipt *Receipt `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` Auth *v1.Auth `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"` // contains filtered or unexported fields }
func (*OnPurchaseCompletedRequest) Descriptor
deprecated
func (*OnPurchaseCompletedRequest) Descriptor() ([]byte, []int)
Deprecated: Use OnPurchaseCompletedRequest.ProtoReflect.Descriptor instead.
func (*OnPurchaseCompletedRequest) GetAuth ¶
func (x *OnPurchaseCompletedRequest) GetAuth() *v1.Auth
func (*OnPurchaseCompletedRequest) GetPlatform ¶
func (x *OnPurchaseCompletedRequest) GetPlatform() v1.Platform
func (*OnPurchaseCompletedRequest) GetReceipt ¶
func (x *OnPurchaseCompletedRequest) GetReceipt() *Receipt
func (*OnPurchaseCompletedRequest) ProtoMessage ¶
func (*OnPurchaseCompletedRequest) ProtoMessage()
func (*OnPurchaseCompletedRequest) ProtoReflect ¶
func (x *OnPurchaseCompletedRequest) ProtoReflect() protoreflect.Message
func (*OnPurchaseCompletedRequest) Reset ¶
func (x *OnPurchaseCompletedRequest) Reset()
func (*OnPurchaseCompletedRequest) String ¶
func (x *OnPurchaseCompletedRequest) String() string
func (*OnPurchaseCompletedRequest) Validate ¶
func (m *OnPurchaseCompletedRequest) Validate() error
Validate checks the field values on OnPurchaseCompletedRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*OnPurchaseCompletedRequest) ValidateAll ¶
func (m *OnPurchaseCompletedRequest) ValidateAll() error
ValidateAll checks the field values on OnPurchaseCompletedRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OnPurchaseCompletedRequestMultiError, or nil if none found.
type OnPurchaseCompletedRequestMultiError ¶
type OnPurchaseCompletedRequestMultiError []error
OnPurchaseCompletedRequestMultiError is an error wrapping multiple validation errors returned by OnPurchaseCompletedRequest.ValidateAll() if the designated constraints aren't met.
func (OnPurchaseCompletedRequestMultiError) AllErrors ¶
func (m OnPurchaseCompletedRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OnPurchaseCompletedRequestMultiError) Error ¶
func (m OnPurchaseCompletedRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OnPurchaseCompletedRequestValidationError ¶
type OnPurchaseCompletedRequestValidationError struct {
// contains filtered or unexported fields
}
OnPurchaseCompletedRequestValidationError is the validation error returned by OnPurchaseCompletedRequest.Validate if the designated constraints aren't met.
func (OnPurchaseCompletedRequestValidationError) Cause ¶
func (e OnPurchaseCompletedRequestValidationError) Cause() error
Cause function returns cause value.
func (OnPurchaseCompletedRequestValidationError) Error ¶
func (e OnPurchaseCompletedRequestValidationError) Error() string
Error satisfies the builtin error interface
func (OnPurchaseCompletedRequestValidationError) ErrorName ¶
func (e OnPurchaseCompletedRequestValidationError) ErrorName() string
ErrorName returns error name.
func (OnPurchaseCompletedRequestValidationError) Field ¶
func (e OnPurchaseCompletedRequestValidationError) Field() string
Field function returns field value.
func (OnPurchaseCompletedRequestValidationError) Key ¶
func (e OnPurchaseCompletedRequestValidationError) Key() bool
Key function returns key value.
func (OnPurchaseCompletedRequestValidationError) Reason ¶
func (e OnPurchaseCompletedRequestValidationError) Reason() string
Reason function returns reason value.
type OnPurchaseCompletedResponse ¶
type OnPurchaseCompletedResponse struct { Result OnPurchaseCompletedResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=flipchat.iap.v1.OnPurchaseCompletedResponse_Result" json:"result,omitempty"` // contains filtered or unexported fields }
func (*OnPurchaseCompletedResponse) Descriptor
deprecated
func (*OnPurchaseCompletedResponse) Descriptor() ([]byte, []int)
Deprecated: Use OnPurchaseCompletedResponse.ProtoReflect.Descriptor instead.
func (*OnPurchaseCompletedResponse) GetResult ¶
func (x *OnPurchaseCompletedResponse) GetResult() OnPurchaseCompletedResponse_Result
func (*OnPurchaseCompletedResponse) ProtoMessage ¶
func (*OnPurchaseCompletedResponse) ProtoMessage()
func (*OnPurchaseCompletedResponse) ProtoReflect ¶
func (x *OnPurchaseCompletedResponse) ProtoReflect() protoreflect.Message
func (*OnPurchaseCompletedResponse) Reset ¶
func (x *OnPurchaseCompletedResponse) Reset()
func (*OnPurchaseCompletedResponse) String ¶
func (x *OnPurchaseCompletedResponse) String() string
func (*OnPurchaseCompletedResponse) Validate ¶
func (m *OnPurchaseCompletedResponse) Validate() error
Validate checks the field values on OnPurchaseCompletedResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*OnPurchaseCompletedResponse) ValidateAll ¶
func (m *OnPurchaseCompletedResponse) ValidateAll() error
ValidateAll checks the field values on OnPurchaseCompletedResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OnPurchaseCompletedResponseMultiError, or nil if none found.
type OnPurchaseCompletedResponseMultiError ¶
type OnPurchaseCompletedResponseMultiError []error
OnPurchaseCompletedResponseMultiError is an error wrapping multiple validation errors returned by OnPurchaseCompletedResponse.ValidateAll() if the designated constraints aren't met.
func (OnPurchaseCompletedResponseMultiError) AllErrors ¶
func (m OnPurchaseCompletedResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OnPurchaseCompletedResponseMultiError) Error ¶
func (m OnPurchaseCompletedResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OnPurchaseCompletedResponseValidationError ¶
type OnPurchaseCompletedResponseValidationError struct {
// contains filtered or unexported fields
}
OnPurchaseCompletedResponseValidationError is the validation error returned by OnPurchaseCompletedResponse.Validate if the designated constraints aren't met.
func (OnPurchaseCompletedResponseValidationError) Cause ¶
func (e OnPurchaseCompletedResponseValidationError) Cause() error
Cause function returns cause value.
func (OnPurchaseCompletedResponseValidationError) Error ¶
func (e OnPurchaseCompletedResponseValidationError) Error() string
Error satisfies the builtin error interface
func (OnPurchaseCompletedResponseValidationError) ErrorName ¶
func (e OnPurchaseCompletedResponseValidationError) ErrorName() string
ErrorName returns error name.
func (OnPurchaseCompletedResponseValidationError) Field ¶
func (e OnPurchaseCompletedResponseValidationError) Field() string
Field function returns field value.
func (OnPurchaseCompletedResponseValidationError) Key ¶
func (e OnPurchaseCompletedResponseValidationError) Key() bool
Key function returns key value.
func (OnPurchaseCompletedResponseValidationError) Reason ¶
func (e OnPurchaseCompletedResponseValidationError) Reason() string
Reason function returns reason value.
type OnPurchaseCompletedResponse_Result ¶
type OnPurchaseCompletedResponse_Result int32
const ( OnPurchaseCompletedResponse_OK OnPurchaseCompletedResponse_Result = 0 OnPurchaseCompletedResponse_DENIED OnPurchaseCompletedResponse_Result = 1 OnPurchaseCompletedResponse_INVALID_RECEIPT OnPurchaseCompletedResponse_Result = 2 // Returned if the receipt is invalid, or not in a completed payment state )
func (OnPurchaseCompletedResponse_Result) Descriptor ¶
func (OnPurchaseCompletedResponse_Result) Descriptor() protoreflect.EnumDescriptor
func (OnPurchaseCompletedResponse_Result) Enum ¶
func (x OnPurchaseCompletedResponse_Result) Enum() *OnPurchaseCompletedResponse_Result
func (OnPurchaseCompletedResponse_Result) EnumDescriptor
deprecated
func (OnPurchaseCompletedResponse_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use OnPurchaseCompletedResponse_Result.Descriptor instead.
func (OnPurchaseCompletedResponse_Result) Number ¶
func (x OnPurchaseCompletedResponse_Result) Number() protoreflect.EnumNumber
func (OnPurchaseCompletedResponse_Result) String ¶
func (x OnPurchaseCompletedResponse_Result) String() string
func (OnPurchaseCompletedResponse_Result) Type ¶
func (OnPurchaseCompletedResponse_Result) Type() protoreflect.EnumType
type Receipt ¶
type Receipt struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Receipt) Descriptor
deprecated
func (*Receipt) ProtoMessage ¶
func (*Receipt) ProtoMessage()
func (*Receipt) ProtoReflect ¶
func (x *Receipt) ProtoReflect() protoreflect.Message
func (*Receipt) Validate ¶
Validate checks the field values on Receipt with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Receipt) ValidateAll ¶
ValidateAll checks the field values on Receipt with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReceiptMultiError, or nil if none found.
type ReceiptMultiError ¶
type ReceiptMultiError []error
ReceiptMultiError is an error wrapping multiple validation errors returned by Receipt.ValidateAll() if the designated constraints aren't met.
func (ReceiptMultiError) AllErrors ¶
func (m ReceiptMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ReceiptMultiError) Error ¶
func (m ReceiptMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ReceiptValidationError ¶
type ReceiptValidationError struct {
// contains filtered or unexported fields
}
ReceiptValidationError is the validation error returned by Receipt.Validate if the designated constraints aren't met.
func (ReceiptValidationError) Cause ¶
func (e ReceiptValidationError) Cause() error
Cause function returns cause value.
func (ReceiptValidationError) Error ¶
func (e ReceiptValidationError) Error() string
Error satisfies the builtin error interface
func (ReceiptValidationError) ErrorName ¶
func (e ReceiptValidationError) ErrorName() string
ErrorName returns error name.
func (ReceiptValidationError) Field ¶
func (e ReceiptValidationError) Field() string
Field function returns field value.
func (ReceiptValidationError) Key ¶
func (e ReceiptValidationError) Key() bool
Key function returns key value.
func (ReceiptValidationError) Reason ¶
func (e ReceiptValidationError) Reason() string
Reason function returns reason value.
type UnimplementedIapServer ¶
type UnimplementedIapServer struct{}
UnimplementedIapServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedIapServer) OnPurchaseCompleted ¶
func (UnimplementedIapServer) OnPurchaseCompleted(context.Context, *OnPurchaseCompletedRequest) (*OnPurchaseCompletedResponse, error)
type UnsafeIapServer ¶
type UnsafeIapServer interface {
// contains filtered or unexported methods
}
UnsafeIapServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IapServer will result in compilation errors.