buffer

package
v0.0.0-...-ac3141b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make

func Make(size int64) (*os.File, buffer.BufferAt, error)

Creates a new buffer temporary file

Types

type HTTP

type HTTP struct {
	// Exported Fields
	Response *http.Response // HTTP Response Object containing the HTTP Stream
	// contains filtered or unexported fields
}

HTTP Buffer

func HTTPBuffer

func HTTPBuffer(rsp *http.Response) *HTTP

Construct a new HTTP Buffer for a HTTP Response

func (*HTTP) Buffer

func (h *HTTP) Buffer() error

Buffer the http Response into a temporary file for reading

func (*HTTP) Close

func (h *HTTP) Close() error

Closes and removes the temporary buffer file

func (*HTTP) Read

func (h *HTTP) Read(b []byte) (int, error)

Read from the buffer

type Spotify

type Spotify struct {
	// contains filtered or unexported fields
}

Spotify buffer

func SpotifyBuffer

func SpotifyBuffer(session *spotify.Session) *Spotify

func (*Spotify) Buffer

func (s *Spotify) Buffer(track *spotify.Track) error

func (*Spotify) Close

func (s *Spotify) Close() error

func (*Spotify) Read

func (s *Spotify) Read(b []byte) (int, error)

Read from the buffer

func (*Spotify) WriteAudio

func (s *Spotify) WriteAudio(f spotify.AudioFormat, raw []byte) int

Writes audio to buffer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL