CB
TODO (abrightwell): We had to explicitly qualify this class name as an
Action due to conflicts with the below Token struct. Would be great to
potentially namespace actions under CB::Action or something. Something
perhaps worth considering.
Constants
API_NAME_PATTERN = /\A[\p{L}\p{So}][\p{L}\p{N}\p{So}\/\-_ ']{3,48}[\p{L}\p{N}\p{So}]\z/
For user specified API resource names such as cluster and team names.
BUILD_RELEASE = {{ flag?(:release) }}
Release constants.
BUILD_SHA = {{ (env("GIT_SHA")) || (`git describe --match=NeVeRmAtCh --always --dirty 2> /dev/null || echo \"unknown sha\"`).chomp.stringify }}
DASHBOARD_HOST = ENV["CB_DASHBOARD_HOST"]? || (HOST.gsub(/\Aapi\./, ""))
EID_PATTERN = /\A[a-z0-9]{25}[4aeimquy]\z/
HOST = ENV["CB_HOST"]? || "api.crunchybridge.com"
IDENT_PATTERN = /\A[a-z0-9\-]+\z/
For simple identifiers such as region names, or plan names where we expect only lowercase, numbers, and -
PSQLRC = File.expand_path(ENV["PSQLRC"]? || "~/.psqlrc", home: true)
SHARDS_VERSION = {{ (`shards version \"/tmp/tmp.fakbnO/src/src\"`).chomp.stringify }}
SSL_CERT_FILE = ENV["SSL_CERT_FILE"]? || find_default_path
Allow manually overriding the cert file location
TEAM_ROLE_ADMIN = "admin"
TEAM_ROLE_MANAGER = "manager"
TEAM_ROLE_MEMBER = "member"
VALID_TEAM_ROLES = Set {TEAM_ROLE_ADMIN, TEAM_ROLE_MANAGER, TEAM_ROLE_MEMBER}
Valid team member roles.
VERSION = begin
{% if true %}
%(#{SHARDS_VERSION}#{"-unrelease" unless BUILD_RELEASE})
{% end %}
end
VERSION_STR = "cb v#{CB::VERSION} (#{CB::BUILD_SHA})"
Nested types
- CB::APIAction
- CB::Action
- CB::BackupCapture
- CB::BackupList
- CB::BackupToken
- CB::Cacheable
- CB::Client
- CB::ClusterCreate
- CB::ClusterDestroy
- CB::ClusterInfo
- CB::ClusterRename
- CB::ClusterResume
- CB::ClusterSuspend
- CB::ClusterURI
- CB::Completion
- CB::ConfigurationParameterAction
- CB::ConfigurationParameterGet
- CB::ConfigurationParameterListSupported
- CB::ConfigurationParameterReset
- CB::ConfigurationParameterSet
- CB::Credentials
- CB::Detach
- CB::Dirs
- CB::FirewallRuleAction
- CB::FirewallRuleAdd
- CB::FirewallRuleList
- CB::FirewallRuleRemove
- CB::FirewallRuleUpdate
- CB::Format
- CB::Identifier
- CB::Lib
- CB::List
- CB::LogDestinationAdd
- CB::LogDestinationDestroy
- CB::LogDestinationList
- CB::LogDestinationUpdate
- CB::Login
- CB::Logout
- CB::Logs
- CB::MaintenanceAction
- CB::MaintenanceCancel
- CB::MaintenanceCreate
- CB::MaintenanceUpdate
- CB::MaintenanceWindow
- CB::MaintenanceWindowUpdate
- CB::ManageFirewall
- CB::Model
- CB::NetworkAction
- CB::NetworkInfo
- CB::NetworkList
- CB::Open
- CB::PeeringAction
- CB::PeeringCreate
- CB::PeeringDelete
- CB::PeeringGet
- CB::PeeringList
- CB::Program
- CB::Psql
- CB::QueryMenu
- CB::Restart
- CB::Role
- CB::RoleAction
- CB::RoleCreate
- CB::RoleDelete
- CB::RoleList
- CB::RoleUpdate
- CB::SavedQueryDestroy
- CB::SavedQueryExport
- CB::SavedQueryImport
- CB::SavedQueryList
- CB::Scope
- CB::Spinner
- CB::Table
- CB::TailscaleAction
- CB::TailscaleConnect
- CB::TailscaleDisconnect
- CB::TeamAction
- CB::TeamCert
- CB::TeamCreate
- CB::TeamDestroy
- CB::TeamInfo
- CB::TeamList
- CB::TeamMemberAction
- CB::TeamMemberAdd
- CB::TeamMemberInfo
- CB::TeamMemberList
- CB::TeamMemberRemove
- CB::TeamMemberUpdate
- CB::TeamUpdate
- CB::Tempkey
- CB::Token
- CB::Tree
- CB::Types
- CB::UpdateUpgradeAction
- CB::Upgrade
- CB::UpgradeAction
- CB::UpgradeCancel
- CB::UpgradeStart
- CB::UpgradeStatus
- CB::UpgradeUpdate
- CB::WhoAmI