Documentation ¶
Index ¶
- func GqlHandler(gCtx global.Context) func(ctx *fasthttp.RequestCtx)
- func New(gCtx global.Context) <-chan struct{}
- func WebhookTwitchHandler(gCtx global.Context) func(ctx *fasthttp.RequestCtx)
- type Response
- type ReturnSignal
- type WebhookNotification
- type WebhookSubscription
- type WebhookVerifyPending
- type Wrapper
- func (s *Wrapper) AroundFields(f graphql.FieldMiddleware)
- func (s *Wrapper) AroundOperations(f graphql.OperationMiddleware)
- func (s *Wrapper) AroundResponses(f graphql.ResponseMiddleware)
- func (s *Wrapper) Process(ctx context.Context, params graphql.RawParams) (resp Response)
- func (s *Wrapper) SetErrorPresenter(f graphql.ErrorPresenterFunc)
- func (s *Wrapper) SetQueryCache(cache graphql.Cache)
- func (s *Wrapper) SetRecoverFunc(f graphql.RecoverFunc)
- func (s *Wrapper) Use(extension graphql.HandlerExtension)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GqlHandler ¶
func GqlHandler(gCtx global.Context) func(ctx *fasthttp.RequestCtx)
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 ¶
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) SetErrorPresenter ¶
func (s *Wrapper) SetErrorPresenter(f graphql.ErrorPresenterFunc)
func (*Wrapper) SetQueryCache ¶
func (*Wrapper) SetRecoverFunc ¶
func (s *Wrapper) SetRecoverFunc(f graphql.RecoverFunc)
func (*Wrapper) Use ¶
func (s *Wrapper) Use(extension graphql.HandlerExtension)
Click to show internal directories.
Click to hide internal directories.