mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
docs: Do not generate API docs for internal functionality.
This commit is contained in:
@@ -8,12 +8,6 @@
|
||||
import IPFSAccessController from './ipfs.js'
|
||||
import OrbitDBAccessController from './orbitdb.js'
|
||||
|
||||
/**
|
||||
* An array of available access controllers.
|
||||
* @name accessControllers
|
||||
* @†ype []
|
||||
* @return [] An array of access controllers.
|
||||
*/
|
||||
const accessControllers = {
|
||||
ipfs: IPFSAccessController,
|
||||
orbitdb: OrbitDBAccessController
|
||||
@@ -23,6 +17,7 @@ const accessControllers = {
|
||||
* Gets an access controller module specified by type.
|
||||
* @param {string} type A valid access controller type.
|
||||
* @return {AccessController} The access controller module.
|
||||
* @private
|
||||
*/
|
||||
const getAccessController = (type) => {
|
||||
if (!accessControllers[type]) {
|
||||
@@ -39,6 +34,7 @@ const getAccessController = (type) => {
|
||||
* already supported.
|
||||
* @throws Given AccessController class needs to implement: type if the access
|
||||
* controller module does not implement a type property.
|
||||
* @static
|
||||
*/
|
||||
const addAccessController = (accessController) => {
|
||||
if (!accessController.type) {
|
||||
@@ -55,6 +51,7 @@ const addAccessController = (accessController) => {
|
||||
/**
|
||||
* Removes an access controller from the list.
|
||||
* @param {string} type A valid access controller type.
|
||||
* @static
|
||||
*/
|
||||
const removeAccessController = type => {
|
||||
delete accessControllers[type]
|
||||
|
||||
@@ -38,6 +38,7 @@ const type = 'ipfs'
|
||||
* @instance
|
||||
* @async
|
||||
* @memberof module:AccessControllers.AccessControllers-IPFS
|
||||
* @private
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,6 +19,7 @@ const type = 'orbitdb'
|
||||
* @instance
|
||||
* @async
|
||||
* @memberof module:AccessControllers.AccessControllers-OrbitDB
|
||||
* @private
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
|
||||
import { signMessage, verifyMessage } from '../../key-store.js'
|
||||
|
||||
/**
|
||||
* The type of identity provider.
|
||||
* @return string
|
||||
* @const
|
||||
*/
|
||||
const type = 'publickey'
|
||||
|
||||
/**
|
||||
@@ -19,6 +14,7 @@ const type = 'publickey'
|
||||
* @param {module:Identity} identity
|
||||
* @return {boolean} True if the identity is valid, false otherwise.
|
||||
* @static
|
||||
* @private
|
||||
*/
|
||||
const verifyIdentity = identity => {
|
||||
const { id, publicKey, signatures } = identity
|
||||
@@ -27,13 +23,16 @@ const verifyIdentity = identity => {
|
||||
|
||||
/**
|
||||
* Instantiates the publickey identity provider.
|
||||
* @return {module:IdentityProviders.IdentityProvider-PublicKey} A public key identity provider function.
|
||||
* @return {module:IdentityProviders.IdentityProvider-PublicKey} A public key
|
||||
* identity provider function.
|
||||
* @private
|
||||
*/
|
||||
const PublicKeyIdentityProvider = ({ keystore }) => {
|
||||
/**
|
||||
* @namespace module:IdentityProviders.IdentityProvider-PublicKey
|
||||
* @memberof module:IdentityProviders
|
||||
* @description The instance returned by {@link module:IdentityProviders.IdentityProvider-PublicKey}.
|
||||
* @private
|
||||
*/
|
||||
|
||||
if (!keystore) {
|
||||
|
||||
@@ -12,6 +12,7 @@ const ManifestStore = async ({ ipfs, storage } = {}) => {
|
||||
/**
|
||||
* @namespace module:Manifest~Manifest
|
||||
* @description The instance returned by {@link module:Manifest~Manifest}.
|
||||
* @private
|
||||
*/
|
||||
|
||||
storage = storage || await ComposedStorage(
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* @memberof module:Log
|
||||
* @description
|
||||
* The lamport clock.
|
||||
* @private
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,7 @@ import { compareClocks } from './clock.js'
|
||||
* @param {Entry} a First entry
|
||||
* @param {Entry} b Second entry
|
||||
* @return {number} 1 if a is latest, -1 if b is latest
|
||||
* @private
|
||||
*/
|
||||
function LastWriteWins (a, b) {
|
||||
// Ultimate conflict resolution (take the first/left arg)
|
||||
@@ -31,6 +32,7 @@ function LastWriteWins (a, b) {
|
||||
* entries and return 1 if the first entry should be chosen and -1 if the
|
||||
* second entry should be chosen.
|
||||
* @return {number} 1 if a is greater, -1 if b is greater
|
||||
* @private
|
||||
*/
|
||||
function SortByClocks (a, b, resolveConflict) {
|
||||
// Compare the clocks
|
||||
@@ -48,6 +50,7 @@ function SortByClocks (a, b, resolveConflict) {
|
||||
* are the same. The function should take in two entries and return 1 if the
|
||||
* first entry should be chosen and -1 if the second entry should be chosen.
|
||||
* @return {number} 1 if a is greater, -1 if b is greater
|
||||
* @private
|
||||
*/
|
||||
function SortByClockId (a, b, resolveConflict) {
|
||||
// Sort by ID if clocks are concurrent,
|
||||
@@ -63,6 +66,7 @@ function SortByClockId (a, b, resolveConflict) {
|
||||
* @param {function(a, b)} [tiebreaker] The tiebreaker function to validate.
|
||||
* @return {function(a, b)} 1 if a is greater, -1 if b is greater
|
||||
* @throws {Error} if func ever returns 0
|
||||
* @private
|
||||
*/
|
||||
function NoZeroes (func) {
|
||||
const msg = `Your log's tiebreaker function, ${func.name}, has returned zero and therefore cannot be`
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* @namespace module:Log~Entry
|
||||
* @memberof module:Log
|
||||
* @description A log entry.
|
||||
* @private
|
||||
*/
|
||||
import Clock from './clock.js'
|
||||
import * as Block from 'multiformats/block'
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @namespace module:Log~Heads
|
||||
* @memberof module:Log
|
||||
* @description The log's heads.
|
||||
* @private
|
||||
*/
|
||||
import Entry from './entry.js'
|
||||
import MemoryStorage from '../storage/memory.js'
|
||||
|
||||
@@ -77,6 +83,7 @@ const Heads = async ({ storage, heads }) => {
|
||||
*
|
||||
* @param {Array<Entry>} entries Entries to search heads from
|
||||
* @return {Array<Entry>}
|
||||
* @private
|
||||
*/
|
||||
const findHeads = (entries) => {
|
||||
entries = new Set(entries)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Implemented as a Merkle-CRDT as per the paper:
|
||||
* "Merkle-CRDTs: Merkle-DAGs meet CRDTs"
|
||||
* https://arxiv.org/abs/2004.00107
|
||||
* @private
|
||||
*/
|
||||
import LRU from 'lru'
|
||||
import Entry from './entry.js'
|
||||
@@ -55,6 +56,7 @@ const Log = async (identity, { logId, logHeads, access, entryStorage, headsStora
|
||||
/**
|
||||
* @namespace Log
|
||||
* @description The instance returned by {@link module:Log}.
|
||||
* @private
|
||||
*/
|
||||
|
||||
if (identity == null) {
|
||||
|
||||
Reference in New Issue
Block a user