Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API represents the API server for account linking
func (*API) GetLinkedAccount ¶
func (api *API) GetLinkedAccount(discordID string) (*LinkedAccount, bool)
GetLinkedAccount retrieves a linked account by Discord ID
func (*API) GetLinkedAccountByTelegram ¶
func (api *API) GetLinkedAccountByTelegram(telegramID string) (*LinkedAccount, bool)
GetLinkedAccountByTelegram retrieves a linked account by Telegram ID
type IssueCodeRequest ¶
type IssueCodeRequest struct {
DiscordID string `json:"discord_id"`
TelegramID string `json:"telegram_id,omitempty"` // Optional pre-binding
}
IssueCodeRequest represents the request to issue a linking code
type IssueCodeResponse ¶
type IssueCodeResponse struct {
Success bool `json:"success"`
Code string `json:"code,omitempty"`
Error string `json:"error,omitempty"`
}
IssueCodeResponse represents the response from issuing a code
type LinkCode ¶
type LinkCode struct {
Code string `json:"code"`
DiscordID string `json:"discord_id"`
TelegramID string `json:"telegram_id,omitempty"` // Optional pre-binding
ExpiresAt time.Time `json:"expires_at"`
Used bool `json:"used"`
CreatedAt time.Time `json:"created_at"`
}
LinkCode represents a verification code for linking Discord and Telegram accounts
type LinkedAccount ¶
type LinkedAccount struct {
DiscordID string `json:"discord_id"`
TelegramID string `json:"telegram_id"`
LinkedAt time.Time `json:"linked_at"`
}
LinkedAccount represents a linked Discord-Telegram account
type VerifyCodeRequest ¶
VerifyCodeRequest represents the request to verify a linking code
type VerifyCodeResponse ¶
type VerifyCodeResponse struct {
Success bool `json:"success"`
Message string `json:"message,omitempty"`
Error string `json:"error,omitempty"`
}
VerifyCodeResponse represents the response from verifying a code
Click to show internal directories.
Click to hide internal directories.