storj

package
v0.33.0-rc Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EncUnspecified indicates no encryption suite has been selected.
	EncUnspecified = storj.EncUnspecified
	// EncNull indicates use of the NULL cipher; that is, no encryption is
	// done. The ciphertext is equal to the plaintext.
	EncNull = storj.EncNull
	// EncAESGCM indicates use of AES128-GCM encryption.
	EncAESGCM = storj.EncAESGCM
	// EncSecretBox indicates use of XSalsa20-Poly1305 encryption, as provided
	// by the NaCl cryptography library under the name "Secretbox".
	EncSecretBox = storj.EncSecretBox
	// EncNullBase64URL is like EncNull but Base64 encodes/decodes the
	// binary path data (URL-safe)
	EncNullBase64URL = storj.EncNullBase64URL
)
View Source
const (
	KeySize   = storj.KeySize
	NonceSize = storj.NonceSize
)

Constant definitions for key and nonce sizes

View Source
const (
	// Before lists backwards from cursor, without cursor [NOT SUPPORTED]
	Before = storj.Before
	// Backward lists backwards from cursor, including cursor [NOT SUPPORTED]
	Backward = storj.Backward
	// Forward lists forwards from cursor, including cursor
	Forward = storj.Forward
	// After lists forwards from cursor, without cursor
	After = storj.After
)
View Source
const (
	InvalidRedundancyAlgorithm = storj.InvalidRedundancyAlgorithm
	ReedSolomon                = storj.ReedSolomon
)

List of supported redundancy algorithms

View Source
const NodeIDSize = storj.NodeIDSize

NodeIDSize is the byte length of a NodeID

View Source
const V0 = storj.V0

V0 represents identity version 0 NB: identities created before identity versioning (i.e. which don't have a version extension; "legacy") will be recognized as V0.

Variables

This section is empty.

Functions

func IDVersionInVersions added in v0.9.0

func IDVersionInVersions(versionNumber IDVersionNumber, versionsStr string) error

IDVersionInVersions returns an error if the given version is in the given string of version(s)/range(s).

func NewPieceKey added in v0.15.0

func NewPieceKey() (PiecePublicKey, PiecePrivateKey, error)

NewPieceKey creates a piece key pair

func NewVersionExt added in v0.9.0

func NewVersionExt(version IDVersion) pkix.Extension

NewVersionExt creates a new identity version certificate extension for the given identity version,

func SplitPath

func SplitPath(path Path) []string

SplitPath splits path into a slice of path components

Types

type Bucket

type Bucket = storj.Bucket

Bucket contains information about a specific bucket

type BucketList

type BucketList = storj.BucketList

BucketList is a list of buckets

type BucketListOptions

type BucketListOptions = storj.BucketListOptions

BucketListOptions lists objects

type CipherSuite

type CipherSuite = storj.CipherSuite

CipherSuite specifies one of the encryption suites supported by Storj libraries for encryption of in-network data.

type EncryptedPrivateKey

type EncryptedPrivateKey = storj.EncryptedPrivateKey

EncryptedPrivateKey is a private key that has been encrypted

type EncryptionParameters

type EncryptionParameters = storj.EncryptionParameters

EncryptionParameters is the cipher suite and parameters used for encryption

type IDVersion

type IDVersion = storj.IDVersion

IDVersion holds fields that are used to distinguish different identity versions from one another; used in identity generation.

func GetIDVersion added in v0.9.0

func GetIDVersion(number IDVersionNumber) (IDVersion, error)

GetIDVersion looks up the given version number in the map of registered versions, returning an error if none is found.

func IDVersionFromCert added in v0.9.0

func IDVersionFromCert(cert *x509.Certificate) (IDVersion, error)

IDVersionFromCert parsed the IDVersion from the passed certificate's IDVersion extension.

func LatestIDVersion added in v0.9.0

func LatestIDVersion() IDVersion

LatestIDVersion returns the last IDVersion registered.

type IDVersionNumber added in v0.9.0

type IDVersionNumber = storj.IDVersionNumber

IDVersionNumber is the number of an identity version.

type Key

type Key = storj.Key

Key represents the largest key used by any encryption protocol

func NewKey added in v0.12.0

func NewKey(humanReadableKey []byte) (*Key, error)

NewKey creates a new Storj key from humanReadableKey.

type LastSegment

type LastSegment = storj.LastSegment

LastSegment contains info about last segment TODO: remove

type ListDirection

type ListDirection = storj.ListDirection

ListDirection specifies listing direction

type ListOptions

type ListOptions = storj.ListOptions

ListOptions lists objects

type NodeID

type NodeID = storj.NodeID

NodeID is a unique node identifier

func NewVersionedID added in v0.9.0

func NewVersionedID(id NodeID, version IDVersion) NodeID

NewVersionedID adds an identity version to a node ID.

func NodeIDFromBytes

func NodeIDFromBytes(b []byte) (NodeID, error)

NodeIDFromBytes converts a byte slice into a node id

func NodeIDFromString

func NodeIDFromString(s string) (NodeID, error)

NodeIDFromString decodes a base58check encoded node id string

type NodeIDList

type NodeIDList = storj.NodeIDList

NodeIDList is a slice of NodeIDs (implements sort)

func NodeIDsFromBytes

func NodeIDsFromBytes(b [][]byte) (ids NodeIDList, err error)

NodeIDsFromBytes converts a 2d byte slice into a list of nodes

type NodeURL added in v0.15.0

type NodeURL = storj.NodeURL

NodeURL defines a structure for connecting to a node.

func ParseNodeURL added in v0.15.0

func ParseNodeURL(s string) (NodeURL, error)

ParseNodeURL parses node URL string.

Examples:

raw IP:
  33.20.0.1:7777
  [2001:db8:1f70::999:de8:7648:6e8]:7777

with NodeID:
  12vha9oTFnerxYRgeQ2BZqoFrLrnmmf5UWTCY2jA77dF3YvWew7@33.20.0.1:7777
  12vha9oTFnerxYRgeQ2BZqoFrLrnmmf5UWTCY2jA77dF3YvWew7@[2001:db8:1f70::999:de8:7648:6e8]:7777

without host:
  12vha9oTFnerxYRgeQ2BZqoFrLrnmmf5UWTCY2jA77dF3YvWew7@

type NodeURLs added in v0.15.0

type NodeURLs = storj.NodeURLs

NodeURLs defines a comma delimited flag for defining a list node url-s.

func ParseNodeURLs added in v0.15.0

func ParseNodeURLs(s string) (NodeURLs, error)

ParseNodeURLs parses comma delimited list of node urls

type Nonce

type Nonce = storj.Nonce

Nonce represents the largest nonce used by any encryption protocol

func NonceFromBytes added in v0.16.0

func NonceFromBytes(b []byte) (Nonce, error)

NonceFromBytes converts a byte slice into a nonce

func NonceFromString added in v0.16.0

func NonceFromString(s string) (Nonce, error)

NonceFromString decodes an base32 encoded

type Object

type Object = storj.Object

Object contains information about a specific object

type ObjectInfo added in v0.17.0

type ObjectInfo = storj.ObjectInfo

ObjectInfo contains information about a specific object

type ObjectList

type ObjectList = storj.ObjectList

ObjectList is a list of objects

type ObjectListItem added in v0.16.0

type ObjectListItem = storj.ObjectListItem

ObjectListItem represents listed object

type Path

type Path = storj.Path

Path represents a object path

func JoinPaths

func JoinPaths(paths ...Path) Path

JoinPaths concatenates paths to a new single path

type Piece

type Piece = storj.Piece

Piece is information where a piece is located

type PieceID

type PieceID = storj.PieceID

PieceID is the unique identifier for pieces

func NewPieceID

func NewPieceID() PieceID

NewPieceID creates a piece ID

func PieceIDFromBytes

func PieceIDFromBytes(b []byte) (PieceID, error)

PieceIDFromBytes converts a byte slice into a piece ID

func PieceIDFromString

func PieceIDFromString(s string) (PieceID, error)

PieceIDFromString decodes a hex encoded piece ID string

type PiecePrivateKey added in v0.15.0

type PiecePrivateKey = storj.PiecePrivateKey

PiecePrivateKey is the unique identifier for pieces

func PiecePrivateKeyFromBytes added in v0.15.0

func PiecePrivateKeyFromBytes(data []byte) (PiecePrivateKey, error)

PiecePrivateKeyFromBytes converts bytes to a piece private key.

type PiecePublicKey added in v0.15.0

type PiecePublicKey = storj.PiecePublicKey

PiecePublicKey is the unique identifier for pieces

func PiecePublicKeyFromBytes added in v0.15.0

func PiecePublicKeyFromBytes(data []byte) (PiecePublicKey, error)

PiecePublicKeyFromBytes converts bytes to a piece public key.

type RedundancyAlgorithm

type RedundancyAlgorithm = storj.RedundancyAlgorithm

RedundancyAlgorithm is the algorithm used for redundancy

type RedundancyScheme

type RedundancyScheme = storj.RedundancyScheme

RedundancyScheme specifies the parameters and the algorithm for redundancy

type Segment

type Segment = storj.Segment

Segment is full segment information

type SegmentDownloadInfo added in v0.16.0

type SegmentDownloadInfo = storj.SegmentDownloadInfo

SegmentDownloadInfo represents segment download information inline/remote

type SegmentEncryption added in v0.17.0

type SegmentEncryption = storj.SegmentEncryption

SegmentEncryption represents segment encryption key and nonce

type SegmentID added in v0.16.0

type SegmentID = storj.SegmentID

SegmentID is the unique identifier for segment related to object

func SegmentIDFromBytes added in v0.16.0

func SegmentIDFromBytes(b []byte) (SegmentID, error)

SegmentIDFromBytes converts a byte slice into a segment ID

func SegmentIDFromString added in v0.16.0

func SegmentIDFromString(s string) (SegmentID, error)

SegmentIDFromString decodes an base32 encoded

type SegmentListItem added in v0.16.0

type SegmentListItem = storj.SegmentListItem

SegmentListItem represents listed segment

type SegmentPosition added in v0.16.0

type SegmentPosition = storj.SegmentPosition

SegmentPosition segment position in object

type SerialNumber

type SerialNumber = storj.SerialNumber

SerialNumber is the unique identifier for pieces

func SerialNumberFromBytes

func SerialNumberFromBytes(b []byte) (SerialNumber, error)

SerialNumberFromBytes converts a byte slice into a serial number

func SerialNumberFromString

func SerialNumberFromString(s string) (SerialNumber, error)

SerialNumberFromString decodes an base32 encoded

type Stream

type Stream = storj.Stream

Stream is information about an object stream

type StreamID added in v0.15.0

type StreamID = storj.StreamID

StreamID is the unique identifier for stream related to object

func StreamIDFromBytes added in v0.15.0

func StreamIDFromBytes(b []byte) (StreamID, error)

StreamIDFromBytes converts a byte slice into a stream ID

func StreamIDFromString added in v0.15.0

func StreamIDFromString(s string) (StreamID, error)

StreamIDFromString decodes an base32 encoded

Jump to

Keyboard shortcuts

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