go.bigb.es/curator

v1.3.5
Doc Versions Source

Functions

f func Info

src
func Info(repoPath string, rv *git.ResolvedVersion, modulePath string) ([]byte, string, error)

Info builds a JSON .info response for the given version.

f func Mod

src
func Mod(repoPath string, rv *git.ResolvedVersion, modulePath string) ([]byte, string, error)

Mod builds a go.mod response. Falls back to a synthetic go.mod if none exists.

f func Zip

src
func Zip(repoPath string, rv *git.ResolvedVersion, modulePath string) ([]byte, string, error)

Zip builds a module zip archive. Works with both bare and non-bare git repos by reading files directly via git commands.

Types

T type Origin

src
type Origin struct {
	VCS  string `json:"VCS,omitempty"`
	URL  string `json:"URL,omitempty"`
	Hash string `json:"Hash,omitempty"`
	Ref  string `json:"Ref,omitempty"`
}

Origin describes the provenance of a module version.

T type RevInfo

src
type RevInfo struct {
	Version string    `json:"Version"`
	Time    time.Time `json:"Time"`
	Origin  *Origin   `json:"Origin,omitempty"`
}

RevInfo is the JSON structure returned by .info and @latest endpoints.

Source Files