-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: remove wire * remove driver * fix test * fix test * fix test * fix test * remove global variable * optimize based on ai * chore: update mocks * fix test * fix test --------- Co-authored-by: hwbrzzl <hwbrzzl@users.noreply.github.com>
- Loading branch information
Showing
63 changed files
with
1,486 additions
and
1,508 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,41 @@ | ||
package database | ||
|
||
const ( | ||
DriverMysql Driver = "mysql" | ||
DriverPostgres Driver = "postgres" | ||
DriverSqlite Driver = "sqlite" | ||
DriverSqlserver Driver = "sqlserver" | ||
) | ||
|
||
type Driver string | ||
|
||
func (d Driver) String() string { | ||
return string(d) | ||
} | ||
|
||
// Config Used in config/database.go | ||
type Config struct { | ||
Host string | ||
Port int | ||
Database string | ||
Username string | ||
Password string | ||
} | ||
|
||
// FullConfig Fill the default value for Config | ||
type FullConfig struct { | ||
Config | ||
Driver Driver | ||
Connection string | ||
Prefix string | ||
Singular bool | ||
Charset string // Mysql, Sqlserver | ||
Loc string // Mysql | ||
Sslmode string // Postgres | ||
Timezone string // Postgres | ||
} | ||
|
||
type ConfigBuilder interface { | ||
Reads() []FullConfig | ||
Writes() []FullConfig | ||
} |
This file was deleted.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.