bootstrap

package
v0.0.0-...-6da63fb Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeSelfHosted = "selfhosted"
	ModeCloud      = "cloud"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessingRuntimeFactory

type ProcessingRuntimeFactory = processing.RuntimeFactory

type Services

type Services struct {
	DB                      *bun.DB
	TokenManager            *auth.TokenManager
	Storage                 storage.Storage
	StorageProvider         *storageprovider.Provider
	ImagorProvider          *imagorprovider.Provider
	RegistryStore           registrystore.Store
	UserStore               userstore.Store
	OrgStore                org.OrgStore                    // nil in self-hosted; set in cloud multi-tenant mode
	SpaceStore              space.SpaceStore                // nil in self-hosted; set in cloud multi-tenant mode
	SpaceInviteStore        space.SpaceInviteStore          // nil when invitation storage is unavailable
	HostedStorageStore      management.HostedStorageStore   // nil unless cloud hosted-storage metering is enabled
	ProcessingUsageStore    management.ProcessingUsageStore // nil unless cloud processing usage metering is enabled
	BillingService          billing.Service                 // nil unless cloud billing integration is enabled
	ProcessingUsageRecorder processing.UsageRecorder        // nil unless running a processing node with usage flushing enabled
	InviteSender            space.InviteSender              // nil when invitation email is not configured
	SignupVerification      signup.Runtime                  // nil until a cloud signup verification runtime is injected
	SpaceConfigStore        processing.SpaceConfigReader    // nil unless running a processing node; Start() called by server
	ProcessingConfig        *processing.NodeConfig          // nil unless running a processing node
	LicenseService          *license.Service
	Encryption              *encryption.Service
	Config                  *config.Config
	Logger                  *zap.Logger
}

Services contains all initialized application services

func Initialize

func Initialize(cfg *config.Config, logger *zap.Logger, args []string, mode string) (*Services, error)

Initialize sets up the database, runs migrations, and initializes all services. Prefer the explicit mode wrappers for new call sites.

func InitializeCloud

func InitializeCloud(cfg *config.Config, logger *zap.Logger, args []string) (*Services, error)

func InitializeCloudWithFactories

func InitializeCloudWithFactories(cfg *config.Config, logger *zap.Logger, args []string, cloudConfig management.CloudConfig, factories management.CloudFactories) (*Services, error)

func InitializeProcessingWithFactory

func InitializeProcessingWithFactory(cfg *config.Config, nodeCfg processing.NodeConfig, logger *zap.Logger, runtimeFactory ProcessingRuntimeFactory) (*Services, error)

func InitializeProcessingWithFactoryAndHooks

func InitializeProcessingWithFactoryAndHooks(cfg *config.Config, nodeCfg processing.NodeConfig, logger *zap.Logger, runtimeFactory ProcessingRuntimeFactory, hooks processing.NodeHooks) (*Services, error)

func InitializeSelfHosted

func InitializeSelfHosted(cfg *config.Config, logger *zap.Logger, args []string) (*Services, error)

Jump to

Keyboard shortcuts

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