(Inventories)
Inventory processing service
- QueueInformation - Get information about inventory processing queue
- UploadInventory - Upload an inventory for processing
- FileWatcherRestart - Restart inventory watcher
- FileWatcherStart - Start inventory watcher
- FileWatcherStop - Stop inventory watcher
Provide information about the current state of the inventory processor
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Inventories.QueueInformation(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
*operations.QueueInformationResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Upload an inventory to the web application
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"github.com/infra-rdc/rudder-go/models/operations"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
var request *operations.UploadInventoryRequestBody = &operations.UploadInventoryRequestBody{}
ctx := context.Background()
res, err := s.Inventories.UploadInventory(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.UploadInventoryRequestBody | ✔️ | The request object to use for the request. |
*operations.UploadInventoryResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Restart the inventory watcher if necessary
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Inventories.FileWatcherRestart(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
*operations.FileWatcherRestartResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Start the inventory watcher if necessary
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Inventories.FileWatcherStart(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
*operations.FileWatcherStartResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Stop the inventory watcher if necessary
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Inventories.FileWatcherStop(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
*operations.FileWatcherStopResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |