Skip to content

Latest commit

 

History

History
241 lines (178 loc) · 8.71 KB

README.md

File metadata and controls

241 lines (178 loc) · 8.71 KB

Inventories

(Inventories)

Overview

Inventory processing service

Available Operations

QueueInformation

Provide information about the current state of the inventory processor

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.

Response

*operations.QueueInformationResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

UploadInventory

Upload an inventory to the web application

Example Usage

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
    }
}

Parameters

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.

Response

*operations.UploadInventoryResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

FileWatcherRestart

Restart the inventory watcher if necessary

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.

Response

*operations.FileWatcherRestartResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

FileWatcherStart

Start the inventory watcher if necessary

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.

Response

*operations.FileWatcherStartResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

FileWatcherStop

Stop the inventory watcher if necessary

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.

Response

*operations.FileWatcherStopResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /