attr

package
v1.5.6-beta2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 7 Imported by: 18 modules, 30 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 (
	// BOOLEAN indicates that the attribute is of type boolean
	BOOLEAN attributeType = 1 + iota
	// LIST indicates that the attribute is of type list
	LIST
	// FIXED indicates that the attribute value is fixed and can't be modified
	FIXED
	// CUSTOM indicates that the attribute is a custom attribute
	CUSTOM
)
View Source
const (
	Roles          = "hf.Registrar.Roles"
	DelegateRoles  = "hf.Registrar.DelegateRoles"
	Revoker        = "hf.Revoker"
	IntermediateCA = "hf.IntermediateCA"
	GenCRL         = "hf.GenCRL"
	RegistrarAttr  = "hf.Registrar.Attributes"
	AffiliationMgr = "hf.AffiliationMgr"
	EnrollmentID   = "hf.EnrollmentID"
	Type           = "hf.Type"
	Affiliation    = "hf.Affiliation"
)

Attribute names

Variables

This section is empty.

Functions

func CanRegisterAttribute

func CanRegisterAttribute(requestedAttr *api.Attribute, allRequestedAttrs []api.Attribute, user, registrar AttributeControl) error

CanRegisterAttribute will iterate through the values of registrar's 'hf.Registrar.Attributes' attribute to check if registrar can register the requested attributes

func CanRegisterRequestedAttributes

func CanRegisterRequestedAttributes(reqAttrs []api.Attribute, user, registrar AttributeControl) error

CanRegisterRequestedAttributes validates that the registrar can register the requested attributes

func ConvertAttrs added in v1.2.0

func ConvertAttrs(inAttrs map[string]string) ([]api.Attribute, error)

ConvertAttrs converts attribute string into an Attribute object array

func GetAttrValue

func GetAttrValue(attrs []api.Attribute, name string) string

GetAttrValue searches 'attrs' for the attribute with name 'name' and returns its value, or "" if not found.

Types

type AttributeControl

type AttributeControl interface {
	// GetAttribute returns the value for an attribute name
	GetAttribute(name string) (*api.Attribute, error)
}

AttributeControl interface gets the attributes associated with an identity

Jump to

Keyboard shortcuts

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