Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUrlTooLong = errors.New("url too long") ErrEmptyName = errors.New("empty name") ErrNameTooLong = errors.New("name too long") ErrTypeTooLong = errors.New("type too long") ErrId = errors.New("id must be greater than 0") ErrEmptyIds = errors.New("empty ids") )
View Source
var ( ErrEmptyRoomId = errors.New("empty room id") ErrRoomIdTooLong = errors.New("room id too long") ErrRoomIdHasInvalidChar = errors.New("room id has invalid char") ErrEmptyPassword = errors.New("empty password") ErrPasswordTooLong = errors.New("password too long") ErrEmptyUsername = errors.New("empty username") ErrUsernameTooLong = errors.New("username too long") ErrUsernameHasInvalidChar = errors.New("username has invalid char") )
Functions ¶
Types ¶
type ApiResp ¶
type ApiResp struct { Time int64 `json:"time"` Error string `json:"error,omitempty"` Data any `json:"data,omitempty"` }
func NewApiDataResp ¶
func NewApiErrorResp ¶
func NewApiErrorStringResp ¶
type CreateRoomReq ¶
type CreateRoomReq struct { RoomId string `json:"roomId"` Password string `json:"password"` Username string `json:"username"` UserPassword string `json:"userPassword"` Hidden bool `json:"hidden"` }
func (*CreateRoomReq) Validate ¶
func (c *CreateRoomReq) Validate() error
type EditMovieReq ¶
type EditMovieReq struct { IdReq PushMovieReq }
func (*EditMovieReq) Validate ¶
func (e *EditMovieReq) Validate() error
type LoginRoomReq ¶
type LoginRoomReq struct { RoomId string `json:"roomId"` Password string `json:"password"` Username string `json:"username"` UserPassword string `json:"userPassword"` }
func (*LoginRoomReq) Validate ¶
func (l *LoginRoomReq) Validate() error
type PushMovieReq ¶
type PushMovieReq room.BaseMovieInfo
func (*PushMovieReq) Validate ¶
func (p *PushMovieReq) Validate() error
type RoomListResp ¶
type SetRoomPasswordReq ¶
type SetRoomPasswordReq struct {
Password string `json:"password"`
}
func (*SetRoomPasswordReq) Validate ¶
func (s *SetRoomPasswordReq) Validate() error
type SetUserPasswordReq ¶
type SetUserPasswordReq struct {
Password string `json:"password"`
}
func (*SetUserPasswordReq) Validate ¶
func (s *SetUserPasswordReq) Validate() error
type SwapMovieReq ¶
func (*SwapMovieReq) Validate ¶
func (s *SwapMovieReq) Validate() error
type UsernameReq ¶
type UsernameReq struct {
Username string `json:"username"`
}
func (*UsernameReq) Validate ¶
func (u *UsernameReq) Validate() error
Click to show internal directories.
Click to hide internal directories.