aws

package module
v0.0.0-...-d2b13b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2013 License: BSD-2-Clause Imports: 8 Imported by: 0

README

Amazon Web Services (AWS) Library for Go

The goal of this project is to create a library for interfacing with Amazon Web Services.

Key Features:

  • Uses AWS v4 signatures
  • Implementation for DynamoDb

Example

import "github.com/bocajim/aws"
import "github.com/bocajim/aws/dynamodb"

type TestDoc struct {
	A string
	B int
	C bool
}

func Main() {
	var sc aws.SignatureCredentials
	sc.AccessKey="xxxx"
	sc.SecretKey="yyyy"
	ddb:=dynamodb.New(sc,"us-east-1")
	
	ddb.CreateTable("mytable",&dynamodb.AttributeDef{Name:"mykey",Type:dynamodb.AttrTypeNumber},nil,5,5)
	
	var req dynamodb.UpdateItemRequest
	req.TableName="mytable"
	req.HashKey=&dynamodb.Attribute{Name:"mykey",Value:dynamodb.AttributeValue{Type:dynamodb.AttrTypeNumber,Value:"12345"}}
	req.AddUpdate(dynamodb.UpdatePut,"val1",dynamodb.AttrTypeString,"abc123")
	req.AddUpdate(dynamodb.UpdatePut,"val2",dynamodb.AttrTypeString,"def456")
	ddb.UpdateItem(&req)
	
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoDate    = errors.New("Date header not supplied")
	ErrAws       = errors.New("AWS command")
	ErrArguments = errors.New("Invalid arguments")
)
View Source
var DebugMode bool = false

Functions

This section is empty.

Types

type SignatureCredentials

type SignatureCredentials struct {
	AccessKey string
	SecretKey string
}

type SignatureGenerator

type SignatureGenerator struct {
	// contains filtered or unexported fields
}

func (*SignatureGenerator) Initialize

func (a *SignatureGenerator) Initialize(c SignatureCredentials, region string, service string) error

func (*SignatureGenerator) SignRequest

func (a *SignatureGenerator) SignRequest(r *http.Request, body []byte)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL