Giter VIP home page Giter VIP logo

gh_storage's Introduction

Use Github as your storage

Use the GitHub repository as your storage by leveraging the Github content APIs.

Prerequisites

Usages

The typical CRUD usages.

  • Help

go run main.go -h

  -delete
        delete a file in the repository
  -dst string
        the dest file path in the repository
  -message string
        git commit message
  -retrieve
        retrieve a file or files from github
  -src string
        the file path to be uploaded/retrieved/deleted
  -update
        update a file in the repository
  -upload
        upload a file to github
  • Upload a file

go run main.go -upload -src=./hello.go -dst=/hello.go

  • Retrieve a file raw content

go run main.go -retrieve -dst=/hello.go

You can also download the file by using git.

  • Retrieve file list

go run main.go -retrieve

  • Update a file

go run main.go -update -src=./hello.go -dst=/hello.go

  • Delete a file

go run main.go -delete -dst=/hello.go

Limit

What is my disk quota?

We recommend repositories remain small, ideally less than 1 GB, and less than 5 GB is strongly recommended. Smaller repositories are faster to clone and easier to work with and maintain. Individual files in a repository are strictly limited to a 100 MB maximum size limit. 

Recommendation

It's best used to store small files.

gh_storage's People

Contributors

kisserleon avatar

Watchers

 avatar

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.