func NewStorage(s storage.Interface) DeploymentStorage { deploymentRest := NewREST(s) deploymentRegistry := deployment.NewRegistry(deploymentRest) return DeploymentStorage{ Deployment: deploymentRest, Scale: &ScaleREST{registry: &deploymentRegistry}, } }
func NewStorage(s storage.Interface, storageDecorator generic.StorageDecorator) DeploymentStorage { deploymentRest, deploymentStatusRest := NewREST(s, storageDecorator) deploymentRegistry := deployment.NewRegistry(deploymentRest) return DeploymentStorage{ Deployment: deploymentRest, Status: deploymentStatusRest, Scale: &ScaleREST{registry: &deploymentRegistry}, } }
func NewStorage(opts generic.RESTOptions) DeploymentStorage { deploymentRest, deploymentStatusRest, deploymentRollbackRest := NewREST(opts) deploymentRegistry := deployment.NewRegistry(deploymentRest) return DeploymentStorage{ Deployment: deploymentRest, Status: deploymentStatusRest, Scale: &ScaleREST{registry: deploymentRegistry}, Rollback: deploymentRollbackRest, } }