diff --git a/runtime_parameters.go b/runtime_parameters.go index 1d906af..4e6d6cc 100644 --- a/runtime_parameters.go +++ b/runtime_parameters.go @@ -16,9 +16,44 @@ type RuntimeParameter struct { Value interface{} `json:"value"` } +// RuntimeDefinitions represents rabbitmq runtime configuration. +type RuntimeDefinitions struct { + RabbitVersion string `json:"rabbit_version"` + RabbitMQVersion string `json:"rabbitmq_version"` + ProductName string `json:"product_name"` + ProductVersion string `json:"product_version"` + Users []UserInfo + Vhosts []VhostInfo + Permissions []Permissions + TopicPermissions []TopicPermissionInfo + Parameters []RuntimeParameter + GlobalParameters interface{} `json:"global_parameters"` + Policies []PolicyDefinition + Queues []QueueInfo + Exchanges []ExchangeInfo + Bindings []BindingInfo +} + // RuntimeParameterValue represents arbitrary parameter data. type RuntimeParameterValue map[string]interface{} +// +// GET /api/definitions +// + +func (c *Client) ListRuntimeDefinitions() (p *RuntimeDefinitions, err error) { + req, err := newGETRequest(c, "definitions") + if err != nil { + return nil, err + } + + if err = executeAndParseRequest(c, req, &p); err != nil { + return nil, err + } + + return p, nil +} + // // GET /api/parameters //