Documentation
¶
Index ¶
- func NewContext(next echo.HandlerFunc) echo.HandlerFunc
- type Context
- type PagingOptions
- type Post
- type PostID
- type PostRepository
- type PostWithUser
- type Reaction
- type ReactionID
- type ReactionRepository
- type RelationShipRepository
- type Repost
- type RepostID
- type RepostRepository
- type Timeline
- type TimelineRepository
- type User
- type UserPubKey
- type UserRepository
- type UserSecretKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
func NewContext(next echo.HandlerFunc) echo.HandlerFunc
Types ¶
type Context ¶
type Context struct { echo.Context PubKey *UserPubKey SecretKey *UserSecretKey }
type PagingOptions ¶
type Post ¶
type Post struct { ID PostID UserPubKey UserPubKey Content string CreatedAt time.Time RootPostID *PostID ReplyPostID *PostID MentionedUserPubKeys []UserPubKey }
type PostRepository ¶
type PostRepository interface { // SendPost SendPost(UserPubKey, UserSecretKey, string) error // GetPost GetPost(id PostID) (*Post, error) // GetPosts GetPosts( pks []UserPubKey, options PagingOptions, ) ([]Post, error) // GetPublicPosts GetPublicPosts( options PagingOptions, ) ([]Post, error) // GetUserLatestPosts GetUserLatestPosts( pk UserPubKey, ) ([]Post, error) // GetReplies GetReplies(PostID) ([]Post, error) }
type PostWithUser ¶
type Reaction ¶
type Reaction struct { ID ReactionID UserPubKey UserPubKey Content string CreatedAt time.Time ToPostID PostID ToUserPubKey UserPubKey }
type ReactionID ¶
type ReactionID string
type ReactionRepository ¶
type RelationShipRepository ¶
type RelationShipRepository interface { // GetFollowings GetFollowings(UserPubKey) ([]UserPubKey, error) // GetFollowers GetFollowers(UserPubKey) ([]UserPubKey, error) }
type Repost ¶
type Repost struct { ID RepostID UserPubKey UserPubKey Content string CreatedAt time.Time ToPostID PostID ToUserPubKey UserPubKey }
type RepostRepository ¶
type TimelineRepository ¶
type TimelineRepository interface { // GetTimelines GetTimelines( pks []UserPubKey, options PagingOptions, ) ([]Timeline, error) }
type UserPubKey ¶
type UserPubKey string
UserPubKey User's public key
func ToUserPubKey ¶
func ToUserPubKey(uid string) (*UserPubKey, error)
type UserRepository ¶
type UserRepository interface { // GetUsers GetUsers([]UserPubKey) ([]User, error) }
Click to show internal directories.
Click to hide internal directories.