// 2018 Rackspace, Inc. // // 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. // This file is only for the purposes of defining specific typed responses for swagger documentation. // Since we use a generic typed response (tools.Response.Data), we need to define the types of responses // that can be returned depending on the specific call made. // // This file creates those types that allows swagger to auto-generate spec. // Package tools serves as helper or utility functions for other applications within the Migrations App. package tools import ( "go/types" "github.rackspace.com/DCM/discover" "github.rackspace.com/DCM/migration/pkg/audit/failover" "github.rackspace.com/DCM/migration/pkg/audit/postmigration" "github.rackspace.com/DCM/migration/pkg/audit/spansessions" "github.rackspace.com/DCM/migration/pkg/collection" "github.rackspace.com/DCM/migration/pkg/collection/dp" "github.rackspace.com/DCM/migration/pkg/collection/mongo" "github.rackspace.com/DCM/migration/pkg/snapshot" "github.rackspace.com/DCM/migration/pkg/tools/journal" "github.rackspace.com/DCM/tools" "github.rackspace.com/gorax/clients/dcxAutohost" "github.rackspace.com/gorax/clients/mongodbAPI" "github.rackspace.com/gorax/tsip" mongo2 "go.mongodb.org/mongo-driver/mongo" ) // respMirror swagger mock type // // swagger:model type respMirror struct { // The data payload or nil if no data is returned Data spansessions.AuditResp `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respChanges swagger mock type // // swagger:model type respChanges struct { // The data payload or nil if no data is returned Data []journal.Changes `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respUpdate swagger mock type // // swagger:model type respUpdate struct { // The data payload or nil if no data is returned Data collection.UpdateResponse `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respMacSnap swagger mock type // // swagger:model type respMacSnap struct { // The data payload or nil if no data is returned Data []snapshot.Device `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respMongoDevice swagger mock type // // swagger:model type respMongoDevice struct { // The data payload or nil if no data is returned Data []tools.Device `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respDPDevice swagger mock type // // swagger:model type respDPDevice struct { // The data payload or nil if no data is returned Data []dp.Device `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respString swagger mock type // // swagger:model type respString struct { // The data payload or nil if no data is returned Data string `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respProcessMap swagger mock type // // swagger:model type respProcessMap struct { // The data payload or nil if no data is returned Data mongo.ProcessMap `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respProcessMapDB swagger mock type // // swagger:model type respProcessMapDB struct { // The data payload or nil if no data is returned Data []mongo.ProcessMapDB `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respDCXMigratedVlans swagger mock type // // swagger:model type respDCXMigratedVlans struct { // The data payload or nil if no data is returned Data dcxAutohost.MigratedVlans `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respDCXDeallocateIPs swagger mock type // // swagger:model type respDCXDeallocateIPs struct { // The data payload or nil if no data is returned Data struct { DeallocatedIPs []string `json:"deallocated_ips"` Errors struct { IPAddress string `json:"ip_address"` Error string `json:"error"` } } `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respFailoverResult swagger mock type // // swagger:model type respFailoverResult struct { // The data payload or nil if no data is returned Data failover.Result `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respDBCreateResult swagger mock type // // swagger:model type respDBCreateResult struct { // The data payload or nil if no data is returned Data mongo2.InsertManyResult `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respDBUpdateResult swagger mock type // // swagger:model type respDBUpdateResult struct { // The data payload or nil if no data is returned Data mongo2.UpdateResult `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respDBReadResult swagger mock type // // swagger:model type respDBReadResult struct { // The data payload or nil if no data is returned Data []interface{} `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respDBDeleteResult swagger mock type // // swagger:model type respDBDeleteResult struct { // The data payload or nil if no data is returned Data mongo2.DeleteResult `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // respBasicErr swagger mock type // // swagger:model type respBasicErr struct { // The data payload or nil if no data is returned Data types.Nil `json:"data"` // The error message, will be nil in the event of a successful response Error error `json:"error"` } // FindQuery swagger mock type // // swagger:model type FindQuery mongodbAPI.FindQuery // InsertManyQuery swagger mock type // // swagger:model type InsertManyQuery mongodbAPI.InsertManyQuery // RealIP swagger mock type // // swagger:model type RealIP tsip.RealIP // PostMigrateResult swagger mock type // // swagger:model type PostMigrateResult postmigration.Result // DiscoverResult swagger mock type // // swagger:model type DiscoverResult discover.Result // VlanTranslations swagger mock type // // swagger:model type VlanTranslations []dcxAutohost.EnvironmentMigrationVlan // PortMaps swagger mock type // // swagger:model type PortMaps []dcxAutohost.DevicePortMap // InterfaceList swagger mock type // // swagger:model type InterfaceList []interface{}