store

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppsBucketName = "Apps"
	MetaBucketName = "Meta"
)
View Source
const DbFile = "openstadia.db"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigStore

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

func CreateConfigStore

func CreateConfigStore(config *c.Openstadia) *ConfigStore

func (*ConfigStore) AddApp

func (s *ConfigStore) AddApp(app *c.BaseApp) error

func (*ConfigStore) Apps

func (s *ConfigStore) Apps() []c.DbApp

func (*ConfigStore) Config

func (s *ConfigStore) Config() *c.DbOpenstadia

func (*ConfigStore) GetAppById

func (s *ConfigStore) GetAppById(id int) (*c.DbApp, error)

func (*ConfigStore) Hub

func (s *ConfigStore) Hub() *c.Hub

func (*ConfigStore) Local

func (s *ConfigStore) Local() *c.Local

func (*ConfigStore) SetHub

func (s *ConfigStore) SetHub(hub *c.Hub) error

func (*ConfigStore) SetLocal

func (s *ConfigStore) SetLocal(local *c.Local) error

type DbStore

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

func CreateDbStore

func CreateDbStore() (*DbStore, error)

func (*DbStore) AddApp

func (s *DbStore) AddApp(app *c.BaseApp) error

func (*DbStore) Apps

func (s *DbStore) Apps() []c.DbApp

func (*DbStore) Config

func (s *DbStore) Config() *c.DbOpenstadia

func (*DbStore) GetAppById

func (s *DbStore) GetAppById(id int) (*c.DbApp, error)

func (*DbStore) Hub

func (s *DbStore) Hub() *c.Hub

func (*DbStore) Local

func (s *DbStore) Local() *c.Local

func (*DbStore) SetConfig

func (s *DbStore) SetConfig(config *c.Openstadia)

func (*DbStore) SetHub

func (s *DbStore) SetHub(hub *c.Hub) error

func (*DbStore) SetLocal

func (s *DbStore) SetLocal(local *c.Local) error

type Store

type Store interface {
	Config() *c.DbOpenstadia

	Apps() []c.DbApp
	Hub() *c.Hub
	Local() *c.Local
	GetAppById(id int) (*c.DbApp, error)

	AddApp(app *c.BaseApp) error
	SetHub(hub *c.Hub) error
	SetLocal(local *c.Local) error
}

Jump to

Keyboard shortcuts

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