~sirn/fanboi2

ref: 0e52a2d9448755b13e9989cf85879c52b7bc7b10 fanboi2/fanboi2/interfaces.py -rw-r--r-- 4.4 KiB View raw
0e52a2d9Kridsada Thanabulpong [build] fix broken dependencies version lock 10 months ago
                                                                                        
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# flake8: noqa B902

from zope.interface import Interface


class IBanCreateService(Interface):
    def create(ip_address, description=None, duration=None, scope=None, active=True):
        pass


class IBanQueryService(Interface):
    def list_active():
        pass

    def list_inactive():
        pass

    def is_banned(ip_address, scopes):
        pass

    def ban_from_id(id):
        pass


class IBanUpdateService(Interface):
    def update(ban_id, **kwargs):
        pass


class IBanwordCreateService(Interface):
    def create(expr, description=None, active=True):
        pass


class IBanwordQueryService(Interface):
    def list_active():
        pass

    def list_inactive():
        pass

    def is_banned(text):
        pass

    def banword_from_id(id):
        pass


class IBanwordUpdateService(Interface):
    def update(banword_id, **kwargs):
        pass


class IBoardCreateService(Interface):
    def create(slug, title, description, status, agreements, settings):
        pass


class IBoardQueryService(Interface):
    def list_all():
        pass

    def list_active():
        pass

    def board_from_slug(board_slug):
        pass


class IBoardUpdateService(Interface):
    def update(slug, **kwargs):
        pass


class IFilterService(Interface):
    def evaluate(payload):
        pass


class IIdentityService(Interface):
    def identity_for(**kwargs):
        pass

    def identity_with_tz_for(tz, **kwargs):
        pass


class IPageCreateService(Interface):
    def create(slug, title, body):
        pass


class IPageDeleteService(Interface):
    def delete(slug):
        pass


class IPageQueryService(Interface):
    def list_public():
        pass

    def list_internal():
        pass

    def public_page_from_slug(slug):
        pass

    def internal_page_from_slug(slug):
        pass

    def internal_body_from_slug(slug):
        pass


class IPageUpdateService(Interface):
    def update(slug, **kwargs):
        pass

    def update_internal(slug, **kwargs):
        pass


class IPostCreateService(Interface):
    def enqueue(topic_id, body, bumped, ip_address):
        pass

    def create(topic_id, body, bumped, ip_address, payload):
        pass

    def create_with_user(topic_id, user_id, body, bumped, ip_address):
        pass


class IPostDeleteService(Interface):
    def delete_from_topic_id(topic_id, number):
        pass


class IPostQueryService(Interface):
    def list_from_topic_id(topic_id, query=None):
        pass

    def was_recently_seen(ip_address):
        pass


class IRateLimiterService(Interface):
    def limit_for(seconds, **kwargs):
        pass

    def is_limited(**kwargs):
        pass

    def time_left(**kwargs):
        pass


class IScopeService(Interface):
    def evaluate(scope, obj):
        pass


class ISettingQueryService(Interface):
    def list_all():
        pass

    def value_from_key(key, use_cache=True, safe_keys=False):
        pass

    def reload_cache(key):
        pass


class ISettingUpdateService(Interface):
    def update(key, value):
        pass


class ITaskQueryService(Interface):
    def result_from_uid(task_uid):
        pass


class ITopicCreateService(Interface):
    def enqueue(board_slug, title, body, ip_address, payload):
        pass

    def create(board_slug, title, body, ip_address):
        pass

    def create_with_user(board_slug, user_id, title, body, ip_address):
        pass


class ITopicDeleteService(Interface):
    def delete(topic_id):
        pass


class ITopicQueryService(Interface):
    def list_from_board_slug(board_slug):
        pass

    def list_recent_from_board_slug(board_slug):
        pass

    def list_recent():
        pass

    def topic_from_id(topic_id):
        pass


class ITopicUpdateService(Interface):
    def update(topic_id, **kwargs):
        pass


class IUserCreateService(Interface):
    def create(username, password, parent, groups):
        pass


class IUserLoginService(Interface):
    def authenticate(username, password):
        pass

    def user_from_token(token, ip_address):
        pass

    def groups_from_token(token, ip_address):
        pass

    def revoke_token(token, ip_address):
        pass

    def mark_seen(token, ip_address, revocation=3600):
        pass

    def token_for(username, ip_address):
        pass


class IUserQueryService(Interface):
    def user_from_id(id):
        pass


class IUserSessionQueryService(Interface):
    def list_recent_from_user_id(user_id):
        pass