Skip to content

Commit

Permalink
docs(app): improve context docs
Browse files Browse the repository at this point in the history
  • Loading branch information
imiric committed Apr 18, 2024
1 parent 08692c7 commit 7bf14a6
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions app/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,27 @@ import (
// the application to avoid direct dependencies on external systems, and make
// testing easier.
type Context struct {
Ctx context.Context
Version string // The static app version in the binary
VersionInit string // The app version the DB was initialized with
FS vfs.FileSystem
DataDir string
Env Environment
Logger *slog.Logger
UUIDGen func() string
Ctx context.Context // global context
FS vfs.FileSystem // filesystem
DataDir string // app data storage directory
Env Environment // process environment
Logger *slog.Logger // global logger
UUIDGen func() string // UUID generator

// Standard streams
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer

// Stores
DB *db.DB
Store store.Store
User *models.User
User *models.User // current app user

// Metadata
Version string // short semantic app version
VersionFull string // app version including Go runtime information
VersionInit string // app version the DB was initialized with
}

// Environment is the interface to the process environment.
Expand Down

0 comments on commit 7bf14a6

Please sign in to comment.