Commit b6cccb45 authored by vaikas-google's avatar vaikas-google

Address code review comments

parent 2f82ab49
...@@ -20,6 +20,7 @@ import ( ...@@ -20,6 +20,7 @@ import (
"log" "log"
) )
// GithubRegistry implements the Registry interface that talks to github.
type GithubRegistry struct { type GithubRegistry struct {
owner string owner string
repository string repository string
...@@ -57,7 +58,7 @@ func (g *GithubRegistry) List() ([]Type, error) { ...@@ -57,7 +58,7 @@ func (g *GithubRegistry) List() ([]Type, error) {
return retTypes, nil return retTypes, nil
} }
// Get the URL for a given type // GetURL fetches the download URL for a given Type.
func (g *GithubRegistry) GetURL(t Type) (string, error) { func (g *GithubRegistry) GetURL(t Type) (string, error) {
_, dc, _, err := g.client.Repositories.GetContents(g.owner, g.repository, TypesDir+"/"+t.Name+"/"+t.Version, nil) _, dc, _, err := g.client.Repositories.GetContents(g.owner, g.repository, TypesDir+"/"+t.Name+"/"+t.Version, nil)
if err != nil { if err != nil {
......
...@@ -17,7 +17,7 @@ package registry ...@@ -17,7 +17,7 @@ package registry
// used in a Deployment Manager configurations. A registry root must have // used in a Deployment Manager configurations. A registry root must have
// a 'types' directory which contains all the available types. Each type // a 'types' directory which contains all the available types. Each type
// then contains version directories which in turn contains all the files // then contains version directories which in turn contains all the files
// necessary for that type. // necessary for that version of the type.
// For example a type registry holding two types: // For example a type registry holding two types:
// redis v1 (implemented in jinja) // redis v1 (implemented in jinja)
// replicatedservice v2 (implemented in python) // replicatedservice v2 (implemented in python)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment