package template import ( "context" "net/http" "github.com/alist-org/alist/v3/internal/driver" "github.com/alist-org/alist/v3/internal/errs" "github.com/alist-org/alist/v3/internal/model" log "github.com/sirupsen/logrus" ) type ILanZou struct { model.Storage Addition } func (d *ILanZou) Config() driver.Config { return config } func (d *ILanZou) GetAddition() driver.Additional { return &d.Addition } func (d *ILanZou) Init(ctx context.Context) error { res, err := d.proved("/user/info/map", http.MethodGet, nil) if err != nil { return err } log.Debugf("[ilanzou] init response: %s", res) return nil } func (d *ILanZou) Drop(ctx context.Context) error { return nil } func (d *ILanZou) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error) { } func (d *ILanZou) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error) { // TODO return link of file, required return nil, errs.NotImplement } func (d *ILanZou) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error) { // TODO create folder, optional return nil, errs.NotImplement } func (d *ILanZou) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) { // TODO move obj, optional return nil, errs.NotImplement } func (d *ILanZou) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error) { // TODO rename obj, optional return nil, errs.NotImplement } func (d *ILanZou) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) { // TODO copy obj, optional return nil, errs.NotImplement } func (d *ILanZou) Remove(ctx context.Context, obj model.Obj) error { // TODO remove obj, optional return errs.NotImplement } func (d *ILanZou) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) (model.Obj, error) { // TODO upload file, optional return nil, errs.NotImplement } //func (d *ILanZou) Other(ctx context.Context, args model.OtherArgs) (interface{}, error) { // return nil, errs.NotSupport //} var _ driver.Driver = (*ILanZou)(nil)