Documentation ¶
Index ¶
- Constants
- Variables
- type Activity
- type ActivityService
- type Agreement
- type AgreementDetails
- type Allocation
- type AllocationDetails
- type Batch
- type BatchTimeoutError
- type CommandExecutionError
- type Configuration
- func (c *Configuration) Activity() *yaa.APIClient
- func (c *Configuration) ActivityUrl() string
- func (c *Configuration) AppKey() string
- func (c *Configuration) Market() *yam.APIClient
- func (c *Configuration) MarketUrl() string
- func (c *Configuration) Payment() *yap.APIClient
- func (c *Configuration) PaymentUrl() string
- func (c *Configuration) Url() string
- type DebitNote
- type Invoice
- type Market
- type MissingConfiguration
- type OfferProposal
- func (o *OfferProposal) CreateAgreement(ctx context.Context, timeout time.Duration) (*Agreement, error)
- func (o *OfferProposal) Id() string
- func (o *OfferProposal) IsDraft() bool
- func (o *OfferProposal) Issuer() string
- func (o *OfferProposal) Props() props.Props
- func (o *OfferProposal) Reject(reason string) error
- func (o *OfferProposal) Respond(props props.Props, constraints string) (string, error)
- func (o *OfferProposal) String() string
- type Payment
- func (p *Payment) Accounts(ctx context.Context, allocationId string) ([]yap.Account, error)
- func (p *Payment) Allocation(ctx context.Context, allocationId string) (*Allocation, error)
- func (p *Payment) Allocations(ctx context.Context) ([]Allocation, error)
- func (p *Payment) DebitNote(ctx context.Context, debitNoteId string) (*DebitNote, error)
- func (p *Payment) DecorateDemand(ctx context.Context, ids []string) (*yap.MarketDecoration, error)
- func (p *Payment) IncomingDebitNotes(ctx context.Context) (chan *DebitNote, error)
- func (p *Payment) IncomingInvoice(ctx context.Context) (chan *Invoice, error)
- func (p *Payment) Invoice(ctx context.Context, invoiceId string) (*Invoice, error)
- func (p *Payment) Invoices(ctx context.Context) ([]Invoice, error)
- func (p *Payment) NewAllocation(amount decimal.Decimal, paymentPlatform string, paymentAddress string, ...) *allocationTask
- type Poller
- type PollingBatch
- type Resourcer
- type Result
- type StreamingBatch
- type Subscription
- func (s *Subscription) Close()
- func (s *Subscription) Delete() error
- func (s *Subscription) Events(ctx context.Context) chan *OfferProposal
- func (s *Subscription) Id() string
- func (s *Subscription) Start() error
- func (s *Subscription) Stop(excType, excValue, traceback interface{}) error
- func (s *Subscription) ValidateDetails() error
Constants ¶
View Source
const ComponentName = "rest"
View Source
const (
DefaultYagnaApiUrl = "http://127.0.0.1:7465"
)
View Source
const Slots = "_api"
Variables ¶
View Source
var (
OfferProposalSlots = []string{"_proposal", "_subscription"}
)
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { *ActivityService // contains filtered or unexported fields }
func (*Activity) DestroyActivity ¶
func (a *Activity) DestroyActivity(excType, excVal, excTb interface{})
type ActivityService ¶
type ActivityService struct {
// contains filtered or unexported fields
}
ActivityService
func NewActivityService ¶
func (*ActivityService) NewActivity ¶
func (as *ActivityService) NewActivity(agreementId string) (*Activity, error)
type Agreement ¶
type Agreement struct {
// contains filtered or unexported fields
}
func (*Agreement) Details ¶
func (a *Agreement) Details() (*AgreementDetails, error)
type AgreementDetails ¶
func (*AgreementDetails) ProviderView ¶
func (ad *AgreementDetails) ProviderView() *view
func (*AgreementDetails) RequesterView ¶
func (ad *AgreementDetails) RequesterView() *view
type Allocation ¶
type Allocation struct { Id string Amount decimal.Decimal PaymentPlatform string PaymentAddress string Expires time.Time // contains filtered or unexported fields }
func (*Allocation) Delete ¶
func (a *Allocation) Delete() error
func (*Allocation) Details ¶
func (a *Allocation) Details() (*AllocationDetails, error)
type AllocationDetails ¶
type AllocationDetails struct {
// contains filtered or unexported fields
}
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
func (*Batch) SecondsLeft ¶
type BatchTimeoutError ¶
type BatchTimeoutError struct { }
func (*BatchTimeoutError) Error ¶
func (b *BatchTimeoutError) Error() string
type CommandExecutionError ¶
func (CommandExecutionError) Error ¶
func (c CommandExecutionError) Error() string
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func NewConfiguration ¶
func (*Configuration) Activity ¶
func (c *Configuration) Activity() *yaa.APIClient
func (*Configuration) ActivityUrl ¶
func (c *Configuration) ActivityUrl() string
func (*Configuration) AppKey ¶
func (c *Configuration) AppKey() string
func (*Configuration) Market ¶
func (c *Configuration) Market() *yam.APIClient
func (*Configuration) MarketUrl ¶
func (c *Configuration) MarketUrl() string
func (*Configuration) Payment ¶
func (c *Configuration) Payment() *yap.APIClient
func (*Configuration) PaymentUrl ¶
func (c *Configuration) PaymentUrl() string
func (*Configuration) Url ¶
func (c *Configuration) Url() string
type DebitNote ¶
type DebitNote struct {
// contains filtered or unexported fields
}
func NewDebitNote ¶
type Market ¶
type Market struct {
// contains filtered or unexported fields
}
func (*Market) Subscriptions ¶
func (m *Market) Subscriptions() ([]Subscription, error)
type MissingConfiguration ¶
type MissingConfiguration struct {
// contains filtered or unexported fields
}
func (*MissingConfiguration) Error ¶
func (e *MissingConfiguration) Error() string
type OfferProposal ¶
type OfferProposal struct {
// contains filtered or unexported fields
}
func (*OfferProposal) CreateAgreement ¶
func (*OfferProposal) Id ¶
func (o *OfferProposal) Id() string
func (*OfferProposal) IsDraft ¶
func (o *OfferProposal) IsDraft() bool
func (*OfferProposal) Issuer ¶
func (o *OfferProposal) Issuer() string
func (*OfferProposal) Props ¶
func (o *OfferProposal) Props() props.Props
func (*OfferProposal) Reject ¶
func (o *OfferProposal) Reject(reason string) error
func (*OfferProposal) String ¶
func (o *OfferProposal) String() string
type Payment ¶
type Payment struct {
// contains filtered or unexported fields
}
func NewPayment ¶
func (*Payment) Allocation ¶
func (*Payment) Allocations ¶
func (p *Payment) Allocations(ctx context.Context) ([]Allocation, error)
func (*Payment) DecorateDemand ¶
func (*Payment) IncomingDebitNotes ¶
func (*Payment) IncomingInvoice ¶
type PollingBatch ¶
type PollingBatch struct {
Batch
}
func NewPollingBatch ¶
func NewPollingBatch(logger log.Logger, api *activity.RequestorControlApiService, activityId, batchId string, size int, deadline time.Time) *PollingBatch
type StreamingBatch ¶
type StreamingBatch struct { Batch // contains filtered or unexported fields }
func NewStreamingBatch ¶
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func NewSubscription ¶
func (*Subscription) Close ¶
func (s *Subscription) Close()
func (*Subscription) Delete ¶
func (s *Subscription) Delete() error
func (*Subscription) Events ¶
func (s *Subscription) Events(ctx context.Context) chan *OfferProposal
func (*Subscription) Id ¶
func (s *Subscription) Id() string
func (*Subscription) Start ¶
func (s *Subscription) Start() error
func (*Subscription) Stop ¶
func (s *Subscription) Stop(excType, excValue, traceback interface{}) error
func (*Subscription) ValidateDetails ¶
func (s *Subscription) ValidateDetails() error
Click to show internal directories.
Click to hide internal directories.