api

package
v0.0.0-...-31c1c1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package api implements various handlers for the API routes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Swagger

func Swagger(c echo.Context) error

Swagger returns swagger UI for this API @Summary Swagger UI for this API @Description Swagger UI for this API @ID swagger @Produce text/html @Success 200 {string} string "" @Router /api/swagger [get]

Types

type AboutHandler

type AboutHandler struct {
	// contains filtered or unexported fields
}

The AboutHandler type provides handler functions for retrieving details about the API version and build infos.

func NewAbout

func NewAbout(restream restream.Restreamer, auths []string) *AboutHandler

NewAbout returns a new About type

func (*AboutHandler) About

func (p *AboutHandler) About(c echo.Context) error

About returns API version and build infos @Summary API version and build infos @Description API version and build infos in case auth is valid or not required. If auth is required, just the name field is populated. @ID about @Produce json @Success 200 {object} api.About @Security ApiKeyAuth @Router /api [get]

type ConfigHandler

type ConfigHandler struct {
	// contains filtered or unexported fields
}

The ConfigHandler type provides handler functions for reading and manipulating the current config.

func NewConfig

func NewConfig(store config.Store) *ConfigHandler

NewConfig return a new Config type. You have to provide a valid config store.

func (*ConfigHandler) Get

func (p *ConfigHandler) Get(c echo.Context) error

Get returns the currently active Restreamer configuration @Summary Retrieve the currently active Restreamer configuration @Description Retrieve the currently active Restreamer configuration @ID config-3-get @Produce json @Success 200 {object} api.Config @Security ApiKeyAuth @Router /api/v3/config [get]

func (*ConfigHandler) Reload

func (p *ConfigHandler) Reload(c echo.Context) error

Reload will reload the currently active configuration @Summary Reload the currently active configuration @Description Reload the currently active configuration. This will trigger a restart of the Restreamer. @ID config-3-reload @Produce plain @Success 200 {string} string "OK" @Security ApiKeyAuth @Router /api/v3/config/reload [get]

func (*ConfigHandler) Set

func (p *ConfigHandler) Set(c echo.Context) error

Set will set the given configuration as new active configuration @Summary Update the current Restreamer configuration @Description Update the current Restreamer configuration by providing a complete or partial configuration. Fields that are not provided will not be changed. @ID config-3-set @Accept json @Produce json @Param config body api.SetConfig true "Restreamer configuration" @Success 200 {string} string @Failure 400 {object} api.Error @Failure 409 {object} api.ConfigError @Security ApiKeyAuth @Router /api/v3/config [put]

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) DeleteFile

func (h *DiskFSHandler) DeleteFile(c echo.Context) error

DeleteFile removes a file from the filesystem @Summary Remove a file from the filesystem @Description Remove a file from the filesystem @ID diskfs-3-delete-file @Produce text/plain @Param path path string true "Path to file" @Success 200 {string} string @Failure 404 {object} api.Error @Security ApiKeyAuth @Router /api/v3/fs/disk/{path} [delete]

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. The contents of that file are returned. @ID diskfs-3-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 @Security ApiKeyAuth @Router /api/v3/fs/disk/{path} [get]

func (*DiskFSHandler) ListFiles

func (h *DiskFSHandler) ListFiles(c echo.Context) error

ListFiles lists all files on the filesystem @Summary List all files on the filesystem @Description List all files on the filesystem. The listing can be ordered by name, size, or date of last modification in ascending or descending order. @ID diskfs-3-list-files @Produce json @Param glob query string false "glob pattern for file names" @Param sort query string false "none, name, size, lastmod" @Param order query string false "asc, desc" @Success 200 {array} api.FileInfo @Security ApiKeyAuth @Router /api/v3/fs/disk/ [get]

func (*DiskFSHandler) PutFile

func (h *DiskFSHandler) PutFile(c echo.Context) error

PutFile adds or overwrites a file at the given path @Summary Add a file to the filesystem @Description Writes or overwrites a file on the filesystem @ID diskfs-3-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 ApiKeyAuth @Router /api/v3/fs/disk/{path} [put]

type GraphHandler

type GraphHandler struct {
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph(resolver resolver.Resolver, path string) *GraphHandler

NewRestream return a new Restream type. You have to provide a valid Restreamer instance.

func (*GraphHandler) Playground

func (g *GraphHandler) Playground(c echo.Context) error

Load GraphQL playground @Summary Load GraphQL playground @Description Load GraphQL playground @ID graph-playground @Produce html @Success 200 @Security ApiKeyAuth @Router /api/graph [get]

func (*GraphHandler) Query

func (g *GraphHandler) Query(c echo.Context) error

Query the GraphAPI @Summary Query the GraphAPI @Description Query the GraphAPI @ID graph-query @Accept json @Produce json @Param query body api.GraphQuery true "GraphQL Query" @Success 200 {object} api.GraphResponse @Failure 400 {object} api.GraphResponse @Security ApiKeyAuth @Router /api/graph/query [post]

type LogHandler

type LogHandler struct {
	// contains filtered or unexported fields
}

The LogHandler type provides handler functions for reading the application log

func NewLog

func NewLog(buffer log.BufferWriter) *LogHandler

NewLog return a new Log type. You have to provide log buffer.

func (*LogHandler) Log

func (p *LogHandler) Log(c echo.Context) error

Log returns the last log lines of the Restreamer application @Summary Application log @Description Get the last log lines of the Restreamer application @ID log-3 @Param format query string false "Format of the list of log events (*console, raw)" @Produce json @Success 200 {array} api.LogEvent "application log" @Success 200 {array} string "application log" @Security ApiKeyAuth @Router /api/v3/log [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

DeleteFileAPI 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-api @Produce text/plain @Param path path string true "Path to file" @Success 200 {string} string @Failure 404 {object} api.Error @Security ApiKeyAuth @Router /api/v3/fs/mem/{path} [delete]

func (*MemFSHandler) GetFile

func (h *MemFSHandler) GetFile(c echo.Context) error

GetFileAPI 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-3-get-file-api @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 @Security ApiKeyAuth @Router /api/v3/fs/mem/{path} [get]

func (*MemFSHandler) ListFiles

func (h *MemFSHandler) ListFiles(c echo.Context) error

ListFiles lists all files on the filesystem @Summary List all files on the memory filesystem @Description List all files on the memory filesystem. The listing can be ordered by name, size, or date of last modification in ascending or descending order. @ID memfs-3-list-files @Produce json @Param glob query string false "glob pattern for file names" @Param sort query string false "none, name, size, lastmod" @Param order query string false "asc, desc" @Success 200 {array} api.FileInfo @Security ApiKeyAuth @Router /api/v3/fs/mem/ [get]

func (*MemFSHandler) PatchFile

func (h *MemFSHandler) PatchFile(c echo.Context) error

PatchFile creates a symbolic link to a file in the filesystem @Summary Create a link to a file in the memory filesystem @Description Create a link to a file in the memory filesystem. The file linked to has to exist. @ID memfs-3-patch @Accept application/data @Produce text/plain @Produce json @Param path path string true "Path to file" @Param url body string true "Path to the file to link to" @Success 201 {string} string @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/fs/mem/{path} [patch]

func (*MemFSHandler) PutFile

func (h *MemFSHandler) PutFile(c echo.Context) error

PutFileAPI 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-3-put-file-api @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 ApiKeyAuth @Router /api/v3/fs/mem/{path} [put]

type MetricsConfig

type MetricsConfig struct {
	Metrics monitor.HistoryReader
}

type MetricsHandler

type MetricsHandler struct {
	// contains filtered or unexported fields
}

The MetricsHandler type provides handlers for the widget API

func NewMetrics

func NewMetrics(config MetricsConfig) *MetricsHandler

NewWidget return a new Widget type

func (*MetricsHandler) Metrics

func (r *MetricsHandler) Metrics(c echo.Context) error

Query the collected metrics @Summary Query the collected metrics @Description Query the collected metrics @ID metrics-3-metrics @Accept json @Produce json @Param config body api.MetricsQuery true "Metrics query" @Success 200 {object} api.MetricsResponse @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/metrics [post]

type PlayoutHandler

type PlayoutHandler struct {
	// contains filtered or unexported fields
}

The PlayoutHandler type provides handlers for accessing the playout API of a process

func NewPlayout

func NewPlayout(restream restream.Restreamer) *PlayoutHandler

NewPlayout returns a new Playout type. You have to provide a Restreamer instance.

func (*PlayoutHandler) EncodeErrorframe

func (h *PlayoutHandler) EncodeErrorframe(c echo.Context) error

EncodeErrorframe encodes the errorframe @Summary Encode the errorframe @Description Immediately encode the errorframe (if available and looping) @ID restream-3-playout-errorframencode @Produce text/plain @Produce json @Param id path string true "Process ID" @Param inputid path string true "Process Input ID" @Success 204 {string} string @Failure 404 {object} api.Error @Failure 500 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/playout/{inputid}/errorframe/encode [get]

func (*PlayoutHandler) Keyframe

func (h *PlayoutHandler) Keyframe(c echo.Context) error

Keyframe returns the last keyframe @Summary Get the last keyframe @Description Get the last keyframe of an input of a process. The extension of the name determines the return type. @ID restream-3-playout-keyframe @Produce image/jpeg @Produce image/png @Produce json @Param id path string true "Process ID" @Param inputid path string true "Process Input ID" @Param name path string true "Any filename with an extension of .jpg or .png" @Success 200 {file} byte @Failure 404 {object} api.Error @Failure 500 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/playout/{inputid}/keyframe/{name} [get]

func (*PlayoutHandler) ReopenInput

func (h *PlayoutHandler) ReopenInput(c echo.Context) error

ReopenInput closes the current input stream @Summary Close the current input stream @Description Close the current input stream such that it will be automatically re-opened @ID restream-3-playout-reopen-input @Produce plain @Param id path string true "Process ID" @Param inputid path string true "Process Input ID" @Success 200 {string} string @Failure 404 {object} api.Error @Failure 500 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/playout/{inputid}/reopen [get]

func (*PlayoutHandler) SetErrorframe

func (h *PlayoutHandler) SetErrorframe(c echo.Context) error

SetErrorframe sets an errorframe @Summary Upload an error frame @Description Upload an error frame which will be encoded immediately @ID restream-3-playout-errorframe @Produce text/plain @Produce json @Accept application/octet-stream @Param id path string true "Process ID" @Param inputid path string true "Process Input ID" @Param name path string true "Any filename with a suitable extension" @Param image body []byte true "Image to be used a error frame" @Success 204 {string} string @Failure 404 {object} api.Error @Failure 500 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/playout/{inputid}/errorframe/{name} [post]

func (*PlayoutHandler) SetStream

func (h *PlayoutHandler) SetStream(c echo.Context) error

SetStream replaces the current stream @Summary Switch to a new stream @Description Replace the current stream with the one from the given URL. The switch will only happen if the stream parameters match. @ID restream-3-playout-stream @Produce text/plain @Produce json @Accept text/plain @Param id path string true "Process ID" @Param inputid path string true "Process Input ID" @Param url body string true "URL of the new stream" @Success 204 {string} string @Failure 404 {object} api.Error @Failure 500 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/playout/{inputid}/stream [put]

func (*PlayoutHandler) Status

func (h *PlayoutHandler) Status(c echo.Context) error

Status return the current playout status @Summary Get the current playout status @Description Get the current playout status of an input of a process @ID restream-3-playout-status @Produce json @Param id path string true "Process ID" @Param inputid path string true "Process Input ID" @Success 200 {object} api.PlayoutStatus @Failure 404 {object} api.Error @Failure 500 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/playout/{inputid}/status [get]

type RTMPHandler

type RTMPHandler struct {
	// contains filtered or unexported fields
}

The RTMPHandler type provides a handler for retrieving details from the RTMPHandler server

func NewRTMP

func NewRTMP(rtmp rtmp.Server) *RTMPHandler

NewRTMP returns a new RTMP type. You have to provide a RTMP server instance.

func (*RTMPHandler) ListChannels

func (rtmph *RTMPHandler) ListChannels(c echo.Context) error

ListChannels lists all currently publishing streams @Summary List all publishing streams @Description List all currently publishing streams @ID rtmp-3-list-channels @Produce json @Success 200 {array} api.RTMPChannel @Security ApiKeyAuth @Router /api/v3/rtmp [get]

type RestreamHandler

type RestreamHandler struct {
	// contains filtered or unexported fields
}

The RestreamHandler type provides functions to interact with a Restreamer instance

func NewRestream

func NewRestream(restream restream.Restreamer) *RestreamHandler

NewRestream return a new Restream type. You have to provide a valid Restreamer instance.

func (*RestreamHandler) Add

func (h *RestreamHandler) Add(c echo.Context) error

Add adds a new process @Summary Add a new process @Description Add a new FFmpeg process @ID restream-3-add @Accept json @Produce json @Param config body api.ProcessConfig true "Process config" @Success 200 {object} api.ProcessConfig @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process [post]

func (*RestreamHandler) Command

func (h *RestreamHandler) Command(c echo.Context) error

Command issues a command to a process @Summary Issue a command to a process @Description Issue a command to a process: start, stop, reload, restart @ID restream-3-command @Accept json @Produce json @Param id path string true "Process ID" @Param command body api.Command true "Process command" @Success 200 {string} string @Failure 400 {object} api.Error @Failure 404 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/command [put]

func (*RestreamHandler) Delete

func (h *RestreamHandler) Delete(c echo.Context) error

Delete deletes the process with the given ID @Summary Delete a process by its ID @Description Delete a process by its ID @ID restream-3-delete @Produce json @Param id path string true "Process ID" @Success 200 {string} string @Failure 404 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id} [delete]

func (*RestreamHandler) Get

func (h *RestreamHandler) Get(c echo.Context) error

Get returns the process with the given ID @Summary List a process by its ID @Description List a process by its ID. Use the filter parameter to specifiy the level of detail of the output. @ID restream-3-get @Produce json @Param id path string true "Process ID" @Param filter query string false "Comma separated list of fields (config, state, report, metadata) to be part of the output. If empty, all fields will be part of the output" @Success 200 {object} api.Process @Failure 404 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id} [get]

func (*RestreamHandler) GetAll

func (h *RestreamHandler) GetAll(c echo.Context) error

GetAll returns all known processes @Summary List all known processes @Description List all known processes. Use the query parameter to filter the listed processes. @ID restream-3-get-all @Produce json @Param filter query string false "Comma separated list of fields (config, state, report, metadata) that will be part of the output. If empty, all fields will be part of the output" @Param reference query string false "Return only these process that have this reference value. Overrides a list of IDs. If empty, the reference will be ignored" @Param id query string false "Comma separated list of process ids to list" @Success 200 {array} api.Process @Security ApiKeyAuth @Router /api/v3/process [get]

func (*RestreamHandler) GetConfig

func (h *RestreamHandler) GetConfig(c echo.Context) error

GetConfig returns the configuration of a process @Summary Get the configuration of a process @Description Get the configuration of a process. This is the configuration as provided by Add or Update. @ID restream-3-get-config @Produce json @Param id path string true "Process ID" @Success 200 {object} api.ProcessConfig @Failure 404 {object} api.Error @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/config [get]

func (*RestreamHandler) GetMetadata

func (h *RestreamHandler) GetMetadata(c echo.Context) error

GetMetadata returns the metadata stored with the Restreamer @Summary Retrieve JSON metadata from a key @Description Retrieve the previously stored JSON metadata under the given key. If the key is empty, all metadata will be returned. @ID metadata-3-get @Produce json @Param key path string true "Key for data store" @Success 200 {object} api.Metadata @Failure 404 {object} api.Error @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/metadata/{key} [get]

func (*RestreamHandler) GetProcessMetadata

func (h *RestreamHandler) GetProcessMetadata(c echo.Context) error

GetProcessMetadata returns the metadata stored with a process @Summary Retrieve JSON metadata stored with a process under a key @Description Retrieve the previously stored JSON metadata under the given key. If the key is empty, all metadata will be returned. @ID restream-3-get-process-metadata @Produce json @Param id path string true "Process ID" @Param key path string true "Key for data store" @Success 200 {object} api.Metadata @Failure 404 {object} api.Error @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/metadata/{key} [get]

func (*RestreamHandler) GetReport

func (h *RestreamHandler) GetReport(c echo.Context) error

GetReport return the current log and the log history of a process @Summary Get the logs of a process @Description Get the logs and the log history of a process @ID restream-3-get-report @Produce json @Param id path string true "Process ID" @Success 200 {object} api.ProcessReport @Failure 404 {object} api.Error @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/report [get]

func (*RestreamHandler) GetState

func (h *RestreamHandler) GetState(c echo.Context) error

GetState returns the current state of a process @Summary Get the state of a process @Description Get the state and progress data of a process @ID restream-3-get-state @Produce json @Param id path string true "Process ID" @Success 200 {object} api.ProcessState @Failure 404 {object} api.Error @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/state [get]

func (*RestreamHandler) Probe

func (h *RestreamHandler) Probe(c echo.Context) error

Probe probes a process @Summary Probe a process @Description Probe an existing process to get a detailed stream information on the inputs @ID restream-3-probe @Produce json @Param id path string true "Process ID" @Success 200 {object} api.Probe @Security ApiKeyAuth @Router /api/v3/process/{id}/probe [get]

func (*RestreamHandler) ReloadSkills

func (h *RestreamHandler) ReloadSkills(c echo.Context) error

ReloadSkills will refresh the FFmpeg capabilities @Summary Refresh FFmpeg capabilities @Description Refresh the available FFmpeg capabilities @ID skills-3-reload @Produce json @Success 200 {object} api.Skills @Security ApiKeyAuth @Router /api/v3/skills/reload [get]

func (*RestreamHandler) SetMetadata

func (h *RestreamHandler) SetMetadata(c echo.Context) error

SetMetadata stores metadata with the Restreamer @Summary Add JSON metadata under the given key @Description Add arbitrary JSON metadata under the given key. If the key exists, all already stored metadata with this key will be overwritten. If the key doesn't exist, it will be created. @ID metadata-3-set @Produce json @Param key path string true "Key for data store" @Param data body api.Metadata true "Arbitrary JSON data" @Success 200 {object} api.Metadata @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/metadata/{key} [put]

func (*RestreamHandler) SetProcessMetadata

func (h *RestreamHandler) SetProcessMetadata(c echo.Context) error

SetProcessMetadata stores metadata with a process @Summary Add JSON metadata with a process under the given key @Description Add arbitrary JSON metadata under the given key. If the key exists, all already stored metadata with this key will be overwritten. If the key doesn't exist, it will be created. @ID restream-3-set-process-metadata @Produce json @Param id path string true "Process ID" @Param key path string true "Key for data store" @Param data body api.Metadata true "Arbitrary JSON data. The null value will remove the key and its contents" @Success 200 {object} api.Metadata @Failure 404 {object} api.Error @Failure 400 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id}/metadata/{key} [put]

func (*RestreamHandler) Skills

func (h *RestreamHandler) Skills(c echo.Context) error

Skills returns the detected FFmpeg capabilities @Summary FFmpeg capabilities @Description List all detected FFmpeg capabilities @ID skills-3 @Produce json @Success 200 {object} api.Skills @Security ApiKeyAuth @Router /api/v3/skills [get]

func (*RestreamHandler) Update

func (h *RestreamHandler) Update(c echo.Context) error

Update replaces an existing process @Summary Replace an existing process @Description Replace an existing process. This is a shortcut for DELETE+POST. @ID restream-3-update @Accept json @Produce json @Param id path string true "Process ID" @Param config body api.ProcessConfig true "Process config" @Success 200 {object} api.ProcessConfig @Failure 400 {object} api.Error @Failure 404 {object} api.Error @Security ApiKeyAuth @Router /api/v3/process/{id} [put]

type SessionHandler

type SessionHandler struct {
	// contains filtered or unexported fields
}

The SessionHandler type provides handlers to retrieve session information

func NewSession

func NewSession(registry session.Registry) *SessionHandler

NewSession returns a new Session type. You have to provide a session registry.

func (*SessionHandler) Active

func (s *SessionHandler) Active(c echo.Context) error

Active returns a list of active sessions @Summary Get a minimal summary of all active sessions @Description Get a minimal summary of all active sessions (i.e. number of sessions, bandwidth) @ID session-3-current @Produce json @Security ApiKeyAuth @Param collectors query string false "Comma separated list of collectors" @Success 200 {object} api.SessionsActive "Active sessions listing" @Router /api/v3/session/active [get]

func (*SessionHandler) Summary

func (s *SessionHandler) Summary(c echo.Context) error

Summary returns a summary of all active and past sessions @Summary Get a summary of all active and past sessions @Description Get a summary of all active and past sessions of the given collector @ID session-3-summary @Produce json @Security ApiKeyAuth @Param collectors query string false "Comma separated list of collectors" @Success 200 {object} api.SessionsSummary "Sessions summary" @Router /api/v3/session [get]

type WidgetConfig

type WidgetConfig struct {
	Restream restream.Restreamer
	Registry session.Registry
}

type WidgetHandler

type WidgetHandler struct {
	// contains filtered or unexported fields
}

The WidgetHandler type provides handlers for the widget API

func NewWidget

func NewWidget(config WidgetConfig) *WidgetHandler

NewWidget return a new Widget type

func (*WidgetHandler) Get

func (w *WidgetHandler) Get(c echo.Context) error

Get returns minimal public statistics about a process @Summary Fetch minimal statistics about a process @Description Fetch minimal statistics about a process, which is not protected by any auth. @ID widget-3-get @Produce json @Param id path string true "ID of a process" @Success 200 {object} api.WidgetProcess @Failure 404 {object} api.Error @Router /api/v3/widget/process/{id} [get]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL