server

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger added in v0.7.0

func InitLogger(logLevel string)

InitLogger sets up the global slog logger with a JSON handler.

func Migrate added in v0.7.0

func Migrate(ctx context.Context, cfg *config.Config, version string) error

Migrate runs database migrations and creates the default namespace.

func MigrateDown added in v0.7.0

func MigrateDown(ctx context.Context, cfg *config.Config, version string) error

MigrateDown rolls back the last database migration.

func Serve

func Serve(
	ctx context.Context,
	cfg config.ServerConfig,
	namespaceService handler.NamespaceService,
	assetService handler.AssetService,
	starService handler.StarService,
	discussionService handler.DiscussionService,
	tagService handler.TagService,
	tagTemplateService handler.TagTemplateService,
	userService handler.UserService,
) error

func Start added in v0.7.0

func Start(ctx context.Context, cfg *config.Config, version string) error

Start initializes all dependencies and starts the server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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