Documentation ¶
Index ¶
- Variables
- func IpfsOffline(cfg *kubo.BuildCfg) *kubo.BuildCfg
- func IpfsOnline(cfg *kubo.BuildCfg) *kubo.BuildCfg
- func ReadConfigAsMap(filename string) (map[string]any, error)
- type Config
- type Conflict
- type DatabaseConfig
- type Dorothy
- func (d *Dorothy) Checkout(hash, dest string) error
- func (d *Dorothy) ChooseVersions(title string, required bool) ([]string, error)
- func (d *Dorothy) ChooseVersionsWithSelected(title string, required bool, selected []*Version) ([]string, error)
- func (d *Dorothy) Commit(paths []string, message string, nopin bool, parents []string) ([]Conflict, error)
- func (d *Dorothy) ConnectIpfs(options ...IpfsNodeOption) error
- func (d *Dorothy) CookiesPath() string
- func (d *Dorothy) DelConfig(props []string, global bool) (string, error)
- func (d *Dorothy) Fetch() ([]Conflict, error)
- func (d *Dorothy) GetConfig(props []string) (any, error)
- func (d *Dorothy) GlobalConfigPath() string
- func (d *Dorothy) Initialize(global bool, options ...IpfsNodeOption) error
- func (d *Dorothy) InitializeAndConnectIpfs(options ...IpfsNodeOption) error
- func (d *Dorothy) InitializeIpfs() error
- func (d *Dorothy) IsInitialized() bool
- func (d *Dorothy) LoadConfigFile(filename string) error
- func (d *Dorothy) LoadDefaultConfig() error
- func (d *Dorothy) LoadGlobalConfig() error
- func (d *Dorothy) LoadLocalConfig() error
- func (d *Dorothy) LoadManifest() error
- func (d *Dorothy) LocalConfigPath() string
- func (d *Dorothy) ManifestPath() string
- func (d *Dorothy) Push() ([]Conflict, error)
- func (d *Dorothy) ReadFromEditor(filename string) (string, error)
- func (d *Dorothy) Recieve(old *Manifest, hash string) (*Manifest, []Conflict, error)
- func (d *Dorothy) ReloadConfig() error
- func (d *Dorothy) ReloadIpfs() error
- func (d *Dorothy) ResetConfig() error
- func (d *Dorothy) SdkClient() (*sdk.Client, error)
- func (d *Dorothy) SetConfig(props []string, value string, global bool) (string, error)
- func (d *Dorothy) Setup(options ...IpfsNodeOption) error
- func (d *Dorothy) UnknownCommits(commits []string) []string
- func (d *Dorothy) WriteConfig() error
- func (d *Dorothy) WriteManifestFile() error
- type Ipfs
- func (s *Ipfs) Add(ctx context.Context, filename string, options ...options.UnixfsAddOption) (string, error)
- func (s Ipfs) AddMany(ctx context.Context, filenames []string, options ...options.UnixfsAddOption) (string, error)
- func (s Ipfs) Commit(ctx context.Context, manifest *Manifest) (*Manifest, error)
- func (s Ipfs) CommitVersion(ctx context.Context, version *Version) (string, error)
- func (s *Ipfs) Connect(ctx context.Context, dir string, options ...IpfsNodeOption) error
- func (s *Ipfs) ConnectToPeerById(ctx context.Context, id peer.ID) error
- func (s *Ipfs) CreateEmptyManifest(ctx context.Context) (*Manifest, error)
- func (s *Ipfs) Get(ctx context.Context, hash, dest string) error
- func (s *Ipfs) GetManifest(ctx context.Context, hash string) (*Manifest, error)
- func (s *Ipfs) Initialize(dir string) error
- func (s *Ipfs) IsConnected() bool
- func (s Ipfs) MergeAndCommit(ctx context.Context, old, new *Manifest) (*Manifest, []Conflict, error)
- func (s *Ipfs) SaveManifest(ctx context.Context, manifest *Manifest) (*Manifest, error)
- type IpfsConfig
- type IpfsNodeOption
- type Manifest
- func (old *Manifest) Conflicts(new *Manifest) ([]Conflict, bool)
- func (old *Manifest) Diff(new *Manifest) ([]*Version, error)
- func (manifest *Manifest) Encode(w io.Writer) error
- func (m *Manifest) IpfsPath() (path.ImmutablePath, error)
- func (manifest *Manifest) IsEmpty() bool
- func (manifest *Manifest) LeafVersions() []*Version
- func (old *Manifest) Merge(new *Manifest) (*Manifest, []Conflict, error)
- func (m *Manifest) ReverseVersions() []*Version
- func (manifest *Manifest) UnknownCommits(commits []string) []string
- type PathType
- type Remote
- type UserConfig
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var AllPathType = []PathType{ PathTypeDirectory, PathTypeFile, }
Functions ¶
Types ¶
type Config ¶
type Config struct { User *UserConfig `toml:"user,omitempty"` Editor string `toml:"editor,omitempty"` RemoteString string `toml:"remote,omitempty"` Ipfs *IpfsConfig `toml:"ipfs,omitempty"` Database *DatabaseConfig `toml:"database,omitempty"` Remote *Remote `toml:"-"` }
func ReadConfigFile ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
Path string `toml:"path"`
}
type Dorothy ¶
type Dorothy struct { context.Context Directory string LoadedConfigs []string Config Config Ipfs Ipfs Manifest *Manifest // contains filtered or unexported fields }
func NewDorothy ¶
func (*Dorothy) ChooseVersions ¶
func (*Dorothy) ChooseVersionsWithSelected ¶
func (*Dorothy) ConnectIpfs ¶
func (d *Dorothy) ConnectIpfs(options ...IpfsNodeOption) error
func (*Dorothy) CookiesPath ¶
func (*Dorothy) GlobalConfigPath ¶
func (*Dorothy) Initialize ¶
func (d *Dorothy) Initialize(global bool, options ...IpfsNodeOption) error
func (*Dorothy) InitializeAndConnectIpfs ¶
func (d *Dorothy) InitializeAndConnectIpfs(options ...IpfsNodeOption) error
func (*Dorothy) InitializeIpfs ¶
func (*Dorothy) IsInitialized ¶
func (*Dorothy) LoadConfigFile ¶
func (*Dorothy) LoadDefaultConfig ¶
func (*Dorothy) LoadGlobalConfig ¶
func (*Dorothy) LoadLocalConfig ¶
func (*Dorothy) LoadManifest ¶
func (*Dorothy) LocalConfigPath ¶
func (*Dorothy) ManifestPath ¶
func (*Dorothy) ReloadConfig ¶
func (*Dorothy) ReloadIpfs ¶
func (*Dorothy) ResetConfig ¶
func (*Dorothy) Setup ¶
func (d *Dorothy) Setup(options ...IpfsNodeOption) error
func (*Dorothy) UnknownCommits ¶
func (*Dorothy) WriteConfig ¶
func (*Dorothy) WriteManifestFile ¶
type Ipfs ¶
func NewIpfs ¶
func NewIpfs(config *IpfsConfig) Ipfs
func (Ipfs) CommitVersion ¶
func (*Ipfs) ConnectToPeerById ¶
func (*Ipfs) CreateEmptyManifest ¶
func (*Ipfs) GetManifest ¶
func (*Ipfs) Initialize ¶
func (*Ipfs) IsConnected ¶
func (Ipfs) MergeAndCommit ¶
type IpfsConfig ¶
type IpfsConfig struct { Global bool `toml:"global"` Host string `toml:"host,omitempty"` Port int `toml:"port,omitempty"` }
func (IpfsConfig) Url ¶
func (c IpfsConfig) Url() string
type Manifest ¶
func (*Manifest) LeafVersions ¶
func (*Manifest) ReverseVersions ¶
func (*Manifest) UnknownCommits ¶
type UserConfig ¶
type UserConfig struct { Name string `toml:"name,omitempty"` Email string `toml:"email,omitempty"` }
func (*UserConfig) String ¶
func (u *UserConfig) String() string
Click to show internal directories.
Click to hide internal directories.