Look up family identities without copying catalogs
This commit is contained in:
@@ -75,6 +75,16 @@ func ArtifactFamilies(catalog *ArtifactCatalog) ArtifactFamilyCatalog {
|
||||
return cloneArtifactFamilyCatalog(catalog.Families)
|
||||
}
|
||||
|
||||
// ArtifactFamilyIdentity returns a member's scalar provenance without copying
|
||||
// the family catalog or exposing its mutable dependency and input collections.
|
||||
func ArtifactFamilyIdentity(catalog *ArtifactCatalog, key string) (family, characterID string, ok bool) {
|
||||
if catalog == nil {
|
||||
return "", "", false
|
||||
}
|
||||
member, ok := catalog.Families.Members[key]
|
||||
return member.Family, member.CharacterID, ok
|
||||
}
|
||||
|
||||
// CampaignsConfig configures the local campaign registry.
|
||||
type CampaignsConfig struct {
|
||||
Root string `yaml:"root" json:"root"`
|
||||
|
||||
Reference in New Issue
Block a user