offer

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidMsg

func ValidMsg(schema json.RawMessage, msg Message) bool

ValidMsg if is true then offering message corresponds to an offer template scheme.

Types

type Message

type Message struct {
	AgentPubKey               data.Base64String `json:"agentPublicKey"`
	TemplateHash              data.HexString    `json:"templateHash"`
	Country                   string            `json:"country"`
	ServiceSupply             uint16            `json:"serviceSupply"`
	IPType                    string            `json:"ipType"`
	UnitName                  string            `json:"unitName"`
	UnitType                  string            `json:"unitType"`
	BillingType               string            `json:"billingType"`
	SetupPrice                uint64            `json:"setupPrice"`
	UnitPrice                 uint64            `json:"unitPrice"`
	MinUnits                  uint64            `json:"minUnits"`
	MaxUnit                   *uint64           `json:"maxUnit"`
	BillingInterval           uint              `json:"billingInterval"`
	MaxBillingUnitLag         uint              `json:"maxBillingUnitLag"`
	MaxSuspendTime            uint              `json:"maxSuspendTime"`
	MaxInactiveTimeSec        uint64            `json:"maxInactiveTimeSec"`
	FreeUnits                 uint8             `json:"freeUnits"`
	Nonce                     string            `json:"nonce"`
	ServiceSpecificParameters []byte            `json:"serviceSpecificParameters"`
}

Message is a message being published to SOMC.

func OfferingMessage

func OfferingMessage(agent *data.Account, template *data.Template,
	offering *data.Offering) *Message

OfferingMessage returns new Offering message

Jump to

Keyboard shortcuts

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