summaryrefslogtreecommitdiff
path: root/service/env/service.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/env/service.go')
-rw-r--r--service/env/service.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/service/env/service.go b/service/env/service.go
new file mode 100644
index 00000000..95e99093
--- /dev/null
+++ b/service/env/service.go
@@ -0,0 +1,21 @@
+package env
+
+// ID contains default svc name.
+const ID = "env"
+
+// Service provides ability to map _ENV values from config file.
+type Service struct {
+ cfg *Config
+}
+
+// Init must return configure svc and return true if svc hasStatus enabled. Must return error in case of
+// misconfiguration. Services must not be used without proper configuration pushed first.
+func (s *Service) Init(cfg *Config) (bool, error) {
+ s.cfg = cfg
+ return true, nil
+}
+
+// GetEnv must return list of env variables.
+func (s *Service) GetEnv() map[string]string {
+ return s.cfg.Values
+}