Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
/ asto Public archive

Abstract Storage for All Artipie Slices

License

Notifications You must be signed in to change notification settings

artipie/asto

Repository files navigation

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

Build Status Javadoc License codecov Hits-of-Code Maven Central PDD status

Asto stands for Abstract Storage, an abstraction over physical data storage system. The main entity of the library is an interface com.artipie.asto.Storage, a contract which requires to implement the following functionalities:

  • put/get operations
  • transaction support
  • list files in a directory
  • check if a file/directory exists

Dictionary used for ASTO:

  • Storage - key-value based storage
  • Key - storage keys, could be converted to strings
  • Content - storage data, reactive publisher with optional size attribute
  • SubStorage - isolated storage based on origin storage

The list of back-ends supported:

  • FileStorage - file-system based storage, uses paths as keys, stores content in files
  • S3Storage - uses S3 compatible HTTP web-server as storage, uses keys as names and blobs for content
  • EtcdStorage - uses ETCD cluster as storage back-end
  • InMemoryStorage - storage uses HashMap to store data

This is the dependency you need:

<dependency>
  <groupId>com.artipie</groupId>
  <artifactId>asto</artifactId>
  <version>[...]</version>
</dependency>

Read the Javadoc for more technical details.

Usage

The main types here are:

  • Storage interface provides API for key-value storage
  • Key represents storage key
  • Content represents storage binary value

Storage Key and other types are documented in javadoc.

TO DO: add more details

How to contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

To avoid build errors use Maven 3.2+.