frostfs-api-go/README.md

148 lines
4.4 KiB
Markdown
Raw Normal View History

2020-02-03 08:39:03 +00:00
# NeoFS API
2019-11-18 13:34:06 +00:00
2020-03-31 07:05:26 +00:00
![Go](https://github.com/nspcc-dev/neofs-api-go/workflows/Go/badge.svg)
[![codecov](https://codecov.io/gh/nspcc-dev/neofs-api-go/branch/master/graph/badge.svg)](https://codecov.io/gh/nspcc-dev/neofs-api-go)
[![Report](https://goreportcard.com/badge/github.com/nspcc-dev/neofs-api-go)](https://goreportcard.com/report/github.com/nspcc-dev/neofs-api-go)
[![GitHub release](https://img.shields.io/github/release/nspcc-dev/neofs-api.svg)](https://github.com/nspcc-dev/neofs-api-go)
2020-02-05 10:55:07 +00:00
![GitHub license](https://img.shields.io/github/license/nspcc-dev/neofs-api.svg?style=popout)
---
2020-02-03 08:39:03 +00:00
NeoFS API repository contains implementation of core NeoFS structures that
2019-11-18 13:34:06 +00:00
can be used for integration with NeoFS.
2020-06-18 14:25:39 +00:00
## Сompatibility
[neofs-api v1.1.0]: https://github.com/nspcc-dev/neofs-api/releases/tag/v1.1.0
[neofs-api-go v1.1.0]: https://github.com/nspcc-dev/neofs-api-go/releases/tag/v1.1.0
2020-07-08 08:09:29 +00:00
* [neofs-api-go v1.1.0] supports [neofs-api v1.1.0]
[neofs-api v1.2.0]: https://github.com/nspcc-dev/neofs-api/releases/tag/v1.2.0
[neofs-api-go v1.2.0]: https://github.com/nspcc-dev/neofs-api-go/releases/tag/v1.2.0
* [neofs-api-go v1.2.0] supports [neofs-api v1.2.0]
2020-06-18 14:25:39 +00:00
2019-11-18 13:34:06 +00:00
## Description
Repository contains 13 packages that implement NeoFS core structures. These
packages mostly contain protobuf files with service and structure definitions
or NeoFS core types with complemented functions.
There is a auto-generated documentation for protobuf files in [docs](docs).
2019-11-18 13:34:06 +00:00
### Accounting
Accounting package defines services and structures for accounting operations:
balance request and `cheque` operations for withdraw. `Cheque` is a structure
with inner ring signatures, which approve that user can withdraw requested
amount of assets. NeoFS smart contract takes binary formatted `cheque` as a
parameter in withdraw call.
#### API
Accounting package defines:
- [Accounting service](docs/accounting.md#accounting.Accounting)
- [Withdraw service](docs/accounting.md#accounting.Withdraw)
2019-11-18 13:34:06 +00:00
### Bootstrap
Bootstrap package defines bootstrap service which is used by storage nodes to
connect to the storage network.
#### API
Bootstrap package defines:
- [Bootstrap service](docs/bootstrap.md#bootstrap.Bootstrap)
2019-11-18 13:34:06 +00:00
### Chain
Chain package contains util functions for operations with NEO Blockchain types:
wallet addresses, script-hashes.
### Container
Container package defines service and structures for operations with containers.
Objects in NeoFS are stored in containers. Container defines storage
policy for the objects.
#### API
Bootstrap package defines:
- [Container service](docs/container.md#container.Service)
2019-11-18 13:34:06 +00:00
### Decimal
Decimal defines custom decimal implementation which is used in accounting
operations.
### Hash
Hash package defines homomorphic hash type.
### Internal
Internal package defines constant error type and proto interface for custom
protobuf structures.
### Object
Object package defines service and structures for object operations. Object is
a core storage structure in NeoFS. Package contains detailed information
about object internal structure.
#### API
Object package defines:
- [Object service](docs/object.md#object.Service)
2019-11-18 13:34:06 +00:00
### Query
Query package defines structure for object search requests.
### Refs
Refs package defines core identity types: Object ID, Container ID, etc.
### Service
Service package defines util structure and functions for all NeoFS services
operations: TTL and request signature management, node roles, epoch retriever.
### Session
Session package defines service and structures for session obtain. Object
operations require an established session with pair of session keys signed by
owner of the object.
#### API
Session package defines:
- [Session service](docs/session.md#session.Session)
2019-11-18 13:34:06 +00:00
### State
State package defines service and structures for metrics gathering.
#### API
State package defines:
- [Status service](docs/state.md#state.Status)
2019-11-18 13:34:06 +00:00
## How to use
2020-02-03 08:39:03 +00:00
NeoFS API packages contain godoc documentation. Examples of using most of
2019-11-18 13:34:06 +00:00
these packages can be found in NeoFS-CLI repository. CLI implements and
demonstrates all basic interactions with NeoFS: container, object, storage
group, and accounting operations.
Protobuf files are recompiled with the command:
```
$ make protoc
```
## Contributing
At this moment, we do not accept contributions.
## License
2020-04-10 06:00:37 +00:00
This project is licensed under the Apache 2.0 License -
see the [LICENSE](LICENSE) file for details