Documentation
¶
Index ¶
Constants ¶
View Source
const ( APIHost = "http://127.0.0.1:10002" UserTokenURL = APIHost + "/auth/user_token" UserRegisterURL = APIHost + "/user/user_register" SecretKey = "openIM123" OperationID = "1646445464564" )
API endpoints and other constants.
Variables ¶
This section is empty.
Functions ¶
func GetUserToken ¶
GetUserToken requests a user token from the API.
func RegisterUser ¶
RegisterUser registers a new user using the API.
Types ¶
type User ¶
type User struct {
UserID string `json:"userID"`
Nickname string `json:"nickname"`
FaceURL string `json:"faceURL"`
}
User represents user data for registration.
type UserRegisterRequest ¶
type UserRegisterRequest struct {
Users []User `json:"users"`
}
UserRegisterRequest represents a request to register a user.
type UserTokenRequest ¶
type UserTokenRequest struct {
Secret string `json:"secret"`
PlatformID int `json:"platformID"`
UserID string `json:"userID"`
}
UserTokenRequest represents a request to get a user token.
type UserTokenResponse ¶
UserTokenResponse represents a response containing a user token.
Click to show internal directories.
Click to hide internal directories.