Documentation ¶
Index ¶
- func ProtocolValues() []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 CreateFixedDatabase) (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) (*FixedDatabase, error)
- func (a *API) Import(ctx context.Context, subscription int, database int, request Import) error
- func (a *API) List(ctx context.Context, subscription int) *ListFixedDatabase
- func (a *API) Update(ctx context.Context, subscription int, database int, ...) error
- type Backup
- type Clustering
- type CreateFixedDatabase
- type DatabaseCertificate
- type FixedDatabase
- type HttpClient
- type Import
- type ListFixedDatabase
- type Log
- type NotFound
- type ReplicaOf
- type Security
- type SyncSource
- type TaskWaiter
- type UpdateFixedDatabase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtocolValues ¶
func ProtocolValues() []string
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewAPI ¶
func NewAPI(client HttpClient, taskWaiter TaskWaiter, logger Log) *API
func (*API) Backup ¶
Backup will create a manual backup of the database to the destination the fixed database has been configured to backup to.
func (*API) Create ¶
Create will create a new fixed 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 fixed database.
type Backup ¶
type Clustering ¶
type Clustering struct { Enabled *bool `json:"enabled,omitempty"` RegexRules []*databases.RegexRule `json:"regexRules,omitempty"` HashingPolicy *string `json:"hashingPolicy,omitempty"` }
func (Clustering) String ¶
func (o Clustering) String() string
type CreateFixedDatabase ¶
type CreateFixedDatabase struct { Name *string `json:"name,omitempty"` Protocol *string `json:"protocol,omitempty"` MemoryLimitInGB *float64 `json:"memoryLimitInGb,omitempty"` SupportOSSClusterAPI *bool `json:"supportOSSClusterApi,omitempty"` RespVersion *string `json:"respVersion,omitempty"` UseExternalEndpointForOSSClusterAPI *bool `json:"useExternalEndpointForOSSClusterApi,omitempty"` EnableDatabaseClustering *bool `json:"enableDatabaseClustering,omitempty"` DataPersistence *string `json:"dataPersistence,omitempty"` DataEvictionPolicy *string `json:"dataEvictionPolicy,omitempty"` Replication *bool `json:"replication,omitempty"` PeriodicBackupPath *string `json:"periodicBackupPath,omitempty"` SourceIPs []*string `json:"sourceIps,omitempty"` RegexRules []*string `json:"regexRules,omitempty"` Replica *ReplicaOf `json:"replica,omitempty"` ClientTlsCertificates []*DatabaseCertificate `json:"clientTlsCertificates,omitempty"` EnableTls *bool `json:"enableTls,omitempty"` Password *string `json:"password,omitempty"` Alerts *[]*databases.Alert `json:"alerts,omitempty"` Modules *[]*databases.Module `json:"modules,omitempty"` }
type DatabaseCertificate ¶
type DatabaseCertificate struct { Description *string `json:"description,omitempty"` PublicCertificatePEMString *string `json:"publicCertificatePEMString,omitempty"` }
func (DatabaseCertificate) String ¶
func (o DatabaseCertificate) String() string
type FixedDatabase ¶
type FixedDatabase struct { DatabaseId *int `json:"databaseId,omitempty"` Name *string `json:"name,omitempty"` Protocol *string `json:"protocol,omitempty"` Provider *string `json:"provider,omitempty"` Region *string `json:"region,omitempty"` RedisVersionCompliance *string `json:"redisVersionCompliance,omitempty"` RespVersion *string `json:"respVersion,omitempty"` Status *string `json:"status,omitempty"` PlanMemoryLimit *float64 `json:"planMemoryLimit,omitempty"` MemoryLimitMeasurementUnit *string `json:"memoryLimitMeasurementUnit,omitempty"` MemoryLimitInGb *float64 `json:"memoryLimitInGb,omitempty"` MemoryUsedInMb *float64 `json:"memoryUsedInMb,omitempty"` NetworkMonthlyUsageInByte *float64 `json:"networkMonthlyUsageInByte,omitempty"` MemoryStorage *string `json:"memoryStorage,omitempty"` SupportOSSClusterAPI *bool `json:"supportOSSClusterApi,omitempty"` UseExternalEndpointForOSSClusterAPI *bool `json:"useExternalEndpointForOSSClusterApi,omitempty"` DataPersistence *string `json:"dataPersistence,omitempty"` Replication *bool `json:"replication,omitempty"` DataEvictionPolicy *string `json:"dataEvictionPolicy,omitempty"` ActivatedOn *time.Time `json:"activatedOn,omitempty"` LastModified *time.Time `json:"lastModified,omitempty"` PublicEndpoint *string `json:"publicEndpoint,omitempty"` PrivateEndpoint *string `json:"privateEndpoint,omitempty"` // The following are undocumented but are returned Replica *ReplicaOf `json:"replica,omitempty"` Clustering *Clustering `json:"clustering,omitempty"` Security *Security `json:"security,omitempty"` Modules *[]*databases.Module `json:"modules,omitempty"` Alerts *[]*databases.Alert `json:"alerts,omitempty"` Backup *Backup `json:"backup,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 ListFixedDatabase ¶
type ListFixedDatabase struct {
// contains filtered or unexported fields
}
func (*ListFixedDatabase) Err ¶
func (d *ListFixedDatabase) Err() error
Err returns any error that occurred while trying to retrieve the next page of databases.
func (*ListFixedDatabase) Next ¶
func (d *ListFixedDatabase) Next() bool
Next attempts to retrieve the next page of fixed 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 (*ListFixedDatabase) Value ¶
func (d *ListFixedDatabase) Value() *FixedDatabase
Value returns the current page of databases.
type ReplicaOf ¶
type ReplicaOf struct { Description *string `json:"description,omitempty"` SyncSources []*SyncSource `json:"syncSources,omitempty"` }
type Security ¶
type Security struct { EnableDefaultUser *bool `json:"defaultUserEnabled,omitempty"` Password *string `json:"password,omitempty"` SSLClientAuthentication *bool `json:"sslClientAuthentication,omitempty"` TLSClientAuthentication *bool `json:"tlsClientAuthentication,omitempty"` EnableTls *bool `json:"enableTls,omitempty"` SourceIPs []*string `json:"sourceIps,omitempty"` }
type SyncSource ¶
type SyncSource struct { Description *string `json:"description,omitempty"` Endpoint *string `json:"endpoint,omitempty"` Encryption *bool `json:"encryption,omitempty"` ServerCert *string `json:"serverCert,omitempty"` }
func (SyncSource) String ¶
func (o SyncSource) String() string
type TaskWaiter ¶
type UpdateFixedDatabase ¶
type UpdateFixedDatabase struct { Name *string `json:"name,omitempty"` MemoryLimitInGB *float64 `json:"memoryLimitInGb,omitempty"` SupportOSSClusterAPI *bool `json:"supportOSSClusterApi,omitempty"` RespVersion *string `json:"respVersion,omitempty"` UseExternalEndpointForOSSClusterAPI *bool `json:"useExternalEndpointForOSSClusterApi,omitempty"` EnableDatabaseClustering *bool `json:"enableDatabaseClustering,omitempty"` DataPersistence *string `json:"dataPersistence,omitempty"` DataEvictionPolicy *string `json:"dataEvictionPolicy,omitempty"` Replication *bool `json:"replication,omitempty"` PeriodicBackupPath *string `json:"periodicBackupPath,omitempty"` SourceIPs []*string `json:"sourceIps,omitempty"` Replica *ReplicaOf `json:"replica,omitempty"` RegexRules []*string `json:"regexRules,omitempty"` ClientTlsCertificates []*DatabaseCertificate `json:"clientTlsCertificates,omitempty"` EnableTls *bool `json:"enableTls,omitempty"` Password *string `json:"password,omitempty"` Alerts *[]*databases.Alert `json:"alerts,omitempty"` // As with flexible databases, this is only available on the update endpoint EnableDefaultUser *bool `json:"enableDefaultUser,omitempty"` }