Documentation
¶
Index ¶
- Constants
- type ChunkReader
- type Service
- func NewDropbox(dropboxConfig *dropbox.Config, youtubeAccessToken string, chunkSize int64, ...) (*Service, error)
- func NewGoogleDrive(driveService *drive.Service, youtubeAccessToken string, chunkSize int64, ...) (*Service, error)
- func NewLocalFile(youtubeAccessToken string, chunkSize int64, stateFilePath string) (*Service, error)
- type State
Constants ¶
View Source
const ( LocationDropbox fileLocation = 0 LocationGoogleDrive fileLocation = 1 LocationLocal fileLocation = 2 )
View Source
const ( StateUploadInProgress uploaderState = 1 StateIdle uploaderState = 2 )
View Source
const ( StatusDone responseStatus = 1 StatusResume responseStatus = 2 StatusFailed responseStatus = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkReader ¶
type ChunkReader struct {
Reader io.Reader
ChunkSize int64
// contains filtered or unexported fields
}
func NewChunkReader ¶
func NewChunkReader(r io.Reader, chunkSize int64) *ChunkReader
type Service ¶
type Service struct {
State uploaderState
Location fileLocation
AccessToken string
UploadURL string
ChunkSize int64
StateFile string
DriveService *drive.Service
DropboxConfig *dropbox.Config
ContentFile string
ContentLength int64
}
func NewDropbox ¶ added in v0.1.34
func NewGoogleDrive ¶
func NewLocalFile ¶
func (*Service) Initialise ¶
Click to show internal directories.
Click to hide internal directories.