terraform/vendor/github.com/jen20/riviera/sql/get_database.go

38 lines
1.6 KiB
Go

package sql
import "github.com/jen20/riviera/azure"
type GetDatabaseResponse struct {
ID *string `mapstructure:"id"`
Name *string `mapstructure:"name"`
Location *string `mapstructure:"location"`
Tags *map[string]string `mapstructure:"tags"`
DatabaseID *string `mapstructure:"databaseId"`
DatabaseName *string `mapstructure:"databaseName"`
Edition *string `mapstructure:"edition"`
ServiceLevelObjective *string `mapstructure:"serviceLevelObjective"`
MaxSizeInBytes *string `mapstructure:"maxSizeInBytes"`
CreationDate *string `mapstructure:"creationDate"`
CurrentServiceLevelObjectiveID *string `mapstructure:"currentServiceLevelObjectiveId"`
RequestedServiceObjectiveID *string `mapstructure:"requestedServiceObjectiveId"`
DefaultSecondaryLocation *string `mapstructure:"defaultSecondaryLocation"`
Encryption *string `mapstructure:"encryption"`
}
type GetDatabase struct {
Name string `json:"-"`
ServerName string `json:"-"`
ResourceGroupName string `json:"-"`
}
func (s GetDatabase) APIInfo() azure.APIInfo {
return azure.APIInfo{
APIVersion: apiVersion,
Method: "GET",
URLPathFunc: sqlDatabaseDefaultURLPath(s.ResourceGroupName, s.ServerName, s.Name),
ResponseTypeFunc: func() interface{} {
return &GetDatabaseResponse{}
},
}
}