1701a2ed12e29875dbca45401c061b94b2c09a5e
[src/xds/xds-agent.git] / lib / agent / apiv1-browse.go
1 package agent
2
3 import (
4         "net/http"
5
6         "github.com/gin-gonic/gin"
7 )
8
9 type directory struct {
10         Name     string `json:"name"`
11         Fullpath string `json:"fullpath"`
12 }
13
14 type apiDirectory struct {
15         Dir []directory `json:"dir"`
16 }
17
18 // browseFS used to browse local file system
19 func (s *APIService) browseFS(c *gin.Context) {
20
21         response := apiDirectory{
22                 Dir: []directory{
23                         directory{Name: "TODO SEB"},
24                 },
25         }
26
27         c.JSON(http.StatusOK, response)
28 }