s3

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 3 Imported by: 4

Documentation

Overview

Package s3 implements a koanf.Provider that takes a []byte slice and provides it to koanf to be parsed by a koanf.Parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// AWS Access Key
	AccessKey string

	// AWS Secret Key
	SecretKey string

	// AWS region
	Region string

	// Bucket Name
	Bucket string

	// Object Key
	ObjectKey string

	// Optional: Custom S3 compatible endpoint
	Endpoint string
}

Config for the provider.

type S3

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

S3 implements a s3 provider.

func Provider

func Provider(cfg Config) *S3

Provider returns a provider that takes a simples3 config.

func (*S3) Read

func (r *S3) Read() (map[string]interface{}, error)

Read is not supported for s3 provider.

func (*S3) ReadBytes

func (r *S3) ReadBytes() ([]byte, error)

ReadBytes reads the contents of a file on s3 and returns the bytes.

Jump to

Keyboard shortcuts

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