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 ¶ added in v0.9.0
func CompleteIdentityVersionsTest(t *testing.T, test IdentityTest)
CompleteIdentityVersionsTest runs the `IdentityTest` for each identity version, with both signed dn unsigned identities.
func IdentityVersionsTest ¶ added in v0.9.0
func IdentityVersionsTest(t *testing.T, test IdentityTest)
IdentityVersionsTest runs the `IdentityTest` for each identity version, with an unsigned identity.
func MustPregeneratedIdentity ¶ added in v0.9.0
func MustPregeneratedIdentity(index int, version storj.IDVersion) *identity.FullIdentity
MustPregeneratedIdentity returns a pregenerated identity or panics
func MustPregeneratedSignedIdentity ¶ added in v0.9.0
func MustPregeneratedSignedIdentity(index int, version storj.IDVersion) *identity.FullIdentity
MustPregeneratedSignedIdentity returns a pregenerated identity or panics
func NewPregeneratedSigner ¶ added in v0.9.0
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 ¶ added in v0.9.0
PregeneratedIdentity returns a pregenerated identity from a list
func PregeneratedSignedIdentity ¶ added in v0.9.0
PregeneratedSignedIdentity returns a signed pregenerated identity from a list
func SignedIdentityVersionsTest ¶ added in v0.9.0
func SignedIdentityVersionsTest(t *testing.T, test IdentityTest)
SignedIdentityVersionsTest runs the `IdentityTest` for each identity version, with an signed identity.
func SignerVersionsTest ¶ added in v0.9.0
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 ¶ added in v0.9.0
type Identities struct {
// contains filtered or unexported fields
}
Identities is a pregenerated full identity table.
func NewIdentities ¶ added in v0.9.0
func NewIdentities(list ...*identity.FullIdentity) *Identities
NewIdentities creates a new table from provided identities.
func NewPregeneratedIdentities ¶ added in v0.9.0
func NewPregeneratedIdentities(version storj.IDVersion) *Identities
NewPregeneratedIdentities retruns a new table from provided identities.
func NewPregeneratedSignedIdentities ¶ added in v0.9.0
func NewPregeneratedSignedIdentities(version storj.IDVersion) *Identities
NewPregeneratedSignedIdentities retruns a new table from provided signed identities.
func (*Identities) Clone ¶ added in v0.9.0
func (identities *Identities) Clone() *Identities
Clone creates a shallow clone of the table.
func (*Identities) NewIdentity ¶ added in v0.9.0
func (identities *Identities) NewIdentity() (*identity.FullIdentity, error)
NewIdentity gets a new identity from the list.
type IdentityTest ¶ added in v0.9.0
IdentityTest is a function that takes a testing struct, an identity version and a full identity.
type SignerTest ¶ added in v0.9.0
SignerTest is a function that takes a testing struct, an identity version and a full certificate authority.
type VersionedCertificateAuthorityMap ¶ added in v0.9.0
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 ¶ added in v0.9.0
type VersionedIdentitiesMap map[storj.IDVersionNumber]*Identities
VersionedIdentitiesMap maps a `storj.IDVersionNumber` to a set of pregenerated identities with the corresponding version.