Documentation ¶
Index ¶
- Variables
- type Config
- type Dao
- type FileInfo
- type FileInsertInfo
- type GDrive
- func (g *GDrive) ExchangeOauthCode(code string) (*oauth2.Token, error)
- func (g *GDrive) GetLoginURL() string
- func (g *GDrive) Init() error
- func (g *GDrive) Start()
- func (g *GDrive) StoreFile(ctx context.Context, fileInsertInfo *FileInsertInfo) error
- func (g *GDrive) TouchFile(ctx context.Context, filePathName string) error
- func (g *GDrive) UploadAll(ctx context.Context) error
- type Memory
- func (m *Memory) Delete(ctx context.Context, filepathName string) error
- func (m *Memory) InsertOrUpdate(ctx context.Context, fileInfo *FileInfo) error
- func (m *Memory) QueryOldest(ctx context.Context, limit int) ([]FileInfo, error)
- func (m *Memory) TotalSize(ctx context.Context) (int64, error)
- func (m *Memory) Touch(ctx context.Context, filepathName string, date time.Time) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFileExist = errors.New("file exist")
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao interface { InsertOrUpdate(ctx context.Context, fileInfo *FileInfo) error Touch(ctx context.Context, filepathName string, date time.Time) error Delete(ctx context.Context, filepathName string) error TotalSize(ctx context.Context) (int64, error) QueryOldest(ctx context.Context, limit int) ([]FileInfo, error) }
type FileInsertInfo ¶
type GDrive ¶
type GDrive struct {
// contains filtered or unexported fields
}
func (*GDrive) ExchangeOauthCode ¶
func (*GDrive) GetLoginURL ¶
func (*GDrive) StoreFile ¶
func (g *GDrive) StoreFile(ctx context.Context, fileInsertInfo *FileInsertInfo) error
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func NewMemoryDao ¶
func NewMemoryDao() *Memory
func (*Memory) InsertOrUpdate ¶
func (*Memory) QueryOldest ¶
Click to show internal directories.
Click to hide internal directories.