backend

package
v0.0.0-...-e80d38a Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package backend provides common definitions for blobstore backends

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Verify returns true with no error if the blob `blobID` is correctly stored
	Verify(blobID string, m MACFunc) (ok bool, err error)

	// Put places a blob into storage
	Put(blobID string, data []byte, m MACFunc) error

	// Get retrieves a blob from storage
	Get(blobID string, m MACFunc) (data []byte, err error)
}

Backend interfaces provide blob storage

type MACFunc

type MACFunc func(data []byte) (checksum string, err error)

MACFunc defines how a blobstore will pass a utility function to the backends for computing secure hashes

Jump to

Keyboard shortcuts

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