Documentation
¶
Overview ¶
Package api defines canonical domain-level DTO types for shared API payloads. These types are the authoritative definitions for wire shapes that cross the server/client/cli boundary. Handlers encode them; clients and CLI decode them.
Ownership rules:
- Types here are stable across server, client, and CLI boundaries.
- JSON field names must not change without a coordinated wire-format migration.
- Handler-local and CLI-local mirrors of these shapes are superseded by this package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateSingleRepoRunResponse ¶
type CreateSingleRepoRunResponse struct {
WaveID domaintypes.WaveID `json:"wave_id"`
RunID domaintypes.RunID `json:"run_id"`
MigID domaintypes.MigID `json:"mig_id"`
SpecID domaintypes.SpecID `json:"spec_id"`
}
CreateSingleRepoRunResponse is returned by POST /v1/runs.
type MigListResponse ¶
type MigListResponse struct {
Migs []MigSummary `json:"migs"`
}
MigListResponse is the canonical response envelope for GET /v1/migs.
type MigRepoListResponse ¶
type MigRepoListResponse struct {
Repos []MigRepoSummary `json:"repos"`
}
MigRepoListResponse is the canonical response envelope for GET /v1/migs/{id}/repos.
type MigRepoSummary ¶
type MigRepoSummary struct {
ID domaintypes.MigRepoID `json:"id"`
MigID domaintypes.MigID `json:"mig_id"`
RepoURL string `json:"repo_url"`
BaseRef string `json:"base_ref"`
CreatedAt time.Time `json:"created_at"`
}
MigRepoSummary is the canonical DTO for a single repo entry within a mig's repo set. It is the authoritative response shape for:
- GET /v1/migs/{id}/repos — individual items in the repo list
- POST /v1/migs/{id}/repos — the added repo in the 201 response
Wire shape is stable: JSON field names must not change.
type MigSummary ¶
type MigSummary struct {
ID domaintypes.MigID `json:"id"`
Name string `json:"name"`
SpecID *domaintypes.SpecID `json:"spec_id,omitempty"`
CreatedBy *string `json:"created_by,omitempty"`
Archived bool `json:"archived"`
CreatedAt time.Time `json:"created_at"`
}
MigSummary is the canonical DTO for a single mig project entry. It is the authoritative response shape for:
- GET /v1/migs — individual items in the mig list
- POST /v1/migs — the created mig in the 201 response
Wire shape is stable: JSON field names must not change.
type NamedSpecListResponse ¶
type NamedSpecListResponse struct {
Specs []NamedSpecSummary `json:"specs"`
}
NamedSpecListResponse is returned by GET /v1/specs.
type NamedSpecResolveResponse ¶
type NamedSpecResolveResponse struct {
NamedSpecSummary
Spec json.RawMessage `json:"spec"`
}
NamedSpecResolveResponse is returned by GET /v1/specs/resolve.
type NamedSpecSource ¶
NamedSpecSource identifies the committed repository that published a named spec.
type NamedSpecSummary ¶
type NamedSpecSummary struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Source NamedSpecSource `json:"source"`
SHA string `json:"sha"`
SourceCommittedAt time.Time `json:"source_committed_at"`
CreatedBy *string `json:"created_by,omitempty"`
UpdatedBy *string `json:"updated_by,omitempty"`
CreatedAt time.Time `json:"created_at"`
ArchivedAt *time.Time `json:"archived_at,omitempty"`
Skipped bool `json:"skipped"`
}
NamedSpecSummary is the canonical response summary for a named spec row.
type PublishNamedSpecRequest ¶
type PublishNamedSpecRequest struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Source NamedSpecSource `json:"source"`
SHA string `json:"sha"`
SourceCommittedAt time.Time `json:"source_committed_at"`
Spec json.RawMessage `json:"spec"`
CreatedBy *string `json:"created_by,omitempty"`
}
PublishNamedSpecRequest is the canonical request DTO for POST /v1/specs.
type RunSubmitRequest ¶
type RunSubmitRequest struct {
RepoURL domaintypes.RepoURL `json:"repo_url"`
Ref domaintypes.GitRef `json:"ref"`
CommitSHA string `json:"commit_sha,omitempty"`
SpecID domaintypes.SpecID `json:"spec_id,omitempty"`
Spec json.RawMessage `json:"spec"`
CreatedBy string `json:"created_by,omitempty"`
}
RunSubmitRequest is the canonical request DTO for POST /v1/runs. It is the authoritative shape for single-repo run submission shared between the server handler and CLI clients.
Wire shape is stable: JSON field names must not change.
type UpdateNamedSpecRequest ¶
type UpdateNamedSpecRequest struct {
Archived bool `json:"archived"`
}
UpdateNamedSpecRequest is the canonical request DTO for PATCH /v1/specs/{spec_id}.