1// Package redis implements the Azure ARM Redis service API version 2017-10-01. 2// 3// REST API for Azure Redis Cache Service. 4package redis 5 6// Copyright (c) Microsoft and contributors. All rights reserved. 7// 8// Licensed under the Apache License, Version 2.0 (the "License"); 9// you may not use this file except in compliance with the License. 10// You may obtain a copy of the License at 11// http://www.apache.org/licenses/LICENSE-2.0 12// 13// Unless required by applicable law or agreed to in writing, software 14// distributed under the License is distributed on an "AS IS" BASIS, 15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16// 17// See the License for the specific language governing permissions and 18// limitations under the License. 19// 20// Code generated by Microsoft (R) AutoRest Code Generator. 21// Changes may cause incorrect behavior and will be lost if the code is regenerated. 22 23import ( 24 "github.com/Azure/go-autorest/autorest" 25) 26 27const ( 28 // DefaultBaseURI is the default URI used for the service Redis 29 DefaultBaseURI = "https://management.azure.com" 30) 31 32// BaseClient is the base client for Redis. 33type BaseClient struct { 34 autorest.Client 35 BaseURI string 36 SubscriptionID string 37} 38 39// New creates an instance of the BaseClient client. 40func New(subscriptionID string) BaseClient { 41 return NewWithBaseURI(DefaultBaseURI, subscriptionID) 42} 43 44// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with 45// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). 46func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { 47 return BaseClient{ 48 Client: autorest.NewClientWithUserAgent(UserAgent()), 49 BaseURI: baseURI, 50 SubscriptionID: subscriptionID, 51 } 52} 53