Documentation
¶
Index ¶
- Variables
- func GetPaymentAmount(ctx context.Context, codeData codedata.Provider, intentID *commonpb.IntentId) (uint64, error)
- func LoadPaymentMetadata(ctx context.Context, codeData codedata.Provider, intentID *commonpb.IntentId, ...) (*codeintent.Record, error)
- type CustomAntispamGuard
- type CustomHandler
- type FlipchatAntispamGuard
- type StatusCode
- type Store
- type ValidationResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoPaymentMetadata = errors.New("no payment metdata") ErrInvalidPaymentMetadata = errors.New("invalid payment metadata") )
View Source
var (
ErrAlreadyFulfilled = errors.New("intent id is already fulfilled")
)
Functions ¶
func GetPaymentAmount ¶ added in v1.6.0
Types ¶
type CustomAntispamGuard ¶
type CustomAntispamGuard interface { AllowOpenAccounts(ctx context.Context, owner *codecommon.Account) (bool, string, error) AllowSendPayment(ctx context.Context, owner *codecommon.Account, isPublic bool) (bool, string, error) }
func NewFlipchatAntispamGuard ¶
func NewFlipchatAntispamGuard(accounts account.Store) CustomAntispamGuard
type CustomHandler ¶
type CustomHandler interface {
Validate(ctx context.Context, intentRecord *codeintent.Record, customMetadata proto.Message) (*ValidationResult, error)
}
todo: some way to register a handler to a proto URL
type FlipchatAntispamGuard ¶
type FlipchatAntispamGuard struct {
// contains filtered or unexported fields
}
func (*FlipchatAntispamGuard) AllowOpenAccounts ¶
func (g *FlipchatAntispamGuard) AllowOpenAccounts(ctx context.Context, owner *codecommon.Account) (bool, string, error)
func (*FlipchatAntispamGuard) AllowSendPayment ¶
func (g *FlipchatAntispamGuard) AllowSendPayment(_ context.Context, _ *codecommon.Account, isPublic bool) (bool, string, error)
type ValidationResult ¶
type ValidationResult struct { StatusCode StatusCode ErrorDescription string }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.