streaming

package
v2.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileEnd

func FileEnd() *isp.Message

func IsEndOfFile

func IsEndOfFile(msg *isp.Message) bool

func WriteFile

func WriteFile(stream DuplexMessageStream, path string, bf BeginFile) error

Types

type BeginFile

type BeginFile struct {
	FileName      string
	FormDataName  string
	ContentType   string
	ContentLength int64
	FormData      FormData
}

func ReadFile

func ReadFile(stream DuplexMessageStream, fileFactory func(bf BeginFile) (io.WriteCloser, error), sendResponse bool) (*BeginFile, error)

func (*BeginFile) FromMessage

func (bf *BeginFile) FromMessage(msg *isp.Message) error

func (BeginFile) ToMessage

func (bf BeginFile) ToMessage() *isp.Message

type DuplexMessageStream

type DuplexMessageStream interface {
	Send(*isp.Message) error
	Recv() (*isp.Message, error)
}

type FileFactory

type FileFactory func(bf BeginFile) (*os.File, error)

type FormData

type FormData map[string]interface{}

func (FormData) GetIntValue

func (fd FormData) GetIntValue(field string) (int64, error)

func (FormData) GetStringValue

func (fd FormData) GetStringValue(field string) (string, error)

type StreamConsumer

type StreamConsumer func(stream DuplexMessageStream, md metadata.MD) error

Jump to

Keyboard shortcuts

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