db

package
v0.0.0-...-61436bd Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DATE_TIME_LAYOUT = "2006-01-02T15:04:05.000Z"

Variables

This section is empty.

Functions

func AddUpdates

func AddUpdates(product string, updatesInfo []*client.IPSWInfo) (int, error)

func InitDb

func InitDb(path string, jsonDB *DevicesJsonDB) (err error)

Types

type Device

type Device struct {
	Id                  int             `json:"-"`
	Product             string          `json:"product"`
	Name                string          `json:"name"`
	LastCheckedOn       string          `json:"last_checked_on"`
	LastCheckedOnParsed time.Time       `json:"-"`
	Updates             []*DeviceUpdate `json:"updates,omitempty"`
}

func FetchAllDevices

func FetchAllDevices() ([]*Device, error)

func FetchAllDevicesByKey

func FetchAllDevicesByKey(key string) ([]*Device, error)

func FetchDeviceByProduct

func FetchDeviceByProduct(product string) (*Device, error)

func FetchDeviceUpdatesByProduct

func FetchDeviceUpdatesByProduct(product string) (*Device, error)

type DeviceUpdate

type DeviceUpdate struct {
	Id         int              `json:"-"`
	DeviceId   int              `json:"-"`
	BuildId    string           `json:"build_id"`
	Version    string           `json:"version"`
	ReleasedOn string           `json:"released_on"`
	Attributes *client.IPSWInfo `json:"attributes,omitempty"`
}

type DevicesJsonDB

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

func LoadDevices

func LoadDevices(path string) (*DevicesJsonDB, error)

Jump to

Keyboard shortcuts

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