Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureInstance ¶
type AzureInstance struct { }
AzureInstance connection parameters for an Azure db
func (AzureInstance) IsProd ¶
func (a AzureInstance) IsProd() bool
func (AzureInstance) IsShared ¶
func (a AzureInstance) IsShared() bool
func (AzureInstance) Name ¶
func (a AzureInstance) Name() string
type Connection ¶
type Connection struct { // Provider where the database is running Provider Provider // GoogleInstance CloudSQL connection parameters GoogleInstance GoogleInstance // AzureInstance Azure connection parameters AzureInstance AzureInstance // KubernetesInstance Kubernetes connection parameters KubernetesInstance KubernetesInstance // Options cross-platform connection options Options ConnectionOptions }
Connection parameters for a thelma sql connection
func (Connection) Instance ¶
func (c Connection) Instance() Instance
type ConnectionOptions ¶
type ConnectionOptions struct { // Database (within the instance) to connect to Database string // PrivilegeLevel permission level to use for connection PrivilegeLevel PrivilegeLevel // ProxyCluster terra Kubernetes cluster to connect through ProxyCluster terra.Cluster // Release (nil if the target database instance has no association with a Terra release) Release terra.Release // Shell for `thelma sql connect`, optionally launch an interactive Bash shell instead of the default psql/mysql command Shell bool }
type Credentials ¶
type GoogleInstance ¶
type GoogleInstance struct { InstanceName string // required; CloudSQL instance name Project string // required; CloudSQL google project name }
GoogleInstance connection parameters for a Google CloudSQL instance
func (GoogleInstance) IsProd ¶
func (g GoogleInstance) IsProd() bool
func (GoogleInstance) IsShared ¶
func (g GoogleInstance) IsShared() bool
func (GoogleInstance) Name ¶
func (g GoogleInstance) Name() string
type KubernetesInstance ¶
KubernetesInstance connection parameters for a K8s-hosted db instance
func (KubernetesInstance) IsProd ¶
func (k KubernetesInstance) IsProd() bool
IsProd doesn't gate permissions -- it hints to Thelma to help with account switching. If we need this to be smarter in the future we could either add fields to Sherlock clusters or have logic here to evaluate required role names
func (KubernetesInstance) IsShared ¶
func (k KubernetesInstance) IsShared() bool
func (KubernetesInstance) Name ¶
func (k KubernetesInstance) Name() string
type PrivilegeLevel ¶
type PrivilegeLevel int64
const ( ReadOnly PrivilegeLevel = iota ReadWrite Admin )
Click to show internal directories.
Click to hide internal directories.