loaders

package
v0.0.0-...-8d94386 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(ctx context.Context) context.Context

func Middleware

func Middleware(next http.Handler) http.Handler

Types

type Loaders

type Loaders struct {
	EntitiesByParticipantID EntitiesByParticipantIDLoader

	UsersByID           UsersByIDLoader
	UsersByName         UsersByNameLoader
	TrackersByID        TrackersByIDLoader
	TrackersByName      TrackersByNameLoader
	TrackersByOwnerName TrackersByOwnerNameLoader
	TicketsByID         TicketsByIDLoader
	TicketsByTrackerID  TicketsByTrackerIDLoader
	LabelsByID          LabelsByIDLoader

	// Upserts
	ParticipantsByUserID ParticipantsByUserIDLoader
	// Upserts & fetches from meta.sr.ht
	ParticipantsByUsername ParticipantsByUsernameLoader

	CommentsByIDUnsafe    CommentsByIDLoader
	SubsByTicketIDUnsafe  SubsByTicketIDLoader
	SubsByTrackerIDUnsafe SubsByTrackerIDLoader
}

func ForContext

func ForContext(ctx context.Context) *Loaders

type UserInfo

type UserInfo struct {
	Created          time.Time `json:"created"`
	Updated          time.Time `json:"updated"`
	Username         string    `json:"username"`
	Email            string    `json:"email"`
	Url              *string   `json:"url"`
	Location         *string   `json:"location"`
	Bio              *string   `json:"bio"`
	UserType         string    `json:"userType"`
	SuspensionNotice *string   `json:"suspensionNotice"`
}

type UserResponse

type UserResponse struct {
	Data map[string]*UserInfo `json:"data"`
}

Jump to

Keyboard shortcuts

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