diff options
| author | 2025-03-17 15:06:17 +0100 | |
|---|---|---|
| committer | 2025-03-17 14:06:17 +0000 | |
| commit | d5847e2d2b68a1eb41d43be170cd4ddff9003cff (patch) | |
| tree | 7352e79110b081eb72d483358f5c07c8d34c29ff /internal/db/application.go | |
| parent | [feature/frontend] Add visibility icon for posts (#3908) (diff) | |
| download | gotosocial-d5847e2d2b68a1eb41d43be170cd4ddff9003cff.tar.xz | |
[feature] Application creation + management via API + settings panel (#3906)
* [feature] Application creation + management via API + settings panel
* fix docs links
* add errnorows test
* use known application as shorter
* add comment about side effects
Diffstat (limited to 'internal/db/application.go')
| -rw-r--r-- | internal/db/application.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/db/application.go b/internal/db/application.go index a3061f028..76948b0fd 100644 --- a/internal/db/application.go +++ b/internal/db/application.go @@ -31,11 +31,14 @@ type Application interface { // GetApplicationByClientID fetches the application from the database with corresponding client_id value. GetApplicationByClientID(ctx context.Context, clientID string) (*gtsmodel.Application, error) + // GetApplicationsManagedByUserID fetches a page of applications managed by the given userID. + GetApplicationsManagedByUserID(ctx context.Context, userID string, page *paging.Page) ([]*gtsmodel.Application, error) + // PutApplication places the new application in the database, erroring on non-unique ID or client_id. PutApplication(ctx context.Context, app *gtsmodel.Application) error - // DeleteApplicationByClientID deletes the application with corresponding client_id value from the database. - DeleteApplicationByClientID(ctx context.Context, clientID string) error + // DeleteApplicationByID deletes the application with corresponding id from the database. + DeleteApplicationByID(ctx context.Context, id string) error // GetAllTokens fetches all client oauth tokens from database. GetAllTokens(ctx context.Context) ([]*gtsmodel.Token, error) @@ -72,4 +75,8 @@ type Application interface { // DeleteTokenByRefresh deletes client oauth token from database with refresh code. DeleteTokenByRefresh(ctx context.Context, refresh string) error + + // DeleteTokensByClientID deletes all tokens + // with the given clientID from the database. + DeleteTokensByClientID(ctx context.Context, clientID string) error } |
