awsmedium

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProfilePhoto = medium.Profiles(

		medium.On("av").
			Process(
				medium.ScaleTo("small", 128, 128),
				medium.ScaleTo("avatar", 400, 400),
				medium.Replica("origin"),
			),

		medium.On("wp").
			Process(
				medium.ScaleTo("equal", 1080, 1080),
				medium.Replica("origin"),
			),

		medium.On("dp").
			Process(
				medium.ScaleTo("small", 128, 128),
				medium.ScaleTo("thumb", 240, 240),
				medium.ScaleTo("cover", 480, 720),
				medium.ScaleTo("equal", 1080, 1080),
				medium.ScaleTo("large", 1080, 1920),
				medium.Replica("origin"),
			),
	)

	Profiles = map[string][]medium.Profile{
		"photo": ProfilePhoto,
	}
)

Functions

This section is empty.

Types

type Stack

type Stack struct {
	awscdk.Stack

	Distribution awscloudfront.Distribution
	Inbox        awss3.Bucket
	Media        awss3.Bucket
	// contains filtered or unexported fields
}

func NewStack

func NewStack(app awscdk.App, id *string, props *StackProps) *Stack

type StackProps

type StackProps struct {
	*awscdk.StackProps

	// Configuration profiles (mandatory).
	// Each profile defines:
	// - the prefix of S3 Key identify the profile
	// - processing stages that produces media files from the original one.
	//
	//  medium.Profiles(
	//    medium.On("photo").Process(
	//      medium.ScaleTo("small", 128, 128),
	//      medium.ScaleTo("thumb", 240, 240),
	//      medium.ScaleTo("cover", 480, 720),
	//      medium.ScaleTo("large", 1080, 1920),
	//      medium.Replica("origin"),
	//    )
	//  )
	//
	Profiles []medium.Profile

	// Fully Qualified Domain Name where CDN is hosted (mandatory).
	//
	Site *string

	// ARN of TLS Certificated to enable HTTPS on CDN
	//
	TlsCertificateArn *string

	// The amount of memory, in MB, that is allocated to your Lambda function.
	//
	// Lambda uses this value to proportionally allocate the amount of CPU
	// power. For more information, see Resource Model in the AWS Lambda
	// Developer Guide.
	// Default: 128.
	//
	MemorySize *float64

	// Deadline for running processing pipeline.
	// The processing pipelines are terminated with force, the result is not predictable.
	// Default: 60 seconds
	//
	Deadline awscdk.Duration

	// Retention of failed operations in Dead-Letter Queue
	// Default: 1 day
	//
	FailureRetention awscdk.Duration

	// Expiration of content in the inbox
	// Default: 1 day
	//
	Expiration awscdk.Duration

	// EventBus to emit event upon the completion
	// Default: None
	//
	EventBus awsevents.IEventBus
}

Jump to

Keyboard shortcuts

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