Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NPM audits collection name. NpmAuditDataCol = "NpmAuditData" // Downloaded packages examiner collection name. DownloadedPackagesExaminerCol = "DownloadedPackagesExaminer" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FirestoreDB ¶
type FirestoreDB struct {
// contains filtered or unexported fields
}
FirestoreDB uses Cloud Firestore for storage and implements the types.NpmDB interface.
func (*FirestoreDB) GetFromDB ¶
func (f *FirestoreDB) GetFromDB(ctx context.Context, key string) (*types.NpmAuditData, error)
GetFromDB gets a NpmAuditData document snapshot from Firestore. If the document is not found then (nil, nil) is returned.
Click to show internal directories.
Click to hide internal directories.