mysql

package
v3.0.60 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MPL-2.0 Imports: 38 Imported by: 0

Documentation

Overview

TiKV and PD default values.

Since TiKV and PD doesnt support restore default values then here are default configutation values which will be restored after terraform destroy. All default values which starting with IGNOREONDESTROY# will be ignored. This struct is manually crafted and should not be changed. Detailed configuration parameters are available * TiKV https://docs.pingcap.com/tidb/stable/tikv-configuration-file * PD https://docs.pingcap.com/tidb/stable/pd-configuration-file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDatabase

func CreateDatabase(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func CreateDefaultRoles added in v3.0.55

func CreateDefaultRoles(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func CreateGrant

func CreateGrant(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func CreateOrUpdateConfigVariable

func CreateOrUpdateConfigVariable(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func CreateOrUpdateGlobalVariable

func CreateOrUpdateGlobalVariable(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func CreateRDSConfig

func CreateRDSConfig(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func CreateRole

func CreateRole(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func CreateSql

func CreateSql(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func CreateUser

func CreateUser(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteConfigVariable

func DeleteConfigVariable(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteDatabase

func DeleteDatabase(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteDefaultRoles added in v3.0.55

func DeleteDefaultRoles(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteGlobalVariable

func DeleteGlobalVariable(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteGrant

func DeleteGrant(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteRDSConfig

func DeleteRDSConfig(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteRole

func DeleteRole(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteSql

func DeleteSql(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteUser

func DeleteUser(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func DeleteUserPassword

func DeleteUserPassword(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ImportDatabase

func ImportDatabase(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error)

func ImportDefaultRoles added in v3.0.55

func ImportDefaultRoles(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error)

func ImportGrant

func ImportGrant(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error)

func ImportUser

func ImportUser(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error)

func NewEmptyStringSuppressFunc

func NewEmptyStringSuppressFunc(k, old, new string, d *schema.ResourceData) bool

func Provider

func Provider() *schema.Provider

func RDSConfigSQL

func RDSConfigSQL(d *schema.ResourceData) []string

func ReadConfigVariable

func ReadConfigVariable(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ReadDatabase

func ReadDatabase(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ReadDefaultRoles added in v3.0.55

func ReadDefaultRoles(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ReadGlobalVariable

func ReadGlobalVariable(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ReadGrant

func ReadGrant(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ReadRDSConfig

func ReadRDSConfig(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ReadRole

func ReadRole(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ReadSql

func ReadSql(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ReadUser

func ReadUser(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ReadUserPassword

func ReadUserPassword(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func SetUserPassword

func SetUserPassword(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ShowTables

func ShowTables(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func UpdateDatabase

func UpdateDatabase(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func UpdateDefaultRoles added in v3.0.55

func UpdateDefaultRoles(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func UpdateGrant

func UpdateGrant(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func UpdateRDSConfig

func UpdateRDSConfig(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func UpdateUser

func UpdateUser(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

Types

type CustomTLS

type CustomTLS struct {
	ConfigKey  string `json:"config_key"`
	CACert     string `json:"ca_cert"`
	ClientCert string `json:"client_cert"`
	ClientKey  string `json:"client_key"`
}

type KeyedMutex

type KeyedMutex struct {
	// contains filtered or unexported fields
}

func NewKeyedMutex

func NewKeyedMutex() *KeyedMutex

func (*KeyedMutex) Lock

func (km *KeyedMutex) Lock(key string)

func (*KeyedMutex) Unlock

func (km *KeyedMutex) Unlock(key string)

type MySQLConfiguration

type MySQLConfiguration struct {
	Config                 *mysql.Config
	MaxConnLifetime        time.Duration
	MaxOpenConns           int
	ConnectRetryTimeoutSec time.Duration
}

type MySQLGrant

type MySQLGrant interface {
	GetId() string
	SQLGrantStatement() string
	SQLRevokeStatement() string
	GetUserOrRole() UserOrRole
	GrantOption() bool
}

type MySQLGrantWithDatabase

type MySQLGrantWithDatabase interface {
	MySQLGrant
	GetDatabase() string
}

type MySQLGrantWithPrivileges

type MySQLGrantWithPrivileges interface {
	MySQLGrant
	GetPrivileges() []string
	AppendPrivileges([]string)
}

type MySQLGrantWithRoles

type MySQLGrantWithRoles interface {
	MySQLGrant
	GetRoles() []string
	AppendRoles([]string)
}

type MySQLGrantWithTable

type MySQLGrantWithTable interface {
	MySQLGrantWithDatabase
	GetTable() string
}

type ObjectT

type ObjectT string

type OneConnection

type OneConnection struct {
	Db      *sql.DB
	Version *version.Version
}

type PdConfigurationKeys

type PdConfigurationKeys struct {
	// The cluster version
	ClusterVersion    string                `json:"cluster-version" default:"IGNOREONDESTROY#"`
	Log               pdLogKeys             `json:"log"`
	Schedule          pdScheduleKeys        `json:"schedule"`
	Replication       PdReplicationKeys     `json:"replication"`
	PdServer          PdServerKeys          `json:"pd-server"`
	PdReplicationMode PdReplicationModeKeys `json:"replication-mode"`
}

type PdReplicationKeys

type PdReplicationKeys struct {
	// Sets the maximum number of replicas
	MaxReplicas int64 `json:"max-replicas" default:"3"`
	// The topology information of a TiKV cluster
	LocationLabels string `json:"location-labels" default:"[]"`
	// Enables Placement Rules
	EnablePlacementRules bool `json:"enable-placement-rules" default:"false"`
	// Enables the label check
	StrictlyMatchLabel bool `json:"strictly-match-label" default:"false"`
}

type PdReplicationModeKeys

type PdReplicationModeKeys struct {
	// Sets the backup mode
	ReplicationMode string `json:"replication-mode" default:"IGNOREDESTROY"`
}

type PdServerKeys

type PdServerKeys struct {
	// Enables independent Region storage
	UseRegionStorage bool `json:"use-region-storage" default:"false"`
	// Sets the maximum interval of resetting timestamp (BR)
	MaxGapResetTs string `json:"max-gap-reset-ts" default:"IGNOREONDESTROY#"`
	// Sets the cluster key type
	KeyType string `json:"key-type" default:"IGNOREONDESTROY#"`
	// Sets the storage address of the cluster metrics
	MetricStorage string `json:"metric-storage" default:"IGNOREONDESTROY#"`
	// Sets the dashboard address
	DashboardAddress string `json:"dashboard-address" default:"IGNOREONDESTROY#"`
}

type PrivilegesPartiallyRevocable

type PrivilegesPartiallyRevocable interface {
	SQLPartialRevokePrivilegesStatement(privilegesToRevoke []string) string
}

type ProcedurePrivilegeGrant

type ProcedurePrivilegeGrant struct {
	Database     string
	ObjectT      ObjectT
	CallableName string
	Privileges   []string
	Grant        bool
	UserOrRole   UserOrRole
	TLSOption    string
}

func (*ProcedurePrivilegeGrant) AppendPrivileges

func (t *ProcedurePrivilegeGrant) AppendPrivileges(privs []string)

func (*ProcedurePrivilegeGrant) GetCallableName

func (t *ProcedurePrivilegeGrant) GetCallableName() string

func (*ProcedurePrivilegeGrant) GetDatabase

func (t *ProcedurePrivilegeGrant) GetDatabase() string

func (*ProcedurePrivilegeGrant) GetId

func (t *ProcedurePrivilegeGrant) GetId() string

func (*ProcedurePrivilegeGrant) GetPrivileges

func (t *ProcedurePrivilegeGrant) GetPrivileges() []string

func (*ProcedurePrivilegeGrant) GetUserOrRole

func (t *ProcedurePrivilegeGrant) GetUserOrRole() UserOrRole

func (*ProcedurePrivilegeGrant) GrantOption

func (t *ProcedurePrivilegeGrant) GrantOption() bool

func (*ProcedurePrivilegeGrant) SQLGrantStatement

func (t *ProcedurePrivilegeGrant) SQLGrantStatement() string

func (*ProcedurePrivilegeGrant) SQLPartialRevokePrivilegesStatement

func (t *ProcedurePrivilegeGrant) SQLPartialRevokePrivilegesStatement(privilegesToRevoke []string) string

func (*ProcedurePrivilegeGrant) SQLRevokeStatement

func (t *ProcedurePrivilegeGrant) SQLRevokeStatement() string

type RoleGrant

type RoleGrant struct {
	Roles      []string
	Grant      bool
	UserOrRole UserOrRole
	TLSOption  string
}

func (*RoleGrant) AppendRoles

func (t *RoleGrant) AppendRoles(roles []string)

func (*RoleGrant) GetId

func (t *RoleGrant) GetId() string

func (*RoleGrant) GetRoles

func (t *RoleGrant) GetRoles() []string

func (*RoleGrant) GetUserOrRole

func (t *RoleGrant) GetUserOrRole() UserOrRole

func (*RoleGrant) GrantOption

func (t *RoleGrant) GrantOption() bool

func (*RoleGrant) SQLGrantStatement

func (t *RoleGrant) SQLGrantStatement() string

func (*RoleGrant) SQLRevokeStatement

func (t *RoleGrant) SQLRevokeStatement() string

type TablePrivilegeGrant

type TablePrivilegeGrant struct {
	Database   string
	Table      string
	Privileges []string
	Grant      bool
	UserOrRole UserOrRole
	TLSOption  string
}

func (*TablePrivilegeGrant) AppendPrivileges

func (t *TablePrivilegeGrant) AppendPrivileges(privs []string)

func (*TablePrivilegeGrant) GetDatabase

func (t *TablePrivilegeGrant) GetDatabase() string

func (*TablePrivilegeGrant) GetId

func (t *TablePrivilegeGrant) GetId() string

func (*TablePrivilegeGrant) GetPrivileges

func (t *TablePrivilegeGrant) GetPrivileges() []string

func (*TablePrivilegeGrant) GetTable

func (t *TablePrivilegeGrant) GetTable() string

func (*TablePrivilegeGrant) GetUserOrRole

func (t *TablePrivilegeGrant) GetUserOrRole() UserOrRole

func (*TablePrivilegeGrant) GrantOption

func (t *TablePrivilegeGrant) GrantOption() bool

func (*TablePrivilegeGrant) SQLGrantStatement

func (t *TablePrivilegeGrant) SQLGrantStatement() string

func (*TablePrivilegeGrant) SQLPartialRevokePrivilegesStatement

func (t *TablePrivilegeGrant) SQLPartialRevokePrivilegesStatement(privilegesToRevoke []string) string

func (*TablePrivilegeGrant) SQLRevokeStatement

func (t *TablePrivilegeGrant) SQLRevokeStatement() string

type TiKvConfigurationKeys

type TiKvConfigurationKeys struct {
	Raftstore      tikvRaftstoreKeys      `json:"raftstore"`
	Coprocessor    tikvCoprocessorKeys    `json:"coprocessor"`
	PessimisticTxn tikvPessimisticTxnKeys `json:"pessimistic-txn"`
	Readpool       tikvReadpoolKeys       `json:"readpool"`
	Backup         tikvBackupKeys         `json:"backup"`
	Quota          tikvQuotaKeys          `json:"quota"`
	Gc             tikvGcKeys             `json:"gc"`
	Server         tikvServerKeys         `json:"server"`
	Storage        tikvStroageKeys        `json:"storage"`
	Split          tikvSplitKeys          `json:"split"`
	Cdc            tikvCdcKeys            `json:"cdc"`
	Db             tikvDbGlobalCfgKeys    `json:"defaultDB"`
}

type UserOrRole

type UserOrRole struct {
	Name string
	Host string
}

func (UserOrRole) Equals

func (u UserOrRole) Equals(other UserOrRole) bool

func (UserOrRole) IDString

func (u UserOrRole) IDString() string

func (UserOrRole) SQLString

func (u UserOrRole) SQLString() string

Jump to

Keyboard shortcuts

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