Documentation ¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
last generated at 2021-12-13T00:17:46+01:00
Copyright © 2021 Remco Schoeman <remco.schoeman@logiqs.nl>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 Remco Schoeman <remco.schoeman@logiqs.nl>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 Remco Schoeman <remco.schoeman@logiqs.nl>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 Remco Schoeman <remco.schoeman@logiqs.nl>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func AddConfigFlags(cmd *cobra.Command)
- func AddListFlags(cmd *cobra.Command)
- func AddPagingFlags(cmd *cobra.Command)
- func ApplyConfig(b Builder)
- func CertificateExpirationTimeUnits() []string
- func Do(b Builder) (*http.Response, error)
- func Print(resp *http.Response, err error) error
- func RabbitMQVersion() string
- func Request() *builder
- type Builder
- func DeleteAuthAttempts(node string) Builder
- func DeleteAuthAttemptsSource(node string) Builder
- func DeleteBindingsEEForVhostAndSourceAndDestinationAndProps(vhost string, source string, destination string, props string) Builder
- func DeleteBindingsEQForVhostAndExchangeAndQueueAndProps(vhost string, exchange string, queue string, props string) Builder
- func DeleteConnection(name string) Builder
- func DeleteExchangeForVhost(vhost string, name string) Builder
- func DeleteGlobalParameter(name string) Builder
- func DeleteOperatorPolicyForVhost(vhost string, name string) Builder
- func DeleteParameterForComponentAndVhost(component string, vhost string, name string) Builder
- func DeletePermissionsForVhostAndUser(vhost string, user string) Builder
- func DeletePolicyForVhost(vhost string, name string) Builder
- func DeleteQueueContentsForVhost(vhost string, name string) Builder
- func DeleteQueueForVhost(vhost string, name string) Builder
- func DeleteTopicPermissionsForVhostAndUser(vhost string, user string) Builder
- func DeleteUser(name string) Builder
- func DeleteUserLimitForUser(user string, name string) Builder
- func DeleteVhost(name string) Builder
- func DeleteVhostLimitForVhost(vhost string, name string) Builder
- func GetAlivenessTestForVhost(vhost string) Builder
- func GetAllConfiguration() Builder
- func GetAuth() Builder
- func GetAuthAttempts(node string) Builder
- func GetAuthAttemptsSource(node string) Builder
- func GetBindings() Builder
- func GetBindingsEEForVhostAndSourceAndDestination(vhost string, source string, destination string) Builder
- func GetBindingsEEForVhostAndSourceAndDestinationAndProps(vhost string, source string, destination string, props string) Builder
- func GetBindingsEQForVhostAndExchangeAndQueue(vhost string, exchange string, queue string) Builder
- func GetBindingsEQForVhostAndExchangeAndQueueAndProps(vhost string, exchange string, queue string, props string) Builder
- func GetBindingsForVhost(vhost string) Builder
- func GetChannel(channel string) Builder
- func GetChannels() Builder
- func GetChannelsForVhost(vhost string) Builder
- func GetClusterName() Builder
- func GetConnection(name string) Builder
- func GetConnectionChannels(name string) Builder
- func GetConnections() Builder
- func GetConnectionsForVhost(vhost string) Builder
- func GetConsumers() Builder
- func GetConsumersForVhost(vhost string) Builder
- func GetDefinitions() Builder
- func GetDefinitionsForVhost(vhost string) Builder
- func GetExchangeBindingsDestinationForVhost(vhost string, name string) Builder
- func GetExchangeBindingsSourceForVhost(vhost string, name string) Builder
- func GetExchangeForVhost(vhost string, name string) Builder
- func GetExchanges() Builder
- func GetExchangesForVhost(vhost string) Builder
- func GetExtensions() Builder
- func GetFederationLinks() Builder
- func GetFederationLinksForVhost(vhost string) Builder
- func GetGlobalParameter(name string) Builder
- func GetGlobalParameters() Builder
- func GetHealthChecksAlarms() Builder
- func GetHealthChecksCertificateExpirationForWithinAndUnit(within int, unit string) Builder
- func GetHealthChecksLocalAlarms() Builder
- func GetHealthChecksNodeIsMirrorSyncCritical() Builder
- func GetHealthChecksNodeIsQuorumCritical() Builder
- func GetHealthChecksPortListener(port int) Builder
- func GetHealthChecksProtocolListener(protocol string) Builder
- func GetHealthChecksVirtualHosts() Builder
- func GetNode(name string) Builder
- func GetNodes() Builder
- func GetOperatorPolicies() Builder
- func GetOperatorPoliciesForVhost(vhost string) Builder
- func GetOperatorPolicyForVhost(vhost string, name string) Builder
- func GetOverview() Builder
- func GetParameterForComponentAndVhost(component string, vhost string, name string) Builder
- func GetParameters() Builder
- func GetParameters2(component string) Builder
- func GetParametersForComponentAndVhost(component string, vhost string) Builder
- func GetPermissions() Builder
- func GetPermissionsForVhostAndUser(vhost string, user string) Builder
- func GetPoliciesForVhost(vhost string) Builder
- func GetPolicyForVhost(vhost string, name string) Builder
- func GetQueueBindingsForVhost(vhost string, name string) Builder
- func GetQueueForVhost(vhost string, name string) Builder
- func GetQueues() Builder
- func GetQueuesForVhost(vhost string) Builder
- func GetTopicPermissions() Builder
- func GetTopicPermissionsForVhostAndUser(vhost string, user string) Builder
- func GetUser(name string) Builder
- func GetUserLimits() Builder
- func GetUserLimits2(user string) Builder
- func GetUsers() Builder
- func GetUsersPermissions(user string) Builder
- func GetUsersTopicPermissions(user string) Builder
- func GetUsersWithoutPermissions() Builder
- func GetVhost(name string) Builder
- func GetVhostLimits() Builder
- func GetVhostLimitsForVhost(vhost string) Builder
- func GetVhostPermissions(name string) Builder
- func GetVhostTopicPermissions(name string) Builder
- func GetVhosts() Builder
- func GetWhoami() Builder
- func PostAllConfiguration() Builder
- func PostBindingsEEForVhostAndSourceAndDestination(vhost string, source string, destination string) Builder
- func PostBindingsEQForVhostAndExchangeAndQueue(vhost string, exchange string, queue string) Builder
- func PostDefinitions() Builder
- func PostDefinitionsForVhost(vhost string) Builder
- func PostExchangePublishForVhost(vhost string, name string) Builder
- func PostQueueActionsForVhost(vhost string, name string) Builder
- func PostQueueGetForVhost(vhost string, name string) Builder
- func PostRebalanceQueues() Builder
- func PostUsersBulkDelete() Builder
- func PostVhostStartForNode(name string, node string) Builder
- func PutClusterName() Builder
- func PutExchangeForVhost(vhost string, name string) Builder
- func PutGlobalParameter(name string) Builder
- func PutOperatorPolicyForVhost(vhost string, name string) Builder
- func PutParameterForComponentAndVhost(component string, vhost string, name string) Builder
- func PutPermissionsForVhostAndUser(vhost string, user string) Builder
- func PutPolicyForVhost(vhost string, name string) Builder
- func PutQueueForVhost(vhost string, name string) Builder
- func PutTopicPermissionsForVhostAndUser(vhost string, user string) Builder
- func PutUser(name string) Builder
- func PutUserLimitForUser(user string, name string) Builder
- func PutVhost(name string) Builder
- func PutVhostLimitForVhost(vhost string, name string) Builder
- type Query
Constants ¶
const ( UnitDays = "days" UnitWeeks = "weeks" UnitMonths = "months" UnitYears = "years" )
Variables ¶
var ( // Config contains the default global config settings Config *cfg = new(cfg) // Page contains the default global pagination settings Page *pageFilter = new(pageFilter) )
Functions ¶
func AddConfigFlags ¶
AddConfigFlags adds commandline parameters to the command for the RabbitMQ api
func AddListFlags ¶
AddListFlags adds parameters to the command that change the shape and sort order of returned data from the RabbitMQ api.
func AddPagingFlags ¶
AddPagingFlags adds parameters to the command for paging parameters in the RabbitMQ api
func ApplyConfig ¶
func ApplyConfig(b Builder)
func CertificateExpirationTimeUnits ¶
func CertificateExpirationTimeUnits() []string
CertificateExpirationTimeUnits returns the list of time units usable in GetHealthChecksCertificateExpirationJson(within int, unit string)
func RabbitMQVersion ¶
func RabbitMQVersion() string
RabbitMQVersion show the version against which this api was generated
Types ¶
type Builder ¶
type Builder interface { Path(path string) Builder Method(method string) Builder BaseUrl(baseUrl string) Builder BasicAuth(user, password string) Builder Body(body interface{}) Builder Page(page, size int) Builder Columns(columns ...string) Builder Sort(column string, reverse bool) Builder Filter(filter string, useRegex bool) Builder Memory(memory bool) Builder Binary(binary bool) Builder QueryParameters(addQueryParams func(Query)) Builder Url() string QueryString() string Build() (*http.Request, error) }
func DeleteAuthAttempts ¶
A list of authentication attempts. DELETE /api/auth/attempts/{node}
func DeleteAuthAttemptsSource ¶
A list of authentication attempts by remote address and username. DELETE /api/auth/attempts/{node}/source
func DeleteBindingsEEForVhostAndSourceAndDestinationAndProps ¶
func DeleteBindingsEEForVhostAndSourceAndDestinationAndProps(vhost string, source string, destination string, props string) Builder
An individual binding between two exchanges. Similar to the individual binding between an exchange and a queue, above. DELETE /api/bindings/{vhost}/e/{source}/e/{destination}/{props}
func DeleteBindingsEQForVhostAndExchangeAndQueueAndProps ¶
func DeleteBindingsEQForVhostAndExchangeAndQueueAndProps(vhost string, exchange string, queue string, props string) Builder
An individual binding between an exchange and a queue. The {props} part of the URI is a "name" for the binding composed of its routing key and a hash of its arguments. {props} is the field named "properties_key" from a bindings listing response. DELETE /api/bindings/{vhost}/e/{exchange}/q/{queue}/{props}
func DeleteConnection ¶
An individual connection. DELETEing it will close the connection. Optionally set the "X-Reason" header when DELETEing to provide a reason. DELETE /api/connections/{name}
func DeleteExchangeForVhost ¶
An individual exchange. To PUT an exchange, you will need a body looking something like this: {"type":"direct","auto_delete":false,"durable":true,"internal":false,"arguments":{}} The type key is mandatory; other keys are optional. When DELETEing an exchange you can add the query string parameter if-unused=true. This prevents the delete from succeeding if the exchange is bound to a queue or as a source to another exchange. DELETE /api/exchanges/{vhost}/{name}
func DeleteGlobalParameter ¶
An individual global parameter. To PUT a parameter, you will need a body looking something like this: {"name":"user_vhost_mapping","value":{"guest":"/","rabbit":"warren"}} DELETE /api/global-parameters/{name}
func DeleteOperatorPolicyForVhost ¶
An individual operator policy. To PUT a policy, you will need a body looking something like this: {"pattern":"^amq.", "definition": {"expires":100}, "priority":0, "apply-to": "queues"} pattern and definition are mandatory, priority and apply-to are optional. DELETE /api/operator-policies/{vhost}/{name}
func DeleteParameterForComponentAndVhost ¶
An individual vhost-scoped parameter. To PUT a parameter, you will need a body looking something like this: {"vhost": "/","component":"federation","name":"local_username","value":"guest"} DELETE /api/parameters/{component}/{vhost}/{name}
func DeletePermissionsForVhostAndUser ¶
An individual permission of a user and virtual host. To PUT a permission, you will need a body looking something like this: {"configure":".*","write":".*","read":".*"} All keys are mandatory. DELETE /api/permissions/{vhost}/{user}
func DeletePolicyForVhost ¶
An individual policy. To PUT a policy, you will need a body looking something like this: {"pattern":"^amq.", "definition": {"federation-upstream-set":"all"}, "priority":0, "apply-to": "all"} pattern and definition are mandatory, priority and apply-to are optional. DELETE /api/policies/{vhost}/{name}
func DeleteQueueContentsForVhost ¶
Contents of a queue. DELETE to purge. Note you can't GET this. DELETE /api/queues/{vhost}/{name}/contents
func DeleteQueueForVhost ¶
An individual queue. To PUT a queue, you will need a body looking something like this: {"auto_delete":false,"durable":true,"arguments":{},"node":"rabbit@smacmullen"} All keys are optional. When DELETEing a queue you can add the query string parameters if-empty=true and / or if-unused=true. These prevent the delete from succeeding if the queue contains messages, or has consumers, respectively. DELETE /api/queues/{vhost}/{name}
func DeleteTopicPermissionsForVhostAndUser ¶
Topic permissions for a user and virtual host. To PUT a topic permission, you will need a body looking something like this: {"exchange":"amq.topic","write":"^a","read":".*"} All keys are mandatory. DELETE /api/topic-permissions/{vhost}/{user}
func DeleteUser ¶
An individual user. To PUT a user, you will need a body looking something like this: {"password":"secret","tags":"administrator"} or: {"password_hash":"2lmoth8l4H0DViLaK9Fxi6l9ds8=", "tags":"administrator"} The tags key is mandatory. Either password or password_hash can be set. If neither are set the user will not be able to log in with a password, but other mechanisms like client certificates may be used. Setting password_hash to "" will ensure the user cannot use a password to log in. tags is a comma-separated list of tags for the user. Currently recognised tags are administrator, monitoring and management. password_hash must be generated using the algorithm described here. You may also specify the hash function being used by adding the hashing_algorithm key to the body. Currently recognised algorithms are rabbit_password_hashing_sha256, rabbit_password_hashing_sha512, and rabbit_password_hashing_md5. DELETE /api/users/{name}
func DeleteUserLimitForUser ¶
Set or delete per-user limit for user. The name URL path element refers to the name of the limit (max-connections, max-channels). Limits are set using a JSON document in the body: {"value": 100}. Example request: curl -4u 'guest:guest' -H 'content-type:application/json' -X PUT localhost:15672/api/user-limits/guest/max-connections -d '{"value": 50}' DELETE /api/user-limits/{user}/{name}
func DeleteVhost ¶
An individual virtual host. As a virtual host usually only has a name, you do not need an HTTP body when PUTing one of these. To set metadata on creation, provide a body like the following: {"description":"virtual host description", "tags":"accounts,production"} tags is a comma-separated list of tags. These metadata fields are optional. To enable / disable tracing, provide a body looking like: {"tracing":true} DELETE /api/vhosts/{name}
func DeleteVhostLimitForVhost ¶
Set or delete per-vhost limit for vhost. The name URL path element refers to the name of the limit (max-connections, max-queues). Limits are set using a JSON document in the body: {"value": 100}. Example request: curl -4u 'guest:guest' -H 'content-type:application/json' -X PUT localhost:15672/api/vhost-limits/my-vhost/max-connections -d '{"value": 50}' DELETE /api/vhost-limits/{vhost}/{name}
func GetAlivenessTestForVhost ¶
Declares a test queue on the target node, then publishes and consumes a message. Intended to be used as a very basic health check. Responds a 200 OK if the check succeeded, otherwise responds with a 503 Service Unavailable. GET /api/aliveness-test/{vhost}
func GetAllConfiguration ¶
func GetAllConfiguration() Builder
(deprecated) The server definitions - exchanges, queues, bindings, users, virtual hosts, permissions, topic permissions, and parameters. Everything apart from messages. POST to upload an existing set of definitions. Note that: The definitions are merged. Anything already existing on the server but not in the uploaded definitions is untouched. Conflicting definitions on immutable objects (exchanges, queues and bindings) will be ignored. The existing definition will be preserved. Conflicting definitions on mutable objects will cause the object in the server to be overwritten with the object from the definitions. In the event of an error you will be left with a part-applied set of definitions. For convenience you may upload a file from a browser to this URI (i.e. you can use multipart/form-data as well as application/json) in which case the definitions should be uploaded as a form field named "file". GET /api/all-configuration
func GetAuth ¶
func GetAuth() Builder
Details about the OAuth2 configuration. It will return HTTP status 200 with body: {"enable_uaa":"boolean", "uaa_client_id":"string", "uaa_location":"string"} GET /api/auth
func GetAuthAttempts ¶
A list of authentication attempts. GET /api/auth/attempts/{node}
func GetAuthAttemptsSource ¶
A list of authentication attempts by remote address and username. GET /api/auth/attempts/{node}/source
func GetBindingsEEForVhostAndSourceAndDestination ¶
func GetBindingsEEForVhostAndSourceAndDestination(vhost string, source string, destination string) Builder
A list of all bindings between two exchanges, similar to the list of all bindings between an exchange and a queue, above. To create a new binding, POST to this URI. Request body should be a JSON object optionally containing two fields, routing_key (a string) and arguments (a map of optional arguments): {"routing_key":"my_routing_key", "arguments":{"x-arg": "value"}} All keys are optional. The response will contain a Location header telling you the URI of your new binding. GET /api/bindings/{vhost}/e/{source}/e/{destination}
func GetBindingsEEForVhostAndSourceAndDestinationAndProps ¶
func GetBindingsEEForVhostAndSourceAndDestinationAndProps(vhost string, source string, destination string, props string) Builder
An individual binding between two exchanges. Similar to the individual binding between an exchange and a queue, above. GET /api/bindings/{vhost}/e/{source}/e/{destination}/{props}
func GetBindingsEQForVhostAndExchangeAndQueue ¶
A list of all bindings between an exchange and a queue. Remember, an exchange and a queue can be bound together many times! To create a new binding, POST to this URI. Request body should be a JSON object optionally containing two fields, routing_key (a string) and arguments (a map of optional arguments): {"routing_key":"my_routing_key", "arguments":{"x-arg": "value"}} All keys are optional. The response will contain a Location header telling you the URI of your new binding. GET /api/bindings/{vhost}/e/{exchange}/q/{queue}
func GetBindingsEQForVhostAndExchangeAndQueueAndProps ¶
func GetBindingsEQForVhostAndExchangeAndQueueAndProps(vhost string, exchange string, queue string, props string) Builder
An individual binding between an exchange and a queue. The {props} part of the URI is a "name" for the binding composed of its routing key and a hash of its arguments. {props} is the field named "properties_key" from a bindings listing response. GET /api/bindings/{vhost}/e/{exchange}/q/{queue}/{props}
func GetBindingsForVhost ¶
A list of all bindings in a given virtual host. GET /api/bindings/{vhost}
func GetChannel ¶
Details about an individual channel. GET /api/channels/{channel}
func GetChannels ¶
func GetChannels() Builder
A list of all open channels. Use pagination parameters to filter channels. GET /api/channels
func GetChannelsForVhost ¶
A list of all open channels in a specific virtual host. Use pagination parameters to filter channels. GET /api/vhosts/{vhost}/channels
func GetClusterName ¶
func GetClusterName() Builder
Name identifying this RabbitMQ cluster. GET /api/cluster-name
func GetConnection ¶
An individual connection. DELETEing it will close the connection. Optionally set the "X-Reason" header when DELETEing to provide a reason. GET /api/connections/{name}
func GetConnectionChannels ¶
List of all channels for a given connection. GET /api/connections/{name}/channels
func GetConnections ¶
func GetConnections() Builder
A list of all open connections. Use pagination parameters to filter connections. GET /api/connections
func GetConnectionsForVhost ¶
A list of all open connections in a specific virtual host. Use pagination parameters to filter connections. GET /api/vhosts/{vhost}/connections
func GetConsumersForVhost ¶
A list of all consumers in a given virtual host. GET /api/consumers/{vhost}
func GetDefinitions ¶
func GetDefinitions() Builder
The server definitions - exchanges, queues, bindings, users, virtual hosts, permissions, topic permissions, and parameters. Everything apart from messages. POST to upload an existing set of definitions. Note that: The definitions are merged. Anything already existing on the server but not in the uploaded definitions is untouched. Conflicting definitions on immutable objects (exchanges, queues and bindings) will be ignored. The existing definition will be preserved. Conflicting definitions on mutable objects will cause the object in the server to be overwritten with the object from the definitions. In the event of an error you will be left with a part-applied set of definitions. For convenience you may upload a file from a browser to this URI (i.e. you can use multipart/form-data as well as application/json) in which case the definitions should be uploaded as a form field named "file". GET /api/definitions
func GetDefinitionsForVhost ¶
The server definitions for a given virtual host - exchanges, queues, bindings and policies. POST to upload an existing set of definitions. Note that: The definitions are merged. Anything already existing on the server but not in the uploaded definitions is untouched. Conflicting definitions on immutable objects (exchanges, queues and bindings) will be ignored. The existing definition will be preserved. Conflicting definitions on mutable objects will cause the object in the server to be overwritten with the object from the definitions. In the event of an error you will be left with a part-applied set of definitions. For convenience you may upload a file from a browser to this URI (i.e. you can use multipart/form-data as well as application/json) in which case the definitions should be uploaded as a form field named "file". GET /api/definitions/{vhost}
func GetExchangeBindingsDestinationForVhost ¶
A list of all bindings in which a given exchange is the destination. GET /api/exchanges/{vhost}/{name}/bindings/destination
func GetExchangeBindingsSourceForVhost ¶
A list of all bindings in which a given exchange is the source. GET /api/exchanges/{vhost}/{name}/bindings/source
func GetExchangeForVhost ¶
An individual exchange. To PUT an exchange, you will need a body looking something like this: {"type":"direct","auto_delete":false,"durable":true,"internal":false,"arguments":{}} The type key is mandatory; other keys are optional. When DELETEing an exchange you can add the query string parameter if-unused=true. This prevents the delete from succeeding if the exchange is bound to a queue or as a source to another exchange. GET /api/exchanges/{vhost}/{name}
func GetExchanges ¶
func GetExchanges() Builder
A list of all exchanges. Use pagination parameters to filter exchanges. GET /api/exchanges
func GetExchangesForVhost ¶
A list of all exchanges in a given virtual host. Use pagination parameters to filter exchanges. GET /api/exchanges/{vhost}
func GetExtensions ¶
func GetExtensions() Builder
A list of extensions to the management plugin. GET /api/extensions
func GetFederationLinks ¶
func GetFederationLinks() Builder
Provides status for all federation links. Requires the rabbitmq_federation_management plugin to be enabled. GET /api/federation-links
func GetFederationLinksForVhost ¶
Provides status for all federation links. Requires the rabbitmq_federation_management plugin to be enabled. GET /api/federation-links/{vhost}
func GetGlobalParameter ¶
An individual global parameter. To PUT a parameter, you will need a body looking something like this: {"name":"user_vhost_mapping","value":{"guest":"/","rabbit":"warren"}} GET /api/global-parameters/{name}
func GetGlobalParameters ¶
func GetGlobalParameters() Builder
A list of all global parameters. GET /api/global-parameters
func GetHealthChecksAlarms ¶
func GetHealthChecksAlarms() Builder
Responds a 200 OK if there are no alarms in effect in the cluster, otherwise responds with a 503 Service Unavailable. GET /api/health/checks/alarms
func GetHealthChecksCertificateExpirationForWithinAndUnit ¶
Checks the expiration date on the certificates for every listener configured to use TLS. Responds a 200 OK if all certificates are valid (have not expired), otherwise responds with a 503 Service Unavailable. Valid units: days, weeks, months, years. The value of the {within} argument is the number of units. So, when {within} is 2 and {unit} is "months", the expiration period used by the check will be the next two months. GET /api/health/checks/certificate-expiration/{within}/{unit}
func GetHealthChecksLocalAlarms ¶
func GetHealthChecksLocalAlarms() Builder
Responds a 200 OK if there are no local alarms in effect on the target node, otherwise responds with a 503 Service Unavailable. GET /api/health/checks/local-alarms
func GetHealthChecksNodeIsMirrorSyncCritical ¶
func GetHealthChecksNodeIsMirrorSyncCritical() Builder
Checks if there are classic mirrored queues without synchronised mirrors online (queues that would potentially lose data if the target node is shut down). Responds a 200 OK if there are no such classic mirrored queues, otherwise responds with a 503 Service Unavailable. GET /api/health/checks/node-is-mirror-sync-critical
func GetHealthChecksNodeIsQuorumCritical ¶
func GetHealthChecksNodeIsQuorumCritical() Builder
Checks if there are quorum queues with minimum online quorum (queues that would lose their quorum and availability if the target node is shut down). Responds a 200 OK if there are no such quorum queues, otherwise responds with a 503 Service Unavailable. GET /api/health/checks/node-is-quorum-critical
func GetHealthChecksPortListener ¶
Responds a 200 OK if there is an active listener on the give port, otherwise responds with a 503 Service Unavailable. GET /api/health/checks/port-listener/{port}
func GetHealthChecksProtocolListener ¶
Responds a 200 OK if there is an active listener for the given protocol, otherwise responds with a 503 Service Unavailable. Valid protocol names are: amqp091, amqp10, mqtt, stomp, web-mqtt, web-stomp. GET /api/health/checks/protocol-listener/{protocol}
func GetHealthChecksVirtualHosts ¶
func GetHealthChecksVirtualHosts() Builder
Responds a 200 OK if all virtual hosts and running on the target node, otherwise responds with a 503 Service Unavailable. GET /api/health/checks/virtual-hosts
func GetNode ¶
An individual node in the RabbitMQ cluster. Add "?memory=true" to get memory statistics, and "?binary=true" to get a breakdown of binary memory use (may be expensive if there are many small binaries in the system). GET /api/nodes/{name}
func GetOperatorPolicies ¶
func GetOperatorPolicies() Builder
A list of all operator policy overrides. GET /api/operator-policies
func GetOperatorPoliciesForVhost ¶
A list of all operator policy overrides in a given virtual host. GET /api/operator-policies/{vhost}
func GetOperatorPolicyForVhost ¶
An individual operator policy. To PUT a policy, you will need a body looking something like this: {"pattern":"^amq.", "definition": {"expires":100}, "priority":0, "apply-to": "queues"} pattern and definition are mandatory, priority and apply-to are optional. GET /api/operator-policies/{vhost}/{name}
func GetOverview ¶
func GetOverview() Builder
Various random bits of information that describe the whole system. GET /api/overview
func GetParameterForComponentAndVhost ¶
An individual vhost-scoped parameter. To PUT a parameter, you will need a body looking something like this: {"vhost": "/","component":"federation","name":"local_username","value":"guest"} GET /api/parameters/{component}/{vhost}/{name}
func GetParameters ¶
func GetParameters() Builder
A list of all vhost-scoped parameters. GET /api/parameters
func GetParameters2 ¶
A list of all vhost-scoped parameters for a given component. GET /api/parameters/{component}
func GetParametersForComponentAndVhost ¶
A list of all vhost-scoped parameters for a given component and virtual host. GET /api/parameters/{component}/{vhost}
func GetPermissions ¶
func GetPermissions() Builder
A list of all permissions for all users. GET /api/permissions
func GetPermissionsForVhostAndUser ¶
An individual permission of a user and virtual host. To PUT a permission, you will need a body looking something like this: {"configure":".*","write":".*","read":".*"} All keys are mandatory. GET /api/permissions/{vhost}/{user}
func GetPoliciesForVhost ¶
A list of all policies in a given virtual host. GET /api/policies/{vhost}
func GetPolicyForVhost ¶
An individual policy. To PUT a policy, you will need a body looking something like this: {"pattern":"^amq.", "definition": {"federation-upstream-set":"all"}, "priority":0, "apply-to": "all"} pattern and definition are mandatory, priority and apply-to are optional. GET /api/policies/{vhost}/{name}
func GetQueueBindingsForVhost ¶
A list of all bindings on a given queue. GET /api/queues/{vhost}/{name}/bindings
func GetQueueForVhost ¶
An individual queue. To PUT a queue, you will need a body looking something like this: {"auto_delete":false,"durable":true,"arguments":{},"node":"rabbit@smacmullen"} All keys are optional. When DELETEing a queue you can add the query string parameters if-empty=true and / or if-unused=true. These prevent the delete from succeeding if the queue contains messages, or has consumers, respectively. GET /api/queues/{vhost}/{name}
func GetQueues ¶
func GetQueues() Builder
A list of all queues. Use pagination parameters to filter queues. GET /api/queues
func GetQueuesForVhost ¶
A list of all queues in a given virtual host. Use pagination parameters to filter queues. GET /api/queues/{vhost}
func GetTopicPermissions ¶
func GetTopicPermissions() Builder
A list of all topic permissions for all users. GET /api/topic-permissions
func GetTopicPermissionsForVhostAndUser ¶
Topic permissions for a user and virtual host. To PUT a topic permission, you will need a body looking something like this: {"exchange":"amq.topic","write":"^a","read":".*"} All keys are mandatory. GET /api/topic-permissions/{vhost}/{user}
func GetUser ¶
An individual user. To PUT a user, you will need a body looking something like this: {"password":"secret","tags":"administrator"} or: {"password_hash":"2lmoth8l4H0DViLaK9Fxi6l9ds8=", "tags":"administrator"} The tags key is mandatory. Either password or password_hash can be set. If neither are set the user will not be able to log in with a password, but other mechanisms like client certificates may be used. Setting password_hash to "" will ensure the user cannot use a password to log in. tags is a comma-separated list of tags for the user. Currently recognised tags are administrator, monitoring and management. password_hash must be generated using the algorithm described here. You may also specify the hash function being used by adding the hashing_algorithm key to the body. Currently recognised algorithms are rabbit_password_hashing_sha256, rabbit_password_hashing_sha512, and rabbit_password_hashing_md5. GET /api/users/{name}
func GetUserLimits ¶
func GetUserLimits() Builder
Lists per-user limits for all users. GET /api/user-limits
func GetUserLimits2 ¶
Lists per-user limits for a specific user. GET /api/user-limits/{user}
func GetUsersPermissions ¶
A list of all permissions for a given user. GET /api/users/{user}/permissions
func GetUsersTopicPermissions ¶
A list of all topic permissions for a given user. GET /api/users/{user}/topic-permissions
func GetUsersWithoutPermissions ¶
func GetUsersWithoutPermissions() Builder
A list of users that do not have access to any virtual host. GET /api/users/without-permissions
func GetVhost ¶
An individual virtual host. As a virtual host usually only has a name, you do not need an HTTP body when PUTing one of these. To set metadata on creation, provide a body like the following: {"description":"virtual host description", "tags":"accounts,production"} tags is a comma-separated list of tags. These metadata fields are optional. To enable / disable tracing, provide a body looking like: {"tracing":true} GET /api/vhosts/{name}
func GetVhostLimits ¶
func GetVhostLimits() Builder
Lists per-vhost limits for all vhosts. GET /api/vhost-limits
func GetVhostLimitsForVhost ¶
Lists per-vhost limits for specific vhost. GET /api/vhost-limits/{vhost}
func GetVhostPermissions ¶
A list of all permissions for a given virtual host. GET /api/vhosts/{name}/permissions
func GetVhostTopicPermissions ¶
A list of all topic permissions for a given virtual host. GET /api/vhosts/{name}/topic-permissions
func GetWhoami ¶
func GetWhoami() Builder
Details of the currently authenticated user. GET /api/whoami
func PostAllConfiguration ¶
func PostAllConfiguration() Builder
(deprecated) The server definitions - exchanges, queues, bindings, users, virtual hosts, permissions, topic permissions, and parameters. Everything apart from messages. POST to upload an existing set of definitions. Note that: The definitions are merged. Anything already existing on the server but not in the uploaded definitions is untouched. Conflicting definitions on immutable objects (exchanges, queues and bindings) will be ignored. The existing definition will be preserved. Conflicting definitions on mutable objects will cause the object in the server to be overwritten with the object from the definitions. In the event of an error you will be left with a part-applied set of definitions. For convenience you may upload a file from a browser to this URI (i.e. you can use multipart/form-data as well as application/json) in which case the definitions should be uploaded as a form field named "file". POST /api/all-configuration
func PostBindingsEEForVhostAndSourceAndDestination ¶
func PostBindingsEEForVhostAndSourceAndDestination(vhost string, source string, destination string) Builder
A list of all bindings between two exchanges, similar to the list of all bindings between an exchange and a queue, above. To create a new binding, POST to this URI. Request body should be a JSON object optionally containing two fields, routing_key (a string) and arguments (a map of optional arguments): {"routing_key":"my_routing_key", "arguments":{"x-arg": "value"}} All keys are optional. The response will contain a Location header telling you the URI of your new binding. POST /api/bindings/{vhost}/e/{source}/e/{destination}
func PostBindingsEQForVhostAndExchangeAndQueue ¶
A list of all bindings between an exchange and a queue. Remember, an exchange and a queue can be bound together many times! To create a new binding, POST to this URI. Request body should be a JSON object optionally containing two fields, routing_key (a string) and arguments (a map of optional arguments): {"routing_key":"my_routing_key", "arguments":{"x-arg": "value"}} All keys are optional. The response will contain a Location header telling you the URI of your new binding. POST /api/bindings/{vhost}/e/{exchange}/q/{queue}
func PostDefinitions ¶
func PostDefinitions() Builder
The server definitions - exchanges, queues, bindings, users, virtual hosts, permissions, topic permissions, and parameters. Everything apart from messages. POST to upload an existing set of definitions. Note that: The definitions are merged. Anything already existing on the server but not in the uploaded definitions is untouched. Conflicting definitions on immutable objects (exchanges, queues and bindings) will be ignored. The existing definition will be preserved. Conflicting definitions on mutable objects will cause the object in the server to be overwritten with the object from the definitions. In the event of an error you will be left with a part-applied set of definitions. For convenience you may upload a file from a browser to this URI (i.e. you can use multipart/form-data as well as application/json) in which case the definitions should be uploaded as a form field named "file". POST /api/definitions
func PostDefinitionsForVhost ¶
The server definitions for a given virtual host - exchanges, queues, bindings and policies. POST to upload an existing set of definitions. Note that: The definitions are merged. Anything already existing on the server but not in the uploaded definitions is untouched. Conflicting definitions on immutable objects (exchanges, queues and bindings) will be ignored. The existing definition will be preserved. Conflicting definitions on mutable objects will cause the object in the server to be overwritten with the object from the definitions. In the event of an error you will be left with a part-applied set of definitions. For convenience you may upload a file from a browser to this URI (i.e. you can use multipart/form-data as well as application/json) in which case the definitions should be uploaded as a form field named "file". POST /api/definitions/{vhost}
func PostExchangePublishForVhost ¶
Publish a message to a given exchange. You will need a body looking something like: {"properties":{},"routing_key":"my key","payload":"my body","payload_encoding":"string"} All keys are mandatory. The payload_encoding key should be either "string" (in which case the payload will be taken to be the UTF-8 encoding of the payload field) or "base64" (in which case the payload field is taken to be base64 encoded). If the message is published successfully, the response will look like: {"routed": true} routed will be true if the message was sent to at least one queue. Please note that the HTTP API is not ideal for high performance publishing; the need to create a new TCP connection for each message published can limit message throughput compared to AMQP or other protocols using long-lived connections. POST /api/exchanges/{vhost}/{name}/publish
func PostQueueActionsForVhost ¶
Actions that can be taken on a queue. POST a body like: {"action":"sync"} Currently the actions which are supported are sync and cancel_sync. POST /api/queues/{vhost}/{name}/actions
func PostQueueGetForVhost ¶
Get messages from a queue. (This is not an HTTP GET as it will alter the state of the queue.) You should post a body looking like: {"count":5,"ackmode":"ack_requeue_true","encoding":"auto","truncate":50000} count controls the maximum number of messages to get. You may get fewer messages than this if the queue cannot immediately provide them. ackmode determines whether the messages will be removed from the queue. If ackmode is ack_requeue_true or reject_requeue_true they will be requeued - if ackmode is ack_requeue_false or reject_requeue_false they will be removed. encoding must be either "auto" (in which case the payload will be returned as a string if it is valid UTF-8, and base64 encoded otherwise), or "base64" (in which case the payload will always be base64 encoded). If truncate is present it will truncate the message payload if it is larger than the size given (in bytes). truncate is optional; all other keys are mandatory. Please note that the get path in the HTTP API is intended for diagnostics etc - it does not implement reliable delivery and so should be treated as a sysadmin's tool rather than a general API for messaging. POST /api/queues/{vhost}/{name}/get
func PostRebalanceQueues ¶
func PostRebalanceQueues() Builder
Rebalances all queues in all vhosts. This operation is asynchronous therefore please check the RabbitMQ log file for messages regarding the success or failure of the operation. curl -4u 'guest:guest' -XPOST localhost:15672/api/rebalance/queues/ POST /api/rebalance/queues
func PostUsersBulkDelete ¶
func PostUsersBulkDelete() Builder
Bulk deletes a list of users. Request body must contain the list: {"users" : ["user1", "user2", "user3"]} POST /api/users/bulk-delete
func PostVhostStartForNode ¶
Starts virtual host {name} on node {node}. POST /api/vhosts/{name}/start/{node}
func PutClusterName ¶
func PutClusterName() Builder
Name identifying this RabbitMQ cluster. PUT /api/cluster-name
func PutExchangeForVhost ¶
An individual exchange. To PUT an exchange, you will need a body looking something like this: {"type":"direct","auto_delete":false,"durable":true,"internal":false,"arguments":{}} The type key is mandatory; other keys are optional. When DELETEing an exchange you can add the query string parameter if-unused=true. This prevents the delete from succeeding if the exchange is bound to a queue or as a source to another exchange. PUT /api/exchanges/{vhost}/{name}
func PutGlobalParameter ¶
An individual global parameter. To PUT a parameter, you will need a body looking something like this: {"name":"user_vhost_mapping","value":{"guest":"/","rabbit":"warren"}} PUT /api/global-parameters/{name}
func PutOperatorPolicyForVhost ¶
An individual operator policy. To PUT a policy, you will need a body looking something like this: {"pattern":"^amq.", "definition": {"expires":100}, "priority":0, "apply-to": "queues"} pattern and definition are mandatory, priority and apply-to are optional. PUT /api/operator-policies/{vhost}/{name}
func PutParameterForComponentAndVhost ¶
An individual vhost-scoped parameter. To PUT a parameter, you will need a body looking something like this: {"vhost": "/","component":"federation","name":"local_username","value":"guest"} PUT /api/parameters/{component}/{vhost}/{name}
func PutPermissionsForVhostAndUser ¶
An individual permission of a user and virtual host. To PUT a permission, you will need a body looking something like this: {"configure":".*","write":".*","read":".*"} All keys are mandatory. PUT /api/permissions/{vhost}/{user}
func PutPolicyForVhost ¶
An individual policy. To PUT a policy, you will need a body looking something like this: {"pattern":"^amq.", "definition": {"federation-upstream-set":"all"}, "priority":0, "apply-to": "all"} pattern and definition are mandatory, priority and apply-to are optional. PUT /api/policies/{vhost}/{name}
func PutQueueForVhost ¶
An individual queue. To PUT a queue, you will need a body looking something like this: {"auto_delete":false,"durable":true,"arguments":{},"node":"rabbit@smacmullen"} All keys are optional. When DELETEing a queue you can add the query string parameters if-empty=true and / or if-unused=true. These prevent the delete from succeeding if the queue contains messages, or has consumers, respectively. PUT /api/queues/{vhost}/{name}
func PutTopicPermissionsForVhostAndUser ¶
Topic permissions for a user and virtual host. To PUT a topic permission, you will need a body looking something like this: {"exchange":"amq.topic","write":"^a","read":".*"} All keys are mandatory. PUT /api/topic-permissions/{vhost}/{user}
func PutUser ¶
An individual user. To PUT a user, you will need a body looking something like this: {"password":"secret","tags":"administrator"} or: {"password_hash":"2lmoth8l4H0DViLaK9Fxi6l9ds8=", "tags":"administrator"} The tags key is mandatory. Either password or password_hash can be set. If neither are set the user will not be able to log in with a password, but other mechanisms like client certificates may be used. Setting password_hash to "" will ensure the user cannot use a password to log in. tags is a comma-separated list of tags for the user. Currently recognised tags are administrator, monitoring and management. password_hash must be generated using the algorithm described here. You may also specify the hash function being used by adding the hashing_algorithm key to the body. Currently recognised algorithms are rabbit_password_hashing_sha256, rabbit_password_hashing_sha512, and rabbit_password_hashing_md5. PUT /api/users/{name}
func PutUserLimitForUser ¶
Set or delete per-user limit for user. The name URL path element refers to the name of the limit (max-connections, max-channels). Limits are set using a JSON document in the body: {"value": 100}. Example request: curl -4u 'guest:guest' -H 'content-type:application/json' -X PUT localhost:15672/api/user-limits/guest/max-connections -d '{"value": 50}' PUT /api/user-limits/{user}/{name}
func PutVhost ¶
An individual virtual host. As a virtual host usually only has a name, you do not need an HTTP body when PUTing one of these. To set metadata on creation, provide a body like the following: {"description":"virtual host description", "tags":"accounts,production"} tags is a comma-separated list of tags. These metadata fields are optional. To enable / disable tracing, provide a body looking like: {"tracing":true} PUT /api/vhosts/{name}
func PutVhostLimitForVhost ¶
Set or delete per-vhost limit for vhost. The name URL path element refers to the name of the limit (max-connections, max-queues). Limits are set using a JSON document in the body: {"value": 100}. Example request: curl -4u 'guest:guest' -H 'content-type:application/json' -X PUT localhost:15672/api/vhost-limits/my-vhost/max-connections -d '{"value": 50}' PUT /api/vhost-limits/{vhost}/{name}
type Query ¶
type Query interface { // Clone returns a deep-copy of this Query instance Clone() Query // Empty returns true if there are no parameters added to the query Empty() bool // Add adds a query parameter, both name and value are query escaped for you. // You can add multiple parameters with the same name, if you think that makes sense. Add(name, value string) Query // AddEscaped adds a query parameter, name and value are assumed to be already query escaped. // You can add multiple parameters with the same name, if you think that makes sense. AddEscaped(name, value string) Query // AddIf adds a query parameter if condition is true. AddIf(condition bool, name, value string) Query // String returns the encoded query string excluding the leading question mark String() string // QueryString returns the encoded query string including the leading question mark QueryString() string }
Query helps with building a url query string