MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / ExportAll

Method ExportAll

controller/system/iml.go:109–123  ·  view source on GitHub ↗
(ctx *gin.Context)

Source from the content-addressed store, hash-verified

107}
108
109func (i *imlExportConfigController) ExportAll(ctx *gin.Context) error {
110 files, err := i.appendFiles(ctx)
111 if err != nil {
112 return err
113 }
114 buf, err := zipFile(files)
115 if err != nil {
116
117 }
118
119 ctx.DataFromReader(http.StatusOK, int64(buf.Len()), "application/zip", buf, map[string]string{
120 "Content-Disposition": "attachment; filename=\"export.zip\"",
121 })
122 return nil
123}
124
125func (i *imlExportConfigController) appendFiles(ctx *gin.Context) ([]*ExportFile, error) {
126 type exportConfig struct {

Callers

nothing calls this directly

Calls 3

appendFilesMethod · 0.95
zipFileFunction · 0.85
LenMethod · 0.45

Tested by

no test coverage detected