store_queries

package
v0.0.0-...-1eb5c16 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	Did           string         `json:"did"`
	Handle        string         `json:"handle"`
	DisplayName   sql.NullString `json:"display_name"`
	Bio           sql.NullString `json:"bio"`
	HandleValid   bool           `json:"handle_valid"`
	LastValidated sql.NullTime   `json:"last_validated"`
	ProPicCid     sql.NullString `json:"pro_pic_cid"`
	BannerCid     sql.NullString `json:"banner_cid"`
	CreatedAt     sql.NullTime   `json:"created_at"`
	UpdatedAt     sql.NullTime   `json:"updated_at"`
	InsertedAt    time.Time      `json:"inserted_at"`
}

type AddEventPostParams

type AddEventPostParams struct {
	ID      int64          `json:"id"`
	PostUri sql.NullString `json:"post_uri"`
}

type ApiKey

type ApiKey struct {
	ApiKey       string          `json:"api_key"`
	AuthEntity   json.RawMessage `json:"auth_entity"`
	AssignedUser string          `json:"assigned_user"`
	CreatedAt    time.Time       `json:"created_at"`
	UpdatedAt    time.Time       `json:"updated_at"`
}

type Block

type Block struct {
	ActorDid   string       `json:"actor_did"`
	Rkey       string       `json:"rkey"`
	TargetDid  string       `json:"target_did"`
	CreatedAt  sql.NullTime `json:"created_at"`
	InsertedAt time.Time    `json:"inserted_at"`
}

type Collection

type Collection struct {
	ID   int32  `json:"id"`
	Name string `json:"name"`
}

type ConcludeEventParams

type ConcludeEventParams struct {
	ID          int64                 `json:"id"`
	Results     pqtype.NullRawMessage `json:"results"`
	ConcludedAt sql.NullTime          `json:"concluded_at"`
}

type ConfirmEventParams

type ConfirmEventParams struct {
	ID          int64        `json:"id"`
	WindowStart sql.NullTime `json:"window_start"`
	WindowEnd   sql.NullTime `json:"window_end"`
}

type CountFollowsByActorAndTargetParams

type CountFollowsByActorAndTargetParams struct {
	ActorDid  string `json:"actor_did"`
	TargetDid string `json:"target_did"`
}

type CreateBlockParams

type CreateBlockParams struct {
	ActorDid  string       `json:"actor_did"`
	Rkey      string       `json:"rkey"`
	TargetDid string       `json:"target_did"`
	CreatedAt sql.NullTime `json:"created_at"`
}

type CreateEventParams

type CreateEventParams struct {
	InitiatorDid string       `json:"initiator_did"`
	TargetDid    string       `json:"target_did"`
	EventType    string       `json:"event_type"`
	ExpiredAt    sql.NullTime `json:"expired_at"`
}

type CreateFollowParams

type CreateFollowParams struct {
	ActorDid  string       `json:"actor_did"`
	Rkey      string       `json:"rkey"`
	TargetDid string       `json:"target_did"`
	CreatedAt sql.NullTime `json:"created_at"`
}

type CreateImageParams

type CreateImageParams struct {
	Cid          string         `json:"cid"`
	PostActorDid string         `json:"post_actor_did"`
	PostRkey     string         `json:"post_rkey"`
	AltText      sql.NullString `json:"alt_text"`
	CreatedAt    sql.NullTime   `json:"created_at"`
}

type CreateKeyParams

type CreateKeyParams struct {
	ApiKey       string          `json:"api_key"`
	AuthEntity   json.RawMessage `json:"auth_entity"`
	AssignedUser string          `json:"assigned_user"`
}

type CreateLikeCountParams

type CreateLikeCountParams struct {
	SubjectID        int64        `json:"subject_id"`
	NumLikes         int64        `json:"num_likes"`
	UpdatedAt        time.Time    `json:"updated_at"`
	SubjectCreatedAt sql.NullTime `json:"subject_created_at"`
}

type CreateLikeParams

type CreateLikeParams struct {
	ActorDid        string       `json:"actor_did"`
	Rkey            string       `json:"rkey"`
	CreatedAt       sql.NullTime `json:"created_at"`
	Collection      string       `json:"collection"`
	SubjectActorDid string       `json:"subject_actor_did"`
	SubjectRkey     string       `json:"subject_rkey"`
}

type CreatePointAssignmentParams

type CreatePointAssignmentParams struct {
	EventID  int64  `json:"event_id"`
	ActorDid string `json:"actor_did"`
	Points   int32  `json:"points"`
}

type CreatePostParams

type CreatePostParams struct {
	ActorDid           string                `json:"actor_did"`
	Rkey               string                `json:"rkey"`
	Content            sql.NullString        `json:"content"`
	ParentPostActorDid sql.NullString        `json:"parent_post_actor_did"`
	ParentPostRkey     sql.NullString        `json:"parent_post_rkey"`
	QuotePostActorDid  sql.NullString        `json:"quote_post_actor_did"`
	QuotePostRkey      sql.NullString        `json:"quote_post_rkey"`
	RootPostActorDid   sql.NullString        `json:"root_post_actor_did"`
	RootPostRkey       sql.NullString        `json:"root_post_rkey"`
	HasEmbeddedMedia   bool                  `json:"has_embedded_media"`
	Facets             pqtype.NullRawMessage `json:"facets"`
	Embed              pqtype.NullRawMessage `json:"embed"`
	Langs              []string              `json:"langs"`
	Tags               []string              `json:"tags"`
	SubjectID          sql.NullInt64         `json:"subject_id"`
	CreatedAt          sql.NullTime          `json:"created_at"`
	InsertedAt         time.Time             `json:"inserted_at"`
}

type CreateRecentPostParams

type CreateRecentPostParams struct {
	ActorDid           string                `json:"actor_did"`
	Rkey               string                `json:"rkey"`
	Content            sql.NullString        `json:"content"`
	ParentPostActorDid sql.NullString        `json:"parent_post_actor_did"`
	ParentPostRkey     sql.NullString        `json:"parent_post_rkey"`
	QuotePostActorDid  sql.NullString        `json:"quote_post_actor_did"`
	QuotePostRkey      sql.NullString        `json:"quote_post_rkey"`
	RootPostActorDid   sql.NullString        `json:"root_post_actor_did"`
	RootPostRkey       sql.NullString        `json:"root_post_rkey"`
	HasEmbeddedMedia   bool                  `json:"has_embedded_media"`
	Facets             pqtype.NullRawMessage `json:"facets"`
	Embed              pqtype.NullRawMessage `json:"embed"`
	Langs              []string              `json:"langs"`
	Tags               []string              `json:"tags"`
	SubjectID          sql.NullInt64         `json:"subject_id"`
	CreatedAt          sql.NullTime          `json:"created_at"`
}

type CreateRepoBackfillRecordParams

type CreateRepoBackfillRecordParams struct {
	Repo         string    `json:"repo"`
	LastBackfill time.Time `json:"last_backfill"`
	SeqStarted   int64     `json:"seq_started"`
	State        string    `json:"state"`
}

type CreateRepostParams

type CreateRepostParams struct {
	ActorDid        string       `json:"actor_did"`
	Rkey            string       `json:"rkey"`
	CreatedAt       sql.NullTime `json:"created_at"`
	Collection      string       `json:"collection"`
	SubjectActorDid string       `json:"subject_actor_did"`
	SubjectRkey     string       `json:"subject_rkey"`
}

type CreateSentimentJobParams

type CreateSentimentJobParams struct {
	ActorDid  string    `json:"actor_did"`
	Rkey      string    `json:"rkey"`
	CreatedAt time.Time `json:"created_at"`
}

type CreateSubjectParams

type CreateSubjectParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
	Col      int32  `json:"col"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DailySummary

type DailySummary struct {
	Date                    time.Time `json:"date"`
	LikesPerDay             int64     `json:"Likes per Day"`
	DailyActiveLikers       int64     `json:"Daily Active Likers"`
	DailyActivePosters      int64     `json:"Daily Active Posters"`
	PostsPerDay             int64     `json:"Posts per Day"`
	PostsWithImagesPerDay   int64     `json:"Posts with Images per Day"`
	ImagesPerDay            int64     `json:"Images per Day"`
	ImagesWithAltTextPerDay int64     `json:"Images with Alt Text per Day"`
	FirstTimePosters        int64     `json:"First Time Posters"`
	FollowsPerDay           int64     `json:"Follows per Day"`
	DailyActiveFollowers    int64     `json:"Daily Active Followers"`
	BlocksPerDay            int64     `json:"Blocks per Day"`
	DailyActiveBlockers     int64     `json:"Daily Active Blockers"`
}

type DecrementFollowerCountByNParams

type DecrementFollowerCountByNParams struct {
	ActorDid     string    `json:"actor_did"`
	UpdatedAt    time.Time `json:"updated_at"`
	NumFollowers int32     `json:"num_followers"`
}

type DecrementFollowingCountByNParams

type DecrementFollowingCountByNParams struct {
	ActorDid     string    `json:"actor_did"`
	UpdatedAt    time.Time `json:"updated_at"`
	NumFollowing int32     `json:"num_following"`
}

type DecrementLikeCountByNParams

type DecrementLikeCountByNParams struct {
	ActorDid   string `json:"actor_did"`
	Rkey       string `json:"rkey"`
	NumLikes   int32  `json:"num_likes"`
	Collection string `json:"collection"`
}

type DecrementRepostCountByNParams

type DecrementRepostCountByNParams struct {
	ActorDid   string `json:"actor_did"`
	Rkey       string `json:"rkey"`
	NumReposts int32  `json:"num_reposts"`
	Collection string `json:"collection"`
}

type DeleteBlockParams

type DeleteBlockParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type DeleteFollowParams

type DeleteFollowParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type DeleteImageParams

type DeleteImageParams struct {
	PostActorDid string `json:"post_actor_did"`
	PostRkey     string `json:"post_rkey"`
	Cid          string `json:"cid"`
}

type DeleteImagesForPostParams

type DeleteImagesForPostParams struct {
	PostActorDid string `json:"post_actor_did"`
	PostRkey     string `json:"post_rkey"`
}

type DeleteLikeCountParams

type DeleteLikeCountParams struct {
	ActorDid   string `json:"actor_did"`
	Rkey       string `json:"rkey"`
	Collection string `json:"collection"`
}

type DeleteLikeParams

type DeleteLikeParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type DeletePointAssignmentParams

type DeletePointAssignmentParams struct {
	EventID  int64  `json:"event_id"`
	ActorDid string `json:"actor_did"`
}

type DeletePostParams

type DeletePostParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type DeleteRecentPostParams

type DeleteRecentPostParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type DeleteRepostCountParams

type DeleteRepostCountParams struct {
	ActorDid   string `json:"actor_did"`
	Rkey       string `json:"rkey"`
	Collection string `json:"collection"`
}

type DeleteRepostParams

type DeleteRepostParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type DeleteSentimentJobParams

type DeleteSentimentJobParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type DeleteSubjectParams

type DeleteSubjectParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
	Col      int32  `json:"col"`
}

type Event

type Event struct {
	ID           int64                 `json:"id"`
	InitiatorDid string                `json:"initiator_did"`
	TargetDid    string                `json:"target_did"`
	EventType    string                `json:"event_type"`
	PostUri      sql.NullString        `json:"post_uri"`
	CreatedAt    time.Time             `json:"created_at"`
	UpdatedAt    time.Time             `json:"updated_at"`
	ExpiredAt    sql.NullTime          `json:"expired_at"`
	ConcludedAt  sql.NullTime          `json:"concluded_at"`
	WindowStart  sql.NullTime          `json:"window_start"`
	WindowEnd    sql.NullTime          `json:"window_end"`
	Results      pqtype.NullRawMessage `json:"results"`
}

type FindPotentialFriendsParams

type FindPotentialFriendsParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
}

type FindPotentialFriendsRow

type FindPotentialFriendsRow struct {
	ActorDid     string `json:"actor_did"`
	OverlapCount int64  `json:"overlap_count"`
}

type Follow

type Follow struct {
	ActorDid   string       `json:"actor_did"`
	Rkey       string       `json:"rkey"`
	TargetDid  string       `json:"target_did"`
	CreatedAt  sql.NullTime `json:"created_at"`
	InsertedAt time.Time    `json:"inserted_at"`
}

type FollowerCount

type FollowerCount struct {
	ActorDid     string    `json:"actor_did"`
	NumFollowers int64     `json:"num_followers"`
	UpdatedAt    time.Time `json:"updated_at"`
}

type FollowerStat

type FollowerStat struct {
	P25   float64 `json:"p25"`
	P50   float64 `json:"p50"`
	P75   float64 `json:"p75"`
	P90   float64 `json:"p90"`
	P95   float64 `json:"p95"`
	P99   float64 `json:"p99"`
	P995  float64 `json:"p99_5"`
	P997  float64 `json:"p99_7"`
	P999  float64 `json:"p99_9"`
	P9999 float64 `json:"p99_99"`
}

type FollowingCount

type FollowingCount struct {
	ActorDid     string    `json:"actor_did"`
	NumFollowing int64     `json:"num_following"`
	UpdatedAt    time.Time `json:"updated_at"`
}

type GetActiveEventsForInitiatorParams

type GetActiveEventsForInitiatorParams struct {
	InitiatorDid string `json:"initiator_did"`
	EventType    string `json:"event_type"`
	Limit        int32  `json:"limit"`
	Offset       int32  `json:"offset"`
}

type GetActiveEventsForTargetParams

type GetActiveEventsForTargetParams struct {
	TargetDid string `json:"target_did"`
	EventType string `json:"event_type"`
	Limit     int32  `json:"limit"`
	Offset    int32  `json:"offset"`
}

type GetActorTypeAheadParams

type GetActorTypeAheadParams struct {
	Limit    int32  `json:"limit"`
	Query    string `json:"query"`
	ActorDid string `json:"actor_did"`
}

type GetActorTypeAheadRow

type GetActorTypeAheadRow struct {
	Did       string       `json:"did"`
	Handle    string       `json:"handle"`
	CreatedAt sql.NullTime `json:"created_at"`
	Score     float64      `json:"score"`
}

type GetActorsForValidationParams

type GetActorsForValidationParams struct {
	LastValidated sql.NullTime `json:"last_validated"`
	Limit         int32        `json:"limit"`
}

type GetBlockParams

type GetBlockParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type GetBlocksByActorAndTargetParams

type GetBlocksByActorAndTargetParams struct {
	ActorDid  string `json:"actor_did"`
	TargetDid string `json:"target_did"`
	Limit     int32  `json:"limit"`
}

type GetBlocksByActorParams

type GetBlocksByActorParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
}

type GetBlocksByTargetParams

type GetBlocksByTargetParams struct {
	TargetDid string `json:"target_did"`
	Limit     int32  `json:"limit"`
}

type GetCleanupJobsByRepoParams

type GetCleanupJobsByRepoParams struct {
	Repo  string `json:"repo"`
	Limit int32  `json:"limit"`
}

type GetCleanupStatsRow

type GetCleanupStatsRow struct {
	TotalNumDeleted int64 `json:"total_num_deleted"`
	NumJobs         int64 `json:"num_jobs"`
	NumRepos        int64 `json:"num_repos"`
}

type GetEventsForInitiatorParams

type GetEventsForInitiatorParams struct {
	InitiatorDid string `json:"initiator_did"`
	Limit        int32  `json:"limit"`
	Offset       int32  `json:"offset"`
}

type GetEventsForTargetParams

type GetEventsForTargetParams struct {
	TargetDid string `json:"target_did"`
	Limit     int32  `json:"limit"`
	Offset    int32  `json:"offset"`
}

type GetEventsToConcludeParams

type GetEventsToConcludeParams struct {
	EventType string `json:"event_type"`
	Limit     int32  `json:"limit"`
	Offset    int32  `json:"offset"`
}

type GetFollowPageParams

type GetFollowPageParams struct {
	InsertedAt time.Time `json:"inserted_at"`
	Limit      int32     `json:"limit"`
}

type GetFollowParams

type GetFollowParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type GetFollowsByActorAndTargetParams

type GetFollowsByActorAndTargetParams struct {
	ActorDid  string `json:"actor_did"`
	TargetDid string `json:"target_did"`
	Limit     int32  `json:"limit"`
}

type GetFollowsByActorParams

type GetFollowsByActorParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
}

type GetFollowsByTargetParams

type GetFollowsByTargetParams struct {
	TargetDid string `json:"target_did"`
	Limit     int32  `json:"limit"`
}

type GetHotPageParams

type GetHotPageParams struct {
	Limit int32           `json:"limit"`
	Score sql.NullFloat64 `json:"score"`
}

type GetHotPageRow

type GetHotPageRow struct {
	SubjectID        int64          `json:"subject_id"`
	ActorDid         string         `json:"actor_did"`
	Rkey             string         `json:"rkey"`
	SubjectCreatedAt sql.NullTime   `json:"subject_created_at"`
	InsertedAt       time.Time      `json:"inserted_at"`
	Langs            []string       `json:"langs"`
	HasEmbeddedMedia bool           `json:"has_embedded_media"`
	Score            float64        `json:"score"`
	ActorDid_2       sql.NullString `json:"actor_did_2"`
	NumFollowing     sql.NullInt64  `json:"num_following"`
	UpdatedAt        sql.NullTime   `json:"updated_at"`
}

type GetImageParams

type GetImageParams struct {
	PostActorDid string `json:"post_actor_did"`
	PostRkey     string `json:"post_rkey"`
	Cid          string `json:"cid"`
}

type GetImagesForPostParams

type GetImagesForPostParams struct {
	PostActorDid string `json:"post_actor_did"`
	PostRkey     string `json:"post_rkey"`
	Limit        int32  `json:"limit"`
}

type GetLikeCountParams

type GetLikeCountParams struct {
	ActorDid   string `json:"actor_did"`
	Rkey       string `json:"rkey"`
	Collection string `json:"collection"`
}

type GetLikeParams

type GetLikeParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type GetLikeRow

type GetLikeRow struct {
	ActorDid         string       `json:"actor_did"`
	Rkey             string       `json:"rkey"`
	Subj             int64        `json:"subj"`
	CreatedAt        sql.NullTime `json:"created_at"`
	InsertedAt       time.Time    `json:"inserted_at"`
	SubjectActorDid  string       `json:"subject_actor_did"`
	SubjectNamespace string       `json:"subject_namespace"`
	SubjectRkey      string       `json:"subject_rkey"`
}

type GetLikesByActorParams

type GetLikesByActorParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
	Offset   int32  `json:"offset"`
}

type GetLikesByActorRow

type GetLikesByActorRow struct {
	ActorDid         string       `json:"actor_did"`
	Rkey             string       `json:"rkey"`
	Subj             int64        `json:"subj"`
	CreatedAt        sql.NullTime `json:"created_at"`
	InsertedAt       time.Time    `json:"inserted_at"`
	SubjectActorDid  string       `json:"subject_actor_did"`
	SubjectNamespace string       `json:"subject_namespace"`
	SubjectRkey      string       `json:"subject_rkey"`
}

type GetLikesBySubjectParams

type GetLikesBySubjectParams struct {
	ActorDid string `json:"actor_did"`
	Name     string `json:"name"`
	Rkey     string `json:"rkey"`
	Limit    int32  `json:"limit"`
	Offset   int32  `json:"offset"`
}

type GetLikesBySubjectRow

type GetLikesBySubjectRow struct {
	ActorDid         string       `json:"actor_did"`
	Rkey             string       `json:"rkey"`
	Subj             int64        `json:"subj"`
	CreatedAt        sql.NullTime `json:"created_at"`
	InsertedAt       time.Time    `json:"inserted_at"`
	SubjectActorDid  string       `json:"subject_actor_did"`
	SubjectNamespace string       `json:"subject_namespace"`
	SubjectRkey      string       `json:"subject_rkey"`
}

type GetLikesGivenByActorFromToParams

type GetLikesGivenByActorFromToParams struct {
	ActorDid string       `json:"actor_did"`
	From     sql.NullTime `json:"from"`
	To       sql.NullTime `json:"to"`
}

type GetLikesReceivedByActorFromActorParams

type GetLikesReceivedByActorFromActorParams struct {
	To   string `json:"to"`
	From string `json:"from"`
}

type GetMyPostsByFuzzyContentParams

type GetMyPostsByFuzzyContentParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
	Offset   int32  `json:"offset"`
	Query    string `json:"query"`
}

type GetPinnedPostsByActorParams

type GetPinnedPostsByActorParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
	Offset   int32  `json:"offset"`
}

type GetPointAssignmentParams

type GetPointAssignmentParams struct {
	EventID  int64  `json:"event_id"`
	ActorDid string `json:"actor_did"`
}

type GetPointAssignmentsForActorParams

type GetPointAssignmentsForActorParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
	Offset   int32  `json:"offset"`
}

type GetPointAssignmentsForEventParams

type GetPointAssignmentsForEventParams struct {
	EventID int64 `json:"event_id"`
	Limit   int32 `json:"limit"`
	Offset  int32 `json:"offset"`
}

type GetPopularRecentPostsByLanguageParams

type GetPopularRecentPostsByLanguageParams struct {
	MinFollowers    int64     `json:"min_followers"`
	Lang            string    `json:"lang"`
	CursorCreatedAt time.Time `json:"cursor_created_at"`
	CursorActorDid  string    `json:"cursor_actor_did"`
	CursorRkey      string    `json:"cursor_rkey"`
	Limit           int32     `json:"limit"`
}

type GetPopularRecentPostsByLanguageRow

type GetPopularRecentPostsByLanguageRow struct {
	ActorDid           string                `json:"actor_did"`
	Rkey               string                `json:"rkey"`
	Content            sql.NullString        `json:"content"`
	ParentPostActorDid sql.NullString        `json:"parent_post_actor_did"`
	QuotePostActorDid  sql.NullString        `json:"quote_post_actor_did"`
	QuotePostRkey      sql.NullString        `json:"quote_post_rkey"`
	ParentPostRkey     sql.NullString        `json:"parent_post_rkey"`
	RootPostActorDid   sql.NullString        `json:"root_post_actor_did"`
	RootPostRkey       sql.NullString        `json:"root_post_rkey"`
	Facets             pqtype.NullRawMessage `json:"facets"`
	Embed              pqtype.NullRawMessage `json:"embed"`
	Langs              []string              `json:"langs"`
	Tags               []string              `json:"tags"`
	SubjectID          sql.NullInt64         `json:"subject_id"`
	HasEmbeddedMedia   bool                  `json:"has_embedded_media"`
	CreatedAt          sql.NullTime          `json:"created_at"`
	InsertedAt         time.Time             `json:"inserted_at"`
	ActorDid_2         string                `json:"actor_did_2"`
	NumFollowers       int64                 `json:"num_followers"`
	UpdatedAt          time.Time             `json:"updated_at"`
}

type GetPostParams

type GetPostParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type GetPostWithRepliesParams

type GetPostWithRepliesParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type GetPostWithRepliesRow

type GetPostWithRepliesRow struct {
	ActorDid           string                `json:"actor_did"`
	Rkey               string                `json:"rkey"`
	Content            sql.NullString        `json:"content"`
	ParentPostActorDid sql.NullString        `json:"parent_post_actor_did"`
	QuotePostActorDid  sql.NullString        `json:"quote_post_actor_did"`
	QuotePostRkey      sql.NullString        `json:"quote_post_rkey"`
	ParentPostRkey     sql.NullString        `json:"parent_post_rkey"`
	RootPostActorDid   sql.NullString        `json:"root_post_actor_did"`
	RootPostRkey       sql.NullString        `json:"root_post_rkey"`
	Facets             pqtype.NullRawMessage `json:"facets"`
	Embed              pqtype.NullRawMessage `json:"embed"`
	Langs              []string              `json:"langs"`
	Tags               []string              `json:"tags"`
	SubjectID          sql.NullInt64         `json:"subject_id"`
	HasEmbeddedMedia   bool                  `json:"has_embedded_media"`
	CreatedAt          sql.NullTime          `json:"created_at"`
	InsertedAt         time.Time             `json:"inserted_at"`
	Handle             sql.NullString        `json:"handle"`
	ProPicCid          sql.NullString        `json:"pro_pic_cid"`
	ImageCids          []string              `json:"image_cids"`
	ImageAlts          []string              `json:"image_alts"`
	LikeCount          sql.NullInt64         `json:"like_count"`
}

type GetPostWithSentimentParams

type GetPostWithSentimentParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type GetPostWithSentimentRow

type GetPostWithSentimentRow struct {
	ActorDid           string                `json:"actor_did"`
	Rkey               string                `json:"rkey"`
	Content            sql.NullString        `json:"content"`
	ParentPostActorDid sql.NullString        `json:"parent_post_actor_did"`
	QuotePostActorDid  sql.NullString        `json:"quote_post_actor_did"`
	QuotePostRkey      sql.NullString        `json:"quote_post_rkey"`
	ParentPostRkey     sql.NullString        `json:"parent_post_rkey"`
	RootPostActorDid   sql.NullString        `json:"root_post_actor_did"`
	RootPostRkey       sql.NullString        `json:"root_post_rkey"`
	Facets             pqtype.NullRawMessage `json:"facets"`
	Embed              pqtype.NullRawMessage `json:"embed"`
	Langs              []string              `json:"langs"`
	Tags               []string              `json:"tags"`
	SubjectID          sql.NullInt64         `json:"subject_id"`
	HasEmbeddedMedia   bool                  `json:"has_embedded_media"`
	CreatedAt          sql.NullTime          `json:"created_at"`
	InsertedAt         time.Time             `json:"inserted_at"`
	Sentiment          sql.NullString        `json:"sentiment"`
	Confidence         sql.NullFloat64       `json:"confidence"`
	ProcessedAt        sql.NullTime          `json:"processed_at"`
}

type GetPostsByActorParams

type GetPostsByActorParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
}

type GetPostsByActorsFollowingTargetParams

type GetPostsByActorsFollowingTargetParams struct {
	TargetDid       string    `json:"target_did"`
	Limit           int32     `json:"limit"`
	CursorCreatedAt time.Time `json:"cursor_created_at"`
	CursorActorDid  string    `json:"cursor_actor_did"`
	CursorRkey      string    `json:"cursor_rkey"`
}

type GetPostsFromNonMootsParams

type GetPostsFromNonMootsParams struct {
	ActorDid        string    `json:"actor_did"`
	Limit           int32     `json:"limit"`
	CursorCreatedAt time.Time `json:"cursor_created_at"`
	CursorActorDid  string    `json:"cursor_actor_did"`
	CursorRkey      string    `json:"cursor_rkey"`
}

type GetPostsFromNonSpamUsersParams

type GetPostsFromNonSpamUsersParams struct {
	Limit           int32     `json:"limit"`
	CursorCreatedAt time.Time `json:"cursor_created_at"`
	CursorActorDid  string    `json:"cursor_actor_did"`
	CursorRkey      string    `json:"cursor_rkey"`
	Dids            []string  `json:"dids"`
}

type GetRecentPostParams

type GetRecentPostParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type GetRecentPostsByActorParams

type GetRecentPostsByActorParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
}

type GetRecentPostsByActorsFollowingTargetParams

type GetRecentPostsByActorsFollowingTargetParams struct {
	TargetDid       string    `json:"target_did"`
	Limit           int32     `json:"limit"`
	CursorCreatedAt time.Time `json:"cursor_created_at"`
	CursorActorDid  string    `json:"cursor_actor_did"`
	CursorRkey      string    `json:"cursor_rkey"`
}

type GetRecentPostsFromNonMootsParams

type GetRecentPostsFromNonMootsParams struct {
	ActorDid        string    `json:"actor_did"`
	Limit           int32     `json:"limit"`
	CursorCreatedAt time.Time `json:"cursor_created_at"`
	CursorActorDid  string    `json:"cursor_actor_did"`
	CursorRkey      string    `json:"cursor_rkey"`
}

type GetRecentPostsFromNonSpamUsersParams

type GetRecentPostsFromNonSpamUsersParams struct {
	Limit           int32     `json:"limit"`
	CursorCreatedAt time.Time `json:"cursor_created_at"`
	CursorActorDid  string    `json:"cursor_actor_did"`
	CursorRkey      string    `json:"cursor_rkey"`
	Dids            []string  `json:"dids"`
}

type GetRecentPostsPageByInsertedAtParams

type GetRecentPostsPageByInsertedAtParams struct {
	InsertedAt time.Time `json:"inserted_at"`
	Limit      int32     `json:"limit"`
}

type GetRepoBackfillRecordsParams

type GetRepoBackfillRecordsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type GetRepostCountParams

type GetRepostCountParams struct {
	ActorDid   string `json:"actor_did"`
	Rkey       string `json:"rkey"`
	Collection string `json:"collection"`
}

type GetRepostParams

type GetRepostParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type GetRepostRow

type GetRepostRow struct {
	ActorDid         string       `json:"actor_did"`
	Rkey             string       `json:"rkey"`
	Subj             int64        `json:"subj"`
	CreatedAt        sql.NullTime `json:"created_at"`
	InsertedAt       time.Time    `json:"inserted_at"`
	SubjectActorDid  string       `json:"subject_actor_did"`
	SubjectNamespace string       `json:"subject_namespace"`
	SubjectRkey      string       `json:"subject_rkey"`
}

type GetRepostsByActorParams

type GetRepostsByActorParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
	Offset   int32  `json:"offset"`
}

type GetRepostsByActorRow

type GetRepostsByActorRow struct {
	ActorDid         string       `json:"actor_did"`
	Rkey             string       `json:"rkey"`
	Subj             int64        `json:"subj"`
	CreatedAt        sql.NullTime `json:"created_at"`
	InsertedAt       time.Time    `json:"inserted_at"`
	SubjectActorDid  string       `json:"subject_actor_did"`
	SubjectNamespace string       `json:"subject_namespace"`
	SubjectRkey      string       `json:"subject_rkey"`
}

type GetRepostsBySubjectParams

type GetRepostsBySubjectParams struct {
	ActorDid string `json:"actor_did"`
	Name     string `json:"name"`
	Rkey     string `json:"rkey"`
	Limit    int32  `json:"limit"`
	Offset   int32  `json:"offset"`
}

type GetRepostsBySubjectRow

type GetRepostsBySubjectRow struct {
	ActorDid         string       `json:"actor_did"`
	Rkey             string       `json:"rkey"`
	Subj             int64        `json:"subj"`
	CreatedAt        sql.NullTime `json:"created_at"`
	InsertedAt       time.Time    `json:"inserted_at"`
	SubjectActorDid  string       `json:"subject_actor_did"`
	SubjectNamespace string       `json:"subject_namespace"`
	SubjectRkey      string       `json:"subject_rkey"`
}

type GetSentimentForPostParams

type GetSentimentForPostParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
}

type GetSubjectParams

type GetSubjectParams struct {
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
	Col      int32  `json:"col"`
}

type GetTopPostsForActorParams

type GetTopPostsForActorParams struct {
	ActorDid string `json:"actor_did"`
	Limit    int32  `json:"limit"`
	Offset   int32  `json:"offset"`
}

type GetTopPostsParams

type GetTopPostsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type GetTopUsersByPointsRow

type GetTopUsersByPointsRow struct {
	ActorDid    string `json:"actor_did"`
	TotalPoints int64  `json:"total_points"`
}

type GetUnconfirmedEventParams

type GetUnconfirmedEventParams struct {
	PostUri   sql.NullString `json:"post_uri"`
	TargetDid string         `json:"target_did"`
}

type Image

type Image struct {
	Cid          string         `json:"cid"`
	PostActorDid string         `json:"post_actor_did"`
	PostRkey     string         `json:"post_rkey"`
	AltText      sql.NullString `json:"alt_text"`
	CreatedAt    sql.NullTime   `json:"created_at"`
	InsertedAt   time.Time      `json:"inserted_at"`
}

type IncrementFollowerCountByNParams

type IncrementFollowerCountByNParams struct {
	ActorDid     string    `json:"actor_did"`
	UpdatedAt    time.Time `json:"updated_at"`
	NumFollowers int32     `json:"num_followers"`
}

type IncrementFollowingCountByNParams

type IncrementFollowingCountByNParams struct {
	ActorDid     string    `json:"actor_did"`
	UpdatedAt    time.Time `json:"updated_at"`
	NumFollowing int32     `json:"num_following"`
}

type IncrementLikeCountByNParams

type IncrementLikeCountByNParams struct {
	ActorDid   string `json:"actor_did"`
	Rkey       string `json:"rkey"`
	NumLikes   int64  `json:"num_likes"`
	Collection string `json:"collection"`
}

type IncrementLikeCountByNWithSubjectParams

type IncrementLikeCountByNWithSubjectParams struct {
	SubjectID int64 `json:"subject_id"`
	NumLikes  int64 `json:"num_likes"`
}

type IncrementRepostCountByNParams

type IncrementRepostCountByNParams struct {
	ActorDid   string `json:"actor_did"`
	Rkey       string `json:"rkey"`
	NumReposts int64  `json:"num_reposts"`
	Collection string `json:"collection"`
}

type InsertLikeParams

type InsertLikeParams struct {
	ActorDid  string       `json:"actor_did"`
	Rkey      string       `json:"rkey"`
	Subj      int64        `json:"subj"`
	CreatedAt sql.NullTime `json:"created_at"`
}

type Like

type Like struct {
	ActorDid   string       `json:"actor_did"`
	Rkey       string       `json:"rkey"`
	Subj       int64        `json:"subj"`
	CreatedAt  sql.NullTime `json:"created_at"`
	InsertedAt time.Time    `json:"inserted_at"`
}

type LikeCount

type LikeCount struct {
	SubjectID        int64        `json:"subject_id"`
	NumLikes         int64        `json:"num_likes"`
	UpdatedAt        time.Time    `json:"updated_at"`
	SubjectCreatedAt sql.NullTime `json:"subject_created_at"`
}

type PointAssignment

type PointAssignment struct {
	ID        int64     `json:"id"`
	EventID   int64     `json:"event_id"`
	ActorDid  string    `json:"actor_did"`
	Points    int32     `json:"points"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Post

type Post struct {
	ActorDid           string                `json:"actor_did"`
	Rkey               string                `json:"rkey"`
	Content            sql.NullString        `json:"content"`
	ParentPostActorDid sql.NullString        `json:"parent_post_actor_did"`
	QuotePostActorDid  sql.NullString        `json:"quote_post_actor_did"`
	QuotePostRkey      sql.NullString        `json:"quote_post_rkey"`
	ParentPostRkey     sql.NullString        `json:"parent_post_rkey"`
	RootPostActorDid   sql.NullString        `json:"root_post_actor_did"`
	RootPostRkey       sql.NullString        `json:"root_post_rkey"`
	Facets             pqtype.NullRawMessage `json:"facets"`
	Embed              pqtype.NullRawMessage `json:"embed"`
	Langs              []string              `json:"langs"`
	Tags               []string              `json:"tags"`
	SubjectID          sql.NullInt64         `json:"subject_id"`
	HasEmbeddedMedia   bool                  `json:"has_embedded_media"`
	CreatedAt          sql.NullTime          `json:"created_at"`
	InsertedAt         time.Time             `json:"inserted_at"`
}

type PostSentiment

type PostSentiment struct {
	ActorDid      string          `json:"actor_did"`
	Rkey          string          `json:"rkey"`
	InsertedAt    time.Time       `json:"inserted_at"`
	CreatedAt     time.Time       `json:"created_at"`
	ProcessedAt   sql.NullTime    `json:"processed_at"`
	Sentiment     sql.NullString  `json:"sentiment"`
	Confidence    sql.NullFloat64 `json:"confidence"`
	DetectedLangs []string        `json:"detected_langs"`
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) AddEventPost

func (q *Queries) AddEventPost(ctx context.Context, arg AddEventPostParams) error

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) ConcludeEvent

func (q *Queries) ConcludeEvent(ctx context.Context, arg ConcludeEventParams) error

func (*Queries) ConfirmEvent

func (q *Queries) ConfirmEvent(ctx context.Context, arg ConfirmEventParams) error

func (*Queries) CountBlockersByTarget

func (q *Queries) CountBlockersByTarget(ctx context.Context, targetDid string) (int64, error)

func (*Queries) CountBlocksByActor

func (q *Queries) CountBlocksByActor(ctx context.Context, actorDid string) (int64, error)

func (*Queries) CountFollowersByTarget

func (q *Queries) CountFollowersByTarget(ctx context.Context, targetDid string) (int64, error)

func (*Queries) CountFollowsByActor

func (q *Queries) CountFollowsByActor(ctx context.Context, actorDid string) (int64, error)

func (*Queries) CountFollowsByActorAndTarget

func (q *Queries) CountFollowsByActorAndTarget(ctx context.Context, arg CountFollowsByActorAndTargetParams) (int64, error)

func (*Queries) CreateBlock

func (q *Queries) CreateBlock(ctx context.Context, arg CreateBlockParams) error

func (*Queries) CreateCollection

func (q *Queries) CreateCollection(ctx context.Context, name string) (Collection, error)

func (*Queries) CreateEvent

func (q *Queries) CreateEvent(ctx context.Context, arg CreateEventParams) (int64, error)

func (*Queries) CreateFollow

func (q *Queries) CreateFollow(ctx context.Context, arg CreateFollowParams) error

func (*Queries) CreateImage

func (q *Queries) CreateImage(ctx context.Context, arg CreateImageParams) error

func (*Queries) CreateKey

func (q *Queries) CreateKey(ctx context.Context, arg CreateKeyParams) error

func (*Queries) CreateLike

func (q *Queries) CreateLike(ctx context.Context, arg CreateLikeParams) error

func (*Queries) CreateLikeCount

func (q *Queries) CreateLikeCount(ctx context.Context, arg CreateLikeCountParams) error

func (*Queries) CreatePointAssignment

func (q *Queries) CreatePointAssignment(ctx context.Context, arg CreatePointAssignmentParams) error

func (*Queries) CreatePost

func (q *Queries) CreatePost(ctx context.Context, arg CreatePostParams) error

func (*Queries) CreateRecentPost

func (q *Queries) CreateRecentPost(ctx context.Context, arg CreateRecentPostParams) error

func (*Queries) CreateRepoBackfillRecord

func (q *Queries) CreateRepoBackfillRecord(ctx context.Context, arg CreateRepoBackfillRecordParams) error

Backfill Status CREATE TABLE repo_backfill_status (

repo TEXT NOT NULL,
last_backfill TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP NOT NULL,
seq_started BIGINT DEFAULT 0 NOT NULL,
state TEXT DEFAULT 'in_progress'::text NOT NULL,
PRIMARY KEY (repo)

);

func (*Queries) CreateRepost

func (q *Queries) CreateRepost(ctx context.Context, arg CreateRepostParams) error

func (*Queries) CreateSentimentJob

func (q *Queries) CreateSentimentJob(ctx context.Context, arg CreateSentimentJobParams) error

func (*Queries) CreateSubject

func (q *Queries) CreateSubject(ctx context.Context, arg CreateSubjectParams) (Subject, error)

func (*Queries) DecrementFollowerCountByN

func (q *Queries) DecrementFollowerCountByN(ctx context.Context, arg DecrementFollowerCountByNParams) error

func (*Queries) DecrementFollowingCountByN

func (q *Queries) DecrementFollowingCountByN(ctx context.Context, arg DecrementFollowingCountByNParams) error

func (*Queries) DecrementLikeCountByN

func (q *Queries) DecrementLikeCountByN(ctx context.Context, arg DecrementLikeCountByNParams) error

func (*Queries) DecrementRepostCountByN

func (q *Queries) DecrementRepostCountByN(ctx context.Context, arg DecrementRepostCountByNParams) error

func (*Queries) DeleteBlock

func (q *Queries) DeleteBlock(ctx context.Context, arg DeleteBlockParams) error

func (*Queries) DeleteCollection

func (q *Queries) DeleteCollection(ctx context.Context, name string) error

func (*Queries) DeleteEvent

func (q *Queries) DeleteEvent(ctx context.Context, id int64) error

func (*Queries) DeleteFollow

func (q *Queries) DeleteFollow(ctx context.Context, arg DeleteFollowParams) error

func (*Queries) DeleteFollowerCount

func (q *Queries) DeleteFollowerCount(ctx context.Context, actorDid string) error

func (*Queries) DeleteFollowingCount

func (q *Queries) DeleteFollowingCount(ctx context.Context, actorDid string) error

func (*Queries) DeleteFollowsByActor

func (q *Queries) DeleteFollowsByActor(ctx context.Context, actorDid string) error

func (*Queries) DeleteFollowsByTarget

func (q *Queries) DeleteFollowsByTarget(ctx context.Context, targetDid string) error

func (*Queries) DeleteImage

func (q *Queries) DeleteImage(ctx context.Context, arg DeleteImageParams) error

func (*Queries) DeleteImagesForPost

func (q *Queries) DeleteImagesForPost(ctx context.Context, arg DeleteImagesForPostParams) error

func (*Queries) DeleteKey

func (q *Queries) DeleteKey(ctx context.Context, apiKey string) error

func (*Queries) DeleteLike

func (q *Queries) DeleteLike(ctx context.Context, arg DeleteLikeParams) error

func (*Queries) DeleteLikeCount

func (q *Queries) DeleteLikeCount(ctx context.Context, arg DeleteLikeCountParams) error

func (*Queries) DeletePointAssignment

func (q *Queries) DeletePointAssignment(ctx context.Context, arg DeletePointAssignmentParams) error

func (*Queries) DeletePost

func (q *Queries) DeletePost(ctx context.Context, arg DeletePostParams) error

func (*Queries) DeleteRecentPost

func (q *Queries) DeleteRecentPost(ctx context.Context, arg DeleteRecentPostParams) error

func (*Queries) DeleteRepoCleanupJob

func (q *Queries) DeleteRepoCleanupJob(ctx context.Context, jobID string) error

func (*Queries) DeleteRepost

func (q *Queries) DeleteRepost(ctx context.Context, arg DeleteRepostParams) error

func (*Queries) DeleteRepostCount

func (q *Queries) DeleteRepostCount(ctx context.Context, arg DeleteRepostCountParams) error

func (*Queries) DeleteSentimentJob

func (q *Queries) DeleteSentimentJob(ctx context.Context, arg DeleteSentimentJobParams) error

func (*Queries) DeleteSubject

func (q *Queries) DeleteSubject(ctx context.Context, arg DeleteSubjectParams) error

func (*Queries) FindActorsByHandle

func (q *Queries) FindActorsByHandle(ctx context.Context, concat interface{}) ([]Actor, error)

func (*Queries) FindPotentialFriends

func (q *Queries) FindPotentialFriends(ctx context.Context, arg FindPotentialFriendsParams) ([]FindPotentialFriendsRow, error)

func (*Queries) GetActiveEventsForInitiator

func (q *Queries) GetActiveEventsForInitiator(ctx context.Context, arg GetActiveEventsForInitiatorParams) ([]Event, error)

func (*Queries) GetActiveEventsForTarget

func (q *Queries) GetActiveEventsForTarget(ctx context.Context, arg GetActiveEventsForTargetParams) ([]Event, error)

func (*Queries) GetActorByDID

func (q *Queries) GetActorByDID(ctx context.Context, did string) (Actor, error)

func (*Queries) GetActorByHandle

func (q *Queries) GetActorByHandle(ctx context.Context, handle string) (Actor, error)

func (*Queries) GetActorTypeAhead

func (q *Queries) GetActorTypeAhead(ctx context.Context, arg GetActorTypeAheadParams) ([]GetActorTypeAheadRow, error)

func (*Queries) GetActorsForValidation

func (q *Queries) GetActorsForValidation(ctx context.Context, arg GetActorsForValidationParams) ([]Actor, error)

func (*Queries) GetActorsWithoutPropic

func (q *Queries) GetActorsWithoutPropic(ctx context.Context, limit int32) ([]Actor, error)

func (*Queries) GetBlock

func (q *Queries) GetBlock(ctx context.Context, arg GetBlockParams) (Block, error)

func (*Queries) GetBlocksByActor

func (q *Queries) GetBlocksByActor(ctx context.Context, arg GetBlocksByActorParams) ([]Block, error)

func (*Queries) GetBlocksByActorAndTarget

func (q *Queries) GetBlocksByActorAndTarget(ctx context.Context, arg GetBlocksByActorAndTargetParams) ([]Block, error)

func (*Queries) GetBlocksByTarget

func (q *Queries) GetBlocksByTarget(ctx context.Context, arg GetBlocksByTargetParams) ([]Block, error)

func (*Queries) GetCleanupJobsByRepo

func (q *Queries) GetCleanupJobsByRepo(ctx context.Context, arg GetCleanupJobsByRepoParams) ([]RepoCleanupJob, error)

func (*Queries) GetCleanupStats

func (q *Queries) GetCleanupStats(ctx context.Context) (GetCleanupStatsRow, error)

func (*Queries) GetCollection

func (q *Queries) GetCollection(ctx context.Context, name string) (Collection, error)

func (*Queries) GetDailySummaries

func (q *Queries) GetDailySummaries(ctx context.Context) ([]DailySummary, error)

func (*Queries) GetEvent

func (q *Queries) GetEvent(ctx context.Context, id int64) (Event, error)

func (*Queries) GetEventsForInitiator

func (q *Queries) GetEventsForInitiator(ctx context.Context, arg GetEventsForInitiatorParams) ([]Event, error)

func (*Queries) GetEventsForTarget

func (q *Queries) GetEventsForTarget(ctx context.Context, arg GetEventsForTargetParams) ([]Event, error)

func (*Queries) GetEventsToConclude

func (q *Queries) GetEventsToConclude(ctx context.Context, arg GetEventsToConcludeParams) ([]Event, error)

func (*Queries) GetFollow

func (q *Queries) GetFollow(ctx context.Context, arg GetFollowParams) (Follow, error)

func (*Queries) GetFollowPage

func (q *Queries) GetFollowPage(ctx context.Context, arg GetFollowPageParams) ([]Follow, error)

func (*Queries) GetFollowerCount

func (q *Queries) GetFollowerCount(ctx context.Context, actorDid string) (FollowerCount, error)

func (*Queries) GetFollowerPercentiles

func (q *Queries) GetFollowerPercentiles(ctx context.Context) (FollowerStat, error)

func (*Queries) GetFollowingCount

func (q *Queries) GetFollowingCount(ctx context.Context, actorDid string) (FollowingCount, error)

func (*Queries) GetFollowsByActor

func (q *Queries) GetFollowsByActor(ctx context.Context, arg GetFollowsByActorParams) ([]Follow, error)

func (*Queries) GetFollowsByActorAndTarget

func (q *Queries) GetFollowsByActorAndTarget(ctx context.Context, arg GetFollowsByActorAndTargetParams) ([]Follow, error)

func (*Queries) GetFollowsByTarget

func (q *Queries) GetFollowsByTarget(ctx context.Context, arg GetFollowsByTargetParams) ([]Follow, error)

func (*Queries) GetHotPage

func (q *Queries) GetHotPage(ctx context.Context, arg GetHotPageParams) ([]GetHotPageRow, error)

func (*Queries) GetImage

func (q *Queries) GetImage(ctx context.Context, arg GetImageParams) (Image, error)

func (*Queries) GetImagesForPost

func (q *Queries) GetImagesForPost(ctx context.Context, arg GetImagesForPostParams) ([]Image, error)

func (*Queries) GetKey

func (q *Queries) GetKey(ctx context.Context, apiKey string) (ApiKey, error)

func (*Queries) GetLike

func (q *Queries) GetLike(ctx context.Context, arg GetLikeParams) (GetLikeRow, error)

func (*Queries) GetLikeCount

func (q *Queries) GetLikeCount(ctx context.Context, arg GetLikeCountParams) (LikeCount, error)

func (*Queries) GetLikesByActor

func (q *Queries) GetLikesByActor(ctx context.Context, arg GetLikesByActorParams) ([]GetLikesByActorRow, error)

func (*Queries) GetLikesBySubject

func (q *Queries) GetLikesBySubject(ctx context.Context, arg GetLikesBySubjectParams) ([]GetLikesBySubjectRow, error)

func (*Queries) GetLikesGivenByActorFromTo

func (q *Queries) GetLikesGivenByActorFromTo(ctx context.Context, arg GetLikesGivenByActorFromToParams) (int64, error)

func (*Queries) GetLikesReceivedByActorFromActor

func (q *Queries) GetLikesReceivedByActorFromActor(ctx context.Context, arg GetLikesReceivedByActorFromActorParams) (int64, error)

func (*Queries) GetMyPostsByFuzzyContent

func (q *Queries) GetMyPostsByFuzzyContent(ctx context.Context, arg GetMyPostsByFuzzyContentParams) ([]Post, error)

func (*Queries) GetPinnedPostsByActor

func (q *Queries) GetPinnedPostsByActor(ctx context.Context, arg GetPinnedPostsByActorParams) ([]Post, error)

func (*Queries) GetPointAssignment

func (q *Queries) GetPointAssignment(ctx context.Context, arg GetPointAssignmentParams) (PointAssignment, error)

func (*Queries) GetPointAssignmentsForActor

func (q *Queries) GetPointAssignmentsForActor(ctx context.Context, arg GetPointAssignmentsForActorParams) ([]PointAssignment, error)

func (*Queries) GetPointAssignmentsForEvent

func (q *Queries) GetPointAssignmentsForEvent(ctx context.Context, arg GetPointAssignmentsForEventParams) ([]PointAssignment, error)

func (*Queries) GetPost

func (q *Queries) GetPost(ctx context.Context, arg GetPostParams) (Post, error)

func (*Queries) GetPostWithReplies

func (q *Queries) GetPostWithReplies(ctx context.Context, arg GetPostWithRepliesParams) ([]GetPostWithRepliesRow, error)

func (*Queries) GetPostWithSentiment

func (q *Queries) GetPostWithSentiment(ctx context.Context, arg GetPostWithSentimentParams) (GetPostWithSentimentRow, error)

func (*Queries) GetPostsByActor

func (q *Queries) GetPostsByActor(ctx context.Context, arg GetPostsByActorParams) ([]Post, error)

func (*Queries) GetPostsByActorsFollowingTarget

func (q *Queries) GetPostsByActorsFollowingTarget(ctx context.Context, arg GetPostsByActorsFollowingTargetParams) ([]Post, error)

func (*Queries) GetPostsFromNonMoots

func (q *Queries) GetPostsFromNonMoots(ctx context.Context, arg GetPostsFromNonMootsParams) ([]Post, error)

func (*Queries) GetPostsFromNonSpamUsers

func (q *Queries) GetPostsFromNonSpamUsers(ctx context.Context, arg GetPostsFromNonSpamUsersParams) ([]Post, error)

func (*Queries) GetRecentPost

func (q *Queries) GetRecentPost(ctx context.Context, arg GetRecentPostParams) (RecentPost, error)

func (*Queries) GetRecentPostsByActor

func (q *Queries) GetRecentPostsByActor(ctx context.Context, arg GetRecentPostsByActorParams) ([]RecentPost, error)

func (*Queries) GetRecentPostsByActorsFollowingTarget

func (q *Queries) GetRecentPostsByActorsFollowingTarget(ctx context.Context, arg GetRecentPostsByActorsFollowingTargetParams) ([]RecentPost, error)

func (*Queries) GetRecentPostsFromNonMoots

func (q *Queries) GetRecentPostsFromNonMoots(ctx context.Context, arg GetRecentPostsFromNonMootsParams) ([]RecentPost, error)

func (*Queries) GetRecentPostsFromNonSpamUsers

func (q *Queries) GetRecentPostsFromNonSpamUsers(ctx context.Context, arg GetRecentPostsFromNonSpamUsersParams) ([]RecentPost, error)

func (*Queries) GetRecentPostsPageByInsertedAt

func (q *Queries) GetRecentPostsPageByInsertedAt(ctx context.Context, arg GetRecentPostsPageByInsertedAtParams) ([]RecentPost, error)

func (*Queries) GetRepoBackfillRecord

func (q *Queries) GetRepoBackfillRecord(ctx context.Context, repo string) (RepoBackfillStatus, error)

func (*Queries) GetRepoBackfillRecords

func (q *Queries) GetRepoBackfillRecords(ctx context.Context, arg GetRepoBackfillRecordsParams) ([]RepoBackfillStatus, error)

func (*Queries) GetRepoCleanupJob

func (q *Queries) GetRepoCleanupJob(ctx context.Context, jobID string) (RepoCleanupJob, error)

func (*Queries) GetRepost

func (q *Queries) GetRepost(ctx context.Context, arg GetRepostParams) (GetRepostRow, error)

func (*Queries) GetRepostCount

func (q *Queries) GetRepostCount(ctx context.Context, arg GetRepostCountParams) (RepostCount, error)

func (*Queries) GetRepostsByActor

func (q *Queries) GetRepostsByActor(ctx context.Context, arg GetRepostsByActorParams) ([]GetRepostsByActorRow, error)

func (*Queries) GetRepostsBySubject

func (q *Queries) GetRepostsBySubject(ctx context.Context, arg GetRepostsBySubjectParams) ([]GetRepostsBySubjectRow, error)

func (*Queries) GetRunningCleanupJobs

func (q *Queries) GetRunningCleanupJobs(ctx context.Context, limit int32) ([]RepoCleanupJob, error)

func (*Queries) GetRunningCleanupJobsByRepo

func (q *Queries) GetRunningCleanupJobsByRepo(ctx context.Context, repo string) ([]RepoCleanupJob, error)

func (*Queries) GetSentimentForPost

func (q *Queries) GetSentimentForPost(ctx context.Context, arg GetSentimentForPostParams) (PostSentiment, error)

func (*Queries) GetSpamFollowers

func (q *Queries) GetSpamFollowers(ctx context.Context) ([]string, error)

func (*Queries) GetSubject

func (q *Queries) GetSubject(ctx context.Context, arg GetSubjectParams) (Subject, error)

func (*Queries) GetSubjectById

func (q *Queries) GetSubjectById(ctx context.Context, id int64) (Subject, error)

func (*Queries) GetTopPosts

func (q *Queries) GetTopPosts(ctx context.Context, arg GetTopPostsParams) ([]Post, error)

func (*Queries) GetTopPostsForActor

func (q *Queries) GetTopPostsForActor(ctx context.Context, arg GetTopPostsForActorParams) ([]Post, error)

func (*Queries) GetTopUsersByPoints

func (q *Queries) GetTopUsersByPoints(ctx context.Context, limit int32) ([]GetTopUsersByPointsRow, error)

func (*Queries) GetTotalLikesGivenByActor

func (q *Queries) GetTotalLikesGivenByActor(ctx context.Context, actorDid string) (int64, error)

func (*Queries) GetTotalLikesReceivedByActor

func (q *Queries) GetTotalLikesReceivedByActor(ctx context.Context, actorDid string) (int64, error)

func (*Queries) GetTotalPointsForActor

func (q *Queries) GetTotalPointsForActor(ctx context.Context, actorDid string) (int64, error)

func (*Queries) GetTotalPointsForEvent

func (q *Queries) GetTotalPointsForEvent(ctx context.Context, eventID int64) (int64, error)

func (*Queries) GetUnconfirmedEvent

func (q *Queries) GetUnconfirmedEvent(ctx context.Context, arg GetUnconfirmedEventParams) (Event, error)

func (*Queries) GetUnprocessedSentimentJobs

func (q *Queries) GetUnprocessedSentimentJobs(ctx context.Context, limit int32) ([]Post, error)

func (*Queries) IncrementFollowerCountByN

func (q *Queries) IncrementFollowerCountByN(ctx context.Context, arg IncrementFollowerCountByNParams) error

Follow Counts

func (*Queries) IncrementFollowingCountByN

func (q *Queries) IncrementFollowingCountByN(ctx context.Context, arg IncrementFollowingCountByNParams) error

Following Counts

func (*Queries) IncrementLikeCountByN

func (q *Queries) IncrementLikeCountByN(ctx context.Context, arg IncrementLikeCountByNParams) error

func (*Queries) IncrementLikeCountByNWithSubject

func (q *Queries) IncrementLikeCountByNWithSubject(ctx context.Context, arg IncrementLikeCountByNWithSubjectParams) error

func (*Queries) IncrementRepostCountByN

func (q *Queries) IncrementRepostCountByN(ctx context.Context, arg IncrementRepostCountByNParams) error

func (*Queries) InsertLike

func (q *Queries) InsertLike(ctx context.Context, arg InsertLikeParams) error

func (*Queries) RefreshStatsForDay

func (q *Queries) RefreshStatsForDay(ctx context.Context, arg RefreshStatsForDayParams) error

func (*Queries) SetSentimentForPost

func (q *Queries) SetSentimentForPost(ctx context.Context, arg SetSentimentForPostParams) error

func (*Queries) TrimOldRecentPosts

func (q *Queries) TrimOldRecentPosts(ctx context.Context, hours int32) (int64, error)

func (*Queries) UpatePointAssignment

func (q *Queries) UpatePointAssignment(ctx context.Context, arg UpatePointAssignmentParams) error

func (*Queries) UpdateActorPropic

func (q *Queries) UpdateActorPropic(ctx context.Context, arg UpdateActorPropicParams) error

func (*Queries) UpdateActorsValidation

func (q *Queries) UpdateActorsValidation(ctx context.Context, arg UpdateActorsValidationParams) error

func (*Queries) UpdateRepoBackfillRecord

func (q *Queries) UpdateRepoBackfillRecord(ctx context.Context, arg UpdateRepoBackfillRecordParams) error

func (*Queries) UpsertActor

func (q *Queries) UpsertActor(ctx context.Context, arg UpsertActorParams) error

func (*Queries) UpsertActorFromFirehose

func (q *Queries) UpsertActorFromFirehose(ctx context.Context, arg UpsertActorFromFirehoseParams) error

func (*Queries) UpsertRepoCleanupJob

func (q *Queries) UpsertRepoCleanupJob(ctx context.Context, arg UpsertRepoCleanupJobParams) (RepoCleanupJob, error)

-- Repo Cleanup Jobs CREATE TABLE repo_cleanup_jobs (

job_id TEXT PRIMARY KEY,
repo TEXT NOT NULL,
refresh_token TEXT NOT NULL,
cleanup_types TEXT [] NOT NULL,
delete_older_than TIMESTAMP WITH TIME ZONE NOT NULL,
num_deleted INTEGER NOT NULL,
num_deleted_today INTEGER NOT NULL,
est_num_remaining INTEGER NOT NULL,
job_state TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
last_deleted_at TIMESTAMP WITH TIME ZONE

);

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type RecentPost

type RecentPost struct {
	ActorDid           string                `json:"actor_did"`
	Rkey               string                `json:"rkey"`
	Content            sql.NullString        `json:"content"`
	ParentPostActorDid sql.NullString        `json:"parent_post_actor_did"`
	QuotePostActorDid  sql.NullString        `json:"quote_post_actor_did"`
	QuotePostRkey      sql.NullString        `json:"quote_post_rkey"`
	ParentPostRkey     sql.NullString        `json:"parent_post_rkey"`
	RootPostActorDid   sql.NullString        `json:"root_post_actor_did"`
	RootPostRkey       sql.NullString        `json:"root_post_rkey"`
	Facets             pqtype.NullRawMessage `json:"facets"`
	Embed              pqtype.NullRawMessage `json:"embed"`
	Langs              []string              `json:"langs"`
	Tags               []string              `json:"tags"`
	SubjectID          sql.NullInt64         `json:"subject_id"`
	HasEmbeddedMedia   bool                  `json:"has_embedded_media"`
	CreatedAt          sql.NullTime          `json:"created_at"`
	InsertedAt         time.Time             `json:"inserted_at"`
}

type RecentPostsWithScore

type RecentPostsWithScore struct {
	SubjectID        int64        `json:"subject_id"`
	ActorDid         string       `json:"actor_did"`
	Rkey             string       `json:"rkey"`
	SubjectCreatedAt sql.NullTime `json:"subject_created_at"`
	InsertedAt       time.Time    `json:"inserted_at"`
	Langs            []string     `json:"langs"`
	HasEmbeddedMedia bool         `json:"has_embedded_media"`
	Score            float64      `json:"score"`
}

type RefreshStatsForDayParams

type RefreshStatsForDayParams struct {
	StartTodayOffset int32 `json:"start_today_offset"`
	EndTodayOffset   int32 `json:"end_today_offset"`
}

type RepoBackfillStatus

type RepoBackfillStatus struct {
	Repo         string    `json:"repo"`
	LastBackfill time.Time `json:"last_backfill"`
	SeqStarted   int64     `json:"seq_started"`
	State        string    `json:"state"`
}

type RepoCleanupJob

type RepoCleanupJob struct {
	JobID           string       `json:"job_id"`
	Repo            string       `json:"repo"`
	RefreshToken    string       `json:"refresh_token"`
	CleanupTypes    []string     `json:"cleanup_types"`
	DeleteOlderThan time.Time    `json:"delete_older_than"`
	NumDeleted      int32        `json:"num_deleted"`
	NumDeletedToday int32        `json:"num_deleted_today"`
	EstNumRemaining int32        `json:"est_num_remaining"`
	JobState        string       `json:"job_state"`
	CreatedAt       time.Time    `json:"created_at"`
	UpdatedAt       time.Time    `json:"updated_at"`
	LastDeletedAt   sql.NullTime `json:"last_deleted_at"`
}

type Repost

type Repost struct {
	ActorDid   string       `json:"actor_did"`
	Rkey       string       `json:"rkey"`
	Subj       int64        `json:"subj"`
	CreatedAt  sql.NullTime `json:"created_at"`
	InsertedAt time.Time    `json:"inserted_at"`
}

type RepostCount

type RepostCount struct {
	SubjectID  int64     `json:"subject_id"`
	NumReposts int64     `json:"num_reposts"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type SetSentimentForPostParams

type SetSentimentForPostParams struct {
	ActorDid      string          `json:"actor_did"`
	Rkey          string          `json:"rkey"`
	CreatedAt     time.Time       `json:"created_at"`
	ProcessedAt   sql.NullTime    `json:"processed_at"`
	Sentiment     sql.NullString  `json:"sentiment"`
	Confidence    sql.NullFloat64 `json:"confidence"`
	DetectedLangs []string        `json:"detected_langs"`
}

type Subject

type Subject struct {
	ID       int64  `json:"id"`
	ActorDid string `json:"actor_did"`
	Rkey     string `json:"rkey"`
	Col      int32  `json:"col"`
}

type UpatePointAssignmentParams

type UpatePointAssignmentParams struct {
	EventID  int64  `json:"event_id"`
	ActorDid string `json:"actor_did"`
	Points   int32  `json:"points"`
}

type UpdateActorPropicParams

type UpdateActorPropicParams struct {
	Did       string         `json:"did"`
	ProPicCid sql.NullString `json:"pro_pic_cid"`
	UpdatedAt sql.NullTime   `json:"updated_at"`
}

type UpdateActorsValidationParams

type UpdateActorsValidationParams struct {
	LastValidated sql.NullTime `json:"last_validated"`
	HandleValid   bool         `json:"handle_valid"`
	Dids          []string     `json:"dids"`
}

type UpdateRepoBackfillRecordParams

type UpdateRepoBackfillRecordParams struct {
	Repo         string    `json:"repo"`
	LastBackfill time.Time `json:"last_backfill"`
	SeqStarted   int64     `json:"seq_started"`
	State        string    `json:"state"`
}

type UpsertActorFromFirehoseParams

type UpsertActorFromFirehoseParams struct {
	Did         string         `json:"did"`
	Handle      string         `json:"handle"`
	DisplayName sql.NullString `json:"display_name"`
	Bio         sql.NullString `json:"bio"`
	ProPicCid   sql.NullString `json:"pro_pic_cid"`
	BannerCid   sql.NullString `json:"banner_cid"`
	CreatedAt   sql.NullTime   `json:"created_at"`
	UpdatedAt   sql.NullTime   `json:"updated_at"`
}

type UpsertActorParams

type UpsertActorParams struct {
	Did       string       `json:"did"`
	Handle    string       `json:"handle"`
	CreatedAt sql.NullTime `json:"created_at"`
}

type UpsertRepoCleanupJobParams

type UpsertRepoCleanupJobParams struct {
	JobID           string       `json:"job_id"`
	Repo            string       `json:"repo"`
	RefreshToken    string       `json:"refresh_token"`
	CleanupTypes    []string     `json:"cleanup_types"`
	DeleteOlderThan time.Time    `json:"delete_older_than"`
	NumDeleted      int32        `json:"num_deleted"`
	NumDeletedToday int32        `json:"num_deleted_today"`
	EstNumRemaining int32        `json:"est_num_remaining"`
	JobState        string       `json:"job_state"`
	UpdatedAt       time.Time    `json:"updated_at"`
	LastDeletedAt   sql.NullTime `json:"last_deleted_at"`
}

Jump to

Keyboard shortcuts

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