helpers

package
v0.0.0-...-6d36bb5 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionToken  utils.Key = "session-token"
	RateLimitFunc utils.Key = "rate-limit-fn"
	PipelineKey   utils.Key = "pipeline"
)

Variables

This section is empty.

Functions

func BanStructureToModel

func BanStructureToModel(s structures.Ban) *model.Ban

func FilterImages

func FilterImages(images []*model.Image, formats []model.ImageFormat) []*model.Image

func GetFields

func GetFields(ctx context.Context) map[string]Field

func GetNestedPreloads

func GetNestedPreloads(ctx *graphql.OperationContext, fields []graphql.CollectedField) map[string]Field

func ReportStructureToModel

func ReportStructureToModel(s structures.Report) *model.Report

Types

type ErrorGQL

type ErrorGQL string
const (
	ErrUnauthorized        ErrorGQL = "unauthorized"
	ErrAccessDenied        ErrorGQL = "access denied"
	ErrUnknownEmote        ErrorGQL = "unknown emote"
	ErrUnknownUser         ErrorGQL = "unknown user"
	ErrUnknownRole         ErrorGQL = "unknown role"
	ErrUnknownReport       ErrorGQL = "unknown report"
	ErrBadObjectID         ErrorGQL = "bad object id"
	ErrInternalServerError ErrorGQL = "internal server error"
	ErrBadInt              ErrorGQL = "bad int"
	ErrDontBeSilly         ErrorGQL = "don't be silly"
)

func (ErrorGQL) Error

func (e ErrorGQL) Error() string

type Field

type Field struct {
	Name     string
	Children map[string]Field
}

Jump to

Keyboard shortcuts

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