migrations

package
v1.2.6-develop.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateDidDoc

func MigrateDidDoc(oldDid *didtypesv1.Did) didtypes.DidDoc

func MigrateDidIndyStyle

func MigrateDidIndyStyle(sctx sdk.Context, mctx MigrationContext) error

This migration should be run after protobuf that's why we use new DidDocWithMetadata

func MigrateDidProtobuf

func MigrateDidProtobuf(sctx sdk.Context, mctx MigrationContext) error

func MigrateDidSimple

func MigrateDidSimple(sctx sdk.Context, mctx MigrationContext, apply func(didDocWithMetadata *didtypes.DidDocWithMetadata)) error

func MigrateDidUUID

func MigrateDidUUID(sctx sdk.Context, mctx MigrationContext) error

This migration should be run after protobuf that's why we use new DidDocWithMetadata

func MigrateDidVersionID added in v1.1.0

func MigrateDidVersionID(sctx sdk.Context, mctx MigrationContext) error

This migration should be run after protobuf that's why we use new DidDocWithMetadata

func MigrateMetadata

func MigrateMetadata(metadata *didtypesv1.Metadata) didtypes.Metadata

func MigrateResourceChecksum

func MigrateResourceChecksum(sctx sdk.Context, mctx MigrationContext) error

Migration because we need to fix the algo for checksum calculation

func MigrateResourceDefaultAlternativeURL added in v1.1.0

func MigrateResourceDefaultAlternativeURL(sctx sdk.Context, mctx MigrationContext) error

func MigrateResourceIndyStyle

func MigrateResourceIndyStyle(sctx sdk.Context, mctx MigrationContext) error

func MigrateResourceProtobuf

func MigrateResourceProtobuf(sctx sdk.Context, mctx MigrationContext) error

func MigrateResourceSimple

func MigrateResourceSimple(sctx sdk.Context, mctx MigrationContext, apply func(resourceWithMetadata *resourcetypes.ResourceWithMetadata)) error

func MigrateResourceUUID

func MigrateResourceUUID(sctx sdk.Context, mctx MigrationContext) error
func MigrateResourceVersionLinks(sctx sdk.Context, mctx MigrationContext) error

func MigrateStateValue

func MigrateStateValue(sctx sdk.Context, mctx MigrationContext, stateValue *didtypesv1.StateValue) (didtypes.DidDocWithMetadata, error)

func MigrateType

func MigrateType(t string) string

func MigrateVerificationMaterial

func MigrateVerificationMaterial(vm *didtypesv1.VerificationMethod) string

func NewLegacyProtoCodec

func NewLegacyProtoCodec() *codec.ProtoCodec

func ResourceV1HeaderkeyToDataKey

func ResourceV1HeaderkeyToDataKey(headerKey []byte) []byte

Types

type Migration

type Migration func(sctx sdk.Context, mctx MigrationContext) error

type MigrationContext

type MigrationContext struct {
	// contains filtered or unexported fields
}

func NewMigrationContext

func NewMigrationContext(
	codec codec.Codec,
	didStoreKey *storetypes.KVStoreKey,
	didSubspace didtypes.ParamSubspace,
	resourceStoreKey *storetypes.KVStoreKey,
	resourceSubspace resourcetypes.ParamSubspace,
) MigrationContext

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

func NewMigrator

func NewMigrator(
	context MigrationContext,
	migrations []Migration,
) Migrator

func (*Migrator) Migrate

func (m *Migrator) Migrate(ctx sdk.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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