Documentation
¶
Overview ¶
Package app defines the multi-app (tenant) domain entity and its store interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
ID id.AppID `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Logo string `json:"logo,omitempty"`
PublishableKey string `json:"publishable_key,omitempty"`
IsPlatform bool `json:"is_platform"`
Metadata Metadata `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
App represents a platform-level tenant. Each app has its own user pool, configuration, and authentication settings.
type Store ¶
type Store interface {
CreateApp(ctx context.Context, a *App) error
GetApp(ctx context.Context, appID id.AppID) (*App, error)
GetAppBySlug(ctx context.Context, slug string) (*App, error)
GetAppByPublishableKey(ctx context.Context, key string) (*App, error)
UpdateApp(ctx context.Context, a *App) error
DeleteApp(ctx context.Context, appID id.AppID) error
ListApps(ctx context.Context) ([]*App, error)
// GetPlatformApp returns the single platform app (is_platform=true).
// Returns store.ErrNotFound if no platform app exists.
GetPlatformApp(ctx context.Context) (*App, error)
}
Store defines the persistence interface for app (tenant) operations.
Click to show internal directories.
Click to hide internal directories.