{"modulePath":"https-1xa.pages.dev/hyperledger/fabric","version":"v1.0.0-alpha","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package impl\n\n## Types\n\n```go\ntype AccessControlShim struct {\n\t// contains filtered or unexported fields\n}\n```\nAccessControlShim wraps the object passed to chaincode for shim side handling of APIs to provide access control capabilities.\n\n```go\nfunc NewAccessControlShim(stub shim.ChaincodeStubInterface) *AccessControlShim\n```\nNewAccessControlShim create a new AccessControlShim instance\n\n```go\nfunc (shim *AccessControlShim) ReadCertAttribute(attributeName string) ([]byte, error)\n```\nReadCertAttribute is used to read an specific attribute from the transaction certificate, \\*attributeName\\* is passed as input parameter to this function. Example:\n\n\tattrValue,error:=stub.ReadCertAttribute(\"position\")\n\n```go\nfunc (shim *AccessControlShim) VerifyAttribute(attributeName string, attributeValue []byte) (bool, error)\n```\nVerifyAttribute is used to verify if the transaction certificate has an attribute with name \\*attributeName\\* and value \\*attributeValue\\* which are the input parameters received by this function. Example:\n\n\tcontainsAttr, error := stub.VerifyAttribute(\"position\", \"Software Engineer\")\n\n```go\nfunc (shim *AccessControlShim) VerifyAttributes(attrs ...*accesscontrol.Attribute) (bool, error)\n```\nVerifyAttributes does the same as VerifyAttribute but it checks for a list of attributes and their respective values instead of a single attribute/value pair Example:\n\n\tcontainsAttrs, error:= stub.VerifyAttributes(\u0026attr.Attribute{\"position\",  \"Software Engineer\"}, \u0026attr.Attribute{\"company\", \"ACompany\"})\n\n```go\nfunc (shim *AccessControlShim) VerifySignature(certificate, signature, message []byte) (bool, error)\n```\nVerifySignature verifies the transaction signature and returns \\`true\\` if correct and \\`false\\` otherwise\n\n","path":"https-1xa.pages.dev/hyperledger/fabric/accesscontrol/impl","name":"impl","synopsis":"","isRedistributable":true}
