iappb

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Iap_OnPurchaseCompleted_FullMethodName = "/flipchat.iap.v1.Iap/OnPurchaseCompleted"
)

Variables

View Source
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.

View Source
var File_iap_v1_iap_service_proto protoreflect.FileDescriptor
View Source
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 (*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

AllErrors returns a list of validation violation errors.

func (OnPurchaseCompletedRequestMultiError) Error

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

Cause function returns cause value.

func (OnPurchaseCompletedRequestValidationError) Error

Error satisfies the builtin error interface

func (OnPurchaseCompletedRequestValidationError) ErrorName

ErrorName returns error name.

func (OnPurchaseCompletedRequestValidationError) Field

Field function returns field value.

func (OnPurchaseCompletedRequestValidationError) Key

Key function returns key value.

func (OnPurchaseCompletedRequestValidationError) Reason

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 (*OnPurchaseCompletedResponse) ProtoMessage

func (*OnPurchaseCompletedResponse) ProtoMessage()

func (*OnPurchaseCompletedResponse) ProtoReflect

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

AllErrors returns a list of validation violation errors.

func (OnPurchaseCompletedResponseMultiError) Error

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

Cause function returns cause value.

func (OnPurchaseCompletedResponseValidationError) Error

Error satisfies the builtin error interface

func (OnPurchaseCompletedResponseValidationError) ErrorName

ErrorName returns error name.

func (OnPurchaseCompletedResponseValidationError) Field

Field function returns field value.

func (OnPurchaseCompletedResponseValidationError) Key

Key function returns key value.

func (OnPurchaseCompletedResponseValidationError) Reason

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) Enum

func (OnPurchaseCompletedResponse_Result) EnumDescriptor deprecated

func (OnPurchaseCompletedResponse_Result) EnumDescriptor() ([]byte, []int)

Deprecated: Use OnPurchaseCompletedResponse_Result.Descriptor instead.

func (OnPurchaseCompletedResponse_Result) Number

func (OnPurchaseCompletedResponse_Result) String

func (OnPurchaseCompletedResponse_Result) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Receipt.ProtoReflect.Descriptor instead.

func (*Receipt) GetValue

func (x *Receipt) GetValue() string

func (*Receipt) ProtoMessage

func (*Receipt) ProtoMessage()

func (*Receipt) ProtoReflect

func (x *Receipt) ProtoReflect() protoreflect.Message

func (*Receipt) Reset

func (x *Receipt) Reset()

func (*Receipt) String

func (x *Receipt) String() string

func (*Receipt) Validate

func (m *Receipt) Validate() error

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

func (m *Receipt) ValidateAll() error

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.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL