gitdb

package module
v0.0.0-...-a654797 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	Path string

	JSONPCallbackName string
	// contains filtered or unexported fields
}

func (Collection) MustRead

func (c Collection) MustRead(dest interface{})

func (Collection) MustWrite

func (c Collection) MustWrite(content interface{}, funcs ...interface{})

func (Collection) Read

func (c Collection) Read(dest interface{}) error

func (Collection) Write

func (c Collection) Write(content interface{}, funcs ...interface{}) (err error)

type DB

type DB struct {
	Remote string
	Local  string

	RemoteName string
	BranchName string

	UserName  string
	UserEmail string
	// contains filtered or unexported fields
}

func NewDB

func NewDB(remote, local string) *DB

func (DB) Add

func (db DB) Add(files ...string) error

func (DB) Commit

func (db DB) Commit(message ...string) error

func (DB) ForceUpdate

func (db DB) ForceUpdate() error

func (DB) GetBranchName

func (db DB) GetBranchName() string

func (DB) GetRemoteName

func (db DB) GetRemoteName() string

func (DB) Init

func (db DB) Init() error

func (DB) MustAdd

func (db DB) MustAdd(message ...string)

func (DB) MustCommit

func (db DB) MustCommit(message ...string)

func (DB) MustForceUpdate

func (db DB) MustForceUpdate()

func (DB) MustInit

func (db DB) MustInit()

func (DB) MustPush

func (db DB) MustPush()

func (DB) MustUnpushedCommits

func (db DB) MustUnpushedCommits() []string

func (*DB) NewCollection

func (db *DB) NewCollection(path string) *Collection

func (*DB) NewObject

func (db *DB) NewObject(path string) *Object

func (DB) Push

func (db DB) Push() error

func (*DB) SetBranchName

func (db *DB) SetBranchName(name string)

func (*DB) SetRemoteName

func (db *DB) SetRemoteName(name string)

func (*DB) SetSSHKey

func (db *DB) SetSSHKey(user string, pemBytes []byte, password string) error

func (*DB) SetUser

func (db *DB) SetUser(name, email string)

func (DB) UnpushedCommits

func (db DB) UnpushedCommits() ([]string, error)

type Marshaler

type Marshaler interface {
	GITDBMarshalJSON() []byte
}

type Object

type Object struct {
	Path string

	JSONPCallbackName string
	// contains filtered or unexported fields
}

func (Object) Delete

func (o Object) Delete() error

func (Object) MustDelete

func (o Object) MustDelete()

func (Object) MustRead

func (o Object) MustRead(dest interface{})

func (Object) MustWrite

func (o Object) MustWrite(content interface{})

func (Object) Read

func (o Object) Read(dest interface{}) error

func (Object) Write

func (o Object) Write(content interface{}) (err error)

Jump to

Keyboard shortcuts

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