changeset

package
v0.0.0-...-6843a2d Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package changeset handles operations on the text of a changeset.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidHeader is when the changeset header is invalid.
	ErrInvalidHeader = errors.New("invalid changeset header")
)

Functions

This section is empty.

Types

type Record

type Record struct {
	ID            string
	Author        string
	Filename      string
	DateExecuted  time.Time
	OrderExecuted int
	Checksum      string
	Description   string
	Tag           string
	Version       string
	// contains filtered or unexported fields
}

Record is a changeset.

func (*Record) AddChange

func (cs *Record) AddChange(line string)

AddChange will add a change command.

func (*Record) AddDescription

func (cs *Record) AddDescription(line string)

AddDescription will add a description.

func (*Record) AddRollback

func (cs *Record) AddRollback(line string)

AddRollback will add a rollback command.

func (*Record) Changes

func (cs *Record) Changes() string

Changes will return all the changes.

func (*Record) GenerateChecksum

func (cs *Record) GenerateChecksum() string

GenerateChecksum returns an MD5 checksum for the changeset.

func (*Record) ParseHeader

func (cs *Record) ParseHeader(line string) error

ParseHeader will parse the header information.

func (*Record) Rollbacks

func (cs *Record) Rollbacks() string

Rollbacks will return all the rollbacks.

func (*Record) SetFileInfo

func (cs *Record) SetFileInfo(filename string, version string)

SetFileInfo will set the file information.

func (*Record) String

func (cs *Record) String() string

String returns a display of the changeset.

Jump to

Keyboard shortcuts

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