backup

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2019 License: Apache-2.0 Imports: 9 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	Str string
}

Body wraps SJSON for building JSON body strings.

func (Body) Set

func (body Body) Set(path, value string) Body

Set sets a JSON path to a value.

func (Body) SetRaw

func (body Body) SetRaw(path, rawValue string) Body

SetRaw sets a JSON path to a raw string value.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a ACI backup file client.

func NewClient

func NewClient(src string) (Client, error)

NewClient creates a new backup file client.

func (Client) GetClass

func (client Client) GetClass(class string, mods ...func(*Req)) (Res, error)

GetClass queries the backup file for an MO class.

func (Client) GetDn

func (client Client) GetDn(dn string, mods ...func(*Req)) (Res, error)

GetDn queries the backup for a specific DN. This returns a single object of the format:

{ "moClass":
    "attributes": {
    ...
    }
}

For unknown class types, retrieve the attributes with a wildcard:

res.Get("*.attributes")

type Req

type Req struct{}

Req

type Res

type Res = gjson.Result

Res is an API response returned by client requests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL