npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cfsnet-protocol-buffers

v0.1.11

Published

CFSNet Protocol Buffers

Downloads

193

Readme

cfsnet-protocol-buffers

Build Status

Protocol buffers for CFSNET

Table of Contents

Status

Stable

Dependencies

Installation

$ npm install
$ make all

Usage

  • TODO

Messages

AccessFile

Implements AccessFile(path, [mode]) operation. Send this message to check the access of a file.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | filepath | | mode | FileMode | One of the FileMode enum values |

Boolean

Protobuf message wrapping Bool.

| Field | Type | Description | | ----- | ---- | ----------- | | value | bool | boolean |

Buffer

Protobuf message wrapping generic byte buffer.

| Field | Type | Description | | ----- | ---- | ----------- | | value | bytes | TODO | | length | uint64 | Size of value |

Close

Implements Open(fd) operation. Send this message to open a file and get a file descriptor.

| Field | Type | Description | | ----- | ---- | ----------- | | fileDescriptor | unit32 | TODO |

DownloadDirectory

Implements DownloadDirectory(path) operation. Send this message to download a directory.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath of directory to download |

DownloadFile

Implements DownloadFile(path) operation. Send this message to download a file.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath of file to download |

Drive

TODO

| Field | Type | Description | | ----- | ---- | ----------- | | id | bytes | TODO | | key | bytes | TODO | | secretKey | bytes | TODO |

Handshake

A Handshake message is used between client (Alice) and server (Bob) to capture a handshake prior to a request message exchange. This should be the first payload sent in request to initiate a connection handshake.

| Field | Type | Description | | ----- | ---- | ----------- | | nonce | bytes | One time use nonce value; should be SHA256 hash of output from a pseudo random number generator | | key | bytes | BLAKE2b hash of the concatenation of "CFSNET1" and nonce | | ack | bool | indicates the handshake was acknowledged by receiver |

KeyPair

TODO

| Field | Type | Description | | ----- | ---- | ----------- | | seed | bytes | TODO | | publicKey | bytes | TODO | | secretKey | bytes | TODO |

List

TODO

| Field | Type | Description | | ----- | ---- | ----------- | | values | repeated bytes | TODO | | length | uint64 | TODO |

ListDirectory

Implements ListDirectory(path) operation. Send this message to list a directory.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath of directory to list |

MakeDirectory

Implements MakeDirectory(path) operation. Send this message to make a directory. Parent directory should already exist.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath of where to create directory |

MakeDirectoryPath

Implements MakeDirectory(path) operation. Send this message to make a directory. Parent directories will be made if they do not already exist in the path.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath of where to create directory |

Number

TODO

| Field | Type | Description | | ----- | ---- | ----------- | | value | double | TODO |

Open

Implements Open(path) operation. Send this message to open a file and get a file descriptor.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath to file to open | | flags | string | TODO |

Read

Implements Read(fd, start, end) operation. Send this message to read a range from an open file descriptor.

| Field | Type | Description | | ----- | ---- | ----------- | | fileDescriptor | uint32 | TODO | | start | uint32 | Offset to start reading from | | end | uint32 | Offset to stop reading from |

ReadFile

Implements ReadFile(path, [start], [end]) operation. Send this message to read a range from an open file descriptor.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Path to file to read | | start | uint32 | Offset to start reading from | | end | uint32 | Offset to stop reading from |

RemoveDirectory

Implements RemoveDirectory(path) operation. Send this message to remove a directory. The directory should already exist and be empty.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath of directory to remove |

RemoveDirectoryPath

Implements RemoveDirectoryPath(path) operation. Send this message to remove a directory. The directory does not have to exist or be empty.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath of where to create directory |

Request

Represents a request payload for an operation on a CFSNet drive instance.

| Field | Type | Description | | ----- | ---- | ----------- | | nonce | bytes | Number used once | | drive | Drive | Drive | | operation | Operation | Operation | | buffer | bytes | TODO |

Resolve

Implements Resolve(path) operation. Send this message to resolve a given file path to a fully qualified file name by resolving relative paths (./) and special tokens (~).

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath to resolve |

Response

Represents a response payload for an operation on a CFSNet drive instance.

| Field | Type | Description | | ----- | ---- | ----------- | | nonce | bytes | matches Request.nonce | | drive | Drive | Drive | | operation | Operation | Operation | | request | Request | Request | | errorCode | ErrorCode | ErrorCode | | buffer | bytes | TODO |

Stat

TODO

| Field | Type | Description | | ----- | ---- | ----------- | | uid | uint32 | TODO | | gid | uint32 | TODO | | mode | uint32 | TODO | | size | uint64 | TODO | | atime | uint64 | TODO | | ctime | uint64 | TODO | | mtime | uint64 | TODO | | blocks | uint64 | TODO |

StatFile

Implements StatFile(path) operation.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | TODO |

String

TODO

| Field | Type | Description | | ----- | ---- | ----------- | | value | string | TODO |

TouchFile

Implements TouchFile(path) operation.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath to touch |

UnlinkFile

Implements UnlinkFile(path) operation.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | Filepath to unlink |

WriteFile

Implements WriteFile(path, buffer, [start], [end]) operation.

| Field | Type | Description | | ----- | ---- | ----------- | | path | string | TODO | | buffer | bytes | TODO | | start | uint32 | TODO | | end | uint32 | TODO |

Enums

FileMode

File mode constants for determining file access.

| Constant | Value |Description | | ----- | ----- |----------- | | F_OK | 0 | TODO | | X_OK | 1 | File is executable | | W_OK | 2 | File is writable | | R_OK | 4 | File is readable |

ErrorCode

Error codes that indicate client or remote errors.

| Constant | Value |Description | | ----- | ----- |----------- | | NoError | 0 | TODO | | BadRequestError | 400 | TODO | | AccessDeniedError | 403 | TODO | | NotFoundError | 404 | TODO | | NotSupportedError | 405 | TODO | | NotOpenedError | 410 | TODO | | InternalError | 500 | TODO | | NotImplementedError | 501 | TODO |

Operation

TODO

| Constant | Value |Description | | ----- | ----- |----------- | | NoOperation | 0 | TODO | | ResolveOperation | 1 | TODO | | KeyPairOperation | 2 | TODO | | OpenOperation | 10 | TODO | | CloseOperation | 11 | TODO | | ReadOperation | 12 | TODO | | WriteOperation | 13 | TODO | | ReadFileOperation | 20 | TODO | | WriteFileOperation | 21 | TODO | | StatFileOperation | 22 | TODO | | UnlinkFileOperation | 23 | TODO | | AccessFileOperation | 24 | TODO | | TouchFileOperation | 25 | TODO | | DownloadFileOperation | 26 | TODO | | DownloadDirectoryOperation | 30 | TODO | | MakeDirectoryOperation | 31 | TODO | | MakeDirectoryPathOperation | 32 | TODO | | RemoveDirectoryOperation | 33 | TODO | | RemoveDirectoryPathOperation | 34 | TODO | | ListDirectoryOperation | 35 | TODO |

Contributing

Releases follow Semantic Versioning

See Also

License

LGPL-3.0