Documentation ¶
Index ¶
Constants ¶
View Source
const (
// LogKeyRID is the key to use for request IDs in logging
LogKeyRID = "request_id"
)
Variables ¶
View Source
var ( // Commit is the commit hash of this build Commit string )
Functions ¶
func NewGCPConnectionOptions ¶
func NewGCPConnectionOptions() []option.ClientOption
NewGCPConnectionOptions returns options needed to connect to GCP services
Types ¶
type BuildMeta ¶
type BuildMeta struct {
Commit string
}
BuildMeta denotes build metadata
func NewBuildMeta ¶
func NewBuildMeta() BuildMeta
NewBuildMeta instantiates a new build metadata struct from the environment. Currently leverages Heroku's Dyno Metadata: https://devcenter.heroku.com/articles/dyno-metadata
func (BuildMeta) AnnotatedCommit ¶
AnnotatedCommit returns a dev-prefixed commit if necessary
type Cloud ¶
type Cloud struct {
GCP CloudGoogle
}
Cloud denotes configuration for different cloud providers
func NewCloudConfig ¶
func NewCloudConfig() Cloud
NewCloudConfig instantiates cloud configuration from environment
func (Cloud) Provider ¶
func (c Cloud) Provider() CloudProvider
Provider returns the configured cloud provider
type CloudProvider ¶
type CloudProvider string
CloudProvider denotes supported providers
const ( // ProviderNone indicates no cloud provider has been set ProviderNone CloudProvider = "none" // ProviderGCP indicates Google Cloud configuration has been set ProviderGCP CloudProvider = "gcp" )
type Database ¶
type Database struct { Host string Port string Database string User string Password string Drop bool TLS *tls.Config // this has priority PostgresConnURL string }
Database denotes database instantiation options
func NewDatabaseConfig ¶
func NewDatabaseConfig() Database
NewDatabaseConfig loads database configuration from environment
Click to show internal directories.
Click to hide internal directories.