db

package
v0.0.0-...-97c7304 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const CREATE_DATABASE string = `` /* 400-byte string literal not displayed */

Variables

This section is empty.

Functions

func NewDatabase

func NewDatabase(ctx context.Context, fileName string) (types.DBInfo, error)

NewDatabase returns a new instance of the database

Types

type DB

type DB struct {
	*sql.DB
	// contains filtered or unexported fields
}

func (*DB) Insert

func (d *DB) Insert(checksum string, data *types.SatelliteRequestData) (int, error)

Insert pushes the satellites raw data into the db.

func (*DB) List

func (d *DB) List(offset int) ([]*types.SatelliteUIData, error)

List returns a batch of 10 records of the Satellite data if they exist

func (*DB) SearchByID

func (d *DB) SearchByID(recordID int) (*types.SatelliteUIData, error)

SearchByID return the Satellite UI data identified by the record ID provided.

Jump to

Keyboard shortcuts

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