Documentation ¶
Index ¶
- Constants
- type AddParams
- type CloneParams
- type CommonParams
- type CopyParams
- type DataProvider
- 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 SecretIndex
- type SecretSerializer
- type Service
- type WriteManifestParams
Constants ¶
View Source
const (
ManifestPath = ".gostore.json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddParams ¶
type AddParams struct { SecretIndex Data []byte }
type CloneParams ¶
type CloneParams struct { CommonParams ID string StorageType storage.Type Remote string }
type CommonParams ¶
type CopyParams ¶
type DataProvider ¶
type GetParams ¶
type GetParams struct {
SecretIndex
}
type IdentityProvider ¶
type IdentityProvider interface {
IdentityByRecipient(ctx context.Context, recipient encryption.Recipient) (maybe.Maybe[encryption.Identity], error)
}
type InitParams ¶
type InitParams struct { CommonParams Recipients []encryption.Recipient Encryption encryption.Encryption 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 {
Path string
}
type Manifest ¶
type Manifest struct { StorageType storage.Type Encryption encryption.Encryption Recipients []encryption.Recipient Unpacked bool }
type ManifestSerializer ¶
type MoveParams ¶
type SecretData ¶
type SecretIndex ¶
func (SecretIndex) String ¶
func (q SecretIndex) String() string
type SecretSerializer ¶
type Service ¶
type Service interface { 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.Tree, error) Remove(ctx context.Context, params RemoveParams) error Unpack(ctx context.Context) error Pack(ctx context.Context) error Sync(ctx context.Context) error Rollback(ctx context.Context) error }
func NewStoreService ¶
func NewStoreService( storeID maybe.Maybe[string], storageManager storage.Manager, encryptionManager encryption.Manager, manifestSerializer ManifestSerializer, secretSerializer SecretSerializer, dataProvider DataProvider, identityProvider IdentityProvider, ) Service
type WriteManifestParams ¶
type WriteManifestParams struct { Recipients []encryption.Recipient Encryption encryption.Encryption StorageType storage.Type }
Click to show internal directories.
Click to hide internal directories.