Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EstimateResult ¶
type EstimateResult struct {
Subscription string `json:"subscription"`
ResourceGroup string `json:"resource_group"`
Currency string `json:"currency"`
Azure azureCost `json:"azure"`
DriftResources driftResources `json:"drift_resources"`
Drift driftBreakdown `json:"drift"`
Movable []FunctionApp `json:"movable_function_apps"`
Refused []FunctionApp `json:"refused_or_unverified"`
CosmosCount int `json:"cosmos_accounts"`
StorageCount int `json:"storage_accounts"`
Assumptions []string `json:"assumptions"`
SavingCents int `json:"monthly_saving_cents"`
FXNote string `json:"fx_note,omitempty"`
}
EstimateResult is the full output of `estimate`, also the --json shape.
type FunctionApp ¶
type FunctionApp struct {
Name string
Runtime string // python | node | dotnet | java | powershell | unknown
Class MoveClass
Reason string // why Refused/Verify (empty when Movable)
}
FunctionApp is one Azure Function App, classified by its runtime.
type Inventory ¶
type Inventory struct {
Subscription string
ResourceGroup string
FunctionApps []FunctionApp
Cosmos []NamedResource
Storage []NamedResource
StaticSites []NamedResource
Other []NamedResource
}
Inventory is the normalized result of discovering one resource group.
type Manifest ¶
type Manifest struct {
Version string `json:"version"`
CreatedAt string `json:"created_at"`
Subscription string `json:"subscription"`
ResourceGroup string `json:"resource_group"`
SliceName string `json:"slice_name"`
Functions []ManifestFunction `json:"functions"`
Collections []ManifestCollection `json:"collections"`
Blobs []ManifestBlob `json:"blobs"`
Queues []ManifestQueue `json:"queues"`
Secrets []ManifestSecret `json:"secrets"`
Sites []ManifestSite `json:"sites"`
Refusals []Refusal `json:"refusals"`
}
Manifest indexes one snapshot.
type ManifestBlob ¶
type ManifestBlob struct {
Account string `json:"account"`
Container string `json:"container"`
DataDir string `json:"data_dir"` // relative dir holding the blobs
BlobCount int `json:"blob_count"`
Bytes int64 `json:"bytes"`
}
ManifestBlob is one blob container captured under DataDir (its blobs written as files, ready to seed Drift Backbone Blobs with the container as the bucket).
type ManifestCollection ¶
type ManifestCollection struct {
Name string `json:"name"` // Drift collection name
Account string `json:"account"` // azure cosmos account
DataPath string `json:"data_path"` // relative path to the JSONL export
DocCount int `json:"doc_count"`
SHA256 string `json:"sha256"`
}
ManifestCollection is one Cosmos (Mongo API) collection exported as JSONL.
type ManifestFunction ¶
type ManifestFunction struct {
Name string `json:"name"` // azure function name
Handler string `json:"handler"` // Drift handler name (language casing)
Runtime string `json:"runtime"` // python | node
Trigger ManifestTrigger `json:"trigger"`
SourcePath string `json:"source_path"` // relative path to the original source file
SHA256 string `json:"sha256"`
Secrets []string `json:"secrets,omitempty"` // app-setting names the function reads
Bindings []string `json:"bindings,omitempty"` // non-trigger bindings → REPORT.md TODOs
}
ManifestFunction is one movable Azure function, ready to scaffold.
type ManifestQueue ¶
type ManifestQueue struct {
Account string `json:"account"`
Name string `json:"name"`
DataPath string `json:"data_path"` // relative path to the peeked-messages JSONL
MessageCount int `json:"message_count"`
}
ManifestQueue is one storage queue. Messages are PEEKED, never received — the source queue is left intact; they are re-pushed at apply, never seeded.
type ManifestSecret ¶
ManifestSecret is one app setting captured as a Drift secret. Value is only present when the operator passed --deref-secrets.
type ManifestSite ¶
type ManifestSite struct {
Name string `json:"name"`
SourceDir string `json:"source_dir"` // relative dir in azure_export/
}
ManifestSite is one Static Web App captured for Canvas.
type ManifestTrigger ¶
type ManifestTrigger struct {
Type string `json:"type"` // http | queue | timer
Method string `json:"method,omitempty"` // http: get/post/put/delete/patch
Route string `json:"route,omitempty"` // http route (Drift form)
Queue string `json:"queue,omitempty"` // queue: source queue name
Schedule string `json:"schedule,omitempty"` // timer: 5-field cron (NCRONTAB-translated)
Auth string `json:"auth"` // none | apikey
}
ManifestTrigger is the one trigger a function declares.
type MoveClass ¶
type MoveClass int
MoveClass is how a discovered resource fares against Drift's primitives.
const ( // Movable — a Drift primitive covers it (the tool can scaffold it). Movable MoveClass = iota // Refused — no Drift primitive; it stays on Azure, by design and on the // record. Never counted as a saving. Refused // Verify — probably movable, but a fact (usually runtime) couldn't be // determined from inventory alone. Confirmed at `snapshot`/`transform`. Verify )
type NamedResource ¶
NamedResource is a discovered resource we only need to count for the estimate.
type Refusal ¶
type Refusal struct {
Code RefuseCode `json:"code"`
Resource string `json:"resource"`
Detail string `json:"detail"` // what was found
Guidance string `json:"guidance"` // what to do about it
}
Refusal is one resource the tool will not move, on the record.
type RefuseCode ¶
type RefuseCode string
RefuseCode is a stable, machine-readable reason a resource will not be migrated. Stable because REFUSED.md is a contract: Studio quotes from it, a customer diffs it across runs, and a sales deck must be able to trust it. Never renumber or repurpose a code; add new ones.
const ( RefuseRuntimeDotNet RefuseCode = "RUNTIME_DOTNET" RefuseRuntimeJava RefuseCode = "RUNTIME_JAVA" RefuseRuntimePowerShell RefuseCode = "RUNTIME_POWERSHELL" RefuseRuntimeUnknown RefuseCode = "RUNTIME_UNVERIFIED" RefuseDurableFunctions RefuseCode = "DURABLE_FUNCTIONS" RefuseServiceBusTopic RefuseCode = "SERVICEBUS_TOPIC" RefuseEventGridHub RefuseCode = "EVENTGRID_OR_EVENTHUB" RefuseCosmosServerLogic RefuseCode = "COSMOS_SQL_SERVER_LOGIC" RefuseAzureSQL RefuseCode = "AZURE_SQL_DATABASE" RefuseAADIdentity RefuseCode = "AUTH_AAD_EASYAUTH" RefuseSourceBlocked RefuseCode = "SOURCE_RETRIEVAL_BLOCKED" RefuseUnknownBinding RefuseCode = "BINDING_UNSUPPORTED" RefuseTimerTrigger RefuseCode = "TIMER_TRIGGER" )