diff options
Diffstat (limited to 'bridge/github/import_query.go')
-rw-r--r-- | bridge/github/import_query.go | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/bridge/github/import_query.go b/bridge/github/import_query.go index c4ab2aa9..461daf94 100644 --- a/bridge/github/import_query.go +++ b/bridge/github/import_query.go @@ -2,6 +2,19 @@ package github import "github.com/shurcooL/githubv4" +type rateLimit struct { + Cost githubv4.Int + Limit githubv4.Int + NodeCount githubv4.Int + Remaining githubv4.Int + ResetAt githubv4.DateTime + Used githubv4.Int +} + +type rateLimiter interface { + rateLimit() rateLimit +} + type userQuery struct { RateLimit rateLimit `graphql:"rateLimit(dryRun: $dryRun)"` User user `graphql:"user(login: $login)"` @@ -211,12 +224,3 @@ type pageInfo struct { StartCursor githubv4.String HasPreviousPage bool } - -type rateLimit struct { - Cost githubv4.Int - Limit githubv4.Int - NodeCount githubv4.Int - Remaining githubv4.Int - ResetAt githubv4.DateTime - Used githubv4.Int -} |