internal

package
v2.0.0-...-eccd1d4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SortKeyDisplayName      = "displayName"
	SortKeyCreationDate     = "createdOn"
	SortKeyUpdateDate       = "updatedOn"
	SortDirectionAscending  = "ASC"
	SortDirectionDescending = "DESC"
)
View Source
const (
	FolderMediaFiles   = "media-files"
	FolderMetaFiles    = "meta-files"
	FolderProductFiles = "marketplace-product-files"
)

Variables

View Source
var MakeProgressBar = NewProgressBar

Functions

This section is empty.

Types

type Pagination

type Pagination struct {
	Enable   bool  `json:"enable,omitempty"` // TODO: I see this when product list request returns. Maybe a bug?
	Enabled  bool  `json:"enabled,omitempty"`
	Page     int32 `json:"page"`
	PageSize int32 `json:"pageSize"`
}

func (*Pagination) QueryString

func (p *Pagination) QueryString() string

type ProgressBar

type ProgressBar interface {
	WrapWriter(source io.Writer) io.Writer
	WrapReader(source io.Reader) io.Reader
}

func NewProgressBar

func NewProgressBar(description string, length int64, output io.Writer) ProgressBar

type ProgressBarImpl

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

func (*ProgressBarImpl) WrapReader

func (b *ProgressBarImpl) WrapReader(source io.Reader) io.Reader

func (*ProgressBarImpl) WrapWriter

func (b *ProgressBarImpl) WrapWriter(source io.Writer) io.Writer

type ProgressBarMaker

type ProgressBarMaker func(description string, length int64, output io.Writer) ProgressBar

type S3Client

type S3Client interface {
	PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)
}

func NewS3Client

func NewS3Client(region string, creds aws.Credentials) S3Client

type S3Uploader

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

func NewS3Uploader

func NewS3Uploader(bucket, region, orgID string, client S3Client, output io.Writer) *S3Uploader

func (*S3Uploader) UploadMediaFile

func (u *S3Uploader) UploadMediaFile(filePath string) (string, string, error)

func (*S3Uploader) UploadMetaFile

func (u *S3Uploader) UploadMetaFile(filePath string) (string, string, error)

func (*S3Uploader) UploadProductFile

func (u *S3Uploader) UploadProductFile(filePath string) (string, string, error)

type Sorting

type Sorting struct {
	Order     int    `json:"order,omitempty"`
	Key       string `json:"key"`
	Direction string `json:"direction"`
}

func (*Sorting) QueryString

func (s *Sorting) QueryString() string

type Uploader

type Uploader interface {
	UploadMediaFile(filePath string) (string, string, error)
	UploadMetaFile(filePath string) (string, string, error)
	UploadProductFile(filePath string) (string, string, error)
}

Directories

Path Synopsis
csp
cspfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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