Documentation ¶
Index ¶
Constants ¶
View Source
const ( FIXED_METHOD_PRICING = "fixed_price_per_method" FIXED_PRICING = "fixed_price" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FixedMethodPrice ¶
type FixedMethodPrice struct {
// contains filtered or unexported fields
}
func (FixedMethodPrice) GetPrice ¶
func (priceType FixedMethodPrice) GetPrice(GrpcContext *handler.GrpcStreamContext) (price *big.Int, err error)
type FixedPrice ¶
type FixedPrice struct {
// contains filtered or unexported fields
}
func (FixedPrice) GetPrice ¶
func (priceType FixedPrice) GetPrice(GrpcContext *handler.GrpcStreamContext) (price *big.Int, err error)
type PriceType ¶
type PriceType interface { //Based on the user input determine how will the price be determined GetPrice(GrpcContext *handler.GrpcStreamContext) (price *big.Int, err error) }
Based on the request passed, a particular strategy will be picked up for processing
type PricingStrategy ¶
type PricingStrategy struct {
// contains filtered or unexported fields
}
func InitPricingStrategy ¶
func InitPricingStrategy(metadata *blockchain.ServiceMetadata) (*PricingStrategy, error)
Initialize all the pricing types
func (*PricingStrategy) AddPricingTypes ¶
func (pricing *PricingStrategy) AddPricingTypes(priceType PriceType)
func (PricingStrategy) GetPrice ¶
func (pricing PricingStrategy) GetPrice(GrpcContext *handler.GrpcStreamContext) (price *big.Int, err error)
Click to show internal directories.
Click to hide internal directories.