Documentation ¶
Index ¶
- Variables
- func Decode(ctx *gin.Context, decoder Decoder) error
- type AddUserReq
- type AddVendorBackendReq
- type AdminRoomPasswordReq
- type AdminSettingsReq
- type AdminSettingsResp
- type AdminUserPasswordReq
- type AdminUsernameReq
- type ApiResp
- type CreateRoomReq
- type CurrentMovieResp
- type Decoder
- type EditMovieReq
- type FormatEmptyPasswordError
- type GetVendorBackendResp
- type IdCanEmptyReq
- type IdReq
- type IdsReq
- type Item
- type LoginRoomReq
- type LoginUserReq
- type MovieResp
- type OAuth2CallbackReq
- type OAuth2Req
- type Path
- type PushMovieReq
- type PushMoviesReq
- type RoomIDReq
- type RoomListResp
- type RoomUsersResp
- type ServerIDReq
- type SetRoomPasswordReq
- type SetRoomSettingReq
- type SetUserPasswordReq
- type SetUsernameReq
- type SwapMovieReq
- type UserBindProviderResp
- type UserIDReq
- type UserInfoResp
- type VendorBackendEndpointsReq
- type VendorFSListResp
- type VendorMeResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidOAuth2Code = errors.New("invalid oauth2 code") ErrInvalidOAuth2State = errors.New("invalid oauth2 state") )
View Source
var ( ErrUrlTooLong = errors.New("url too long") ErrEmptyName = errors.New("empty name") ErrTypeTooLong = errors.New("type too long") ErrId = errors.New("id must be greater than 0") ErrEmptyIds = errors.New("empty ids") )
View Source
var ( ErrEmptyRoomName = errors.New("empty room name") ErrRoomNameTooLong = errors.New("room name too long") ErrRoomNameHasInvalidChar = errors.New("room name has invalid char") ErrPasswordTooLong = errors.New("password too long") ErrPasswordHasInvalidChar = errors.New("password has invalid char") ErrEmptyUserId = errors.New("empty user id") ErrEmptyUsername = errors.New("empty username") ErrUsernameTooLong = errors.New("username too long") ErrUsernameHasInvalidChar = errors.New("username has invalid char") )
View Source
var (
ErrInvalidID = errors.New("invalid id")
)
Functions ¶
Types ¶
type AddUserReq ¶ added in v0.3.0
type AddUserReq struct { Username string `json:"username"` Password string `json:"password"` Role dbModel.Role `json:"role"` }
func (*AddUserReq) Validate ¶ added in v0.3.0
func (aur *AddUserReq) Validate() error
type AddVendorBackendReq ¶ added in v0.3.1
type AddVendorBackendReq model.VendorBackend
func (*AddVendorBackendReq) Decode ¶ added in v0.3.1
func (avbr *AddVendorBackendReq) Decode(ctx *gin.Context) error
func (*AddVendorBackendReq) Validate ¶ added in v0.3.1
func (avbr *AddVendorBackendReq) Validate() error
type AdminRoomPasswordReq ¶ added in v0.3.0
func (*AdminRoomPasswordReq) Decode ¶ added in v0.3.0
func (aur *AdminRoomPasswordReq) Decode(ctx *gin.Context) error
func (*AdminRoomPasswordReq) Validate ¶ added in v0.3.0
func (aur *AdminRoomPasswordReq) Validate() error
type AdminSettingsReq ¶ added in v0.3.0
func (*AdminSettingsReq) Decode ¶ added in v0.3.0
func (asr *AdminSettingsReq) Decode(ctx *gin.Context) error
func (*AdminSettingsReq) Validate ¶ added in v0.3.0
func (asr *AdminSettingsReq) Validate() error
type AdminSettingsResp ¶ added in v0.3.0
type AdminSettingsResp map[dbModel.SettingGroup]map[string]any
type AdminUserPasswordReq ¶ added in v0.3.0
func (*AdminUserPasswordReq) Decode ¶ added in v0.3.0
func (aur *AdminUserPasswordReq) Decode(ctx *gin.Context) error
func (*AdminUserPasswordReq) Validate ¶ added in v0.3.0
func (aur *AdminUserPasswordReq) Validate() error
type AdminUsernameReq ¶ added in v0.3.0
func (*AdminUsernameReq) Decode ¶ added in v0.3.0
func (aur *AdminUsernameReq) Decode(ctx *gin.Context) error
func (*AdminUsernameReq) Validate ¶ added in v0.3.0
func (aur *AdminUsernameReq) Validate() error
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 { RoomName string `json:"roomName"` Password string `json:"password"` Setting dbModel.RoomSettings `json:"setting"` }
func (*CreateRoomReq) Validate ¶
func (c *CreateRoomReq) Validate() error
type CurrentMovieResp ¶ added in v0.3.0
type EditMovieReq ¶
type EditMovieReq struct { IdReq PushMovieReq }
func (*EditMovieReq) Validate ¶
func (e *EditMovieReq) Validate() error
type FormatEmptyPasswordError ¶ added in v0.3.0
type FormatEmptyPasswordError string
func (FormatEmptyPasswordError) Error ¶ added in v0.3.0
func (f FormatEmptyPasswordError) Error() string
type GetVendorBackendResp ¶ added in v0.3.1
type GetVendorBackendResp struct { Info *dbModel.VendorBackend `json:"info"` Status connectivity.State `json:"status"` }
type IdCanEmptyReq ¶ added in v0.3.0
type IdCanEmptyReq struct {
Id string `json:"id"`
}
func (*IdCanEmptyReq) Decode ¶ added in v0.3.0
func (i *IdCanEmptyReq) Decode(ctx *gin.Context) error
func (*IdCanEmptyReq) Validate ¶ added in v0.3.0
func (i *IdCanEmptyReq) Validate() error
type LoginRoomReq ¶
func (*LoginRoomReq) Validate ¶
func (l *LoginRoomReq) Validate() error
type LoginUserReq ¶ added in v0.3.0
func (*LoginUserReq) Validate ¶ added in v0.3.0
func (l *LoginUserReq) Validate() error
type OAuth2CallbackReq ¶ added in v0.3.0
func (*OAuth2CallbackReq) Decode ¶ added in v0.3.0
func (o *OAuth2CallbackReq) Decode(ctx *gin.Context) error
func (*OAuth2CallbackReq) Validate ¶ added in v0.3.0
func (o *OAuth2CallbackReq) Validate() error
type PushMovieReq ¶
func (*PushMovieReq) Validate ¶
func (p *PushMovieReq) Validate() error
type PushMoviesReq ¶ added in v0.3.0
type PushMoviesReq []*PushMovieReq
func (*PushMoviesReq) Decode ¶ added in v0.3.0
func (p *PushMoviesReq) Decode(ctx *gin.Context) error
func (*PushMoviesReq) Validate ¶ added in v0.3.0
func (p *PushMoviesReq) Validate() error
type RoomListResp ¶
type RoomListResp struct { RoomId string `json:"roomId"` RoomName string `json:"roomName"` PeopleNum int64 `json:"peopleNum"` NeedPassword bool `json:"needPassword"` CreatorID string `json:"creatorId"` Creator string `json:"creator"` CreatedAt int64 `json:"createdAt"` Status model.RoomStatus `json:"status"` }
type RoomUsersResp ¶ added in v0.3.0
type RoomUsersResp struct { UserID string `json:"userId"` Username string `json:"username"` Role dbModel.Role `json:"role"` JoinAt int64 `json:"joinAt"` RoomID string `json:"roomId"` Status dbModel.RoomUserStatus `json:"status"` Permissions dbModel.RoomUserPermission `json:"permissions"` }
type ServerIDReq ¶ added in v0.3.2
type ServerIDReq struct {
ServerID string `json:"serverId"`
}
func (*ServerIDReq) Validate ¶ added in v0.3.2
func (r *ServerIDReq) Validate() error
type SetRoomPasswordReq ¶
type SetRoomPasswordReq struct {
Password string `json:"password"`
}
func (*SetRoomPasswordReq) Validate ¶
func (s *SetRoomPasswordReq) Validate() error
type SetRoomSettingReq ¶ added in v0.3.0
type SetRoomSettingReq dbModel.RoomSettings
func (*SetRoomSettingReq) Decode ¶ added in v0.3.0
func (s *SetRoomSettingReq) Decode(ctx *gin.Context) error
func (*SetRoomSettingReq) Validate ¶ added in v0.3.0
func (s *SetRoomSettingReq) Validate() error
type SetUserPasswordReq ¶
type SetUserPasswordReq struct {
Password string `json:"password"`
}
func (*SetUserPasswordReq) Validate ¶
func (s *SetUserPasswordReq) Validate() error
type SetUsernameReq ¶ added in v0.3.0
type SetUsernameReq struct {
Username string `json:"username"`
}
func (*SetUsernameReq) Decode ¶ added in v0.3.0
func (s *SetUsernameReq) Decode(ctx *gin.Context) error
func (*SetUsernameReq) Validate ¶ added in v0.3.0
func (s *SetUsernameReq) Validate() error
type SwapMovieReq ¶
func (*SwapMovieReq) Validate ¶
func (s *SwapMovieReq) Validate() error
type UserBindProviderResp ¶ added in v0.3.0
type UserBindProviderResp map[provider.OAuth2Provider]struct { ProviderUserID string `json:"providerUserID"` CreatedAt int64 `json:"createdAt"` }
type UserInfoResp ¶ added in v0.3.0
type VendorBackendEndpointsReq ¶ added in v0.3.1
type VendorBackendEndpointsReq struct {
Endpoints []string `json:"endpoints"`
}
func (*VendorBackendEndpointsReq) Decode ¶ added in v0.3.1
func (dvbr *VendorBackendEndpointsReq) Decode(ctx *gin.Context) error
func (*VendorBackendEndpointsReq) Validate ¶ added in v0.3.1
func (dvbr *VendorBackendEndpointsReq) Validate() error
type VendorFSListResp ¶ added in v0.3.1
type VendorMeResp ¶ added in v0.3.1
Click to show internal directories.
Click to hide internal directories.