remove

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

package remove provides common methods for removing image files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Removal

type Removal struct {
	// DataSource is a valid gocloud.dev/blob Bucket URI where WOF feature records associated with media files are stored.
	DataSource string
	// MediaSource is a valid gocloud.dev/blob Bucket URI where media files are stored.
	MediaSource string
	// A valid whosonfirst/go-whosonfirst-export Exporter for exporting Who's On First feature records.
	Exporter export.Exporter
	// A boolean flag indicating whether to perform a removal in "dry run" mode.
	Dryrun bool
	// contains filtered or unexported fields
}

type Removal provides a struct for removing media files.

func NewRemoval

func NewRemoval(ex export.Exporter) (*Removal, error)

NewRemoval return a new Removal instance.

func (*Removal) Remove

func (c *Removal) Remove(ctx context.Context, requests ...*RemovalRequest) error

Remove will process one or more RemovalRequest instances (to remove media files)

type RemovalRequest

type RemovalRequest struct {
	// A valid Who's On First ID (to remove).
	Id int64 `json:"id"`
	// The data repository where Id is stored.
	Repo string `json:"repo"`
}

type RemovalRequest provides encapsulating data for removing a given media file.

Jump to

Keyboard shortcuts

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