store

package
v0.0.1-alpha.22 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

This file contains general helpers for interacting with a slice of local store

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeexpandTilde

func DeexpandTilde(path string) string

DeexpandTilde takes a path and if it is in the home directory, it will replace it with a ~.

func ExpandTilde

func ExpandTilde(path string) (string, error)

ExpandTilde takes a path and if it starts with a ~, it will replace it with the home directory.

func InitStore

func InitStore() error

InitStore initializes the local store.

func ReadFromGlobalStore

func ReadFromGlobalStore[T any](store string, data *T) error

ReadDataFromGlobalStore reads the data from the global store.

func RegisterTypes

func RegisterTypes(impls ...interface{})

RegisterTypes registers the types that are going to be stored in the local store.

func WriteToGlobalStore

func WriteToGlobalStore[T any](store string, data T) error

WriteDataToGlobalStore writes the data to the global store.

Types

This section is empty.

Jump to

Keyboard shortcuts

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