// DownloadExecutableBinaryFromURL fetches a plugin binary from the specified
// URL, if it exists.
519458
func (actor Actor) DownloadExecutableBinaryFromURL(pluginURL string, tempPluginDir string, proxyReader plugin.ProxyReader) (string, error) {
	tempFile, err := makeTempFile(tempPluginDir)
	if err != nil {
		return "", err
	}

	err = actor.client.DownloadPlugin(pluginURL, tempFile.Name(), proxyReader)
	if err != nil {
		return "", err
	}

	return tempFile.Name(), nil
}
134736
func (m *ExtUser) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1112855
func (m *EndpointConfigurationSpec) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
226031
func (m *Client) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
635698
func (m *SwaggerFlushInactiveAccessTokens) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1025130
func (p LinkADRAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.ChannelMaskACK {
		b = b ^ (1 << 0)
	}
	if p.DataRateACK {
		b = b ^ (1 << 1)
	}
	if p.PowerACK {
		b = b ^ (1 << 2)
	}
	return []byte{b}, nil
}
1012071
func (m *SwaggerNotReadyStatus) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1296510
func (m *ProxyStatus) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1336130
func (d *Downloader) DownloadBinaries(dir string) (map[string]string, error) {
	if err := os.MkdirAll(dir, 0755); err != nil {
		return nil, fmt.Errorf("error creating bin dir: %s", err)
	}
	paths := make(map[string]string, len(binaries))
	for _, bin := range binaries {
		path, err := d.downloadGzippedFile(bin, dir, true)
		if err != nil {
			return nil, err
		}
		if err := os.Chmod(path, 0755); err != nil {
			return nil, err
		}
		paths[bin] = path
	}
	// symlink flynn to flynn-linux-amd64
	if err := symlink("flynn-linux-amd64", filepath.Join(dir, "flynn")); err != nil {
		return nil, err
	}
	return paths, nil
}
1215080
func (m *SwaggerOAuthTokenResponse) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
261411
func (t *BinaryLoader) Binary(assetFn func(name string) ([]byte, error), namesFn func() []string) {
	if assetFn == nil || namesFn == nil {
		return
	}

	t.AssetFn = assetFn
	t.NamesFn = namesFn
	// if extension is not static(setted by .Directory)
	if t.Extension == "" {
		if names := namesFn(); len(names) > 0 {
			t.Extension = filepath.Ext(names[0]) // we need the extension to get the correct template engine on the Render method
		}
	}
}
978888
func OpenBinary(bs []byte) (file *File, err error) {
	r := bytes.NewReader(bs)
	file, err = OpenReaderAt(r, int64(r.Len()))
	return
}
779193
func (b *bstream) MarshalBinary() ([]byte, error) {
	buf := new(bytes.Buffer)
	err := binary.Write(buf, binary.BigEndian, b.count)
	if err != nil {
		return nil, err
	}
	err = binary.Write(buf, binary.BigEndian, b.stream)
	if err != nil {
		return nil, err
	}
	return buf.Bytes(), nil
}
705625
func (m *StatusResponseControllersItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
846647
func (m *StatusResponseProxy) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
401686
func LoadFatBinary(image string) (Module, error) {
	var mod Module
	cstr := C.CString(image)
	defer C.free(unsafe.Pointer(cstr))
	err := result(C.cuModuleLoadFatBinary(&mod.mod, unsafe.Pointer(cstr)))
	return mod, err
}
904156
func (m *KVstoreConfiguration) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}