Documentation ¶
Index ¶
- Constants
- Variables
- type ApiOption
- type ApiSettings
- type BlockPutOption
- type BlockPutSettings
- type BlockRmOption
- type BlockRmSettings
- type DhtFindProvidersOption
- type DhtFindProvidersSettings
- type DhtProvideOption
- type DhtProvideSettings
- type KeyGenerateOption
- type KeyGenerateSettings
- type KeyRenameOption
- type KeyRenameSettings
- type Layout
- type NamePublishOption
- type NamePublishSettings
- type NameResolveOption
- type NameResolveSettings
- type ObjectAddLinkOption
- type ObjectAddLinkSettings
- type PinAddOption
- type PinAddSettings
- type PinIsPinnedOption
- type PinIsPinnedSettings
- type PinLsOption
- type PinLsSettings
- type PinRmOption
- type PinRmSettings
- type PinUpdateOption
- type PinUpdateSettings
- type PubSubPeersOption
- type PubSubPeersSettings
- type PubSubSubscribeOption
- type PubSubSubscribeSettings
- type RoutingFindProvidersOption
- type RoutingFindProvidersSettings
- type RoutingProvideOption
- type RoutingProvideSettings
- type RoutingPutOption
- type RoutingPutSettings
- type UnixfsAddOption
- type UnixfsAddSettings
- type UnixfsLsOption
- type UnixfsLsSettings
Constants ¶
const ( RSAKey = "rsa" Ed25519Key = "ed25519" DefaultRSALen = 2048 )
const (
DefaultNameValidTime = 24 * time.Hour
)
Variables ¶
var Api apiOpts
var Block blockOpts
var Dht = Routing
nolint deprecated Deprecated: use Routing instead.
var DhtFindProvidersOptions = RoutingFindProvidersOptions
nolint deprecated Deprecated: use RoutingFindProvidersOptions instead.
var DhtProvideOptions = RoutingProvideOptions
nolint deprecated Deprecated: use RoutingProvideOptions instead.
var Key keyOpts
var Name nameOpts
var Object objectOpts
var Pin pinOpts
Pin provide an access to all the options for the Pin API.
var PubSub pubsubOpts
var Put = Routing
nolint deprecated Deprecated: use Routing instead.
var Routing routingOpts
var Unixfs unixfsOpts
Functions ¶
This section is empty.
Types ¶
type ApiOption ¶
type ApiOption func(*ApiSettings) error
type ApiSettings ¶
func ApiOptions ¶
func ApiOptions(opts ...ApiOption) (*ApiSettings, error)
func ApiOptionsTo ¶
func ApiOptionsTo(options *ApiSettings, opts ...ApiOption) (*ApiSettings, error)
type BlockPutOption ¶
type BlockPutOption func(*BlockPutSettings) error
type BlockPutSettings ¶
func BlockPutOptions ¶
func BlockPutOptions(opts ...BlockPutOption) (*BlockPutSettings, error)
type BlockRmOption ¶
type BlockRmOption func(*BlockRmSettings) error
type BlockRmSettings ¶
type BlockRmSettings struct {
Force bool
}
func BlockRmOptions ¶
func BlockRmOptions(opts ...BlockRmOption) (*BlockRmSettings, error)
type DhtFindProvidersOption ¶
type DhtFindProvidersOption = RoutingFindProvidersOption
nolint deprecated Deprecated: use RoutingFindProvidersOption instead.
type DhtFindProvidersSettings ¶
type DhtFindProvidersSettings = RoutingFindProvidersSettings
nolint deprecated Deprecated: use RoutingFindProvidersSettings instead.
type DhtProvideOption ¶
type DhtProvideOption = RoutingProvideOption
nolint deprecated Deprecated: use RoutingProvideOption instead.
type DhtProvideSettings ¶
type DhtProvideSettings = RoutingProvideSettings
nolint deprecated Deprecated: use RoutingProvideSettings instead.
type KeyGenerateOption ¶
type KeyGenerateOption func(*KeyGenerateSettings) error
type KeyGenerateSettings ¶
func KeyGenerateOptions ¶
func KeyGenerateOptions(opts ...KeyGenerateOption) (*KeyGenerateSettings, error)
type KeyRenameOption ¶
type KeyRenameOption func(*KeyRenameSettings) error
type KeyRenameSettings ¶
type KeyRenameSettings struct {
Force bool
}
func KeyRenameOptions ¶
func KeyRenameOptions(opts ...KeyRenameOption) (*KeyRenameSettings, error)
type NamePublishOption ¶
type NamePublishOption func(*NamePublishSettings) error
type NamePublishSettings ¶
type NamePublishSettings struct { ValidTime time.Duration Key string TTL *time.Duration CompatibleWithV1 bool AllowOffline bool }
func NamePublishOptions ¶
func NamePublishOptions(opts ...NamePublishOption) (*NamePublishSettings, error)
type NameResolveOption ¶
type NameResolveOption func(*NameResolveSettings) error
type NameResolveSettings ¶
type NameResolveSettings struct { Cache bool ResolveOpts []namesys.ResolveOption }
func NameResolveOptions ¶
func NameResolveOptions(opts ...NameResolveOption) (*NameResolveSettings, error)
type ObjectAddLinkOption ¶
type ObjectAddLinkOption func(*ObjectAddLinkSettings) error
type ObjectAddLinkSettings ¶
type ObjectAddLinkSettings struct {
Create bool
}
func ObjectAddLinkOptions ¶
func ObjectAddLinkOptions(opts ...ObjectAddLinkOption) (*ObjectAddLinkSettings, error)
type PinAddOption ¶
type PinAddOption func(*PinAddSettings) error
PinAddOption is the signature of an option for PinAPI.Add
type PinAddSettings ¶
PinAddSettings represent the settings for PinAPI.Add
func PinAddOptions ¶
func PinAddOptions(opts ...PinAddOption) (*PinAddSettings, error)
PinAddOptions compile a series of PinAddOption into a ready to use PinAddSettings and set the default values.
type PinIsPinnedOption ¶
type PinIsPinnedOption func(*PinIsPinnedSettings) error
PinIsPinnedOption is the signature of an option for PinAPI.IsPinned
type PinIsPinnedSettings ¶
type PinIsPinnedSettings struct {
WithType string
}
PinIsPinnedSettings represent the settings for PinAPI.IsPinned
func PinIsPinnedOptions ¶
func PinIsPinnedOptions(opts ...PinIsPinnedOption) (*PinIsPinnedSettings, error)
PinIsPinnedOptions compile a series of PinIsPinnedOption into a ready to use PinIsPinnedSettings and set the default values.
type PinLsOption ¶
type PinLsOption func(*PinLsSettings) error
PinLsOption is the signature of an option for PinAPI.Ls
type PinLsSettings ¶
PinLsSettings represent the settings for PinAPI.Ls
func PinLsOptions ¶
func PinLsOptions(opts ...PinLsOption) (*PinLsSettings, error)
PinLsOptions compile a series of PinLsOption into a ready to use PinLsSettings and set the default values.
type PinRmOption ¶
type PinRmOption func(*PinRmSettings) error
PinRmOption is the signature of an option for PinAPI.Rm
type PinRmSettings ¶
type PinRmSettings struct {
Recursive bool
}
PinRmSettings represents the settings for PinAPI.Rm
func PinRmOptions ¶
func PinRmOptions(opts ...PinRmOption) (*PinRmSettings, error)
PinRmOptions compile a series of PinRmOption into a ready to use PinRmSettings and set the default values.
type PinUpdateOption ¶
type PinUpdateOption func(*PinUpdateSettings) error
PinUpdateOption is the signature of an option for PinAPI.Update
type PinUpdateSettings ¶
type PinUpdateSettings struct {
Unpin bool
}
PinUpdateSettings represent the settings for PinAPI.Update
func PinUpdateOptions ¶
func PinUpdateOptions(opts ...PinUpdateOption) (*PinUpdateSettings, error)
PinUpdateOptions compile a series of PinUpdateOption into a ready to use PinUpdateSettings and set the default values.
type PubSubPeersOption ¶
type PubSubPeersOption func(*PubSubPeersSettings) error
type PubSubPeersSettings ¶
type PubSubPeersSettings struct {
Topic string
}
func PubSubPeersOptions ¶
func PubSubPeersOptions(opts ...PubSubPeersOption) (*PubSubPeersSettings, error)
type PubSubSubscribeOption ¶
type PubSubSubscribeOption func(*PubSubSubscribeSettings) error
type PubSubSubscribeSettings ¶
type PubSubSubscribeSettings struct {
Discover bool
}
func PubSubSubscribeOptions ¶
func PubSubSubscribeOptions(opts ...PubSubSubscribeOption) (*PubSubSubscribeSettings, error)
type RoutingFindProvidersOption ¶
type RoutingFindProvidersOption func(*DhtFindProvidersSettings) error
type RoutingFindProvidersSettings ¶
type RoutingFindProvidersSettings struct {
NumProviders int
}
func RoutingFindProvidersOptions ¶
func RoutingFindProvidersOptions(opts ...RoutingFindProvidersOption) (*RoutingFindProvidersSettings, error)
type RoutingProvideOption ¶
type RoutingProvideOption func(*DhtProvideSettings) error
type RoutingProvideSettings ¶
type RoutingProvideSettings struct {
Recursive bool
}
func RoutingProvideOptions ¶
func RoutingProvideOptions(opts ...RoutingProvideOption) (*RoutingProvideSettings, error)
type RoutingPutOption ¶
type RoutingPutOption func(*RoutingPutSettings) error
type RoutingPutSettings ¶
type RoutingPutSettings struct {
AllowOffline bool
}
func RoutingPutOptions ¶
func RoutingPutOptions(opts ...RoutingPutOption) (*RoutingPutSettings, error)
type UnixfsAddOption ¶
type UnixfsAddOption func(*UnixfsAddSettings) error
type UnixfsAddSettings ¶
type UnixfsAddSettings struct { CidVersion int MhType uint64 Inline bool InlineLimit int RawLeaves bool RawLeavesSet bool Chunker string Layout Layout Pin bool OnlyHash bool FsCache bool NoCopy bool Events chan<- interface{} Silent bool Progress bool }
func UnixfsAddOptions ¶
func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix, error)
type UnixfsLsOption ¶
type UnixfsLsOption func(*UnixfsLsSettings) error
type UnixfsLsSettings ¶
func UnixfsLsOptions ¶
func UnixfsLsOptions(opts ...UnixfsLsOption) (*UnixfsLsSettings, error)