Edge-home-orchestration-go: [Folder Structure] Follow standard Go project Layout

Created on 31 Dec 2020  ·  7Comments  ·  Source: lf-edge/edge-home-orchestration-go

There is a popular standard Go application project layout and many projects follow it.
I think we should change the folder structure in terms of this guide like below.

  • GoMain/src/main > cmd
  • Buillder > build
  • samples > examples
  • samples/datastorage > configs/datastorage
  • src > internal
  • doc > docs
  • doc/edge_orchestration_api.yaml and doc/edge_orchestration_api_secure.yaml > api/...

Please add or rectify the list above since it might be incorrect!

help wanted refactoring

Most helpful comment

When it comes to mnedc,

client.config should be changed according to user network status, I think it should be in the examples/mnedc

But this is the configuration of where the mnedc server is running. Hence thought if it goes to config folder would be appropriate.

All 7 comments

@t25kim 100% agree with you. We should follow the so-called de-facto standard in GoLang projects. Plus, it is quite straightforward to indicate where we should refer to in terms of api as you suggested.

Hi, Please recommend if this is the correct way of going forward with this. (Data Storage and MNEDC part)

Creating 2 new folders : "examples" and "configs" in the main repo and using this tree


--examples
----------------datastorage
----------------------sample-json-device.yaml

--configs
----------------datastorage
------------------------configuration.toml
-----------------mnedc
-------------------------client.config

Also, I can do one of the following.

  1. Move "native" folder in samples to examples and delete the samples folder
  2. Or, Leave the native folder in samples only to move later.

Hi, Please recommend if this is the correct way of going forward with this. (Data Storage and MNEDC part)

Creating 2 new folders : "examples" and "configs" in the main repo and using this tree


--examples
----------------datastorage
----------------------sample-json-device.yaml

--configs
----------------datastorage
------------------------configuration.toml
-----------------mnedc
-------------------------client.config

@sun-sharma Thank you for the idea!

When it comes to datastorage,

  • looks good to me to go with configs/datastorage/
  • yaml files should be in the same folder as configuration.toml since yaml files should be aligned with the detail of configuration.toml.

    • We should implement configuration.toml and yaml files according to home edge scenario since they are not examples.

When it comes to mnedc,

  • client.config should be changed according to user network status, I think it should be in the examples/mnedc

Also, I can do one of the following.

1. Move "native" folder in samples to examples and delete the samples folder

2. Or,  Leave the native folder in samples only to move later.

I like to go with option 1!

When it comes to mnedc,

client.config should be changed according to user network status, I think it should be in the examples/mnedc

But this is the configuration of where the mnedc server is running. Hence thought if it goes to config folder would be appropriate.

When it comes to mnedc,

client.config should be changed according to user network status, I think it should be in the examples/mnedc

But this is the configuration of where the mnedc server is running. Hence thought if it goes to config folder would be appropriate.

Make sense! since configuration file templates or default configs could be in a config folder.
How about transforming client.config into a yaml applied template and putting it in like LINK?

Closing this since this issue is resolved.

Was this page helpful?
0 / 5 - 0 ratings