aboutsummaryrefslogtreecommitdiff
path: root/types/connection.go
diff options
context:
space:
mode:
authorPriyansh <[email protected]>2025-08-28 13:09:22 +0530
committerPriyansh <[email protected]>2025-08-28 13:09:22 +0530
commit9e82811a2a963be962fc3ffc426c137e01d56e2d (patch)
tree9cde1691f6e8dafb7204b7247dea12af0aa22bf6 /types/connection.go
parent18b897a36805d1acb6e2352ca536c1eee9249fe3 (diff)
downloadnectar-9e82811a2a963be962fc3ffc426c137e01d56e2d.tar.xz
nectar-9e82811a2a963be962fc3ffc426c137e01d56e2d.zip
Restructure codebase with proper organization, fix file picker navigation, and add utils packageHEADmain
Diffstat (limited to 'types/connection.go')
-rw-r--r--types/connection.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/types/connection.go b/types/connection.go
new file mode 100644
index 0000000..bfeb0cb
--- /dev/null
+++ b/types/connection.go
@@ -0,0 +1,35 @@
+package types
+
+type ConnectionType int
+
+const (
+ PostgreSQL ConnectionType = iota
+ MySQL
+ SQLite
+)
+
+func (ct ConnectionType) String() string {
+ switch ct {
+ case PostgreSQL:
+ return "PostgreSQL"
+ case MySQL:
+ return "MySQL"
+ case SQLite:
+ return "SQLite"
+ default:
+ return "Unknown"
+ }
+}
+
+type Connection struct {
+ Name string
+ Type ConnectionType
+ Host string
+ Port string
+ User string
+ Password string
+ Database string
+ DatabaseFile string
+ EnableSSL bool
+ Color string
+}