Documentation
¶
Index ¶
- Constants
- Variables
- type ApexClass
- type ApexClassList
- type ApplicationFilter
- type ApplicationVisibility
- type ApplicationVisibilityList
- type CustomMetadataType
- type CustomMetadataTypeList
- type CustomPermission
- type CustomPermissionList
- type CustomSetting
- type CustomSettingList
- type Description
- type ExternalCredentialPrincipalAccess
- type ExternalCredentialPrincipalAccessList
- type FieldFilter
- type FieldPermissions
- type FieldPermissionsList
- type FlowAccess
- type FlowAccessList
- type License
- type ObjectFilter
- type ObjectPermissions
- type ObjectPermissionsList
- type PageAccess
- type PageAccessList
- type PermissionSet
- func (p *PermissionSet) AddApplicationVisibility(appName string) error
- func (p *PermissionSet) AddClass(className string) error
- func (p *PermissionSet) AddCustomMetadataType(metadataType string) error
- func (p *PermissionSet) AddCustomPermission(permission string) error
- func (p *PermissionSet) AddCustomSetting(setting string) error
- func (p *PermissionSet) AddFieldPermissions(fieldName string) error
- func (p *PermissionSet) AddObjectPermissions(objectName string) error
- func (p *PermissionSet) AddRecordType(recordType string) error
- func (p *PermissionSet) AddTab(tabName string) error
- func (p *PermissionSet) AddUserPermission(permissionName string) error
- func (p *PermissionSet) AddVisualforcePageAccess(pageName string) error
- func (p *PermissionSet) CloneFieldPermissions(src, dest string) error
- func (p *PermissionSet) CloneObjectPermissions(src, dest string) error
- func (p *PermissionSet) CloneVisualforcePageAccess(src, dest string) error
- func (p *PermissionSet) DeleteApexClassAccess(apexClassName string) error
- func (p *PermissionSet) DeleteApplicationVisibility(applicationName string) error
- func (p *PermissionSet) DeleteCustomMetadataType(metadataType string) error
- func (p *PermissionSet) DeleteCustomPermission(permissionName string) error
- func (p *PermissionSet) DeleteCustomSettings(setting string) error
- func (p *PermissionSet) DeleteFieldPermissions(fieldName string) error
- func (p *PermissionSet) DeleteObjectFieldPermissions(objectName string)
- func (p *PermissionSet) DeleteObjectPermissions(objectName string)
- func (p *PermissionSet) DeleteObjectTabVisibility(objectName string)
- func (p *PermissionSet) DeleteRecordType(recordtype string) error
- func (p *PermissionSet) DeleteUserPermission(permissionName string) error
- func (p *PermissionSet) DeleteVisualforcePageAccess(pageName string) error
- func (p *PermissionSet) GetApexClasses() ApexClassList
- func (p *PermissionSet) GetApplications(filters ...ApplicationFilter) []ApplicationVisibility
- func (p *PermissionSet) GetCustomMetadataTypes() CustomMetadataTypeList
- func (p *PermissionSet) GetCustomPermissions() CustomPermissionList
- func (p *PermissionSet) GetCustomSettings() CustomSettingList
- func (p *PermissionSet) GetEnabledClasses() []string
- func (p *PermissionSet) GetEnabledCustomPermissions() []string
- func (p *PermissionSet) GetEnabledPageAccesses() []string
- func (p *PermissionSet) GetEnabledUserPermissions() []string
- func (p *PermissionSet) GetFieldPermissions(filters ...FieldFilter) FieldPermissionsList
- func (p *PermissionSet) GetGrantedFieldPermissions() []FieldPermissions
- func (p *PermissionSet) GetGrantedObjectPermissions() []ObjectPermissions
- func (p *PermissionSet) GetObjectPermissions(filters ...ObjectFilter) []ObjectPermissions
- func (p *PermissionSet) GetRecordTypeVisibility() RecordTypeVisibilityList
- func (p *PermissionSet) GetUserPermissions() UserPermissionList
- func (p *PermissionSet) GetVisibleApplications() []string
- func (p *PermissionSet) GetVisibleRecordTypes() []string
- func (p *PermissionSet) GetVisualforcePageVisibility() PageAccessList
- func (p *PermissionSet) SetApplicationVisibility(applicationName string, updates ApplicationVisibility) error
- func (p *PermissionSet) SetFieldPermissions(fieldName string, updates FieldPermissions) error
- func (c *PermissionSet) SetMetadata(m metadata.MetadataInfo)
- func (p *PermissionSet) SetObjectPermissions(objectName string, updates ObjectPermissions) error
- func (p *PermissionSet) Tidy()
- func (c *PermissionSet) Type() metadata.MetadataType
- type RecordTypeVisibility
- type RecordTypeVisibilityList
- type TabSettings
- type TabSettingsList
- type UserPermission
- type UserPermissionList
Constants ¶
View Source
const NAME = "PermissionSet"
Variables ¶
View Source
var ApplicationExistsError = errors.New("application already exists")
View Source
var ClassExistsError = errors.New("apex class already exists")
View Source
var CustomMetadataTypeExistsError = errors.New("custom metadata type already exists")
View Source
var CustomPermissionExistsError = errors.New("custom permission already exists")
View Source
var CustomSettingExistsError = errors.New("custom setting already exists")
View Source
var FieldExistsError = errors.New("field already exists")
View Source
var ObjectExistsError = errors.New("object already exists")
View Source
var RecordTypeExistsError = errors.New("record type already exists")
View Source
var TabExistsError = errors.New("tab already exists")
View Source
var UserPermissionExistsError = errors.New("user permissions already exists")
View Source
var VisualforcePageExistsError = errors.New("visualforce page already exists")
Functions ¶
This section is empty.
Types ¶
type ApexClass ¶
type ApexClass struct {
ApexClass string `xml:"apexClass"`
Enabled BooleanText `xml:"enabled"`
}
type ApexClassList ¶
type ApexClassList []ApexClass
func (ApexClassList) Tidy ¶
func (ca ApexClassList) Tidy()
type ApplicationFilter ¶
type ApplicationFilter func(ApplicationVisibility) bool
type ApplicationVisibility ¶
type ApplicationVisibility struct {
Application string `xml:"application"`
Visible BooleanText `xml:"visible"`
}
func (ApplicationVisibility) GetName ¶
func (av ApplicationVisibility) GetName() string
type ApplicationVisibilityList ¶
type ApplicationVisibilityList []ApplicationVisibility
func (*ApplicationVisibilityList) Tidy ¶
func (av *ApplicationVisibilityList) Tidy()
type CustomMetadataType ¶
type CustomMetadataType struct {
Enabled BooleanText `xml:"enabled"`
Name string `xml:"name"`
}
type CustomMetadataTypeList ¶
type CustomMetadataTypeList []CustomMetadataType
func (CustomMetadataTypeList) Tidy ¶
func (cp CustomMetadataTypeList) Tidy()
type CustomPermission ¶
type CustomPermission struct {
Enabled BooleanText `xml:"enabled"`
Name string `xml:"name"`
}
func (CustomPermission) MarshalXML ¶
func (o CustomPermission) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type CustomPermissionList ¶
type CustomPermissionList []CustomPermission
func (CustomPermissionList) Tidy ¶
func (cp CustomPermissionList) Tidy()
type CustomSetting ¶
type CustomSetting struct {
Enabled BooleanText `xml:"enabled"`
Name string `xml:"name"`
}
type CustomSettingList ¶
type CustomSettingList []CustomSetting
func (CustomSettingList) Tidy ¶
func (cp CustomSettingList) Tidy()
type Description ¶
type Description struct {
Text string `xml:",innerxml"`
}
type ExternalCredentialPrincipalAccess ¶
type ExternalCredentialPrincipalAccess struct {
Enabled BooleanText `xml:"enabled"`
ExternalCredentialPrincipal string `xml:"externalCredentialPrincipal"`
}
type ExternalCredentialPrincipalAccessList ¶
type ExternalCredentialPrincipalAccessList []ExternalCredentialPrincipalAccess
func (ExternalCredentialPrincipalAccessList) Tidy ¶
func (ec ExternalCredentialPrincipalAccessList) Tidy()
type FieldFilter ¶
type FieldFilter func(FieldPermissions) bool
type FieldPermissions ¶
type FieldPermissions struct {
Editable BooleanText `xml:"editable"`
Field string `xml:"field"`
Readable BooleanText `xml:"readable"`
}
func (FieldPermissions) GetName ¶
func (fp FieldPermissions) GetName() string
func (FieldPermissions) MarshalXML ¶
func (o FieldPermissions) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type FieldPermissionsList ¶
type FieldPermissionsList []FieldPermissions
func (*FieldPermissionsList) Tidy ¶
func (fp *FieldPermissionsList) Tidy()
type FlowAccess ¶
type FlowAccess struct {
Enabled BooleanText `xml:"enabled"`
Flow string `xml:"flow"`
}
type FlowAccessList ¶
type FlowAccessList []FlowAccess
type ObjectFilter ¶
type ObjectFilter func(ObjectPermissions) bool
type ObjectPermissions ¶
type ObjectPermissions struct {
AllowCreate BooleanText `xml:"allowCreate"`
AllowDelete BooleanText `xml:"allowDelete"`
AllowEdit BooleanText `xml:"allowEdit"`
AllowRead BooleanText `xml:"allowRead"`
ModifyAllRecords BooleanText `xml:"modifyAllRecords"`
Object string `xml:"object"`
ViewAllFields BooleanText `xml:"viewAllFields"`
ViewAllRecords BooleanText `xml:"viewAllRecords"`
}
func (ObjectPermissions) MarshalXML ¶
func (o ObjectPermissions) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type ObjectPermissionsList ¶
type ObjectPermissionsList []ObjectPermissions
func (ObjectPermissionsList) Tidy ¶
func (op ObjectPermissionsList) Tidy()
type PageAccess ¶
type PageAccess struct {
ApexPage string `xml:"apexPage"`
Enabled BooleanText `xml:"enabled"`
}
func (PageAccess) MarshalXML ¶
func (o PageAccess) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type PageAccessList ¶
type PageAccessList []PageAccess
func (PageAccessList) Tidy ¶
func (pa PageAccessList) Tidy()
type PermissionSet ¶
type PermissionSet struct {
metadata.MetadataInfo
XMLName xml.Name `xml:"PermissionSet"`
Xmlns string `xml:"xmlns,attr"`
ApplicationVisibilities ApplicationVisibilityList `xml:"applicationVisibilities"`
ClassAccesses ApexClassList `xml:"classAccesses"`
CustomMetadataTypeAccesses CustomMetadataTypeList `xml:"customMetadataTypeAccesses"`
CustomPermissions CustomPermissionList `xml:"customPermissions"`
CustomSettingAccesses CustomSettingList `xml:"customSettingAccesses"`
Description *Description `xml:"description"`
FieldPermissions FieldPermissionsList `xml:"fieldPermissions"`
FlowAccesses FlowAccessList `xml:"flowAccesses"`
ExternalCredentialPrincipalAccesses ExternalCredentialPrincipalAccessList `xml:"externalCredentialPrincipalAccesses"`
HasActivationRequired BooleanText `xml:"hasActivationRequired"`
Label string `xml:"label"`
License *License `xml:"license"`
ObjectPermissions ObjectPermissionsList `xml:"objectPermissions"`
PageAccesses PageAccessList `xml:"pageAccesses"`
RecordTypeVisibilities RecordTypeVisibilityList `xml:"recordTypeVisibilities"`
TabSettings TabSettingsList `xml:"tabSettings"`
UserPermissions UserPermissionList `xml:"userPermissions"`
}
func Open ¶
func Open(path string) (*PermissionSet, error)
func (*PermissionSet) AddApplicationVisibility ¶
func (p *PermissionSet) AddApplicationVisibility(appName string) error
func (*PermissionSet) AddClass ¶
func (p *PermissionSet) AddClass(className string) error
func (*PermissionSet) AddCustomMetadataType ¶
func (p *PermissionSet) AddCustomMetadataType(metadataType string) error
func (*PermissionSet) AddCustomPermission ¶
func (p *PermissionSet) AddCustomPermission(permission string) error
func (*PermissionSet) AddCustomSetting ¶
func (p *PermissionSet) AddCustomSetting(setting string) error
func (*PermissionSet) AddFieldPermissions ¶
func (p *PermissionSet) AddFieldPermissions(fieldName string) error
func (*PermissionSet) AddObjectPermissions ¶
func (p *PermissionSet) AddObjectPermissions(objectName string) error
func (*PermissionSet) AddRecordType ¶
func (p *PermissionSet) AddRecordType(recordType string) error
func (*PermissionSet) AddTab ¶
func (p *PermissionSet) AddTab(tabName string) error
func (*PermissionSet) AddUserPermission ¶
func (p *PermissionSet) AddUserPermission(permissionName string) error
func (*PermissionSet) AddVisualforcePageAccess ¶
func (p *PermissionSet) AddVisualforcePageAccess(pageName string) error
func (*PermissionSet) CloneFieldPermissions ¶
func (p *PermissionSet) CloneFieldPermissions(src, dest string) error
func (*PermissionSet) CloneObjectPermissions ¶
func (p *PermissionSet) CloneObjectPermissions(src, dest string) error
func (*PermissionSet) CloneVisualforcePageAccess ¶
func (p *PermissionSet) CloneVisualforcePageAccess(src, dest string) error
func (*PermissionSet) DeleteApexClassAccess ¶
func (p *PermissionSet) DeleteApexClassAccess(apexClassName string) error
func (*PermissionSet) DeleteApplicationVisibility ¶
func (p *PermissionSet) DeleteApplicationVisibility(applicationName string) error
func (*PermissionSet) DeleteCustomMetadataType ¶
func (p *PermissionSet) DeleteCustomMetadataType(metadataType string) error
func (*PermissionSet) DeleteCustomPermission ¶
func (p *PermissionSet) DeleteCustomPermission(permissionName string) error
func (*PermissionSet) DeleteCustomSettings ¶
func (p *PermissionSet) DeleteCustomSettings(setting string) error
func (*PermissionSet) DeleteFieldPermissions ¶
func (p *PermissionSet) DeleteFieldPermissions(fieldName string) error
func (*PermissionSet) DeleteObjectFieldPermissions ¶
func (p *PermissionSet) DeleteObjectFieldPermissions(objectName string)
func (*PermissionSet) DeleteObjectPermissions ¶
func (p *PermissionSet) DeleteObjectPermissions(objectName string)
func (*PermissionSet) DeleteObjectTabVisibility ¶
func (p *PermissionSet) DeleteObjectTabVisibility(objectName string)
func (*PermissionSet) DeleteRecordType ¶
func (p *PermissionSet) DeleteRecordType(recordtype string) error
func (*PermissionSet) DeleteUserPermission ¶
func (p *PermissionSet) DeleteUserPermission(permissionName string) error
func (*PermissionSet) DeleteVisualforcePageAccess ¶
func (p *PermissionSet) DeleteVisualforcePageAccess(pageName string) error
func (*PermissionSet) GetApexClasses ¶
func (p *PermissionSet) GetApexClasses() ApexClassList
func (*PermissionSet) GetApplications ¶
func (p *PermissionSet) GetApplications(filters ...ApplicationFilter) []ApplicationVisibility
func (*PermissionSet) GetCustomMetadataTypes ¶
func (p *PermissionSet) GetCustomMetadataTypes() CustomMetadataTypeList
func (*PermissionSet) GetCustomPermissions ¶
func (p *PermissionSet) GetCustomPermissions() CustomPermissionList
func (*PermissionSet) GetCustomSettings ¶
func (p *PermissionSet) GetCustomSettings() CustomSettingList
func (*PermissionSet) GetEnabledClasses ¶
func (p *PermissionSet) GetEnabledClasses() []string
func (*PermissionSet) GetEnabledCustomPermissions ¶
func (p *PermissionSet) GetEnabledCustomPermissions() []string
func (*PermissionSet) GetEnabledPageAccesses ¶
func (p *PermissionSet) GetEnabledPageAccesses() []string
func (*PermissionSet) GetEnabledUserPermissions ¶
func (p *PermissionSet) GetEnabledUserPermissions() []string
func (*PermissionSet) GetFieldPermissions ¶
func (p *PermissionSet) GetFieldPermissions(filters ...FieldFilter) FieldPermissionsList
func (*PermissionSet) GetGrantedFieldPermissions ¶
func (p *PermissionSet) GetGrantedFieldPermissions() []FieldPermissions
func (*PermissionSet) GetGrantedObjectPermissions ¶
func (p *PermissionSet) GetGrantedObjectPermissions() []ObjectPermissions
func (*PermissionSet) GetObjectPermissions ¶
func (p *PermissionSet) GetObjectPermissions(filters ...ObjectFilter) []ObjectPermissions
func (*PermissionSet) GetRecordTypeVisibility ¶
func (p *PermissionSet) GetRecordTypeVisibility() RecordTypeVisibilityList
func (*PermissionSet) GetUserPermissions ¶
func (p *PermissionSet) GetUserPermissions() UserPermissionList
func (*PermissionSet) GetVisibleApplications ¶
func (p *PermissionSet) GetVisibleApplications() []string
func (*PermissionSet) GetVisibleRecordTypes ¶
func (p *PermissionSet) GetVisibleRecordTypes() []string
func (*PermissionSet) GetVisualforcePageVisibility ¶
func (p *PermissionSet) GetVisualforcePageVisibility() PageAccessList
func (*PermissionSet) SetApplicationVisibility ¶
func (p *PermissionSet) SetApplicationVisibility(applicationName string, updates ApplicationVisibility) error
func (*PermissionSet) SetFieldPermissions ¶
func (p *PermissionSet) SetFieldPermissions(fieldName string, updates FieldPermissions) error
func (*PermissionSet) SetMetadata ¶
func (c *PermissionSet) SetMetadata(m metadata.MetadataInfo)
func (*PermissionSet) SetObjectPermissions ¶
func (p *PermissionSet) SetObjectPermissions(objectName string, updates ObjectPermissions) error
func (*PermissionSet) Tidy ¶
func (p *PermissionSet) Tidy()
func (*PermissionSet) Type ¶
func (c *PermissionSet) Type() metadata.MetadataType
type RecordTypeVisibility ¶
type RecordTypeVisibility struct {
RecordType string `xml:"recordType"`
Visible BooleanText `xml:"visible"`
}
func (RecordTypeVisibility) MarshalXML ¶
func (o RecordTypeVisibility) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type RecordTypeVisibilityList ¶
type RecordTypeVisibilityList []RecordTypeVisibility
func (RecordTypeVisibilityList) Tidy ¶
func (rt RecordTypeVisibilityList) Tidy()
type TabSettings ¶
func (*TabSettings) IsVisible ¶
func (t *TabSettings) IsVisible() bool
func (TabSettings) MarshalXML ¶
func (o TabSettings) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type TabSettingsList ¶
type TabSettingsList []TabSettings
func (TabSettingsList) Tidy ¶
func (ts TabSettingsList) Tidy()
type UserPermission ¶
type UserPermission struct {
Enabled BooleanText `xml:"enabled"`
Name string `xml:"name"`
}
func (UserPermission) MarshalXML ¶
func (o UserPermission) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type UserPermissionList ¶
type UserPermissionList []UserPermission
func (UserPermissionList) Tidy ¶
func (up UserPermissionList) Tidy()
Click to show internal directories.
Click to hide internal directories.