api

package
v0.0.0-...-1081ff4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GqlHandler

func GqlHandler(gCtx global.Context) func(ctx *fasthttp.RequestCtx)

func New

func New(gCtx global.Context) <-chan struct{}

func WebhookTwitchHandler

func WebhookTwitchHandler(gCtx global.Context) func(ctx *fasthttp.RequestCtx)

Types

type Response

type Response struct {
	Error   string `json:"error,omitempty"`
	Message string `json:"message,omitempty"`
	Reason  string `json:"reason,omitempty"`
	ReturnSignal
}

type ReturnSignal

type ReturnSignal struct {
	Status   int `json:"status,omitempty"`
	Response *graphql.Response
}

func ProcessExecution

func ProcessExecution(params *graphql.RawParams, exec graphql.GraphExecutor, baseContext context.Context) ReturnSignal

type WebhookNotification

type WebhookNotification struct {
	Subscription WebhookSubscription `json:"subscription"`
	Event        struct {
		BroadcasterUserID    string `json:"broadcaster_user_id"`
		BroadcasterUserLogin string `json:"broadcaster_user_login"`
		BroadcasterUserName  string `json:"broadcaster_user_name"`
		Title                string `json:"title"`
		Language             string `json:"language"`
		CategoryID           string `json:"category_id"`
		CategoryName         string `json:"category_name"`
		IsMature             bool   `json:"is_mature"`
	} `json:"event"`
}

type WebhookSubscription

type WebhookSubscription struct {
	ID        string `json:"id"`
	Status    string `json:"status"`
	Type      string `json:"type"`
	Version   string `json:"version"`
	Cost      int    `json:"cost"`
	Condition struct {
		BroadcasterUserID string `json:"broadcaster_user_id"`
	} `json:"condition"`
	Transport struct {
		Method   string `json:"method"`
		Callback string `json:"callback"`
	} `json:"transport"`
}

type WebhookVerifyPending

type WebhookVerifyPending struct {
	Challenge    string              `json:"challenge"`
	Subscription WebhookSubscription `json:"subscription"`
}

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

func NewDefaultWrapper

func NewDefaultWrapper(es graphql.ExecutableSchema) *Wrapper

func NewWrapper

func NewWrapper(es graphql.ExecutableSchema) *Wrapper

func (*Wrapper) AroundFields

func (s *Wrapper) AroundFields(f graphql.FieldMiddleware)

AroundFields is a convenience method for creating an extension that only implements field middleware

func (*Wrapper) AroundOperations

func (s *Wrapper) AroundOperations(f graphql.OperationMiddleware)

AroundOperations is a convenience method for creating an extension that only implements operation middleware

func (*Wrapper) AroundResponses

func (s *Wrapper) AroundResponses(f graphql.ResponseMiddleware)

AroundResponses is a convenience method for creating an extension that only implements response middleware

func (*Wrapper) Process

func (s *Wrapper) Process(ctx context.Context, params graphql.RawParams) (resp Response)

func (*Wrapper) SetErrorPresenter

func (s *Wrapper) SetErrorPresenter(f graphql.ErrorPresenterFunc)

func (*Wrapper) SetQueryCache

func (s *Wrapper) SetQueryCache(cache graphql.Cache)

func (*Wrapper) SetRecoverFunc

func (s *Wrapper) SetRecoverFunc(f graphql.RecoverFunc)

func (*Wrapper) Use

func (s *Wrapper) Use(extension graphql.HandlerExtension)

Directories

Path Synopsis
vod

Jump to

Keyboard shortcuts

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