seller

package
v0.54.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer added in v0.54.0

type Layer struct {
	layer.BaseLayer
	// nexuses's we're waiting to initialize
	WaitingForApp compat.WaitingForApp
	// nexus list by shared seed
	NexusBySharedSeed compat.NexusBySharedSeed

	// the seller nexus object
	SellerNexus *seller.Nexus
	// 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 NewSellerLayer

func NewSellerLayer() *Layer

Create a new seller layer

func (*Layer) AnnounceNexus added in v0.54.0

func (s *Layer) AnnounceNexus(belowNexus nexus.Nexus)

AnnounceNexus creates a new SellerNexus and registers it also registers the sellerFinished callback

func (*Layer) HandleOpinionInvoiceRequest added in v0.54.0

func (s *Layer) HandleOpinionInvoiceRequest(nx nexus.Nexus, itemID string, requestUUID string)

Calls the client supplied handleOpinionInvoiceRequest method if present

func (*Layer) NexusWaitingForApp added in v0.54.0

func (s *Layer) NexusWaitingForApp(seed *beacon.SharedSeed, sellerNexus nexus.Nexus)

sets the seller's status to waiting

func (*Layer) RegisterAboveLayer added in v0.54.0

func (s *Layer) RegisterAboveLayer(belowLayer layer.Layer)

RegisterAboveLayer registers the current nexuses announce/revoke nexuses to the below layer

func (*Layer) SellerNowReadyFromApp added in v0.54.0

func (s *Layer) SellerNowReadyFromApp()

sets the seller's status to ready (open store)

func (*Layer) SetHandleOpinionInvoiceRequest added in v0.54.0

func (s *Layer) SetHandleOpinionInvoiceRequest(request compat.HandleOpinionInvoiceRequest)

Sets the client supplied handleOpinionInvoiceRequest method. This method is null by default

func (*Layer) SetHandleSellerInfoRequest added in v0.54.0

func (s *Layer) SetHandleSellerInfoRequest(handler func() seller.Info)

Sets the client supplied handleSellerInfoRequest method. This method is null by default

func (*Layer) SetupSellerNexus added in v0.54.0

func (s *Layer) SetupSellerNexus(belowNexus nexus.Nexus) *seller.Nexus

Starts the seller nexus and initializes the callbacks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL