(System)
Internal components and administration
- ListArchives - List archives
- CreateArchive - Create an archive
- RestoreArchive - Restore an archive
- GetZipArchive - Get an archive as a ZIP
- GetHealthcheckResult - Get healthcheck
- GetSystemInfo - Get server information
- PurgeSoftware - Trigger batch for cleaning unreferenced software
- RegeneratePolicies - Trigger a new policy generation
- ReloadAll - Reload both techniques and dynamic groups
- ReloadGroups - Reload dynamic groups
- ReloadTechniques - Reload techniques
- GetStatus - Get server status
- UpdatePolicies - Trigger update of policies
List configuration archives
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"github.com/infra-rdc/rudder-go/models/components"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
var archiveKind components.ArchiveKind = components.ArchiveKindFull
ctx := context.Background()
res, err := s.System.ListArchives(ctx, archiveKind)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
archiveKind |
components.ArchiveKind | ✔️ | Type of archive to make | full |
*operations.ListArchivesResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Create new archive of the given kind
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"github.com/infra-rdc/rudder-go/models/components"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
var archiveKind components.ArchiveKind = components.ArchiveKindFull
ctx := context.Background()
res, err := s.System.CreateArchive(ctx, archiveKind)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
archiveKind |
components.ArchiveKind | ✔️ | Type of archive to make | full |
*operations.CreateArchiveResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Restore an archive of the given kind for the given moment
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"github.com/infra-rdc/rudder-go/models/components"
"github.com/infra-rdc/rudder-go/models/operations"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
var archiveKind components.ArchiveKind = components.ArchiveKindFull
var archiveRestoreKind operations.ArchiveRestoreKind = operations.ArchiveRestoreKindLatestCommit
ctx := context.Background()
res, err := s.System.RestoreArchive(ctx, archiveKind, archiveRestoreKind)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
archiveKind |
components.ArchiveKind | ✔️ | Type of archive to make | full |
archiveRestoreKind |
operations.ArchiveRestoreKind | ✔️ | What archive to restore (latest archive, latest commit in configuration repository, or archive with ID as given by listArchive) | latestCommit |
*operations.RestoreArchiveResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Get an archive of the given kind as a zip
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"github.com/infra-rdc/rudder-go/models/components"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
var archiveKind components.ArchiveKind = components.ArchiveKindFull
var commitID string = "<value>"
ctx := context.Background()
res, err := s.System.GetZipArchive(ctx, archiveKind, commitID)
if err != nil {
log.Fatal(err)
}
if res.Stream != nil {
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
archiveKind |
components.ArchiveKind | ✔️ | Type of archive to make | full |
commitID |
string | ✔️ | commit ID of the archive to get as a ZIP file |
*operations.GetZipArchiveResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Run and get the result of all checks
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.System.GetHealthcheckResult(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.GetHealthcheckResultResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Get information about the server version
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.System.GetSystemInfo(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.GetSystemInfoResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Start the software cleaning batch asynchronously.
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.System.PurgeSoftware(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.PurgeSoftwareResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Trigger a full policy generation
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.System.RegeneratePolicies(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.RegeneratePoliciesResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Reload both techniques and dynamic groups
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.System.ReloadAll(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.ReloadAllResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Reload dynamic groups
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.System.ReloadGroups(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.ReloadGroupsResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Reload techniques from local technique library
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.System.ReloadTechniques(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.ReloadTechniquesResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Get information about current server status
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.System.GetStatus(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.GetStatusResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Update configuration policies if needed
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.System.UpdatePolicies(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.UpdatePoliciesResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |