Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedModuleInfo ¶
type CachedModuleInfo struct { VersionPhrase ModuleVersionPhrase `json:"Version"` Timestamp time.Time `json:"Time"` }
CachedModuleInfo is the information currently advertised for a module.
func (CachedModuleInfo) DumpFields ¶
func (cmi CachedModuleInfo) DumpFields()
DumpFields prints the current values of the fields.
func (CachedModuleInfo) String ¶
func (cmi CachedModuleInfo) String() string
String returns a descriptive string.
type Git ¶
type Git struct { }
Git provides a VCS implementation for Git.
func (*Git) GetHeadCommit ¶
GetHeadCommit returns the current revision of the package/module.
type ModuleVersion ¶
type ModuleVersion struct { // Version is the currently advertised module version. Version string // Timestamp is the currently advertised committer timestamp. Timestamp time.Time // RevisionPrefix is the currently advertised revision (just a prefix of the // revision, actually). RevisionPrefix string }
ModuleVersion describes the components of the reported version.
func NewModuleVersionFromRaw ¶
func NewModuleVersionFromRaw(versionPhrase ModuleVersionPhrase) (mv ModuleVersion, err error)
NewModuleVersionFromRaw returns a ModuleVersion instance from the raw phrase.
func (ModuleVersion) DumpFields ¶
func (mv ModuleVersion) DumpFields()
DumpFields prints the current values of the fields.
func (ModuleVersion) InnerString ¶
func (mv ModuleVersion) InnerString() string
InnerString returns a string that can be embedded in another.
func (ModuleVersion) String ¶
func (mv ModuleVersion) String() string
String returns a complete string for printing.
type ModuleVersionPhrase ¶
type ModuleVersionPhrase string
ModuleVersionPhrase is a string that knows how to parse itself into components.
func (ModuleVersionPhrase) Parse ¶
func (mvp ModuleVersionPhrase) Parse() (mv ModuleVersion, err error)
Parse parses the raw module-version string and returns a ModuleVersion.
type ProxyClient ¶
type ProxyClient struct {
// contains filtered or unexported fields
}
ProxyClient knows how to hit the globalpublic Go Proxy endpoint.
func NewProxyClient ¶
func NewProxyClient(url string) *ProxyClient
NewProxyClient returns a new ProxyClient struct.
func (*ProxyClient) FetchModuleInfo ¶
func (pc *ProxyClient) FetchModuleInfo(packageName string) (cmi CachedModuleInfo, err error)
FetchModuleInfo returns the current published version of the module.
type Vcs ¶
type Vcs interface { // Name returns the name of the VCS method. Must be in the family of names // returned by go-git (though it will be compared case-insensitively). Name() string // GetHeadCommit returns the current revision of the packaging/module. GetHeadCommit(packagePath string) (revision string, timestamp time.Time, err error) }
Vcs describes an interface that knows how to reads version-control from a package.
Directories ¶
Path | Synopsis |
---|---|
command
|
|
go-wait-for-index
Package main looks up the given repository's branch's HEAD revision and then queries the default global Go Proxy for that module in a loop until it reports the latest revision.
|
Package main looks up the given repository's branch's HEAD revision and then queries the default global Go Proxy for that module in a loop until it reports the latest revision. |