Documentation
¶
Index ¶
- type AggregateRequest
- type AllRequest
- type BatchRequest
- type CreateFileRequest
- type CreateRequest
- type DeleteRequest
- type FeedData
- type File
- type FileReader
- type FunctionsPayload
- type FunctionsRequest
- type ListFilesRequest
- type ListFilesResponse
- type Message
- type ReadOptions
- type ReadRequest
- type RealtimeRequest
- type RealtimeResponse
- type ServiceRegisterRequest
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateRequest ¶
type AggregateRequest struct {
Pipeline interface{} `json:"pipe"`
Operation string `json:"op"`
}
AggregateRequest is the http body received for an aggregate request
type AllRequest ¶
type AllRequest struct {
Col string `json:"col"`
Document interface{} `json:"doc"`
Operation string `json:"op"`
Find map[string]interface{} `json:"find"`
Update map[string]interface{} `json:"update"`
Type string `json:"type"`
}
AllRequest is a union of parameters required in the various requests
type BatchRequest ¶
type BatchRequest struct {
Requests []AllRequest `json:"reqs"`
}
BatchRequest is the http body for a batch request
type CreateFileRequest ¶
type CreateFileRequest struct {
Path string `json:"path"`
Name string `json:"name"`
Type string `json:"type"` // Either file or dir
MakeAll bool `json:"makeAll"` // This option is only available for creatig directories
}
CreateFileRequest is the request received to create a new file or directory
type CreateRequest ¶
type CreateRequest struct {
Document interface{} `json:"doc"`
Operation string `json:"op"`
}
CreateRequest is the http body received for a create request
type DeleteRequest ¶
type DeleteRequest struct {
Find map[string]interface{} `json:"find"`
Operation string `json:"op"`
}
DeleteRequest is the http body received for a delete request
type FeedData ¶
type FeedData struct {
QueryID string `json:"id"`
DocID string `json:"docId"`
Type string `json:"type"`
Payload map[string]interface{} `json:"payload"`
TimeStamp int64 `json:"time"`
Group string `json:"group"`
DBType string `json:"dbType"`
}
FeedData is the format to send realtime data
type FunctionsPayload ¶
type FunctionsPayload struct {
ID string `json:"id"`
Auth map[string]interface{} `json:"auth"`
Params interface{} `json:"params"`
Service string `json:"service"`
Func string `json:"func"`
Error string `json:"error"`
}
FunctionsPayload is the struct transmitted via the broker
type FunctionsRequest ¶
type FunctionsRequest struct {
Params interface{} `json:"params"`
Timeout int `json:"timeout"`
}
FunctionsRequest is the api call request
type ListFilesRequest ¶
type ListFilesRequest struct {
Path string `json:"path"`
Type string `json:"type"` // Type could be dir, file or all
}
ListFilesRequest is the request made to browse the cotents inside a directory
type ListFilesResponse ¶
type ListFilesResponse struct {
Name string `json:"name"`
Type string `json:"type"` // Type could be dir or file
}
ListFilesResponse is the response given to browse the cotents inside a directory
type Message ¶
type Message struct {
Type string `json:"type"`
Data interface{} `json:"data"`
ID string `json:"id"` // the request id
}
Message is the request body of the message
type ReadOptions ¶
type ReadOptions struct {
Select map[string]int32 `json:"select"`
Sort map[string]int32 `json:"sort"`
Skip *int64 `json:"skip"`
Limit *int64 `json:"limit"`
Distinct *string `json:"distinct"`
}
ReadOptions is the options required for a read request
type ReadRequest ¶
type ReadRequest struct {
Find map[string]interface{} `json:"find"`
Operation string `json:"op"`
Options *ReadOptions `json:"options"`
}
ReadRequest is the http body received for a read request
type RealtimeRequest ¶
type RealtimeRequest struct {
Token string `json:"token"`
DBType string `json:"dbType"`
Project string `json:"project"`
Group string `json:"group"` // Group is the collection name
Type string `json:"type"` // Can either be subscribe or unsubscribe
ID string `json:"id"` // id is the query id
Where map[string]interface{} `json:"where"`
}
RealtimeRequest is the object sent for realtime requests
type RealtimeResponse ¶
type RealtimeResponse struct {
Group string `json:"group"` // Group is the collection name
ID string `json:"id"` // id is the query id
Ack bool `json:"ack"`
Error string `json:"error"`
Docs []*FeedData `json:"docs"`
}
RealtimeResponse is the object sent for realtime requests
type ServiceRegisterRequest ¶
type ServiceRegisterRequest struct {
Service string `json:"service"`
Project string `json:"project"`
Token string `json:"token"`
}
ServiceRegisterRequest is the register service request
type UpdateRequest ¶
type UpdateRequest struct {
Find map[string]interface{} `json:"find"`
Operation string `json:"op"`
Update map[string]interface{} `json:"update"`
}
UpdateRequest is the http body received for an update request