diff options
author | r <r@freesoftwareextremist.com> | 2020-01-28 17:51:00 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-01-28 17:58:29 +0000 |
commit | 2af37d47783aac8c650ffd1578e2297b5784c73d (patch) | |
tree | 7b5c7a4b2fa530285bfaa16324e818d97dd00408 /model | |
parent | 57d2a4288b02fd1245ee85ae629649798578cf6c (diff) | |
download | bloat-2af37d47783aac8c650ffd1578e2297b5784c73d.tar.gz bloat-2af37d47783aac8c650ffd1578e2297b5784c73d.zip |
Refactor everything
Diffstat (limited to 'model')
-rw-r--r-- | model/app.go | 2 | ||||
-rw-r--r-- | model/client.go | 7 | ||||
-rw-r--r-- | model/post.go (renamed from model/postContext.go) | 0 | ||||
-rw-r--r-- | model/session.go | 2 |
4 files changed, 8 insertions, 3 deletions
diff --git a/model/app.go b/model/app.go index 7abc8ec..8f172c8 100644 --- a/model/app.go +++ b/model/app.go @@ -15,7 +15,7 @@ type App struct { ClientSecret string `json:"client_secret"` } -type AppRepository interface { +type AppRepo interface { Add(app App) (err error) Get(instanceDomain string) (app App, err error) } diff --git a/model/client.go b/model/client.go index ae7270e..6123b38 100644 --- a/model/client.go +++ b/model/client.go @@ -1,8 +1,13 @@ package model -import "mastodon" +import ( + "io" + + "mastodon" +) type Client struct { *mastodon.Client + Writer io.Writer Session Session } diff --git a/model/postContext.go b/model/post.go index 58997f7..58997f7 100644 --- a/model/postContext.go +++ b/model/post.go diff --git a/model/session.go b/model/session.go index 6bc8a63..10fca6f 100644 --- a/model/session.go +++ b/model/session.go @@ -16,7 +16,7 @@ type Session struct { Settings Settings `json:"settings"` } -type SessionRepository interface { +type SessionRepo interface { Add(session Session) (err error) Get(sessionID string) (session Session, err error) } |