appspacemodel

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppspaceModel

type AppspaceModel struct {
	DB *domain.DB
	// contains filtered or unexported fields
}

AppspaceModel represents the model for app spaces

func (*AppspaceModel) Create

func (m *AppspaceModel) Create(appspace domain.Appspace) (*domain.Appspace, error)

Create adds an appspace to the database

func (*AppspaceModel) Delete

func (m *AppspaceModel) Delete(appspaceID domain.AppspaceID) error

Delete the appspace from the DB

func (*AppspaceModel) GetAllDomains added in v0.9.0

func (m *AppspaceModel) GetAllDomains() ([]string, error)

func (*AppspaceModel) GetForApp

func (m *AppspaceModel) GetForApp(appID domain.AppID) ([]*domain.Appspace, error)

GetForApp gets all appspaces for a given app_id.

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

func (m *AppspaceModel) GetForOwner(userID domain.UserID) ([]*domain.Appspace, error)

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

Jump to

Keyboard shortcuts

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