models

package
v0.0.0-...-ae3587a Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsServiceError

type AwsServiceError struct {
	InstanceId string `json:"instance_id"`
	Error      string `json:"error"`
}

type Face

type Face struct {
	X        int          `json:"x"`
	Y        int          `json:"y"`
	Width    int          `json:"width"`
	Height   int          `json:"height"`
	Encoding [128]float32 `json:"encoding"`
}

Face contains the position of a face in a post and its encoding

type FaceData

type FaceData struct {
	gorm.Model
	PostID   int            `json:"post_id"`
	X        int            `json:"x"`
	Y        int            `json:"y"`
	Width    int            `json:"width"`
	Height   int            `json:"height"`
	Encoding postgres.Jsonb `json:"encoding"`
}

FaceData represents the face encoding table

type FaceRecognitionResult

type FaceRecognitionResult struct {
	PostID int     `json:"post_id"`
	Faces  []*Face `json:"faces"`
}

FaceRecognitionResult is the result of the face recognizer

type FaceReconJob

type FaceReconJob struct {
	PostID           int    `json:"post_id"`
	InternalImageURL string `json:"internal_image_url"`
	X                int    `json:"x"`
	Y                int    `json:"y"`
	Width            int    `json:"width"`
	Height           int    `json:"height"`
}

FaceReconJob represents the data for a face recon job

type Follow

type Follow struct {
	// UID  string `json:"uid,omitempty" gorm:"column:uid"`
	From uint `gorm:"column:from_id"`
	To   uint `gorm:"column:to_id"`
}

Follow is a struct representing the "follows" table in the postgres database

type InstaComment

type InstaComment struct {
	ID            string `json:"id"`
	Text          string `json:"text"`
	CreatedAt     int    `json:"created_at"`
	PostID        string `json:"post_id"`
	ShortCode     string `json:"short_code"`
	OwnerUsername string `json:"owner_username"`
}

InstaComment os a comment on instagram

type InstaLike

type InstaLike struct {
	ID            string `json:"id"`
	PostID        string `json:"post_id"`
	OwnerUsername string `json:"owner_username"`
	AvatarURL     string `json:"avatar_url"`
	RealName      string `json:"real_name"`
}

type InstaPostScrapeError

type InstaPostScrapeError struct {
	PostID string `json:"post_id,omitempty"`
	Error  string `json:"error,omitempty"`
}

InstaPostScrapeError s are written to the error topic of the scraper when even after retries we can't scrape the comments

type InstagramPost

type InstagramPost struct {
	PostID      string   `json:"post_id"`
	ShortCode   string   `json:"short_code"`
	UserName    string   `json:"user_name"`
	UserID      string   `json:"user_id"`
	PictureURL  string   `json:"picture_url"`
	TaggedUsers []string `json:"tagged_users"`
	Caption     string   `json:"caption"`
}

InstagramPost is a Post on instagram

type InstagramScrapeError

type InstagramScrapeError struct {
	Name  string `json:"name,omitempty"`
	Error string `json:"error,omitempty"`
}

InstagramScrapeError s are written to user_scrape_errors when even after retries we can't scrape a user

type PostDownloadJob

type PostDownloadJob struct {
	PostID     int    `json:"post_id"`
	PictureURL string `json:"picture_url"`
}

PostDownloadJob represents a post which should be downloaded

type ScrapeError

type ScrapeError struct {
	Name  string `json:"name,omitempty"`
	Error string `json:"error,omitempty"`
}

ScrapeError s are written to user_scrape_errors when even after retries we can't scrape a user

type User

type User struct {
	gorm.Model
	UID       string  `json:"uid,omitempty"`
	UserName  string  `json:"user_name,omitempty" gorm:"column:user_name"`
	RealName  string  `json:"real_name,omitempty" gorm:"column:real_name"`
	AvatarURL string  `json:"avatar_url,omitempty" gorm:"column:avatar_url"`
	Bio       string  `json:"bio,omitempty" gorm:"column:bio"`
	Follows   []*User `json:"follows,omitempty" gorm:"column:follows"`
	CrawledAt int     `json:"crawled_at,omitempty" gorm:"column:crawl_ts"`
}

User is the struct containing all user fields, used for saving users to the database

type UserFollowInfo

type UserFollowInfo struct {
	gorm.Model
	UserName   string   `json:"user_name" gorm:"column:user_name"`
	RealName   string   `json:"real_name" gorm:"column:real_name"`
	AvatarURL  string   `json:"avatar_url" gorm:"column:avatar_url"`
	Bio        string   `json:"bio" gorm:"column:bio"`
	Followers  []string `json:"followers" gorm:"column:followers"`
	Followings []string `json:"followings" gorm:"column:followings"`
	CrawlTs    int      `json:"crawl_ts" gorm:"column:crawl_ts"`
}

UserFollowInfo holds the follow graph info, only relating userNames

Jump to

Keyboard shortcuts

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