func Resource2API(res resource.Resource) Resource {
	return Resource{
		Name:        res.Name,
		Type:        res.Type.String(),
		Path:        res.Path,
		Description: res.Description,
		Revision:    res.Revision,
		Fingerprint: res.Fingerprint.Bytes(),
		Size:        res.Size,
	}
}
// Resource2API converts a charm resource into an API Resource struct.
Resource2API converts a charm resource into an API Resource struct.
// Resource2API converts a charm resource into an API Resource struct .
func Resource2API(res resource.Resource) Resource {
	return Resource{
		Name:        res.Name,
		Type:        res.Type.String(),
		Path:        res.Path,
		Description: res.Description,
		Revision:    res.Revision,
		Fingerprint: res.Fingerprint.Bytes(),
		Size:        res.Size,
	}
}
func Resource2API ( res resource . Resource ) Resource { return Resource { Name : res . Name , Type : res . Type . String ( ) , Path : res . Path , Description : res . Description , Revision : res . Revision , Fingerprint : res . Fingerprint . Bytes ( ) , Size : res . Size , } }
Resource2API converts a charm resource into an API Resource struct.
Resource2API converts a charm resource into an API Resource struct .