Documentation
¶
Overview ¶
Package portsmith provides embedded assets used by the portsmith CLI.
This root-level package exists solely to expose the examples/ directory via go:embed, since embed paths cannot contain "..". The binary reads ExamplesFS at runtime to copy reference examples into newly initialised projects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ExamplesFS embed.FS
ExamplesFS contains the embedded example packages. Used by "portsmith init" to seed internal/ with reference code.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
portsmith
command
Command portsmith is the CLI entry point for the portsmith framework tools.
|
Command portsmith is the CLI entry point for the portsmith framework tools. |
|
portsmith/check
Package check implements the portsmith check command — CLI entry for the architecture linter.
|
Package check implements the portsmith check command — CLI entry for the architecture linter. |
|
portsmith/gen
Package gen implements the portsmith gen command.
|
Package gen implements the portsmith gen command. |
|
portsmith/init
Package initcmd implements the "portsmith init" command.
|
Package initcmd implements the "portsmith init" command. |
|
portsmith/mock
Package mockcmd implements the portsmith mock command.
|
Package mockcmd implements the portsmith mock command. |
|
portsmith/new
Package newcmd implements the portsmith new command.
|
Package newcmd implements the portsmith new command. |
|
examples
|
|
|
clean_package_example_en
Package example demonstrates a complete package structure in Clean Architecture.
|
Package example demonstrates a complete package structure in Clean Architecture. |
|
clean_package_example_ru
Package example демонстрирует полную структуру пакета в Clean Architecture.
|
Package example демонстрирует полную структуру пакета в Clean Architecture. |
|
internal
|
|
|
gen
Package gen implements the core logic for the portsmith gen command: AST-based method signature extraction and regex-based call collection.
|
Package gen implements the core logic for the portsmith gen command: AST-based method signature extraction and regex-based call collection. |
|
lint
Package lint implements portsmith architecture checks (rules R1–R14).
|
Package lint implements portsmith architecture checks (rules R1–R14). |
|
lintconfig
Package lintconfig loads portsmith.yaml including lint rules and severity.
|
Package lintconfig loads portsmith.yaml including lint rules and severity. |
|
stack
Package stack defines supported technology stacks and detects the active stack for a Go project (portsmith.yaml, go.mod, or explicit flag).
|
Package stack defines supported technology stacks and detects the active stack for a Go project (portsmith.yaml, go.mod, or explicit flag). |
|
pkg
|
|
|
apperrors
Package apperrors provides typed domain errors with HTTP status mapping.
|
Package apperrors provides typed domain errors with HTTP status mapping. |
|
chiserver
Package chiserver provides a production-ready Chi HTTP server with:
|
Package chiserver provides a production-ready Chi HTTP server with: |
|
config
Package config provides a thin wrapper around cleanenv for loading application configuration from environment variables.
|
Package config provides a thin wrapper around cleanenv for loading application configuration from environment variables. |
|
database
Package database provides GORM utilities for Clean Architecture backends:
|
Package database provides GORM utilities for Clean Architecture backends: |
|
pagination
Package pagination provides offset-based pagination for HTTP handlers and repositories.
|
Package pagination provides offset-based pagination for HTTP handlers and repositories. |
|
server
Package server provides a production-ready Gin HTTP server for portsmith applications.
|
Package server provides a production-ready Gin HTTP server for portsmith applications. |
|
sqlxdb
Package sqlxdb provides sqlx + PostgreSQL (pgx stdlib driver) helpers:
|
Package sqlxdb provides sqlx + PostgreSQL (pgx stdlib driver) helpers: |
|
testkit
Package testkit provides testing helpers for portsmith Clean Architecture applications.
|
Package testkit provides testing helpers for portsmith Clean Architecture applications. |
Click to show internal directories.
Click to hide internal directories.