migration

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Strategies = map[string]Strategy{
	"replace": StrategyReplace,
	"add":     StrategyAdd,
	"folder":  StrategyFolder,
}

Functions

func DoMigrate

func DoMigrate(object ocfl.Object, mig *Function, ext string, targetNames []string, file io.ReadCloser) error

Types

type Function

type Function struct {
	Strategy Strategy
	// contains filtered or unexported fields
}

func (*Function) GetDestinationName

func (f *Function) GetDestinationName(src string, head string, isMigrated bool) string

func (*Function) GetID

func (f *Function) GetID() string

func (*Function) Migrate

func (f *Function) Migrate(source string, dest string) error

type Migration

type Migration struct {
	Functions map[string]*Function
	//Sources   map[string]string
	SourceFS fs.FS
}

func GetMigrations

func GetMigrations(conf *config.GOCFLConfig) (*Migration, error)

func (*Migration) GetFunctionByName

func (m *Migration) GetFunctionByName(name string) (*Function, error)

func (*Migration) GetFunctionByPronom

func (m *Migration) GetFunctionByPronom(pronom string) (*Function, error)

func (*Migration) SetSourceFS

func (m *Migration) SetSourceFS(fs fs.FS)

type Strategy

type Strategy string
const (
	StrategyReplace Strategy = "replace"
	StrategyAdd     Strategy = "add"
	StrategyFolder  Strategy = "folder"
)

Jump to

Keyboard shortcuts

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