fakedata

package
v0.0.0-...-9f7ea1d Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0, MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountXrpcClient

func AccountXrpcClient(pdsHost string, ac *AccountContext) (*xrpc.Client, error)

func BrowseAccount

func BrowseAccount(xrpcc *xrpc.Client, acc *AccountContext) error

func CreateFollow

func CreateFollow(xrpcc *xrpc.Client, tgt *AccountContext) error

func CreateLike

func CreateLike(xrpcc *xrpc.Client, viewPost *appbsky.FeedDefs_FeedViewPost) error

func CreateReply

func CreateReply(xrpcc *xrpc.Client, viewPost *appbsky.FeedDefs_FeedViewPost) error

func CreateRepost

func CreateRepost(xrpcc *xrpc.Client, viewPost *appbsky.FeedDefs_FeedViewPost) error

func GenFollowsAndMutes

func GenFollowsAndMutes(xrpcc *xrpc.Client, catalog *AccountCatalog, acc *AccountContext, maxFollows int, maxMutes int) error

func GenLikesRepostsReplies

func GenLikesRepostsReplies(xrpcc *xrpc.Client, acc *AccountContext, fracLike, fracRepost, fracReply float64) error

func GenPosts

func GenPosts(xrpcc *xrpc.Client, catalog *AccountCatalog, acc *AccountContext, maxPosts int, fracImage float64, fracMention float64) error

func GenProfile

func GenProfile(xrpcc *xrpc.Client, acc *AccountContext, genAvatar, genBanner bool) error

func MeasureIterations

func MeasureIterations(name string) func(int)

func SetLogger

func SetLogger(logger *slog.Logger)

Types

type AccountCatalog

type AccountCatalog struct {
	Celebs   []AccountContext
	Regulars []AccountContext
}

func ReadAccountCatalog

func ReadAccountCatalog(path string) (*AccountCatalog, error)

func (*AccountCatalog) Combined

func (ac *AccountCatalog) Combined() []AccountContext

type AccountContext

type AccountContext struct {
	// 0-based index; should match index
	Index       int           `json:"index"`
	AccountType string        `json:"accountType"`
	Email       string        `json:"email"`
	Password    string        `json:"password"`
	Auth        xrpc.AuthInfo `json:"auth"`
}

func GenAccount

func GenAccount(xrpcc *xrpc.Client, index int, accountType, domainSuffix string, inviteCode *string) (*AccountContext, error)

Jump to

Keyboard shortcuts

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