Documentation ¶
Index ¶
- Variables
- func ExhaustiveContractStates(f func(ContractState))
- func ExhaustiveTransferRequestStates(f func(TransferRequestState))
- type Archiver
- type Contract
- func (cn *Contract) Copy() *Contract
- func (cn *Contract) GetAgreement() odrl.Agreement
- func (cn *Contract) GetCallback() *url.URL
- func (cn *Contract) GetConsumerPID() uuid.UUID
- func (cn *Contract) GetContract() *Contract
- func (cn *Contract) GetContractNegotiation() shared.ContractNegotiation
- func (cn *Contract) GetOffer() odrl.Offer
- func (cn *Contract) GetProviderPID() uuid.UUID
- func (cn *Contract) GetRole() DataspaceRole
- func (cn *Contract) GetSelf() *url.URL
- func (cn *Contract) GetState() ContractState
- func (cn *Contract) SetCallback(u string) error
- func (cn *Contract) SetConsumerPID(u uuid.UUID)
- func (cn *Contract) SetProviderPID(u uuid.UUID)
- func (cn *Contract) SetState(state ContractState) error
- type ContractNegotiationAccepted
- func (cd *ContractNegotiationAccepted) GetArchiver() Archiver
- func (cd *ContractNegotiationAccepted) GetProvider() providerv1.ProviderServiceClient
- func (cd *ContractNegotiationAccepted) GetReconciler() *Reconciler
- func (cn *ContractNegotiationAccepted) Recv(ctx context.Context, message any) (context.Context, ContractNegotiationState, error)
- func (cn *ContractNegotiationAccepted) Send(ctx context.Context) (func(), error)
- type ContractNegotiationAgreed
- func (cd *ContractNegotiationAgreed) GetArchiver() Archiver
- func (cd *ContractNegotiationAgreed) GetProvider() providerv1.ProviderServiceClient
- func (cd *ContractNegotiationAgreed) GetReconciler() *Reconciler
- func (cn *ContractNegotiationAgreed) Recv(ctx context.Context, message any) (context.Context, ContractNegotiationState, error)
- func (cn *ContractNegotiationAgreed) Send(ctx context.Context) (func(), error)
- type ContractNegotiationFinalized
- func (cd *ContractNegotiationFinalized) GetArchiver() Archiver
- func (cd *ContractNegotiationFinalized) GetProvider() providerv1.ProviderServiceClient
- func (cd *ContractNegotiationFinalized) GetReconciler() *Reconciler
- func (cn *ContractNegotiationFinalized) Recv(ctx context.Context, message any) (context.Context, ContractNegotiationState, error)
- func (cn *ContractNegotiationFinalized) Send(ctx context.Context) (func(), error)
- type ContractNegotiationInitial
- func (cd *ContractNegotiationInitial) GetArchiver() Archiver
- func (cd *ContractNegotiationInitial) GetProvider() providerv1.ProviderServiceClient
- func (cd *ContractNegotiationInitial) GetReconciler() *Reconciler
- func (cn *ContractNegotiationInitial) Recv(ctx context.Context, message any) (context.Context, ContractNegotiationState, error)
- func (cn *ContractNegotiationInitial) Send(ctx context.Context) (func(), error)
- type ContractNegotiationOffered
- func (cd *ContractNegotiationOffered) GetArchiver() Archiver
- func (cd *ContractNegotiationOffered) GetProvider() providerv1.ProviderServiceClient
- func (cd *ContractNegotiationOffered) GetReconciler() *Reconciler
- func (cn *ContractNegotiationOffered) Recv(ctx context.Context, message any) (context.Context, ContractNegotiationState, error)
- func (cn *ContractNegotiationOffered) Send(ctx context.Context) (func(), error)
- type ContractNegotiationRequested
- func (cd *ContractNegotiationRequested) GetArchiver() Archiver
- func (cd *ContractNegotiationRequested) GetProvider() providerv1.ProviderServiceClient
- func (cd *ContractNegotiationRequested) GetReconciler() *Reconciler
- func (cn *ContractNegotiationRequested) Recv(ctx context.Context, message any) (context.Context, ContractNegotiationState, error)
- func (cn *ContractNegotiationRequested) Send(ctx context.Context) (func(), error)
- type ContractNegotiationState
- type ContractNegotiationTerminated
- func (cd *ContractNegotiationTerminated) GetArchiver() Archiver
- func (cd *ContractNegotiationTerminated) GetProvider() providerv1.ProviderServiceClient
- func (cd *ContractNegotiationTerminated) GetReconciler() *Reconciler
- func (cn *ContractNegotiationTerminated) Recv(ctx context.Context, message any) (context.Context, ContractNegotiationState, error)
- func (cn *ContractNegotiationTerminated) Send(ctx context.Context) (func(), error)
- type ContractNegotiationVerified
- func (cd *ContractNegotiationVerified) GetArchiver() Archiver
- func (cd *ContractNegotiationVerified) GetProvider() providerv1.ProviderServiceClient
- func (cd *ContractNegotiationVerified) GetReconciler() *Reconciler
- func (cn *ContractNegotiationVerified) Recv(ctx context.Context, message any) (context.Context, ContractNegotiationState, error)
- func (cn *ContractNegotiationVerified) Send(ctx context.Context) (func(), error)
- type ContractState
- type Contracter
- type DataspaceRole
- type MemoryArchiver
- func (ma *MemoryArchiver) DelAgreement(ctx context.Context, agreementID uuid.UUID) error
- func (ma *MemoryArchiver) GetAgreement(ctx context.Context, agreementID uuid.UUID) (*odrl.Agreement, error)
- func (ma *MemoryArchiver) GetConsumerContract(ctx context.Context, pid uuid.UUID) (*Contract, error)
- func (ma *MemoryArchiver) GetConsumerTransfer(ctx context.Context, pid uuid.UUID) (*TransferRequest, error)
- func (ma *MemoryArchiver) GetProviderContract(ctx context.Context, pid uuid.UUID) (*Contract, error)
- func (ma *MemoryArchiver) GetProviderTransfer(ctx context.Context, pid uuid.UUID) (*TransferRequest, error)
- func (ma *MemoryArchiver) PutAgreement(ctx context.Context, agreement *odrl.Agreement) error
- func (ma *MemoryArchiver) PutConsumerContract(ctx context.Context, contract *Contract) error
- func (ma *MemoryArchiver) PutConsumerTransfer(ctx context.Context, transfer *TransferRequest) error
- func (ma *MemoryArchiver) PutProviderContract(ctx context.Context, contract *Contract) error
- func (ma *MemoryArchiver) PutProviderTransfer(ctx context.Context, transfer *TransferRequest) error
- type Reconciler
- type ReconciliationEntry
- type ReconciliationType
- type TransferDirection
- type TransferRequest
- func (tr *TransferRequest) GetAgreementID() uuid.UUID
- func (tr *TransferRequest) GetCallback() *url.URL
- func (tr *TransferRequest) GetConsumerPID() uuid.UUID
- func (tr *TransferRequest) GetFormat() string
- func (tr *TransferRequest) GetProviderPID() uuid.UUID
- func (tr *TransferRequest) GetPublishInfo() *providerv1.PublishInfo
- func (tr *TransferRequest) GetRole() DataspaceRole
- func (tr *TransferRequest) GetSelf() *url.URL
- func (tr *TransferRequest) GetState() TransferRequestState
- func (tr *TransferRequest) GetTarget() string
- func (tr *TransferRequest) GetTransferDirection() TransferDirection
- func (tr *TransferRequest) GetTransferProcess() shared.TransferProcess
- func (tr *TransferRequest) GetTransferRequest() *TransferRequest
- func (tr *TransferRequest) SetProviderPID(id uuid.UUID)
- func (tr *TransferRequest) SetState(state TransferRequestState) error
- type TransferRequestNegotiationCompleted
- func (cd *TransferRequestNegotiationCompleted) GetArchiver() Archiver
- func (cd *TransferRequestNegotiationCompleted) GetProvider() providerv1.ProviderServiceClient
- func (cd *TransferRequestNegotiationCompleted) GetReconciler() *Reconciler
- func (tr *TransferRequestNegotiationCompleted) Recv(ctx context.Context, message any) (TransferRequestNegotiationState, error)
- func (tr *TransferRequestNegotiationCompleted) Send(ctx context.Context) (func(), error)
- type TransferRequestNegotiationInitial
- func (cd *TransferRequestNegotiationInitial) GetArchiver() Archiver
- func (cd *TransferRequestNegotiationInitial) GetProvider() providerv1.ProviderServiceClient
- func (cd *TransferRequestNegotiationInitial) GetReconciler() *Reconciler
- func (tr *TransferRequestNegotiationInitial) Recv(ctx context.Context, message any) (TransferRequestNegotiationState, error)
- func (tr *TransferRequestNegotiationInitial) Send(ctx context.Context) (func(), error)
- type TransferRequestNegotiationRequested
- func (cd *TransferRequestNegotiationRequested) GetArchiver() Archiver
- func (cd *TransferRequestNegotiationRequested) GetProvider() providerv1.ProviderServiceClient
- func (cd *TransferRequestNegotiationRequested) GetReconciler() *Reconciler
- func (tr *TransferRequestNegotiationRequested) Recv(ctx context.Context, message any) (TransferRequestNegotiationState, error)
- func (tr *TransferRequestNegotiationRequested) Send(ctx context.Context) (func(), error)
- type TransferRequestNegotiationStarted
- func (cd *TransferRequestNegotiationStarted) GetArchiver() Archiver
- func (cd *TransferRequestNegotiationStarted) GetProvider() providerv1.ProviderServiceClient
- func (cd *TransferRequestNegotiationStarted) GetReconciler() *Reconciler
- func (tr *TransferRequestNegotiationStarted) Recv(ctx context.Context, message any) (TransferRequestNegotiationState, error)
- func (tr *TransferRequestNegotiationStarted) Send(ctx context.Context) (func(), error)
- type TransferRequestNegotiationState
- type TransferRequestNegotiationSuspended
- type TransferRequestNegotiationTerminated
- func (cd *TransferRequestNegotiationTerminated) GetArchiver() Archiver
- func (cd *TransferRequestNegotiationTerminated) GetProvider() providerv1.ProviderServiceClient
- func (cd *TransferRequestNegotiationTerminated) GetReconciler() *Reconciler
- func (tr *TransferRequestNegotiationTerminated) Recv(ctx context.Context, message any) (TransferRequestNegotiationState, error)
- func (tr *TransferRequestNegotiationTerminated) Send(ctx context.Context) (func(), error)
- type TransferRequestState
- func (p TransferRequestState) IsValid() bool
- func (p TransferRequestState) MarshalJSON() ([]byte, error)
- func (p *TransferRequestState) Scan(value any) error
- func (i TransferRequestState) String() string
- func (p *TransferRequestState) UnmarshalJSON(b []byte) error
- func (p TransferRequestState) Value() (driver.Value, error)
- type TransferRequester
Constants ¶
This section is empty.
Variables ¶
var ( ErrFatal = errors.New("fatal error") ErrTransient = errors.New("transient error") )
var ContractStates = contractstatesContainer{ INITIAL: ContractState{ // contains filtered or unexported fields }, REQUESTED: ContractState{ // contains filtered or unexported fields }, OFFERED: ContractState{ // contains filtered or unexported fields }, AGREED: ContractState{ // contains filtered or unexported fields }, ACCEPTED: ContractState{ // contains filtered or unexported fields }, VERIFIED: ContractState{ // contains filtered or unexported fields }, FINALIZED: ContractState{ // contains filtered or unexported fields }, TERMINATED: ContractState{ // contains filtered or unexported fields }, }
var ErrNotFound = errors.New("not found")
var ErrNotImplemented = errors.New("not implemented")
var TransferRequestStates = transferrequeststatesContainer{ TRANSFERINITIAL: TransferRequestState{ // contains filtered or unexported fields }, TRANSFERREQUESTED: TransferRequestState{ // contains filtered or unexported fields }, STARTED: TransferRequestState{ // contains filtered or unexported fields }, SUSPENDED: TransferRequestState{ // contains filtered or unexported fields }, COMPLETED: TransferRequestState{ // contains filtered or unexported fields }, TRANSFERTERMINATED: TransferRequestState{ // contains filtered or unexported fields }, }
Functions ¶
func ExhaustiveContractStates ¶
func ExhaustiveContractStates(f func(ContractState))
func ExhaustiveTransferRequestStates ¶
func ExhaustiveTransferRequestStates(f func(TransferRequestState))
Types ¶
type Archiver ¶
type Archiver interface { GetProviderContract(ctx context.Context, providerPID uuid.UUID) (*Contract, error) PutProviderContract(ctx context.Context, contract *Contract) error GetConsumerContract(ctx context.Context, consumerPID uuid.UUID) (*Contract, error) PutConsumerContract(ctx context.Context, contract *Contract) error GetAgreement(ctx context.Context, agreementID uuid.UUID) (*odrl.Agreement, error) DelAgreement(ctx context.Context, agreementID uuid.UUID) error PutAgreement(ctx context.Context, agreement *odrl.Agreement) error GetProviderTransfer(ctx context.Context, providerPID uuid.UUID) (*TransferRequest, error) PutProviderTransfer(ctx context.Context, contract *TransferRequest) error GetConsumerTransfer(ctx context.Context, consumerPID uuid.UUID) (*TransferRequest, error) PutConsumerTransfer(ctx context.Context, contract *TransferRequest) error }
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
Contract represents a contract negotiation.
func (*Contract) Copy ¶
Copy does a deep copy of a contract, here mostly for a workaround that will go away once we implement a reconciliation loop.
func (*Contract) GetAgreement ¶
func (*Contract) GetCallback ¶
func (*Contract) GetConsumerPID ¶
func (*Contract) GetContract ¶
func (*Contract) GetContractNegotiation ¶
func (cn *Contract) GetContractNegotiation() shared.ContractNegotiation
GetContractNegotiation returns a ContractNegotion message.
func (*Contract) GetProviderPID ¶
func (*Contract) GetRole ¶
func (cn *Contract) GetRole() DataspaceRole
func (*Contract) GetState ¶
func (cn *Contract) GetState() ContractState
func (*Contract) SetCallback ¶
SetCallback sets the remote callback root.
func (*Contract) SetConsumerPID ¶
func (*Contract) SetProviderPID ¶
func (*Contract) SetState ¶
func (cn *Contract) SetState(state ContractState) error
type ContractNegotiationAccepted ¶
type ContractNegotiationAccepted struct { *Contract // contains filtered or unexported fields }
func (*ContractNegotiationAccepted) GetArchiver ¶
func (cd *ContractNegotiationAccepted) GetArchiver() Archiver
func (*ContractNegotiationAccepted) GetProvider ¶
func (cd *ContractNegotiationAccepted) GetProvider() providerv1.ProviderServiceClient
func (*ContractNegotiationAccepted) GetReconciler ¶
func (cd *ContractNegotiationAccepted) GetReconciler() *Reconciler
func (*ContractNegotiationAccepted) Recv ¶
func (cn *ContractNegotiationAccepted) Recv( ctx context.Context, message any, ) (context.Context, ContractNegotiationState, error)
Recv gets called on the consumer when the provider sends a contract agreement message.
type ContractNegotiationAgreed ¶
type ContractNegotiationAgreed struct { *Contract // contains filtered or unexported fields }
func (*ContractNegotiationAgreed) GetArchiver ¶
func (cd *ContractNegotiationAgreed) GetArchiver() Archiver
func (*ContractNegotiationAgreed) GetProvider ¶
func (cd *ContractNegotiationAgreed) GetProvider() providerv1.ProviderServiceClient
func (*ContractNegotiationAgreed) GetReconciler ¶
func (cd *ContractNegotiationAgreed) GetReconciler() *Reconciler
func (*ContractNegotiationAgreed) Recv ¶
func (cn *ContractNegotiationAgreed) Recv( ctx context.Context, message any, ) (context.Context, ContractNegotiationState, error)
type ContractNegotiationFinalized ¶
type ContractNegotiationFinalized struct { *Contract // contains filtered or unexported fields }
func (*ContractNegotiationFinalized) GetArchiver ¶
func (cd *ContractNegotiationFinalized) GetArchiver() Archiver
func (*ContractNegotiationFinalized) GetProvider ¶
func (cd *ContractNegotiationFinalized) GetProvider() providerv1.ProviderServiceClient
func (*ContractNegotiationFinalized) GetReconciler ¶
func (cd *ContractNegotiationFinalized) GetReconciler() *Reconciler
func (*ContractNegotiationFinalized) Recv ¶
func (cn *ContractNegotiationFinalized) Recv( ctx context.Context, message any, ) (context.Context, ContractNegotiationState, error)
type ContractNegotiationInitial ¶
type ContractNegotiationInitial struct { *Contract // contains filtered or unexported fields }
ContractNegotiationInitial is an initial state for a contract that hasn't been actually been submitted yet.
func (*ContractNegotiationInitial) GetArchiver ¶
func (cd *ContractNegotiationInitial) GetArchiver() Archiver
func (*ContractNegotiationInitial) GetProvider ¶
func (cd *ContractNegotiationInitial) GetProvider() providerv1.ProviderServiceClient
func (*ContractNegotiationInitial) GetReconciler ¶
func (cd *ContractNegotiationInitial) GetReconciler() *Reconciler
func (*ContractNegotiationInitial) Recv ¶
func (cn *ContractNegotiationInitial) Recv( ctx context.Context, message any, ) (context.Context, ContractNegotiationState, error)
Recv on the initial state gets called on both the provider and consumer, it's only called when a consumer receives an initial request message, or a provider receives an initial offer message. It will set the desired states but not generate the missing PID.
func (*ContractNegotiationInitial) Send ¶
func (cn *ContractNegotiationInitial) Send(ctx context.Context) (func(), error)
Send progresses to the next state for the INITIAL state. This needs either the contract's consumer or provider PID set, but not both. If the provider PID is set, it will send out a contract offer to the callback. If the consumer PID is set, it will send out a contract request to the callback.
type ContractNegotiationOffered ¶
type ContractNegotiationOffered struct { *Contract // contains filtered or unexported fields }
func (*ContractNegotiationOffered) GetArchiver ¶
func (cd *ContractNegotiationOffered) GetArchiver() Archiver
func (*ContractNegotiationOffered) GetProvider ¶
func (cd *ContractNegotiationOffered) GetProvider() providerv1.ProviderServiceClient
func (*ContractNegotiationOffered) GetReconciler ¶
func (cd *ContractNegotiationOffered) GetReconciler() *Reconciler
func (*ContractNegotiationOffered) Recv ¶
func (cn *ContractNegotiationOffered) Recv( ctx context.Context, message any, ) (context.Context, ContractNegotiationState, error)
Recv gets called when a provider receives a request message. It will verify it and set the proper status for the next step.
type ContractNegotiationRequested ¶
type ContractNegotiationRequested struct { *Contract // contains filtered or unexported fields }
ContractNegotiationRequested represents the requested state.
func (*ContractNegotiationRequested) GetArchiver ¶
func (cd *ContractNegotiationRequested) GetArchiver() Archiver
func (*ContractNegotiationRequested) GetProvider ¶
func (cd *ContractNegotiationRequested) GetProvider() providerv1.ProviderServiceClient
func (*ContractNegotiationRequested) GetReconciler ¶
func (cd *ContractNegotiationRequested) GetReconciler() *Reconciler
func (*ContractNegotiationRequested) Recv ¶
func (cn *ContractNegotiationRequested) Recv( ctx context.Context, message any, ) (context.Context, ContractNegotiationState, error)
Recv gets called when a consumer receives a request message, it will verify the PIDs, and forcefully set the callback. After that it will set the status of the contract to OFFERED.
type ContractNegotiationState ¶
type ContractNegotiationState interface { Contracter Recv(ctx context.Context, message any) (context.Context, ContractNegotiationState, error) Send(ctx context.Context) (func(), error) GetArchiver() Archiver GetProvider() providerv1.ProviderServiceClient GetReconciler() *Reconciler }
ContractArchiver is an interface to retrieving and saving of contract negotiations. ContractPhase represents a contract in a certain state.
func GetContractNegotiation ¶
func GetContractNegotiation( ctx context.Context, store Archiver, c *Contract, p providerv1.ProviderServiceClient, r *Reconciler, ) (context.Context, ContractNegotiationState)
func NewContract ¶
func NewContract( ctx context.Context, store Archiver, provider providerv1.ProviderServiceClient, reconciler *Reconciler, providerPID, consumerPID uuid.UUID, state ContractState, offer odrl.Offer, callback, self *url.URL, role DataspaceRole, ) (context.Context, ContractNegotiationState, error)
type ContractNegotiationTerminated ¶
type ContractNegotiationTerminated struct { *Contract // contains filtered or unexported fields }
func (*ContractNegotiationTerminated) GetArchiver ¶
func (cd *ContractNegotiationTerminated) GetArchiver() Archiver
func (*ContractNegotiationTerminated) GetProvider ¶
func (cd *ContractNegotiationTerminated) GetProvider() providerv1.ProviderServiceClient
func (*ContractNegotiationTerminated) GetReconciler ¶
func (cd *ContractNegotiationTerminated) GetReconciler() *Reconciler
func (*ContractNegotiationTerminated) Recv ¶
func (cn *ContractNegotiationTerminated) Recv( ctx context.Context, message any, ) (context.Context, ContractNegotiationState, error)
type ContractNegotiationVerified ¶
type ContractNegotiationVerified struct { *Contract // contains filtered or unexported fields }
func (*ContractNegotiationVerified) GetArchiver ¶
func (cd *ContractNegotiationVerified) GetArchiver() Archiver
func (*ContractNegotiationVerified) GetProvider ¶
func (cd *ContractNegotiationVerified) GetProvider() providerv1.ProviderServiceClient
func (*ContractNegotiationVerified) GetReconciler ¶
func (cd *ContractNegotiationVerified) GetReconciler() *Reconciler
func (*ContractNegotiationVerified) Recv ¶
func (cn *ContractNegotiationVerified) Recv( ctx context.Context, message any, ) (context.Context, ContractNegotiationState, error)
type ContractState ¶
type ContractState struct {
// contains filtered or unexported fields
}
func ParseContractState ¶
func ParseContractState(a any) (ContractState, error)
func (ContractState) IsValid ¶
func (p ContractState) IsValid() bool
func (ContractState) MarshalJSON ¶
func (p ContractState) MarshalJSON() ([]byte, error)
func (*ContractState) Scan ¶
func (p *ContractState) Scan(value any) error
func (*ContractState) UnmarshalJSON ¶
func (p *ContractState) UnmarshalJSON(b []byte) error
type Contracter ¶
type Contracter interface { GetProviderPID() uuid.UUID GetConsumerPID() uuid.UUID GetState() ContractState GetCallback() *url.URL SetCallback(u string) error GetSelf() *url.URL SetState(state ContractState) error GetContract() *Contract GetOffer() odrl.Offer GetContractNegotiation() shared.ContractNegotiation }
type DataspaceRole ¶
type DataspaceRole int8
const ( DataspaceConsumer DataspaceRole = iota DataspaceProvider )
type MemoryArchiver ¶
func NewMemoryArchiver ¶
func NewMemoryArchiver() *MemoryArchiver
func (*MemoryArchiver) DelAgreement ¶
func (*MemoryArchiver) GetAgreement ¶
func (*MemoryArchiver) GetConsumerContract ¶
func (*MemoryArchiver) GetConsumerTransfer ¶
func (ma *MemoryArchiver) GetConsumerTransfer(ctx context.Context, pid uuid.UUID) (*TransferRequest, error)
func (*MemoryArchiver) GetProviderContract ¶
func (*MemoryArchiver) GetProviderTransfer ¶
func (ma *MemoryArchiver) GetProviderTransfer(ctx context.Context, pid uuid.UUID) (*TransferRequest, error)
func (*MemoryArchiver) PutAgreement ¶
func (*MemoryArchiver) PutConsumerContract ¶
func (ma *MemoryArchiver) PutConsumerContract(ctx context.Context, contract *Contract) error
func (*MemoryArchiver) PutConsumerTransfer ¶
func (ma *MemoryArchiver) PutConsumerTransfer(ctx context.Context, transfer *TransferRequest) error
func (*MemoryArchiver) PutProviderContract ¶
func (ma *MemoryArchiver) PutProviderContract(ctx context.Context, contract *Contract) error
func (*MemoryArchiver) PutProviderTransfer ¶
func (ma *MemoryArchiver) PutProviderTransfer(ctx context.Context, transfer *TransferRequest) error
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler is a naive reconciler loop. This should eventually be in its own package. TODO: This needs to be much more robust, right now it doesn't really do anything with the next attempt time or te amount of attempts. It also doesn't support any persistence.
func NewReconciler ¶
func (*Reconciler) Add ¶
func (r *Reconciler) Add(entry ReconciliationEntry)
func (*Reconciler) Run ¶
func (r *Reconciler) Run()
type ReconciliationEntry ¶
type ReconciliationType ¶
type ReconciliationType uint
const ( ReconciliationUndefined ReconciliationType = iota ReconciliationContract ReconciliationTransferRequest )
type TransferDirection ¶
type TransferDirection uint8
const ( DirectionUnknown TransferDirection = iota DirectionPull DirectionPush )
type TransferRequest ¶
type TransferRequest struct {
// contains filtered or unexported fields
}
TransferRequest represents a transfer request and its state.
func (*TransferRequest) GetAgreementID ¶
func (tr *TransferRequest) GetAgreementID() uuid.UUID
func (*TransferRequest) GetCallback ¶
func (tr *TransferRequest) GetCallback() *url.URL
func (*TransferRequest) GetConsumerPID ¶
func (tr *TransferRequest) GetConsumerPID() uuid.UUID
func (*TransferRequest) GetFormat ¶
func (tr *TransferRequest) GetFormat() string
func (*TransferRequest) GetProviderPID ¶
func (tr *TransferRequest) GetProviderPID() uuid.UUID
func (*TransferRequest) GetPublishInfo ¶
func (tr *TransferRequest) GetPublishInfo() *providerv1.PublishInfo
func (*TransferRequest) GetRole ¶
func (tr *TransferRequest) GetRole() DataspaceRole
func (*TransferRequest) GetSelf ¶
func (tr *TransferRequest) GetSelf() *url.URL
func (*TransferRequest) GetState ¶
func (tr *TransferRequest) GetState() TransferRequestState
func (*TransferRequest) GetTarget ¶
func (tr *TransferRequest) GetTarget() string
func (*TransferRequest) GetTransferDirection ¶
func (tr *TransferRequest) GetTransferDirection() TransferDirection
func (*TransferRequest) GetTransferProcess ¶
func (tr *TransferRequest) GetTransferProcess() shared.TransferProcess
func (*TransferRequest) GetTransferRequest ¶
func (tr *TransferRequest) GetTransferRequest() *TransferRequest
func (*TransferRequest) SetProviderPID ¶ added in v0.0.2
func (tr *TransferRequest) SetProviderPID(id uuid.UUID)
func (*TransferRequest) SetState ¶
func (tr *TransferRequest) SetState(state TransferRequestState) error
type TransferRequestNegotiationCompleted ¶
type TransferRequestNegotiationCompleted struct { *TransferRequest // contains filtered or unexported fields }
func (*TransferRequestNegotiationCompleted) GetArchiver ¶
func (cd *TransferRequestNegotiationCompleted) GetArchiver() Archiver
func (*TransferRequestNegotiationCompleted) GetProvider ¶
func (cd *TransferRequestNegotiationCompleted) GetProvider() providerv1.ProviderServiceClient
func (*TransferRequestNegotiationCompleted) GetReconciler ¶
func (cd *TransferRequestNegotiationCompleted) GetReconciler() *Reconciler
func (*TransferRequestNegotiationCompleted) Recv ¶
func (tr *TransferRequestNegotiationCompleted) Recv( ctx context.Context, message any, ) (TransferRequestNegotiationState, error)
type TransferRequestNegotiationInitial ¶
type TransferRequestNegotiationInitial struct { *TransferRequest // contains filtered or unexported fields }
func (*TransferRequestNegotiationInitial) GetArchiver ¶
func (cd *TransferRequestNegotiationInitial) GetArchiver() Archiver
func (*TransferRequestNegotiationInitial) GetProvider ¶
func (cd *TransferRequestNegotiationInitial) GetProvider() providerv1.ProviderServiceClient
func (*TransferRequestNegotiationInitial) GetReconciler ¶
func (cd *TransferRequestNegotiationInitial) GetReconciler() *Reconciler
func (*TransferRequestNegotiationInitial) Recv ¶
func (tr *TransferRequestNegotiationInitial) Recv( ctx context.Context, message any, ) (TransferRequestNegotiationState, error)
type TransferRequestNegotiationRequested ¶
type TransferRequestNegotiationRequested struct { *TransferRequest // contains filtered or unexported fields }
func (*TransferRequestNegotiationRequested) GetArchiver ¶
func (cd *TransferRequestNegotiationRequested) GetArchiver() Archiver
func (*TransferRequestNegotiationRequested) GetProvider ¶
func (cd *TransferRequestNegotiationRequested) GetProvider() providerv1.ProviderServiceClient
func (*TransferRequestNegotiationRequested) GetReconciler ¶
func (cd *TransferRequestNegotiationRequested) GetReconciler() *Reconciler
func (*TransferRequestNegotiationRequested) Recv ¶
func (tr *TransferRequestNegotiationRequested) Recv( ctx context.Context, message any, ) (TransferRequestNegotiationState, error)
type TransferRequestNegotiationStarted ¶
type TransferRequestNegotiationStarted struct { *TransferRequest // contains filtered or unexported fields }
func (*TransferRequestNegotiationStarted) GetArchiver ¶
func (cd *TransferRequestNegotiationStarted) GetArchiver() Archiver
func (*TransferRequestNegotiationStarted) GetProvider ¶
func (cd *TransferRequestNegotiationStarted) GetProvider() providerv1.ProviderServiceClient
func (*TransferRequestNegotiationStarted) GetReconciler ¶
func (cd *TransferRequestNegotiationStarted) GetReconciler() *Reconciler
func (*TransferRequestNegotiationStarted) Recv ¶
func (tr *TransferRequestNegotiationStarted) Recv( ctx context.Context, message any, ) (TransferRequestNegotiationState, error)
type TransferRequestNegotiationState ¶
type TransferRequestNegotiationState interface { TransferRequester Recv(ctx context.Context, message any) (TransferRequestNegotiationState, error) Send(ctx context.Context) (func(), error) GetArchiver() Archiver GetProvider() providerv1.ProviderServiceClient GetReconciler() *Reconciler }
func GetTransferRequestNegotiation ¶
func GetTransferRequestNegotiation( a Archiver, tr *TransferRequest, p providerv1.ProviderServiceClient, r *Reconciler, ) TransferRequestNegotiationState
func NewTransferRequest ¶
func NewTransferRequest( ctx context.Context, store Archiver, provider providerv1.ProviderServiceClient, reconciler *Reconciler, consumerPID, agreementID uuid.UUID, format string, callback, self *url.URL, role DataspaceRole, state TransferRequestState, publishInfo *providerv1.PublishInfo, ) (TransferRequestNegotiationState, error)
type TransferRequestNegotiationSuspended ¶
type TransferRequestNegotiationSuspended struct { *TransferRequest // contains filtered or unexported fields }
func (*TransferRequestNegotiationSuspended) GetArchiver ¶
func (cd *TransferRequestNegotiationSuspended) GetArchiver() Archiver
func (*TransferRequestNegotiationSuspended) GetProvider ¶
func (cd *TransferRequestNegotiationSuspended) GetProvider() providerv1.ProviderServiceClient
func (*TransferRequestNegotiationSuspended) GetReconciler ¶
func (cd *TransferRequestNegotiationSuspended) GetReconciler() *Reconciler
type TransferRequestNegotiationTerminated ¶
type TransferRequestNegotiationTerminated struct { *TransferRequest // contains filtered or unexported fields }
func (*TransferRequestNegotiationTerminated) GetArchiver ¶
func (cd *TransferRequestNegotiationTerminated) GetArchiver() Archiver
func (*TransferRequestNegotiationTerminated) GetProvider ¶
func (cd *TransferRequestNegotiationTerminated) GetProvider() providerv1.ProviderServiceClient
func (*TransferRequestNegotiationTerminated) GetReconciler ¶
func (cd *TransferRequestNegotiationTerminated) GetReconciler() *Reconciler
func (*TransferRequestNegotiationTerminated) Recv ¶ added in v0.0.2
func (tr *TransferRequestNegotiationTerminated) Recv( ctx context.Context, message any, ) (TransferRequestNegotiationState, error)
type TransferRequestState ¶
type TransferRequestState struct {
// contains filtered or unexported fields
}
func ParseTransferRequestState ¶
func ParseTransferRequestState(a any) (TransferRequestState, error)
func (TransferRequestState) IsValid ¶
func (p TransferRequestState) IsValid() bool
func (TransferRequestState) MarshalJSON ¶
func (p TransferRequestState) MarshalJSON() ([]byte, error)
func (*TransferRequestState) Scan ¶
func (p *TransferRequestState) Scan(value any) error
func (*TransferRequestState) UnmarshalJSON ¶
func (p *TransferRequestState) UnmarshalJSON(b []byte) error
type TransferRequester ¶
type TransferRequester interface { GetProviderPID() uuid.UUID GetConsumerPID() uuid.UUID GetAgreementID() uuid.UUID GetTarget() string GetFormat() string GetCallback() *url.URL GetSelf() *url.URL GetState() TransferRequestState GetRole() DataspaceRole SetState(state TransferRequestState) error GetTransferRequest() *TransferRequest GetPublishInfo() *providerv1.PublishInfo GetTransferDirection() TransferDirection GetTransferProcess() shared.TransferProcess }