-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
37 additions
and
3,569 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
service.config/.nyc_output/13a7114c-a22e-4f3d-a094-fea4075f2552.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
service.config/.nyc_output/processinfo/13a7114c-a22e-4f3d-a094-fea4075f2552.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package domain | ||
|
||
// Config is an abstraction around the map that holds the config values | ||
type Config struct { | ||
config map[string]interface{} | ||
} | ||
|
||
// SetFromBytes sets the internal config based on a byte array of YAML | ||
func (c *Config) SetFromBytes(data []byte) error{ | ||
|
||
return nil | ||
} | ||
|
||
// Get returns the config for a particular service | ||
func (c *Config) Get(serviveName string) (map[string]interface{}, error) { | ||
return nil, nil | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package main | ||
|
||
import ( | ||
"io/ioutil" | ||
"github.com/Olili2017/tenant-management-system/service.config/domain" | ||
) | ||
|
||
func main(){ | ||
config := domain.Config{} | ||
|
||
data, err := ioutil.ReadFile("/config.yml") | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
err = config.SetFromBytes(data) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} |
Oops, something went wrong.