lockjson

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2018 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 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"`
}

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 pathutil.ReposPath) error

type Repos

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

type ReposList

type ReposList []Repos

func (*ReposList) Contains

func (reposList *ReposList) Contains(reposPath pathutil.ReposPath) bool

func (*ReposList) FindByPath

func (reposList *ReposList) FindByPath(reposPath pathutil.ReposPath) (*Repos, error)

func (*ReposList) RemoveAllByPath

func (reposList *ReposList) RemoveAllByPath(reposPath pathutil.ReposPath) error

type ReposType

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

Jump to

Keyboard shortcuts

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