Documentation
¶
Index ¶
- type AppspaceModel
- func (m *AppspaceModel) Create(appspace domain.Appspace) (*domain.Appspace, error)
- func (m *AppspaceModel) Delete(appspaceID domain.AppspaceID) error
- func (m *AppspaceModel) GetForApp(appID domain.AppID) ([]*domain.Appspace, error)
- func (m *AppspaceModel) GetForAppVersion(appID domain.AppID, version domain.Version) ([]*domain.Appspace, error)
- func (m *AppspaceModel) GetForOwner(userID domain.UserID) ([]*domain.Appspace, error)
- func (m *AppspaceModel) GetFromDomain(dom string) (*domain.Appspace, error)
- func (m *AppspaceModel) GetFromID(appspaceID domain.AppspaceID) (*domain.Appspace, error)
- func (m *AppspaceModel) Pause(appspaceID domain.AppspaceID, pause bool) error
- func (m *AppspaceModel) PrepareStatements()
- func (m *AppspaceModel) SetVersion(appspaceID domain.AppspaceID, version domain.Version) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppspaceModel ¶
AppspaceModel represents the model for app spaces
func (*AppspaceModel) Delete ¶
func (m *AppspaceModel) Delete(appspaceID domain.AppspaceID) error
Delete the appspace from the DB
func (*AppspaceModel) GetForAppVersion ¶
func (m *AppspaceModel) GetForAppVersion(appID domain.AppID, version domain.Version) ([]*domain.Appspace, error)
GetForAppVersion gets all appspaces for a given app_id.
func (*AppspaceModel) GetForOwner ¶
GetForOwner gets all appspaces for an owner
func (*AppspaceModel) GetFromDomain ¶
func (m *AppspaceModel) GetFromDomain(dom string) (*domain.Appspace, error)
GetFromDomain gets an AppSpace by looking up the domain It returns nil, nil if no matches found TODO: this is wrong it should return an error (sql.ErrNoRows for now, a custom sentinel error when we have one)
func (*AppspaceModel) GetFromID ¶
func (m *AppspaceModel) GetFromID(appspaceID domain.AppspaceID) (*domain.Appspace, error)
GetFromID gets an AppSpace by its ID Q: does this return an error if not found? What kind of error
func (*AppspaceModel) Pause ¶
func (m *AppspaceModel) Pause(appspaceID domain.AppspaceID, pause bool) error
Pause changes the paused status of the appspace
func (*AppspaceModel) PrepareStatements ¶
func (m *AppspaceModel) PrepareStatements()
PrepareStatements for appspace model
func (*AppspaceModel) SetVersion ¶
func (m *AppspaceModel) SetVersion(appspaceID domain.AppspaceID, version domain.Version) error
SetVersion changes the active version of the application for tha tappspace