Documentation ¶
Index ¶
- Variables
- func OnAuthorizate(authInfo AuthorizateInfo) (err definitionError.GQLError)
- func OnIntrospection() (err definitionError.GQLError)
- type Access
- type AuthorizateInfo
- type DefaultArguments
- type Directives
- type EventID
- type Gql
- func (o *Gql) Directive(resolver string, object resolvers.Directive)
- func (o *Gql) GQLRender(w http.ResponseWriter, r *http.Request, sessionID string) (isErr bool)
- func (o *Gql) GQLRenderSubscription(mt int, message []byte, socketId, sessionID string)
- func (o *Gql) GetScalars() Scalars
- func (o *Gql) GetSchema() *ast.Schema
- func (o *Gql) ObjectType(resolver string, object resolvers.ObjectTypeInterface)
- func (o *Gql) Scalar(resolver string, object resolvers.Scalar)
- func (o *Gql) WebsocketResponse(request HttpRequest, socketId string, requestID RequestID, mt int, ...)
- func (o *Gql) WriteWebsocketMessage(mt int, socketId string, requestID RequestID, response *HttpResponse)
- type Grant
- type HttpRequest
- type HttpResponse
- type ObjectTypes
- type OperationID
- type RequestID
- type ResolverName
- type Response
- type Scalars
- type SocketID
- type SourceEvents
- type Subscription
- type SubscriptionClose
- type TypeName
- type WebSocketRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var PubSub = &SourceEvents{ subscriptionEvents: make(map[OperationID]chan interface{}, 0), operationEvents: make(map[OperationID]map[EventID]*Subscription, 0), }
Functions ¶
func OnAuthorizate ¶ added in v0.12.0
func OnAuthorizate(authInfo AuthorizateInfo) (err definitionError.GQLError)
func OnIntrospection ¶ added in v0.12.0
func OnIntrospection() (err definitionError.GQLError)
Types ¶
type AuthorizateInfo ¶ added in v0.12.0
type AuthorizateInfo struct { Operation string SrcType TypeName DstType TypeName Resolver ResolverName SessionID string }
type DefaultArguments ¶
type Directives ¶
type Gql ¶ added in v0.15.0
type Gql struct { OnIntrospection func() (err definitionError.GQLError) OnAuthorizate func(authInfo AuthorizateInfo) definitionError.GQLError OnScalarArgument func(scalarType string, value interface{}) (r interface{}) // contains filtered or unexported fields }
func Init ¶
func Init(filesystem systemutils.FSInterface, folder string) *Gql
func (*Gql) GQLRenderSubscription ¶ added in v0.15.0
func (*Gql) GetScalars ¶ added in v0.15.0
func (*Gql) ObjectType ¶ added in v0.15.0
func (o *Gql) ObjectType(resolver string, object resolvers.ObjectTypeInterface)
func (*Gql) WebsocketResponse ¶ added in v0.15.0
func (*Gql) WriteWebsocketMessage ¶ added in v0.15.0
func (o *Gql) WriteWebsocketMessage(mt int, socketId string, requestID RequestID, response *HttpResponse)
type HttpRequest ¶
type HttpResponse ¶
type ObjectTypes ¶
type ObjectTypes map[string]resolvers.ObjectTypeInterface
type OperationID ¶
type OperationID string
type ResolverName ¶ added in v0.12.0
type ResolverName string
type SourceEvents ¶
type SourceEvents struct {
// contains filtered or unexported fields
}
func (*SourceEvents) Publish ¶
func (o *SourceEvents) Publish(operationID OperationID, value interface{})
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
type SubscriptionClose ¶
type SubscriptionClose struct{}
type WebSocketRequest ¶
type WebSocketRequest struct { Id string `json:"id"` Type string `json:"type"` Payload HttpRequest `json:"payload"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.