Documentation
¶
Index ¶
- type AppModel
- func (m *AppModel) Create(ownerID domain.UserID, name string) (*domain.App, error)
- func (m *AppModel) CreateVersion(appID domain.AppID, version domain.Version, schema int, api domain.APIVersion, ...) (*domain.AppVersion, error)
- func (m *AppModel) Delete(appID domain.AppID) error
- func (m *AppModel) DeleteVersion(appID domain.AppID, version domain.Version) error
- func (m *AppModel) GetForOwner(userID domain.UserID) ([]*domain.App, error)
- func (m *AppModel) GetFromID(appID domain.AppID) (*domain.App, error)
- func (m *AppModel) GetVersion(appID domain.AppID, version domain.Version) (*domain.AppVersion, error)
- func (m *AppModel) GetVersionsForApp(appID domain.AppID) ([]*domain.AppVersion, error)
- func (m *AppModel) PrepareStatements()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppModel ¶
AppModel represents the model for app
func (*AppModel) Create ¶
Create adds an app to the database This should return an unique ID, right? Other arguments: owner, and possibly other things like create date Should we have CreateArgs type struct to guarantee proper data passing? -> yes
func (*AppModel) CreateVersion ¶
func (m *AppModel) CreateVersion(appID domain.AppID, version domain.Version, schema int, api domain.APIVersion, locationKey string) (*domain.AppVersion, error)
CreateVersion adds a new version for an app in the DB has appid, version, location key, create date use appid and version as primary keys index on appid as well
func (*AppModel) Delete ¶
Delete the app from the DB row. It fails if there are versions of the app in the DB
func (*AppModel) DeleteVersion ¶
DeleteVersion removes a version from the DB
func (*AppModel) GetForOwner ¶
GetForOwner returns array of application data for a given user
func (*AppModel) GetFromID ¶
GetFromID gets the app using its unique ID on the system It returns an error if ID is not found
func (*AppModel) GetVersion ¶
func (m *AppModel) GetVersion(appID domain.AppID, version domain.Version) (*domain.AppVersion, error)
GetVersion returns the version for the app
func (*AppModel) GetVersionsForApp ¶
GetVersionsForApp returns an array of versions of code for that application
func (*AppModel) PrepareStatements ¶
func (m *AppModel) PrepareStatements()
PrepareStatements prepares the statements