Documentation ¶
Index ¶
- func Protect(currentBzConnexion http.Handler, APIAccessToken string) http.Handler
- func Towr(currentBzConnexion http.Handler) func(http.ResponseWriter, *http.Request)
- type Environment
- func (thisEnvironment Environment) Bucket(svc string) string
- func (thisEnvironment Environment) BugzillaDSN() string
- func (thisEnvironment Environment) GetSecret(key string) string
- func (thisEnvironment Environment) SNS(name, region string) string
- func (thisEnvironment Environment) Udomain(service string) string
- type EnvironmentId
- type HandlerSqlConnexion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Protect ¶
Protect using: curl -H 'Authorization: Bearer secret' style Modelled after https://github.com/apex/up-examples/blob/master/oss/golang-basic-auth/main.go#L16
func Towr ¶
Towr is a workaround for gorilla/pat: https://stackoverflow.com/questions/50753049/ Wish I could make this simpler
Types ¶
type Environment ¶ added in v1.0.2
type Environment struct { Cfg aws.Config AccountID string Stage string // contains filtered or unexported fields }
Environment is a type of variable to help us manage our differing {dev,demo,prod} AWS accounts
func NewConfig ¶ added in v0.4.0
func NewConfig(cfg aws.Config) (thisEnvironment Environment, err error)
NewConfig setups the configuration assuming various parameters have been setup in the AWS account - DEFAULT_REGION - STAGE
func (Environment) Bucket ¶ added in v1.0.2
func (thisEnvironment Environment) Bucket(svc string) string
func (Environment) BugzillaDSN ¶ added in v1.0.2
func (thisEnvironment Environment) BugzillaDSN() string
func (Environment) GetSecret ¶ added in v1.0.2
func (thisEnvironment Environment) GetSecret(key string) string
func (Environment) SNS ¶ added in v1.0.2
func (thisEnvironment Environment) SNS(name, region string) string
func (Environment) Udomain ¶ added in v1.0.2
func (thisEnvironment Environment) Udomain(service string) string
type EnvironmentId ¶ added in v1.0.3
type EnvironmentId int
We need this so it can be exported
const ( EnvUnknown EnvironmentId = iota // Oops EnvDev // Development aka Staging EnvProd // Production EnvDemo // Demo, which is like Production, for prospective customers to try )
type HandlerSqlConnexion ¶ added in v1.0.2
type HandlerSqlConnexion struct { DSN string // aurora database connection string APIAccessToken string // contains filtered or unexported fields }
HandlerSqlConnexion is a type of variable to help us manage our connexion to the SQL databases
func NewDbConnexion ¶ added in v1.0.1
func NewDbConnexion() (bzDbConnexion HandlerSqlConnexion, err error)
Click to show internal directories.
Click to hide internal directories.