s3resource

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

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

Go to latest
Published: Feb 9, 2016 License: Apache-2.0 Imports: 2 Imported by: 2

README

s3-simple-resource

This is work-in-progress, do not use yet! 😝
Concourse resource for simple file upload/download from S3-compatible provider, using v2 signature signing.

Source Configuration

  • access_key: Required. The access key to use.

  • secret_key: Required. The secret key to use.

  • bucket: Required. The name of the bucket.

  • host: Required. Host endpoint of S3-compatible provider.

  • insecure: Optional. Switch to insecure HTTP.

Behavior

in: Download a file from the bucket

Given a file specified by source, download it from the S3 bucket, save it under target

Parameters
  • source: Required. File to download.

  • target: Required. Name/destination of new file.

out: Upload a file to the bucket

Given a file specified by source, upload it to the S3 bucket, save it under target

Parameters
  • source: Required. File to upload.

  • target: Required. Name/destination of new file in the bucket.

Documentation

Overview

Copyright 2016 Fabio Berchtold

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	UploadFile(bucket, source, target string) error
	DownloadFile(bucket, source, target string) error
}

func NewClient

func NewClient(accessKey, secretKey, host string, insecure bool) (Client, error)

type Source

type Source struct {
	AccessKey string `json:"access_key"`
	SecretKey string `json:"secret_key"`
	Bucket    string `json:"bucket"`
	Host      string `json:"host"`
	Insecure  bool   `json:"insecure"`
}

Directories

Path Synopsis
Godeps

Jump to

Keyboard shortcuts

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