Documentation ¶
Index ¶
Constants ¶
const DefaultExpireWindow = 20
DefaultExpireWindow is the default amount of seconds that the credentials are assumed to be expired, before they are actually expired. This will prevent the server from rejecting the credentials because they were just expired.
const ProviderName = `NerdalizeProvider`
ProviderName is the name of the credentials provider.
const (
//StatusCodeForbidden is returned by AWS when a user does not have access to perform a given operation
StatusCodeForbidden = "Forbidden"
)
Variables ¶
This section is empty.
Functions ¶
func NewNerdalizeCredentials ¶
func NewNerdalizeCredentials(c v1batch.ClientTokenInterface, nlzProjectID string) *credentials.Credentials
NewNerdalizeCredentials creates a new credentials object with the NerdalizeProvider as provider.
Types ¶
type DataClient ¶
DataClient is a client to AWS' S3 service. The client implements the v1data.DataOps interface.
func NewDataClient ¶
func NewDataClient(c *credentials.Credentials, region string) (*DataClient, error)
NewDataClient creates a new DataClient.
func (*DataClient) Download ¶ added in v0.4.12
func (c *DataClient) Download(ctx context.Context, bucket, key string) (body io.ReadCloser, err error)
Download downloads an object to S3.
func (*DataClient) Upload ¶ added in v0.4.12
func (c *DataClient) Upload(ctx context.Context, bucket, key string, body io.ReadSeeker) error
Upload uploads an object to S3.
type Provider ¶
type Provider struct { credentials.Expiry ExpiryWindow time.Duration Client v1batch.ClientTokenInterface NlzProjectID string }
Provider satisfies the credentials.Provider interface, and is a client to retrieve credentials from the nerdalize api.
type QueueClient ¶ added in v0.4.12
QueueClient is a client to AWS' SQS queueing service. The client implements the v1batch.QueueOps interface.
func NewQueueClient ¶ added in v0.4.12
func NewQueueClient(c *credentials.Credentials, region string) (*QueueClient, error)
NewQueueClient creates a new QueueClient
func (*QueueClient) DeleteMessage ¶ added in v0.4.12
func (c *QueueClient) DeleteMessage(queueURL string, message interface{}) error
DeleteMessage deletes a message from the queue.
func (*QueueClient) ReceiveMessages ¶ added in v0.4.12
func (c *QueueClient) ReceiveMessages(queueURL string, maxNoOfMessages, waitTimeSeconds int64) (messages []interface{}, err error)
ReceiveMessages receives messages from the queue.
func (*QueueClient) UnmarshalMessage ¶ added in v0.4.12
func (c *QueueClient) UnmarshalMessage(message interface{}, v interface{}) error
UnmarshalMessage decodes a message.