diff --git a/docs/docs.go b/docs/docs.go index 119fd7e6..f3b29d60 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -546,7 +546,7 @@ const docTemplate = `{ "application/json" ], "summary": "Fetch a file from the memory filesystem", - "operationId": "memfs-3-get-file-api", + "operationId": "memfs-3-get-file", "parameters": [ { "type": "string", @@ -592,7 +592,7 @@ const docTemplate = `{ "application/json" ], "summary": "Add a file to the memory filesystem", - "operationId": "memfs-3-put-file-api", + "operationId": "memfs-3-put-file", "parameters": [ { "type": "string", @@ -646,7 +646,7 @@ const docTemplate = `{ "text/plain" ], "summary": "Remove a file from the memory filesystem", - "operationId": "memfs-delete-file-api", + "operationId": "memfs-3-delete-file", "parameters": [ { "type": "string", @@ -893,7 +893,7 @@ const docTemplate = `{ "application/json" ], "summary": "List all known processes", - "operationId": "restream-3-get-all", + "operationId": "process-3-get-all", "parameters": [ { "type": "string", @@ -940,7 +940,7 @@ const docTemplate = `{ "application/json" ], "summary": "Add a new process", - "operationId": "restream-3-add", + "operationId": "process-3-add", "parameters": [ { "description": "Process config", @@ -980,7 +980,7 @@ const docTemplate = `{ "application/json" ], "summary": "List a process by its ID", - "operationId": "restream-3-get", + "operationId": "process-3-get", "parameters": [ { "type": "string", @@ -1025,7 +1025,7 @@ const docTemplate = `{ "application/json" ], "summary": "Replace an existing process", - "operationId": "restream-3-update", + "operationId": "process-3-update", "parameters": [ { "type": "string", @@ -1076,7 +1076,7 @@ const docTemplate = `{ "application/json" ], "summary": "Delete a process by its ID", - "operationId": "restream-3-delete", + "operationId": "process-3-delete", "parameters": [ { "type": "string", @@ -1117,7 +1117,7 @@ const docTemplate = `{ "application/json" ], "summary": "Issue a command to a process", - "operationId": "restream-3-command", + "operationId": "process-3-command", "parameters": [ { "type": "string", @@ -1170,7 +1170,7 @@ const docTemplate = `{ "application/json" ], "summary": "Get the configuration of a process", - "operationId": "restream-3-get-config", + "operationId": "process-3-get-config", "parameters": [ { "type": "string", @@ -1214,7 +1214,7 @@ const docTemplate = `{ "application/json" ], "summary": "Retrieve JSON metadata stored with a process under a key", - "operationId": "restream-3-get-process-metadata", + "operationId": "process-3-get-process-metadata", "parameters": [ { "type": "string", @@ -1261,7 +1261,7 @@ const docTemplate = `{ "application/json" ], "summary": "Add JSON metadata with a process under the given key", - "operationId": "restream-3-set-process-metadata", + "operationId": "process-3-set-process-metadata", "parameters": [ { "type": "string", @@ -1318,7 +1318,7 @@ const docTemplate = `{ "application/json" ], "summary": "Encode the errorframe", - "operationId": "restream-3-playout-errorframencode", + "operationId": "process-3-playout-errorframencode", "parameters": [ { "type": "string", @@ -1373,7 +1373,7 @@ const docTemplate = `{ "application/json" ], "summary": "Upload an error frame", - "operationId": "restream-3-playout-errorframe", + "operationId": "process-3-playout-errorframe", "parameters": [ { "type": "string", @@ -1445,7 +1445,7 @@ const docTemplate = `{ "application/json" ], "summary": "Get the last keyframe", - "operationId": "restream-3-playout-keyframe", + "operationId": "process-3-playout-keyframe", "parameters": [ { "type": "string", @@ -1503,7 +1503,7 @@ const docTemplate = `{ "text/plain" ], "summary": "Close the current input stream", - "operationId": "restream-3-playout-reopen-input", + "operationId": "process-3-playout-reopen-input", "parameters": [ { "type": "string", @@ -1554,7 +1554,7 @@ const docTemplate = `{ "application/json" ], "summary": "Get the current playout status", - "operationId": "restream-3-playout-status", + "operationId": "process-3-playout-status", "parameters": [ { "type": "string", @@ -1609,7 +1609,7 @@ const docTemplate = `{ "application/json" ], "summary": "Switch to a new stream", - "operationId": "restream-3-playout-stream", + "operationId": "process-3-playout-stream", "parameters": [ { "type": "string", @@ -1669,7 +1669,7 @@ const docTemplate = `{ "application/json" ], "summary": "Probe a process", - "operationId": "restream-3-probe", + "operationId": "process-3-probe", "parameters": [ { "type": "string", @@ -1701,7 +1701,7 @@ const docTemplate = `{ "application/json" ], "summary": "Get the logs of a process", - "operationId": "restream-3-get-report", + "operationId": "process-3-get-report", "parameters": [ { "type": "string", @@ -1745,7 +1745,7 @@ const docTemplate = `{ "application/json" ], "summary": "Get the state of a process", - "operationId": "restream-3-get-state", + "operationId": "process-3-get-state", "parameters": [ { "type": "string", @@ -2609,6 +2609,9 @@ const docTemplate = `{ "address": { "type": "string" }, + "address_tls": { + "type": "string" + }, "app": { "type": "string" }, @@ -4203,6 +4206,9 @@ const docTemplate = `{ "address": { "type": "string" }, + "address_tls": { + "type": "string" + }, "app": { "type": "string" }, diff --git a/docs/swagger.json b/docs/swagger.json index cc739a14..cf6df2a5 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -538,7 +538,7 @@ "application/json" ], "summary": "Fetch a file from the memory filesystem", - "operationId": "memfs-3-get-file-api", + "operationId": "memfs-3-get-file", "parameters": [ { "type": "string", @@ -584,7 +584,7 @@ "application/json" ], "summary": "Add a file to the memory filesystem", - "operationId": "memfs-3-put-file-api", + "operationId": "memfs-3-put-file", "parameters": [ { "type": "string", @@ -638,7 +638,7 @@ "text/plain" ], "summary": "Remove a file from the memory filesystem", - "operationId": "memfs-delete-file-api", + "operationId": "memfs-3-delete-file", "parameters": [ { "type": "string", @@ -885,7 +885,7 @@ "application/json" ], "summary": "List all known processes", - "operationId": "restream-3-get-all", + "operationId": "process-3-get-all", "parameters": [ { "type": "string", @@ -932,7 +932,7 @@ "application/json" ], "summary": "Add a new process", - "operationId": "restream-3-add", + "operationId": "process-3-add", "parameters": [ { "description": "Process config", @@ -972,7 +972,7 @@ "application/json" ], "summary": "List a process by its ID", - "operationId": "restream-3-get", + "operationId": "process-3-get", "parameters": [ { "type": "string", @@ -1017,7 +1017,7 @@ "application/json" ], "summary": "Replace an existing process", - "operationId": "restream-3-update", + "operationId": "process-3-update", "parameters": [ { "type": "string", @@ -1068,7 +1068,7 @@ "application/json" ], "summary": "Delete a process by its ID", - "operationId": "restream-3-delete", + "operationId": "process-3-delete", "parameters": [ { "type": "string", @@ -1109,7 +1109,7 @@ "application/json" ], "summary": "Issue a command to a process", - "operationId": "restream-3-command", + "operationId": "process-3-command", "parameters": [ { "type": "string", @@ -1162,7 +1162,7 @@ "application/json" ], "summary": "Get the configuration of a process", - "operationId": "restream-3-get-config", + "operationId": "process-3-get-config", "parameters": [ { "type": "string", @@ -1206,7 +1206,7 @@ "application/json" ], "summary": "Retrieve JSON metadata stored with a process under a key", - "operationId": "restream-3-get-process-metadata", + "operationId": "process-3-get-process-metadata", "parameters": [ { "type": "string", @@ -1253,7 +1253,7 @@ "application/json" ], "summary": "Add JSON metadata with a process under the given key", - "operationId": "restream-3-set-process-metadata", + "operationId": "process-3-set-process-metadata", "parameters": [ { "type": "string", @@ -1310,7 +1310,7 @@ "application/json" ], "summary": "Encode the errorframe", - "operationId": "restream-3-playout-errorframencode", + "operationId": "process-3-playout-errorframencode", "parameters": [ { "type": "string", @@ -1365,7 +1365,7 @@ "application/json" ], "summary": "Upload an error frame", - "operationId": "restream-3-playout-errorframe", + "operationId": "process-3-playout-errorframe", "parameters": [ { "type": "string", @@ -1437,7 +1437,7 @@ "application/json" ], "summary": "Get the last keyframe", - "operationId": "restream-3-playout-keyframe", + "operationId": "process-3-playout-keyframe", "parameters": [ { "type": "string", @@ -1495,7 +1495,7 @@ "text/plain" ], "summary": "Close the current input stream", - "operationId": "restream-3-playout-reopen-input", + "operationId": "process-3-playout-reopen-input", "parameters": [ { "type": "string", @@ -1546,7 +1546,7 @@ "application/json" ], "summary": "Get the current playout status", - "operationId": "restream-3-playout-status", + "operationId": "process-3-playout-status", "parameters": [ { "type": "string", @@ -1601,7 +1601,7 @@ "application/json" ], "summary": "Switch to a new stream", - "operationId": "restream-3-playout-stream", + "operationId": "process-3-playout-stream", "parameters": [ { "type": "string", @@ -1661,7 +1661,7 @@ "application/json" ], "summary": "Probe a process", - "operationId": "restream-3-probe", + "operationId": "process-3-probe", "parameters": [ { "type": "string", @@ -1693,7 +1693,7 @@ "application/json" ], "summary": "Get the logs of a process", - "operationId": "restream-3-get-report", + "operationId": "process-3-get-report", "parameters": [ { "type": "string", @@ -1737,7 +1737,7 @@ "application/json" ], "summary": "Get the state of a process", - "operationId": "restream-3-get-state", + "operationId": "process-3-get-state", "parameters": [ { "type": "string", @@ -2601,6 +2601,9 @@ "address": { "type": "string" }, + "address_tls": { + "type": "string" + }, "app": { "type": "string" }, @@ -4195,6 +4198,9 @@ "address": { "type": "string" }, + "address_tls": { + "type": "string" + }, "app": { "type": "string" }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 9374d7d8..74450880 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -264,6 +264,8 @@ definitions: properties: address: type: string + address_tls: + type: string app: type: string enable: @@ -1367,6 +1369,8 @@ definitions: properties: address: type: string + address_tls: + type: string app: type: string enable: @@ -2047,7 +2051,7 @@ paths: /api/v3/fs/mem/{path}: delete: description: Remove a file from the memory filesystem - operationId: memfs-delete-file-api + operationId: memfs-3-delete-file parameters: - description: Path to file in: path @@ -2070,7 +2074,7 @@ paths: summary: Remove a file from the memory filesystem get: description: Fetch a file from the memory filesystem - operationId: memfs-3-get-file-api + operationId: memfs-3-get-file parameters: - description: Path to file in: path @@ -2133,7 +2137,7 @@ paths: consumes: - application/data description: Writes or overwrites a file on the memory filesystem - operationId: memfs-3-put-file-api + operationId: memfs-3-put-file parameters: - description: Path to file in: path @@ -2276,7 +2280,7 @@ paths: get: description: List all known processes. Use the query parameter to filter the listed processes. - operationId: restream-3-get-all + operationId: process-3-get-all parameters: - description: 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 @@ -2309,7 +2313,7 @@ paths: consumes: - application/json description: Add a new FFmpeg process - operationId: restream-3-add + operationId: process-3-add parameters: - description: Process config in: body @@ -2334,7 +2338,7 @@ paths: /api/v3/process/{id}: delete: description: Delete a process by its ID - operationId: restream-3-delete + operationId: process-3-delete parameters: - description: Process ID in: path @@ -2358,7 +2362,7 @@ paths: get: description: List a process by its ID. Use the filter parameter to specifiy the level of detail of the output. - operationId: restream-3-get + operationId: process-3-get parameters: - description: Process ID in: path @@ -2388,7 +2392,7 @@ paths: consumes: - application/json description: Replace an existing process. This is a shortcut for DELETE+POST. - operationId: restream-3-update + operationId: process-3-update parameters: - description: Process ID in: path @@ -2424,7 +2428,7 @@ paths: consumes: - application/json description: 'Issue a command to a process: start, stop, reload, restart' - operationId: restream-3-command + operationId: process-3-command parameters: - description: Process ID in: path @@ -2459,7 +2463,7 @@ paths: get: description: Get the configuration of a process. This is the configuration as provided by Add or Update. - operationId: restream-3-get-config + operationId: process-3-get-config parameters: - description: Process ID in: path @@ -2488,7 +2492,7 @@ paths: get: description: Retrieve the previously stored JSON metadata under the given key. If the key is empty, all metadata will be returned. - operationId: restream-3-get-process-metadata + operationId: process-3-get-process-metadata parameters: - description: Process ID in: path @@ -2521,7 +2525,7 @@ paths: 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. - operationId: restream-3-set-process-metadata + operationId: process-3-set-process-metadata parameters: - description: Process ID in: path @@ -2561,7 +2565,7 @@ paths: consumes: - application/octet-stream description: Upload an error frame which will be encoded immediately - operationId: restream-3-playout-errorframe + operationId: process-3-playout-errorframe parameters: - description: Process ID in: path @@ -2608,7 +2612,7 @@ paths: /api/v3/process/{id}/playout/{inputid}/errorframe/encode: get: description: Immediately encode the errorframe (if available and looping) - operationId: restream-3-playout-errorframencode + operationId: process-3-playout-errorframencode parameters: - description: Process ID in: path @@ -2643,7 +2647,7 @@ paths: get: description: Get the last keyframe of an input of a process. The extension of the name determines the return type. - operationId: restream-3-playout-keyframe + operationId: process-3-playout-keyframe parameters: - description: Process ID in: path @@ -2684,7 +2688,7 @@ paths: get: description: Close the current input stream such that it will be automatically re-opened - operationId: restream-3-playout-reopen-input + operationId: process-3-playout-reopen-input parameters: - description: Process ID in: path @@ -2717,7 +2721,7 @@ paths: /api/v3/process/{id}/playout/{inputid}/status: get: description: Get the current playout status of an input of a process - operationId: restream-3-playout-status + operationId: process-3-playout-status parameters: - description: Process ID in: path @@ -2753,7 +2757,7 @@ paths: - text/plain description: Replace the current stream with the one from the given URL. The switch will only happen if the stream parameters match. - operationId: restream-3-playout-stream + operationId: process-3-playout-stream parameters: - description: Process ID in: path @@ -2794,7 +2798,7 @@ paths: get: description: Probe an existing process to get a detailed stream information on the inputs - operationId: restream-3-probe + operationId: process-3-probe parameters: - description: Process ID in: path @@ -2814,7 +2818,7 @@ paths: /api/v3/process/{id}/report: get: description: Get the logs and the log history of a process - operationId: restream-3-get-report + operationId: process-3-get-report parameters: - description: Process ID in: path @@ -2842,7 +2846,7 @@ paths: /api/v3/process/{id}/state: get: description: Get the state and progress data of a process - operationId: restream-3-get-state + operationId: process-3-get-state parameters: - description: Process ID in: path diff --git a/http/handler/api/memfs.go b/http/handler/api/memfs.go index 12f0eaad..41e90368 100644 --- a/http/handler/api/memfs.go +++ b/http/handler/api/memfs.go @@ -31,7 +31,7 @@ func NewMemFS(fs fs.Filesystem) *MemFSHandler { // 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 +// @ID memfs-3-get-file // @Produce application/data // @Produce json // @Param path path string true "Path to file" @@ -47,7 +47,7 @@ func (h *MemFSHandler) GetFile(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 +// @ID memfs-3-put-file // @Accept application/data // @Produce text/plain // @Produce json @@ -65,7 +65,7 @@ func (h *MemFSHandler) PutFile(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 +// @ID memfs-3-delete-file // @Produce text/plain // @Param path path string true "Path to file" // @Success 200 {string} string diff --git a/http/handler/api/playout.go b/http/handler/api/playout.go index fde83061..b496a305 100644 --- a/http/handler/api/playout.go +++ b/http/handler/api/playout.go @@ -31,7 +31,7 @@ func NewPlayout(restream restream.Restreamer) *PlayoutHandler { // 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 +// @ID process-3-playout-status // @Produce json // @Param id path string true "Process ID" // @Param inputid path string true "Process Input ID" @@ -84,7 +84,7 @@ func (h *PlayoutHandler) Status(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 +// @ID process-3-playout-keyframe // @Produce image/jpeg // @Produce image/png // @Produce json @@ -133,7 +133,7 @@ func (h *PlayoutHandler) Keyframe(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 +// @ID process-3-playout-errorframencode // @Produce text/plain // @Produce json // @Param id path string true "Process ID" @@ -173,7 +173,7 @@ func (h *PlayoutHandler) EncodeErrorframe(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 +// @ID process-3-playout-errorframe // @Produce text/plain // @Produce json // @Accept application/octet-stream @@ -221,7 +221,7 @@ func (h *PlayoutHandler) SetErrorframe(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 +// @ID process-3-playout-reopen-input // @Produce plain // @Param id path string true "Process ID" // @Param inputid path string true "Process Input ID" @@ -260,7 +260,7 @@ func (h *PlayoutHandler) ReopenInput(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 +// @ID process-3-playout-stream // @Produce text/plain // @Produce json // @Accept text/plain diff --git a/http/handler/api/restream.go b/http/handler/api/restream.go index ad73b5c4..fab99c3f 100644 --- a/http/handler/api/restream.go +++ b/http/handler/api/restream.go @@ -27,7 +27,7 @@ func NewRestream(restream restream.Restreamer) *RestreamHandler { // Add adds a new process // @Summary Add a new process // @Description Add a new FFmpeg process -// @ID restream-3-add +// @ID process-3-add // @Accept json // @Produce json // @Param config body api.ProcessConfig true "Process config" @@ -68,7 +68,7 @@ func (h *RestreamHandler) Add(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 +// @ID process-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" @@ -114,7 +114,7 @@ func (h *RestreamHandler) GetAll(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 +// @ID process-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" @@ -137,7 +137,7 @@ func (h *RestreamHandler) Get(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 +// @ID process-3-delete // @Produce json // @Param id path string true "Process ID" // @Success 200 {string} string @@ -161,7 +161,7 @@ func (h *RestreamHandler) Delete(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 +// @ID process-3-update // @Accept json // @Produce json // @Param id path string true "Process ID" @@ -202,7 +202,7 @@ func (h *RestreamHandler) Update(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 +// @ID process-3-command // @Accept json // @Produce json // @Param id path string true "Process ID" @@ -244,7 +244,7 @@ func (h *RestreamHandler) Command(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 +// @ID process-3-get-config // @Produce json // @Param id path string true "Process ID" // @Success 200 {object} api.ProcessConfig @@ -269,7 +269,7 @@ func (h *RestreamHandler) GetConfig(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 +// @ID process-3-get-state // @Produce json // @Param id path string true "Process ID" // @Success 200 {object} api.ProcessState @@ -294,7 +294,7 @@ func (h *RestreamHandler) GetState(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 +// @ID process-3-get-report // @Produce json // @Param id path string true "Process ID" // @Success 200 {object} api.ProcessReport @@ -319,7 +319,7 @@ func (h *RestreamHandler) GetReport(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 +// @ID process-3-probe // @Produce json // @Param id path string true "Process ID" // @Success 200 {object} api.Probe @@ -374,7 +374,7 @@ func (h *RestreamHandler) ReloadSkills(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 +// @ID process-3-get-process-metadata // @Produce json // @Param id path string true "Process ID" // @Param key path string true "Key for data store" @@ -398,7 +398,7 @@ func (h *RestreamHandler) GetProcessMetadata(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 +// @ID process-3-set-process-metadata // @Produce json // @Param id path string true "Process ID" // @Param key path string true "Key for data store"