func GetRouter(options RouterOptions, storageClient *storage.Client) (*mux.Router, error) {
	r := mux.NewRouter()
	if storageClient == nil {
		sc, err := gcs.ClientWithCreds(context.Background(), options.GcsCredentials)
		if err != nil {
			return nil, err
		}
		storageClient = sc
	}
	v1InfixURL, err := url.Parse(v1InfixRef)
	if err != nil {
		return nil, err
	}
	sub1 := r.PathPrefix(v1InfixRef).Subrouter()
	s := v1.Server{
		Client:         gcs.NewClient(storageClient),
		Host:           options.Hostname.ResolveReference(v1InfixURL),
		DefaultBucket:  options.HomeBucket,
		GridPathPrefix: options.GridPathPrefix,
		Timeout:        options.Timeout,
	}
	v1.Route(sub1, s)
	return sub1, nil
}
GetRouter returns an http router that serves TestGrid's API
It also instantiates necessary caching and i/o objects
package api
import (
	"context"
	"net/url"
	"time"
	"github.com/gorilla/mux"
	"cloud.google.com/go/storage"
	v1 "github.com/GoogleCloudPlatform/testgrid/pkg/api/v1"
	"github.com/GoogleCloudPlatform/testgrid/util/gcs"
)
type RouterOptions struct {
	GcsCredentials string
	Hostname       *url.URL
	HomeBucket     string
	GridPathPrefix string
	Timeout        time.Duration
}
const v1InfixRef = "/api/v1"