revision

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Direction

type Direction int64
const (
	Up Direction = iota
	Down
)

func (*Direction) Scan

func (d *Direction) Scan(src interface{}) error

func (Direction) String

func (d Direction) String() string

type Revision

type Revision struct {
	ID        int64
	Author    string
	Message   string
	Hash      [sha256.Size]byte
	Direction Direction
	Up        sql.NullString
	Down      sql.NullString
	Forced    bool
	CreatedAt *time.Time

	MessagePath string
	UpPath      string
	DownPath    string
}

func Add

func Add(msg, name, email string) (*Revision, error)

func Find

func Find(id string) (*Revision, error)

func Latest

func Latest() ([]*Revision, error)

func Oldest

func Oldest() ([]*Revision, error)

func (*Revision) GenHash

func (r *Revision) GenHash() error

func (*Revision) Query

func (r *Revision) Query() string

func (Revision) SplitMessage

func (r Revision) SplitMessage() (string, string)

Split the subject of the message from the body, and return them as two separate values.

Jump to

Keyboard shortcuts

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