pcm-coordinator/api/internal/handler/image/imagelisthandler.go

18 lines
455 B
Go

package image
import (
"gitlink.org.cn/jcce-pcm/utils/result"
"net/http"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/logic/image"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc"
)
func ImageListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := image.NewImageListLogic(r.Context(), svcCtx)
resp, err := l.ImageList()
result.HttpResult(r, w, resp, err)
}
}