Documentation
¶
Overview ¶
Package mongodbtarget implements an adapter that connects to a MongoDB database and allows a user to insert, query, and update documents via cloudevents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvAccessorCtor ¶
func EnvAccessorCtor() pkgadapter.EnvConfigAccessor
EnvAccessorCtor for configuration parameters
func NewTarget ¶
func NewTarget(ctx context.Context, envAcc pkgadapter.EnvConfigAccessor, ceClient cloudevents.Client) pkgadapter.Adapter
NewTarget returns the adapter implementation.
Types ¶
type InsertPayload ¶
type InsertPayload struct {
Database string `json:"database"`
Collection string `json:"collection"`
Key string `json:"key"`
Document json.RawMessage `json:"document"`
}
InsertPayload defines the expected data structure found at the "io.triggermesh.mongodb.insert" payload.
type QueryPayload ¶
type QueryPayload struct {
Database string `json:"database"`
Collection string `json:"collection"`
Key string `json:"key"`
Value string `json:"value"`
}
QueryPayload defines the expected data found at the "io.triggermesh.mongodb.query" payload.
type QueryResponse ¶
QueryResponse defines the expected data structure received from a query to MongoDB.
type UpdatePayload ¶
type UpdatePayload struct {
Database string `json:"database"`
Collection string `json:"collection"`
SearchKey string `json:"searchKey"`
SearchValue string `json:"searchValue"`
UpdateKey string `json:"updateKey"`
UpdateValue string `json:"updateValue"`
}
UpdatePayload defines the expected data found at the "io.triggermesh.mongodb.update" payload.
Click to show internal directories.
Click to hide internal directories.