Files
Memoh/internal/bind/types.go
T
BBQ 06e8619a37 refactor(core): migrate channel identity and binding across app
Align channel identity and bind flow across backend and app-facing layers, including generated swagger artifacts and package lock updates while excluding docs content changes.
2026-02-11 14:51:58 +08:00

27 lines
927 B
Go

package bind
import (
"errors"
"time"
)
var (
ErrCodeNotFound = errors.New("bind code not found")
ErrCodeUsed = errors.New("bind code already used")
ErrCodeExpired = errors.New("bind code expired")
ErrCodeMismatch = errors.New("bind code context mismatch")
ErrLinkConflict = errors.New("channel identity user link conflict")
)
// Code represents a one-time bind code for linking channel identity to user.
type Code struct {
ID string `json:"id"`
Platform string `json:"platform,omitempty"`
Token string `json:"token"`
IssuedByUserID string `json:"issued_by_user_id"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
UsedAt time.Time `json:"used_at,omitempty"`
UsedByChannelIdentityID string `json:"used_by_channel_identity_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
}