Documentation ¶
Overview ¶
Package store contains functions for writing parsed feeds to cloud storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSession ¶
func GetSession(creds *AWSCredentials) (sesh *session.Session, err error)
GetSession is a helper function that returns an AWS session that can be reused for multiple writes. It takes in a pointer to an AWSCredentials struct and returns a pointer to an AWS connection and a nil, else a nil and the connection error.
func MustOpen ¶
MustOpen either initializes a new leveldb database at the path of the string provided or opens an existing leveldb database found at that path.
func Upload ¶
Upload a single Document to the specified S3 bucket using the established AWS session, setting file information including name (the feedID, language code, year, month, day, and hash of the content), the content size and type, and the encryption on the uploaded file.
func VerifyCredentials ¶
func VerifyCredentials(creds *AWSCredentials) bool
VerifyCredentials is a helper function that verifies the credentials are correct and the bucket exists, returning true if so else false.
Types ¶
type AWSCredentials ¶
AWSCredentials stores the region and bucket needed to access an S3 bucket.