aws

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SecretMapKeyAccessKeyID is key of accesskeyid in secret
	SecretMapKeyAccessKeyID = "AccessKeyID"
	// SecretMapKeySecretAccessKey is key of secretaccesskey in secret
	SecretMapKeySecretAccessKey = "SecretAccessKey"
	//metadata key for stroing the deployable generatename name
	DeployableGenerateNameMeta = "x-amz-meta-generatename"
	//Deployable generate name key within the meta map
	DployableMateGenerateNameKey = "Generatename"
	//metadata key for stroing the deployable generatename name
	DeployableVersionMeta = "x-amz-meta-deployableversion"
	//Deployable generate name key within the meta map
	DeployableMetaVersionKey = "Deployableversion"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployableObject

type DeployableObject struct {
	Name         string
	GenerateName string
	Version      string
	Content      []byte
}

type Handler

type Handler struct {
	*s3.Client
}

Handler handles connections to aws

func (*Handler) Create

func (h *Handler) Create(bucket string) error

Create a bucket

func (*Handler) Delete

func (h *Handler) Delete(bucket, name string) error

Delete delete existing object

func (*Handler) Exists

func (h *Handler) Exists(bucket string) error

Exists Checks whether a bucket exists and is accessible

func (*Handler) Get

func (h *Handler) Get(bucket, name string) (DeployableObject, error)

Get get existing object

func (*Handler) InitObjectStoreConnection

func (h *Handler) InitObjectStoreConnection(endpoint, accessKeyID, secretAccessKey string) error

InitObjectStoreConnection connect to object store

func (*Handler) List

func (h *Handler) List(bucket string) ([]string, error)

List all objects in bucket

func (*Handler) Put

func (h *Handler) Put(bucket string, dplObj DeployableObject) error

Put create new object

type ObjectStore

type ObjectStore interface {
	InitObjectStoreConnection(endpoint, accessKeyID, secretAccessKey string) error
	Exists(bucket string) error
	Create(bucket string) error
	List(bucket string) ([]string, error)
	Put(bucket string, dplObj DeployableObject) error
	Delete(bucket, name string) error
	Get(bucket, name string) (DeployableObject, error)
}

ObjectStore interface

Jump to

Keyboard shortcuts

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