Versions in this module Expand all Collapse all v0 v0.1.0 Sep 7, 2023 Changes in this version + type Database interface + Close func() error + Connect func() error + Create func(i *models.IPSW) error + Delete func(key uint) error + Get func(key uint) (*models.IPSW, error) + Set func(key uint, value *models.IPSW) error + func NewInMemory(path string) Database + func NewPostgres(host, port, user, password, database string) Database + func NewSqlite(path string) Database + type Memory struct + IPSWs map[uint]*models.IPSW + Path string + func (m Memory) Close() error + func (m Memory) Connect() error + func (m Memory) Create(i *models.IPSW) error + func (m Memory) Delete(id uint) error + func (m Memory) Get(id uint) (*models.IPSW, error) + func (m Memory) List(version string) ([]*models.IPSW, error) + func (m Memory) Set(key uint, value *models.IPSW) error + type Postgres struct + Database string + Host string + Password string + Port string + URL string + User string + func (p Postgres) Close() error + func (p Postgres) Connect() (err error) + func (p Postgres) Create(i *models.IPSW) error + func (p Postgres) Delete(key uint) error + func (p Postgres) Get(key uint) (*models.IPSW, error) + func (p Postgres) Set(key uint, value *models.IPSW) error + type Sqlite struct + URL string + func (s *Sqlite) Close() error + func (s *Sqlite) Connect() (err error) + func (s *Sqlite) Create(i *models.IPSW) error + func (s *Sqlite) Delete(key uint) error + func (s *Sqlite) Get(key uint) (*models.IPSW, error) + func (s *Sqlite) Set(key uint, value *models.IPSW) error