vault

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadRecordTypes

func LoadRecordTypes(keeperAuth auth.IKeeperAuth, storage storage.IEntityStorage[IStorageRecordType, int64]) (err error)

Types

type ICustomField

type ICustomField interface {
	Name() string
	Value() string
	Type() string
}

type IKeeperRecord

type IKeeperRecord interface {
	RecordUid() string
	Version() int32
	Title() string
	TimeModified() int64
}

type IPasswordRecord

type IPasswordRecord interface {
	IKeeperRecord
	Login() string
	Password() string
	Link() string
	Notes() string
	Custom() []ICustomField
	Totp() string
	SetTitle(string)
	SetLogin(string)
	SetPassword(string)
	SetLink(string)
	SetNotes(string)
	SetTotp(string)
	SetCustomField(string, string)
}

type IPendingShareStoragePlugin

type IPendingShareStoragePlugin interface {
	PendingShares() []string
	AddPendingShares([]string)
}

type IRecordInfo

type IRecordInfo interface {
	RecordUid() string
	Version() int32
	Revision() int64
	RecordType() string
	Title() string
	Url() string
	Description() string
	Owner() bool
	Shared() bool
	HasAttachments() bool
}

type IRecordType

type IRecordType interface {
	Id() int64
	Name() string
	Scope() RecordTypeScope
	Description() string
	Fields() []IRecordTypeField
	storage.IUid[string]
}

func ParseRecordType

func ParseRecordType(srt IStorageRecordType) (irt IRecordType, err error)

type IRecordTypeField

type IRecordTypeField interface {
	FieldType() string
	Label() string
	Required() bool
}

type IStorageBreachWatchRecord

type IStorageBreachWatchRecord interface {
	RecordUid() string
	Data() []byte
	Type() int32
	Revision() int64
	storage.IUid[string]
}

type IStorageFolder

type IStorageFolder interface {
	FolderUid() string
	ParentUid() string
	SharedFolderUid() string
	FolderType() string
	FolderKey() []byte
	KeyType() int32
	Data() []byte
	Revision() int64
	storage.IUid[string]
}

type IStorageFolderRecord

type IStorageFolderRecord interface {
	FolderUid() string // subject
	RecordUid() string // object
	storage.IUidLink[string, string]
}

type IStorageNonSharedData

type IStorageNonSharedData interface {
	RecordUid() string
	Data() []byte
	storage.IUid[string]
}

type IStorageRecord

type IStorageRecord interface {
	RecordUid() string
	Revision() int64
	Version() int32
	ModifiedTime() int64
	Data() []byte
	Extra() []byte
	UData() string
	Shared() bool
	SetShared(bool)
	storage.IUid[string]
}

type IStorageRecordKey

type IStorageRecordKey interface {
	RecordUid() string
	EncrypterUid() string
	KeyType() int32
	RecordKey() []byte
	CanShare() bool
	CanEdit() bool
	Owner() bool
	OwnerAccountUid() string
	ExpirationTime() int64
	storage.IUidLink[string, string]
}

type IStorageRecordType

type IStorageRecordType interface {
	Id() int64
	Scope() int32
	Content() string
	storage.IUid[int64]
}

type IStorageSecurityData

type IStorageSecurityData interface {
	RecordUid() string
	Revision() int64
	storage.IUid[string]
}

type IStorageSharedFolder

type IStorageSharedFolder interface {
	SharedFolderUid() string
	Revision() int64
	Name() []byte
	Data() []byte
	DefaultManageRecords() bool
	DefaultManageUsers() bool
	DefaultCanEdit() bool
	DefaultCanShare() bool
	OwnerAccountUid() string
	storage.IUid[string]
}

type IStorageSharedFolderKey

type IStorageSharedFolderKey interface {
	SharedFolderUid() string
	EncrypterUid() string
	KeyType() int32
	SharedFolderKey() []byte
	storage.IUidLink[string, string]
}

type IStorageSharedFolderPermission

type IStorageSharedFolderPermission interface {
	SharedFolderUid() string
	UserUid() string
	UserType() int32
	ManageRecords() bool
	ManageUsers() bool
	ExpirationTime() int64
	storage.IUidLink[string, string]
}

type IStorageTeam

type IStorageTeam interface {
	TeamUid() string
	Name() string
	TeamKey() []byte
	KeyType() int32
	TeamPrivateKey() []byte
	RestrictEdit() bool
	RestrictShare() bool
	RestrictView() bool
	storage.IUid[string]
}

type IStorageUserEmail

type IStorageUserEmail interface {
	AccountUid() string
	Email() string
	storage.IUidLink[string, string]
}

type IUserSettings

type IUserSettings interface {
	ContinuationToken() []byte
	ProfileData() []byte
	ProfileName() string
	ProfileUrl() string
	SetContinuationToken([]byte)
	SetProfileData([]byte)
	SetProfileName(string)
	SetProfileUrl(string)
}

type IVaultData

type IVaultData interface {
	VaultStorage() IVaultStorage
	ClientKey() []byte
	GetAllRecords(func(IRecordInfo) bool)
	GetRecord(string) IRecordInfo
	GetRecordKey(string) []byte
	RecordCount() int
}

type RebuildTask

type RebuildTask interface {
	IsFullSync() bool
	Records() api.Set[string]
	SharedFolders() api.Set[string]
	AddRecords([]string)
	AddSharedFolders([]string)
}

type RecordTypeScope

type RecordTypeScope int32
const (
	RecordTypeScope_Standard         RecordTypeScope = 0
	RecordTypeScope_User             RecordTypeScope = 1
	RecordTypeScope_Enterprise       RecordTypeScope = 2
	RecordTypeScope_Pam              RecordTypeScope = 3
	RecordTypeScope_PamConfiguration RecordTypeScope = 4
)

type SharedFolderUserType

type SharedFolderUserType int32
const (
	SharedFolderUserType_User SharedFolderUserType = 1
	SharedFolderUserType_Team SharedFolderUserType = 2
)

type StorageKeyType

type StorageKeyType int32
const (
	StorageKeyType_UserClientKey_AES_GCM   StorageKeyType = 1 // AES GSM: user client key
	StorageKeyType_User_RSA_PrivateKey     StorageKeyType = 2 // RSA: user RSA key
	StorageKeyType_User_EC_PrivateKey      StorageKeyType = 3 // EC: user EC private key
	StorageKeyType_SharedFolderKey_AES_Any StorageKeyType = 4
	StorageKeyType_TeamKey_AES_GCM         StorageKeyType = 5
	StorageKeyType_TeamRsaPrivateKey       StorageKeyType = 6
	StorageKeyType_RecordKey_AES_GCM       StorageKeyType = 7
)

Jump to

Keyboard shortcuts

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