utils

package
v1.23.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

utils contains functions that are useful in some context

Index

Constants

This section is empty.

Variables

View Source
var AtlasManifest = atlas.BuildEntry(Manifest{}).
	StructMap().
	AddField("SkipManifest", atlas.StructMapEntry{SerialName: "skip_manifest"}).
	AddField("Address", atlas.StructMapEntry{SerialName: "address"}).
	AddField("ManifestType", atlas.StructMapEntry{SerialName: "manifest/type"}).
	AddField("Name", atlas.StructMapEntry{SerialName: "name"}).
	AddField("Type", atlas.StructMapEntry{SerialName: "type"}).
	AddField("AccessController", atlas.StructMapEntry{SerialName: "access_controller"}).
	Complete()

AtlasManifest defines how a manifest is serialized

Functions

func CreateDBManifest

func CreateDBManifest(ctx context.Context, ipfs coreiface.CoreAPI, name string, dbType string, accessControllerAddress string) (cid.Cid, error)

CreateDBManifest creates a new database manifest and saves it on IPFS

Types

type Manifest

type Manifest struct {
	SkipManifest interface{} `cbor:"manifest/skip_manifest,omitempty"`
	Address      interface{} `cbor:"manifest/address,omitempty"`
	ManifestType interface{} `cbor:"manifest/type,omitempty"`

	Name             string `cbor:"name"`
	Type             string `cbor:"type"`
	AccessController string `cbor:"access_controller"`
}

Manifest struct for nodes with "name", "type", and "access_controller"

type ManifestEnvelope added in v1.23.10

type ManifestEnvelope struct {
	Manifest     Manifest    `cbor:"manifest"`
	SkipManifest interface{} `cbor:"skip_manifest,omitempty"`
	Address      interface{} `cbor:"manifest/address,omitempty"`
	ManifestType interface{} `cbor:"manifest/type,omitempty"`

	// // Fields for keys at this level
	Type             string `cbor:"type"`
	Name             string `cbor:"name,omitempty"`
	AccessController string `cbor:"access_controller,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL