instagram

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *gorm.DB) provider.Provider

Types

type AccountHistoryAction

type AccountHistoryAction string
const (
	AccountHistoryLogin  AccountHistoryAction = "login"
	AccountHistoryLogout AccountHistoryAction = "logout"
)

type AccountHistoryItem

type AccountHistoryItem struct {
	gorm.Model
	Action       AccountHistoryAction `gorm:"uniqueIndex:instagram_account_history_key"`
	CookieName   string               `json:"cookie_name"`
	IPAddress    string               `json:"ip_address" gorm:"uniqueIndex:instagram_account_history_key"`
	LanguageCode string               `json:"language_code"`
	Timestamp    types.DateTime       `json:"timestamp" gorm:"uniqueIndex:instagram_account_history_key"`
	UserAgent    string               `json:"user_agent"`
	DeviceID     *string              `json:"device_id"`
}

func (AccountHistoryItem) TableName

func (AccountHistoryItem) TableName() string

func (*AccountHistoryItem) UnmarshalJSON

func (ah *AccountHistoryItem) UnmarshalJSON(b []byte) error

type Comment

type Comment struct {
	gorm.Model
	Target          CommentTarget `gorm:"uniqueIndex:instagram_comments_key"`
	UserID          int           `gorm:"uniqueIndex:instagram_comments_key"`
	User            User
	Text            string `gorm:"uniqueIndex:instagram_comments_key"`
	UserMentions    []CommentUserMention
	HashtagMentions []CommentHashtagMention
	Timestamp       types.DateTime `gorm:"uniqueIndex:instagram_comments_key"`
}

func (Comment) Conditions

func (c Comment) Conditions() map[string]interface{}

func (Comment) TableName

func (Comment) TableName() string

func (*Comment) UnmarshalJSON

func (c *Comment) UnmarshalJSON(b []byte) error

type CommentHashtagMention

type CommentHashtagMention struct {
	gorm.Model
	CommentID uint `gorm:"uniqueIndex:instagram_comment_hashtag_mentions_key"`
	HashtagID int  `gorm:"uniqueIndex:instagram_comment_hashtag_mentions_key"`
	Hashtag   Hashtag
	FromIdx   int `gorm:"uniqueIndex:instagram_comment_hashtag_mentions_key"`
	ToIdx     int `gorm:"uniqueIndex:instagram_comment_hashtag_mentions_key"`
}

func (CommentHashtagMention) Conditions

func (chm CommentHashtagMention) Conditions() map[string]interface{}

func (CommentHashtagMention) TableName

func (CommentHashtagMention) TableName() string

type CommentTarget

type CommentTarget string
const (
	CommentMedia CommentTarget = "media"
)

type CommentUserMention

type CommentUserMention struct {
	gorm.Model
	CommentID uint `gorm:"uniqueIndex:instagram_comment_user_mentions_key"`
	UserID    int  `gorm:"uniqueIndex:instagram_comment_user_mentions_key"`
	User      User
	FromIdx   int `gorm:"uniqueIndex:instagram_comment_user_mentions_key"`
	ToIdx     int `gorm:"uniqueIndex:instagram_comment_user_mentions_key"`
}

func (CommentUserMention) Conditions

func (cum CommentUserMention) Conditions() map[string]interface{}

func (CommentUserMention) TableName

func (CommentUserMention) TableName() string

type Hashtag

type Hashtag struct {
	gorm.Model
	Text string `gorm:"unique"`
}

func (Hashtag) Conditions

func (h Hashtag) Conditions() map[string]interface{}

func (Hashtag) TableName

func (Hashtag) TableName() string

type HashtagMention

type HashtagMention struct {
	Hashtag string
	FromIdx int
	ToIdx   int
}

type Like

type Like struct {
	gorm.Model
	Target    LikeTarget `gorm:"uniqueIndex:instagram_likes_key"`
	UserID    int        `gorm:"uniqueIndex:instagram_likes_key"`
	User      User
	Timestamp types.DateTime `gorm:"uniqueIndex:instagram_likes_key"`
}

func (Like) TableName

func (Like) TableName() string

func (*Like) UnmarshalJSON

func (l *Like) UnmarshalJSON(b []byte) error

type LikeTarget

type LikeTarget string
const (
	LikeMedia   LikeTarget = "media"
	LikeComment LikeTarget = "comment"
)

type MediaHashtagMention

type MediaHashtagMention struct {
	gorm.Model
	MediaID   uint `gorm:"uniqueIndex:instagram_media_hashtag_mentions_key"`
	HashtagID int  `gorm:"uniqueIndex:instagram_media_hashtag_mentions_key"`
	Hashtag   Hashtag
	FromIdx   int `gorm:"uniqueIndex:instagram_media_hashtag_mentions_key"`
	ToIdx     int `gorm:"uniqueIndex:instagram_media_hashtag_mentions_key"`
}

func (MediaHashtagMention) Conditions

func (mhm MediaHashtagMention) Conditions() map[string]interface{}

func (MediaHashtagMention) TableName

func (MediaHashtagMention) TableName() string

type MediaItem

type MediaItem struct {
	gorm.Model
	Type            MediaType             `gorm:"uniqueIndex:instagram_media_key"`
	Caption         *string               `json:"caption"`
	TakenAt         types.DateTime        `json:"taken_at" gorm:"uniqueIndex:instagram_media_key"`
	Location        *string               `json:"location"`
	Path            string                `json:"path"`
	UserMentions    []MediaUserMention    `gorm:"foreignKey:MediaID"`
	HashtagMentions []MediaHashtagMention `gorm:"foreignKey:MediaID"`
}

func (MediaItem) Conditions

func (mi MediaItem) Conditions() map[string]interface{}

func (MediaItem) TableName

func (MediaItem) TableName() string

func (*MediaItem) UnmarshalJSON

func (mi *MediaItem) UnmarshalJSON(b []byte) error

type MediaType

type MediaType string
const (
	MediaStory MediaType = "story"
	MediaVideo MediaType = "video"
	MediaPhoto MediaType = "photo"
)

type MediaUserMention

type MediaUserMention struct {
	gorm.Model
	MediaID uint `gorm:"uniqueIndex:instagram_media_user_mentions_key"`
	UserID  int  `gorm:"uniqueIndex:instagram_media_user_mentions_key"`
	User    User
	FromIdx int `gorm:"uniqueIndex:instagram_media_user_mentions_key"`
	ToIdx   int `gorm:"uniqueIndex:instagram_media_user_mentions_key"`
}

func (MediaUserMention) Conditions

func (mum MediaUserMention) Conditions() map[string]interface{}

func (MediaUserMention) TableName

func (MediaUserMention) TableName() string

type ProfilePhoto

type ProfilePhoto struct {
	gorm.Model
	TakenAt         types.DateTime `json:"taken_at" gorm:"unique"`
	IsActiveProfile bool           `json:"is_active_profile"`
	Path            string         `json:"path"`
}

func (ProfilePhoto) TableName

func (ProfilePhoto) TableName() string

type RegistrationInfo

type RegistrationInfo struct {
	gorm.Model
	RegistrationUsername    string         `json:"registration_username" gorm:"unique"`
	IPAddress               string         `json:"ip_address"`
	RegistrationTime        types.DateTime `json:"registration_time"`
	RegistrationEmail       string         `json:"registration_email"`
	RegistrationPhoneNumber *string        `json:"registration_phone_number"`
	DeviceName              *string        `json:"device_name"`
}

func (RegistrationInfo) TableName

func (RegistrationInfo) TableName() string

func (*RegistrationInfo) UnmarshalJSON

func (ri *RegistrationInfo) UnmarshalJSON(b []byte) error

type StoriesActivityItem

type StoriesActivityItem struct {
	gorm.Model
	Type      StoriesActivityType `gorm:"uniqueIndex:instagram_stories_activities_key"`
	UserID    int                 `gorm:"uniqueIndex:instagram_stories_activities_key"`
	User      User
	Timestamp types.DateTime `gorm:"uniqueIndex:instagram_stories_activities_key"`
}

func (StoriesActivityItem) TableName

func (StoriesActivityItem) TableName() string

func (*StoriesActivityItem) UnmarshalJSON

func (sai *StoriesActivityItem) UnmarshalJSON(b []byte) error

type StoriesActivityType

type StoriesActivityType string
const (
	StoriesActivityPoll        StoriesActivityType = "poll"
	StoriesActivityEmojiSlider StoriesActivityType = "emoji_slider"
	StoriesActivityQuestion    StoriesActivityType = "question"
	StoriesActivityCountdown   StoriesActivityType = "countdown"
	StoriesActivityQuiz        StoriesActivityType = "quiz"
)

type User

type User struct {
	gorm.Model
	Username string `gorm:"unique"`
}

func (User) Conditions

func (u User) Conditions() map[string]interface{}

func (User) TableName

func (User) TableName() string

type UserMention

type UserMention struct {
	Username string
	FromIdx  int
	ToIdx    int
}

Jump to

Keyboard shortcuts

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