Documentation ¶
Index ¶
- Variables
- func CompleteIdentityVersionsTest(t *testing.T, test IdentityTest)
- func IdentityVersionsTest(t *testing.T, test IdentityTest)
- func MustPregeneratedIdentity(index int, version storj.IDVersion) *identity.FullIdentity
- func MustPregeneratedSignedIdentity(index int, version storj.IDVersion) *identity.FullIdentity
- func NewPregeneratedSigner(version storj.IDVersion) *identity.FullCertificateAuthority
- func NewTestCA(ctx context.Context) (*identity.FullCertificateAuthority, error)
- func NewTestIdentity(ctx context.Context) (*identity.FullIdentity, error)
- func NewTestManageableFullIdentity(ctx context.Context) (*identity.ManageableFullIdentity, error)
- func NewTestManageablePeerIdentity(ctx context.Context) (*identity.ManageablePeerIdentity, error)
- func PregeneratedIdentity(index int, version storj.IDVersion) (*identity.FullIdentity, error)
- func PregeneratedSignedIdentity(index int, version storj.IDVersion) (*identity.FullIdentity, error)
- func SignedIdentityVersionsTest(t *testing.T, test IdentityTest)
- func SignerVersionsTest(t *testing.T, test SignerTest)
- type Identities
- type IdentityTest
- type SignerTest
- type VersionedCertificateAuthorityMap
- type VersionedIdentitiesMap
Constants ¶
This section is empty.
Variables ¶
var ( // IdentityVersions holds pregenerated identities for each/ identity version. IdentityVersions = VersionedIdentitiesMap{ storj.V0: pregeneratedV0Identities, } // SignedIdentityVersions holds pregenerated, signed identities for each. // identity version SignedIdentityVersions = VersionedIdentitiesMap{ storj.V0: pregeneratedV0SignedIdentities, } // SignerVersions holds certificate authorities for each identity version. SignerVersions = VersionedCertificateAuthorityMap{ storj.V0: pregeneratedV0Signer, } )
Functions ¶
func CompleteIdentityVersionsTest ¶
func CompleteIdentityVersionsTest(t *testing.T, test IdentityTest)
CompleteIdentityVersionsTest runs the `IdentityTest` for each identity version, with both signed dn unsigned identities.
func IdentityVersionsTest ¶
func IdentityVersionsTest(t *testing.T, test IdentityTest)
IdentityVersionsTest runs the `IdentityTest` for each identity version, with an unsigned identity.
func MustPregeneratedIdentity ¶
func MustPregeneratedIdentity(index int, version storj.IDVersion) *identity.FullIdentity
MustPregeneratedIdentity returns a pregenerated identity or panics
func MustPregeneratedSignedIdentity ¶
func MustPregeneratedSignedIdentity(index int, version storj.IDVersion) *identity.FullIdentity
MustPregeneratedSignedIdentity returns a pregenerated identity or panics
func NewPregeneratedSigner ¶
func NewPregeneratedSigner(version storj.IDVersion) *identity.FullCertificateAuthority
NewPregeneratedSigner returns the signer for all pregenerated, signed identities
func NewTestCA ¶
func NewTestCA(ctx context.Context) (*identity.FullCertificateAuthority, error)
NewTestCA returns a ca with a default difficulty and concurrency for use in tests
func NewTestIdentity ¶
func NewTestIdentity(ctx context.Context) (*identity.FullIdentity, error)
NewTestIdentity is a helper function to generate new node identities with correct difficulty and concurrency
func NewTestManageableFullIdentity ¶
func NewTestManageableFullIdentity(ctx context.Context) (*identity.ManageableFullIdentity, error)
NewTestManageableFullIdentity returns a new manageable full identity for use in tests.
func NewTestManageablePeerIdentity ¶
func NewTestManageablePeerIdentity(ctx context.Context) (*identity.ManageablePeerIdentity, error)
NewTestManageablePeerIdentity returns a new manageable peer identity for use in tests.
func PregeneratedIdentity ¶
PregeneratedIdentity returns a pregenerated identity from a list
func PregeneratedSignedIdentity ¶
PregeneratedSignedIdentity returns a signed pregenerated identity from a list
func SignedIdentityVersionsTest ¶
func SignedIdentityVersionsTest(t *testing.T, test IdentityTest)
SignedIdentityVersionsTest runs the `IdentityTest` for each identity version, with an signed identity.
func SignerVersionsTest ¶
func SignerVersionsTest(t *testing.T, test SignerTest)
SignerVersionsTest runs the `SignerTest` for each identity version, with the respective signer used to sign pregenerated, signed identities.
Types ¶
type Identities ¶
type Identities struct {
// contains filtered or unexported fields
}
Identities is a pregenerated full identity table.
func NewIdentities ¶
func NewIdentities(list ...*identity.FullIdentity) *Identities
NewIdentities creates a new table from provided identities.
func NewPregeneratedIdentities ¶
func NewPregeneratedIdentities(version storj.IDVersion) *Identities
NewPregeneratedIdentities retruns a new table from provided identities.
func NewPregeneratedSignedIdentities ¶
func NewPregeneratedSignedIdentities(version storj.IDVersion) *Identities
NewPregeneratedSignedIdentities retruns a new table from provided signed identities.
func (*Identities) Clone ¶
func (identities *Identities) Clone() *Identities
Clone creates a shallow clone of the table.
func (*Identities) NewIdentity ¶
func (identities *Identities) NewIdentity() (*identity.FullIdentity, error)
NewIdentity gets a new identity from the list.
type IdentityTest ¶
IdentityTest is a function that takes a testing struct, an identity version and a full identity.
type SignerTest ¶
SignerTest is a function that takes a testing struct, an identity version and a full certificate authority.
type VersionedCertificateAuthorityMap ¶
type VersionedCertificateAuthorityMap map[storj.IDVersionNumber]*identity.FullCertificateAuthority
VersionedCertificateAuthorityMap maps a `storj.IDVersionNumber` to a set of pregenerated certificate authorities used for signing the corresponding version of signed identities.
type VersionedIdentitiesMap ¶
type VersionedIdentitiesMap map[storj.IDVersionNumber]*Identities
VersionedIdentitiesMap maps a `storj.IDVersionNumber` to a set of pregenerated identities with the corresponding version.