Documentation
¶
Overview ¶
Package apidocs holds OpenAPI response/request shapes referenced from swag comments.
Index ¶
- type ConfigData
- type ConfigPorts
- type ConfigUpdateResponse
- type ErrorBody
- type ErrorResponse
- type HookData
- type HookList
- type HookTestData
- type HookTestInner
- type InputData
- type InputSwitchRequest
- type RecordingData
- type RecordingList
- type SessionList
- type SessionStats
- type StreamActionData
- type StreamActionInner
- type StreamData
- type StreamList
- type StreamPutRequest
- type StreamResponse
- type VODFileData
- type VODFileList
- type VODMountData
- type VODMountList
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 HookTestData ¶
type HookTestData struct {
Data HookTestInner `json:"data"`
}
HookTestData is returned by POST .../test.
type HookTestInner ¶
HookTestInner is the payload for hook test success.
type InputSwitchRequest ¶
type InputSwitchRequest struct {
Priority int `json:"priority"`
}
InputSwitchRequest is the request body for POST /streams/{code}/inputs/switch.
type RecordingData ¶
RecordingData wraps a recording.
type RecordingList ¶
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 ¶
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 ¶
VODMountData wraps a single VOD mount.
type VODMountList ¶
VODMountList wraps listed VOD mounts.