Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/Xuanwo/storage

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Xuanwo/storage

  • v1.0.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

storage

Build Status GoDoc Go Report Card codecov License Codacy Badge Join the chat

An application-oriented unified storage layer for Golang.

Goal

  • Production ready
  • High performance
  • Vendor lock free

Features

Servicer Level

  • Basic operations across implemented storage services with the same API
    • List: list all Storager in service
    • Get: get a Storager via name
    • Create: create a Storager
    • Delete: delete a Storager

Storager Level

  • Basic operations across all storage services with the same API
    • Read: read file content
    • Write: write content into file
    • List: list files under a dir or prefix
    • Stat: get file's metadata
    • Delete: delete a file
    • Metadata: get storage service's metadata
  • Advanced operations across implemented storage services with the same API
    • Copy: copy a file
    • Move: move a file
    • Reach: generate a public accessible url
    • Statistical: get storage service's statistics
    • Segment: Full support for Segment, aka, Multipart

File Level

  • Metadata
    • Content Length / Size: Full support via RFC 2616
    • Content MD5 / ETag: Full support via proposal
    • Content Type: Full support via RFC 2616
    • Storage Class: Full support via proposal

Current Status

This lib is in heavy development, break changes could be introduced at any time. All public interface or functions expected to be stable at v1.0.0.

Installation

Install will go get

go get github.com/Xuanwo/storage

Import

import "github.com/Xuanwo/storage"

Quick Start

// Init a service.
store, err := coreutils.OpenStorager("fs", pairs.WithWorkDir("/tmp"))
if err != nil {
    log.Fatalf("service init failed: %v", err)
}

// Use Storager API to maintain data.
r, err := store.Read("path/to/file")
if err != nil {
    log.Printf("storager read: %v", err)
}

Services

FAQs

Package last updated on 23 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc