backup

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportJSON

func ExportJSON(ctx context.Context, s store.Store) ([]byte, error)

func ImportJSON

func ImportJSON(ctx context.Context, s store.Store, data []byte, mode ImportMode) error

Types

type Backup

type Backup struct {
	Version      int                 `json:"version"`
	ExportedAt   string              `json:"exported_at"`
	Repositories []*store.Repository `json:"repositories"`
	Releases     []*store.Release    `json:"releases"`
	Categories   []*store.Category   `json:"categories"`
}

type ImportMode

type ImportMode string
const (
	ImportMerge   ImportMode = "merge"
	ImportReplace ImportMode = "replace"
)

type WebDAVClient

type WebDAVClient struct {
	// contains filtered or unexported fields
}

func NewWebDAVClient

func NewWebDAVClient(url, username, password string) *WebDAVClient

func (*WebDAVClient) Pull

func (w *WebDAVClient) Pull(ctx context.Context, path string) ([]byte, error)

func (*WebDAVClient) Push

func (w *WebDAVClient) Push(ctx context.Context, path string, data []byte) error

func (*WebDAVClient) Test

func (w *WebDAVClient) Test(ctx context.Context) error

Jump to

Keyboard shortcuts

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