summaryrefslogtreecommitdiff
path: root/db/db.go
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-05-01 14:07:39 -0500
committersanine-a <sanine.not@pm.me>2023-05-01 14:07:39 -0500
commit416055e02b74f640ab6030deaa9f7767221a49cd (patch)
treeae6f1696404f083c805297bbd025a240841e641e /db/db.go
parentaa7c3eb23c31fa6051ee0caaebea47c8225d55a4 (diff)
add additional configuration functions for users and endpoints
Diffstat (limited to 'db/db.go')
-rw-r--r--db/db.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/db/db.go b/db/db.go
index d9faff3..a9a9a2e 100644
--- a/db/db.go
+++ b/db/db.go
@@ -41,6 +41,7 @@ type Model interface {
GetSchemaVersion() (int, error)
CreateUser(username, password string) (User, error)
+ SetPassword(user User, password string) error
AuthenticateUser(username, password string) (User, error)
GetById(id string) (User, error)
AllUsers() ([]User, error)
@@ -53,6 +54,8 @@ type Model interface {
CreateEndpoint(name, path, address string) (Endpoint, error)
DeleteEndpoint(endpoint Endpoint) error
+ SetEndpointPath(endpoint Endpoint, path string) error
+ SetEndpointAddress(endpoint Endpoint, address string) error
GetEndpointByName(name string) (Endpoint, error)
GetEndpointByPath(path string) (Endpoint, error)
GetEndpointByAddress(address string) (Endpoint, error)