Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DiskFSHandler ¶
type DiskFSHandler struct {
// contains filtered or unexported fields
}
The DiskFSHandler type provides handlers for manipulating a filesystem
func NewDiskFS ¶
func NewDiskFS(fs fs.Filesystem, cache cache.Cacher) *DiskFSHandler
NewDiskFS return a new DiskFS type. You have to provide a filesystem to act on and optionally a Cacher where files will be purged from if the Cacher is related to the filesystem.
func (*DiskFSHandler) GetFile ¶
func (h *DiskFSHandler) GetFile(c echo.Context) error
GetFile returns the file at the given path @Summary Fetch a file from the filesystem @Description Fetch a file from the filesystem. If the file is a directory, a index.html is returned, if it exists. @ID diskfs-get-file @Produce application/data @Produce json @Param path path string true "Path to file" @Success 200 {file} byte @Success 301 {string} string @Failure 404 {object} api.Error @Router /{path} [get]
type MemFSHandler ¶
type MemFSHandler struct {
// contains filtered or unexported fields
}
The MemFSHandler type provides handlers for manipulating a filesystem
func NewMemFS ¶
func NewMemFS(fs fs.Filesystem) *MemFSHandler
NewMemFS return a new MemFS type. You have to provide a filesystem to act on.
func (*MemFSHandler) DeleteFile ¶
func (h *MemFSHandler) DeleteFile(c echo.Context) error
DeleteFile removes a file from the filesystem @Summary Remove a file from the memory filesystem @Description Remove a file from the memory filesystem @ID memfs-delete-file @Produce text/plain @Param path path string true "Path to file" @Success 200 {string} string @Failure 404 {object} api.Error @Security BasicAuth @Router /memfs/{path} [delete]
func (*MemFSHandler) GetFile ¶
func (h *MemFSHandler) GetFile(c echo.Context) error
GetFile returns the file at the given path @Summary Fetch a file from the memory filesystem @Description Fetch a file from the memory filesystem @ID memfs-get-file @Produce application/data @Produce json @Param path path string true "Path to file" @Success 200 {file} byte @Success 301 {string} string @Failure 404 {object} api.Error @Router /memfs/{path} [get]
func (*MemFSHandler) PutFile ¶
func (h *MemFSHandler) PutFile(c echo.Context) error
PutFile adds or overwrites a file at the given path @Summary Add a file to the memory filesystem @Description Writes or overwrites a file on the memory filesystem @ID memfs-put-file @Accept application/data @Produce text/plain @Produce json @Param path path string true "Path to file" @Param data body []byte true "File data" @Success 201 {string} string @Success 204 {string} string @Failure 507 {object} api.Error @Security BasicAuth @Router /memfs/{path} [put]
type PingHandler ¶
type PingHandler struct{}
The PingHandler type provides a handler for a ping requesr
func (*PingHandler) Ping ¶
func (p *PingHandler) Ping(c echo.Context) error
Ping returns pong @Summary Liveliness check @Description Liveliness check @ID ping @Produce text/plain @Success 200 {string} string "pong" @Router /ping [get]
type ProfilingHandler ¶
type ProfilingHandler struct{}
The ProfilingHandler type provides a function to register the porfiling endpoints
func (*ProfilingHandler) Register ¶
func (p *ProfilingHandler) Register(r *echo.Group)
Register registers the different golang profiling endpoinds with a router @Summary Retrieve profiling data from the application @Description Retrieve profiling data from the application @ID profiling @Produce text/html @Success 200 {string} string @Failure 404 {string} string @Router /profiling [get]
type PrometheusHandler ¶
type PrometheusHandler struct {
// contains filtered or unexported fields
}
The PrometheusHandler type provides a handler function for reading the prometheus metrics
func NewPrometheus ¶
func NewPrometheus(handler http.Handler) *PrometheusHandler
NewPrometheus returns a new Prometheus type. You have to provide a HTTP.Handler
func (*PrometheusHandler) Metrics ¶
func (m *PrometheusHandler) Metrics(c echo.Context) error
Metrics godoc @Summary Prometheus metrics @Description Prometheus metrics @ID metrics @Produce text/plain @Success 200 {string} string @Router /metrics [get]