Documentation
¶
Index ¶
- type AppGetter
- func (g *AppGetter) Commit(key domain.AppGetKey) (domain.AppID, domain.Version, error)
- func (g *AppGetter) Delete(key domain.AppGetKey)
- func (g *AppGetter) DeleteKeyData(key domain.AppGetKey)
- func (g *AppGetter) FromRaw(userID domain.UserID, fileData *map[string][]byte, appIDs ...domain.AppID) (domain.AppGetKey, error)
- func (g *AppGetter) GetLastEvent(key domain.AppGetKey) (domain.AppGetEvent, bool)
- func (g *AppGetter) GetLocationKey(key domain.AppGetKey) (string, bool)
- func (g *AppGetter) GetResults(key domain.AppGetKey) (domain.AppGetMeta, bool)
- func (g *AppGetter) GetUser(key domain.AppGetKey) (domain.UserID, bool)
- func (g *AppGetter) Init()
- func (g *AppGetter) Reprocess(userID domain.UserID, appID domain.AppID, locationKey string) (domain.AppGetKey, error)
- func (g *AppGetter) Stop()
- func (g *AppGetter) SubscribeKey(key domain.AppGetKey) (domain.AppGetEvent, <-chan domain.AppGetEvent)
- func (g *AppGetter) Unsubscribe(ch <-chan domain.AppGetEvent)
- func (g *AppGetter) ValidateMigrationSteps(migrations []domain.MigrationStep) ([]int, error)
- type DeleteApp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppGetter ¶
type AppGetter struct {
AppFilesModel interface {
Save(*map[string][]byte) (string, error)
ReadMeta(string) (*domain.AppFilesMetadata, error) // this is going away or changing significantly
WriteRoutes(string, []byte) error
WriteMigrations(string, []byte) error
Delete(string) error
} `checkinject:"required"`
AppModel interface {
Create(domain.UserID, string) (*domain.App, error)
CreateVersion(domain.AppID, domain.Version, int, domain.APIVersion, string) (*domain.AppVersion, error)
GetVersionsForApp(domain.AppID) ([]*domain.AppVersion, error)
} `checkinject:"required"`
AppLogger interface {
Log(locationKey string, source string, message string)
} `checkinject:"required"`
SandboxManager interface {
ForApp(appVersion *domain.AppVersion) (domain.SandboxI, error)
} `checkinject:"required"`
V0AppRoutes interface {
ValidateRoutes(routes []domain.V0AppRoute) error
} `checkinject:"required"`
// contains filtered or unexported fields
}
AppGetter handles incoming application files It can stash them temporarily and examine its metadata for consistency And it can commit files to become an actual app version
func (*AppGetter) DeleteKeyData ¶
DeleteKeyData removes the data related to the key but leaves files in place.
func (*AppGetter) FromRaw ¶
func (g *AppGetter) FromRaw(userID domain.UserID, fileData *map[string][]byte, appIDs ...domain.AppID) (domain.AppGetKey, error)
FromRaw takes raw file data as app files
func (*AppGetter) GetLastEvent ¶
GetLastEvent returns the last event for the key
func (*AppGetter) GetLocationKey ¶
func (*AppGetter) GetResults ¶
func (*AppGetter) GetUser ¶
GetUser returns the user associated with the key Used to authorize a request for data on that key
func (*AppGetter) Reprocess ¶
func (g *AppGetter) Reprocess(userID domain.UserID, appID domain.AppID, locationKey string) (domain.AppGetKey, error)
Reprocess performs the app processing steps again, replacing the results upon completion. Currently only intended for use by ds-dev.
func (*AppGetter) SubscribeKey ¶
func (g *AppGetter) SubscribeKey(key domain.AppGetKey) (domain.AppGetEvent, <-chan domain.AppGetEvent)
SubscribeKey returns the last event and a channel if the process is ongoing
func (*AppGetter) Unsubscribe ¶
func (g *AppGetter) Unsubscribe(ch <-chan domain.AppGetEvent)
func (*AppGetter) ValidateMigrationSteps ¶
func (g *AppGetter) ValidateMigrationSteps(migrations []domain.MigrationStep) ([]int, error)
type DeleteApp ¶
type DeleteApp struct {
AppFilesModel interface {
Delete(string) error
} `checkinject:"required"`
AppModel interface {
GetVersionsForApp(appID domain.AppID) ([]*domain.AppVersion, error)
GetVersion(appID domain.AppID, version domain.Version) (*domain.AppVersion, error)
Delete(appID domain.AppID) error
DeleteVersion(domain.AppID, domain.Version) error
} `checkinject:"required"`
AppspaceModel interface {
GetForApp(appID domain.AppID) ([]*domain.Appspace, error)
GetForAppVersion(appID domain.AppID, version domain.Version) ([]*domain.Appspace, error)
} `checkinject:"required"`
AppLogger interface {
Forget(string)
} `checkinject:"required"`
}