Documentation
¶
Index ¶
- Variables
- func APIMiddleware(c *gin.Context)
- func ConfigJsMiddleware(c *gin.Context)
- func CreateAPIDataModel(ep *process.Endpoint, query bool) *process.APIDataModel
- func CreateDB() error
- func CreateEndpoint(model process.APIDataModel, old *process.Endpoint) process.Endpoint
- func DBDo(f func(dao *Dao) error) error
- func DeleteEndpoint(id string) error
- func EndpointList(query bool) []process.APIDataModel
- func GetEndpoint(id process.ID) (*process.APIDataModel, error)
- func JoinContextPath(elem string) string
- func SaveEndpoint(model process.APIDataModel) (*process.Endpoint, error)
- func StaticFileMiddleware(c *gin.Context)
- func SyncAPIRouter()
- func TestAPIRouter(p process.APIDataModel) error
- type Dao
- func (d *Dao) AddEndpoint(ep process.Endpoint) uint64
- func (d *Dao) Backup(w http.ResponseWriter, name string)
- func (d *Dao) DeleteEndpoint(ep process.Endpoint)
- func (d *Dao) FindByEndpoint(endpoint string) *process.Endpoint
- func (d *Dao) FindEndpoint(ID uint64) *process.Endpoint
- func (d *Dao) HasEndpoints() (has bool)
- func (d *Dao) ListEndpoints() (result []process.Endpoint)
- func (d *Dao) UpdateEndpoint(ep process.Endpoint)
- type EnvVars
- type WebCliController
- func (ctrl WebCliController) Backup(c *gin.Context, _ backupT)
- func (ctrl WebCliController) DeleteEndpoint(c *gin.Context, _ deleteEndpointT)
- func (ctrl WebCliController) DownloadFile(c *gin.Context, _ downloadFileT) error
- func (ctrl WebCliController) Endpoint(c *gin.Context, _ endpointT) (giu.HTTPStatus, interface{}, error)
- func (ctrl WebCliController) Save(c *gin.Context, _ saveT) (giu.HTTPStatus, interface{})
- func (ctrl WebCliController) SaveEndpoint(model process.APIDataModel, c *gin.Context, _ saveEndpointT)
- func (ctrl WebCliController) Tree(_ treeT) gin.H
- func (ctrl WebCliController) Version(_ versionT) gin.H
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CreateAPIDataModel ¶
func CreateAPIDataModel(ep *process.Endpoint, query bool) *process.APIDataModel
CreateAPIDataModel creates APIDataModel from Endpoint.
func CreateEndpoint ¶
CreateEndpoint creates an endpoint from APIDataModel.
func JoinContextPath ¶ added in v1.2.0
JoinContextPath joins the context path to elem.
func SaveEndpoint ¶
func SaveEndpoint(model process.APIDataModel) (*process.Endpoint, error)
SaveEndpoint ...
func TestAPIRouter ¶ added in v1.2.0
func TestAPIRouter(p process.APIDataModel) error
TestAPIRouter ...
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao defines the api to access the database.
func (*Dao) DeleteEndpoint ¶
func (*Dao) HasEndpoints ¶ added in v1.3.5
HasEndpoints test if any endpoint exits already.
func (*Dao) ListEndpoints ¶
func (*Dao) UpdateEndpoint ¶
type EnvVars ¶
type EnvVars struct {
DBFile string
DBFullPath string
Ports string // Hosting ports, eg. 5003,5004.
ContextPath string
Logging bool
}
EnvVars ...
type WebCliController ¶
type WebCliController struct{}
WebCliController ...
func (WebCliController) Backup ¶
func (ctrl WebCliController) Backup(c *gin.Context, _ backupT)
Backup ...
func (WebCliController) DeleteEndpoint ¶
func (ctrl WebCliController) DeleteEndpoint(c *gin.Context, _ deleteEndpointT)
DeleteEndpoint ...
func (WebCliController) DownloadFile ¶
func (ctrl WebCliController) DownloadFile(c *gin.Context, _ downloadFileT) error
DownloadFile ...
func (WebCliController) Endpoint ¶
func (ctrl WebCliController) Endpoint(c *gin.Context, _ endpointT) (giu.HTTPStatus, interface{}, error)
Endpoint ...
func (WebCliController) Save ¶
func (ctrl WebCliController) Save(c *gin.Context, _ saveT) (giu.HTTPStatus, interface{})
Save 保存body.
func (WebCliController) SaveEndpoint ¶
func (ctrl WebCliController) SaveEndpoint(model process.APIDataModel, c *gin.Context, _ saveEndpointT)
SaveEndpoint 保存路径、方法等变更.
func (WebCliController) Tree ¶
func (ctrl WebCliController) Tree(_ treeT) gin.H
Tree return the api tree.
func (WebCliController) Version ¶ added in v1.2.0
func (ctrl WebCliController) Version(_ versionT) gin.H
Version returns version information.
Click to show internal directories.
Click to hide internal directories.

