otbuiltin

package
v0.0.0-...-61532f3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 License: ISC Imports: 10 Imported by: 6

Documentation

Overview

Package otbuiltin contains all of the basic commands for creating and interacting with an ostree repository

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checkout

func Checkout(repoPath, destination, commit string, opts checkoutOptions) error

Checks out a commit with the given ref from a repository at the location of repo path to to the destination. Returns an error if the checkout could not be processed

func Init

func Init(path string, options initOptions) (bool, error)

Initializes a new ostree repository at the given path. Returns true if the repo exists at the location, regardless of whether it was initialized by the function or if it already existed. Returns an error if the repo could not be initialized

func NewCheckoutOptions

func NewCheckoutOptions() checkoutOptions

Instantiates and returns a checkoutOptions struct with default values set

func NewCommitOptions

func NewCommitOptions() commitOptions

Initializes a commitOptions struct and sets default values

func NewInitOptions

func NewInitOptions() initOptions

Instantiates and returns an initOptions struct with default values set

func NewLogOptions

func NewLogOptions() logOptions

Instantiates and returns a logOptions struct with default values set

func NewPruneOptions

func NewPruneOptions() pruneOptions

Instantiates and returns a pruneOptions struct with default values set

func Prune

func Prune(repoPath string, options pruneOptions) (string, error)

Search for unreachable objects in the repository given by repoPath. Removes the objects unless pruneOptions.NoPrune is specified

Types

type LogEntry

type LogEntry struct {
	Checksum  []byte
	Variant   []byte
	Timestamp time.Time
	Subject   string
	Body      string
}

Struct for the various pieces of data in a log entry

func Log

func Log(repoPath, branch string, options logOptions) ([]LogEntry, error)

Show the logs of a branch starting with a given commit or ref. Returns a slice of log entries on success and an error otherwise

func (LogEntry) String

func (l LogEntry) String() string

Convert the log entry to a string

type OstreeDumpFlags

type OstreeDumpFlags uint
const (
	OSTREE_DUMP_NONE OstreeDumpFlags = 0
	OSTREE_DUMP_RAW  OstreeDumpFlags = 1 << iota
)

type OstreeRepoTransactionStats

type OstreeRepoTransactionStats struct {
	// contains filtered or unexported fields
}

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func OpenRepo

func OpenRepo(path string) (*Repo, error)

Attempts to open the repo at the given path

func (*Repo) AbortTransaction

func (repo *Repo) AbortTransaction() error

func (*Repo) Commit

func (repo *Repo) Commit(commitPath, branch string, opts commitOptions) (string, error)

Commits a directory, specified by commitPath, to an ostree repo as a given branch

func (*Repo) CommitTransaction

func (repo *Repo) CommitTransaction() (*OstreeRepoTransactionStats, error)

func (*Repo) PrepareTransaction

func (repo *Repo) PrepareTransaction() (bool, error)

func (*Repo) RegenerateSummary

func (repo *Repo) RegenerateSummary() error

func (*Repo) TransactionSetRef

func (repo *Repo) TransactionSetRef(remote string, ref string, checksum string)

Jump to

Keyboard shortcuts

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