utils

package
v0.0.0-...-35eb6da Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2018 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatFiles

func CatFiles(bucket string, filesPattern []string)

CatFiles will read all files matching their name to the user input and print the content to the standard output

func GrepFile

func GrepFile(file s3File, pattern string)

GrepFile scans an entire file and search for a pattern line by line

func GrepFiles

func GrepFiles(bucket string, pattern string, path string)

GrepFiles identifies occurrences of a given string or pattern on files stored in a S3 bucket

func GrepLine

func GrepLine(filePath string, line string, pattern string)

GrepLine search for a string pattern in a line

func ListObjects

func ListObjects(bucketName string, path string) (files []s3File, err error)

ListObjects retrieves a list of files from a given bucket and return a s3File list.

Types

type Bucket

type Bucket struct {
	Client s3iface.S3API
	Name   string
	Path   string
}

func NewBucket

func NewBucket(client s3iface.S3API, bucketName string, path string) *Bucket

func (*Bucket) GetFiles

func (bucket *Bucket) GetFiles() (files []s3File, err error)

Jump to

Keyboard shortcuts

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