Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAllowed = errors.New("not allowed")
ErrNotAllowed is returned when a subject DID is not allowed to proceed under the given policy.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct { // Policy ID. ID string `json:"id"` // A list of DIDs identifying the entities collecting sensitive data and permitted to protect those objects with // this policy. Collectors []string `json:"collectors"` // A list of DIDs identifying the entities permitted to request the release of protected objects associated with // this policy. Handlers []string `json:"handlers"` // A list of DIDs identifying entities required to provide authorization for the release of the protected object. Approvers []string `json:"approvers"` // The minimum number of (unique) approvers required before an object may be released back to the handler. // This allows for an "m of N" approval scenario. Constraints: 0 < min_approvers < approvers.length. MinApprovers int `json:"min_approvers"` }
Policy contains policy configuration for storing and releasing protected data.
type Role ¶
type Role int
Role is a role of entity represented by DID.
const ( // Collector represents an entity that collects sensitive data. Collector Role = iota // Handler represents an entity that is permitted to request the release of protected data. Handler // Approver represents an entity that provides authorization for the release of the protected data. Approver )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service works with policy configurations.
func NewService ¶
NewService returns a new instance of Service.
Click to show internal directories.
Click to hide internal directories.