server

package
v0.0.0-...-476b611 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoreInit

func CoreInit(ctx context.Context, c *Clients, recommender *recommend.Recommender, personalize *userpref.Personalization) *gin.Engine

func CoreInitHandlerF

func CoreInitHandlerF(ctx context.Context, handlerInitF func(*gin.Engine)) *gin.Engine

CoreInit initializes core server functionality. This is abstracted so the test server can also utilize it

func GraphQLHandler

func GraphQLHandler(queries *db.Queries, taskClient *task.Client, pub *pubsub.Client, lock *redislock.Client, recommender *recommend.Recommender, personalization *userpref.Personalization, neynar *farcaster.NeynarAPI, apqCache *apq.APQCache, publicapiF func(ctx context.Context, disableDataloaderCaching bool) *publicapi.PublicAPI) gin.HandlerFunc

func GraphqlHandlersInit

func GraphqlHandlersInit(router *gin.Engine, queries *db.Queries, taskClient *task.Client, pub *pubsub.Client, lock *redislock.Client, apqCache *apq.APQCache, authRefreshCache *redis.Cache, recommender *recommend.Recommender, personalization *userpref.Personalization, neynar *farcaster.NeynarAPI, publicapiF func(ctx context.Context, disableDataloaderCaching bool) *publicapi.PublicAPI)

func HandlersInit

func HandlersInit(router *gin.Engine, repos *postgres.Repositories, queries *db.Queries, httpClient *http.Client, ethClient *ethclient.Client, ipfsClient *shell.Shell, arweaveClient *goar.Client, storageClient *storage.Client, throttler *throttle.Locker, taskClient *task.Client, pub *pubsub.Client, lock *redislock.Client, secrets *secretmanager.Client, graphqlAPQCache, feedCache, socialCache, authRefreshCache, tokenManageCache, oneTimeLoginCache *redis.Cache, magicClient *magicclient.API, recommender *recommend.Recommender, personalization *userpref.Personalization, neynar *farcaster.NeynarAPI, mintLimiter *limiters.KeyRateLimiter) *gin.Engine

func Init

func Init()

Init initializes the server

func SetDefaults

func SetDefaults()

Types

type Clients

type Clients struct {
	Repos           *postgres.Repositories
	Queries         *db.Queries
	HTTPClient      *http.Client
	EthClient       *ethclient.Client
	IPFSClient      *shell.Shell
	ArweaveClient   *goar.Client
	StorageClient   *storage.Client
	TaskClient      *task.Client
	SecretClient    *secretmanager.Client
	PubSubClient    *pubsub.Client
	MagicLinkClient *magicclient.API
	// contains filtered or unexported fields
}

func ClientInit

func ClientInit(ctx context.Context) *Clients

func (*Clients) Close

func (c *Clients) Close()

Jump to

Keyboard shortcuts

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