notes

package
v0.0.0-...-ccd9fd3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureUser

func EnsureUser(ctx diag.Context) error

EnsureUser copies the user name and email from the head commit, if necessary. Calling Store in a GitHub action is likely to require this.

func Fetch

func Fetch(ctx diag.Context, r RemoteRef) error

Fetch copies notes from r to the local repo

func Load

func Load(ctx diag.Context, r RemoteRef, commit string, data any) error

Load attempts to retrieve notes from commit into data, copying or decoding as JSON.

func Push

func Push(ctx diag.Context, r RemoteRef) error

Push copies notes from the local repo to r

func Store

func Store(ctx diag.Context, r RemoteRef, data any) error

Store saves data against the head commit, copying it or encoding as JSON. Note that copied data should be clear next, but this is not enforced here.

Types

type RemoteRef

type RemoteRef struct {
	Remote string
	Ref    string
}

Jump to

Keyboard shortcuts

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