Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRoomRequest ¶
type Message ¶
type Message struct {
ID string `json:"id"`
Room string `json:"room"`
User string `json:"user"`
Content string `json:"content"`
Timestamp time.Time `json:"timestamp"`
Signature string `json:"signature,omitempty"` // Cryptographic signature (hex-encoded)
Pubkey string `json:"pubkey,omitempty"` // Public key used for signing (hex-encoded)
SignedTimestamp int64 `json:"signed_timestamp,omitempty"` // Unix timestamp that was signed
}
type RegisterUserRequest ¶
type RegisterUserRequest struct {
PublicKey string `json:"public_key" validate:"required"`
}
type Room ¶
type SendMessageRequest ¶
type SendMessageRequest struct {
User string `json:"user" validate:"required"`
Content string `json:"content" validate:"required"`
Signature string `json:"signature" validate:"required"`
Pubkey string `json:"pubkey" validate:"required"`
Timestamp int64 `json:"timestamp" validate:"required"`
RoomPassword string `json:"room_password,omitempty"`
}
type User ¶
type User struct {
PublicKey string `json:"public_key"` // Hex-encoded secp256k1 public key
Verified bool `json:"verified"` // Whether the public key has been verified
CreatedAt time.Time `json:"created_at"` // When the user was registered
UpdatedAt time.Time `json:"updated_at"` // When the user or key was last updated
}
type UserWithPostCount ¶
type UserWithPostCount struct {
PublicKey string `json:"public_key"` // Hex-encoded secp256k1 public key
Verified bool `json:"verified"` // Whether the public key has been verified
CreatedAt time.Time `json:"created_at"` // When the user was registered
UpdatedAt time.Time `json:"updated_at"` // When the user or key was last updated
PostCount int64 `json:"post_count"` // Number of posts by this user
}
type VerifyUserRequest ¶
type VerifyUserRequest struct {
PublicKey string `json:"public_key" validate:"required"`
}
Click to show internal directories.
Click to hide internal directories.