Documentation ¶
Index ¶
- Constants
- func DeploymentAddress(account []byte, nonce uint64) []byte
- func MaxAddress() []byte
- func MinAddress() []byte
- func NonceAddress(account []byte, nonce uint64) []byte
- func ProviderAddress(account []byte, nonce uint64) []byte
- type AccountAdapter
- type DB
- type DBReader
- type DeploymentAdapter
- type DeploymentGroupAdapter
- type FulfillmentAdapter
- type LeaseAdapter
- type OrderAdapter
- type ProviderAdapter
- type Sequence
- type State
Constants ¶
View Source
const ( AccountPath = "/accounts/" DeploymentPath = "/deployments/" DeploymentSequencePath = "/deployments-seq/" DeploymentGroupPath = "/deployment-groups/" ProviderPath = "/providers/" OrderPath = "/orders/" FulfillmentPath = "/fulfillment-orders/" LeasePath = "/lease/" MaxRangeLimit = math.MaxInt64 AddressSize = 32 // XXX: check )
Variables ¶
This section is empty.
Functions ¶
func DeploymentAddress ¶
func MaxAddress ¶
func MaxAddress() []byte
func MinAddress ¶
func MinAddress() []byte
func NonceAddress ¶
func ProviderAddress ¶
Types ¶
type AccountAdapter ¶
type AccountAdapter interface { Save(account *types.Account) error Get(base.Bytes) (*types.Account, error) KeyFor(base.Bytes) base.Bytes }
func NewAccountAdapter ¶
func NewAccountAdapter(db DB) AccountAdapter
type DB ¶
type DeploymentAdapter ¶
type DeploymentAdapter interface { Save(deployment *types.Deployment) error Get(base.Bytes) (*types.Deployment, error) GetMaxRange() (*types.Deployments, error) GetRangeWithProof(base.Bytes, base.Bytes, int) ([][]byte, *types.Deployments, iavl.KeyRangeProof, error) KeyFor(base.Bytes) base.Bytes SequenceFor(base.Bytes) Sequence }
func NewDeploymentAdapter ¶
func NewDeploymentAdapter(db DB) DeploymentAdapter
type DeploymentGroupAdapter ¶
type DeploymentGroupAdapter interface { Save(*types.DeploymentGroup) error Get(id types.DeploymentGroupID) (*types.DeploymentGroup, error) ForDeployment(addr base.Bytes) ([]*types.DeploymentGroup, error) }
func NewDeploymentGroupAdapter ¶
func NewDeploymentGroupAdapter(db DB) DeploymentGroupAdapter
type FulfillmentAdapter ¶
type FulfillmentAdapter interface { Save(*types.Fulfillment) error Get(id types.FulfillmentID) (*types.Fulfillment, error) ForDeployment(base.Bytes) ([]*types.Fulfillment, error) ForGroup(types.DeploymentGroupID) ([]*types.Fulfillment, error) ForOrder(types.OrderID) ([]*types.Fulfillment, error) }
func NewFulfillmentAdapter ¶
func NewFulfillmentAdapter(db DB) FulfillmentAdapter
type LeaseAdapter ¶
type LeaseAdapter interface { Save(*types.Lease) error Get(types.LeaseID) (*types.Lease, error) ForDeployment(deployment base.Bytes) ([]*types.Lease, error) All() ([]*types.Lease, error) }
func NewLeaseAdapter ¶
func NewLeaseAdapter(db DB) LeaseAdapter
type OrderAdapter ¶
type OrderAdapter interface { Save(*types.Order) error Get(types.OrderID) (*types.Order, error) ForDeployment(base.Bytes) ([]*types.Order, error) ForGroup(types.DeploymentGroupID) ([]*types.Order, error) All() ([]*types.Order, error) }
func NewOrderAdapter ¶
func NewOrderAdapter(db DB) OrderAdapter
type ProviderAdapter ¶
type ProviderAdapter interface { Save(provider *types.Provider) error Get(base.Bytes) (*types.Provider, error) GetMaxRange() (*types.Providers, error) GetRangeWithProof(base.Bytes, base.Bytes, int) ([][]byte, *types.Providers, iavl.KeyRangeProof, error) KeyFor(base.Bytes) base.Bytes }
func NewProviderAdapter ¶
func NewProviderAdapter(db DB) ProviderAdapter
type Sequence ¶
func NewSequence ¶
type State ¶
type State interface { Version() int64 Hash() []byte Commit() ([]byte, int64, error) DB() DBReader Account() AccountAdapter Deployment() DeploymentAdapter Provider() ProviderAdapter Order() OrderAdapter DeploymentGroup() DeploymentGroupAdapter Fulfillment() FulfillmentAdapter Lease() LeaseAdapter }
Click to show internal directories.
Click to hide internal directories.