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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBAssumedCoverageHistory

type DBAssumedCoverageHistory struct {
	// Res 8 cell of the location of the coverage
	Location h3light.DatabaseCell

	// Date this coverage was (assumed to be) present based on the measurements
	Date time.Time
}

func (*DBAssumedCoverageHistory) AssumedCoverageHistory

func (e *DBAssumedCoverageHistory) AssumedCoverageHistory() *types.AssumedCoverageHistory

func (*DBAssumedCoverageHistory) Entity

func (e *DBAssumedCoverageHistory) Entity() string

func (*DBAssumedCoverageHistory) Key

type DBAssumedGatewayCoverageHistory

type DBAssumedGatewayCoverageHistory struct {
	// Res 8 cell of the location of the coverage
	Location h3light.DatabaseCell

	// Date this coverage was (assumed to be) present based on the measurements
	Date time.Time

	// ID of the gateway that provides this coverage
	GatewayID string

	// The number of (res10) coverage records this gateway actually has within this (res8) cell
	NumCoverage int

	// The share of total all coverage records this gateway in this res8 cell, all shares for different gateways together must be 1000.
	Share int
}

func (*DBAssumedGatewayCoverageHistory) AssumedGatewayCoverageHistory

func (e *DBAssumedGatewayCoverageHistory) AssumedGatewayCoverageHistory() *types.AssumedGatewayCoverageHistory

func (*DBAssumedGatewayCoverageHistory) Entity

func (*DBAssumedGatewayCoverageHistory) Key

type DBAssumedUnverifiedCoverage

type DBAssumedUnverifiedCoverage struct {
	// Res 8 cell of the location of the coverage
	Location h3light.DatabaseCell

	// When was this unverified assumed coverage last updated
	LatestUpdate time.Time
}

func (*DBAssumedUnverifiedCoverage) AssumedUnverifiedCoverage

func (e *DBAssumedUnverifiedCoverage) AssumedUnverifiedCoverage() *types.AssumedUnverifiedCoverage

func (*DBAssumedUnverifiedCoverage) Entity

func (e *DBAssumedUnverifiedCoverage) Entity() string

func (*DBAssumedUnverifiedCoverage) Key

type DBCoverageHistory

type DBCoverageHistory struct {
	// Res 10 cell of the location of the coverage
	Location h3light.DatabaseCell

	// Date this coverage was (assumed to be) present based on the measurements
	Date time.Time
	// ID of the gateway that provides this coverage
	GatewayID string

	// ID of the gateway that provides this coverage
	GatewayLocation h3light.DatabaseCell

	// FrequencyPlan
	FrequencyPlan frequency_plan.BandName

	// ID of the mapper that mapped this coverage
	MapperID string

	// ID of the mapping record that was used to base this coverage on
	MappingID string

	// time of the mapping record that was used to base this coverage on
	MappingTime time.Time

	// The RSSI (signal strength) of coverage at this location
	RSSI int
}

func NewDBCoverageHistory

func NewDBCoverageHistory(m *types.CoverageHistory) *DBCoverageHistory

func (*DBCoverageHistory) CoverageHistory

func (e *DBCoverageHistory) CoverageHistory() *types.CoverageHistory

func (*DBCoverageHistory) Entity

func (e *DBCoverageHistory) Entity() string

func (*DBCoverageHistory) Key

func (e *DBCoverageHistory) Key() string

type DBMappingAuthToken

type DBMappingAuthToken struct {
	Owner      string
	Expiration time.Time
	Code       string
	Challenge  string
}

func (*DBMappingAuthToken) Entity

func (e *DBMappingAuthToken) Entity() string

func (*DBMappingAuthToken) Key

func (e *DBMappingAuthToken) Key() string

type DBMappingDiscoveryReceiptRecord

type DBMappingDiscoveryReceiptRecord struct {
	MappingID         string
	Frequency         int     `datastore:",noindex"`
	Rssi              int     `datastore:",noindex"`
	Snr               float64 `datastore:",noindex"`
	SpreadingFactor   int     `datastore:",noindex"`
	Bandwidth         int     `datastore:",noindex"`
	CodeRate          string  `datastore:",noindex"`
	Phy               []byte  `datastore:",noindex"`
	ReceivedTime      time.Time
	GatewayTime       time.Time
	GatewaySignature  []byte `datastore:",noindex"`
	GatewayID         string
	GatewayLocation   *h3light.DatabaseCell
	MapperID          string
	ServiceValidation types.MappingRecordValidation
}

func NewDBMappingDiscoveryReceiptRecord

func NewDBMappingDiscoveryReceiptRecord(mappingID types.ID, record *types.MappingDiscoveryReceiptRecord) *DBMappingDiscoveryReceiptRecord

func (*DBMappingDiscoveryReceiptRecord) DiscoveryReceiptRecord

func (*DBMappingDiscoveryReceiptRecord) Entity

func (*DBMappingDiscoveryReceiptRecord) Key

type DBMappingDownlinkReceiptRecord

type DBMappingDownlinkReceiptRecord struct {
	MappingID         string
	Frequency         int     `datastore:",noindex"`
	Rssi              int     `datastore:",noindex"`
	Snr               float64 `datastore:",noindex"`
	SpreadingFactor   int     `datastore:",noindex"`
	Bandwidth         int     `datastore:",noindex"`
	CodeRate          string  `datastore:",noindex"`
	Phy               []byte  `datastore:",noindex"`
	ReceivedTime      time.Time
	GatewayTime       time.Time
	GatewaySignature  []byte `datastore:",noindex"`
	GatewayID         string
	MapperID          string
	ServiceValidation types.MappingRecordValidation
}

func NewDBMappingDownlinkReceiptRecord

func NewDBMappingDownlinkReceiptRecord(mappingID types.ID, record *types.MappingDownlinkReceiptRecord) *DBMappingDownlinkReceiptRecord

func (*DBMappingDownlinkReceiptRecord) DownlinkReceiptRecord

func (*DBMappingDownlinkReceiptRecord) Entity

func (*DBMappingDownlinkReceiptRecord) Key

type DBMappingRecord

type DBMappingRecord struct {
	ID                        string
	DiscoveryPhy              []byte `datastore:",noindex"`
	DownlinkPhy               []byte `datastore:",noindex"`
	MeasuredRssi              *int
	MeasuredSnr               *int
	FrequencyPlan             string
	ChallengedGatewayID       *string
	ChallengedGatewayLocation *h3light.DatabaseCell
	ChallengedTime            *time.Time
	MapperID                  string
	MapperLocation            h3light.DatabaseCell
	MapperLat                 float64
	MapperLon                 float64
	MapperHeight              float64
	MapperOsnmaAge            int
	MapperSpoofing            int
	MapperTow                 int
	MapperBattery             int
	MapperVersion             int
	MapperStatus              int
	ReceivedTime              time.Time
	ServiceValidation         types.MappingRecordValidation
}

func NewDBMappingRecord

func NewDBMappingRecord(mappingRecord *types.MappingRecord) *DBMappingRecord

func (*DBMappingRecord) Entity

func (e *DBMappingRecord) Entity() string

func (*DBMappingRecord) Key

func (e *DBMappingRecord) Key() string

func (*DBMappingRecord) MappingRecord

func (e *DBMappingRecord) MappingRecord() *types.MappingRecord

type DBUnverifiedMappingGatewayRecord

type DBUnverifiedMappingGatewayRecord struct {
	MappingID       string
	GatewayID       string
	GatewayLocation *h3light.DatabaseCell
	GatewayTime     time.Time
	Rssi            int
	Snr             float64
}

func (*DBUnverifiedMappingGatewayRecord) Entity

func (*DBUnverifiedMappingGatewayRecord) Key

func (*DBUnverifiedMappingGatewayRecord) UnverifiedMappingGatewayRecord

func (e *DBUnverifiedMappingGatewayRecord) UnverifiedMappingGatewayRecord() *types.UnverifiedMappingGatewayRecord

type DBUnverifiedMappingRecord

type DBUnverifiedMappingRecord struct {
	ID                  string
	MapperID            string
	MapperLocation      h3light.DatabaseCell
	MapperLat           float64
	MapperLon           float64
	MapperAccuracy      float64
	MapperHeight        float64
	BestGatewayID       *string
	BestGatewayLocation *h3light.DatabaseCell
	BestGatewayRssi     *int
	BestGatewaySnr      *float64
	Frequency           int
	SpreadingFactor     int
	Bandwidth           int
	CodeRate            string
	ReceivedTime        time.Time
}

func (*DBUnverifiedMappingRecord) Entity

func (e *DBUnverifiedMappingRecord) Entity() string

func (*DBUnverifiedMappingRecord) Key

func (*DBUnverifiedMappingRecord) UnverifiedMappingRecord

func (e *DBUnverifiedMappingRecord) UnverifiedMappingRecord() *types.UnverifiedMappingRecord

Jump to

Keyboard shortcuts

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