1
0
Fork 0
forked from External/mediamtx
mediamtx/internal/defs/auth.go
2023-12-08 19:17:17 +01:00

23 lines
569 B
Go

package defs
// AuthProtocol is a authentication protocol.
type AuthProtocol string
// authentication protocols.
const (
AuthProtocolRTSP AuthProtocol = "rtsp"
AuthProtocolRTMP AuthProtocol = "rtmp"
AuthProtocolHLS AuthProtocol = "hls"
AuthProtocolWebRTC AuthProtocol = "webrtc"
AuthProtocolSRT AuthProtocol = "srt"
)
// ErrAuthentication is a authentication error.
type ErrAuthentication struct {
Message string
}
// Error implements the error interface.
func (e *ErrAuthentication) Error() string {
return "authentication failed: " + e.Message
}