Documentation ¶
Index ¶
- Constants
- func ClientForPds(pds *PDS) *xrpc.Client
- type ActorInfo
- type DbCID
- func (dbc *DbCID) GormDataType() string
- func (dbc *DbCID) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (dbc DbCID) MarshalJSON() ([]byte, error)
- func (dbc *DbCID) Scan(v interface{}) error
- func (dbc *DbCID) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (dbc *DbCID) UnmarshalJSON(b []byte) error
- func (dbc DbCID) Value() (driver.Value, error)
- type DomainBan
- type FeedPost
- type FollowRecord
- type Label
- type ModerationAction
- type ModerationActionSubjectBlobCid
- type ModerationReport
- type ModerationReportResolution
- type PDS
- type RepostRecord
- type Uid
- type VoteDir
- type VoteRecord
Constants ¶
View Source
const ( VoteDirUp = VoteDir(1) VoteDirDown = VoteDir(2) )
Variables ¶
This section is empty.
Functions ¶
func ClientForPds ¶
Types ¶
type ActorInfo ¶
type ActorInfo struct { gorm.Model Uid Uid `gorm:"uniqueindex"` Handle sql.NullString `gorm:"index"` DisplayName string Did string `gorm:"uniqueindex"` Following int64 Followers int64 Posts int64 Type string PDS uint ValidHandle bool `gorm:"default:true"` }
func (*ActorInfo) ActorRef ¶
func (ai *ActorInfo) ActorRef() *bsky.ActorDefs_ProfileViewBasic
func (*ActorInfo) ActorView ¶
func (ai *ActorInfo) ActorView() *bsky.ActorDefs_ProfileView
TODO: this is just s stub; needs to populate more info
type DbCID ¶
type DbCID struct {
CID cid.Cid
}
func (*DbCID) GormDataType ¶
func (DbCID) MarshalJSON ¶
func (*DbCID) UnmarshalJSON ¶
type FollowRecord ¶
type Label ¶
type Label struct { ID uint64 `gorm:"primaryKey"` Uri string `gorm:"uniqueIndex:idx_uri_src_val_cid;not null"` SourceDid string `gorm:"uniqueIndex:idx_uri_src_val_cid;uniqueIndex:idx_src_rkey;not null"` Val string `gorm:"uniqueIndex:idx_uri_src_val_cid;not null"` Cid *string `gorm:"uniqueIndex:idx_uri_src_val_cid"` Neg *bool RepoRKey *string `gorm:"uniqueIndex:idx_src_rkey"` CreatedAt time.Time UpdatedAt time.Time }
The CreatedAt column corresponds to the 'cat' timestamp on label records. The UpdatedAt column is database-specific.
NOTE: to get fast string-prefix queries on Uri via the idx_uri_src_val_cid index, it is important that the PostgreSQL LC_COLLATE="C"
type ModerationAction ¶
type ModerationAction struct { ID uint64 `gorm:"primaryKey"` Action string `gorm:"not null"` SubjectType string `gorm:"not null"` SubjectDid string `gorm:"not null"` SubjectUri *string SubjectCid *string Reason string `gorm:"not null"` CreatedAt time.Time `gorm:"not null"` CreatedByDid string `gorm:"not null"` ReversedAt *time.Time ReversedByDid *string ReversedReason *string }
type ModerationReport ¶
type ModerationReport struct { ID uint64 `gorm:"primaryKey"` SubjectType string `gorm:"not null"` SubjectDid string `gorm:"not null"` SubjectUri *string SubjectCid *string ReasonType string `gorm:"not null"` Reason *string ReportedByDid string `gorm:"not null"` CreatedAt time.Time `gorm:"not null"` }
type RepostRecord ¶
Click to show internal directories.
Click to hide internal directories.