diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-09-25 14:15:16 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-10-06 18:25:04 +0200 |
commit | 97ca1f277dc8b6973d6fa67add5593a9c395ce60 (patch) | |
tree | 761649d7771e8699a67567476c17fb2fa0e28e57 /lib/agent/apiv1-browse.go | |
parent | 12a20d0905b0d3e7e0f4c9ec8ee619f683256d71 (diff) |
Added webapp Dashboard + logic to interact with server.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/agent/apiv1-browse.go')
-rw-r--r-- | lib/agent/apiv1-browse.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/agent/apiv1-browse.go b/lib/agent/apiv1-browse.go new file mode 100644 index 0000000..1701a2e --- /dev/null +++ b/lib/agent/apiv1-browse.go @@ -0,0 +1,28 @@ +package agent + +import ( + "net/http" + + "github.com/gin-gonic/gin" +) + +type directory struct { + Name string `json:"name"` + Fullpath string `json:"fullpath"` +} + +type apiDirectory struct { + Dir []directory `json:"dir"` +} + +// browseFS used to browse local file system +func (s *APIService) browseFS(c *gin.Context) { + + response := apiDirectory{ + Dir: []directory{ + directory{Name: "TODO SEB"}, + }, + } + + c.JSON(http.StatusOK, response) +} |