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"` CurrentProfileName string `json:"current_profile_name"` Repos ReposList `json:"repos"` Profiles ProfileList `json:"profiles"` }
LockJSON is marshallable content of lock.json
func ReadNoMigrationMsg ¶ added in v0.1.2
ReadNoMigrationMsg is same as Read, but no migration message is printed.
func (*LockJSON) GetCurrentReposList ¶ added in v0.3.3
GetCurrentReposList returns current profile's repositories.
func (*LockJSON) GetReposListByProfile ¶
GetReposListByProfile collects each repository of given profile and returns it.
type Profile ¶
type Profile struct { Name string `json:"name"` ReposPath profReposPath `json:"repos_path"` }
Profile is a element of LockJSON.Profiles
type ProfileList ¶
type ProfileList []Profile
ProfileList = []Profile
func (ProfileList) FindByName ¶
func (plist ProfileList) FindByName(name string) (*Profile, error)
FindByName finds name from all profiles and returns it. Non-nil pointer is returned if found. nil pointer is returned if not found.
func (ProfileList) FindIndexByName ¶
func (plist ProfileList) FindIndexByName(name string) int
FindIndexByName same as FindByName but returns index. idx >= 0 is returned if found. idx == -1 is returned if not found.
func (ProfileList) RemoveAllReposPath ¶
func (plist ProfileList) RemoveAllReposPath(reposPath pathutil.ReposPath) error
RemoveAllReposPath removes all reposPath from all profiles' repos path list.
type Repos ¶
type Repos struct { Type ReposType `json:"type"` Path pathutil.ReposPath `json:"path"` Version string `json:"version"` }
Repos is a element of LockJSON.Repos