aboutsummaryrefslogtreecommitdiffstats
path: root/lib/agent/apiv1-browse.go
blob: 1701a2ed12e29875dbca45401c061b94b2c09a5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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)
}