server

package
v0.0.0-...-2b8758d Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinUploadPartSize int64         = 1024 * 1024 * 5 // 5 MB
	DefaultExpiration time.Duration = 60 * time.Minute
)

Variables

This section is empty.

Functions

func Setup

func Setup(ctx context.Context, e *echo.Echo, cfg Config, mws ...echo.MiddlewareFunc) error

Types

type Cache

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

func NewCache

func NewCache(ctx context.Context, cfg Config) (*Cache, error)

func (*Cache) CreateCacheEntry

func (ca *Cache) CreateCacheEntry(c echo.Context) error

func (*Cache) GetCacheEntryByKey

func (ca *Cache) GetCacheEntryByKey(c echo.Context, key string) error

func (*Cache) UpdateCacheEntry

func (ca *Cache) UpdateCacheEntry(c echo.Context) error

type Config

type Config struct {
	JWKSURL     string
	CacheBucket string
}

type Presigner

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

func NewPresigner

func NewPresigner(s3client *s3.Client, cfg Config) *Presigner

func (*Presigner) GenerateFileDownloadInstructions

func (p *Presigner) GenerateFileDownloadInstructions(ctx context.Context, key string, totalSize int64) ([]api.CacheDownloadInstruction, error)

func (*Presigner) GenerateFileUploadInstructions

func (p *Presigner) GenerateFileUploadInstructions(ctx context.Context, key string, totalSize int64) ([]api.CacheUploadInstruction, error)

Jump to

Keyboard shortcuts

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