presidio

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2019 License: MIT Imports: 5 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertInterfaceToJSON

func ConvertInterfaceToJSON(template interface{}) (string, error)

ConvertInterfaceToJSON convert go interface to json

func ConvertJSONToInterface

func ConvertJSONToInterface(template string, convertTo interface{}) error

ConvertJSONToInterface convert Json to go Interface

Types

type Item

type Item interface {

	//GetUniqueID returns the scanned item unique id
	GetUniqueID() (string, error)

	//GetContent returns the content of the scanned item
	GetContent() (string, error)

	//GetPath returns the item path
	GetPath() string

	//IsContentTypeSupported returns if the item can be scanned.
	IsContentTypeSupported() error
}

Item interface represent the supported item's methods.

type ServicesAPI added in v0.1.2

type ServicesAPI interface {
	SetupAnalyzerService()
	SetupAnonymizerService()
	SetupAnonymizerImageService()
	SetupOCRService()
	SetupSchedulerService()
	SetupDatasinkService()
	SetupCache() cache.Cache
	AnalyzeItem(ctx context.Context, text string, template *types.AnalyzeTemplate) ([]*types.AnalyzeResult, error)
	AnonymizeItem(ctx context.Context, analyzeResults []*types.AnalyzeResult, text string,
		anonymizeTemplate *types.AnonymizeTemplate) (*types.AnonymizeResponse, error)
	AnonymizeImageItem(ctx context.Context, image *types.Image, analyzeResults []*types.AnalyzeResult,
		anonymizeImageTypeEnum types.DetectionTypeEnum,
		anonymizeImageTemplate *types.AnonymizeImageTemplate) (*types.AnonymizeImageResponse, error)
	OcrItem(ctx context.Context, image *types.Image) (*types.OcrResponse, error)
	SendResultToDatasink(ctx context.Context, analyzeResults []*types.AnalyzeResult,
		anonymizeResults *types.AnonymizeResponse, path string) error
	ApplyStream(ctx context.Context, streamsJobRequest *types.StreamsJobRequest) (*types.StreamsJobResponse, error)
	ApplyScan(ctx context.Context, scanJobRequest *types.ScannerCronJobRequest) (*types.ScannerCronJobResponse, error)
	InitDatasink(ctx context.Context, datasinkTemplate *types.DatasinkTemplate) (*types.DatasinkResponse, error)
	CloseDatasink(ctx context.Context, datasinkTemplate *types.CompletionMessage) (*types.DatasinkResponse, error)
}

ServicesAPI interface for services action

type TemplatesStore added in v0.1.2

type TemplatesStore interface {
	GetTemplate(project string, action string, id string) (string, error)
	InsertTemplate(project string, action string, id string, value string) error
	UpdateTemplate(project string, action string, id string, value string) error
	DeleteTemplate(project string, action string, id string) error
}

TemplatesStore interface for template actions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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