Documentation ¶
Overview ¶
Package access implements a native contract to handle access. It allows an authorized identity to add access as an {ID, CONTRACT, COMMAND, IDENTITIES} quadruplet.
ID is the credential identifier. This identifier is generally defined at the contract's creation. CONTRACT is the contract name. COMMAND specifies the command to grant access to on the contract. IDENTITIES is a list of standard base64 encoded bls public keys, separated by comas.
Documentation Last Review: 02.02.2021
Index ¶
Constants ¶
const ( // ContractUID is the unique (4-bytes) identifier of the contract, it is // used to prefix keys in the K/V store and by DARCs for access control. ContractUID = "DARC" // ContractName is the name of the access contract. ContractName = "go.dedis.ch/dela.Access" // GrantIDArg is the argument's name in the transaction that contains the // provided id to grant GrantIDArg = "access:grant_id" // GrantContractArg is the argument's name in the transaction that contain // the provided contract name to grant the access to. GrantContractArg = "access:grant_contract" // GrantCommandArg is the argument's name in the transaction that contains // the provided command to grant access to. GrantCommandArg = "access:grant_command" // IdentityArg is the argument's name in the transaction that contains the // provided identity to grant access to. IdentityArg = "access:identity" // CmdArg is the argument's name to indicate the kind of command we want to // run on the contract. Should be one of the Command type. CmdArg = "access:command" // CredentialAllCommand defines the credential command that is allowed to // perform all commands. CredentialAllCommand = "all" )
Variables ¶
This section is empty.
Functions ¶
func NewCreds ¶
func NewCreds() access.Credential
NewCreds creates new credentials for an access contract execution.
func RegisterContract ¶
RegisterContract registers the access contract to the given execution service.
Types ¶
type Command ¶
type Command string
Command defines a command for the command contract
const ( // CmdSet defines the command to grant access CmdSet Command = "GRANT" )
Directories ¶
Path | Synopsis |
---|---|
Package controller implements a controller for the access contract.
|
Package controller implements a controller for the access contract. |