validation

package
v1.261201.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 5 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

View Source
const (
	LimitDescription     = 4000
	LimitKeywords        = 100
	LimitWhatsNew        = 4000
	LimitPromotionalText = 170
	LimitName            = 30
	LimitSubtitle        = 30
)

App Store metadata character limits.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgeRatingDeclaration

type AgeRatingDeclaration struct {
	Advertising            *bool
	Gambling               *bool
	HealthOrWellnessTopics *bool
	LootBox                *bool
	MessagingAndChat       *bool
	ParentalControls       *bool
	AgeAssurance           *bool
	UnrestrictedWebAccess  *bool
	UserGeneratedContent   *bool

	AlcoholTobaccoOrDrugUseOrReferences         *string
	Contests                                    *string
	GamblingSimulated                           *string
	GunsOrOtherWeapons                          *string
	MedicalOrTreatmentInformation               *string
	ProfanityOrCrudeHumor                       *string
	SexualContentGraphicAndNudity               *string
	SexualContentOrNudity                       *string
	HorrorOrFearThemes                          *string
	MatureOrSuggestiveThemes                    *string
	ViolenceCartoonOrFantasy                    *string
	ViolenceRealistic                           *string
	ViolenceRealisticProlongedGraphicOrSadistic *string

	KidsAgeBand               *string
	AgeRatingOverride         *string
	AgeRatingOverrideV2       *string
	KoreaAgeRatingOverride    *string
	DeveloperAgeRatingInfoURL *string
}

AgeRatingDeclaration represents age rating attributes for validation.

type AppInfoLocalization

type AppInfoLocalization struct {
	ID               string
	Locale           string
	Name             string
	Subtitle         string
	PrivacyPolicyURL string
}

AppInfoLocalization represents app info metadata.

type Build

type Build struct {
	ID              string
	Version         string
	ProcessingState string
	Expired         bool
}

Build represents an attached build for a version.

type CheckResult

type CheckResult struct {
	ID           string   `json:"id"`
	Severity     Severity `json:"severity"`
	Message      string   `json:"message"`
	Remediation  string   `json:"remediation,omitempty"`
	Locale       string   `json:"locale,omitempty"`
	Field        string   `json:"field,omitempty"`
	ResourceType string   `json:"resourceType,omitempty"`
	ResourceID   string   `json:"resourceId,omitempty"`
}

CheckResult represents a single validation check result.

type IAP

type IAP struct {
	ID        string
	Name      string
	ProductID string
	Type      string
	State     string
}

IAP represents an in-app purchase for review-readiness validation.

type IAPInput

type IAPInput struct {
	AppID string
	IAPs  []IAP
}

IAPInput collects in-app purchase validation inputs.

type IAPReport

type IAPReport struct {
	AppID    string        `json:"appId"`
	IAPCount int           `json:"iapCount,omitempty"`
	Summary  Summary       `json:"summary"`
	Checks   []CheckResult `json:"checks"`
	Strict   bool          `json:"strict,omitempty"`
}

IAPReport is the top-level validate iap output.

func ValidateIAP

func ValidateIAP(input IAPInput, strict bool) IAPReport

ValidateIAP validates IAP review readiness and returns a report.

type Input

type Input struct {
	AppID                       string
	AppInfoID                   string
	VersionID                   string
	VersionString               string
	VersionState                string
	Platform                    string
	PrimaryLocale               string
	VersionLocalizations        []VersionLocalization
	AppInfoLocalizations        []AppInfoLocalization
	ReviewDetails               *ReviewDetails
	PrimaryCategoryID           string
	Build                       *Build
	PriceScheduleID             string
	AvailabilityID              string
	AvailableTerritories        int
	ScreenshotSets              []ScreenshotSet
	Subscriptions               []Subscription
	SubscriptionFetchSkipReason string
	AgeRatingDeclaration        *AgeRatingDeclaration
}

Input collects the validation inputs.

type MetadataLengthIssue

type MetadataLengthIssue struct {
	Field  string
	Length int
	Limit  int
}

MetadataLengthIssue describes one over-limit metadata field.

func AppInfoLocalizationLengthIssues

func AppInfoLocalizationLengthIssues(loc AppInfoLocalization) []MetadataLengthIssue

AppInfoLocalizationLengthIssues returns over-limit fields for one app-info localization.

func VersionLocalizationLengthIssues

func VersionLocalizationLengthIssues(loc VersionLocalization) []MetadataLengthIssue

VersionLocalizationLengthIssues returns over-limit fields for one version localization.

type Report

type Report struct {
	AppID         string        `json:"appId"`
	VersionID     string        `json:"versionId"`
	VersionString string        `json:"versionString,omitempty"`
	Platform      string        `json:"platform,omitempty"`
	Summary       Summary       `json:"summary"`
	Checks        []CheckResult `json:"checks"`
	Strict        bool          `json:"strict,omitempty"`
}

Report is the top-level validation output.

func Validate

func Validate(input Input, strict bool) Report

Validate runs all validation rules and returns a report.

type ReviewDetails

type ReviewDetails struct {
	ID                  string
	ContactFirstName    string
	ContactLastName     string
	ContactEmail        string
	ContactPhone        string
	DemoAccountName     string
	DemoAccountPassword string
	DemoAccountRequired bool
	Notes               string
}

ReviewDetails represents App Store review details for a version.

type Screenshot

type Screenshot struct {
	ID       string
	FileName string
	Width    int
	Height   int
}

Screenshot represents a screenshot asset.

type ScreenshotSet

type ScreenshotSet struct {
	ID             string
	DisplayType    string
	Locale         string
	LocalizationID string
	Screenshots    []Screenshot
}

ScreenshotSet represents a screenshot set and its assets.

type Severity

type Severity string

Severity represents the validation severity level.

const (
	SeverityError   Severity = "error"
	SeverityWarning Severity = "warning"
	SeverityInfo    Severity = "info"
)

type Subscription

type Subscription struct {
	ID                   string
	Name                 string
	ProductID            string
	State                string
	GroupID              string
	HasImage             bool
	ImageCheckSkipped    bool
	ImageCheckSkipReason string
}

Subscription represents an auto-renewable subscription for review-readiness validation.

type SubscriptionsInput

type SubscriptionsInput struct {
	AppID         string
	Subscriptions []Subscription
}

SubscriptionsInput collects subscription validation inputs.

type SubscriptionsReport

type SubscriptionsReport struct {
	AppID             string        `json:"appId"`
	SubscriptionCount int           `json:"subscriptionCount,omitempty"`
	Summary           Summary       `json:"summary"`
	Checks            []CheckResult `json:"checks"`
	Strict            bool          `json:"strict,omitempty"`
}

SubscriptionsReport is the top-level validate subscriptions output.

func ValidateSubscriptions

func ValidateSubscriptions(input SubscriptionsInput, strict bool) SubscriptionsReport

ValidateSubscriptions validates subscription review readiness and returns a report.

type Summary

type Summary struct {
	Errors   int `json:"errors"`
	Warnings int `json:"warnings"`
	Infos    int `json:"infos"`
	Blocking int `json:"blocking"`
}

Summary aggregates check counts by severity.

type VersionLocalization

type VersionLocalization struct {
	ID              string
	Locale          string
	Description     string
	Keywords        string
	WhatsNew        string
	PromotionalText string
	SupportURL      string
	MarketingURL    string
}

VersionLocalization represents version-level metadata.

Jump to

Keyboard shortcuts

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