search

package
v0.0.0-...-c1b1bf0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	S3LocalstackEndpoint    = "http://localhost:4572"
	MaxAllowedFileSize      = int64(500 << (10 * 2))
	S3DownloadPartSize      = 64 << (10 * 2)
	MaxObjectSizePerRequest = 1000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type S

type S struct {
	Env string
}

S stores aws session specific details.

func NewS

func NewS(env string) *S

NewS returns S object which will be used for S3 access.

func (*S) GetBuckets

func (s *S) GetBuckets(ctx context.Context, region string) ([]string, error)

GetBuckets returns bucket list belongs to the current session.

func (*S) Start

func (s *S) Start(ctx context.Context, req *SReq) ([]s3.Object, error)

Start starts search process with the given parameters.

type SReq

type SReq struct {
	Bucket      string `form:"bucket" binding:"required"`
	Text        string `form:"filter" binding:"required"`
	ResultCount int    `form:"result-count" binding:"required"`
	Region      string `form:"region" binding:"required"`
	StartDate   int64  `form:"start"`
	EndDate     int64  `form:"end"`
}

SReq stores request informations and being used for paramteter binding.

Jump to

Keyboard shortcuts

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