MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Load

Function Load

env/load.go:16–34  ·  view source on GitHub ↗

Load loads environment variables from various sources

(ctx context.Context)

Source from the content-addressed store, hash-verified

14
15// Load loads environment variables from various sources
16func Load(ctx context.Context) error {
17 if err := loadAWSSecret(ctx); err != nil {
18 return err
19 }
20
21 if err := loadAWSSystemManagerParams(ctx); err != nil {
22 return err
23 }
24
25 if err := loadGCPSecret(ctx); err != nil {
26 return err
27 }
28
29 if err := loadLocalFile(); err != nil {
30 return err
31 }
32
33 return nil
34}
35
36// loadLocalFile loads environment variables from a local file if IMGPROXY_ENV_LOCAL_FILE_PATH is set
37func loadLocalFile() error {

Callers 1

InitFunction · 0.92

Calls 4

loadAWSSecretFunction · 0.85
loadGCPSecretFunction · 0.85
loadLocalFileFunction · 0.85

Tested by

no test coverage detected