-
Notifications
You must be signed in to change notification settings - Fork 0
/
likes_database_null.go
47 lines (36 loc) · 1.11 KB
/
likes_database_null.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package activitypub
import (
"context"
)
type NullLikesDatabase struct {
LikesDatabase
}
func init() {
ctx := context.Background()
RegisterLikesDatabase(ctx, "null", NewNullLikesDatabase)
}
func NewNullLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error) {
db := &NullLikesDatabase{}
return db, nil
}
func (db *NullLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetLikeIdsCallbackFunc) error {
return nil
}
func (db *NullLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*Like, error) {
return nil, ErrNotFound
}
func (db *NullLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, id int64, actor string) (*Like, error) {
return nil, ErrNotFound
}
func (db *NullLikesDatabase) GetLikesForPost(ctx context.Context, post_id int64, cb GetLikesCallbackFunc) error {
return nil
}
func (db *NullLikesDatabase) AddLike(ctx context.Context, like *Like) error {
return nil
}
func (db *NullLikesDatabase) RemoveLike(ctx context.Context, like *Like) error {
return nil
}
func (db *NullLikesDatabase) Close(ctx context.Context) error {
return nil
}