Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KickUser ¶
KickUser calls the Agora API to ban a user from a channel.
It takes in the app ID, channel name, user ID, ban duration in seconds, and Agora REST API token.
The ban removes the "join_channel" privilege from the user for the specified duration.
Returns any error encountered, or nil if successful.
Types ¶
type ActiveFenceReq ¶
type ReqMetadata ¶
type Service ¶
type Service struct { Server *http.Server Sigint chan os.Signal // contains filtered or unexported fields }
Service is the backend service
func NewService ¶
func NewService() *Service
func (*Service) KickHandler ¶
func (s *Service) KickHandler(w http.ResponseWriter, r *http.Request)
KickHandler handles incoming moderation kick requests from ActiveFence. It parses the request, calls the Agora API to ban the user, and returns the response.
Click to show internal directories.
Click to hide internal directories.