Documentation ¶
Index ¶
- type FirestoreDB
- func (f *FirestoreDB) GetFromDB(ctx context.Context, repo string, prNumber int) (*PullRequestData, error)
- func (f *FirestoreDB) PutInDB(ctx context.Context, repo string, prNumber int, prURL string, commented bool) error
- func (f *FirestoreDB) UpdateDB(ctx context.Context, repo string, prNumber int, merged, abandoned bool) error
- type PullRequestData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirestoreDB ¶
type FirestoreDB struct {
// contains filtered or unexported fields
}
FirestoreDB uses Cloud Firestore for storage.
func New ¶
func New(ctx context.Context, ts oauth2.TokenSource, fsNamespace, fsProjectId string) (*FirestoreDB, error)
New returns an instance of FirestoreDB.
func (*FirestoreDB) GetFromDB ¶
func (f *FirestoreDB) GetFromDB(ctx context.Context, repo string, prNumber int) (*PullRequestData, error)
GetFromDB returns a PullRequestData document snapshot from Firestore. If the document is not found then (nil, nil) is returned.
type PullRequestData ¶
type PullRequestData struct { Created time.Time `firestore:"created"` PullRequestNumber int `firestore:"pull_request_number"` PullRequestURL string `firestore:"pull_request_url"` Commented bool `firestore:"commented"` Merged bool `firestore:"merged"` Abandoned bool `firestore:"abandoned"` }
PullRequestData is the type that will be stored in FirestoreDB.
Click to show internal directories.
Click to hide internal directories.