changelog

package
v3.14.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 3

Documentation

Overview

As the loading process for change log

Index

Constants

View Source
const ESCAPED_DELIMITER = "!DBPATCH!ESCAPED_DELIMITER!"

Variables

This section is empty.

Functions

func ExecutePatches

func ExecutePatches(changeLogConfig *ChangeLogConfig) (err error)

Executes the patches in change log

Types

type ChangeLogConfig

type ChangeLogConfig struct {
	DriverName    string
	Dsn           string
	ChangeLog     string
	PatchFileBase string
	Delimiter     string
}

*

  • The full configuration for running patches

func (*ChangeLogConfig) String

func (changeLogConfig *ChangeLogConfig) String() string

The string representation of ChangeLogConfig

type PatchConfig

type PatchConfig struct {
	// The id of patch
	Id string `yaml:"id"`
	// The file name of patch
	Filename string `yaml:"filename"`
	// The comment of patch
	Comment string `yaml:"comment"`
}

As the patch configuration

func LoadChangeLog

func LoadChangeLog(changeLogOfYaml []byte) (configOfPatches []PatchConfig, err error)

Loads configurations of patches from a string

func LoadChangeLogFromFile

func LoadChangeLogFromFile(changeLogFile string) (configOfPatches []PatchConfig, err error)

Loads configurations of patches from a file name(path) The file would be auto-closed by this method

func LoadChangeLogFromReader

func LoadChangeLogFromReader(readerOfchangeLog io.Reader) (configOfPatches []PatchConfig, err error)

Loads configurations of patches from a reader

Jump to

Keyboard shortcuts

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