Documentation ¶
Index ¶
- func GetPinnedRev(dep *config.VersionFileConfig, contents string) (string, error)
- func GetPinnedRevs(ctx context.Context, deps []*config.VersionFileConfig, getFile GetFileFunc) (map[string]string, error)
- func SetPinnedRev(dep *config.VersionFileConfig, newRev *revision.Revision, oldContents string) (string, error)
- func UpdateDep(ctx context.Context, primaryDep *config.DependencyConfig, ...) (map[string]string, error)
- type GetFileFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPinnedRev ¶
func GetPinnedRev(dep *config.VersionFileConfig, contents string) (string, error)
GetPinnedRev reads the given file contents to find the pinned revision.
func GetPinnedRevs ¶
func GetPinnedRevs(ctx context.Context, deps []*config.VersionFileConfig, getFile GetFileFunc) (map[string]string, error)
GetPinnedRevs reads files using the given GetFileFunc to retrieve the given pinned revisions. File retrievals are cached for efficiency.
func SetPinnedRev ¶
func SetPinnedRev(dep *config.VersionFileConfig, newRev *revision.Revision, oldContents string) (string, error)
SetPinnedRev updates the given dependency pin in the given file, returning the new contents.
func UpdateDep ¶
func UpdateDep(ctx context.Context, primaryDep *config.DependencyConfig, rev *revision.Revision, getFile GetFileFunc) (map[string]string, error)
UpdateDep updates the given dependency to the given revision, also updating any transitive dependencies to the revisions specified in the new revision of the primary dependency. Returns a map whose keys are file names to update and values are their updated contents.
Types ¶
Click to show internal directories.
Click to hide internal directories.