Documentation ¶
Index ¶
- func RedactedURL(s string) (string, error)
- func SetHeader(req *http.Request, token string)
- func SetVersion(v, flavor string)
- type Client
- type DeployedFileInput
- type DeployedTargetInput
- type DirInput
- type ReportMigrationInput
- type ReportMigrationSetInput
- type ReportStep
- type ReportStepLog
- type StmtErrorInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedactedURL ¶ added in v0.12.0
RedactedURL returns a URL string with the userinfo redacted.
func SetVersion ¶ added in v0.13.1
func SetVersion(v, flavor string)
SetVersion allow cmdapi to set the version of the CLI provided at build time.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for the Atlas Cloud API.
func (*Client) ReportMigration ¶ added in v0.11.0
func (c *Client) ReportMigration(ctx context.Context, input ReportMigrationInput) error
ReportMigration reports a migration deployment to the Atlas Cloud API.
func (*Client) ReportMigrationSet ¶ added in v0.12.0
func (c *Client) ReportMigrationSet(ctx context.Context, input ReportMigrationSetInput) error
ReportMigrationSet reports a set of migration deployments to the Atlas Cloud API.
type DeployedFileInput ¶ added in v0.11.0
type DeployedFileInput struct { Name string `json:"name"` Content string `json:"content"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` Skipped int `json:"skipped"` Applied int `json:"applied"` Error *StmtErrorInput `json:"error,omitempty"` }
DeployedFileInput represents the input type for a deployed file.
type DeployedTargetInput ¶ added in v0.11.0
type DeployedTargetInput struct { ID string `json:"id"` Schema string `json:"schema"` URL string `json:"url"` // URL string without userinfo. }
DeployedTargetInput represents the input type for a deployed target.
type ReportMigrationInput ¶ added in v0.11.0
type ReportMigrationInput struct { ProjectName string `json:"projectName"` EnvName string `json:"envName"` DirName string `json:"dirName"` AtlasVersion string `json:"atlasVersion"` Target DeployedTargetInput `json:"target"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` FromVersion string `json:"fromVersion"` ToVersion string `json:"toVersion"` CurrentVersion string `json:"currentVersion"` Error *string `json:"error,omitempty"` Files []DeployedFileInput `json:"files"` Log string `json:"log"` }
ReportMigrationInput represents an input type for reporting a migration deployments.
type ReportMigrationSetInput ¶ added in v0.12.0
type ReportMigrationSetInput struct { ID string `json:"id"` Planned int `json:"planned"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` Error *string `json:"error,omitempty"` Log []ReportStep `json:"log,omitempty"` Completed []ReportMigrationInput `json:"completed,omitempty"` }
ReportMigrationSetInput represents the input type for reporting a set of migration deployments.
type ReportStep ¶ added in v0.12.0
type ReportStep struct { Text string `json:"text"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` Error bool `json:"error,omitempty"` Log []ReportStepLog `json:"log,omitempty"` }
ReportStep is top-level step in a report.
type ReportStepLog ¶ added in v0.12.0
type ReportStepLog struct { Text string `json:"text,omitempty"` Children []ReportStepLog `json:"children,omitempty"` }
ReportStepLog is a log entry in a step.
type StmtErrorInput ¶ added in v0.11.0
StmtErrorInput represents the input type for a statement error.