queueserviceclient.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package storage
  2. // Copyright 2017 Microsoft Corporation
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. // QueueServiceClient contains operations for Microsoft Azure Queue Storage
  16. // Service.
  17. type QueueServiceClient struct {
  18. client Client
  19. auth authentication
  20. }
  21. // GetServiceProperties gets the properties of your storage account's queue service.
  22. // See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-queue-service-properties
  23. func (q *QueueServiceClient) GetServiceProperties() (*ServiceProperties, error) {
  24. return q.client.getServiceProperties(queueServiceName, q.auth)
  25. }
  26. // SetServiceProperties sets the properties of your storage account's queue service.
  27. // See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/set-queue-service-properties
  28. func (q *QueueServiceClient) SetServiceProperties(props ServiceProperties) error {
  29. return q.client.setServiceProperties(props, queueServiceName, q.auth)
  30. }
  31. // GetQueueReference returns a Container object for the specified queue name.
  32. func (q *QueueServiceClient) GetQueueReference(name string) *Queue {
  33. return &Queue{
  34. qsc: q,
  35. Name: name,
  36. }
  37. }