sharingrules

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const NAME = "SharingRules"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLevel

type AccessLevel struct {
	Text string `xml:",chardata"`
}

AccessLevel represents an access level field

type AccountSettings

type AccountSettings struct {
	CaseAccessLevel        AccessLevel `xml:"caseAccessLevel"`
	ContactAccessLevel     AccessLevel `xml:"contactAccessLevel"`
	OpportunityAccessLevel AccessLevel `xml:"opportunityAccessLevel"`
}

AccountSettings represents account-specific sharing settings

type AllInternalUsers

type AllInternalUsers struct{}

AllInternalUsers represents all internal users

type BooleanFilter

type BooleanFilter struct {
	Text string `xml:",chardata"`
}

BooleanFilter represents a boolean filter expression

type CriteriaItem

type CriteriaItem struct {
	Field     Field     `xml:"field"`
	Operation Operation `xml:"operation"`
	Value     Value     `xml:"value"`
}

CriteriaItem represents a single criteria item in a rule

type CriteriaRule

type CriteriaRule struct {
	FullName                 string           `xml:"fullName"`
	AccessLevel              AccessLevel      `xml:"accessLevel"`
	AccountSettings          *AccountSettings `xml:"accountSettings"`
	Description              *Description     `xml:"description"`
	Label                    Label            `xml:"label"`
	SharedTo                 SharedTo         `xml:"sharedTo"`
	BooleanFilter            *BooleanFilter   `xml:"booleanFilter"`
	CriteriaItems            []CriteriaItem   `xml:"criteriaItems"`
	IncludeRecordsOwnedByAll *BooleanText     `xml:"includeRecordsOwnedByAll"`
}

func (CriteriaRule) MarshalXML

func (o CriteriaRule) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (CriteriaRule) UsesField

func (r CriteriaRule) UsesField(fieldName string) bool

UsesField checks if a criteria rule uses the specified field (case-insensitive)

type CriteriaRuleList

type CriteriaRuleList []CriteriaRule

func (CriteriaRuleList) Tidy

func (r CriteriaRuleList) Tidy()

type Description

type Description struct {
	Text string `xml:",innerxml"`
}

Description represents a description field

type Field

type Field struct {
	Text string `xml:",chardata"`
}

Field represents a field reference

type Group

type Group struct {
	Text string `xml:",chardata"`
}

Group represents a group reference

type GuestRule

type GuestRule struct {
	FullName               string       `xml:"fullName"`
	AccessLevel            AccessLevel  `xml:"accessLevel"`
	Description            *Description `xml:"description"`
	Label                  Label        `xml:"label"`
	SharedTo               SharedTo     `xml:"sharedTo"`
	CriteriaItems          CriteriaItem `xml:"criteriaItems"`
	IncludeHVUOwnedRecords *TextLiteral `xml:"includeHVUOwnedRecords"`
}

type GuestRuleList

type GuestRuleList []GuestRule

func (GuestRuleList) Tidy

func (r GuestRuleList) Tidy()

type GuestUser

type GuestUser struct {
	Text string `xml:",chardata"`
}

GuestUser represents a guest user reference

type Label

type Label struct {
	Text string `xml:",innerxml"`
}

Label represents a label field

type Operation

type Operation struct {
	Text string `xml:",chardata"`
}

Operation represents an operation

type OwnerRule

type OwnerRule struct {
	FullName        string           `xml:"fullName"`
	AccessLevel     AccessLevel      `xml:"accessLevel"`
	AccountSettings *AccountSettings `xml:"accountSettings"`
	Description     *Description     `xml:"description"`
	Label           Label            `xml:"label"`
	SharedTo        SharedTo         `xml:"sharedTo"`
	SharedFrom      SharedFrom       `xml:"sharedFrom"`
}

func (OwnerRule) MarshalXML

func (o OwnerRule) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type OwnerRuleList

type OwnerRuleList []OwnerRule

func (OwnerRuleList) Tidy

func (r OwnerRuleList) Tidy()

type Queue

type Queue struct {
	Text string `xml:",chardata"`
}

Queue represents a queue reference

type Role

type Role struct {
	Text string `xml:",chardata"`
}

Role represents a role reference

type RoleAndSubordinates

type RoleAndSubordinates struct {
	Text string `xml:",chardata"`
}

RoleAndSubordinates represents a role and subordinates reference

type SharedFrom

type SharedFrom struct {
	RoleAndSubordinates *RoleAndSubordinates `xml:"roleAndSubordinates"`
	Group               *Group               `xml:"group"`
	Queue               *Queue               `xml:"queue"`
	Role                *Role                `xml:"role"`
	AllInternalUsers    *AllInternalUsers    `xml:"allInternalUsers"`
}

SharedFrom represents who a rule shares from

type SharedTo

type SharedTo struct {
	Group               *Group               `xml:"group"`
	Role                *Role                `xml:"role"`
	AllInternalUsers    *AllInternalUsers    `xml:"allInternalUsers"`
	RoleAndSubordinates *RoleAndSubordinates `xml:"roleAndSubordinates"`
	GuestUser           *GuestUser           `xml:"guestUser"`
}

SharedTo represents who a rule shares to

type SharingRules

type SharingRules struct {
	metadata.MetadataInfo
	XMLName              xml.Name         `xml:"SharingRules"`
	Xmlns                string           `xml:"xmlns,attr"`
	SharingCriteriaRules CriteriaRuleList `xml:"sharingCriteriaRules"`
	SharingGuestRules    GuestRuleList    `xml:"sharingGuestRules"`
	SharingOwnerRules    OwnerRuleList    `xml:"sharingOwnerRules"`
}

func Open

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

func (*SharingRules) DeleteCriteriaRule

func (p *SharingRules) DeleteCriteriaRule(ruleName string) error

func (*SharingRules) DeleteOwnerRule

func (p *SharingRules) DeleteOwnerRule(ruleName string) error

func (*SharingRules) GetCriteriaRules

func (s *SharingRules) GetCriteriaRules() []CriteriaRule

func (*SharingRules) GetOwnerRules

func (s *SharingRules) GetOwnerRules() []OwnerRule

func (*SharingRules) SetMetadata

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

func (*SharingRules) Tidy

func (r *SharingRules) Tidy()

func (*SharingRules) Type

type Value

type Value struct {
	Text string `xml:",chardata"`
}

Value represents a value

Jump to

Keyboard shortcuts

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