awsutil

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: Apache-2.0 Imports: 15 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetObject

func GetObject(url string) (*http.Response, error)

Makes an http GET request using the URL provided. URL should either point to a public obejct or be a signed URL giving the user GET permissions. url: full url path to the object on AWS

func GetObjectRange

func GetObjectRange(url, byteRange string) (*http.Response, error)

Makes a ranged http GET request using the URL and byteRange provided. URL should either point to a public obejct or be a signed URL giving the user GET permissions. url: full url path to the object on AWS byteRange: the desired range of bytes of a file Should resemble the format for an http header Range. Example: "bytes="0-1000" Example: "bytes="1000-"

func HeadObject

func HeadObject(url string) (*http.Response, error)

Makes an http HEAD request using the URL provided. URL should either point to a public obejct or be a signed URL giving the user GET permissions.

func Int64Value

func Int64Value(i *int64) int64

func ReadFile added in v0.0.7

func ReadFile(path string) ([]byte, error)

Expects the url to point to a valid ngc file. Uses the aws-sdk to read the file, assuming that this file will not be publicly accessible and will need to utilize aws credentials on the machine.

func ResolveRegion added in v0.0.2

func ResolveRegion() (string, error)

func String

func String(s string) *string

Types

type Client added in v0.0.12

type Client struct {
	Bucket  string
	Key     string
	Region  string
	Profile string
}

func NewClient added in v0.0.12

func NewClient(bucket, key, region, profile string) Client

func (Client) GetObjectRange added in v0.0.12

func (c Client) GetObjectRange(byteRange string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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