Documentation ¶
Index ¶
Constants ¶
View Source
const ( MIN_FID_POOL_SIZE = 10 OK_FID_POOL_SIZE = 20 )
View Source
const (
DRIVE_FILE_FIELDS = "id,name,mimeType,trashed,permissions,parents,webContentLink,viewedByMeTime,createdTime,modifiedTime,ownedByMe,size"
)
Variables ¶
View Source
var ( //Holds the mandatory fields to get from drive DRIVE_FIELDS = []googleapi.Field{"nextPageToken", googleapi.Field(fmt.Sprintf("files(%s)", DRIVE_FILE_FIELDS))} )
Functions ¶
Types ¶
type FileIDPool ¶
type FileIDPool struct {
// contains filtered or unexported fields
}
This struct holds the FileID pool
func NewFileIDPool ¶
func NewFileIDPool() (pool *FileIDPool, err error)
Generate a new FileIDPool and populate it with OK_FID_POOL_SIZE
func (*FileIDPool) GetFileID ¶
func (fp *FileIDPool) GetFileID() (fid string, err error)
Get a FileID. The pool should have at least an ID available If no ID is available, will hold until Drive generates some IDs and we fill the pool
Click to show internal directories.
Click to hide internal directories.