schemagen

package
v0.0.0-...-45ae864 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const UserActorDeclCid = "bafyreid27zk7lbis4zw5fz4podbvbs4fc5ivwji3dmrwa6zggnj4bnd57u"
View Source
const UserActorDeclType = "app.bsky.system.actorUser"

Variables

View Source
var ErrNoSuchUser = fmt.Errorf("no such user")

Functions

This section is empty.

Types

type ExternalFollow

type ExternalFollow struct {
	gorm.Model
	PDS uint
	Uid uint
}

type FeedGenerator

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

func NewFeedGenerator

func NewFeedGenerator(db *gorm.DB, ix *indexer.Indexer, readRecord ReadRecordFunc) (*FeedGenerator, error)

func (*FeedGenerator) GetActorProfile

func (fg *FeedGenerator) GetActorProfile(ctx context.Context, actor string) (*types.ActorInfo, error)

func (*FeedGenerator) GetActorProfileByID

func (fg *FeedGenerator) GetActorProfileByID(ctx context.Context, actor uint) (*types.ActorInfo, error)

func (*FeedGenerator) GetAuthorFeed

func (fg *FeedGenerator) GetAuthorFeed(ctx context.Context, user *User, before string, limit int) ([]*bsky.FeedFeedViewPost, error)

func (*FeedGenerator) GetFollows

func (fg *FeedGenerator) GetFollows(ctx context.Context, user string, limit int, before string) ([]*FollowInfo, error)

func (*FeedGenerator) GetPostThread

func (fg *FeedGenerator) GetPostThread(ctx context.Context, uri string, depth int) (*ThreadPost, error)

func (*FeedGenerator) GetTimeline

func (fg *FeedGenerator) GetTimeline(ctx context.Context, user *User, algo string, before string, limit int) ([]*bsky.FeedFeedViewPost, error)

func (*FeedGenerator) GetVotes

func (fg *FeedGenerator) GetVotes(ctx context.Context, uri string, pcid cid.Cid, dir string, limit int, before string) ([]*HydratedVote, error)

type FollowInfo

type FollowInfo struct {
	Follower  *bsky.ActorRef_WithInfo
	Subject   *bsky.ActorRef_WithInfo
	CreatedAt string
	IndexedAt string
}

type HydratedVote

type HydratedVote struct {
	Actor     *bsky.ActorRef_WithInfo
	Direction string
	IndexedAt time.Time
	CreatedAt string
}

type IndexCallback

type IndexCallback func(context.Context, *Peering, *events.Event) error

type Peering

type Peering struct {
	gorm.Model
	Host     string
	Did      string
	Approved bool
}

type ReadRecordFunc

type ReadRecordFunc func(context.Context, uint, cid.Cid) (util.CBOR, error)

type RefreshToken

type RefreshToken struct {
	gorm.Model
	Token string
}

type Server

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

func NewServer

func NewServer(db *gorm.DB, cs *carstore.CarStore, kfile string, handleSuffix, serviceUrl string, didr plc.PLCClient, jwtkey []byte) (*Server, error)

func (*Server) AddRemoteFollow

func (s *Server) AddRemoteFollow(ctx context.Context, opdsdid string, u string) error

func (*Server) EventsHandler

func (s *Server) EventsHandler(c echo.Context) error

func (*Server) HackAddPeering

func (s *Server) HackAddPeering(host string, did string) error

func (*Server) HandleAppBskyActorCreateScene

func (s *Server) HandleAppBskyActorCreateScene(c echo.Context) error

func (*Server) HandleAppBskyActorGetProfile

func (s *Server) HandleAppBskyActorGetProfile(c echo.Context) error

func (*Server) HandleAppBskyActorGetSuggestions

func (s *Server) HandleAppBskyActorGetSuggestions(c echo.Context) error

func (*Server) HandleAppBskyActorSearch

func (s *Server) HandleAppBskyActorSearch(c echo.Context) error

func (*Server) HandleAppBskyActorSearchTypeahead

func (s *Server) HandleAppBskyActorSearchTypeahead(c echo.Context) error

func (*Server) HandleAppBskyActorUpdateProfile

func (s *Server) HandleAppBskyActorUpdateProfile(c echo.Context) error

func (*Server) HandleAppBskyFeedGetAuthorFeed

func (s *Server) HandleAppBskyFeedGetAuthorFeed(c echo.Context) error

func (*Server) HandleAppBskyFeedGetPostThread

func (s *Server) HandleAppBskyFeedGetPostThread(c echo.Context) error

func (*Server) HandleAppBskyFeedGetRepostedBy

func (s *Server) HandleAppBskyFeedGetRepostedBy(c echo.Context) error

func (*Server) HandleAppBskyFeedGetTimeline

func (s *Server) HandleAppBskyFeedGetTimeline(c echo.Context) error

func (*Server) HandleAppBskyFeedGetVotes

func (s *Server) HandleAppBskyFeedGetVotes(c echo.Context) error

func (*Server) HandleAppBskyFeedSetVote

func (s *Server) HandleAppBskyFeedSetVote(c echo.Context) error

func (*Server) HandleAppBskyGraphGetAssertions

func (s *Server) HandleAppBskyGraphGetAssertions(c echo.Context) error

func (*Server) HandleAppBskyGraphGetFollowers

func (s *Server) HandleAppBskyGraphGetFollowers(c echo.Context) error

func (*Server) HandleAppBskyGraphGetFollows

func (s *Server) HandleAppBskyGraphGetFollows(c echo.Context) error

func (*Server) HandleAppBskyGraphGetMembers

func (s *Server) HandleAppBskyGraphGetMembers(c echo.Context) error

func (*Server) HandleAppBskyGraphGetMemberships

func (s *Server) HandleAppBskyGraphGetMemberships(c echo.Context) error

func (*Server) HandleAppBskyGraphGetMutes

func (s *Server) HandleAppBskyGraphGetMutes(c echo.Context) error

func (*Server) HandleAppBskyGraphMute

func (s *Server) HandleAppBskyGraphMute(c echo.Context) error

func (*Server) HandleAppBskyGraphUnmute

func (s *Server) HandleAppBskyGraphUnmute(c echo.Context) error

func (*Server) HandleAppBskyNotificationGetCount

func (s *Server) HandleAppBskyNotificationGetCount(c echo.Context) error

func (*Server) HandleAppBskyNotificationList

func (s *Server) HandleAppBskyNotificationList(c echo.Context) error

func (*Server) HandleAppBskyNotificationUpdateSeen

func (s *Server) HandleAppBskyNotificationUpdateSeen(c echo.Context) error

func (*Server) HandleComAtprotoAccountCreate

func (s *Server) HandleComAtprotoAccountCreate(c echo.Context) error

func (*Server) HandleComAtprotoAccountCreateInviteCode

func (s *Server) HandleComAtprotoAccountCreateInviteCode(c echo.Context) error

func (*Server) HandleComAtprotoAccountDelete

func (s *Server) HandleComAtprotoAccountDelete(c echo.Context) error

func (*Server) HandleComAtprotoAccountGet

func (s *Server) HandleComAtprotoAccountGet(c echo.Context) error

func (*Server) HandleComAtprotoAccountRequestPasswordReset

func (s *Server) HandleComAtprotoAccountRequestPasswordReset(c echo.Context) error

func (*Server) HandleComAtprotoAccountResetPassword

func (s *Server) HandleComAtprotoAccountResetPassword(c echo.Context) error

func (*Server) HandleComAtprotoBlobUpload

func (s *Server) HandleComAtprotoBlobUpload(c echo.Context) error

func (*Server) HandleComAtprotoHandleResolve

func (s *Server) HandleComAtprotoHandleResolve(c echo.Context) error

func (*Server) HandleComAtprotoPeeringFollow

func (s *Server) HandleComAtprotoPeeringFollow(c echo.Context) error

func (*Server) HandleComAtprotoPeeringInit

func (s *Server) HandleComAtprotoPeeringInit(c echo.Context) error

func (*Server) HandleComAtprotoPeeringList

func (s *Server) HandleComAtprotoPeeringList(c echo.Context) error

func (*Server) HandleComAtprotoPeeringPropose

func (s *Server) HandleComAtprotoPeeringPropose(c echo.Context) error

func (*Server) HandleComAtprotoRepoBatchWrite

func (s *Server) HandleComAtprotoRepoBatchWrite(c echo.Context) error

func (*Server) HandleComAtprotoRepoCreateRecord

func (s *Server) HandleComAtprotoRepoCreateRecord(c echo.Context) error

func (*Server) HandleComAtprotoRepoDeleteRecord

func (s *Server) HandleComAtprotoRepoDeleteRecord(c echo.Context) error

func (*Server) HandleComAtprotoRepoDescribe

func (s *Server) HandleComAtprotoRepoDescribe(c echo.Context) error

func (*Server) HandleComAtprotoRepoGetRecord

func (s *Server) HandleComAtprotoRepoGetRecord(c echo.Context) error

func (*Server) HandleComAtprotoRepoListRecords

func (s *Server) HandleComAtprotoRepoListRecords(c echo.Context) error

func (*Server) HandleComAtprotoRepoPutRecord

func (s *Server) HandleComAtprotoRepoPutRecord(c echo.Context) error

func (*Server) HandleComAtprotoServerGetAccountsConfig

func (s *Server) HandleComAtprotoServerGetAccountsConfig(c echo.Context) error

func (*Server) HandleComAtprotoSessionCreate

func (s *Server) HandleComAtprotoSessionCreate(c echo.Context) error

func (*Server) HandleComAtprotoSessionDelete

func (s *Server) HandleComAtprotoSessionDelete(c echo.Context) error

func (*Server) HandleComAtprotoSessionGet

func (s *Server) HandleComAtprotoSessionGet(c echo.Context) error

func (*Server) HandleComAtprotoSessionRefresh

func (s *Server) HandleComAtprotoSessionRefresh(c echo.Context) error

func (*Server) HandleComAtprotoSyncGetRepo

func (s *Server) HandleComAtprotoSyncGetRepo(c echo.Context) error

func (*Server) HandleComAtprotoSyncGetRoot

func (s *Server) HandleComAtprotoSyncGetRoot(c echo.Context) error

func (*Server) HandleComAtprotoSyncUpdateRepo

func (s *Server) HandleComAtprotoSyncUpdateRepo(c echo.Context) error

func (*Server) RegisterHandlersAppBsky

func (s *Server) RegisterHandlersAppBsky(e *echo.Echo) error

func (*Server) RegisterHandlersComAtproto

func (s *Server) RegisterHandlersComAtproto(e *echo.Echo) error

func (*Server) RunAPI

func (s *Server) RunAPI(listen string) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

type Slurper

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

TODO: rename me

func (*Slurper) SubscribeToPds

func (s *Slurper) SubscribeToPds(ctx context.Context, host string) error

type ThreadPost

type ThreadPost struct {
	Post   *bsky.FeedFeedViewPost
	PostID uint

	ParentUri string
	Parent    *ThreadPost
}

type User

type User struct {
	gorm.Model
	Handle      string `gorm:"uniqueIndex"`
	Password    string
	RecoveryKey string
	Email       string
	Did         string `gorm:"uniqueIndex"`
	PDS         uint
}

Jump to

Keyboard shortcuts

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