qri: github.com/qri-io/qri/rev Index | Files

package rev

import "github.com/qri-io/qri/rev"

Package rev defines structure and syntax for specifying revisions of a dataset history. Much of this is inspired by git revisions: https://git-scm.com/docs/gitrevisions

Unlike git, Qri is aware of the underlying data model it's selecting against, so revisions can have conventional names for specifying fields of a dataset

Index

Package Files

rev.go

Constants

const AllGenerations = -1

AllGenerations represents all the generations of a dataset's history

type Rev Uses

type Rev struct {
    // field scopt, currently can only be a component name, or the entire dataset
    Field string
    // the nth-generational ancestor of a history
    Gen int
}

Rev names a field of a dataset at a snapshot

func NewAllRevisions Uses

func NewAllRevisions() Rev

NewAllRevisions returns a Rev struct that represents all revisions.

func ParseRev Uses

func ParseRev(rev string) (*Rev, error)

ParseRev turns a string into a revision

func ParseRevs Uses

func ParseRevs(str string) (revs []*Rev, err error)

ParseRevs turns a comma-separated list of revisions into a slice of revisions

Package rev imports 3 packages (graph) and is imported by 5 packages. Updated 2019-04-25. Refresh now. Tools for package owners.