test

package
v0.0.0-...-07f0968 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rig

type Rig interface {
	// root http server handler
	RootHandler() http.HandlerFunc
	// unique
	Unique() int
	UniqueStr() string
	// http
	NewClient() *app.Client
	// log
	Log() log.Log
	// users
	Ali() User
	Bob() User
	Cat() User
	Dan() User
	// services
	Cache() iredis.Pool
	User() sqlh.ReplicaSet
	Pwd() sqlh.ReplicaSet
	Data() sqlh.ReplicaSet
	Email() email.Client
	Store() store.Client
	CreateUser(handlePrefix string) User
	// cleanup
	CleanUp()
}

func NewMeRig

func NewMeRig(
	config *config.Config,
	eps []*app.Endpoint,
	onDelete func(app.Tlbx, ID),
	onSetSocials func(app.Tlbx, *user.User),
	validateFcmTopic func(app.Tlbx, IDs) (sql.Tx, error),
	enableJin bool,
	buckets ...string,
) Rig

func NewNoRig

func NewNoRig(
	config *config.Config,
	eps []*app.Endpoint,
	buckets ...string,
) Rig

func NewRig

func NewRig(
	config *config.Config,
	eps []*app.Endpoint,
	useUsers bool,
	onDelete func(app.Tlbx, ID),
	onSetSocials func(app.Tlbx, *user.User),
	validateFcmTopic func(app.Tlbx, IDs) (sql.Tx, error),
	enableJin bool,
	rateLimitMware func(iredis.Pool, ...int) func(app.Tlbx),
	buckets ...string,
) Rig

type User

type User interface {
	Client() *app.Client
	ID() ID
	Email() string
	Pwd() string
}

Jump to

Keyboard shortcuts

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