lib

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluatePoliciesOnInput

func EvaluatePoliciesOnInput(inputJSON string, opaServerURL string, policyToBeEvaluated string, standardClient *http.Client) (string, error)

Types

type CatalogReader

type CatalogReader struct {
	DataCatalog *clients.DataCatalog
}

CatalogReader - Reader struct which has information to read from catalog, this struct does not have any information related to the application context. any request specific info is passed as parameters to functions belonging to this struct.

func NewCatalogReader

func NewCatalogReader(dataCatalog *clients.DataCatalog) *CatalogReader

func (*CatalogReader) GetDatasetMetadata

func (r *CatalogReader) GetDatasetMetadata(ctx *context.Context, client pb.DataCatalogServiceClient, datasetID string, creds string) (map[string]interface{}, error)

func (*CatalogReader) GetDatasetsMetadataFromCatalog

func (r *CatalogReader) GetDatasetsMetadataFromCatalog(in *taxonomymodels.PolicyManagerRequest, creds string) (map[string]interface{}, error)

return map datasetID -> metadata of dataset in form of map

type OpaReader

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

func NewOpaReader

func NewOpaReader(opasrvurl string, client *http.Client) *OpaReader

func (*OpaReader) GetOPADecisions

func (r *OpaReader) GetOPADecisions(in *taxonomymodels.PolicyManagerRequest, creds string, catalogReader *CatalogReader, policyToBeEvaluated string) (taxonomymodels.PolicyManagerResponse, error)

Jump to

Keyboard shortcuts

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