app

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 3 Imported by: 0

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"`
	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 Metadata

type Metadata map[string]string

Metadata holds arbitrary app metadata as typed key-value pairs.

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.

Jump to

Keyboard shortcuts

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