analytic

package
v0.0.0-...-5a762db Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package analytic holds basic functions for working with analytics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyticIDsFromFusion

func AnalyticIDsFromFusion(fusion *pb.Fusion) ([]string, error)

AnalyticIDsFromFusion gets all the analytic IDs which produced the analytic output contained in the fusion proto.

func AnalyticInbox

func AnalyticInbox(format, analyticID string) string

AnalyticInbox returns the inbox name for a given analytic ID.

func AnalyticInboxes

func AnalyticInboxes(formats []string, analyticID string) []string

AnalyticInboxes returns a slice of inbox queue names for the given formats and analytic ID.

func FindResources

func FindResources(val interface{}) ([]*pb.Resource, error)

FindResources finds all Resource types in a proto and calls the given handler for each.

func FusionFromDetections

func FusionFromDetections(ds []*pb.AnnotatedDetection, outDir string) (fusion *pb.Fusion, err error)

FusionFromDetections takes a slice of AnnotatedDetection of the same type (i.e. imfManip, vidManip, imgSplice, etc.) and returns a Fusion object.

func FusionOutDir

func FusionOutDir(fus *pb.Fusion) (string, error)

FusionOutDir gets the output directory from the fusion request

func OutDir

func OutDir(det *pb.Detection) (string, error)

OutDir tries to find the output directory in a detection's request.

func SetFusionOutDir

func SetFusionOutDir(fus *pb.Fusion, dir string) error

SetFusionOutDir

func SetOutDir

func SetOutDir(det *pb.Detection, dir string) error

SetOutDir attempts to set the output directory in a detection's request.

func UnmarshalDetectionJSON

func UnmarshalDetectionJSON(s string) (*pb.Detection, error)

UnmarshalDetectionJSON is a silly workaround for unmarshaling JSON where some oneof fields are nil (even though the type is inferable).

func UnmarshalFusionJSON

func UnmarshalFusionJSON(s string) (*pb.Fusion, error)

Types

type ResourceHandler

type ResourceHandler func(r *pb.Resource)

ResourceHandler is called when a Resource type is found in a proto.

Jump to

Keyboard shortcuts

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