Coder Social home page Coder Social logo

go-mega's Introduction

go-mega

A client library in go for mega.co.nz storage service.

This fork fixes a BAD_ATTRIBUTE issue related to file name decryption.

An implementation of command-line utility can be found at https://github.com/t3rm1n4l/megacmd

Build Status

What can i do with this library?

This is an API client library for MEGA storage service. Currently, the library supports the basic APIs and operations as follows:

  • User login
  • Fetch filesystem tree
  • Upload file
  • Download file
  • Create directory
  • Move file or directory
  • Rename file or directory
  • Delete file or directory
  • Parallel split download and upload
  • Filesystem events auto sync
  • Unit tests

API methods

Please find full doc at http://godoc.org/github.com/t3rm1n4l/go-mega

Testing

export MEGA_USER=<user_email>
export MEGA_PASSWD=<user_passwd>
$ make test
go test -v
=== RUN TestLogin
--- PASS: TestLogin (1.90 seconds)
=== RUN TestGetUser
--- PASS: TestGetUser (1.65 seconds)
=== RUN TestUploadDownload
--- PASS: TestUploadDownload (12.28 seconds)
=== RUN TestMove
--- PASS: TestMove (9.31 seconds)
=== RUN TestRename
--- PASS: TestRename (9.16 seconds)
=== RUN TestDelete
--- PASS: TestDelete (3.87 seconds)
=== RUN TestCreateDir
--- PASS: TestCreateDir (2.34 seconds)
=== RUN TestConfig
--- PASS: TestConfig (0.01 seconds)
=== RUN TestPathLookup
--- PASS: TestPathLookup (8.54 seconds)
=== RUN TestEventNotify
--- PASS: TestEventNotify (19.65 seconds)
PASS
ok  github.com/t3rm1n4l/go-mega68.745s

TODO

  • Implement APIs for public download url generation
  • Implement download from public url
  • Add shared user content management APIs
  • Add contact list management APIs

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.