Documentation ¶
Overview ¶
Package analytic holds basic functions for working with analytics.
Index ¶
- func AnalyticIDsFromFusion(fusion *pb.Fusion) ([]string, error)
- func AnalyticInbox(format, analyticID string) string
- func AnalyticInboxes(formats []string, analyticID string) []string
- func FindResources(val interface{}) ([]*pb.Resource, error)
- func FusionFromDetections(ds []*pb.AnnotatedDetection, outDir string) (fusion *pb.Fusion, err error)
- func FusionOutDir(fus *pb.Fusion) (string, error)
- func OutDir(det *pb.Detection) (string, error)
- func SetFusionOutDir(fus *pb.Fusion, dir string) error
- func SetOutDir(det *pb.Detection, dir string) error
- func UnmarshalDetectionJSON(s string) (*pb.Detection, error)
- func UnmarshalFusionJSON(s string) (*pb.Fusion, error)
- type ResourceHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyticIDsFromFusion ¶
AnalyticIDsFromFusion gets all the analytic IDs which produced the analytic output contained in the fusion proto.
func AnalyticInbox ¶
AnalyticInbox returns the inbox name for a given analytic ID.
func AnalyticInboxes ¶
AnalyticInboxes returns a slice of inbox queue names for the given formats and analytic ID.
func FindResources ¶
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 ¶
FusionOutDir gets the output directory from the fusion request
func UnmarshalDetectionJSON ¶
UnmarshalDetectionJSON is a silly workaround for unmarshaling JSON where some oneof fields are nil (even though the type is inferable).
Types ¶
type ResourceHandler ¶
ResourceHandler is called when a Resource type is found in a proto.