storage

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EditByte added in v1.23.0

func EditByte(id string) (string, error)

func FormatByte added in v1.23.0

func FormatByte(filename string) error

Format the byte with Prettier

func GetByteDir

func GetByteDir() (string, error)

func GetBytePath

func GetBytePath(id string) (string, error)

func Pull

func Pull() error

func ReadByte added in v1.23.0

func ReadByte(id string) ([]byte, error)

func SyncByte

func SyncByte(commitPrefix, filename string) error

func WriteByte

func WriteByte(filename string, data []byte) error

Types

type Byte added in v0.1.0

type Byte struct {
	Id      string
	Title   string
	Slug    string
	Tags    []string
	Content string
}

func GetAllBytes added in v1.22.0

func GetAllBytes() ([]Byte, error)

func ParseByte added in v0.1.0

func ParseByte(id string, content []byte) (Byte, error)

func SearchBytes added in v0.1.0

func SearchBytes(predicate func(byte Byte) any) ([]Byte, error)

func (Byte) HasTag added in v0.1.0

func (b Byte) HasTag(tag string) bool

type WeightedByte added in v1.24.0

type WeightedByte struct {
	Byte
	Weight int
}

Jump to

Keyboard shortcuts

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