Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MigrateDirCandidates = []string{
"migrations",
"migrate",
"db/migrations",
"db/migrate",
"sql/migrations",
"backend/migrations",
"backend/migrate",
}
MigrateDirCandidates lists common migration directory names (relative to project root). Shared between detect, contract, and CLI packages so the list is defined once.
View Source
var SeedDirCandidates = []string{
"seed",
"seeds",
"db/seed",
"db/seeds",
"sql/seed",
"sql/seeds",
"backend/seed",
"backend/seeds",
}
SeedDirCandidates lists common seed directory names (relative to project root).
Functions ¶
func ParseEnvFiles ¶
ParseEnvFiles reads all .env files from a directory using the shared env parser.
func ScanLogFiles ¶ added in v0.15.0
ScanLogFiles recursively searches for *.log files in a project directory. It skips common non-project directories like .git, node_modules, vendor, etc. Returns nil if no log files are found.
Types ¶
type DatabaseResult ¶
type DockerResult ¶ added in v0.25.0
type DockerResult struct {
ComposeFile string `toml:"compose_file,omitempty"`
Services []DockerServiceInfo `toml:"services,omitempty"`
}
DockerResult represents detected Docker service information.
type DockerServiceInfo ¶ added in v0.25.0
type DockerServiceInfo struct {
Name string `json:"name"`
Image string `json:"image,omitempty"`
Ports string `json:"ports,omitempty"`
HasDB bool `json:"has_db"`
HasAPI bool `json:"has_api"`
HasGRPC bool `json:"has_grpc"`
}
DockerServiceInfo represents a single Docker Compose service.
type GRPCResult ¶
type Result ¶
type Result struct {
Database *DatabaseResult `toml:"database,omitempty"`
API *APIResult `toml:"api,omitempty"`
GRPC *GRPCResult `toml:"grpc,omitempty"`
Log *LogResult `toml:"log,omitempty"`
Docker *DockerResult `toml:"docker,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.