Documentation ¶
Index ¶
- Constants
- type AddParams
- type CloneParams
- type CommonParams
- type CopyParams
- type GetParams
- type IdentityProvider
- type InitParams
- type InitRes
- type ListParams
- type Manifest
- type ManifestSerializer
- type MoveParams
- type RawSecret
- type RemoveParams
- type Secret
- type SecretData
- type SecretSerializer
- type Service
- type SyncParams
Constants ¶
View Source
const (
ManifestPath = ".gostore.json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloneParams ¶
type CloneParams struct { CommonParams ID string StorageType storage.Type Remote string }
type CommonParams ¶
type CopyParams ¶
type CopyParams struct { CommonParams Src string Dst string }
type IdentityProvider ¶
type IdentityProvider interface {
IdentityByRecipient(ctx context.Context, recipient encryption.Recipient) (maybe.Maybe[encryption.Identity], error)
}
type InitParams ¶
type InitParams struct { CommonParams // if there is no key passed new one will be created Recipients []encryption.Recipient StorageType maybe.Maybe[storage.Type] Remote maybe.Maybe[string] }
type InitRes ¶
type InitRes struct { StorePath string GeneratedIdentity maybe.Maybe[encryption.Identity] }
type ListParams ¶
type ListParams struct { CommonParams Path string }
type Manifest ¶
type Manifest struct { StorageType storage.Type Encryption encryption.Encryption Recipients []encryption.Recipient Unpacked bool }
type ManifestSerializer ¶
type MoveParams ¶
type MoveParams struct { CommonParams Src string Dst string }
type RemoveParams ¶
type RemoveParams struct { CommonParams Path string Key maybe.Maybe[string] }
type SecretData ¶
type SecretSerializer ¶
type Service ¶
type Service interface { // Init creates new store Init(ctx context.Context, params InitParams) (InitRes, error) // Clone store from remote Clone(ctx context.Context, params CloneParams) error Add(ctx context.Context, params AddParams) error Copy(ctx context.Context, params CopyParams) error Move(ctx context.Context, params MoveParams) error Get(ctx context.Context, params GetParams) ([]SecretData, error) List(ctx context.Context, params ListParams) ([]storage.Entry, error) Remove(ctx context.Context, params RemoveParams) error Unpack(ctx context.Context, params CommonParams) error Pack(ctx context.Context, params CommonParams) error Sync(ctx context.Context, params SyncParams) error Rollback(ctx context.Context, params CommonParams) error }
func NewStoreService ¶
func NewStoreService( storageManager storage.Manager, encryptionManager encryption.Manager, manifestSerializer ManifestSerializer, secretSerializer SecretSerializer, identityProvider IdentityProvider, ) Service
type SyncParams ¶
type SyncParams struct {
CommonParams
}
Click to show internal directories.
Click to hide internal directories.