code: func CIService(c context.Context) (*ui.CIService, error) {
  	bucketSettings := common.GetSettings(c).GetBuildbucket()
  	host := bucketSettings.GetHost()
  	if host == "" {
  		return nil, errors.New("buildbucket host is missing in config")
  	}
  	result := &ui.CIService{
  		Name: "LUCI",
  		Host: ui.NewLink(bucketSettings.Name, "https://"+host,
  			fmt.Sprintf("buildbucket settings for %s", bucketSettings.Name)),
  	}
  
  	r, err := getBuilders(c, host)
  	if err != nil {
  		return nil, err
  	}
  
  	result.BuilderGroups = make([]ui.BuilderGroup, len(r.Buckets))
  	for i, bucket := range r.Buckets {
  		// TODO(nodir): instead of assuming luci.<project>. bucket prefix,
  		// expect project explicitly in bucket struct.
  		if !strings.HasPrefix(bucket.Name, "luci.") {
  			continue
  		}
  		// buildbucket guarantees that buckets that start with "luci.",
  		// start with "luci.<project id>." prefix.
  		project := strings.Split(bucket.Name, ".")[1]
  		group := ui.BuilderGroup{Name: bucket.Name}
  		group.Builders = make([]ui.Link, len(bucket.Builders))
  		for j, builder := range bucket.Builders {
  			group.Builders[j] = *ui.NewLink(
  				builder.Name, fmt.Sprintf("/p/%s/builders/%s/%s", project, bucket.Name, builder.Name),
  				fmt.Sprintf("buildbucket builder %s in bucket %s", builder.Name, bucket.Name))
  		}
  		result.BuilderGroups[i] = group
  	}
  
  	return result, nil
  }
docs: // CIService returns a *ui.CIService containing all known buckets and builders.