Documentation
¶
Index ¶
- Constants
- Variables
- func Service(debug bool)
- type ComposedStorageProvider
- type Content
- type Destination
- type GftProvider
- type GftpDestination
- type GftpDriver
- type GftpSource
- type IDestination
- type InputStorage
- type InputStorageProvider
- type OutputStorageProvider
- type PubLink
- type Source
- type StorageProvider
Constants ¶
View Source
const ( BufferSize = 40960 DownloadBytesLimitDefault = 1 * 1024 * 1024 )
Variables ¶
View Source
var (
CommandStatus = []string{"ok", "error"}
)
Functions ¶
Types ¶
type ComposedStorageProvider ¶
type ComposedStorageProvider struct {
StorageProvider StorageProvider
}
func NewComposedStorageProvider ¶
func NewComposedStorageProvider(InputStorageProvider InputStorageProvider, OutputStorageProvider OutputStorageProvider) *ComposedStorageProvider
type Content ¶
func ContentFrom ¶
func ContentFrom(length int, r io.ReadCloser) *Content
type Destination ¶
type Destination struct {
Destination IDestination
}
func (*Destination) DownloadBytes ¶
func (*Destination) DownloadFile ¶
func (d *Destination) DownloadFile(ctx context.Context, destPath string)
type GftProvider ¶
type GftProvider struct { StorageProvider // contains filtered or unexported fields }
func NewGftProvider ¶
func NewGftProvider(_tmpDir string, process process) *GftProvider
func (*GftProvider) Start ¶
func (g *GftProvider) Start() error
func (*GftProvider) Stop ¶
func (g *GftProvider) Stop()
func (*GftProvider) UploadFile ¶
func (g *GftProvider) UploadFile(filePath string) (Source, error)
func (*GftProvider) UploadStream ¶
func (g *GftProvider) UploadStream(length int, stream []byte) Source
type GftpDestination ¶
type GftpDestination struct { Destination // contains filtered or unexported fields }
func (*GftpDestination) DownloadFile ¶
func (g *GftpDestination) DownloadFile(ctx context.Context, dest string)
func (*GftpDestination) DownloadStream ¶
func (g *GftpDestination) DownloadStream() (*Content, error)
func (*GftpDestination) UploadUrl ¶
func (g *GftpDestination) UploadUrl() string
type GftpDriver ¶
type GftpDriver interface { }
func NewProcess ¶
func NewProcess(debug bool, client jsonrpc.RPCClient) GftpDriver
type GftpSource ¶
type GftpSource struct {
// contains filtered or unexported fields
}
func (*GftpSource) ContentLength ¶
func (g *GftpSource) ContentLength() int
func (*GftpSource) DownloadUrl ¶
func (g *GftpSource) DownloadUrl() string
type IDestination ¶
type InputStorage ¶
type InputStorage struct {
InputStorageProvider
}
func (*InputStorage) UploadBytes ¶
func (i *InputStorage) UploadBytes(data []byte) (Source, error)
func (*InputStorage) UploadFile ¶
func (i *InputStorage) UploadFile(filePath string) (Source, error)
type InputStorageProvider ¶
type OutputStorageProvider ¶
type OutputStorageProvider interface {
NewDestination(destFile string) IDestination
}
type StorageProvider ¶
type StorageProvider interface { InputStorageProvider OutputStorageProvider }
Click to show internal directories.
Click to hide internal directories.