Documentation
¶
Overview ¶
Package databases allows CRUD operations on the Databases resource - a sub-resource of Subscriptions.
Index ¶
- Constants
- func AlertNameValues() []string
- func DataEvictionPolicyValues() []string
- func DataPersistenceValues() []string
- func MemoryStorageValues() []string
- func ProtocolValues() []string
- func SourceTypeValues() []string
- type API
- func (a *API) Backup(ctx context.Context, subscription int, database int) error
- func (a *API) Create(ctx context.Context, subscription int, db CreateDatabase) (int, error)
- func (a *API) Delete(ctx context.Context, subscription int, database int) error
- func (a *API) Get(ctx context.Context, subscription int, database int) (*Database, error)
- func (a *API) Import(ctx context.Context, subscription int, database int, request Import) error
- func (a *API) List(ctx context.Context, subscription int) *ListDatabase
- func (a *API) Update(ctx context.Context, subscription int, database int, update UpdateDatabase) error
- type Alert
- type Clustering
- type CreateAlert
- type CreateDatabase
- type CreateModule
- type CreateThroughputMeasurement
- type Database
- type HttpClient
- type Import
- type ListDatabase
- type Log
- type Module
- type RegexRule
- type ReplicaOf
- type Security
- type Task
- type Throughput
- type UpdateAlert
- type UpdateDatabase
- type UpdateThroughputMeasurement
Constants ¶
const ( // Active value of the `Status` field in `Database` StatusActive = "active" // Draft value of the `Status` field in `Database` StatusDraft = "draft" // Pending value of the `Status` field in `Database` StatusPending = "pending" // RCP change pending value of the `Status` field in `Database` StatusRCPChangePending = "rcp-change-pending" // RCP draft value of the `Status` field in `Database` StatusRCPDraft = "rcp-draft" // RCP active change draft value of the `Status` field in `Database` StatusRCPActiveChangeDraft = "rcp-active-change-draft" // Active change draft value of the `Status` field in `Database` StatusActiveChangeDraft = "active-change-draft" // Active change pending value of the `Status` field in `Database` StatusActiveChangePending = "active-change-pending" // Error value of the `Status` field in `Database` StatusError = "error" )
Variables ¶
This section is empty.
Functions ¶
func AlertNameValues ¶
func AlertNameValues() []string
func DataEvictionPolicyValues ¶
func DataEvictionPolicyValues() []string
func DataPersistenceValues ¶
func DataPersistenceValues() []string
func MemoryStorageValues ¶
func MemoryStorageValues() []string
func ProtocolValues ¶
func ProtocolValues() []string
func SourceTypeValues ¶
func SourceTypeValues() []string
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) Backup ¶
Backup will create a manual backup of the database to the destination the database has been configured to backup to.
func (*API) Create ¶
Create will create a new database for the subscription and return the identifier of the database.
func (*API) Import ¶
Import will import data from an RDB file or another Redis database into an existing database.
type Clustering ¶
type Clustering struct { NumberOfShards *int `json:"numberOfShards,omitempty"` RegexRules []*RegexRule `json:"regexRules,omitempty"` }
func (Clustering) String ¶
func (o Clustering) String() string
type CreateAlert ¶
type CreateAlert struct { Name *string `json:"name,omitempty"` Value *int `json:"value,omitempty"` }
func (CreateAlert) String ¶
func (o CreateAlert) String() string
type CreateDatabase ¶
type CreateDatabase struct { DryRun *bool `json:"dryRun,omitempty"` Name *string `json:"name,omitempty"` Protocol *string `json:"protocol,omitempty"` MemoryLimitInGB *float64 `json:"memoryLimitInGb,omitempty"` SupportOSSClusterAPI *bool `json:"supportOSSClusterApi,omitempty"` UseExternalEndpointForOSSClusterAPI *bool `json:"useExternalEndpointForOSSClusterApi,omitempty"` DataPersistence *string `json:"dataPersistence,omitempty"` DataEvictionPolicy *string `json:"dataEvictionPolicy,omitempty"` Replication *bool `json:"replication,omitempty"` ThroughputMeasurement *CreateThroughputMeasurement `json:"throughputMeasurement,omitempty"` AverageItemSizeInBytes *int `json:"averageItemSizeInBytes,omitempty"` ReplicaOf []*string `json:"replicaOf,omitempty"` PeriodicBackupPath *string `json:"periodicBackupPath,omitempty"` SourceIP []*string `json:"sourceIp,omitempty"` ClientSSLCertificate *string `json:"clientSslCertificate,omitempty"` Password *string `json:"password,omitempty"` Alerts []*CreateAlert `json:"alerts,omitempty"` Modules []*CreateModule `json:"modules,omitempty"` EnableTls *bool `json:"enableTls,omitempty"` }
func (CreateDatabase) String ¶
func (o CreateDatabase) String() string
type CreateModule ¶
type CreateModule struct {
Name *string `json:"name,omitempty"`
}
func (CreateModule) String ¶
func (o CreateModule) String() string
type CreateThroughputMeasurement ¶
type CreateThroughputMeasurement struct { By *string `json:"by,omitempty"` Value *int `json:"value,omitempty"` }
func (CreateThroughputMeasurement) String ¶
func (o CreateThroughputMeasurement) String() string
type Database ¶
type Database struct { ID *int `json:"databaseId,omitempty"` Name *string `json:"name,omitempty"` Protocol *string `json:"protocol,omitempty"` Provider *string `json:"provider,omitempty"` Region *string `json:"region,omitempty"` Status *string `json:"status,omitempty"` MemoryLimitInGB *float64 `json:"memoryLimitInGb,omitempty"` MemoryUsedInMB *float64 `json:"memoryUsedInMb,omitempty"` SupportOSSClusterAPI *bool `json:"supportOSSClusterApi,omitempty"` DataPersistence *string `json:"dataPersistence,omitempty"` Replication *bool `json:"replication,omitempty"` DataEvictionPolicy *string `json:"dataEvictionPolicy,omitempty"` ThroughputMeasurement *Throughput `json:"throughputMeasurement,omitempty"` ReplicaOf *ReplicaOf `json:"replicaOf,omitempty"` Clustering *Clustering `json:"clustering,omitempty"` Security *Security `json:"security,omitempty"` Modules []*Module `json:"modules,omitempty"` Alerts []*Alert `json:"alerts,omitempty"` ActivatedOn *time.Time `json:"activatedOn,omitempty"` LastModified *time.Time `json:"lastModified,omitempty"` MemoryStorage *string `json:"memoryStorage,omitempty"` PrivateEndpoint *string `json:"privateEndpoint,omitempty"` PublicEndpoint *string `json:"publicEndpoint,omitempty"` RedisVersionCompliance *string `json:"redisVersionCompliance,omitempty"` }
type HttpClient ¶
type HttpClient interface { Get(ctx context.Context, name, path string, responseBody interface{}) error GetWithQuery(ctx context.Context, name, path string, query url.Values, responseBody interface{}) error Post(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error Put(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error Delete(ctx context.Context, name, path string, responseBody interface{}) error }
type Import ¶
type ListDatabase ¶
type ListDatabase struct {
// contains filtered or unexported fields
}
func (*ListDatabase) Err ¶
func (d *ListDatabase) Err() error
Err returns any error that occurred while trying to retrieve the next page of databases.
func (*ListDatabase) Next ¶
func (d *ListDatabase) Next() bool
Next attempts to retrieve the next page of databases and will return false if no more databases were found. Any error that occurs within this function can be retrieved from the `Err()` function.
func (*ListDatabase) Value ¶
func (d *ListDatabase) Value() *Database
Value returns the current page of databases.
type Security ¶
type Throughput ¶
func (Throughput) String ¶
func (o Throughput) String() string
type UpdateAlert ¶
type UpdateAlert struct { Name *string `json:"name,omitempty"` Value *int `json:"value,omitempty"` }
func (UpdateAlert) String ¶
func (o UpdateAlert) String() string
type UpdateDatabase ¶
type UpdateDatabase struct { DryRun *bool `json:"dryRun,omitempty"` Name *string `json:"name,omitempty"` MemoryLimitInGB *float64 `json:"memoryLimitInGb,omitempty"` SupportOSSClusterAPI *bool `json:"supportOSSClusterApi,omitempty"` UseExternalEndpointForOSSClusterAPI *bool `json:"useExternalEndpointForOSSClusterApi,omitempty"` DataEvictionPolicy *string `json:"dataEvictionPolicy,omitempty"` Replication *bool `json:"replication,omitempty"` ThroughputMeasurement *UpdateThroughputMeasurement `json:"throughputMeasurement,omitempty"` RegexRules []*string `json:"regexRules,omitempty"` DataPersistence *string `json:"dataPersistence,omitempty"` ReplicaOf []*string `json:"replicaOf"` PeriodicBackupPath *string `json:"periodicBackupPath,omitempty"` SourceIP []*string `json:"sourceIp,omitempty"` ClientSSLCertificate *string `json:"clientSslCertificate,omitempty"` Password *string `json:"password,omitempty"` Alerts []*UpdateAlert `json:"alerts,omitempty"` EnableTls *bool `json:"enableTls,omitempty"` }
func (UpdateDatabase) String ¶
func (o UpdateDatabase) String() string
type UpdateThroughputMeasurement ¶
type UpdateThroughputMeasurement struct { By *string `json:"by,omitempty"` Value *int `json:"value,omitempty"` }
func (UpdateThroughputMeasurement) String ¶
func (o UpdateThroughputMeasurement) String() string