// getLayerDetails is a utility for getting a file name, size and indication of
// sandbox for a VHD(x) in a folder. A read-only layer will be layer.vhd. A
// read-write layer will be sandbox.vhdx.
2514
func getLayerDetails(folder string) (*layerDetails, error) {
	var fileInfo os.FileInfo
	ld := &layerDetails{
		isSandbox: false,
		filename:  filepath.Join(folder, layerFilename),
	}

	fileInfo, err := os.Stat(ld.filename)
	if err != nil {
		ld.filename = filepath.Join(folder, sandboxFilename)
		if fileInfo, err = os.Stat(ld.filename); err != nil {
			return nil, fmt.Errorf("failed to locate layer or sandbox in %s", folder)
		}
		ld.isSandbox = true
	}
	ld.size = fileInfo.Size()

	return ld, nil
}
305079
func (dh *Client) ImageDetails(id string) (imageDetails *docker.ImageDetails, e error) {
	imageDetails = &docker.ImageDetails{}
	return imageDetails, dh.getJSON(dh.Address+"/images/"+id+"/json", imageDetails)
}
448732
func (u *UpdateCheckRunOptions) GetDetailsURL() string {
	if u == nil || u.DetailsURL == nil {
		return ""
	}
	return *u.DetailsURL
}
1310059
func (_m *ClientInterface) GetAllServiceDetails(since time.Duration) ([]service.ServiceDetails, error) {
	ret := _m.Called(since)

	var r0 []service.ServiceDetails
	if rf, ok := ret.Get(0).(func(time.Duration) []service.ServiceDetails); ok {
		r0 = rf(since)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]service.ServiceDetails)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(time.Duration) error); ok {
		r1 = rf(since)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
844018
func (api *API) ZoneRailgunDetails(zoneID, railgunID string) (ZoneRailgun, error) {
	uri := "/zones/" + zoneID + "/railguns/" + railgunID
	res, err := api.makeRequest("GET", uri, nil)
	if err != nil {
		return ZoneRailgun{}, errors.Wrap(err, errMakeRequestError)
	}
	var r zoneRailgunResponse
	if err := json.Unmarshal(res, &r); err != nil {
		return ZoneRailgun{}, errors.Wrap(err, errUnmarshalError)
	}
	return r.Result, nil
}
1293805
func (f *Facade) GetServiceDetailsByTenantID(ctx datastore.Context, tenantID string) ([]service.ServiceDetails, error) {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("Facade.GetServiceDetailsByTenantID"))
	svcs, err := f.serviceStore.Query(ctx, service.Query{})
	if err != nil {
		return nil, err
	}
	return f.filterDetailsByTenantID(ctx, tenantID, svcs)
}
771427
func (c *configCommand) modelConfigDetails() (map[string]interface{}, error) {

	defaultSchema, err := config.Schema(nil)
	if err != nil {
		return nil, err
	}
	specifics := make(map[string]interface{})
	for key, attr := range defaultSchema {
		if attr.Secret || c.isModelAttribute(key) ||
			attr.Group != environschema.EnvironGroup {
			continue
		}
		specifics[key] = common.PrintConfigSchema{
			Description: attr.Description,
			Type:        fmt.Sprintf("%s", attr.Type),
		}
	}
	return specifics, nil
}
211706
func (c *Client) GetServiceDetails(serviceID string) (*service.ServiceDetails, error) {
	svc := &service.ServiceDetails{}
	err := c.call("GetServiceDetails", serviceID, svc)
	return svc, err
}
1142246
func NewShowcaseDeleteCommentDetails(EventUuid string) *ShowcaseDeleteCommentDetails {
	s := new(ShowcaseDeleteCommentDetails)
	s.EventUuid = EventUuid
	return s
}
1007182
func FormatApplicationDetails(sr resource.ApplicationResources) (FormattedApplicationDetails, error) {
	var formatted FormattedApplicationDetails
	details, err := detailedResources("", sr)
	if err != nil {
		return formatted, errors.Trace(err)
	}
	updates, err := sr.Updates()
	if err != nil {
		return formatted, errors.Trace(err)
	}
	formatted = FormattedApplicationDetails{
		Resources: details,
		Updates:   make([]FormattedCharmResource, len(updates)),
	}
	for i, u := range updates {
		formatted.Updates[i] = FormatCharmResource(u)
	}
	return formatted, nil
}
843154
func (c *ConnectionManager) ApplyAllDetails(f ApplyDetailsFn) {
	c.Lock()
	defer c.Unlock()
	for k, v := range c.lookup {
		status := v.details
		var details *keybase1.ClientDetails
		if status != nil {
			details = &status.Details
		}
		if !f(k, v.transporter, details) {
			break
		}
	}
}
1097539
func (_m *ClientInterface) GetServiceDetailsByTenantID(tenantID string) ([]service.ServiceDetails, error) {
	ret := _m.Called(tenantID)

	var r0 []service.ServiceDetails
	if rf, ok := ret.Get(0).(func(string) []service.ServiceDetails); ok {
		r0 = rf(tenantID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]service.ServiceDetails)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(tenantID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
1051119
func (api *API) UniversalSSLSettingDetails(zoneID string) (UniversalSSLSetting, error) {
	uri := "/zones/" + zoneID + "/ssl/universal/settings"
	res, err := api.makeRequest("GET", uri, nil)
	if err != nil {
		return UniversalSSLSetting{}, errors.Wrap(err, errMakeRequestError)
	}
	var r universalSSLSettingResponse
	if err := json.Unmarshal(res, &r); err != nil {
		return UniversalSSLSetting{}, errors.Wrap(err, errUnmarshalError)
	}
	return r.Result, nil
}
393072
func (r Metric_Tracking_Object) GetDetailsForDateRange(startDate *datatypes.Time, endDate *datatypes.Time, graphType []string) (resp []datatypes.Container_Metric_Tracking_Object_Details, err error) {
	params := []interface{}{
		startDate,
		endDate,
		graphType,
	}
	err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getDetailsForDateRange", params, &r.Options, &resp)
	return
}
763197
func (s *GroupsService) GetGroupDetail(groupID string) (*GroupInfo, *Response, error) {
	u := fmt.Sprintf("groups/%s/detail", groupID)
	return s.getGroupInfoResponse(u)
}
1321992
func createFromDetails(bname, bver, osname, osver string, c []string) string {
	if bver == "" {
		bver = TopVersion(bname)
	}
	comments := strings.Join(c, "; ")
	if comments != "" {
		comments = "; " + comments
	}

	data := TemplateData{bname, bver, osname, osver, comments}
	buff := &bytes.Buffer{}
	t := template.New("formatter")
	t.Parse(Format(bname, bver))
	t.Execute(buff, data)

	return buff.String()
}
165857
func (c *Clair) GetLayer(ctx context.Context, name string, features, vulnerabilities bool) (*Layer, error) {
	url := c.url("/v1/layers/%s?features=%t&vulnerabilities=%t", name, features, vulnerabilities)
	c.Logf("clair.layers.get url=%s name=%s", url, name)

	var respLayer layerEnvelope
	if _, err := c.getJSON(ctx, url, &respLayer); err != nil {
		return nil, err
	}

	if respLayer.Error != nil {
		return nil, fmt.Errorf("clair error: %s", respLayer.Error.Message)
	}

	return respLayer.Layer, nil
}