forked from cloudfoundry/stratos
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nedim Akar
committed
Oct 31, 2023
1 parent
f6c0744
commit 18325a5
Showing
10 changed files
with
69 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package constants | ||
|
||
const ( | ||
ERR_GOOSE_DB_NO_DATABASE_VERSIONS_FOUND = "pgsql_goosedb: no database versions found" | ||
ERR_GOOSE_DB_NO_SUCH_TABLE = "pgsql_goosedb: no such table" | ||
ERR_GOOSE_DB_FAILED_GETTING_CURRENT_DATABASE_VERSION = "pgsql_goosedb: error trying to get current database version: %w" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package custom_errors | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/cloudfoundry-incubator/stratos/src/jetstream/custom_error/constants" | ||
) | ||
|
||
type GooseDBNoDatabaseVersionsFoundError struct{} | ||
|
||
func (e GooseDBNoDatabaseVersionsFoundError) Error() string { | ||
return constants.ERR_GOOSE_DB_NO_DATABASE_VERSIONS_FOUND | ||
} | ||
|
||
type GooseDBNoSuchTableError struct{} | ||
|
||
func (e GooseDBNoSuchTableError) Error() string { | ||
return constants.ERR_GOOSE_DB_NO_SUCH_TABLE | ||
} | ||
|
||
func ErrGettingCurrentVersion(err error) error { | ||
return fmt.Errorf(constants.ERR_GOOSE_DB_FAILED_GETTING_CURRENT_DATABASE_VERSION, err) | ||
} | ||
|
||
var ErrNoDatabaseVersionsFound = GooseDBNoDatabaseVersionsFoundError{} | ||
var ErrNoSuchTable = GooseDBNoSuchTableError{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters