db

package
v0.0.0-...-a00e601 Latest Latest
Warning

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

Go to latest
Published: May 1, 2015 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase() *Database

func (*Database) Close

func (db *Database) Close()

func (*Database) Delete

func (db *Database) Delete(key string)

func (*Database) GetMostRecentMessageForCallsign

func (db *Database) GetMostRecentMessageForCallsign(callsign string) (*models.AprsMessage, error)

func (*Database) GetRecordsForCallsign

func (db *Database) GetRecordsForCallsign(callsign string, page int64) (*PaginatedCallsignResults, error)

func (*Database) GetRecordsNearPosition

func (db *Database) GetRecordsNearPosition(lat float64, long float64, timeInterval int64, radiusKM int64) (*PositionResults, error)

func (*Database) NumberOfCallsigns

func (db *Database) NumberOfCallsigns() (int64, error)

func (*Database) NumberOfMessagesForCallsign

func (db *Database) NumberOfMessagesForCallsign(callsign string) (int64, error)

func (*Database) PaginatedMessagesForCallsign

func (db *Database) PaginatedMessagesForCallsign(callsign string, start int64, stop int64) ([]string, error)

func (*Database) Ping

func (db *Database) Ping() error

func (*Database) RecordMessage

func (db *Database) RecordMessage(sourceCallsign string, message *models.AprsMessage) error

type PaginatedCallsignResults

type PaginatedCallsignResults struct {
	Page                 int64                `json:"page"`
	NumberOfPages        int64                `json:"number_of_pages"`
	TotalNumberOfRecords int64                `json:"total_number_of_records"`
	Records              []models.AprsMessage `json:"records"`
}

type PositionResults

type PositionResults struct {
	Size    int64                `json:"size"`
	Records []models.AprsMessage `json:"records"`
}

Jump to

Keyboard shortcuts

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