awsmedium

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//
	// Content centric profile, content is bucketed by type
	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"),
			),
	)

	//
	// Creator centric profile
	ProfileAuthor = medium.Profiles(

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

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

		medium.On("", "dp.jpg").
			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,
		"author": ProfileAuthor,
	}
)

Functions

This section is empty.

Types

type Codec added in v0.1.6

type Codec struct {
	awscdk.Stack

	Inbox awss3.Bucket
	// contains filtered or unexported fields
}

func NewCodec added in v0.1.6

func NewCodec(app awscdk.App, id *string, props *CodecProps) *Codec

type CodecProps added in v0.1.6

type CodecProps struct {
	*awscdk.StackProps

	// Namespace for cloud resource provisioning
	Namespace string

	// Version of the deployment
	Version tagver.Version

	// 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

	// 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

	// AWS S3 bucket to write media files
	Media awss3.IBucket
}

type Edge added in v0.1.6

type Edge struct {
	awscdk.Stack

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

The distribution edge of media content

func NewEdge added in v0.1.6

func NewEdge(app awscdk.App, id *string, props *EdgeProps) *Edge

The distribution edge of media content

type EdgeProps added in v0.1.6

type EdgeProps struct {
	*awscdk.StackProps

	// Namespace for cloud resource provisioning
	Namespace string

	// Version of the deployment
	Version tagver.Version

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

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

Jump to

Keyboard shortcuts

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