meta

package
v0.0.0-...-fb23aaf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
}

type Comment

type Comment struct {
	ID        CommentID `json:"id"`
	PostID    PostID    `json:"post_id"`
	UserID    UserID    `json:"user_id"`
	Text      string    `json:"text,omitempty"`
	Timestamp string    `json:"timestamp,omitempty"`
}

type CommentID

type CommentID string

type Media

type Media interface {
	GetID() MediaID
	GetType() MediaType
	GetContent() []byte
}

type MediaBase

type MediaBase struct {
	ID   MediaID   `json:"id"`
	Link string    `json:"link"`
	Type MediaType `json:"type"`
}

type MediaID

type MediaID string

type MediaType

type MediaType string
const (
	MediaTypeImage MediaType = "image"
	MediaTypeVideo MediaType = "video"
)

type Meta

type Meta interface {
}

type Post

type Post struct {
	ID        PostID  `json:"id"`
	Text      string  `json:"text"`
	Medias    []Media `json:"media,omitempty"`
	Links     string  `json:"links,omitempty"`
	Location  string  `json:"location,omitempty"`
	Timestamp string  `json:"timestamp,omitempty"`
}

type PostID

type PostID string

type PostMeta

type PostMeta struct {
	Likes  []UserID `json:"likes"`
	Shares []UserID `json:"shares"`
	Tags   []string `json:"tags"`
}

type User

type User struct {
	ID             UserID `json:"id"`
	Username       string `json:"username,omitempty"`
	DisplayName    string `json:"display_name,omitempty"`
	ProfilePic     string `json:"profile_pic,omitempty"`
	FollowersCount int    `json:"followers_count,omitempty"`
	FollowingCount int    `json:"following_count,omitempty"`
	Bio            string `json:"bio,omitempty"`
}

func (*User) Load

func (u *User) Load(data string) error

func (*User) String

func (u *User) String() (string, error)

type UserID

type UserID string

func (*UserID) String

func (u *UserID) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL