Documentation ¶
Index ¶
- func DefaultProvisionAsm() string
- func DefaultProvisionPms(stage string) error
- func DeleteAllUnittestSecrets() error
- func ListDeletePrms() error
- func ProvisionAsm(prms []secretsmanager.CreateSecretInput)
- func Secrets(stage string) []secretsmanager.CreateSecretInput
- func ShortUUID() string
- func UnittestStage() string
- type MyContextPostgresSQL
- type MyDbServiceConfig
- type MyDbServiceConfigAsm
- type SingleStringAsmStruct
- type SingleStringPmsStruct
- type StructPmsWithNonExistantVariable
- type StructWithSubStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultProvisionAsm ¶
func DefaultProvisionAsm() string
DefaultProvisionAsm provisions a test default environment for AWS Secrets Manager. Since the time to create / delete and when the value is available or may be re-created is lagging (e.g. the notorious the value is schedule for deletion) this function will check if exist, if so update the value, if missing it will create the secret. It will not delete the secrets by default.
func DefaultProvisionPms ¶
DefaultProvisionPms sets up a default test environment for PMS
func DeleteAllUnittestSecrets ¶
func DeleteAllUnittestSecrets() error
DeleteAllUnittestSecrets tries to delete all unit test secrets
func ListDeletePrms ¶
func ListDeletePrms() error
ListDeletePrms lists and deletes all parameters that begins with /unittest
func ProvisionAsm ¶
func ProvisionAsm(prms []secretsmanager.CreateSecretInput)
ProvisionAsm provision secrets
func Secrets ¶
func Secrets(stage string) []secretsmanager.CreateSecretInput
Secrets generates all secrets managed by the test system
func UnittestStage ¶
func UnittestStage() string
UnittestStage returns the name of the stage to use in unit test
Types ¶
type MyContextPostgresSQL ¶
type MyContextPostgresSQL struct { DbCtx support.SecretsManagerRDSPostgreSQLRotationSingleUser `asm:"dbctx, strkey=password"` Settings struct { BatchSize int `json:"batchsize"` Signer string `json:"signer,omitempty"` } `pms:"settings"` }
MyContextPostgresSQL demo context
type MyDbServiceConfig ¶
type MyDbServiceConfig struct { Name string `pms:"test, prefix=simple,tag1=nanna banna panna"` Connection struct { User string `json:"user"` Password string `json:"password,omitempty"` Timeout int `json:"timeout"` } `pms:"bubbibobbo"` }
MyDbServiceConfig is a fake test struct
type MyDbServiceConfigAsm ¶
type MyDbServiceConfigAsm struct { Name string Connection struct { User string `json:"user"` Password string `json:"password,omitempty"` Timeout int `json:"timeout"` } `asm:"bubbibobbo, strkey=password"` }
MyDbServiceConfigAsm is a fake test struct
type SingleStringAsmStruct ¶
type SingleStringAsmStruct struct {
Name string `asm:"test, prefix=simple"`
}
SingleStringAsmStruct with single string
type SingleStringPmsStruct ¶
type SingleStringPmsStruct struct {
Name string `pms:"test, prefix=simple,tag1=nanna banna panna"`
}
SingleStringPmsStruct with single string
type StructPmsWithNonExistantVariable ¶
type StructPmsWithNonExistantVariable struct { Name string `pms:"test, prefix=simple"` Sub struct { Apa int `pms:"ext"` Nu string `pms:"myname"` Missing string `pms:"gonemissing"` } AsmSub struct { Apa2 int `asm:"ext"` Nu2 string `asm:"myname"` Missing2 string `asm:"gonemissing"` } }
StructPmsWithNonExistantVariable that has one var that is not backed in the PMS