Skip to content

Commit

Permalink
Add ProcessingStatus enum values (#35)
Browse files Browse the repository at this point in the history
* Increase GetFeedDocument rate limit
Refactor interfaces to structs
Add ProcessingStatus type with IsDone method

* Style: Rename Http to HTTP

* Add ProcessingStatus enum values

---------

Co-authored-by: Florian <[email protected]>
  • Loading branch information
VloRyan and Florian authored Feb 22, 2023
1 parent c573488 commit 547cffa
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions apis/feeds/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@ import (

type ProcessingStatus string

func (s ProcessingStatus) IsDone() bool {
return s == "DONE"
}
const (
// ProcessingStatusCanceled The feed was cancelled before it started processing.
ProcessingStatusCanceled ProcessingStatus = "CANCELLED"
// ProcessingStatusDone The feed has completed processing. Examine the contents of the result document to determine if there were any errors during processing.
ProcessingStatusDone ProcessingStatus = "DONE"
// ProcessingStatusFatal The feed was aborted due to a fatal error. Some, none, or all of the operations within the feed may have completed successfully.
ProcessingStatusFatal ProcessingStatus = "FATAL"
// ProcessingStatusInProgress The feed is being processed.
ProcessingStatusInProgress ProcessingStatus = "IN_PROGRESS"
// ProcessingStatusInQueue The feed has not yet started processing. It may be waiting for another IN_PROGRESS feed.
ProcessingStatusInQueue ProcessingStatus = "IN_QUEUE"
)

// Feed contains detailed information about the feed.
type Feed struct {
Expand Down

0 comments on commit 547cffa

Please sign in to comment.