aboutsummaryrefslogtreecommitdiff
path: root/lib/sql/client_options.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2020-12-17 21:31:11 +0700
committerShulhan <m.shulhan@gmail.com>2020-12-17 21:31:11 +0700
commit0c5ed9573fec93cbf31e4778c981c61d7decdf4a (patch)
tree6b48cb9215a8dbe7a67303c208260c93eb7f4fa6 /lib/sql/client_options.go
parenta4ed4ab1df3b20d922315d1e821478bdcacefc5b (diff)
downloadpakakeh.go-0c5ed9573fec93cbf31e4778c981c61d7decdf4a.tar.xz
sql: change the new client function parameter into struct of options
While at it, rename the function from "New" to "NewClient" for clarity.
Diffstat (limited to 'lib/sql/client_options.go')
-rw-r--r--lib/sql/client_options.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/sql/client_options.go b/lib/sql/client_options.go
new file mode 100644
index 00000000..0214f78c
--- /dev/null
+++ b/lib/sql/client_options.go
@@ -0,0 +1,15 @@
+// Copyright 2020, Shulhan <ms@kilabit.info>. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sql
+
+//
+// ClientOptions contains options to connect to database server, including the
+// migration directory.
+//
+type ClientOptions struct {
+ DriverName string
+ DSN string
+ MigrationDir string
+}