aws

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package aws provides AWS protocol for NVGD.

Index

Constants

View Source
const (
	S3Token = "s3token"
)

Variables

This section is empty.

Functions

func NewProxyClient

func NewProxyClient(proxy string) *http.Client

NewProxyClient creates a proxied client for AWS.

Types

type S3BucketConfig

type S3BucketConfig struct {

	// Region is AWS region.
	//
	// @see http://docs.aws.amazon.com/general/latest/gr/rande.html
	Region string `yaml:"region"`

	// AccessKeyID is AWS access key ID.
	AccessKeyID string `yaml:"access_key_id"`

	// SecrentAccessKey is AWS secrent access key.
	SecretAccessKey string `yaml:"secret_access_key"`

	// SessionToken is AWS session token.
	SessionToken string `yaml:"session_token,omitempty"`

	// MaxKeys used for S3 object listing.
	MaxKeys int64 `yaml:"max_keys,omitempty"`

	// HTTPProxy used as HTTP proxy to access S3.
	HTTPProxy string `yaml:"http_proxy,omitempty"`
}

S3BucketConfig is AWS configuration for buckets.

type S3Config

type S3Config struct {

	// Timezone forces timezone of modified times or so.
	Timezone string `yaml:"timezone,omitempty"`

	// Default is default bucket configuration.
	Default S3BucketConfig `yaml:"default,omitempty"`

	// Buckets
	Buckets map[string]S3BucketConfig `yaml:"buckets,omitempty"`

	// UseUnixtime makes times in UNIX format: modified_at or so.
	UseUnixtime bool `yaml:"use_unixtime"`
	// contains filtered or unexported fields
}

S3Config is configuration of S3 protocol handler.

type S3ListHandler

type S3ListHandler struct {
	Config *S3Config
}

S3ListHandler is AWS S3 list protocol handler

func (*S3ListHandler) Open

func (ph *S3ListHandler) Open(u *url.URL) (*resource.Resource, error)

Open opens a S3 URL.

type S3ObjHandler

type S3ObjHandler struct {
	Config *S3Config
}

S3ObjHandler is AWS S3 object protocol handler

func (*S3ObjHandler) Open

func (ph *S3ObjHandler) Open(u *url.URL) (*resource.Resource, error)

Open opens a S3 URL.

Jump to

Keyboard shortcuts

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