models

package
v0.0.0-...-1196ed7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBGateway

type DBGateway struct {
	// ID is the ThingsIX compressed public key for this gateway
	ID              string
	ContractAddress string
	Version         int
	Owner           string
	AntennaGain     *float32
	FrequencyPlan   *frequency_plan.BandName
	Location        *h3light.DatabaseCell
	Altitude        *int
}

func NewDBGateway

func NewDBGateway(gw *types.Gateway) *DBGateway

func (*DBGateway) Entity

func (e *DBGateway) Entity() string

func (*DBGateway) Gateway

func (gw *DBGateway) Gateway() *types.Gateway

func (*DBGateway) Key

func (e *DBGateway) Key() string

type DBGatewayEvent

type DBGatewayEvent struct {
	ContractAddress  string
	BlockNumber      int
	TransactionIndex int
	LogIndex         int
	Block            string
	Transaction      string

	Type    types.GatewayEventType
	ID      string
	Version int

	NewOwner         *string                  `datastore:",omitempty"`
	OldOwner         *string                  `datastore:",omitempty"`
	NewLocation      *h3light.DatabaseCell    `datastore:",omitempty"`
	OldLocation      *h3light.DatabaseCell    `datastore:",omitempty"`
	NewAltitude      *int                     `datastore:",omitempty"`
	OldAltitude      *int                     `datastore:",omitempty"`
	NewFrequencyPlan *frequency_plan.BandName `datastore:",omitempty"`
	OldFrequencyPlan *frequency_plan.BandName `datastore:",omitempty"`
	NewAntennaGain   *float32                 `datastore:",omitempty"`
	OldAntennaGain   *float32                 `datastore:",omitempty"`
	Time             time.Time
}

func NewDBGatewayEvent

func NewDBGatewayEvent(event *types.GatewayEvent) *DBGatewayEvent

func (*DBGatewayEvent) Entity

func (e *DBGatewayEvent) Entity() string

func (*DBGatewayEvent) GatewayEvent

func (e *DBGatewayEvent) GatewayEvent() *types.GatewayEvent

func (*DBGatewayEvent) Key

func (e *DBGatewayEvent) Key() string

type DBGatewayHistory

type DBGatewayHistory struct {
	// ID is the ThingsIX compressed public key for this gateway
	ID              string
	ContractAddress string
	Version         int
	Owner           *string                  `datastore:",omitempty"`
	AntennaGain     *float32                 `datastore:",omitempty"`
	FrequencyPlan   *frequency_plan.BandName `datastore:",omitempty"`
	Location        *h3light.DatabaseCell    `datastore:",omitempty"`
	Altitude        *int                     `datastore:",omitempty"`
	Time            time.Time
	BlockNumber     int
	Block           string
	Transaction     string
}

func NewDBGatewayHistory

func NewDBGatewayHistory(history *types.GatewayHistory) *DBGatewayHistory

func (*DBGatewayHistory) Entity

func (e *DBGatewayHistory) Entity() string

func (*DBGatewayHistory) GatewayHistory

func (e *DBGatewayHistory) GatewayHistory() *types.GatewayHistory

func (*DBGatewayHistory) Key

func (e *DBGatewayHistory) Key() string

type DBGatewayOnboard

type DBGatewayOnboard struct {
	GatewayID string
	Owner     string
	Signature string
	Version   int
	LocalID   string
	Onboarder string
	CreatedAt time.Time
}

func NewDBGatewayOnboard

func NewDBGatewayOnboard(gatewayID types.ID, owner common.Address, signature string, version uint8, localId string, onboarderAddr common.Address, createdAt time.Time) *DBGatewayOnboard

func (*DBGatewayOnboard) Entity

func (e *DBGatewayOnboard) Entity() string

func (DBGatewayOnboard) GatewayOnboard

func (e DBGatewayOnboard) GatewayOnboard() *GatewayOnboard

func (*DBGatewayOnboard) Key

func (e *DBGatewayOnboard) Key() string

type DBPendingGatewayEvent

type DBPendingGatewayEvent DBGatewayEvent

func NewDBPendingGatewayEvent

func NewDBPendingGatewayEvent(event *types.GatewayEvent) *DBPendingGatewayEvent

func (*DBPendingGatewayEvent) Entity

func (e *DBPendingGatewayEvent) Entity() string

func (*DBPendingGatewayEvent) GatewayEvent

func (e *DBPendingGatewayEvent) GatewayEvent() *types.GatewayEvent

func (*DBPendingGatewayEvent) Key

func (e *DBPendingGatewayEvent) Key() string

type GatewayOnboard

type GatewayOnboard struct {
	GatewayID string    `json:"gatewayId"`
	Owner     string    `json:"owner"`
	Signature string    `json:"signature"`
	Version   int       `json:"version"`
	LocalID   string    `json:"localId"`
	Onboarder string    `json:"onboarder"`
	CreatedAt time.Time `json:"createdAt"`
}

Jump to

Keyboard shortcuts

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