code: func GetResource(tx ReadTx, id string) *api.Resource {
  	r := tx.get(tableResource, id)
  	if r == nil {
  		return nil
  	}
  	return r.(resourceEntry).Resource
  }
docs: // GetResource looks up a resource object by ID.
  // Returns nil if the object doesn't exist.