Documentation
¶
Index ¶
- type Auth
- type AuthCtx
- type Engine
- func (e *Engine) CreateTable(name string, schema interface{})
- func (e *Engine) ExecuteMutation(mutation string, params map[string]interface{}, clientID string, ...) (interface{}, error)
- func (e *Engine) ExecuteQuery(query string, params map[string]interface{}, ...) (interface{}, error)
- func (e *Engine) GetDependentQueries(tableName string) []string
- func (e *Engine) Handle(w http.ResponseWriter, r *http.Request)
- func (e *Engine) InvalidateTag(tag string)
- func (e *Engine) InvalidateTags(tags []string)
- func (e *Engine) OnConnect(clientID string) error
- func (e *Engine) OnDisconnect(clientID string) error
- func (e *Engine) OnReceiveMessage(clientID string, msg map[string]interface{}) error
- func (e *Engine) RegisterMutation(name string, mutation func(ctx *MutationCtx) interface{})
- func (e *Engine) RegisterQuery(name string, query func(ctx *QueryCtx) interface{}, dependencies []string)
- func (e *Engine) SetAllowedOrigins(allowedOrigins []string)
- func (e *Engine) SetAuth(auth Auth)
- func (e *Engine) SetCheckOrigin(checkOrigin func(r *http.Request) bool)
- type MutationCtx
- type QueryCtx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) CreateTable ¶
func (*Engine) ExecuteMutation ¶
func (*Engine) ExecuteQuery ¶
func (e *Engine) ExecuteQuery(query string, params map[string]interface{}, subscription *reactivity.Subscription, forceSend bool) (interface{}, error)
func (*Engine) GetDependentQueries ¶
func (*Engine) InvalidateTag ¶
func (*Engine) InvalidateTags ¶ added in v0.2.0
InvalidateTags re-runs each distinct subscription that listens to any of the given tags. Subscriptions are snapshotted before any query executes so a re-run that picks up additional tags (e.g. auto-tracked primary keys) cannot cause the same mutation to fire the query a second time.
func (*Engine) OnDisconnect ¶
func (*Engine) OnReceiveMessage ¶
func (*Engine) RegisterMutation ¶
func (e *Engine) RegisterMutation(name string, mutation func(ctx *MutationCtx) interface{})
func (*Engine) RegisterQuery ¶
func (*Engine) SetAllowedOrigins ¶
Simple helper to set the allowed origins for the websocket connection
type MutationCtx ¶
Click to show internal directories.
Click to hide internal directories.