validate

package
v1.261122.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildReadinessReportWith

func BuildReadinessReportWith(ctx context.Context, d *shared.Deps, opts ReadinessOptions) (validation.Report, error)

BuildReadinessReportWith fetches live App Store Connect data and returns a structured readiness report without printing output. The client, request timeout and clock come from d.

func BuildSubscriptionsReportWith

func BuildSubscriptionsReportWith(ctx context.Context, d *shared.Deps, opts SubscriptionsOptions) (validation.SubscriptionsReport, error)

BuildSubscriptionsReportWith fetches live subscription state and returns the same structured report emitted by `asc validate subscriptions` without printing it. The client and request timeout come from d.

func FetchAgeRatingDeclaration

func FetchAgeRatingDeclaration(ctx context.Context, client *asc.Client, appID, versionID string, requestTimeout time.Duration) (*validation.AgeRatingDeclaration, error)

FetchAgeRatingDeclaration reads the app's age rating declaration the way `asc validate` does, choosing the app info that matches the version when the app has more than one. It returns nil when no declaration exists. A positive requestTimeout gives each request that budget instead of the default timeout.

func NewValidateCommand

func NewValidateCommand(d *shared.Deps) *ffcli.Command

NewValidateCommand returns the asc validate command built on d.

func SetDeepValidationTestHooks added in v1.260831.0

func SetDeepValidationTestHooks(
	loader func(context.Context, string) (*webcore.AuthSession, bool, error),
	client DeepValidationWebClient,
) func()

SetDeepValidationTestHooks replaces cached-session loading and the web client for command-level tests. It returns a restore function.

func SetFetchAppBuildCountFunc added in v1.260325.0

func SetFetchAppBuildCountFunc(fn func(context.Context, *asc.Client, string) (int, bool, string, error)) func()

SetFetchAppBuildCountFunc replaces the app build-count fetcher for tests. The hook models one outbound probe and receives a fresh request context. It returns a restore function to reset the previous handler.

func SetFetchAvailableTerritoriesFunc

func SetFetchAvailableTerritoriesFunc(fn func(context.Context, *asc.Client, string) (string, int, error)) func()

SetFetchAvailableTerritoriesFunc replaces the availability fetcher for tests. The legacy hook models one outbound probe and receives a fresh request context. It returns a restore function to reset the previous handler.

func SetFetchIAPsFunc

func SetFetchIAPsFunc(fn func(context.Context, *asc.Client, string) ([]validation.IAP, error)) func()

SetFetchIAPsFunc replaces the IAP fetcher for tests. It returns a restore function to reset the previous handler.

func SetFetchPricingTerritoriesFunc added in v1.260716.0

func SetFetchPricingTerritoriesFunc(fn func(context.Context, *asc.Client) ([]string, error)) func()

SetFetchPricingTerritoriesFunc replaces the pricing-territory fetcher for tests. It returns a restore function to reset the previous handler.

func SetFetchScreenshotSetsFunc

func SetFetchScreenshotSetsFunc(fn func(context.Context, *asc.Client, []asc.Resource[asc.AppStoreVersionLocalizationAttributes]) ([]validation.ScreenshotSet, error)) func()

SetFetchScreenshotSetsFunc replaces the screenshot-set fetcher for tests. It returns a restore function to reset the previous handler.

func SetFetchSubscriptionsFunc

func SetFetchSubscriptionsFunc(fn func(context.Context, *asc.Client, string) ([]validation.Subscription, error)) func()

SetFetchSubscriptionsFunc replaces the subscription fetcher for tests. It returns a restore function to reset the previous handler.

Types

type DeepValidationWebClient added in v1.260831.0

type DeepValidationWebClient interface {
	GetAppDataUsagesPublishState(context.Context, string) (*webcore.AppDataUsagesPublishState, error)
	ListReviewSubscriptions(context.Context, string) ([]webcore.ReviewSubscription, error)
	GetAgreementsStatus(context.Context) (*asc.WebAgreementsStatusResult, error)
}

DeepValidationWebClient exposes the read-only deep validation calls to command-level tests.

type LocalIPA

type LocalIPA struct {
	Path           string
	BundleID       string
	Version        string
	BuildNumber    string
	DeviceFamilies []int
	SDKName        string
}

LocalIPA is the device-family evidence read from a local IPA passed with --ipa. The App Store Connect API does not expose a build's device family.

func (*LocalIPA) SupportsIPad

func (ipa *LocalIPA) SupportsIPad() bool

SupportsIPad reports whether UIDeviceFamily includes iPad.

type ReadinessOptions

type ReadinessOptions struct {
	AppID     string
	Version   string
	VersionID string
	Platform  string
	Strict    bool
	Deep      bool
	CheckURLs bool
	Build     *validation.Build
	// IPA is the local binary evidence for iPad support. When nil, a missing
	// iPad screenshot set is reported as informational only.
	IPA *LocalIPA
}

ReadinessOptions defines inputs for App Store version readiness validation.

type SubscriptionsOptions added in v1.260716.0

type SubscriptionsOptions struct {
	AppID  string
	Strict bool
}

SubscriptionsOptions configures a non-printing subscription readiness report.

Jump to

Keyboard shortcuts

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