apidocs

package
v0.0.91 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package apidocs holds OpenAPI response/request shapes referenced from swag comments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigData

type ConfigData struct {
	Version            version.Info               `json:"version"`
	HWAccels           []domain.HWAccel           `json:"hw_accels"`
	VideoCodecs        []domain.VideoCodec        `json:"video_codecs"`
	AudioCodecs        []domain.AudioCodec        `json:"audio_codecs"`
	OutputProtocols    []string                   `json:"output_protocols"`
	StreamStatuses     []domain.StreamStatus      `json:"stream_statuses"`
	WatermarkTypes     []domain.WatermarkType     `json:"watermark_types"`
	WatermarkPositions []domain.WatermarkPosition `json:"watermark_positions"`
	Ports              ConfigPorts                `json:"ports"`
	GlobalConfig       *domain.GlobalConfig       `json:"global_config"`
}

ConfigData wraps the GET /config response.

type ConfigPorts

type ConfigPorts struct {
	HTTPAddr string `json:"http_addr"`
	RTSPPort int    `json:"rtsp_port"`
	RTMPPort int    `json:"rtmp_port"`
	SRTPort  int    `json:"srt_port"`
}

ConfigPorts exposes listener port configuration so the UI can build output URLs.

type ConfigUpdateResponse

type ConfigUpdateResponse struct {
	GlobalConfig *domain.GlobalConfig `json:"global_config"`
	Ports        ConfigPorts          `json:"ports"`
}

ConfigUpdateResponse wraps the POST /config response.

type ErrorBody

type ErrorBody struct {
	Error struct {
		Code    string `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
}

ErrorBody matches handler writeError JSON shape.

type ErrorResponse

type ErrorResponse = ErrorBody

ErrorResponse wraps an error body for swagger documentation.

type HookData

type HookData struct {
	Data *domain.Hook `json:"data"`
}

HookData wraps a hook.

type HookList

type HookList struct {
	Data  []*domain.Hook `json:"data"`
	Total int            `json:"total"`
}

HookList wraps hooks.

type HookTestData

type HookTestData struct {
	Data HookTestInner `json:"data"`
}

HookTestData is returned by POST .../test.

type HookTestInner

type HookTestInner struct {
	Status string `json:"status"`
	At     string `json:"at"`
}

HookTestInner is the payload for hook test success.

type InputData

type InputData struct {
	Data []domain.Input `json:"data"`
}

InputData wraps inputs array.

type InputSwitchRequest

type InputSwitchRequest struct {
	Priority int `json:"priority"`
}

InputSwitchRequest is the request body for POST /streams/{code}/inputs/switch.

type RecordingData

type RecordingData struct {
	Data *domain.Recording `json:"data"`
}

RecordingData wraps a recording.

type RecordingList

type RecordingList struct {
	Data  []*domain.Recording `json:"data"`
	Total int                 `json:"total"`
}

RecordingList wraps recordings for a stream.

type SessionList added in v0.0.42

type SessionList struct {
	Sessions   []*domain.PlaySession `json:"sessions"`
	TotalCount int                   `json:"total_count"`
	Stats      SessionStats          `json:"stats"`
}

SessionList wraps the play-sessions list response. Mirrors the JSON shape emitted by handler.SessionHandler.List / ListByStream so swag can resolve {object} apidocs.SessionList.

type SessionStats added in v0.0.42

type SessionStats struct {
	Active          int   `json:"active"`
	OpenedTotal     int64 `json:"opened_total"`
	ClosedTotal     int64 `json:"closed_total"`
	IdleClosedTotal int64 `json:"idle_closed_total"`
	KickedTotal     int64 `json:"kicked_total"`
}

SessionStats mirrors sessions.Stats — duplicated here so apidocs stays dependency-free of the sessions package (avoids any future cycle).

type StreamActionData

type StreamActionData struct {
	Data StreamActionInner `json:"data"`
}

StreamActionData is returned by POST .../restart.

type StreamActionInner

type StreamActionInner struct {
	Status string `json:"status"`
}

StreamActionInner holds status string for start/stop responses.

type StreamData

type StreamData struct {
	Data StreamResponse `json:"data"`
}

StreamData wraps a single stream response.

type StreamList

type StreamList struct {
	Data  []StreamResponse `json:"data"`
	Total int              `json:"total"`
}

StreamList wraps listed streams.

type StreamPutRequest

type StreamPutRequest struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Tags        []string `json:"tags"`

	StreamKey string `json:"stream_key"`

	Disabled bool `json:"disabled"`

	Inputs []domain.Input `json:"inputs"`

	Transcoder *domain.TranscoderConfig `json:"transcoder,omitempty"`
	Protocols  domain.OutputProtocols   `json:"protocols"`
	Push       []domain.PushDestination `json:"push"`
	DVR        *domain.StreamDVRConfig  `json:"dvr,omitempty"`
	Watermark  *domain.WatermarkConfig  `json:"watermark,omitempty"`
	Thumbnail  *domain.ThumbnailConfig  `json:"thumbnail,omitempty"`
}

StreamPutRequest is request body for PUT /streams/{code}. code is taken from path param.

type StreamResponse

type StreamResponse struct {
	domain.Stream
	Runtime manager.RuntimeStatus `json:"runtime"`
}

StreamResponse is the API representation of a stream returned by GET /streams and GET /streams/{code}. The persisted configuration is embedded at the top level; everything runtime-computed lives under a single `runtime` envelope:

  • runtime.status — coordinator-resolved lifecycle state
  • runtime.pipeline_active — true when the manager has registered a pipeline
  • runtime.inputs[] — per-input health + last 5 degradation errors
  • runtime.transcoder — per-profile FFmpeg state: restart count + last 5 crash errors

`runtime` is always present (never null), even when the pipeline is not running — clients can rely on it as a single root for all live data.

type VODFileData

type VODFileData struct {
	Data vod.FileEntry `json:"data"`
}

VODFileData wraps a single uploaded VOD file.

type VODFileList

type VODFileList struct {
	Data  []vod.FileEntry `json:"data"`
	Total int             `json:"total"`
	Path  string          `json:"path"`
}

VODFileList wraps a directory listing inside a VOD mount.

type VODMountData

type VODMountData struct {
	Data *domain.VODMount `json:"data"`
}

VODMountData wraps a single VOD mount.

type VODMountList

type VODMountList struct {
	Data  []*domain.VODMount `json:"data"`
	Total int                `json:"total"`
}

VODMountList wraps listed VOD mounts.

type WatermarkAssetData added in v0.0.44

type WatermarkAssetData struct {
	Data *domain.WatermarkAsset `json:"data"`
}

WatermarkAssetData wraps a single watermark asset response.

type WatermarkAssetList added in v0.0.44

type WatermarkAssetList struct {
	Data  []*domain.WatermarkAsset `json:"data"`
	Total int                      `json:"total"`
	Dir   string                   `json:"dir"`
}

WatermarkAssetList wraps the watermark library list response.

Jump to

Keyboard shortcuts

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