github.com/Azure/draft-classic@v0.16.0/pkg/storage/errors.go (about)

     1  package storage
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  // NewErrAppStorageNotFound returns a formatted error specifying the storage
     8  // for application specified by appName does not exist.
     9  func NewErrAppStorageNotFound(appName string) error {
    10  	return fmt.Errorf("application storage for %q not found", appName)
    11  }
    12  
    13  // NewErrAppStorageExists returns a formatted error specifying the storage
    14  // for application specified by appName already exists.
    15  func NewErrAppStorageExists(appName string) error {
    16  	return fmt.Errorf("application storage for %q already exists", appName)
    17  }
    18  
    19  // NewErrAppBuildNotFound returns a formatted error specifying the storage
    20  // object for build with buildID does not exist.
    21  func NewErrAppBuildNotFound(appName, buildID string) error {
    22  	return fmt.Errorf("application %q build storage with ID %q not found", appName, buildID)
    23  }
    24  
    25  // NewErrAppBuildExists returns a formatted error specifying the storage
    26  // object for build with buildID already exists.
    27  func NewErrAppBuildExists(appName, buildID string) error {
    28  	return fmt.Errorf("application %q build storage with ID %q already exists", appName, buildID)
    29  }