Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitStoreSpecification ¶
SplitStoreSpecification splits a store specification string as supplied in the command line arguments into a type and address.
Types ¶
type LegacySource ¶
type LegacySource struct {
// contains filtered or unexported fields
}
A LegacySource is a Source from a legacy mgo store.
func NewLegacySource ¶
func NewLegacySource(db *mgo.Database) *LegacySource
NewLegacySource creates a LegacySource from the given database.
func (*LegacySource) Identity ¶
func (s *LegacySource) Identity() *store.Identity
Identity implements Source.Identity.
type Source ¶
type Source interface {
// Next fetches the next identity from the source. Next returns
// true if the identity was successfully fetched. If there are no
// more identities, or an error occurs then false is returned,
// the Err method can be used to determine which.
Next() bool
// Identity returns the current identity for the source. The
// pointer is only valid unti Next is called again.
Identity() *store.Identity
// Err returns any error received whilst getting identities.
Err() error
}
A Source is the interface that Copy uses to collect migrated identitites from.
type StoreSource ¶
type StoreSource struct {
// contains filtered or unexported fields
}
A StoreSource is a Source that wraps a store.Store.
func NewStoreSource ¶
func NewStoreSource(ctx context.Context, st store.Store) *StoreSource
NewStoreSource creates a new StoreSource that use the given store for its source of identities.
func (*StoreSource) Identity ¶
func (s *StoreSource) Identity() *store.Identity
Identity implements Source.Identity.
Click to show internal directories.
Click to hide internal directories.