Documentation
¶
Overview ¶
Package regofunc provides functions that extend the Rego runtime with additional capabilities and built-in functions which can be used when writing and evaluating Rego polices.
Index ¶
- func GetHeaderFunc(headers map[string]string) (*rego.Function, rego.Builtin1)
- func Register(name string, fn RegoFunc)
- type CacheFuncs
- type DID
- type DIDResolverFuncs
- type DIDWebFuncs
- type OcmFuncs
- func (of *OcmFuncs) GetLoginProofInvitation() (*rego.Function, rego.Builtin2)
- func (of *OcmFuncs) GetLoginProofResult() (*rego.Function, rego.Builtin1)
- func (of *OcmFuncs) GetRawProofResult() (*rego.Function, rego.Builtin1)
- func (of *OcmFuncs) SendPresentationRequest() (*rego.Function, rego.Builtin1)
- type RegoFunc
- type SignerFuncs
- func (sf *SignerFuncs) AddVCProofFunc() (*rego.Function, rego.Builtin3)
- func (sf *SignerFuncs) AddVPProofFunc() (*rego.Function, rego.Builtin4)
- func (sf *SignerFuncs) VerificationMethodFunc() (*rego.Function, rego.Builtin3)
- func (sf *SignerFuncs) VerificationMethodsFunc() (*rego.Function, rego.Builtin2)
- func (sf *SignerFuncs) VerifyProofFunc() (*rego.Function, rego.Builtin1)
- type Storage
- type StorageFuncs
- type TaskFuncs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheFuncs ¶
type CacheFuncs struct {
// contains filtered or unexported fields
}
func NewCacheFuncs ¶
func NewCacheFuncs(cacheAddr string, httpClient *http.Client) *CacheFuncs
func (*CacheFuncs) CacheGetFunc ¶
func (cf *CacheFuncs) CacheGetFunc() (*rego.Function, rego.Builtin3)
func (*CacheFuncs) CacheSetFunc ¶
func (cf *CacheFuncs) CacheSetFunc() (*rego.Function, rego.Builtin4)
type DIDResolverFuncs ¶
type DIDResolverFuncs struct {
// contains filtered or unexported fields
}
func NewDIDResolverFuncs ¶
func NewDIDResolverFuncs(resolverAddr string, httpClient *http.Client) *DIDResolverFuncs
func (*DIDResolverFuncs) ResolveFunc ¶
func (dr *DIDResolverFuncs) ResolveFunc() (*rego.Function, rego.Builtin1)
type DIDWebFuncs ¶
type DIDWebFuncs struct{}
func NewDIDWebFuncs ¶
func NewDIDWebFuncs() *DIDWebFuncs
func (*DIDWebFuncs) DIDToURLFunc ¶
func (dw *DIDWebFuncs) DIDToURLFunc() (*rego.Function, rego.Builtin1)
func (*DIDWebFuncs) URLToDIDFunc ¶
func (dw *DIDWebFuncs) URLToDIDFunc() (*rego.Function, rego.Builtin1)
type OcmFuncs ¶
type OcmFuncs struct {
// contains filtered or unexported fields
}
func (*OcmFuncs) GetLoginProofInvitation ¶
func (*OcmFuncs) GetLoginProofResult ¶
func (*OcmFuncs) GetRawProofResult ¶
type SignerFuncs ¶
type SignerFuncs struct {
// contains filtered or unexported fields
}
func NewSignerFuncs ¶
func NewSignerFuncs(signerAddr string, httpClient *http.Client) *SignerFuncs
func (*SignerFuncs) AddVCProofFunc ¶
func (sf *SignerFuncs) AddVCProofFunc() (*rego.Function, rego.Builtin3)
AddVCProofFunc calls the signer service to add a proof to a given Verifiable Credential. It accepts 3 arguments: 1. Namespace of cryptographic keys in the signer. 2. Key to be used for signing. 3. Verifiable Credential in JSON format.
func (*SignerFuncs) AddVPProofFunc ¶
func (sf *SignerFuncs) AddVPProofFunc() (*rego.Function, rego.Builtin4)
AddVPProofFunc calls the signer service to add proof to a Verifiable Presentation. It accepts 4 arguments: 1. DID used in the proof verification method to find verification key by verifiers 2. Namespace of the cryptographic keys in the signer. 3. Key to be used for signing. 4. Verifiable Presentation in JSON format.
func (*SignerFuncs) VerificationMethodFunc ¶
func (sf *SignerFuncs) VerificationMethodFunc() (*rego.Function, rego.Builtin3)
func (*SignerFuncs) VerificationMethodsFunc ¶
func (sf *SignerFuncs) VerificationMethodsFunc() (*rego.Function, rego.Builtin2)
func (*SignerFuncs) VerifyProofFunc ¶
func (sf *SignerFuncs) VerifyProofFunc() (*rego.Function, rego.Builtin1)
type StorageFuncs ¶
type StorageFuncs struct {
// contains filtered or unexported fields
}
func NewStorageFuncs ¶
func NewStorageFuncs(storage Storage) *StorageFuncs
func (*StorageFuncs) DeleteData ¶
func (sf *StorageFuncs) DeleteData() (*rego.Function, rego.Builtin1)
type TaskFuncs ¶
type TaskFuncs struct {
// contains filtered or unexported fields
}
func (*TaskFuncs) CreateTaskFunc ¶
CreateTaskFunc returns a rego function for creating tasks.