parent
41876dd669
commit
78db3dba0e
1 changed files with 16 additions and 0 deletions
|
@ -1289,6 +1289,21 @@ func (f *Fs) About(ctx context.Context) (*fs.Usage, error) {
|
||||||
return usage, nil
|
return usage, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UserInfo fetches info about the current user
|
||||||
|
func (f *Fs) UserInfo(ctx context.Context) (userInfo map[string]string, err error) {
|
||||||
|
cust, err := getCustomerInfo(ctx, f.apiSrv)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return map[string]string{
|
||||||
|
"Username": cust.Username,
|
||||||
|
"Email": cust.Email,
|
||||||
|
"Name": cust.Name,
|
||||||
|
"AccountType": cust.AccountType,
|
||||||
|
"SubscriptionType": cust.SubscriptionType,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
// CleanUp empties the trash
|
// CleanUp empties the trash
|
||||||
func (f *Fs) CleanUp(ctx context.Context) error {
|
func (f *Fs) CleanUp(ctx context.Context) error {
|
||||||
opts := rest.Opts{
|
opts := rest.Opts{
|
||||||
|
@ -1694,6 +1709,7 @@ var (
|
||||||
_ fs.ListRer = (*Fs)(nil)
|
_ fs.ListRer = (*Fs)(nil)
|
||||||
_ fs.PublicLinker = (*Fs)(nil)
|
_ fs.PublicLinker = (*Fs)(nil)
|
||||||
_ fs.Abouter = (*Fs)(nil)
|
_ fs.Abouter = (*Fs)(nil)
|
||||||
|
_ fs.UserInfoer = (*Fs)(nil)
|
||||||
_ fs.CleanUpper = (*Fs)(nil)
|
_ fs.CleanUpper = (*Fs)(nil)
|
||||||
_ fs.Object = (*Object)(nil)
|
_ fs.Object = (*Object)(nil)
|
||||||
_ fs.MimeTyper = (*Object)(nil)
|
_ fs.MimeTyper = (*Object)(nil)
|
||||||
|
|
Loading…
Add table
Reference in a new issue