-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathreddit_struct.go
More file actions
39 lines (34 loc) · 813 Bytes
/
reddit_struct.go
File metadata and controls
39 lines (34 loc) · 813 Bytes
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
package mira
import (
"net/http"
"time"
)
// Reddit is the main mira struct that practically
// does everything
type Reddit struct {
Token string `json:"access_token"`
Duration float64 `json:"expires_in"`
Creds Credentials
Chain chan *ChainVals
Stream Streaming
Values RedditVals
Client *http.Client
}
// Streaming is used for some durations on how frequently
// do we listen to comments/submissions
type Streaming struct {
CommentListInterval time.Duration
PostListInterval time.Duration
PostListSlice int
ReportsInterval time.Duration
ModQueueInterval time.Duration
}
// RedditVals is just some values to backoff
type RedditVals struct {
GetSubmissionFromCommentTries int
}
// ChainVals is our queue values
type ChainVals struct {
Name string
Type string
}