gen

package
v0.0.79 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 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 ActorProfile added in v0.0.14

type ActorProfile struct {
	ActorDID    string
	CommitCID   string
	CreatedAt   pgtype.Timestamptz
	IndexedAt   pgtype.Timestamptz
	DisplayName pgtype.Text
	Description pgtype.Text
	SelfLabels  []string
}

type ActorStatus

type ActorStatus string
const (
	ActorStatusNone     ActorStatus = "none"
	ActorStatusPending  ActorStatus = "pending"
	ActorStatusApproved ActorStatus = "approved"
	ActorStatusBanned   ActorStatus = "banned"
)

func (*ActorStatus) Scan

func (e *ActorStatus) Scan(src interface{}) error

type AuditEvent added in v0.0.11

type AuditEvent struct {
	ID               string
	ActorDID         string
	SubjectDid       string
	SubjectRecordUri string
	CreatedAt        pgtype.Timestamptz
	Payload          []byte
}

type CandidateActor

type CandidateActor struct {
	DID                     string
	CreatedAt               pgtype.Timestamptz
	IsArtist                bool
	Comment                 string
	Status                  ActorStatus
	Roles                   []string
	CurrentProfileCommitCid pgtype.Text
	HeldUntil               pgtype.Timestamptz
}

type CandidateFollow

type CandidateFollow struct {
	URI        string
	ActorDID   string
	SubjectDid string
	CreatedAt  pgtype.Timestamptz
	IndexedAt  pgtype.Timestamptz
	DeletedAt  pgtype.Timestamptz
}

type CandidateLike

type CandidateLike struct {
	URI        string
	ActorDID   string
	SubjectURI string
	CreatedAt  pgtype.Timestamptz
	IndexedAt  pgtype.Timestamptz
	DeletedAt  pgtype.Timestamptz
}

type CandidatePost

type CandidatePost struct {
	URI        string
	ActorDID   string
	CreatedAt  pgtype.Timestamptz
	IndexedAt  pgtype.Timestamptz
	IsHidden   bool
	DeletedAt  pgtype.Timestamptz
	Raw        *bsky.FeedPost
	Hashtags   []string
	HasMedia   pgtype.Bool
	SelfLabels []string
	HasVideo   pgtype.Bool
}

type CreateAuditEventParams added in v0.0.11

type CreateAuditEventParams struct {
	ID               string
	CreatedAt        pgtype.Timestamptz
	ActorDID         string
	SubjectDid       string
	SubjectRecordUri string
	Payload          []byte
}

type CreateCandidateActorParams

type CreateCandidateActorParams struct {
	DID       string
	CreatedAt pgtype.Timestamptz
	IsArtist  bool
	Comment   string
	Status    ActorStatus
	Roles     []string
}

type CreateCandidateFollowParams

type CreateCandidateFollowParams struct {
	URI        string
	ActorDID   string
	SubjectDid string
	CreatedAt  pgtype.Timestamptz
	IndexedAt  pgtype.Timestamptz
}

type CreateCandidateLikeParams

type CreateCandidateLikeParams struct {
	URI        string
	ActorDID   string
	SubjectURI string
	CreatedAt  pgtype.Timestamptz
	IndexedAt  pgtype.Timestamptz
}

type CreateCandidatePostParams

type CreateCandidatePostParams struct {
	URI        string
	ActorDID   string
	CreatedAt  pgtype.Timestamptz
	IndexedAt  pgtype.Timestamptz
	Hashtags   []string
	HasMedia   pgtype.Bool
	HasVideo   pgtype.Bool
	Raw        *bsky.FeedPost
	SelfLabels []string
}

type CreateLatestActorProfileParams added in v0.0.14

type CreateLatestActorProfileParams struct {
	ActorDID    string
	CommitCID   string
	CreatedAt   pgtype.Timestamptz
	IndexedAt   pgtype.Timestamptz
	DisplayName pgtype.Text
	Description pgtype.Text
	SelfLabels  []string
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type EnqueueFollowTaskParams added in v0.0.76

type EnqueueFollowTaskParams struct {
	ActorDID       string
	NextTryAt      pgtype.Timestamptz
	CreatedAt      pgtype.Timestamptz
	ShouldUnfollow bool
}

type FirehoseCommitCursor added in v0.0.21

type FirehoseCommitCursor struct {
	Cursor int64
}

type FollowTask added in v0.0.76

type FollowTask struct {
	ID             int64
	ActorDID       string
	NextTryAt      pgtype.Timestamptz
	CreatedAt      pgtype.Timestamptz
	Tries          int32
	ShouldUnfollow bool
	FinishedAt     pgtype.Timestamptz
	LastError      pgtype.Text
}

type GetFurryNewFeedParams

type GetFurryNewFeedParams struct {
	Hashtags           []string
	DisallowedHashtags []string
	IsNSFW             pgtype.Bool
	PinnedDIDs         []string
	CursorTimestamp    pgtype.Timestamptz
	Limit              int32
	AllowedEmbeds      []string
}

type HoldBackPendingActorParams added in v0.0.38

type HoldBackPendingActorParams struct {
	HeldUntil pgtype.Timestamptz
	DID       string
}

type JetstreamCursor added in v0.0.69

type JetstreamCursor struct {
	Cursor int64
}

type ListAuditEventsParams added in v0.0.11

type ListAuditEventsParams struct {
	SubjectDid       string
	ActorDID         string
	SubjectRecordUri string
	CreatedBefore    pgtype.Timestamptz
	Types            []string
	Limit            int32
}

type ListScoredPostsParams added in v0.0.27

type ListScoredPostsParams struct {
	Alg                string
	GenerationSeq      int64
	Hashtags           []string
	DisallowedHashtags []string
	IsNSFW             pgtype.Bool
	AfterScore         float32
	AfterURI           string
	Limit              int32
	AllowedEmbeds      []string
}

type ListScoredPostsRow added in v0.0.27

type ListScoredPostsRow struct {
	URI        string
	ActorDID   string
	CreatedAt  pgtype.Timestamptz
	IndexedAt  pgtype.Timestamptz
	IsHidden   bool
	DeletedAt  pgtype.Timestamptz
	Raw        *bsky.FeedPost
	Hashtags   []string
	HasMedia   pgtype.Bool
	SelfLabels []string
	HasVideo   pgtype.Bool
	Score      float32
}

type MarkFollowTaskAsErroredParams added in v0.0.76

type MarkFollowTaskAsErroredParams struct {
	ID        int64
	NextTryAt pgtype.Timestamptz
	LastError pgtype.Text
}

type NullActorStatus

type NullActorStatus struct {
	ActorStatus ActorStatus
	Valid       bool // Valid is true if ActorStatus is not NULL
}

func (*NullActorStatus) Scan

func (ns *NullActorStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullActorStatus) Value

func (ns NullActorStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type PostScore added in v0.0.27

type PostScore struct {
	URI           string
	Alg           string
	GenerationSeq int64
	Score         float32
	GeneratedAt   pgtype.Timestamptz
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateAuditEvent added in v0.0.11

func (q *Queries) CreateAuditEvent(ctx context.Context, arg CreateAuditEventParams) (AuditEvent, error)

func (*Queries) CreateCandidateActor

func (q *Queries) CreateCandidateActor(ctx context.Context, arg CreateCandidateActorParams) (CandidateActor, error)

func (*Queries) CreateCandidateFollow

func (q *Queries) CreateCandidateFollow(ctx context.Context, arg CreateCandidateFollowParams) error

func (*Queries) CreateCandidateLike

func (q *Queries) CreateCandidateLike(ctx context.Context, arg CreateCandidateLikeParams) error

func (*Queries) CreateCandidatePost

func (q *Queries) CreateCandidatePost(ctx context.Context, arg CreateCandidatePostParams) error

func (*Queries) CreateLatestActorProfile added in v0.0.14

func (q *Queries) CreateLatestActorProfile(ctx context.Context, arg CreateLatestActorProfileParams) error

func (*Queries) DeleteOldPostScores added in v0.0.27

func (q *Queries) DeleteOldPostScores(ctx context.Context, before pgtype.Timestamptz) (int64, error)

func (*Queries) EnqueueFollowTask added in v0.0.76

func (q *Queries) EnqueueFollowTask(ctx context.Context, arg EnqueueFollowTaskParams) error

func (*Queries) GetActorProfileHistory added in v0.0.17

func (q *Queries) GetActorProfileHistory(ctx context.Context, actorDid string) ([]ActorProfile, error)

func (*Queries) GetCandidateActorByDID

func (q *Queries) GetCandidateActorByDID(ctx context.Context, did string) (CandidateActor, error)

func (*Queries) GetFurryNewFeed

func (q *Queries) GetFurryNewFeed(ctx context.Context, arg GetFurryNewFeedParams) ([]CandidatePost, error)

func (*Queries) GetJetstreamCursor added in v0.0.69

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

func (*Queries) GetLatestActorProfile added in v0.0.17

func (q *Queries) GetLatestActorProfile(ctx context.Context, did string) (ActorProfile, error)

func (*Queries) GetLatestScoreGeneration added in v0.0.27

func (q *Queries) GetLatestScoreGeneration(ctx context.Context, alg string) (int64, error)

func (*Queries) GetNextFollowTask added in v0.0.76

func (q *Queries) GetNextFollowTask(ctx context.Context) (FollowTask, error)

func (*Queries) GetPostByURI added in v0.0.15

func (q *Queries) GetPostByURI(ctx context.Context, uri string) (CandidatePost, error)

func (*Queries) HoldBackPendingActor added in v0.0.38

func (q *Queries) HoldBackPendingActor(ctx context.Context, arg HoldBackPendingActorParams) error

func (*Queries) ListAuditEvents added in v0.0.11

func (q *Queries) ListAuditEvents(ctx context.Context, arg ListAuditEventsParams) ([]AuditEvent, error)

func (*Queries) ListCandidateActors

func (q *Queries) ListCandidateActors(ctx context.Context, status NullActorStatus) ([]CandidateActor, error)

func (*Queries) ListCandidateActorsRequiringProfileBackfill added in v0.0.14

func (q *Queries) ListCandidateActorsRequiringProfileBackfill(ctx context.Context) ([]CandidateActor, error)

func (*Queries) ListScoredPosts added in v0.0.27

func (q *Queries) ListScoredPosts(ctx context.Context, arg ListScoredPostsParams) ([]ListScoredPostsRow, error)

func (*Queries) MarkFollowTaskAsDone added in v0.0.76

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

func (*Queries) MarkFollowTaskAsErrored added in v0.0.76

func (q *Queries) MarkFollowTaskAsErrored(ctx context.Context, arg MarkFollowTaskAsErroredParams) error

func (*Queries) MaterializePostScores added in v0.0.27

func (q *Queries) MaterializePostScores(ctx context.Context, after pgtype.Timestamptz) (int64, error)

func (*Queries) SetJetstreamCursor added in v0.0.69

func (q *Queries) SetJetstreamCursor(ctx context.Context, cursor int64) error

func (*Queries) SoftDeleteCandidateFollow

func (q *Queries) SoftDeleteCandidateFollow(ctx context.Context, uri string) error

func (*Queries) SoftDeleteCandidateLike

func (q *Queries) SoftDeleteCandidateLike(ctx context.Context, uri string) error

func (*Queries) SoftDeleteCandidatePost

func (q *Queries) SoftDeleteCandidatePost(ctx context.Context, uri string) error

func (*Queries) UpdateCandidateActor

func (q *Queries) UpdateCandidateActor(ctx context.Context, arg UpdateCandidateActorParams) (CandidateActor, error)

func (*Queries) WithTx added in v0.0.21

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

type UpdateCandidateActorParams

type UpdateCandidateActorParams struct {
	Status   NullActorStatus
	IsArtist pgtype.Bool
	Comment  pgtype.Text
	Roles    []string
	DID      string
}

Jump to

Keyboard shortcuts

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