Documentation ¶
Index ¶
- Variables
- func RegisterMicroPaymentServer(s grpc.ServiceRegistrar, srv MicroPaymentServer)
- type CodifyRequest
- func (*CodifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CodifyRequest) GetCurrency() string
- func (x *CodifyRequest) GetNativeAmount() float64
- func (x *CodifyRequest) GetOwnerAccount() *v1.SolanaAccountId
- func (x *CodifyRequest) GetPrimaryAccount() *v1.SolanaAccountId
- func (x *CodifyRequest) GetSignature() *v1.Signature
- func (x *CodifyRequest) GetUrl() string
- func (*CodifyRequest) ProtoMessage()
- func (x *CodifyRequest) ProtoReflect() protoreflect.Message
- func (x *CodifyRequest) Reset()
- func (x *CodifyRequest) String() string
- func (m *CodifyRequest) Validate() error
- type CodifyRequestValidationError
- func (e CodifyRequestValidationError) Cause() error
- func (e CodifyRequestValidationError) Error() string
- func (e CodifyRequestValidationError) ErrorName() string
- func (e CodifyRequestValidationError) Field() string
- func (e CodifyRequestValidationError) Key() bool
- func (e CodifyRequestValidationError) Reason() string
- type CodifyResponse
- func (*CodifyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CodifyResponse) GetCodifiedUrl() string
- func (x *CodifyResponse) GetResult() CodifyResponse_Result
- func (*CodifyResponse) ProtoMessage()
- func (x *CodifyResponse) ProtoReflect() protoreflect.Message
- func (x *CodifyResponse) Reset()
- func (x *CodifyResponse) String() string
- func (m *CodifyResponse) Validate() error
- type CodifyResponseValidationError
- func (e CodifyResponseValidationError) Cause() error
- func (e CodifyResponseValidationError) Error() string
- func (e CodifyResponseValidationError) ErrorName() string
- func (e CodifyResponseValidationError) Field() string
- func (e CodifyResponseValidationError) Key() bool
- func (e CodifyResponseValidationError) Reason() string
- type CodifyResponse_Result
- func (CodifyResponse_Result) Descriptor() protoreflect.EnumDescriptor
- func (x CodifyResponse_Result) Enum() *CodifyResponse_Result
- func (CodifyResponse_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x CodifyResponse_Result) Number() protoreflect.EnumNumber
- func (x CodifyResponse_Result) String() string
- func (CodifyResponse_Result) Type() protoreflect.EnumType
- type GetPathMetadataRequest
- func (*GetPathMetadataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPathMetadataRequest) GetPath() string
- func (*GetPathMetadataRequest) ProtoMessage()
- func (x *GetPathMetadataRequest) ProtoReflect() protoreflect.Message
- func (x *GetPathMetadataRequest) Reset()
- func (x *GetPathMetadataRequest) String() string
- func (m *GetPathMetadataRequest) Validate() error
- type GetPathMetadataRequestValidationError
- func (e GetPathMetadataRequestValidationError) Cause() error
- func (e GetPathMetadataRequestValidationError) Error() string
- func (e GetPathMetadataRequestValidationError) ErrorName() string
- func (e GetPathMetadataRequestValidationError) Field() string
- func (e GetPathMetadataRequestValidationError) Key() bool
- func (e GetPathMetadataRequestValidationError) Reason() string
- type GetPathMetadataResponse
- func (*GetPathMetadataResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPathMetadataResponse) GetCurrency() string
- func (x *GetPathMetadataResponse) GetDestination() *v1.SolanaAccountId
- func (x *GetPathMetadataResponse) GetNativeAmount() float64
- func (x *GetPathMetadataResponse) GetRedirctUrl() string
- func (x *GetPathMetadataResponse) GetResult() GetPathMetadataResponse_Result
- func (*GetPathMetadataResponse) ProtoMessage()
- func (x *GetPathMetadataResponse) ProtoReflect() protoreflect.Message
- func (x *GetPathMetadataResponse) Reset()
- func (x *GetPathMetadataResponse) String() string
- func (m *GetPathMetadataResponse) Validate() error
- type GetPathMetadataResponseValidationError
- func (e GetPathMetadataResponseValidationError) Cause() error
- func (e GetPathMetadataResponseValidationError) Error() string
- func (e GetPathMetadataResponseValidationError) ErrorName() string
- func (e GetPathMetadataResponseValidationError) Field() string
- func (e GetPathMetadataResponseValidationError) Key() bool
- func (e GetPathMetadataResponseValidationError) Reason() string
- type GetPathMetadataResponse_Result
- func (GetPathMetadataResponse_Result) Descriptor() protoreflect.EnumDescriptor
- func (x GetPathMetadataResponse_Result) Enum() *GetPathMetadataResponse_Result
- func (GetPathMetadataResponse_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x GetPathMetadataResponse_Result) Number() protoreflect.EnumNumber
- func (x GetPathMetadataResponse_Result) String() string
- func (GetPathMetadataResponse_Result) Type() protoreflect.EnumType
- type GetStatusRequest
- func (*GetStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetStatusRequest) GetIntentId() *v1.IntentId
- func (*GetStatusRequest) ProtoMessage()
- func (x *GetStatusRequest) ProtoReflect() protoreflect.Message
- func (x *GetStatusRequest) Reset()
- func (x *GetStatusRequest) String() string
- func (m *GetStatusRequest) Validate() error
- type GetStatusRequestValidationError
- func (e GetStatusRequestValidationError) Cause() error
- func (e GetStatusRequestValidationError) Error() string
- func (e GetStatusRequestValidationError) ErrorName() string
- func (e GetStatusRequestValidationError) Field() string
- func (e GetStatusRequestValidationError) Key() bool
- func (e GetStatusRequestValidationError) Reason() string
- type GetStatusResponse
- func (*GetStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetStatusResponse) GetCodeScanned() bool
- func (x *GetStatusResponse) GetExists() bool
- func (x *GetStatusResponse) GetIntentSubmitted() bool
- func (*GetStatusResponse) ProtoMessage()
- func (x *GetStatusResponse) ProtoReflect() protoreflect.Message
- func (x *GetStatusResponse) Reset()
- func (x *GetStatusResponse) String() string
- func (m *GetStatusResponse) Validate() error
- type GetStatusResponseValidationError
- func (e GetStatusResponseValidationError) Cause() error
- func (e GetStatusResponseValidationError) Error() string
- func (e GetStatusResponseValidationError) ErrorName() string
- func (e GetStatusResponseValidationError) Field() string
- func (e GetStatusResponseValidationError) Key() bool
- func (e GetStatusResponseValidationError) Reason() string
- type MicroPaymentClient
- type MicroPaymentServer
- type RegisterWebhookRequest
- func (*RegisterWebhookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterWebhookRequest) GetIntentId() *v1.IntentId
- func (x *RegisterWebhookRequest) GetUrl() string
- func (*RegisterWebhookRequest) ProtoMessage()
- func (x *RegisterWebhookRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterWebhookRequest) Reset()
- func (x *RegisterWebhookRequest) String() string
- func (m *RegisterWebhookRequest) Validate() error
- type RegisterWebhookRequestValidationError
- func (e RegisterWebhookRequestValidationError) Cause() error
- func (e RegisterWebhookRequestValidationError) Error() string
- func (e RegisterWebhookRequestValidationError) ErrorName() string
- func (e RegisterWebhookRequestValidationError) Field() string
- func (e RegisterWebhookRequestValidationError) Key() bool
- func (e RegisterWebhookRequestValidationError) Reason() string
- type RegisterWebhookResponse
- func (*RegisterWebhookResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterWebhookResponse) GetResult() RegisterWebhookResponse_Result
- func (*RegisterWebhookResponse) ProtoMessage()
- func (x *RegisterWebhookResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterWebhookResponse) Reset()
- func (x *RegisterWebhookResponse) String() string
- func (m *RegisterWebhookResponse) Validate() error
- type RegisterWebhookResponseValidationError
- func (e RegisterWebhookResponseValidationError) Cause() error
- func (e RegisterWebhookResponseValidationError) Error() string
- func (e RegisterWebhookResponseValidationError) ErrorName() string
- func (e RegisterWebhookResponseValidationError) Field() string
- func (e RegisterWebhookResponseValidationError) Key() bool
- func (e RegisterWebhookResponseValidationError) Reason() string
- type RegisterWebhookResponse_Result
- func (RegisterWebhookResponse_Result) Descriptor() protoreflect.EnumDescriptor
- func (x RegisterWebhookResponse_Result) Enum() *RegisterWebhookResponse_Result
- func (RegisterWebhookResponse_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x RegisterWebhookResponse_Result) Number() protoreflect.EnumNumber
- func (x RegisterWebhookResponse_Result) String() string
- func (RegisterWebhookResponse_Result) Type() protoreflect.EnumType
- type UnimplementedMicroPaymentServer
- func (UnimplementedMicroPaymentServer) Codify(context.Context, *CodifyRequest) (*CodifyResponse, error)
- func (UnimplementedMicroPaymentServer) GetPathMetadata(context.Context, *GetPathMetadataRequest) (*GetPathMetadataResponse, error)
- func (UnimplementedMicroPaymentServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error)
- func (UnimplementedMicroPaymentServer) RegisterWebhook(context.Context, *RegisterWebhookRequest) (*RegisterWebhookResponse, error)
- type UnsafeMicroPaymentServer
Constants ¶
This section is empty.
Variables ¶
var ( RegisterWebhookResponse_Result_name = map[int32]string{ 0: "OK", 1: "ALREADY_REGISTERED", 2: "REQUEST_NOT_FOUND", 3: "INTENT_EXISTS", 4: "INVALID_URL", } RegisterWebhookResponse_Result_value = map[string]int32{ "OK": 0, "ALREADY_REGISTERED": 1, "REQUEST_NOT_FOUND": 2, "INTENT_EXISTS": 3, "INVALID_URL": 4, } )
Enum value maps for RegisterWebhookResponse_Result.
var ( CodifyResponse_Result_name = map[int32]string{ 0: "OK", 1: "INVALID_URL", 2: "INVALID_ACCOUNT", 3: "UNSUPPORTED_CURRENCY", 4: "NATIVE_AMOUNT_EXCEEDS_LIMIT", } CodifyResponse_Result_value = map[string]int32{ "OK": 0, "INVALID_URL": 1, "INVALID_ACCOUNT": 2, "UNSUPPORTED_CURRENCY": 3, "NATIVE_AMOUNT_EXCEEDS_LIMIT": 4, } )
Enum value maps for CodifyResponse_Result.
var ( GetPathMetadataResponse_Result_name = map[int32]string{ 0: "OK", 1: "NOT_FOUND", } GetPathMetadataResponse_Result_value = map[string]int32{ "OK": 0, "NOT_FOUND": 1, } )
Enum value maps for GetPathMetadataResponse_Result.
var File_micropayment_v1_micro_payment_service_proto protoreflect.FileDescriptor
var MicroPayment_ServiceDesc = grpc.ServiceDesc{ ServiceName: "code.micropayment.v1.MicroPayment", HandlerType: (*MicroPaymentServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetStatus", Handler: _MicroPayment_GetStatus_Handler, }, { MethodName: "RegisterWebhook", Handler: _MicroPayment_RegisterWebhook_Handler, }, { MethodName: "Codify", Handler: _MicroPayment_Codify_Handler, }, { MethodName: "GetPathMetadata", Handler: _MicroPayment_GetPathMetadata_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "micropayment/v1/micro_payment_service.proto", }
MicroPayment_ServiceDesc is the grpc.ServiceDesc for MicroPayment service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMicroPaymentServer ¶
func RegisterMicroPaymentServer(s grpc.ServiceRegistrar, srv MicroPaymentServer)
Types ¶
type CodifyRequest ¶
type CodifyRequest struct { // The URL to Codify Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // ISO 4217 alpha-3 currency code the payment should be made in Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` // The amount that should be paid in the native currency NativeAmount float64 `protobuf:"fixed64,3,opt,name=native_amount,json=nativeAmount,proto3" json:"native_amount,omitempty"` // The verified owner account public key OwnerAccount *v1.SolanaAccountId `protobuf:"bytes,4,opt,name=owner_account,json=ownerAccount,proto3" json:"owner_account,omitempty"` // The primary account public key where payment will be sent PrimaryAccount *v1.SolanaAccountId `protobuf:"bytes,5,opt,name=primary_account,json=primaryAccount,proto3" json:"primary_account,omitempty"` // The signature is of serialize(CodifyRequest) without this field set using the // private key of the owner account. This provides an authentication mechanism // to the RPC and can be used to validate payment details. Signature *v1.Signature `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
func (*CodifyRequest) Descriptor
deprecated
func (*CodifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use CodifyRequest.ProtoReflect.Descriptor instead.
func (*CodifyRequest) GetCurrency ¶
func (x *CodifyRequest) GetCurrency() string
func (*CodifyRequest) GetNativeAmount ¶
func (x *CodifyRequest) GetNativeAmount() float64
func (*CodifyRequest) GetOwnerAccount ¶
func (x *CodifyRequest) GetOwnerAccount() *v1.SolanaAccountId
func (*CodifyRequest) GetPrimaryAccount ¶
func (x *CodifyRequest) GetPrimaryAccount() *v1.SolanaAccountId
func (*CodifyRequest) GetSignature ¶
func (x *CodifyRequest) GetSignature() *v1.Signature
func (*CodifyRequest) GetUrl ¶
func (x *CodifyRequest) GetUrl() string
func (*CodifyRequest) ProtoMessage ¶
func (*CodifyRequest) ProtoMessage()
func (*CodifyRequest) ProtoReflect ¶
func (x *CodifyRequest) ProtoReflect() protoreflect.Message
func (*CodifyRequest) Reset ¶
func (x *CodifyRequest) Reset()
func (*CodifyRequest) String ¶
func (x *CodifyRequest) String() string
func (*CodifyRequest) Validate ¶
func (m *CodifyRequest) Validate() error
Validate checks the field values on CodifyRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type CodifyRequestValidationError ¶
type CodifyRequestValidationError struct {
// contains filtered or unexported fields
}
CodifyRequestValidationError is the validation error returned by CodifyRequest.Validate if the designated constraints aren't met.
func (CodifyRequestValidationError) Cause ¶
func (e CodifyRequestValidationError) Cause() error
Cause function returns cause value.
func (CodifyRequestValidationError) Error ¶
func (e CodifyRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CodifyRequestValidationError) ErrorName ¶
func (e CodifyRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CodifyRequestValidationError) Field ¶
func (e CodifyRequestValidationError) Field() string
Field function returns field value.
func (CodifyRequestValidationError) Key ¶
func (e CodifyRequestValidationError) Key() bool
Key function returns key value.
func (CodifyRequestValidationError) Reason ¶
func (e CodifyRequestValidationError) Reason() string
Reason function returns reason value.
type CodifyResponse ¶
type CodifyResponse struct { Result CodifyResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.micropayment.v1.CodifyResponse_Result" json:"result,omitempty"` // The URL to view the content with a Code micro paywall CodifiedUrl string `protobuf:"bytes,2,opt,name=codified_url,json=codifiedUrl,proto3" json:"codified_url,omitempty"` // contains filtered or unexported fields }
func (*CodifyResponse) Descriptor
deprecated
func (*CodifyResponse) Descriptor() ([]byte, []int)
Deprecated: Use CodifyResponse.ProtoReflect.Descriptor instead.
func (*CodifyResponse) GetCodifiedUrl ¶
func (x *CodifyResponse) GetCodifiedUrl() string
func (*CodifyResponse) GetResult ¶
func (x *CodifyResponse) GetResult() CodifyResponse_Result
func (*CodifyResponse) ProtoMessage ¶
func (*CodifyResponse) ProtoMessage()
func (*CodifyResponse) ProtoReflect ¶
func (x *CodifyResponse) ProtoReflect() protoreflect.Message
func (*CodifyResponse) Reset ¶
func (x *CodifyResponse) Reset()
func (*CodifyResponse) String ¶
func (x *CodifyResponse) String() string
func (*CodifyResponse) Validate ¶
func (m *CodifyResponse) Validate() error
Validate checks the field values on CodifyResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type CodifyResponseValidationError ¶
type CodifyResponseValidationError struct {
// contains filtered or unexported fields
}
CodifyResponseValidationError is the validation error returned by CodifyResponse.Validate if the designated constraints aren't met.
func (CodifyResponseValidationError) Cause ¶
func (e CodifyResponseValidationError) Cause() error
Cause function returns cause value.
func (CodifyResponseValidationError) Error ¶
func (e CodifyResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CodifyResponseValidationError) ErrorName ¶
func (e CodifyResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CodifyResponseValidationError) Field ¶
func (e CodifyResponseValidationError) Field() string
Field function returns field value.
func (CodifyResponseValidationError) Key ¶
func (e CodifyResponseValidationError) Key() bool
Key function returns key value.
func (CodifyResponseValidationError) Reason ¶
func (e CodifyResponseValidationError) Reason() string
Reason function returns reason value.
type CodifyResponse_Result ¶
type CodifyResponse_Result int32
const ( CodifyResponse_OK CodifyResponse_Result = 0 // The URL to Codify is invalid CodifyResponse_INVALID_URL CodifyResponse_Result = 1 // The primary account is invalid CodifyResponse_INVALID_ACCOUNT CodifyResponse_Result = 2 // The currency isn't supported for micro payments CodifyResponse_UNSUPPORTED_CURRENCY CodifyResponse_Result = 3 // The payment amount exceeds the minimum/maximum allowed amount CodifyResponse_NATIVE_AMOUNT_EXCEEDS_LIMIT CodifyResponse_Result = 4 )
func (CodifyResponse_Result) Descriptor ¶
func (CodifyResponse_Result) Descriptor() protoreflect.EnumDescriptor
func (CodifyResponse_Result) Enum ¶
func (x CodifyResponse_Result) Enum() *CodifyResponse_Result
func (CodifyResponse_Result) EnumDescriptor
deprecated
func (CodifyResponse_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use CodifyResponse_Result.Descriptor instead.
func (CodifyResponse_Result) Number ¶
func (x CodifyResponse_Result) Number() protoreflect.EnumNumber
func (CodifyResponse_Result) String ¶
func (x CodifyResponse_Result) String() string
func (CodifyResponse_Result) Type ¶
func (CodifyResponse_Result) Type() protoreflect.EnumType
type GetPathMetadataRequest ¶
type GetPathMetadataRequest struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
func (*GetPathMetadataRequest) Descriptor
deprecated
func (*GetPathMetadataRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPathMetadataRequest.ProtoReflect.Descriptor instead.
func (*GetPathMetadataRequest) GetPath ¶
func (x *GetPathMetadataRequest) GetPath() string
func (*GetPathMetadataRequest) ProtoMessage ¶
func (*GetPathMetadataRequest) ProtoMessage()
func (*GetPathMetadataRequest) ProtoReflect ¶
func (x *GetPathMetadataRequest) ProtoReflect() protoreflect.Message
func (*GetPathMetadataRequest) Reset ¶
func (x *GetPathMetadataRequest) Reset()
func (*GetPathMetadataRequest) String ¶
func (x *GetPathMetadataRequest) String() string
func (*GetPathMetadataRequest) Validate ¶
func (m *GetPathMetadataRequest) Validate() error
Validate checks the field values on GetPathMetadataRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetPathMetadataRequestValidationError ¶
type GetPathMetadataRequestValidationError struct {
// contains filtered or unexported fields
}
GetPathMetadataRequestValidationError is the validation error returned by GetPathMetadataRequest.Validate if the designated constraints aren't met.
func (GetPathMetadataRequestValidationError) Cause ¶
func (e GetPathMetadataRequestValidationError) Cause() error
Cause function returns cause value.
func (GetPathMetadataRequestValidationError) Error ¶
func (e GetPathMetadataRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetPathMetadataRequestValidationError) ErrorName ¶
func (e GetPathMetadataRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetPathMetadataRequestValidationError) Field ¶
func (e GetPathMetadataRequestValidationError) Field() string
Field function returns field value.
func (GetPathMetadataRequestValidationError) Key ¶
func (e GetPathMetadataRequestValidationError) Key() bool
Key function returns key value.
func (GetPathMetadataRequestValidationError) Reason ¶
func (e GetPathMetadataRequestValidationError) Reason() string
Reason function returns reason value.
type GetPathMetadataResponse ¶
type GetPathMetadataResponse struct { Result GetPathMetadataResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.micropayment.v1.GetPathMetadataResponse_Result" json:"result,omitempty"` // The account where the payment should be sent to Destination *v1.SolanaAccountId `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` // ISO 4217 alpha-3 currency code the payment should be made in Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` // The amount that should be paid in the native currency NativeAmount float64 `protobuf:"fixed64,4,opt,name=native_amount,json=nativeAmount,proto3" json:"native_amount,omitempty"` // The URL to redirect upon successful payment RedirctUrl string `protobuf:"bytes,5,opt,name=redirct_url,json=redirctUrl,proto3" json:"redirct_url,omitempty"` // contains filtered or unexported fields }
func (*GetPathMetadataResponse) Descriptor
deprecated
func (*GetPathMetadataResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPathMetadataResponse.ProtoReflect.Descriptor instead.
func (*GetPathMetadataResponse) GetCurrency ¶
func (x *GetPathMetadataResponse) GetCurrency() string
func (*GetPathMetadataResponse) GetDestination ¶
func (x *GetPathMetadataResponse) GetDestination() *v1.SolanaAccountId
func (*GetPathMetadataResponse) GetNativeAmount ¶
func (x *GetPathMetadataResponse) GetNativeAmount() float64
func (*GetPathMetadataResponse) GetRedirctUrl ¶
func (x *GetPathMetadataResponse) GetRedirctUrl() string
func (*GetPathMetadataResponse) GetResult ¶
func (x *GetPathMetadataResponse) GetResult() GetPathMetadataResponse_Result
func (*GetPathMetadataResponse) ProtoMessage ¶
func (*GetPathMetadataResponse) ProtoMessage()
func (*GetPathMetadataResponse) ProtoReflect ¶
func (x *GetPathMetadataResponse) ProtoReflect() protoreflect.Message
func (*GetPathMetadataResponse) Reset ¶
func (x *GetPathMetadataResponse) Reset()
func (*GetPathMetadataResponse) String ¶
func (x *GetPathMetadataResponse) String() string
func (*GetPathMetadataResponse) Validate ¶
func (m *GetPathMetadataResponse) Validate() error
Validate checks the field values on GetPathMetadataResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetPathMetadataResponseValidationError ¶
type GetPathMetadataResponseValidationError struct {
// contains filtered or unexported fields
}
GetPathMetadataResponseValidationError is the validation error returned by GetPathMetadataResponse.Validate if the designated constraints aren't met.
func (GetPathMetadataResponseValidationError) Cause ¶
func (e GetPathMetadataResponseValidationError) Cause() error
Cause function returns cause value.
func (GetPathMetadataResponseValidationError) Error ¶
func (e GetPathMetadataResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetPathMetadataResponseValidationError) ErrorName ¶
func (e GetPathMetadataResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetPathMetadataResponseValidationError) Field ¶
func (e GetPathMetadataResponseValidationError) Field() string
Field function returns field value.
func (GetPathMetadataResponseValidationError) Key ¶
func (e GetPathMetadataResponseValidationError) Key() bool
Key function returns key value.
func (GetPathMetadataResponseValidationError) Reason ¶
func (e GetPathMetadataResponseValidationError) Reason() string
Reason function returns reason value.
type GetPathMetadataResponse_Result ¶
type GetPathMetadataResponse_Result int32
const ( GetPathMetadataResponse_OK GetPathMetadataResponse_Result = 0 GetPathMetadataResponse_NOT_FOUND GetPathMetadataResponse_Result = 1 )
func (GetPathMetadataResponse_Result) Descriptor ¶
func (GetPathMetadataResponse_Result) Descriptor() protoreflect.EnumDescriptor
func (GetPathMetadataResponse_Result) Enum ¶
func (x GetPathMetadataResponse_Result) Enum() *GetPathMetadataResponse_Result
func (GetPathMetadataResponse_Result) EnumDescriptor
deprecated
func (GetPathMetadataResponse_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use GetPathMetadataResponse_Result.Descriptor instead.
func (GetPathMetadataResponse_Result) Number ¶
func (x GetPathMetadataResponse_Result) Number() protoreflect.EnumNumber
func (GetPathMetadataResponse_Result) String ¶
func (x GetPathMetadataResponse_Result) String() string
func (GetPathMetadataResponse_Result) Type ¶
func (GetPathMetadataResponse_Result) Type() protoreflect.EnumType
type GetStatusRequest ¶
type GetStatusRequest struct { IntentId *v1.IntentId `protobuf:"bytes,1,opt,name=intent_id,json=intentId,proto3" json:"intent_id,omitempty"` // contains filtered or unexported fields }
func (*GetStatusRequest) Descriptor
deprecated
func (*GetStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStatusRequest.ProtoReflect.Descriptor instead.
func (*GetStatusRequest) GetIntentId ¶
func (x *GetStatusRequest) GetIntentId() *v1.IntentId
func (*GetStatusRequest) ProtoMessage ¶
func (*GetStatusRequest) ProtoMessage()
func (*GetStatusRequest) ProtoReflect ¶
func (x *GetStatusRequest) ProtoReflect() protoreflect.Message
func (*GetStatusRequest) Reset ¶
func (x *GetStatusRequest) Reset()
func (*GetStatusRequest) String ¶
func (x *GetStatusRequest) String() string
func (*GetStatusRequest) Validate ¶
func (m *GetStatusRequest) Validate() error
Validate checks the field values on GetStatusRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetStatusRequestValidationError ¶
type GetStatusRequestValidationError struct {
// contains filtered or unexported fields
}
GetStatusRequestValidationError is the validation error returned by GetStatusRequest.Validate if the designated constraints aren't met.
func (GetStatusRequestValidationError) Cause ¶
func (e GetStatusRequestValidationError) Cause() error
Cause function returns cause value.
func (GetStatusRequestValidationError) Error ¶
func (e GetStatusRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetStatusRequestValidationError) ErrorName ¶
func (e GetStatusRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetStatusRequestValidationError) Field ¶
func (e GetStatusRequestValidationError) Field() string
Field function returns field value.
func (GetStatusRequestValidationError) Key ¶
func (e GetStatusRequestValidationError) Key() bool
Key function returns key value.
func (GetStatusRequestValidationError) Reason ¶
func (e GetStatusRequestValidationError) Reason() string
Reason function returns reason value.
type GetStatusResponse ¶
type GetStatusResponse struct { // Does the payment request exist? Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` // Has the user scanned the code at least once? CodeScanned bool `protobuf:"varint,2,opt,name=code_scanned,json=codeScanned,proto3" json:"code_scanned,omitempty"` // Has the user sumbmitted a payment? IntentSubmitted bool `protobuf:"varint,3,opt,name=intent_submitted,json=intentSubmitted,proto3" json:"intent_submitted,omitempty"` // contains filtered or unexported fields }
func (*GetStatusResponse) Descriptor
deprecated
func (*GetStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStatusResponse.ProtoReflect.Descriptor instead.
func (*GetStatusResponse) GetCodeScanned ¶
func (x *GetStatusResponse) GetCodeScanned() bool
func (*GetStatusResponse) GetExists ¶
func (x *GetStatusResponse) GetExists() bool
func (*GetStatusResponse) GetIntentSubmitted ¶
func (x *GetStatusResponse) GetIntentSubmitted() bool
func (*GetStatusResponse) ProtoMessage ¶
func (*GetStatusResponse) ProtoMessage()
func (*GetStatusResponse) ProtoReflect ¶
func (x *GetStatusResponse) ProtoReflect() protoreflect.Message
func (*GetStatusResponse) Reset ¶
func (x *GetStatusResponse) Reset()
func (*GetStatusResponse) String ¶
func (x *GetStatusResponse) String() string
func (*GetStatusResponse) Validate ¶
func (m *GetStatusResponse) Validate() error
Validate checks the field values on GetStatusResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetStatusResponseValidationError ¶
type GetStatusResponseValidationError struct {
// contains filtered or unexported fields
}
GetStatusResponseValidationError is the validation error returned by GetStatusResponse.Validate if the designated constraints aren't met.
func (GetStatusResponseValidationError) Cause ¶
func (e GetStatusResponseValidationError) Cause() error
Cause function returns cause value.
func (GetStatusResponseValidationError) Error ¶
func (e GetStatusResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetStatusResponseValidationError) ErrorName ¶
func (e GetStatusResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetStatusResponseValidationError) Field ¶
func (e GetStatusResponseValidationError) Field() string
Field function returns field value.
func (GetStatusResponseValidationError) Key ¶
func (e GetStatusResponseValidationError) Key() bool
Key function returns key value.
func (GetStatusResponseValidationError) Reason ¶
func (e GetStatusResponseValidationError) Reason() string
Reason function returns reason value.
type MicroPaymentClient ¶
type MicroPaymentClient interface { // GetStatus gets basic request status GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) // RegisterWebhook registers a webhook for a request // // todo: Once Kik codes can encode the entire payment request details, we can // // remove the messaging service component and have a Create RPC that // reserves the intent ID with payment details, plus registers the webhook // at the same time. Until that's possible, we're stuck with two RPC calls. RegisterWebhook(ctx context.Context, in *RegisterWebhookRequest, opts ...grpc.CallOption) (*RegisterWebhookResponse, error) // Codify adds a trial micro paywall to any URL Codify(ctx context.Context, in *CodifyRequest, opts ...grpc.CallOption) (*CodifyResponse, error) // GetPathMetadata gets codified website metadata for a given path // // Important Note: This RPC's current implementation is insecure and // it's sole design is to enable PoC and trials. GetPathMetadata(ctx context.Context, in *GetPathMetadataRequest, opts ...grpc.CallOption) (*GetPathMetadataResponse, error) }
MicroPaymentClient is the client API for MicroPayment 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 NewMicroPaymentClient ¶
func NewMicroPaymentClient(cc grpc.ClientConnInterface) MicroPaymentClient
type MicroPaymentServer ¶
type MicroPaymentServer interface { // GetStatus gets basic request status GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) // RegisterWebhook registers a webhook for a request // // todo: Once Kik codes can encode the entire payment request details, we can // // remove the messaging service component and have a Create RPC that // reserves the intent ID with payment details, plus registers the webhook // at the same time. Until that's possible, we're stuck with two RPC calls. RegisterWebhook(context.Context, *RegisterWebhookRequest) (*RegisterWebhookResponse, error) // Codify adds a trial micro paywall to any URL Codify(context.Context, *CodifyRequest) (*CodifyResponse, error) // GetPathMetadata gets codified website metadata for a given path // // Important Note: This RPC's current implementation is insecure and // it's sole design is to enable PoC and trials. GetPathMetadata(context.Context, *GetPathMetadataRequest) (*GetPathMetadataResponse, error) // contains filtered or unexported methods }
MicroPaymentServer is the server API for MicroPayment service. All implementations must embed UnimplementedMicroPaymentServer for forward compatibility
type RegisterWebhookRequest ¶
type RegisterWebhookRequest struct { IntentId *v1.IntentId `protobuf:"bytes,1,opt,name=intent_id,json=intentId,proto3" json:"intent_id,omitempty"` Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*RegisterWebhookRequest) Descriptor
deprecated
func (*RegisterWebhookRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterWebhookRequest.ProtoReflect.Descriptor instead.
func (*RegisterWebhookRequest) GetIntentId ¶
func (x *RegisterWebhookRequest) GetIntentId() *v1.IntentId
func (*RegisterWebhookRequest) GetUrl ¶
func (x *RegisterWebhookRequest) GetUrl() string
func (*RegisterWebhookRequest) ProtoMessage ¶
func (*RegisterWebhookRequest) ProtoMessage()
func (*RegisterWebhookRequest) ProtoReflect ¶
func (x *RegisterWebhookRequest) ProtoReflect() protoreflect.Message
func (*RegisterWebhookRequest) Reset ¶
func (x *RegisterWebhookRequest) Reset()
func (*RegisterWebhookRequest) String ¶
func (x *RegisterWebhookRequest) String() string
func (*RegisterWebhookRequest) Validate ¶
func (m *RegisterWebhookRequest) Validate() error
Validate checks the field values on RegisterWebhookRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type RegisterWebhookRequestValidationError ¶
type RegisterWebhookRequestValidationError struct {
// contains filtered or unexported fields
}
RegisterWebhookRequestValidationError is the validation error returned by RegisterWebhookRequest.Validate if the designated constraints aren't met.
func (RegisterWebhookRequestValidationError) Cause ¶
func (e RegisterWebhookRequestValidationError) Cause() error
Cause function returns cause value.
func (RegisterWebhookRequestValidationError) Error ¶
func (e RegisterWebhookRequestValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterWebhookRequestValidationError) ErrorName ¶
func (e RegisterWebhookRequestValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterWebhookRequestValidationError) Field ¶
func (e RegisterWebhookRequestValidationError) Field() string
Field function returns field value.
func (RegisterWebhookRequestValidationError) Key ¶
func (e RegisterWebhookRequestValidationError) Key() bool
Key function returns key value.
func (RegisterWebhookRequestValidationError) Reason ¶
func (e RegisterWebhookRequestValidationError) Reason() string
Reason function returns reason value.
type RegisterWebhookResponse ¶
type RegisterWebhookResponse struct { Result RegisterWebhookResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.micropayment.v1.RegisterWebhookResponse_Result" json:"result,omitempty"` // contains filtered or unexported fields }
func (*RegisterWebhookResponse) Descriptor
deprecated
func (*RegisterWebhookResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterWebhookResponse.ProtoReflect.Descriptor instead.
func (*RegisterWebhookResponse) GetResult ¶
func (x *RegisterWebhookResponse) GetResult() RegisterWebhookResponse_Result
func (*RegisterWebhookResponse) ProtoMessage ¶
func (*RegisterWebhookResponse) ProtoMessage()
func (*RegisterWebhookResponse) ProtoReflect ¶
func (x *RegisterWebhookResponse) ProtoReflect() protoreflect.Message
func (*RegisterWebhookResponse) Reset ¶
func (x *RegisterWebhookResponse) Reset()
func (*RegisterWebhookResponse) String ¶
func (x *RegisterWebhookResponse) String() string
func (*RegisterWebhookResponse) Validate ¶
func (m *RegisterWebhookResponse) Validate() error
Validate checks the field values on RegisterWebhookResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type RegisterWebhookResponseValidationError ¶
type RegisterWebhookResponseValidationError struct {
// contains filtered or unexported fields
}
RegisterWebhookResponseValidationError is the validation error returned by RegisterWebhookResponse.Validate if the designated constraints aren't met.
func (RegisterWebhookResponseValidationError) Cause ¶
func (e RegisterWebhookResponseValidationError) Cause() error
Cause function returns cause value.
func (RegisterWebhookResponseValidationError) Error ¶
func (e RegisterWebhookResponseValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterWebhookResponseValidationError) ErrorName ¶
func (e RegisterWebhookResponseValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterWebhookResponseValidationError) Field ¶
func (e RegisterWebhookResponseValidationError) Field() string
Field function returns field value.
func (RegisterWebhookResponseValidationError) Key ¶
func (e RegisterWebhookResponseValidationError) Key() bool
Key function returns key value.
func (RegisterWebhookResponseValidationError) Reason ¶
func (e RegisterWebhookResponseValidationError) Reason() string
Reason function returns reason value.
type RegisterWebhookResponse_Result ¶
type RegisterWebhookResponse_Result int32
const ( RegisterWebhookResponse_OK RegisterWebhookResponse_Result = 0 // A webhook has already been registered RegisterWebhookResponse_ALREADY_REGISTERED RegisterWebhookResponse_Result = 1 // A request does not exist for the provided intent ID RegisterWebhookResponse_REQUEST_NOT_FOUND RegisterWebhookResponse_Result = 2 // A user has already submitted a payment RegisterWebhookResponse_INTENT_EXISTS RegisterWebhookResponse_Result = 3 // The webhook URL is invalid RegisterWebhookResponse_INVALID_URL RegisterWebhookResponse_Result = 4 )
func (RegisterWebhookResponse_Result) Descriptor ¶
func (RegisterWebhookResponse_Result) Descriptor() protoreflect.EnumDescriptor
func (RegisterWebhookResponse_Result) Enum ¶
func (x RegisterWebhookResponse_Result) Enum() *RegisterWebhookResponse_Result
func (RegisterWebhookResponse_Result) EnumDescriptor
deprecated
func (RegisterWebhookResponse_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use RegisterWebhookResponse_Result.Descriptor instead.
func (RegisterWebhookResponse_Result) Number ¶
func (x RegisterWebhookResponse_Result) Number() protoreflect.EnumNumber
func (RegisterWebhookResponse_Result) String ¶
func (x RegisterWebhookResponse_Result) String() string
func (RegisterWebhookResponse_Result) Type ¶
func (RegisterWebhookResponse_Result) Type() protoreflect.EnumType
type UnimplementedMicroPaymentServer ¶
type UnimplementedMicroPaymentServer struct { }
UnimplementedMicroPaymentServer must be embedded to have forward compatible implementations.
func (UnimplementedMicroPaymentServer) Codify ¶
func (UnimplementedMicroPaymentServer) Codify(context.Context, *CodifyRequest) (*CodifyResponse, error)
func (UnimplementedMicroPaymentServer) GetPathMetadata ¶
func (UnimplementedMicroPaymentServer) GetPathMetadata(context.Context, *GetPathMetadataRequest) (*GetPathMetadataResponse, error)
func (UnimplementedMicroPaymentServer) GetStatus ¶
func (UnimplementedMicroPaymentServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error)
func (UnimplementedMicroPaymentServer) RegisterWebhook ¶
func (UnimplementedMicroPaymentServer) RegisterWebhook(context.Context, *RegisterWebhookRequest) (*RegisterWebhookResponse, error)
type UnsafeMicroPaymentServer ¶
type UnsafeMicroPaymentServer interface {
// contains filtered or unexported methods
}
UnsafeMicroPaymentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MicroPaymentServer will result in compilation errors.