Documentation ¶
Index ¶
Constants ¶
View Source
const (
// BootstrappedTransferDetailService is the key to bootstrapped document service
BootstrappedTransferDetailService = "BootstrappedTransferDetailsService"
)
Variables ¶
This section is empty.
Functions ¶
func CreateValidator ¶
func CreateValidator() documents.ValidatorGroup
CreateValidator returns a validator group that should be run before adding the funding extension
Types ¶
type Bootstrapper ¶
type Bootstrapper struct{}
Bootstrapper implements Bootstrapper Interface
func (Bootstrapper) Bootstrap ¶
func (Bootstrapper) Bootstrap(ctx map[string]interface{}) (err error)
Bootstrap adds the funding API handler to the context.
type CreateTransferDetailRequest ¶
CreateTransferDetailRequest holds the required fields to create a new transfer agreement
type Data ¶
type Data struct { TransferID string `json:"transfer_id,omitempty" attr:"bytes"` SenderID string `json:"sender_id,omitempty" attr:"bytes"` RecipientID string `json:"recipient_id,omitempty" attr:"bytes"` ScheduledDate string `json:"scheduled_date,omitempty" attr:"timestamp"` SettlementDate string `json:"settlement_date,omitempty" attr:"timestamp"` SettlementReference string `json:"settlement_reference,omitempty" attr:"bytes"` Amount string `json:"amount,omitempty" attr:"decimal"` Currency string `json:"currency,omitempty" attr:"string"` Status string `json:"status,omitempty" attr:"string"` TransferType string `json:"transfer_type,omitempty" attr:"string"` Data string `json:"data,omitempty" attr:"bytes"` }
Data is the default transfer details extension schema
type Service ¶
type Service interface { // UpdateTransferDetail updates a TransferDetail UpdateTransferDetail(ctx context.Context, req UpdateTransferDetailRequest) (documents.Model, jobs.JobID, error) // CreateTransferDetail derives a TransferDetail from a request payload CreateTransferDetail(ctx context.Context, req CreateTransferDetailRequest) (documents.Model, jobs.JobID, error) // DeriveFundingResponse returns a TransferDetail in client format DeriveTransferDetail(ctx context.Context, model documents.Model, transferID []byte) (*TransferDetail, documents.Model, error) // DeriveFundingListResponse returns a TransferDetail list in client format DeriveTransferList(ctx context.Context, model documents.Model) (*TransferDetailList, documents.Model, error) }
Service defines specific functions for extension funding
func DefaultService ¶
func DefaultService( srv coreapi.Service, tokenRegistry documents.TokenRegistry, ) Service
DefaultService returns the default implementation of the service.
type TransferDetail ¶
type TransferDetail struct {
Data Data
}
TransferDetail holds a TransferDetail response
type TransferDetailList ¶
type TransferDetailList struct {
Data []Data
}
TransferDetailList holds a list of TransferDetails
type UpdateTransferDetailRequest ¶
UpdateTransferDetailRequest holds the required fields to update a transfer agreement
Click to show internal directories.
Click to hide internal directories.