rekognition

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Rekognition

Parity grade: A · SDK aws-sdk-go-v2/service/rekognition@v1.51.26 · last audited 2026-07-12 (6642a73c)

Coverage

Metric Value
Operations audited 50 (47 ok, 3 partial)
Feature families 3 (3 ok)
Known gaps 4
Deferred items 1
Resource leaks clean
Known gaps
  • CreateStreamProcessor / DescribeStreamProcessor: Input/Output/Settings/RegionsOfInterest/NotificationChannel/KmsKeyId/DataSharingPreference are accepted by the real API but neither parsed from the request nor stored/returned — file a bd issue if stream-processor-heavy workloads need this
  • UpdateStreamProcessor is an existence-check no-op; none of UpdateStreamProcessorInput's fields (DataSharingPreferenceForUpdate, ParametersToDelete, RegionsOfInterestForUpdate, SettingsForUpdate) are applied
  • CreateProjectVersion drops Tags/OutputConfig/TrainingData/TestingData/FeatureConfig from the request (Custom Labels training config, low-traffic)
  • CreateDataset never rejects a duplicate (ProjectArn, DatasetType) pair (real AWS: ResourceAlreadyExistsException) because datasetARN is always uuid-suffixed
Deferred
  • Full field-level completeness audit of the async-video Get* response bodies (Celebrities/ModerationLabels/Faces/Labels/Persons/Segments/TextDetections arrays) — always empty; acceptable per the ML-mock exemption but not individually wire-diffed field-by-field this sweep

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNameInUse is a sentinel for Create* operations whose Name/Arn is
	// already taken by a resource type that the real AWS API reports as
	// ResourceInUseException -- stream processors, projects, and project
	// versions -- as opposed to ResourceAlreadyExistsException (collections,
	// datasets) or ConflictException (users). Verified against
	// aws-sdk-go-v2/service/rekognition's per-operation deserializers.go
	// error switches (each generated Create* op only recognizes a specific
	// exception type; anything else deserializes as an untyped
	// smithy.GenericAPIError, breaking SDK-side `errors.As` typed matching).
	ErrNameInUse = errors.New("resource name already in use")
	// ErrUserConflict is returned when CreateUser is called with a UserId
	// that already exists; AWS reports this as ConflictException (not
	// ResourceAlreadyExistsException).
	ErrUserConflict = errors.New("user already exists")

	// ErrCollectionNotFound is returned when a collection does not exist.
	ErrCollectionNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrCollectionAlreadyExists is returned when a collection already exists.
	ErrCollectionAlreadyExists = awserr.New(errConflictException, awserr.ErrAlreadyExists)
	// ErrStreamProcessorNotFound is returned when a stream processor does not exist.
	ErrStreamProcessorNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrStreamProcessorAlreadyExists is returned when a stream processor already
	// exists. Maps to ResourceInUseException, not ResourceAlreadyExistsException.
	ErrStreamProcessorAlreadyExists = awserr.New(errResourceInUse, ErrNameInUse)
	// ErrFaceNotFound is returned when a face does not exist in a collection.
	ErrFaceNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrValidation is returned on invalid input.
	ErrValidation = awserr.New(errValidation, awserr.ErrInvalidParameter)
	// ErrUnknownOperation is returned when the requested operation is not implemented.
	ErrUnknownOperation = errors.New("unknown operation")

	// ErrProjectNotFound is returned when a project does not exist.
	ErrProjectNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrProjectAlreadyExists is returned when a project name is already in
	// use. Maps to ResourceInUseException (not ResourceAlreadyExistsException
	// -- see ErrNameInUse).
	ErrProjectAlreadyExists = awserr.New(errResourceInUse, ErrNameInUse)
	// ErrProjectVersionNotFound is returned when a project version does not exist.
	ErrProjectVersionNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrProjectVersionAlreadyExists is returned when a project version name
	// is already in use. Maps to ResourceInUseException (see ErrNameInUse).
	ErrProjectVersionAlreadyExists = awserr.New(errResourceInUse, ErrNameInUse)
	// ErrDatasetNotFound is returned when a dataset does not exist.
	ErrDatasetNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrUserNotFound is returned when a user does not exist.
	ErrUserNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrUserAlreadyExists is returned when a UserId is already registered
	// in the collection. Maps to ConflictException (not
	// ResourceAlreadyExistsException -- see ErrUserConflict).
	ErrUserAlreadyExists = awserr.New(errConflictException, ErrUserConflict)
	// ErrLivenessSessionNotFound is returned when a liveness session does not exist.
	ErrLivenessSessionNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrAsyncJobNotFound is returned when an async job does not exist.
	ErrAsyncJobNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrMediaAnalysisJobNotFound is returned when a media analysis job does not exist.
	ErrMediaAnalysisJobNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
)
View Source
var ErrNilAppContext = errors.New("rekognition: nil app context")

ErrNilAppContext is returned when Init is called with a nil AppContext.

Functions

This section is empty.

Types

type AssociatedFace

type AssociatedFace struct {
	FaceID string
}

AssociatedFace is a face successfully associated to a user.

type AsyncJob

type AsyncJob struct {
	JobID     string
	JobStatus string
	NextToken string
}

AsyncJob represents a Rekognition async video analysis job.

type Collection

type Collection struct {
	CreationTimestamp time.Time
	Tags              map[string]string
	CollectionID      string
	CollectionARN     string
	FaceModelVersion  string
}

Collection represents an Amazon Rekognition face collection. CreationTimestamp is first so its non-pointer prefix reduces GC pointer bytes.

type Dataset

type Dataset struct {
	CreationTimestamp    time.Time
	LastUpdatedTimestamp time.Time
	DatasetARN           string
	ProjectARN           string
	DatasetType          string
	Status               string
	StatusMessage        string
}

Dataset represents a Rekognition Custom Labels dataset.

type DatasetDistribution

type DatasetDistribution struct {
	DatasetARN string
}

DatasetDistribution is a dataset reference for DistributeDatasetEntries.

type DatasetLabel

type DatasetLabel struct {
	LabelName  string
	EntryCount int64
}

DatasetLabel represents a label entry in a dataset.

type DisassociatedFace

type DisassociatedFace struct {
	FaceID string
}

DisassociatedFace is a face successfully disassociated from a user.

type Face

type Face struct {
	FaceID          string
	ImageID         string
	ExternalImageID string
	CollectionID    string
	Confidence      float64
}

Face represents an indexed face.

type FaceMatch

type FaceMatch struct {
	Face       *Face
	Similarity float64
}

FaceMatch represents a face match result.

type Handler

type Handler struct {
	Backend StorageBackend
	// contains filtered or unexported fields
}

Handler handles Rekognition HTTP requests using X-Amz-Target routing.

func NewHandler

func NewHandler(b StorageBackend) *Handler

NewHandler constructs a new Handler.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the operation name from the X-Amz-Target header.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(_ *echo.Context) string

ExtractResource extracts the resource identifier from the request body.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns the list of supported operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset resets the backend.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend. See Handler.Snapshot for why this delegation exists.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a matcher that accepts Rekognition X-Amz-Target headers.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

This delegation is itself the Phase 3.3 dead-wiring fix: before this change Handler had no Snapshot/Restore of its own, even though InMemoryBackend (via StorageBackend) always implemented both. cli.go's generic setupPersistence type-asserts the registered service.Registerable (the Handler returned by Provider.Init, not the backend) against a Snapshot/Restore-shaped interface, so without these two methods Rekognition was silently never persisted at all, matching the codecommit/codepipeline/emr pattern.

type InMemoryBackend

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

InMemoryBackend is an in-memory implementation of StorageBackend.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new in-memory backend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the account ID.

func (*InMemoryBackend) AssociateFaces

func (b *InMemoryBackend) AssociateFaces(
	collectionID, userID string, faceIDs []string,
) ([]*AssociatedFace, []*UnsuccessfulFaceAssociation, error)

AssociateFaces associates faces with a user.

func (*InMemoryBackend) CopyProjectVersion

func (b *InMemoryBackend) CopyProjectVersion(
	sourceProjectVersionARN, destinationProjectARN, versionName string,
) (*ProjectVersion, error)

CopyProjectVersion copies a project version to another project.

func (*InMemoryBackend) CreateCollection

func (b *InMemoryBackend) CreateCollection(collectionID string, tags map[string]string) (*Collection, error)

CreateCollection creates a new face collection.

func (*InMemoryBackend) CreateDataset

func (b *InMemoryBackend) CreateDataset(projectARN, datasetType string) (*Dataset, error)

CreateDataset creates a new dataset.

func (*InMemoryBackend) CreateFaceLivenessSession

func (b *InMemoryBackend) CreateFaceLivenessSession() (string, error)

CreateFaceLivenessSession creates a new face liveness session.

func (*InMemoryBackend) CreateProject

func (b *InMemoryBackend) CreateProject(name string) (*Project, error)

CreateProject creates a new Rekognition Custom Labels project.

func (*InMemoryBackend) CreateProjectVersion

func (b *InMemoryBackend) CreateProjectVersion(projectARN, versionName string) (*ProjectVersion, error)

CreateProjectVersion creates a new model version within a project.

func (*InMemoryBackend) CreateStreamProcessor

func (b *InMemoryBackend) CreateStreamProcessor(
	name, roleARN string,
	tags map[string]string,
) (*StreamProcessor, error)

CreateStreamProcessor creates a new stream processor.

func (*InMemoryBackend) CreateUser

func (b *InMemoryBackend) CreateUser(collectionID, userID string) error

CreateUser creates a user in a collection.

func (*InMemoryBackend) DeleteCollection

func (b *InMemoryBackend) DeleteCollection(collectionID string) error

DeleteCollection deletes a face collection.

func (*InMemoryBackend) DeleteDataset

func (b *InMemoryBackend) DeleteDataset(datasetARN string) error

DeleteDataset deletes a dataset.

func (*InMemoryBackend) DeleteFaces

func (b *InMemoryBackend) DeleteFaces(collectionID string, faceIDs []string) ([]string, error)

DeleteFaces removes faces from a collection.

func (*InMemoryBackend) DeleteProject

func (b *InMemoryBackend) DeleteProject(projectARN string) error

DeleteProject deletes a project.

func (*InMemoryBackend) DeleteProjectPolicy

func (b *InMemoryBackend) DeleteProjectPolicy(
	projectARN, policyName, policyRevisionID string,
) error

DeleteProjectPolicy deletes a project policy.

func (*InMemoryBackend) DeleteProjectVersion

func (b *InMemoryBackend) DeleteProjectVersion(projectVersionARN string) error

DeleteProjectVersion deletes a project version.

func (*InMemoryBackend) DeleteStreamProcessor

func (b *InMemoryBackend) DeleteStreamProcessor(name string) error

DeleteStreamProcessor deletes a stream processor.

func (*InMemoryBackend) DeleteUser

func (b *InMemoryBackend) DeleteUser(collectionID, userID string) error

DeleteUser removes a user from a collection.

func (*InMemoryBackend) DescribeCollection

func (b *InMemoryBackend) DescribeCollection(collectionID string) (*Collection, error)

DescribeCollection returns details about a collection.

func (*InMemoryBackend) DescribeDataset

func (b *InMemoryBackend) DescribeDataset(datasetARN string) (*Dataset, error)

DescribeDataset returns details about a dataset.

func (*InMemoryBackend) DescribeProjectVersions

func (b *InMemoryBackend) DescribeProjectVersions(
	projectARN string, versionNames []string, maxResults int32, nextToken string,
) ([]*ProjectVersion, string, error)

DescribeProjectVersions lists versions for a project, optionally filtered by version names.

func (*InMemoryBackend) DescribeProjects

func (b *InMemoryBackend) DescribeProjects(
	projectARNs []string, maxResults int32, nextToken string,
) ([]*Project, string, error)

DescribeProjects lists projects, optionally filtered by ARNs.

func (*InMemoryBackend) DescribeStreamProcessor

func (b *InMemoryBackend) DescribeStreamProcessor(name string) (*StreamProcessor, error)

DescribeStreamProcessor returns details about a stream processor.

func (*InMemoryBackend) DisassociateFaces

func (b *InMemoryBackend) DisassociateFaces(
	collectionID, userID string, faceIDs []string,
) ([]*DisassociatedFace, []*UnsuccessfulFaceDisassociation, error)

DisassociateFaces removes faces from a user.

func (*InMemoryBackend) DistributeDatasetEntries

func (b *InMemoryBackend) DistributeDatasetEntries(datasets []DatasetDistribution) error

DistributeDatasetEntries validates datasets and marks them as UPDATE_IN_PROGRESS.

func (*InMemoryBackend) GetAsyncJob

func (b *InMemoryBackend) GetAsyncJob(jobID string) (*AsyncJob, error)

GetAsyncJob returns an async job by ID, simulating state progression on each poll.

func (*InMemoryBackend) GetFaceLivenessSessionResults

func (b *InMemoryBackend) GetFaceLivenessSessionResults(sessionID string) (*LivenessSessionResult, error)

GetFaceLivenessSessionResults returns the result of a liveness session.

func (*InMemoryBackend) GetMediaAnalysisJob

func (b *InMemoryBackend) GetMediaAnalysisJob(jobID string) (*MediaAnalysisJob, error)

GetMediaAnalysisJob returns a media analysis job by ID.

func (*InMemoryBackend) IndexFaces

func (b *InMemoryBackend) IndexFaces(collectionID, externalImageID string) ([]*Face, error)

IndexFaces indexes faces into a collection (simulated — no real image processing).

func (*InMemoryBackend) ListCollections

func (b *InMemoryBackend) ListCollections(maxResults int32, nextToken string) ([]*Collection, string, error)

ListCollections returns a paginated list of collections.

func (*InMemoryBackend) ListDatasetEntries

func (b *InMemoryBackend) ListDatasetEntries(
	datasetARN string, maxResults int32, nextToken string,
) ([]string, string, error)

ListDatasetEntries returns a paginated list of dataset entries.

func (*InMemoryBackend) ListDatasetLabels

func (b *InMemoryBackend) ListDatasetLabels(
	datasetARN string, maxResults int32, nextToken string,
) ([]*DatasetLabel, string, error)

ListDatasetLabels parses stored dataset entries and returns labels with occurrence counts.

func (*InMemoryBackend) ListFaces

func (b *InMemoryBackend) ListFaces(collectionID string, maxResults int32, nextToken string) ([]*Face, string, error)

ListFaces returns a paginated list of faces in a collection.

func (*InMemoryBackend) ListMediaAnalysisJobs

func (b *InMemoryBackend) ListMediaAnalysisJobs(
	maxResults int32, nextToken string,
) ([]*MediaAnalysisJob, string, error)

ListMediaAnalysisJobs returns a paginated list of media analysis jobs.

func (*InMemoryBackend) ListProjectPolicies

func (b *InMemoryBackend) ListProjectPolicies(
	projectARN string, maxResults int32, nextToken string,
) ([]*ProjectPolicy, string, error)

ListProjectPolicies lists policies for a project.

func (*InMemoryBackend) ListStreamProcessors

func (b *InMemoryBackend) ListStreamProcessors(maxResults int32, nextToken string) ([]*StreamProcessor, string, error)

ListStreamProcessors returns a paginated list of stream processors.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(resourceARN string) (map[string]string, error)

ListTagsForResource returns tags for a resource.

func (*InMemoryBackend) ListUsers

func (b *InMemoryBackend) ListUsers(
	collectionID string, maxResults int32, nextToken string,
) ([]*User, string, error)

ListUsers returns a paginated list of users in a collection.

func (*InMemoryBackend) PutProjectPolicy

func (b *InMemoryBackend) PutProjectPolicy(
	projectARN, policyName, policyDocument, policyRevisionID string,
) (string, error)

PutProjectPolicy creates or updates a project policy.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the region.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all stored state.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore deserializes backend state from JSON. It implements persistence.Persistable.

func (*InMemoryBackend) SearchFaces

func (b *InMemoryBackend) SearchFaces(collectionID, faceID string, maxFaces int32) ([]*FaceMatch, error)

SearchFaces searches for faces that match a given face ID.

func (*InMemoryBackend) SearchFacesByImage

func (b *InMemoryBackend) SearchFacesByImage(
	collectionID string,
	maxFaces int32,
	imageKey string,
) ([]*FaceMatch, error)

SearchFacesByImage searches for faces matching an image (simulated). imageKey is a stable string derived from the image reference (S3 path or byte length) and is used to vary similarity scores per image rather than returning a fixed value.

func (*InMemoryBackend) SearchUsers

func (b *InMemoryBackend) SearchUsers(collectionID, userID string, maxUsers int32) ([]*UserMatch, error)

SearchUsers returns up to maxUsers users with a simulated similarity score.

func (*InMemoryBackend) SearchUsersByImage

func (b *InMemoryBackend) SearchUsersByImage(
	collectionID string,
	maxUsers int32,
	imageKey string,
) ([]*UserMatch, error)

SearchUsersByImage returns up to maxUsers users with a deterministic similarity score derived from the image reference and each candidate user's identity.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serializes the backend state to JSON. It implements persistence.Persistable.

func (*InMemoryBackend) StartAsyncJob

func (b *InMemoryBackend) StartAsyncJob(jobType, collectionID string) (string, error)

StartAsyncJob creates a new async video analysis job.

func (*InMemoryBackend) StartMediaAnalysisJob

func (b *InMemoryBackend) StartMediaAnalysisJob(jobName string) (string, error)

StartMediaAnalysisJob creates a new media analysis job.

func (*InMemoryBackend) StartProjectVersion

func (b *InMemoryBackend) StartProjectVersion(projectVersionARN string, minInferenceUnits int32) error

StartProjectVersion sets a project version status to RUNNING.

func (*InMemoryBackend) StartStreamProcessor

func (b *InMemoryBackend) StartStreamProcessor(name string) error

StartStreamProcessor starts a stream processor.

func (*InMemoryBackend) StopProjectVersion

func (b *InMemoryBackend) StopProjectVersion(projectVersionARN string) error

StopProjectVersion sets a project version status to STOPPED.

func (*InMemoryBackend) StopStreamProcessor

func (b *InMemoryBackend) StopStreamProcessor(name string) error

StopStreamProcessor stops a stream processor.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceARN string, tags map[string]string) error

TagResource adds or updates tags on a resource.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error

UntagResource removes tags from a resource.

func (*InMemoryBackend) UpdateDatasetEntries

func (b *InMemoryBackend) UpdateDatasetEntries(datasetARN string, changes []byte) error

UpdateDatasetEntries appends changes to dataset entries.

func (*InMemoryBackend) UpdateStreamProcessor

func (b *InMemoryBackend) UpdateStreamProcessor(name string) error

UpdateStreamProcessor updates a stream processor (no-op for metadata).

type LivenessSessionResult

type LivenessSessionResult struct {
	SessionID  string
	Status     string
	Confidence float32
}

LivenessSessionResult holds the result of a face liveness session.

type MediaAnalysisJob

type MediaAnalysisJob struct {
	CreationTimestamp time.Time
	JobID             string
	JobName           string
	Status            string
}

MediaAnalysisJob represents a Rekognition media analysis job.

type Project

type Project struct {
	CreationTimestamp time.Time
	ProjectARN        string
	Status            string
}

Project represents a Rekognition Custom Labels project.

type ProjectPolicy

type ProjectPolicy struct {
	CreationTimestamp    time.Time
	LastUpdatedTimestamp time.Time
	ProjectARN           string
	PolicyName           string
	PolicyRevisionID     string
	PolicyDocument       string
}

ProjectPolicy represents a project policy.

type ProjectVersion

type ProjectVersion struct {
	CreationTimestamp time.Time
	ProjectVersionARN string
	ProjectARN        string
	VersionName       string
	Status            string
	StatusMessage     string
	MinInferenceUnits int32
}

ProjectVersion represents a model version within a project.

type Provider

type Provider struct{}

Provider implements service.Provider for Amazon Rekognition.

func (*Provider) Init

Init initializes the Rekognition service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type StorageBackend

type StorageBackend interface {
	CreateCollection(collectionID string, tags map[string]string) (*Collection, error)
	DeleteCollection(collectionID string) error
	DescribeCollection(collectionID string) (*Collection, error)
	ListCollections(maxResults int32, nextToken string) ([]*Collection, string, error)

	IndexFaces(collectionID, externalImageID string) ([]*Face, error)
	DeleteFaces(collectionID string, faceIDs []string) ([]string, error)
	ListFaces(collectionID string, maxResults int32, nextToken string) ([]*Face, string, error)
	SearchFaces(collectionID, faceID string, maxFaces int32) ([]*FaceMatch, error)
	SearchFacesByImage(collectionID string, maxFaces int32, imageKey string) ([]*FaceMatch, error)

	CreateStreamProcessor(name, roleARN string, tags map[string]string) (*StreamProcessor, error)
	DeleteStreamProcessor(name string) error
	DescribeStreamProcessor(name string) (*StreamProcessor, error)
	ListStreamProcessors(maxResults int32, nextToken string) ([]*StreamProcessor, string, error)
	StartStreamProcessor(name string) error
	StopStreamProcessor(name string) error
	UpdateStreamProcessor(name string) error

	TagResource(resourceARN string, tags map[string]string) error
	UntagResource(resourceARN string, tagKeys []string) error
	ListTagsForResource(resourceARN string) (map[string]string, error)

	// Projects and Project Versions
	CreateProject(name string) (*Project, error)
	DeleteProject(projectARN string) error
	DescribeProjects(projectARNs []string, maxResults int32, nextToken string) ([]*Project, string, error)
	CreateProjectVersion(projectARN, versionName string) (*ProjectVersion, error)
	DeleteProjectVersion(projectVersionARN string) error
	DescribeProjectVersions(projectARN string, versionNames []string, maxResults int32, nextToken string) (
		[]*ProjectVersion, string, error)
	CopyProjectVersion(sourceProjectVersionARN, destinationProjectARN, versionName string) (*ProjectVersion, error)
	StartProjectVersion(projectVersionARN string, minInferenceUnits int32) error
	StopProjectVersion(projectVersionARN string) error
	ListProjectPolicies(projectARN string, maxResults int32, nextToken string) ([]*ProjectPolicy, string, error)
	PutProjectPolicy(projectARN, policyName, policyDocument, policyRevisionID string) (string, error)
	DeleteProjectPolicy(projectARN, policyName, policyRevisionID string) error

	// Datasets
	CreateDataset(projectARN, datasetType string) (*Dataset, error)
	DeleteDataset(datasetARN string) error
	DescribeDataset(datasetARN string) (*Dataset, error)
	ListDatasetEntries(datasetARN string, maxResults int32, nextToken string) ([]string, string, error)
	ListDatasetLabels(datasetARN string, maxResults int32, nextToken string) ([]*DatasetLabel, string, error)
	UpdateDatasetEntries(datasetARN string, changes []byte) error
	DistributeDatasetEntries(datasets []DatasetDistribution) error

	// Users
	CreateUser(collectionID, userID string) error
	DeleteUser(collectionID, userID string) error
	ListUsers(collectionID string, maxResults int32, nextToken string) ([]*User, string, error)
	AssociateFaces(
		collectionID, userID string,
		faceIDs []string,
	) ([]*AssociatedFace, []*UnsuccessfulFaceAssociation, error)
	DisassociateFaces(
		collectionID, userID string,
		faceIDs []string,
	) ([]*DisassociatedFace, []*UnsuccessfulFaceDisassociation, error)
	SearchUsers(collectionID, userID string, maxUsers int32) ([]*UserMatch, error)
	SearchUsersByImage(collectionID string, maxUsers int32, imageKey string) ([]*UserMatch, error)

	// Face Liveness
	CreateFaceLivenessSession() (string, error)
	GetFaceLivenessSessionResults(sessionID string) (*LivenessSessionResult, error)

	// Async video jobs
	StartAsyncJob(jobType, collectionID string) (string, error)
	GetAsyncJob(jobID string) (*AsyncJob, error)
	StartMediaAnalysisJob(jobName string) (string, error)
	GetMediaAnalysisJob(jobID string) (*MediaAnalysisJob, error)
	ListMediaAnalysisJobs(maxResults int32, nextToken string) ([]*MediaAnalysisJob, string, error)

	AccountID() string
	Region() string
	Reset()
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error
}

StorageBackend is the interface for Rekognition storage operations.

type StreamProcessor

type StreamProcessor struct {
	CreationTimestamp  time.Time
	Tags               map[string]string
	Name               string
	StreamProcessorARN string
	RoleARN            string
	Status             string
}

StreamProcessor represents a Rekognition stream processor. CreationTimestamp is first so its non-pointer prefix reduces GC pointer bytes.

type UnsuccessfulFaceAssociation

type UnsuccessfulFaceAssociation struct {
	FaceID  string
	Reasons []string
}

UnsuccessfulFaceAssociation represents a face that couldn't be associated.

type UnsuccessfulFaceDisassociation

type UnsuccessfulFaceDisassociation struct {
	FaceID  string
	Reasons []string
}

UnsuccessfulFaceDisassociation represents a face that couldn't be disassociated.

type User

type User struct {
	UserID     string
	UserStatus string
}

User represents a Rekognition user in a collection.

type UserMatch

type UserMatch struct {
	User       *User
	Similarity float64
}

UserMatch represents a user match result.

Jump to

Keyboard shortcuts

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