Documentation ¶
Index ¶
- type SellerLayer
- func (s *SellerLayer) AnnounceNexus(belowNexus nexus.Nexus)
- func (s *SellerLayer) HandleOpinionInvoiceRequest(nx nexus.Nexus, itemId string, requestUuid string)
- func (s *SellerLayer) NexusWaitingForApp(seed *beacon.SharedSeed, sellerNexus nexus.Nexus)
- func (s *SellerLayer) RegisterAboveLayer(belowLayer layer.Layer)
- func (s *SellerLayer) SellerNowReadyFromApp()
- func (s *SellerLayer) SetHandleOpinionInvoiceRequest(request compat.HandleOpinionInvoiceRequest)
- func (s *SellerLayer) SetHandleSellerInfoRequest(handler func() seller.SellerInfo)
- func (s *SellerLayer) SetupSellerNexus(belowNexus nexus.Nexus) *seller.SellerNexus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SellerLayer ¶
type SellerLayer struct { layer.BaseLayer // nexuses's we're waiting to initialize WaitingForApp compat.WaitingForApp NexusBySharedSeed compat.NexusBySharedSeed // the seller nexus object SellerNexus *seller.SellerNexus // contains filtered or unexported fields }
SellerLayer is meant to simulate the seller layer in the js seller app this struct should not be initialized directly, the NewSellerLayer() method below should be used instead
func (*SellerLayer) AnnounceNexus ¶
func (s *SellerLayer) AnnounceNexus(belowNexus nexus.Nexus)
initializes the handshake with the buyer nexus
func (*SellerLayer) HandleOpinionInvoiceRequest ¶
func (s *SellerLayer) HandleOpinionInvoiceRequest(nx nexus.Nexus, itemId string, requestUuid string)
Calls the client supplied handleOpinionInvoiceRequest method if present
func (*SellerLayer) NexusWaitingForApp ¶
func (s *SellerLayer) NexusWaitingForApp(seed *beacon.SharedSeed, sellerNexus nexus.Nexus)
sets the seller's status to waiting
func (*SellerLayer) RegisterAboveLayer ¶
func (s *SellerLayer) RegisterAboveLayer(belowLayer layer.Layer)
set the on AnnounceNexus/RevokeNexus methods in belowLayer
func (*SellerLayer) SellerNowReadyFromApp ¶
func (s *SellerLayer) SellerNowReadyFromApp()
sets the seller's status to ready (open store)
func (*SellerLayer) SetHandleOpinionInvoiceRequest ¶
func (s *SellerLayer) SetHandleOpinionInvoiceRequest(request compat.HandleOpinionInvoiceRequest)
Sets the client supplied handleOpinionInvoiceRequest method. This method is null by default
func (*SellerLayer) SetHandleSellerInfoRequest ¶
func (s *SellerLayer) SetHandleSellerInfoRequest(handler func() seller.SellerInfo)
Sets the client supplied handleSellerInfoRequest method. This method is null by default
func (*SellerLayer) SetupSellerNexus ¶
func (s *SellerLayer) SetupSellerNexus(belowNexus nexus.Nexus) *seller.SellerNexus
Starts the seller nexus and initializes the callbacks