/
service.go
55 lines (43 loc) · 2.32 KB
/
service.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
48
49
50
51
52
53
54
55
package moderation
import (
"net/http"
"github.com/OdyseeTeam/commentron/commentapi"
)
// Service is the service struct defined for the comment package for rpc service "moderation.*"
type Service struct{}
// Block returns a list of reactions for the comments requested
func (s Service) Block(r *http.Request, args *commentapi.BlockArgs, reply *commentapi.BlockResponse) error {
return block(r, args, reply)
}
// AmI return whether or not the users is a moderator and the type. Also the channels they moderate
func (s Service) AmI(r *http.Request, args *commentapi.AmIArgs, reply *commentapi.AmIResponse) error {
return amI(r, args, reply)
}
// UnBlock return whether or not the users is a moderator and the type. Also the channels they moderate
func (s Service) UnBlock(r *http.Request, args *commentapi.UnBlockArgs, reply *commentapi.UnBlockResponse) error {
return unBlock(r, args, reply)
}
// BlockedList return the list of blocked channels for a moderator
func (s Service) BlockedList(r *http.Request, args *commentapi.BlockedListArgs, reply *commentapi.BlockedListResponse) error {
return blockedList(r, args, reply)
}
// AddDelegate return the list of blocked channels for a moderator
func (s Service) AddDelegate(r *http.Request, args *commentapi.AddDelegateArgs, reply *commentapi.ListDelegateResponse) error {
return addDelegate(r, args, reply)
}
// RemoveDelegate return the list of blocked channels for a moderator
func (s Service) RemoveDelegate(r *http.Request, args *commentapi.RemoveDelegateArgs, reply *commentapi.ListDelegateResponse) error {
return removeDelegate(r, args, reply)
}
// ListDelegates return the list of blocked channels for a moderator
func (s Service) ListDelegates(r *http.Request, args *commentapi.ListDelegatesArgs, reply *commentapi.ListDelegateResponse) error {
return listDelegates(r, args, reply)
}
// ActOnClassification confirms or rejects a comment classification
func (s Service) ActOnClassification(r *http.Request, args *commentapi.ActOnClassificationArgs, reply *commentapi.ActOnClassificationResponse) error {
return actOnClassification(r, args, reply)
}
// AdminAlgoCallbacks adds or deletes a ChannelAlgoCallback
func (s Service) AdminAlgoCallbacks(r *http.Request, args *commentapi.AdminAlgoCallbacksArgs, reply *commentapi.AdminAlgoCallbacksResponse) error {
return adminAlgoCallbacks(r, args, reply)
}