summaryrefslogtreecommitdiff
path: root/app/models/oauth_client.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/oauth_client.go')
-rw-r--r--app/models/oauth_client.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/models/oauth_client.go b/app/models/oauth_client.go
new file mode 100644
index 0000000..2f30087
--- /dev/null
+++ b/app/models/oauth_client.go
@@ -0,0 +1,27 @@
1package models
2
3import (
4 "context"
5 "time"
6)
7
8type OauthClient struct {
9 Id string `bson:"_id"`
10 Deleted *time.Time
11}
12
13func (c *OauthClient) RecordId() string {
14 return c.Id
15}
16
17func (c *OauthClient) MarkDeleted(t time.Time) {
18 c.Deleted = &t
19}
20
21type OauthClientStore interface {
22 List(ctx context.Context) ([]*OauthClient, error)
23 ListAll(ctx context.Context) ([]*OauthClient, error)
24 Get(ctx context.Context, name string) (*OauthClient, error)
25 Upsert(ctx context.Context, m *OauthClient) error
26 Delete(ctx context.Context, m *OauthClient) error
27}