Help us shape the future of Go! Take the 2026 Go Developer Survey

field

package
v0.67.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const NAME = "CustomField"

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomField

type CustomField struct {
	metadata.MetadataInfo
	XMLName xml.Name `xml:"CustomField"`
	Xmlns   string   `xml:"xmlns,attr"`
	Field
}

func Open

func Open(path string) (*CustomField, error)

func (*CustomField) NameFromPath

func (c *CustomField) NameFromPath(path string) metadata.MetadataObjectName

func (*CustomField) SetMetadata

func (c *CustomField) SetMetadata(m metadata.MetadataInfo)

func (*CustomField) Type

func (c *CustomField) Type() metadata.MetadataType

type Field

type Field struct {
	FullName          string       `xml:"fullName"`
	BusinessStatus    *TextLiteral `xml:"businessStatus"`
	BusinessOwnerUser *TextLiteral `xml:"businessOwnerUser"`
	CaseSensitive     *struct {
		Text string `xml:",chardata"`
	} `xml:"caseSensitive"`
	ComplianceGroup  *TextLiteral `xml:"complianceGroup"`
	DefaultValue     *TextLiteral `xml:"defaultValue"`
	DeleteConstraint *struct {
		Text string `xml:",chardata"`
	} `xml:"deleteConstraint"`
	Deprecated    *TextLiteral `xml:"deprecated"`
	Description   *TextLiteral `xml:"description"`
	DisplayFormat *struct {
		Text string `xml:",chardata"`
	} `xml:"displayFormat"`
	DisplayLocationInDecimal *struct {
		Text string `xml:",chardata"`
	} `xml:"displayLocationInDecimal"`
	EncryptionScheme *TextLiteral `xml:"encryptionScheme"`
	// ExternalDeveloperName is an external object field's name in the
	// external system.
	ExternalDeveloperName *TextLiteral `xml:"externalDeveloperName"`
	ExternalId            *BooleanText `xml:"externalId"`
	FieldManageability    *struct {
		Text string `xml:",chardata"`
	} `xml:"fieldManageability"`
	Formula              *TextLiteral `xml:"formula"`
	FormulaTreatBlanksAs *struct {
		Text string `xml:",chardata"`
	} `xml:"formulaTreatBlanksAs"`
	// GlobalPicklist names the global value set of a picklist field in API
	// versions before 38.0, which replaced it with valueSet.
	GlobalPicklist      *TextLiteral `xml:"globalPicklist"`
	InlineHelpText      *TextLiteral `xml:"inlineHelpText"`
	IsAIPredictionField *BooleanText `xml:"isAIPredictionField"`
	IsFilteringDisabled *BooleanText `xml:"isFilteringDisabled"`
	IsNameField         *BooleanText `xml:"isNameField"`
	IsSortingDisabled   *BooleanText `xml:"isSortingDisabled"`
	Label               *TextLiteral `xml:"label"`
	LookupFilter        *struct {
		Active struct {
			Text string `xml:",chardata"`
		} `xml:"active"`
		BooleanFilter *TextLiteral `xml:"booleanFilter"`
		ErrorMessage  *struct {
			Text string `xml:",innerxml"`
		} `xml:"errorMessage"`
		FilterItems []struct {
			Field struct {
				Text string `xml:",chardata"`
			} `xml:"field"`
			Operation struct {
				Text string `xml:",chardata"`
			} `xml:"operation"`
			Value *struct {
				Text string `xml:",chardata"`
			} `xml:"value"`
			ValueField *struct {
				Text string `xml:",chardata"`
			} `xml:"valueField"`
		} `xml:"filterItems"`
		InfoMessage *TextLiteral `xml:"infoMessage"`
		IsOptional  struct {
			Text string `xml:",chardata"`
		} `xml:"isOptional"`
	} `xml:"lookupFilter"`
	Precision *IntegerText `xml:"precision"`
	Length    *IntegerText `xml:"length"`
	MaskChar  *TextLiteral `xml:"maskChar"`
	MaskType  *TextLiteral `xml:"maskType"`
	// Picklist holds a picklist field's values in API versions before 38.0,
	// which replaced it with valueSet.
	Picklist *Picklist `xml:"picklist"`
	// ReadOnlyProxy marks an external object field whose value the external
	// system supplies.
	ReadOnlyProxy          *BooleanText `xml:"readOnlyProxy"`
	ReferenceTo            *TextLiteral `xml:"referenceTo"`
	RelationshipLabel      *TextLiteral `xml:"relationshipLabel"`
	RelationshipName       *TextLiteral `xml:"relationshipName"`
	RestrictedAdminField   *TextLiteral `xml:"restrictedAdminField"`
	Required               *BooleanText `xml:"required"`
	Scale                  *IntegerText `xml:"scale"`
	SecurityClassification *TextLiteral `xml:"securityClassification"`
	// StartingNumber is an auto-number field's first number.
	StartingNumber   *IntegerText `xml:"startingNumber"`
	TrackFeedHistory *struct {
		Text string `xml:",chardata"`
	} `xml:"trackFeedHistory"`
	SummarizedField *struct {
		Text string `xml:",chardata"`
	} `xml:"summarizedField"`
	SummaryFilterItems []struct {
		Field struct {
			Text string `xml:",chardata"`
		} `xml:"field"`
		Operation struct {
			Text string `xml:",chardata"`
		} `xml:"operation"`
		Value struct {
			Text string `xml:",chardata"`
		} `xml:"value"`
	} `xml:"summaryFilterItems"`
	SummaryForeignKey *struct {
		Text string `xml:",chardata"`
	} `xml:"summaryForeignKey"`
	SummaryOperation *struct {
		Text string `xml:",chardata"`
	} `xml:"summaryOperation"`
	RelationshipOrder *struct {
		Text string `xml:",chardata"`
	} `xml:"relationshipOrder"`
	ReparentableMasterDetail *struct {
		Text string `xml:",chardata"`
	} `xml:"reparentableMasterDetail"`
	MetadataRelationshipControllingField *struct {
		Text string `xml:",chardata"`
	} `xml:"metadataRelationshipControllingField"`
	// MktDataLakeFieldAttributes is present on a Data Lake Object (__dll)
	// field; MktDataModelFieldAttributes on a Data Model Object (__dlm) field.
	MktDataLakeFieldAttributes  *MktDataLakeFieldAttributes  `xml:"mktDataLakeFieldAttributes"`
	MktDataModelFieldAttributes *MktDataModelFieldAttributes `xml:"mktDataModelFieldAttributes"`
	TrackHistory                *BooleanText                 `xml:"trackHistory"`
	TrackTrending               *BooleanText                 `xml:"trackTrending"`
	Type                        *TextLiteral                 `xml:"type"`
	Unique                      *BooleanText                 `xml:"unique"`
	WriteRequiresMasterRead     *struct {
		Text string `xml:",chardata"`
	} `xml:"writeRequiresMasterRead"`
	ValueSet *struct {
		ControllingField *struct {
			Text string `xml:",chardata"`
		} `xml:"controllingField"`
		Restricted *struct {
			Text string `xml:",chardata"`
		} `xml:"restricted"`
		ValueSetDefinition *struct {
			Sorted struct {
				Text string `xml:",chardata"`
			} `xml:"sorted"`
			Value []struct {
				FullName string `xml:"fullName"`
				Default  struct {
					Text string `xml:",chardata"`
				} `xml:"default"`
				IsActive *BooleanText `xml:"isActive"`
				Label    struct {
					Text string `xml:",innerxml"`
				} `xml:"label"`
				Color *struct {
					Text string `xml:",chardata"`
				} `xml:"color"`
			} `xml:"value"`
		} `xml:"valueSetDefinition"`
		ValueSetName *struct {
			Text string `xml:",chardata"`
		} `xml:"valueSetName"`
		ValueSettings []struct {
			ControllingFieldValue []struct {
				Text string `xml:",innerxml"`
			} `xml:"controllingFieldValue"`
			ValueName struct {
				Text string `xml:",chardata"`
			} `xml:"valueName"`
		} `xml:"valueSettings"`
	} `xml:"valueSet"`
	VisibleLines *struct {
		Text string `xml:",chardata"`
	} `xml:"visibleLines"`
}

func (Field) Tidy

func (f Field) Tidy()

type FieldFilter

type FieldFilter func(Field) bool

type MktDataLakeFieldAttributes added in v0.52.0

type MktDataLakeFieldAttributes struct {
	DefinitionCreationType *struct {
		Text string `xml:",chardata"`
	} `xml:"definitionCreationType"`
	ExternalName *struct {
		Text string `xml:",chardata"`
	} `xml:"externalName"`
	IsEventDate *struct {
		Text string `xml:",chardata"`
	} `xml:"isEventDate"`
	IsInternalOrganization *struct {
		Text string `xml:",chardata"`
	} `xml:"isInternalOrganization"`
	IsRecordModified *struct {
		Text string `xml:",chardata"`
	} `xml:"isRecordModified"`
	PrimaryIndexOrder *struct {
		Text string `xml:",chardata"`
	} `xml:"primaryIndexOrder"`
	UsageTag *struct {
		Text string `xml:",chardata"`
	} `xml:"usageTag"`
}

type MktDataModelFieldAttributes added in v0.52.0

type MktDataModelFieldAttributes struct {
	DefinitionCreationType *struct {
		Text string `xml:",chardata"`
	} `xml:"definitionCreationType"`
	InvalidMergeActionType *struct {
		Text string `xml:",chardata"`
	} `xml:"invalidMergeActionType"`
	IsDynamicLookup *struct {
		Text string `xml:",chardata"`
	} `xml:"isDynamicLookup"`
	LabelOverride *struct {
		Text string `xml:",chardata"`
	} `xml:"labelOverride"`
	MasterLabel *struct {
		Text string `xml:",chardata"`
	} `xml:"masterLabel"`
	PrimaryIndexOrder *struct {
		Text string `xml:",chardata"`
	} `xml:"primaryIndexOrder"`
	RefAttrDeveloperName *struct {
		Text string `xml:",chardata"`
	} `xml:"refAttrDeveloperName"`
	UsageTag *struct {
		Text string `xml:",chardata"`
	} `xml:"usageTag"`
}

type Picklist added in v0.60.0

type Picklist struct {
	ControllingField   *TextLiteral    `xml:"controllingField"`
	PicklistValues     []PicklistValue `xml:"picklistValues"`
	RestrictedPicklist *BooleanText    `xml:"restrictedPicklist"`
	Sorted             *BooleanText    `xml:"sorted"`
}

Picklist is the picklist element of API versions before 38.0.

type PicklistValue added in v0.60.0

type PicklistValue struct {
	FullName               string        `xml:"fullName"`
	AllowEmail             *BooleanText  `xml:"allowEmail"`
	Closed                 *BooleanText  `xml:"closed"`
	Color                  *TextLiteral  `xml:"color"`
	ControllingFieldValues []TextLiteral `xml:"controllingFieldValues"`
	Converted              *BooleanText  `xml:"converted"`
	CssExposed             *BooleanText  `xml:"cssExposed"`
	Default                *BooleanText  `xml:"default"`
	Description            *TextLiteral  `xml:"description"`
	ForecastCategory       *TextLiteral  `xml:"forecastCategory"`
	HighPriority           *BooleanText  `xml:"highPriority"`
	Probability            *IntegerText  `xml:"probability"`
	ReverseRole            *TextLiteral  `xml:"reverseRole"`
	Reviewed               *BooleanText  `xml:"reviewed"`
	Won                    *BooleanText  `xml:"won"`
}

Jump to

Keyboard shortcuts

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