package
Version:
v0.4.0
Opens a new window with list of versions in this module.
Published: Jan 3, 2022
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Post struct {
ID uuid.UUID `json:"id"`
Timestamp time.Time `json:"timestamp"`
User User `json:"user"`
Message string `json:"message"`
}
type PostDisplay struct {
ID uuid.UUID `json:"id"`
Timestamp time.Time `json:"timestamp"`
UserID uuid.UUID `json:"user_id"`
UserPreferredName string `json:"user_preferred_name"`
UserFingerprint string `json:"user_fingerprint"`
Message string `json:"message"`
}
type RegisterRequest struct {
Email string `json:"email"`
PublicKey string `json:"public_key"`
Name string `json:"name"`
}
type RegisterResponse struct {
Timestamp string `json:"timestamp"`
Message string `json:"message"`
}
type SendPostRequest struct {
Owner uuid.UUID `json:"owner"`
Message string `json:"message"`
}
type SendPostResponse struct {
Timestamp string `json:"timestamp"`
Message string `json:"message"`
}
type User struct {
ID uuid.UUID `db:"id"`
Email string `db:"email" json:"-"`
PreferredName string `db:"preferred_name"`
PublicKey ssh.PublicKey `db:"public_key"`
CreatedAt time.Time `db:"created_at" json:"-"`
UpdatedAt time.Time `db:"updated_at" json:"-"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.