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. Example:
Body{}.Set("fvTenant.attributes.name", "mytenant").Str
Creates:
{ "fvTenant": { "attributes": { "name": "mytenant" } } }
These can also be chained:
Body{}. Set("fvTenant.attributes.name", "mytenant"). Set("fvTenant.attributes.descr", "This is my tenant"). Str
Creates:
{ "fvTenant": { "attributes": { "name": "mytenant", "descr": "This is my tenant" } } }
func (Body) Res ¶ added in v0.3.3
Res generates a backup.Res (gjson.Result) object. Use the .Str struct property to access the string data, or .Res() to generate a GJSON result.
type Client ¶
type Client struct { // DNs is the DN to object mapping index. DNs map[string]*Res // Classes is the class to object(s) mapping index. Classes map[string][]*Res }
Client is a ACI backup file client. Inititate with backup.NewClient
func (Client) GetClass ¶
GetClass queries the backup file for an MO class. This returns a list of objects, i.e. the contents of imdata:
[ { "moClass": "attributes": { ... } } ]
type Res ¶
Res is an API response returned by client requests. This is a gjson.Result. https://github.com/tidwall/gjson
Click to show internal directories.
Click to hide internal directories.