app

package
v1.26.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package app configures and runs application.

Index

Constants

View Source
const (
	ProviderPostgres = "postgres"
	ProviderSQLite   = "sqlite"
	ProviderMongo    = "mongo"
)

Supported values for config.DB.Provider. Empty defaults to sqlite so `go run` with no config still works.

Variables

View Source
var CertStore security.Storager

CertStore holds the certificate store for domain certificates (set during Init).

View Source
var Version = "DEVELOPMENT"

Functions

func Init

func Init(cfg *config.Config) error

func MigrationError

func MigrationError(op string) error

func Run

func Run(cfg *config.Config, log logger.Interface)

Run creates objects via constructors.

Types

type DB

type DB interface {
	Close() error
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
}

DB is an interface for database operations.

type HTTPServer

type HTTPServer interface {
	Notify() <-chan error
	Shutdown() error
	Start() error
}

HTTPServer is an interface for the HTTP server.

type WebSocketUpgrader

type WebSocketUpgrader interface {
	Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*websocket.Conn, error)
}

WebSocketUpgrader is an interface for WebSocket upgrading.

Jump to

Keyboard shortcuts

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