storecrud

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloneParams

type CloneParams struct {
	StoreID   string
	StorePath maybe.Maybe[string]

	StorageType storage.Type
	Remote      string
}

type InitParams

type InitParams struct {
	StoreID   string
	StorePath maybe.Maybe[string]

	// if there is no key passed new one will be created
	Recipients []encryption.Recipient

	StorageType maybe.Maybe[storage.Type]
	Encryption  maybe.Maybe[encryption.Encryption]
	Remote      maybe.Maybe[string]
}

type InitRes

type InitRes struct {
	StorePath string
	Identity  maybe.Maybe[encryption.Identity]
}

type Service

type Service interface {
	Init(ctx context.Context, params InitParams) (InitRes, error)
	Clone(ctx context.Context, params CloneParams) error
}

func NewService

func NewService(
	configService config.Service,
	encryptionManager encryption.Manager,
	storageManager storage.Manager,
	manifestSerializer store.ManifestSerializer,
) Service

Jump to

Keyboard shortcuts

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