storage

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// dynamodb config.
	PK             = "PK"
	SK             = "SK"
	TaxonomyAllPK  = "Taxonomy"
	TaxonomyAllSK  = "All"
	FabricByNameSK = "FabricByName"

	// s3 config.
	CMSBucket       = "cms.magnoliaco.com"
	CMSFabricsKey   = "fabrics/api.gob"
	CMSInventoryKey = "inventory/all.gob"
)

Variables

View Source
var NotFound = errors.New("not found")

Functions

func GetAllFabricsInventory

func GetAllFabricsInventory(ctx context.Context) ([]*inventory.Inventory, error)

func GetAllFabricsWithInventory

func GetAllFabricsWithInventory(ctx context.Context) ([]*fabric.Fabric, error)

func GetAllFabricsWithoutInventory

func GetAllFabricsWithoutInventory(ctx context.Context) ([]*fabric.Fabric, error)

func GetFabricByID

func GetFabricByID(ctx context.Context, id string) (*fabric.Fabric, error)

func GetFabricByName

func GetFabricByName(ctx context.Context, name string) (*fabric.Fabric, error)

func GetTaxonomy

func GetTaxonomy(ctx context.Context) (*taxonomy.Taxonomy, error)

Types

type S3Object

type S3Object struct {
	Bucket       string
	Key          string
	Data         []byte
	CacheControl string
	ContentType  string
}

func GetS3Object

func GetS3Object(ctx context.Context, bucket string, key string) (S3Object, error)

GetS3Object returns an object from S3.

Jump to

Keyboard shortcuts

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