Documentation
¶
Overview ¶
Package project ties the pieces together: it finds the project, plans every file and migration, decides who owns each file and applies the plan atomically.
Index ¶
- Constants
- func ValidateSpec(dir, file string, content []byte) (schema.Diagnostics, error)
- func Within(root, path string) error
- type Action
- type ApplyResult
- type Config
- type DomainInfo
- type Error
- type ErrorKind
- type FileChange
- type GoUpgrade
- type Info
- type MigrationInfo
- type Options
- type Owner
- type Plan
- type ServiceInfo
- type ToolchainStatus
Constants ¶
View Source
const ( ConfigFile = "codebuild.json" SpecsDir = "specs" MigrationsDir = "migrations" SnapshotName = "codebuild.snapshot.json" SnapshotFile = MigrationsDir + "/" + SnapshotName )
View Source
const LockFile = ".codebuild.lock"
View Source
const WorkFile = "go.work"
Variables ¶
This section is empty.
Functions ¶
func ValidateSpec ¶
func ValidateSpec(dir, file string, content []byte) (schema.Diagnostics, error)
Types ¶
type ApplyResult ¶
func Apply ¶
func Apply(p *Plan) (*ApplyResult, error)
type Config ¶
type Config struct {
Dialect string `json:"dialect"`
Pagination gen.Pagination `json:"pagination"`
ManualWiring []string `json:"manualWiring"`
Generate gen.Parts `json:"generate"`
}
func DefaultConfig ¶
func ParseConfig ¶
type DomainInfo ¶
type Error ¶
type FileChange ¶
type Info ¶
type Info struct {
Root string `json:"root"`
Module string `json:"module"`
Dialect string `json:"dialect"`
Configured bool `json:"configured"`
GoVersion string `json:"goVersion"`
Toolchain string `json:"toolchain,omitempty"`
Status goversion.Status `json:"status"`
Capabilities goversion.Capabilities `json:"capabilities"`
Services []ServiceInfo `json:"services,omitempty"`
Domains []DomainInfo `json:"domains"`
Diagnostics schema.Diagnostics `json:"diagnostics,omitempty"`
}
type MigrationInfo ¶
type Plan ¶
type Plan struct {
Root string `json:"root"`
Module string `json:"module"`
Starter bool `json:"starter"`
Dialect string `json:"dialect"`
PreviousDialect string `json:"previousDialect,omitempty"`
Target goversion.Target `json:"target"`
GoUpgrade *GoUpgrade `json:"goUpgrade,omitempty"`
Toolchain *ToolchainStatus `json:"toolchain,omitempty"`
Domains []string `json:"domains"`
Files []FileChange `json:"files"`
Migration *MigrationInfo `json:"migration,omitempty"`
Migrations []MigrationInfo `json:"migrations,omitempty"`
Warnings []string `json:"warnings,omitempty"`
Diagnostics schema.Diagnostics `json:"diagnostics,omitempty"`
NextSteps []string `json:"nextSteps,omitempty"`
}
func (*Plan) Conflicts ¶
func (p *Plan) Conflicts() []FileChange
func (*Plan) HasChanges ¶
func (*Plan) UnifiedDiff ¶
type ServiceInfo ¶
type ToolchainStatus ¶
Click to show internal directories.
Click to hide internal directories.