s3

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStorage

func NewStorage(cfg Config, logger log.Logger) (storage.ReadWriteStorage, error)

NewStorage Creates a storage driver for an S3-compatible object storage.

Types

type Config

type Config struct {
	Local           string   `json:"local" yaml:"local" default:"/var/lib/audit"`
	AccessKey       string   `json:"accessKey" yaml:"accessKey"`
	SecretKey       string   `json:"secretKey" yaml:"secretKey"`
	Bucket          string   `json:"bucket" yaml:"bucket"`
	Region          string   `json:"region" yaml:"region"`
	Endpoint        string   `json:"endpoint" yaml:"endpoint"`
	CaCert          string   `json:"cacert" yaml:"cacert"`
	ACL             string   `json:"acl" yaml:"acl"`
	PathStyleAccess bool     `json:"pathStyleAccess" yaml:"pathStyleAccess"`
	UploadPartSize  uint     `json:"uploadPartSize" yaml:"uploadPartSize"`
	ParallelUploads uint     `json:"parallelUploads" yaml:"parallelUploads"`
	Metadata        Metadata `json:"metadata" yaml:"metadata"`
}

Config S3 storage configuration

type Metadata

type Metadata struct {
	IP       bool `json:"ip" yaml:"ip"`
	Username bool `json:"username" yaml:"username"`
}

Metadata Metadata configuration for the S3 storage

Jump to

Keyboard shortcuts

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