Documentation ¶
Index ¶
- Constants
- func IDVersionInVersions(versionNumber IDVersionNumber, versionsStr string) error
- func NewPieceKey() (PiecePublicKey, PiecePrivateKey, error)
- func NewVersionExt(version IDVersion) pkix.Extension
- func SplitPath(path Path) []string
- type Bucket
- type BucketList
- type BucketListOptions
- type CipherSuite
- type EncryptedPrivateKey
- type EncryptionParameters
- type IDVersion
- type IDVersionNumber
- type Key
- type LastSegment
- type ListDirection
- type ListOptions
- type NodeID
- type NodeIDList
- type NodeURL
- type NodeURLs
- type Nonce
- type Object
- type ObjectInfo
- type ObjectList
- type ObjectListItem
- type Path
- type Piece
- type PieceID
- type PiecePrivateKey
- type PiecePublicKey
- type RedundancyAlgorithm
- type RedundancyScheme
- type Segment
- type SegmentDownloadInfo
- type SegmentEncryption
- type SegmentID
- type SegmentListItem
- type SegmentPosition
- type SerialNumber
- type Stream
- type StreamID
Constants ¶
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 )
const ( KeySize = storj.KeySize NonceSize = storj.NonceSize )
Constant definitions for key and nonce sizes
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 )
const ( InvalidRedundancyAlgorithm = storj.InvalidRedundancyAlgorithm ReedSolomon = storj.ReedSolomon )
List of supported redundancy algorithms
const NodeIDSize = storj.NodeIDSize
NodeIDSize is the byte length of a NodeID
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
NewVersionExt creates a new identity version certificate extension for the given identity version,
Types ¶
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 ¶
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 LastSegment ¶
type LastSegment = storj.LastSegment
LastSegment contains info about last segment TODO: remove
type ListDirection ¶
type ListDirection = storj.ListDirection
ListDirection specifies listing direction
type NodeID ¶
NodeID is a unique node identifier
func NewVersionedID ¶ added in v0.9.0
NewVersionedID adds an identity version to a node ID.
func NodeIDFromBytes ¶
NodeIDFromBytes converts a byte slice into a node id
func NodeIDFromString ¶
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
NodeURL defines a structure for connecting to a node.
func ParseNodeURL ¶ added in v0.15.0
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
NodeURLs defines a comma delimited flag for defining a list node url-s.
func ParseNodeURLs ¶ added in v0.15.0
ParseNodeURLs parses comma delimited list of node urls
type Nonce ¶
Nonce represents the largest nonce used by any encryption protocol
func NonceFromBytes ¶ added in v0.16.0
NonceFromBytes converts a byte slice into a nonce
func NonceFromString ¶ added in v0.16.0
NonceFromString decodes an base32 encoded
type ObjectInfo ¶ added in v0.17.0
type ObjectInfo = storj.ObjectInfo
ObjectInfo contains information about a specific object
type ObjectListItem ¶ added in v0.16.0
type ObjectListItem = storj.ObjectListItem
ObjectListItem represents listed object
type PieceID ¶
PieceID is the unique identifier for pieces
func PieceIDFromBytes ¶
PieceIDFromBytes converts a byte slice into a piece ID
func PieceIDFromString ¶
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 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
SegmentID is the unique identifier for segment related to object
func SegmentIDFromBytes ¶ added in v0.16.0
SegmentIDFromBytes converts a byte slice into a segment ID
func SegmentIDFromString ¶ added in v0.16.0
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 StreamID ¶ added in v0.15.0
StreamID is the unique identifier for stream related to object
func StreamIDFromBytes ¶ added in v0.15.0
StreamIDFromBytes converts a byte slice into a stream ID
func StreamIDFromString ¶ added in v0.15.0
StreamIDFromString decodes an base32 encoded