Documentation ¶
Index ¶
- type BackupResponse
- type BigQueryOptions
- type BucketListRequest
- type BucketListResponse
- type CalculateRequest
- type CalculatedResponse
- type Cost
- type CreateRequest
- type DatasetListRequest
- type DatasetListResponse
- type DeleteRequest
- type DeleteResponse
- type GCSOptions
- type GetRequest
- type JobResponse
- type ListRequest
- type ListingResponse
- type MirrorOptions
- type Page
- type RequestType
- type RestoreAction
- type RestoreRequest
- type RestoreResponse
- type SnapshotOptions
- type TargetOptions
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupResponse ¶
type BackupResponse struct { ID string `json:"id"` CreateRequest Status string `json:"status"` Sink string `json:"sink"` SinkProject string `json:"sink_project"` CreatedTimestamp string `json:"created,omitempty"` UpdatedTimestamp string `json:"updated,omitempty"` DeletedTimestamp string `json:"deleted,omitempty"` Jobs []JobResponse `json:"jobs,omitempty"` JobsTotal uint64 `json:"jobs_total,omitempty"` }
BackupResponse get backup details
type BigQueryOptions ¶
type BigQueryOptions struct { Dataset string `json:"dataset,omitempty"` Table []string `json:"table,omitempty"` ExcludedTables []string `json:"excluded_tables,omitempty"` }
BigQueryOptions specify backup for a source BigQuery datast or table(s)
type BucketListRequest ¶
type BucketListRequest struct {
Project string `json:"project"`
}
BucketListRequest request bucket list
type BucketListResponse ¶
type BucketListResponse struct {
Buckets []string `json:"buckets"`
}
BucketListResponse response for a BucketListRequest request
type CalculateRequest ¶
type CalculateRequest struct {
CreateRequest
}
CalculateRequest request cost calculation for a backup
type CalculatedResponse ¶
type CalculatedResponse struct {
Costs []*Cost `json:"costs"`
}
CalculatedResponse response for a CalculateRequest request
type Cost ¶
type Cost struct { Cost float64 `json:"cost"` Currency string `json:"currency"` Name string `json:"name"` Period int64 `json:"period"` SizeInBytes int64 `json:"size_in_bytes"` }
Cost represent backup data price in a given month
type CreateRequest ¶
type CreateRequest struct { Type string `json:"type,omitempty"` Strategy string `json:"strategy,omitempty"` Project string `json:"project,omitempty"` TargetOptions TargetOptions `json:"target,omitempty"` SnapshotOptions SnapshotOptions `json:"snapshot_options,omitempty"` MirrorOptions MirrorOptions `json:"mirror_options,omitempty"` BigQueryOptions BigQueryOptions `json:"bigquery_options,omitempty"` GCSOptions GCSOptions `json:"gcs_options,omitempty"` }
CreateRequest make a new backup
type DatasetListRequest ¶
type DatasetListRequest struct {
Project string `json:"project"`
}
DatasetListRequest request datasets list
type DatasetListResponse ¶
type DatasetListResponse struct {
Datasets []string `json:"datasets"`
}
DatasetListResponse response for a BucketListRequest request
type DeleteRequest ¶
type DeleteRequest struct {
BackupID string
}
DeleteRequest remove bucket an all files within next 60 days
type DeleteResponse ¶
type DeleteResponse struct { DeleteRequest Status string `json:"status,omitempty"` CreatedTimestamp string `json:"created,omitempty"` UpdatedTimestamp string `json:"updated,omitempty"` DeletedTimestamp string `json:"deleted,omitempty"` }
DeleteResponse response for a UpdateRequest
type GCSOptions ¶
type GCSOptions struct { Bucket string `json:"bucket,omitempty"` IncludePath []string `json:"include_prefixes,omitempty"` ExcludePath []string `json:"exclude_prefixes,omitempty"` }
GCSOptions specify backup for a source bucket
type GetRequest ¶
GetRequest get backup details
type JobResponse ¶
type JobResponse struct { ID string `json:"id"` BackupID string `json:"backup_id"` ForeignJobID string `json:"foreign_job_id,omitempty"` Status string `json:"status"` Source string `json:"source"` CreatedTimestamp string `json:"created,omitempty"` UpdatedTimestamp string `json:"updated,omitempty"` DeletedTimestamp string `json:"deleted,omitempty"` }
JobResponse get backup job details
type ListingResponse ¶
type ListingResponse struct {
Backups []BackupResponse `json:"backups"`
}
ListingResponse response for a ListRequest
type MirrorOptions ¶
type MirrorOptions struct {
LifetimeInDays uint `json:"lifetime_in_days,omitempty"`
}
MirrorOptions specify backup mirror options
type RequestType ¶
type RequestType string
RequestType type of a request
const ( // Creating - create a new backup Creating RequestType = "Creating" // Getting - get backup information Getting RequestType = "Getting" // Listing - list backup Listing RequestType = "Listing" // Updating - change backup Updating RequestType = "Updating" // Restoring - preapre restore command for a backup Restoring RequestType = "Restoring" // Calculating - calculate prize for a backup Calculating RequestType = "Calculating" // DatasetListing - list datasets avaiable for a User DatasetListing RequestType = "DatasetListing" // BucketListing - list buckets avaiable for a User BucketListing RequestType = "BuckeListing" )
func (RequestType) EqualTo ¶
func (s RequestType) EqualTo(requestType string) bool
EqualTo check if a given string match type
func (RequestType) String ¶
func (s RequestType) String() string
type RestoreAction ¶
RestoreAction request instruction for a backup restoration currently only BigQuery is supported
type RestoreRequest ¶
RestoreRequest get instruction for a backup restoration only BigQuery is supported
type RestoreResponse ¶
type RestoreResponse struct { BackupID string `json:"backup_id"` RestoreActions []RestoreAction `json:"actions"` }
RestoreResponse response for a RestoreAction request
type SnapshotOptions ¶
type SnapshotOptions struct { LifetimeInDays uint `json:"lifetime_in_days,omitempty"` FrequencyInHours uint `json:"frequency_in_hours,omitempty"` LastScheduled string `json:"last_scheduled,omitempty"` }
SnapshotOptions specify backup snapshot options
type TargetOptions ¶
type TargetOptions struct { Region string `json:"region,omitempty"` StorageClass string `json:"storage_class,omitempty"` LifecycleCount uint `json:"lifecycle_count,omitempty"` ArchiveTTM uint `json:"archive_ttm"` }
TargetOptions specify backup sink options
type UpdateRequest ¶
type UpdateRequest struct { BackupID string `json:"backup_id"` Status string `json:"status,omitempty"` MirrorTTL uint `json:"mirror_ttl,omitempty"` SnapshotTTL uint `json:"snapshot_ttl,omitempty"` ArchiveTTM uint `json:"archive_ttm"` // only for GCS backups IncludePath []string `json:"include_path,omitempty"` ExcludePath []string `json:"exclude_path,omitempty"` // only for BigQuery backups Table []string `json:"table,omitempty"` ExcludedTables []string `json:"excluded_tables,omitempty"` }
UpdateRequest change backup
type UpdateResponse ¶
type UpdateResponse struct { UpdateRequest CreatedTimestamp string `json:"created,omitempty"` UpdatedTimestamp string `json:"updated,omitempty"` DeletedTimestamp string `json:"deleted,omitempty"` }
UpdateResponse response for a UpdateRequest