database

package
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureAutoUpgrade added in v1.2.5

func ConfigureAutoUpgrade(c *client.UpstashClient, databaseId string, enabled bool) (err error)

func ConfigureEviction added in v1.2.5

func ConfigureEviction(c *client.UpstashClient, databaseId string, enabled bool) (err error)

func DataSourceDatabase

func DataSourceDatabase() *schema.Resource

func DeleteDatabase

func DeleteDatabase(c *client.UpstashClient, databaseId string) (err error)

func EnableMultiZone

func EnableMultiZone(c *client.UpstashClient, databaseId string, enabled bool) (err error)

func EnableTLS

func EnableTLS(c *client.UpstashClient, databaseId string) (err error)

func ResourceDatabase

func ResourceDatabase() *schema.Resource

func UpdateReadRegions added in v1.3.0

func UpdateReadRegions(c *client.UpstashClient, databaseId string, readRegions UpdateReadRegionsRequest) (err error)

Types

type ConfigureAutoUpgradeRequest added in v1.2.5

type ConfigureAutoUpgradeRequest struct {
	DatabaseId  string `json:"database_id"`
	AutoUpgrade bool   `json:"auto_upgrade"`
}

type ConfigureEvictionRequest added in v1.2.5

type ConfigureEvictionRequest struct {
	DatabaseId string `json:"database_id"`
	Eviction   bool   `json:"eviction"`
}

type CreateDatabaseRequest

type CreateDatabaseRequest struct {
	Region        string   `json:"region"`
	DatabaseName  string   `json:"database_name"`
	Tls           bool     `json:"tls"`
	Consistent    bool     `json:"consistent"`
	MultiZone     bool     `json:"multizone"`
	Eviction      bool     `json:"eviction"`
	AutoUpgrade   bool     `json:"auto_upgrade"`
	PrimaryRegion string   `json:"primary_region,omitempty"`
	ReadRegions   []string `json:"read_regions,omitempty"`
}

type Database

type Database struct {
	DatabaseId             string   `json:"database_id"`
	DatabaseName           string   `json:"database_name"`
	Region                 string   `json:"region"`
	Port                   int      `json:"port"`
	CreationTime           int64    `json:"creation_time"`
	Password               string   `json:"password,omitempty"`
	Endpoint               string   `json:"endpoint"`
	Tls                    bool     `json:"tls"`
	Eviction               bool     `json:"eviction"`
	AutoUpgrade            bool     `json:"auto_upgrade"`
	Consistent             bool     `json:"consistent"`
	MultiZone              bool     `json:"multizone"`
	RestToken              string   `json:"rest_token,omitempty"`
	ReadOnlyRestToken      string   `json:"read_only_rest_token,omitempty"`
	DatabaseType           string   `json:"database_type"`
	State                  string   `json:"state"`
	UserEmail              string   `json:"user_email"`
	DBMaxClients           int      `json:"db_max_clients"`
	DBMaxRequestSize       int64    `json:"db_max_request_size"`
	DBDiskThreshold        int64    `json:"db_disk_threshold"`
	DBMaxEntrySize         int64    `json:"db_max_entry_size"`
	DBMemoryThreshold      int64    `json:"db_memory_threshold"`
	DBDailyBandwidthLimit  int64    `json:"db_daily_bandwidth_limit"`
	DBMaxCommandsPerSecond int64    `json:"db_max_commands_per_second"`
	PrimaryRegion          string   `json:"primary_region"`
	ReadRegions            []string `json:"read_regions"`
}

func CreateDatabase

func CreateDatabase(c *client.UpstashClient, body CreateDatabaseRequest) (database Database, err error)

func GetDatabase

func GetDatabase(c *client.UpstashClient, databaseId string) (database Database, err error)

type UpdateReadRegionsRequest added in v1.3.0

type UpdateReadRegionsRequest struct {
	ReadRegions []string `json:"read_regions"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL