assets

package
v1.261007.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetsPreviewsDeleteCommand

func AssetsPreviewsDeleteCommand() *ffcli.Command

AssetsPreviewsDeleteCommand returns the preview delete subcommand.

func AssetsPreviewsDownloadCommand

func AssetsPreviewsDownloadCommand() *ffcli.Command

AssetsPreviewsDownloadCommand returns the previews download subcommand.

func AssetsPreviewsListCommand

func AssetsPreviewsListCommand() *ffcli.Command

AssetsPreviewsListCommand returns the previews list subcommand.

func AssetsPreviewsSetPosterFrameCommand added in v1.260325.0

func AssetsPreviewsSetPosterFrameCommand() *ffcli.Command

AssetsPreviewsSetPosterFrameCommand returns the set-poster-frame subcommand.

func AssetsPreviewsUploadCommand

func AssetsPreviewsUploadCommand() *ffcli.Command

AssetsPreviewsUploadCommand returns the previews upload subcommand.

func AssetsScreenshotsApplyCommand added in v1.260404.0

func AssetsScreenshotsApplyCommand() *ffcli.Command

AssetsScreenshotsApplyCommand returns the screenshots apply subcommand.

func AssetsScreenshotsDeleteCommand

func AssetsScreenshotsDeleteCommand() *ffcli.Command

AssetsScreenshotsDeleteCommand returns the screenshot delete subcommand.

func AssetsScreenshotsDownloadCommand

func AssetsScreenshotsDownloadCommand() *ffcli.Command

AssetsScreenshotsDownloadCommand returns the screenshots download subcommand.

func AssetsScreenshotsListCommand

func AssetsScreenshotsListCommand() *ffcli.Command

AssetsScreenshotsListCommand returns the screenshots list subcommand.

func AssetsScreenshotsPlanCommand added in v1.260404.0

func AssetsScreenshotsPlanCommand() *ffcli.Command

AssetsScreenshotsPlanCommand returns the screenshots plan subcommand.

func AssetsScreenshotsSizesCommand

func AssetsScreenshotsSizesCommand() *ffcli.Command

AssetsScreenshotsSizesCommand returns the screenshots sizes subcommand.

func AssetsScreenshotsUploadCommand

func AssetsScreenshotsUploadCommand() *ffcli.Command

AssetsScreenshotsUploadCommand returns the screenshots upload subcommand.

func AssetsScreenshotsValidateCommand added in v1.260407.0

func AssetsScreenshotsValidateCommand() *ffcli.Command

AssetsScreenshotsValidateCommand returns the screenshots validate subcommand.

func CollectAssetFiles

func CollectAssetFiles(path string) ([]string, error)

CollectAssetFiles validates and collects files from a path.

func ContextWithAssetUploadTimeout

func ContextWithAssetUploadTimeout(ctx context.Context) (context.Context, context.CancelFunc)

ContextWithAssetUploadTimeout returns a context with the asset upload timeout.

func DownloadMediaURL

func DownloadMediaURL(ctx context.Context, url, outputPath string, overwrite bool) (int64, string, error)

DownloadMediaURL downloads an unauthenticated media URL using the asset transfer path.

func ExecuteScreenshotSetUpload added in v1.260404.0

func ExecuteScreenshotSetUpload[T any](ctx context.Context, opts ScreenshotSetUploadOptions[T]) (T, error)

ExecuteScreenshotSetUpload validates flags/files and runs the shared screenshot upload/sync flow for a localization-backed screenshot set.

func GetOrderedAppScreenshotIDs

func GetOrderedAppScreenshotIDs(ctx context.Context, client *asc.Client, setID string) ([]string, error)

GetOrderedAppScreenshotIDs returns screenshot IDs in the current remote order.

func NormalizePreviewType

func NormalizePreviewType(input string) (string, error)

NormalizePreviewType normalizes and validates a preview type.

func ResolveImageAssetDownloadURL

func ResolveImageAssetDownloadURL(asset *asc.ImageAsset, fileName string) (string, error)

ResolveImageAssetDownloadURL expands an ASC delivery template for an exported image.

func SetOrderedAppScreenshots

func SetOrderedAppScreenshots(ctx context.Context, client *asc.Client, setID string, orderedIDs []string) error

SetOrderedAppScreenshots replaces the screenshot relationships for a set in the provided order.

func UploadPreviewAsset

func UploadPreviewAsset(ctx context.Context, client *asc.Client, setID, filePath string) (asc.AssetUploadResultItem, error)

UploadPreviewAsset uploads a preview file to a set.

func UploadPreviewFiles

func UploadPreviewFiles(uploadCtx, rollbackBase context.Context, client *asc.Client, setID string, setCreated bool, files []string) ([]asc.AssetUploadResultItem, []asc.AssetUploadFailureItem, error)

UploadPreviewFiles uploads previews and rolls back resources created by this run on failure. setCreated must be true only when this run created the preview set.

func UploadScreenshotAsset

func UploadScreenshotAsset(ctx context.Context, client *asc.Client, setID, filePath string) (asc.AssetUploadResultItem, error)

UploadScreenshotAsset uploads a screenshot file to a set.

func UploadScreenshotAssetFromFile added in v1.260731.0

func UploadScreenshotAssetFromFile(ctx context.Context, client *asc.Client, setID, filePath string, file *os.File) (asc.AssetUploadResultItem, error)

UploadScreenshotAssetFromFile uploads from an already-open, validated source handle. Callers that discover files under a rooted filesystem can retain the handle so a later pathname replacement cannot redirect the upload.

func ValidPreviewFrameTimeCode

func ValidPreviewFrameTimeCode(tc string) bool

ValidPreviewFrameTimeCode reports whether a timecode matches the upload contract.

func ValidatePreviewFiles

func ValidatePreviewFiles(files []string, enforceCapacity bool) error

ValidatePreviewFiles checks preview capacity, image contents, and extension before any destructive sync. enforceCapacity rejects more than three files.

Types

type ScreenshotSetAccess added in v1.260404.0

type ScreenshotSetAccess struct {
	List   ScreenshotSetListFunc
	Create ScreenshotSetCreateFunc
}

ScreenshotSetAccess contains the list/create hooks for a screenshot-set owner.

type ScreenshotSetCreateFunc added in v1.260404.0

type ScreenshotSetCreateFunc func(context.Context, *asc.Client, string, string) (*asc.AppScreenshotSetResponse, error)

ScreenshotSetCreateFunc creates a screenshot set for a localization kind.

type ScreenshotSetListFunc added in v1.260404.0

ScreenshotSetListFunc fetches screenshot sets for a localization kind.

type ScreenshotSetUploadOptions added in v1.260404.0

type ScreenshotSetUploadOptions[T any] struct {
	LocalizationID string
	Path           string
	DeviceType     string
	Replace        bool
	// InspectCommand is the owner-specific read-only command shown when the
	// target screenshot set is full or has ambiguous checksum matches.
	InspectCommand string
	// ReplaceCommand is the owner-specific replacement command shown when the
	// target screenshot set is full.
	ReplaceCommand           string
	InvalidDeviceTypeIsUsage bool

	ClientFactory  func() (*asc.Client, error)
	RequestContext func(context.Context) (context.Context, context.CancelFunc)
	UploadContext  func(context.Context) (context.Context, context.CancelFunc)

	Access      ScreenshotSetAccess
	BuildResult func(string, asc.Resource[asc.AppScreenshotSetAttributes], []asc.AssetUploadResultItem) T
}

ScreenshotSetUploadOptions configures the shared screenshot upload path for custom product pages and PPO treatment localizations.

Jump to

Keyboard shortcuts

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