diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-10 14:48:08 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:51 +0100 |
commit | 38fa2065831b5f55be0d7f30f19a62c967397208 (patch) | |
tree | 4a986465e3a88c85bc6a8b5fc992e0f2edd63ef0 /server/models/request/request-interface.ts | |
parent | 0d0e8dd0904b380b70e19ebcb4763d65601c4632 (diff) | |
download | PeerTube-38fa2065831b5f55be0d7f30f19a62c967397208.tar.gz PeerTube-38fa2065831b5f55be0d7f30f19a62c967397208.tar.zst PeerTube-38fa2065831b5f55be0d7f30f19a62c967397208.zip |
Remove references to author
Diffstat (limited to 'server/models/request/request-interface.ts')
-rw-r--r-- | server/models/request/request-interface.ts | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/server/models/request/request-interface.ts b/server/models/request/request-interface.ts deleted file mode 100644 index dae35651b..000000000 --- a/server/models/request/request-interface.ts +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | import * as Promise from 'bluebird' | ||
3 | |||
4 | import { AbstractRequestClass } from './abstract-request-interface' | ||
5 | import { PodInstance, PodAttributes } from '../pod/pod-interface' | ||
6 | import { RequestEndpoint } from '../../../shared/models/request-scheduler.model' | ||
7 | |||
8 | export type RequestsGrouped = { | ||
9 | [ podId: number ]: { | ||
10 | request: RequestInstance, | ||
11 | pod: PodInstance | ||
12 | }[] | ||
13 | } | ||
14 | |||
15 | export namespace RequestMethods { | ||
16 | export type CountTotalRequests = () => Promise<number> | ||
17 | |||
18 | export type ListWithLimitAndRandom = (limitPods: number, limitRequestsPerPod: number) => Promise<RequestsGrouped> | ||
19 | |||
20 | export type RemoveWithEmptyTo = () => Promise<number> | ||
21 | |||
22 | export type RemoveAll = () => Promise<void> | ||
23 | } | ||
24 | |||
25 | export interface RequestClass extends AbstractRequestClass<RequestsGrouped> { | ||
26 | countTotalRequests: RequestMethods.CountTotalRequests | ||
27 | listWithLimitAndRandom: RequestMethods.ListWithLimitAndRandom | ||
28 | removeWithEmptyTo: RequestMethods.RemoveWithEmptyTo | ||
29 | removeAll: RequestMethods.RemoveAll | ||
30 | } | ||
31 | |||
32 | export interface RequestAttributes { | ||
33 | request: object | ||
34 | endpoint: RequestEndpoint | ||
35 | } | ||
36 | |||
37 | export interface RequestInstance extends RequestClass, RequestAttributes, Sequelize.Instance<RequestAttributes> { | ||
38 | id: number | ||
39 | createdAt: Date | ||
40 | updatedAt: Date | ||
41 | |||
42 | setPods: Sequelize.HasManySetAssociationsMixin<PodAttributes, number> | ||
43 | Pods: PodInstance[] | ||
44 | } | ||
45 | |||
46 | export interface RequestModel extends RequestClass, Sequelize.Model<RequestInstance, RequestAttributes> {} | ||