lockjson

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: MIT Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LockJSON

type LockJSON struct {
	Version            int64       `json:"version"`
	TrxID              int64       `json:"trx_id"`
	CurrentProfileName string      `json:"current_profile_name"`
	Repos              ReposList   `json:"repos"`
	Profiles           ProfileList `json:"profiles"`
}

func InitialLockJSON

func InitialLockJSON() *LockJSON

func Read

func Read() (*LockJSON, error)

func ReadNoMigrationMsg added in v0.1.2

func ReadNoMigrationMsg() (*LockJSON, error)

func (*LockJSON) GetReposListByProfile

func (lockJSON *LockJSON) GetReposListByProfile(profile *Profile) (ReposList, error)

func (*LockJSON) Write

func (lockJSON *LockJSON) Write() error

type Profile

type Profile struct {
	Name      string        `json:"name"`
	ReposPath profReposPath `json:"repos_path"`
	UseVimrc  bool          `json:"use_vimrc"`
	UseGvimrc bool          `json:"use_gvimrc"`
}

type ProfileList

type ProfileList []Profile

func (*ProfileList) FindByName

func (profs *ProfileList) FindByName(name string) (*Profile, error)

func (*ProfileList) FindIndexByName

func (profs *ProfileList) FindIndexByName(name string) int

func (*ProfileList) RemoveAllReposPath

func (profs *ProfileList) RemoveAllReposPath(reposPath string) error

type Repos

type Repos struct {
	Type    ReposType `json:"type"`
	TrxID   int64     `json:"trx_id"`
	Path    string    `json:"path"`
	Version string    `json:"version"`
}

type ReposList

type ReposList []Repos

func (*ReposList) Contains

func (reposList *ReposList) Contains(reposPath string) bool

func (*ReposList) FindByPath

func (reposList *ReposList) FindByPath(reposPath string) (*Repos, error)

func (*ReposList) RemoveAllByPath

func (reposList *ReposList) RemoveAllByPath(reposPath string) error

type ReposType

type ReposType string
const (
	ReposGitType    ReposType = "git"
	ReposStaticType ReposType = "static"
)

Jump to

Keyboard shortcuts

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