You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
825B

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