|
1234567891011121314151617181920 |
- # -*-coding:utf-8 -*-
- from typing import Union
-
- from pydantic import BaseModel, Field, HttpUrl
- from fastapi._compat import Required
-
-
- class PushStreamRequest(BaseModel):
- pullUrl: Union[str, None] = Field(default=None, title="拉流地址",
- pattern="(^(https|http|rtsp|rtmp|artc|webrtc|ws)://[\\w\\d\\.\\-/:_?=&!~*'()+$@,;\"%\\[\\]]+$)?")
- pushUrl: Union[str, None] = Field(default=None, title="推流地址",
- pattern="(^(https|http|rtsp|rtmp|artc|webrtc|ws)://[\\w\\d\\.\\-/:_?=&!~*'()+$@,;\"%\\[\\]]+$)?")
- callbackUrl: HttpUrl = Field(default=Required, title="回调地址")
-
-
- class CallbackRequest(BaseModel):
- errorCode: Union[str, None]
- errorMsg: Union[str, None]
- status: Union[int, None]
- currentTime: Union[str, None]
|