Documentation ¶
Index ¶
- type AssetGetURLHandler
- type AssetUploadURLHandler
- type DeviceRegisterHandler
- type DeviceReigsterResult
- type HomeHandler
- type LoginHandler
- type LogoutHandler
- type PasswordHandler
- type PubSubHandler
- type PushToDeviceHandler
- type PushToUserHandler
- type QueryParser
- type RecordDeleteHandler
- type RecordFetchHandler
- type RecordQueryHandler
- type RecordSaveHandler
- type RelationAddHandler
- type RelationQueryHandler
- type RelationRemoveHandler
- type SignupHandler
- type SubscriptionDeleteHandler
- type SubscriptionFetchAllHandler
- type SubscriptionFetchHandler
- type SubscriptionSaveHandler
- type UserLinkHandler
- type UserQueryHandler
- type UserUpdateHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetGetURLHandler ¶
type AssetGetURLHandler struct { AssetStore skyAsset.Store `inject:"AssetStore"` DBConn router.Processor `preprocessor:"dbconn"` // contains filtered or unexported fields }
func (*AssetGetURLHandler) GetPreprocessors ¶ added in v0.4.1
func (h *AssetGetURLHandler) GetPreprocessors() []router.Processor
func (*AssetGetURLHandler) Handle ¶ added in v0.4.0
func (h *AssetGetURLHandler) Handle(payload *router.Payload, response *router.Response)
func (*AssetGetURLHandler) Setup ¶ added in v0.4.1
func (h *AssetGetURLHandler) Setup()
type AssetUploadURLHandler ¶
type AssetUploadURLHandler struct { AssetStore skyAsset.Store `inject:"AssetStore"` AccessKey router.Processor `preprocessor:"accesskey"` DBConn router.Processor `preprocessor:"dbconn"` // contains filtered or unexported fields }
AssetUploadURLHandler receives and persists a file to be associated by Record.
Example curl:
curl -XPUT \ -H 'X-Skygear-API-Key: apiKey' \ -H 'Content-Type: text/plain' \ --data-binary '@file.txt' \ http://localhost:3000/files/filename
func (*AssetUploadURLHandler) GetPreprocessors ¶ added in v0.4.1
func (h *AssetUploadURLHandler) GetPreprocessors() []router.Processor
func (*AssetUploadURLHandler) Handle ¶ added in v0.4.0
func (h *AssetUploadURLHandler) Handle(payload *router.Payload, response *router.Response)
func (*AssetUploadURLHandler) Setup ¶ added in v0.4.1
func (h *AssetUploadURLHandler) Setup()
type DeviceRegisterHandler ¶
type DeviceRegisterHandler struct { Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` RequireUser router.Processor `preprocessor:"require_user"` // contains filtered or unexported fields }
DeviceRegisterHandler creates or updates a device and associates it to a user
Example to create a new device:
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF { "action": "device:register", "access_token": "some-access-token", "type": "ios", "device_token": "some-device-token" } EOF
Example to update an existing device:
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF { "action": "device:register", "access_token": "some-access-token", "id": "existing-device-id", "type": "ios", "device_token": "new-device-token" } EOF
func (*DeviceRegisterHandler) GetPreprocessors ¶ added in v0.4.1
func (h *DeviceRegisterHandler) GetPreprocessors() []router.Processor
func (*DeviceRegisterHandler) Handle ¶ added in v0.4.0
func (h *DeviceRegisterHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*DeviceRegisterHandler) Setup ¶ added in v0.4.1
func (h *DeviceRegisterHandler) Setup()
type DeviceReigsterResult ¶
type DeviceReigsterResult struct {
ID string `json:"id"`
}
DeviceReigsterResult is the result put onto response.Result on successful call of DeviceRegisterHandler
type HomeHandler ¶
type HomeHandler struct { }
HomeHandler temp landing. FIXME
func (*HomeHandler) GetPreprocessors ¶ added in v0.4.1
func (h *HomeHandler) GetPreprocessors() []router.Processor
func (*HomeHandler) Handle ¶ added in v0.4.0
func (h *HomeHandler) Handle(playload *router.Payload, response *router.Response)
func (*HomeHandler) Setup ¶ added in v0.4.1
func (h *HomeHandler) Setup()
type LoginHandler ¶
type LoginHandler struct { TokenStore authtoken.Store `inject:"TokenStore"` ProviderRegistry *provider.Registry `inject:"ProviderRegistry"` AccessKey router.Processor `preprocessor:"accesskey"` DBConn router.Processor `preprocessor:"dbconn"` PluginReady router.Processor `preprocessor:"plugin"` // contains filtered or unexported fields }
LoginHandler authenticate user with password
The user can be either identified by username or password.
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF
{ "action": "auth:login", "username": "rickmak", "email": "rick.mak@gmail.com", "password": "123456" }
EOF
func (*LoginHandler) GetPreprocessors ¶ added in v0.4.1
func (h *LoginHandler) GetPreprocessors() []router.Processor
func (*LoginHandler) Handle ¶ added in v0.4.0
func (h *LoginHandler) Handle(payload *router.Payload, response *router.Response)
func (*LoginHandler) Setup ¶ added in v0.4.1
func (h *LoginHandler) Setup()
type LogoutHandler ¶
type LogoutHandler struct { TokenStore authtoken.Store `inject:"TokenStore"` Authenticator router.Processor `preprocessor:"authenticator"` PluginReady router.Processor `preprocessor:"plugin"` // contains filtered or unexported fields }
LogoutHandler receives an access token and invalidates it
func (*LogoutHandler) GetPreprocessors ¶ added in v0.4.1
func (h *LogoutHandler) GetPreprocessors() []router.Processor
func (*LogoutHandler) Handle ¶ added in v0.4.0
func (h *LogoutHandler) Handle(payload *router.Payload, response *router.Response)
func (*LogoutHandler) Setup ¶ added in v0.4.1
func (h *LogoutHandler) Setup()
type PasswordHandler ¶
type PasswordHandler struct { Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` // contains filtered or unexported fields }
PasswordHandler change the current user password
PasswordHandler receives three parameters:
* old_password (string, required) * password (string, required)
If user is not logged in, an 404 not found will return.
Current implementation curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF { "action": "auth:password", "old_password": "rick.mak@gmail.com", "password": "123456" } EOF
Response return existing access toektn if not invalidate
TODO: Input accept `user_id` and `invalidate`. If `user_id` is supplied, will check authorization policy and see if existing accept `invalidate` and invaldate all existing access token. Return userInfoID with new AccessToken if the invalidate is true
func (*PasswordHandler) GetPreprocessors ¶ added in v0.4.1
func (h *PasswordHandler) GetPreprocessors() []router.Processor
func (*PasswordHandler) Handle ¶ added in v0.4.0
func (h *PasswordHandler) Handle(payload *router.Payload, response *router.Response)
func (*PasswordHandler) Setup ¶ added in v0.4.1
func (h *PasswordHandler) Setup()
type PubSubHandler ¶ added in v0.4.0
type PubSubHandler struct { WebSocket *pubsub.WsPubSub AccessKey router.Processor `preprocessor:"accesskey"` // contains filtered or unexported fields }
func (*PubSubHandler) GetPreprocessors ¶ added in v0.4.1
func (h *PubSubHandler) GetPreprocessors() []router.Processor
func (*PubSubHandler) Handle ¶ added in v0.4.0
func (h *PubSubHandler) Handle(payload *router.Payload, response *router.Response)
func (*PubSubHandler) Setup ¶ added in v0.4.1
func (h *PubSubHandler) Setup()
type PushToDeviceHandler ¶
type PushToDeviceHandler struct { NotificationSender push.Sender `inject:"PushSender"` AccessKey router.Processor `preprocessor:"accesskey"` DBConn router.Processor `preprocessor:"dbconn"` InjectDB router.Processor `preprocessor:"inject_db"` Notification router.Processor `preprocessor:"notification"` // contains filtered or unexported fields }
func (*PushToDeviceHandler) GetPreprocessors ¶ added in v0.4.1
func (h *PushToDeviceHandler) GetPreprocessors() []router.Processor
func (*PushToDeviceHandler) Handle ¶ added in v0.4.0
func (h *PushToDeviceHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*PushToDeviceHandler) Setup ¶ added in v0.4.1
func (h *PushToDeviceHandler) Setup()
type PushToUserHandler ¶
type PushToUserHandler struct { NotificationSender push.Sender `inject:"PushSender"` AccessKey router.Processor `preprocessor:"accesskey"` DBConn router.Processor `preprocessor:"dbconn"` InjectDB router.Processor `preprocessor:"inject_db"` Notification router.Processor `preprocessor:"notification"` // contains filtered or unexported fields }
func (*PushToUserHandler) GetPreprocessors ¶ added in v0.4.1
func (h *PushToUserHandler) GetPreprocessors() []router.Processor
func (*PushToUserHandler) Handle ¶ added in v0.4.0
func (h *PushToUserHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*PushToUserHandler) Setup ¶ added in v0.4.1
func (h *PushToUserHandler) Setup()
type QueryParser ¶
type QueryParser struct {
UserID string
}
QueryParser is a context for parsing raw query to skydb.Query
type RecordDeleteHandler ¶
type RecordDeleteHandler struct { HookRegistry *hook.Registry `inject:"HookRegistry"` AccessModel skydb.AccessModel `inject:"AccessModel"` Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` RequireUser router.Processor `preprocessor:"require_user"` PluginReady router.Processor `preprocessor:"plugin"` // contains filtered or unexported fields }
RecordDeleteHandler is dummy implementation on delete Records
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF
{ "action": "record:delete", "access_token": "validToken", "database_id": "_private", "ids": ["note/EA6A3E68-90F3-49B5-B470-5FFDB7A0D4E8"] }
EOF
func (*RecordDeleteHandler) GetPreprocessors ¶ added in v0.4.1
func (h *RecordDeleteHandler) GetPreprocessors() []router.Processor
func (*RecordDeleteHandler) Handle ¶ added in v0.4.0
func (h *RecordDeleteHandler) Handle(payload *router.Payload, response *router.Response)
func (*RecordDeleteHandler) Setup ¶ added in v0.4.1
func (h *RecordDeleteHandler) Setup()
type RecordFetchHandler ¶
type RecordFetchHandler struct { AssetStore asset.Store `inject:"AssetStore"` AccessModel skydb.AccessModel `inject:"AccessModel"` Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` // contains filtered or unexported fields }
RecordFetchHandler is dummy implementation on fetching Records
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF
{ "action": "record:fetch", "access_token": "validToken", "database_id": "_private", "ids": ["note/1004", "note/1005"] }
EOF
func (*RecordFetchHandler) GetPreprocessors ¶ added in v0.4.1
func (h *RecordFetchHandler) GetPreprocessors() []router.Processor
func (*RecordFetchHandler) Handle ¶ added in v0.4.0
func (h *RecordFetchHandler) Handle(payload *router.Payload, response *router.Response)
func (*RecordFetchHandler) Setup ¶ added in v0.4.1
func (h *RecordFetchHandler) Setup()
type RecordQueryHandler ¶
type RecordQueryHandler struct { AssetStore asset.Store `inject:"AssetStore"` AccessModel skydb.AccessModel `inject:"AccessModel"` Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` // contains filtered or unexported fields }
RecordQueryHandler is dummy implementation on fetching Records
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF
{ "action": "record:query", "access_token": "validToken", "database_id": "_private", "record_type": "note", "sort": [ [{"$val": "noteOrder", "$type": "desc"}, "asc"] ] }
EOF
func (*RecordQueryHandler) GetPreprocessors ¶ added in v0.4.1
func (h *RecordQueryHandler) GetPreprocessors() []router.Processor
func (*RecordQueryHandler) Handle ¶ added in v0.4.0
func (h *RecordQueryHandler) Handle(payload *router.Payload, response *router.Response)
func (*RecordQueryHandler) Setup ¶ added in v0.4.1
func (h *RecordQueryHandler) Setup()
type RecordSaveHandler ¶
type RecordSaveHandler struct { HookRegistry *hook.Registry `inject:"HookRegistry"` AssetStore asset.Store `inject:"AssetStore"` AccessModel skydb.AccessModel `inject:"AccessModel"` Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` RequireUser router.Processor `preprocessor:"require_user"` PluginReady router.Processor `preprocessor:"plugin"` // contains filtered or unexported fields }
RecordSaveHandler is dummy implementation on save/modify Records
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF
{ "action": "record:save", "access_token": "validToken", "database_id": "_private", "records": [{ "_id": "note/EA6A3E68-90F3-49B5-B470-5FFDB7A0D4E8", "content": "ewdsa", "_access": [{ "relation": "friend", "level": "write" }] }] }
EOF
Save with reference
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF
{ "action": "record:save", "database_id": "_private", "access_token": "986bee3b-8dd9-45c2-b40c-8b6ef274cf12", "records": [ { "collection": { "$type": "ref", "$id": "collection/10" }, "noteOrder": 1, "content": "hi", "_id": "note/71BAE736-E9C5-43CB-ADD1-D8633B80CAFA", "_type": "record" } ] }
EOF
func (*RecordSaveHandler) GetPreprocessors ¶ added in v0.4.1
func (h *RecordSaveHandler) GetPreprocessors() []router.Processor
func (*RecordSaveHandler) Handle ¶ added in v0.4.0
func (h *RecordSaveHandler) Handle(payload *router.Payload, response *router.Response)
func (*RecordSaveHandler) Setup ¶ added in v0.4.1
func (h *RecordSaveHandler) Setup()
type RelationAddHandler ¶
type RelationAddHandler struct { Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` // contains filtered or unexported fields }
RelationAddHandler add current user relation
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF
{ "action": "relation:add", "access_token": "ACCESS_TOKEN", "name": "follow", "targets": [ "1001", "1002" ] }
EOF
{ "request_id": "REQUEST_ID", "result": [ { "id": "1001", "type": "user", "data": { "_id": "1001", "username": "user1001", "email": "user1001@skygear.io" } }, { "id": "1002", "type": "error", "data": { "type": "ResourceFetchFailure", "code": 101, "message": "failed to fetch user id = 1002" } } ] }
func (*RelationAddHandler) GetPreprocessors ¶ added in v0.4.1
func (h *RelationAddHandler) GetPreprocessors() []router.Processor
func (*RelationAddHandler) Handle ¶ added in v0.4.0
func (h *RelationAddHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*RelationAddHandler) Setup ¶ added in v0.4.1
func (h *RelationAddHandler) Setup()
type RelationQueryHandler ¶
type RelationQueryHandler struct { Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` // contains filtered or unexported fields }
RelationQueryHandler query user from current users' relation
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF
{ "action": "relation:query", "access_token": "ACCESS_TOKEN", "name": "follow", "direction": "outward" "limit": 2 "offset": 0 }
EOF
{ "request_id": "REQUEST_ID", "result": [ { "id": "1001", "type": "user", "data": { "_id": "1001", "username": "user1001", "email": "user1001@skygear.io" } }, { "id": "1002", "type": "user", "data": { "_id": "1002", "username": "user1002", "email": "user1001@skygear.io" } } ], "info": { "count": 2 } }
func (*RelationQueryHandler) GetPreprocessors ¶ added in v0.4.1
func (h *RelationQueryHandler) GetPreprocessors() []router.Processor
func (*RelationQueryHandler) Handle ¶ added in v0.4.0
func (h *RelationQueryHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*RelationQueryHandler) Setup ¶ added in v0.4.1
func (h *RelationQueryHandler) Setup()
type RelationRemoveHandler ¶
type RelationRemoveHandler struct { Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` // contains filtered or unexported fields }
RelationRemoveHandler remove a users' relation to other users
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF
{ "action": "relation:remove", "access_token": "ACCESS_TOKEN", "name": "follow", "targets": [ "1001", "1002" ] }
EOF
func (*RelationRemoveHandler) GetPreprocessors ¶ added in v0.4.1
func (h *RelationRemoveHandler) GetPreprocessors() []router.Processor
func (*RelationRemoveHandler) Handle ¶ added in v0.4.0
func (h *RelationRemoveHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*RelationRemoveHandler) Setup ¶ added in v0.4.1
func (h *RelationRemoveHandler) Setup()
type SignupHandler ¶
type SignupHandler struct { TokenStore authtoken.Store `inject:"TokenStore"` ProviderRegistry *provider.Registry `inject:"ProviderRegistry"` AccessKey router.Processor `preprocessor:"accesskey"` DBConn router.Processor `preprocessor:"dbconn"` PluginReady router.Processor `preprocessor:"plugin"` // contains filtered or unexported fields }
SignupHandler creates an UserInfo with the supplied information.
SignupHandler receives three parameters:
* username (string, unique, optional) * email (string, unqiue, optional) * password (string, optional)
If both username and email is not supplied, an anonymous user is created and have user_id auto-generated. SignupHandler writes an error to response.Result if the supplied username or email collides with an existing username.
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF { "action": "auth:signup", "username": "rickmak", "email": "rick.mak@gmail.com", "password": "123456" } EOF
func (*SignupHandler) GetPreprocessors ¶ added in v0.4.1
func (h *SignupHandler) GetPreprocessors() []router.Processor
func (*SignupHandler) Handle ¶ added in v0.4.0
func (h *SignupHandler) Handle(payload *router.Payload, response *router.Response)
func (*SignupHandler) Setup ¶ added in v0.4.1
func (h *SignupHandler) Setup()
type SubscriptionDeleteHandler ¶
type SubscriptionDeleteHandler struct { }
SubscriptionDeleteHandler deletes subscriptions from the specified Database.
Example curl:
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF { "action": "subscription:delete", "access_token": "ACCESS_TOKEN", "database_id": "_private", "subscription_ids": ["SUBSCRIPTION_ID"] } EOF
func (*SubscriptionDeleteHandler) GetPreprocessors ¶ added in v0.4.1
func (h *SubscriptionDeleteHandler) GetPreprocessors() []router.Processor
func (*SubscriptionDeleteHandler) Handle ¶ added in v0.4.0
func (h *SubscriptionDeleteHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*SubscriptionDeleteHandler) Setup ¶ added in v0.4.1
func (h *SubscriptionDeleteHandler) Setup()
type SubscriptionFetchAllHandler ¶
type SubscriptionFetchAllHandler struct { Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` RequireUser router.Processor `preprocessor:"require_user"` // contains filtered or unexported fields }
SubscriptionFetchAllHandler fetches all subscriptions of a device
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF { "action": "subscription:fetch_all", "access_token": "ACCESS_TOKEN", "database_id": "_private", "device_id": "DEVICE_ID" } EOF
func (*SubscriptionFetchAllHandler) GetPreprocessors ¶ added in v0.4.1
func (h *SubscriptionFetchAllHandler) GetPreprocessors() []router.Processor
func (*SubscriptionFetchAllHandler) Handle ¶ added in v0.4.0
func (h *SubscriptionFetchAllHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*SubscriptionFetchAllHandler) Setup ¶ added in v0.4.1
func (h *SubscriptionFetchAllHandler) Setup()
type SubscriptionFetchHandler ¶
type SubscriptionFetchHandler struct { Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` RequireUser router.Processor `preprocessor:"require_user"` // contains filtered or unexported fields }
SubscriptionFetchHandler fetches subscriptions from the specified Database.
Example curl:
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF { "action": "subscription:fetch", "access_token": "ACCESS_TOKEN", "database_id": "_private", "device_id": "DEVICE_ID", "subscription_ids": ["SUBSCRIPTION_ID"] } EOF
func (*SubscriptionFetchHandler) GetPreprocessors ¶ added in v0.4.1
func (h *SubscriptionFetchHandler) GetPreprocessors() []router.Processor
func (*SubscriptionFetchHandler) Handle ¶ added in v0.4.0
func (h *SubscriptionFetchHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*SubscriptionFetchHandler) Setup ¶ added in v0.4.1
func (h *SubscriptionFetchHandler) Setup()
type SubscriptionSaveHandler ¶
type SubscriptionSaveHandler struct { }
SubscriptionSaveHandler saves one or more subscriptions associate with a database.
Example curl:
curl -X POST -H "Content-Type: application/json" \ -d @- http://localhost:3000/ <<EOF { "action": "subscription:save", "access_token": "ACCESS_TOKEN", "database_id": "_private", "device_id": "DEVICE_ID", "subscriptions": [ { "id": "SUBSCRIPTION_ID", "notification_info": { "aps": { "alert": { "body": "BODY_TEXT", "action-loc-key": "ACTION_LOC_KEY", "loc-key": "LOC_KEY", "loc-args": ["LOC_ARGS"], "launch-image": "LAUNCH_IMAGE" }, "sound": "SOUND_NAME", "should-badge": true, "should-send-content-available": true } }, "type": "query", "query": { "record_type": "RECORD_TYPE", "predicate": {} } } ] } EOF
func (*SubscriptionSaveHandler) GetPreprocessors ¶ added in v0.4.1
func (h *SubscriptionSaveHandler) GetPreprocessors() []router.Processor
func (*SubscriptionSaveHandler) Handle ¶ added in v0.4.0
func (h *SubscriptionSaveHandler) Handle(rpayload *router.Payload, response *router.Response)
func (*SubscriptionSaveHandler) Setup ¶ added in v0.4.1
func (h *SubscriptionSaveHandler) Setup()
type UserLinkHandler ¶
type UserLinkHandler struct { ProviderRegistry *provider.Registry `inject:"ProviderRegistry"` Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` RequireUser router.Processor `preprocessor:"require_user"` // contains filtered or unexported fields }
UserLinkHandler lets user associate third-party accounts with the user, with third-party authentication handled by plugin.
func (*UserLinkHandler) GetPreprocessors ¶ added in v0.4.1
func (h *UserLinkHandler) GetPreprocessors() []router.Processor
func (*UserLinkHandler) Handle ¶ added in v0.4.0
func (h *UserLinkHandler) Handle(payload *router.Payload, response *router.Response)
func (*UserLinkHandler) Setup ¶ added in v0.4.1
func (h *UserLinkHandler) Setup()
type UserQueryHandler ¶
type UserQueryHandler struct { Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` // contains filtered or unexported fields }
func (*UserQueryHandler) GetPreprocessors ¶ added in v0.4.1
func (h *UserQueryHandler) GetPreprocessors() []router.Processor
func (*UserQueryHandler) Handle ¶ added in v0.4.0
func (h *UserQueryHandler) Handle(payload *router.Payload, response *router.Response)
func (*UserQueryHandler) Setup ¶ added in v0.4.1
func (h *UserQueryHandler) Setup()
type UserUpdateHandler ¶
type UserUpdateHandler struct { AccessModel skydb.AccessModel `inject:"AccessModel"` Authenticator router.Processor `preprocessor:"authenticator"` DBConn router.Processor `preprocessor:"dbconn"` InjectUser router.Processor `preprocessor:"inject_user"` InjectDB router.Processor `preprocessor:"inject_db"` RequireUser router.Processor `preprocessor:"require_user"` // contains filtered or unexported fields }
func (*UserUpdateHandler) GetPreprocessors ¶ added in v0.4.1
func (h *UserUpdateHandler) GetPreprocessors() []router.Processor
func (*UserUpdateHandler) Handle ¶ added in v0.4.0
func (h *UserUpdateHandler) Handle(payload *router.Payload, response *router.Response)
func (*UserUpdateHandler) Setup ¶ added in v0.4.1
func (h *UserUpdateHandler) Setup()