regofunc

package
v1.0.2 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, BSD-3-Clause, MIT Imports: 12 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHeaderFunc

func GetHeaderFunc(headers map[string]string) (*rego.Function, rego.Builtin1)

func Register

func Register(name string, fn RegoFunc)

Register an extension function.

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 DID

type DID struct {
	// contains filtered or unexported fields
}

func (*DID) String

func (d *DID) String() string

String returns a string representation of this DID.

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 NewOcmFuncs

func NewOcmFuncs(ocmAddr string, httpClient *http.Client) *OcmFuncs

func (*OcmFuncs) GetLoginProofInvitation

func (of *OcmFuncs) GetLoginProofInvitation() (*rego.Function, rego.Builtin2)

func (*OcmFuncs) GetLoginProofResult

func (of *OcmFuncs) GetLoginProofResult() (*rego.Function, rego.Builtin1)

type RegoFunc

type RegoFunc func(*rego.Rego)

func List

func List() []RegoFunc

List returns all registered extension functions.

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 TaskFuncs

type TaskFuncs struct {
	// contains filtered or unexported fields
}

func NewTaskFuncs

func NewTaskFuncs(taskAddr string, httpClient *http.Client) *TaskFuncs

func (*TaskFuncs) CreateTaskFunc

func (t *TaskFuncs) CreateTaskFunc() (*rego.Function, rego.Builtin2)

CreateTaskFunc returns a rego function for creating tasks.

func (*TaskFuncs) CreateTaskListFunc

func (t *TaskFuncs) CreateTaskListFunc() (*rego.Function, rego.Builtin2)

CreateTaskListFunc returns a rego function for creating task lists.

Jump to

Keyboard shortcuts

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