store

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigName = "posts.json"
View Source
const RemoteConfigName = "remote.json"

Variables

This section is empty.

Functions

func CalcHash

func CalcHash(p string) (string, error)

func CollecMdPaths

func CollecMdPaths(rootFolder string) ([]string, error)

func ConfigPath

func ConfigPath(folder string) string

func FolderIsSetUp

func FolderIsSetUp(root string) (bool, error)

func Load

func Load(root string) (*types.Config, error)

func LoadRemotePosts

func LoadRemotePosts(root string) (*types.RemotePosts, error)

func RemoteConfigPath

func RemoteConfigPath(folder string) string

func SaveConfig

func SaveConfig(c types.StoredConfig, root string) error

func SaveRemotePosts

func SaveRemotePosts(c types.RemotePosts, root string) error

Types

type FolderState

type FolderState struct {
	New      map[string]*types.PostMeta
	Modified map[string]*types.PostMeta
	Deleted  map[string]*types.PostMeta
}

func ExamineFolder

func ExamineFolder(cfg *types.Config, rootFolder string) (*FolderState, error)

type RemotePostWithLocal

type RemotePostWithLocal struct {
	types.RemotePost
	Fname string
}

type RemoteState

type RemoteState struct {
	New      []*types.RemotePost
	Modified []*RemotePostWithLocal
}

func ExamineRemote

func ExamineRemote(cfg *types.Config, remote *types.RemotePosts) (*RemoteState, error)

Jump to

Keyboard shortcuts

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