Documentation ¶
Index ¶
- Constants
- func Decrypt(userSecret string, data, additionalData, nonce []byte) ([]byte, error)
- func Encrypt(userSecret string, data, additionalData []byte) ([]byte, []byte, error)
- func EncryptHistoryEntry(userSecret string, entry HistoryEntry) (shared.EncHistoryEntry, error)
- func EncryptionKey(userSecret string) []byte
- func GetHishtoryPath() string
- func UserId(key string) string
- func ValidateHishtoryPath() error
- type CustomColumn
- type CustomColumns
- type HistoryEntry
Constants ¶
View Source
const ( KdfUserID = "user_id" KdfEncryptionKey = "encryption_key" CONFIG_PATH = ".hishtory.config" DB_PATH = ".hishtory.db" )
Variables ¶
This section is empty.
Functions ¶
func EncryptHistoryEntry ¶
func EncryptHistoryEntry(userSecret string, entry HistoryEntry) (shared.EncHistoryEntry, error)
func EncryptionKey ¶
func GetHishtoryPath ¶
func GetHishtoryPath() string
func ValidateHishtoryPath ¶
func ValidateHishtoryPath() error
Types ¶
type CustomColumn ¶
type CustomColumns ¶
type CustomColumns []CustomColumn
func (*CustomColumns) Scan ¶
func (c *CustomColumns) Scan(value any) error
type HistoryEntry ¶
type HistoryEntry struct { LocalUsername string `json:"local_username" gorm:"uniqueIndex:compositeindex"` Hostname string `json:"hostname" gorm:"uniqueIndex:compositeindex"` Command string `json:"command" gorm:"uniqueIndex:compositeindex"` CurrentWorkingDirectory string `json:"current_working_directory" gorm:"uniqueIndex:compositeindex"` HomeDirectory string `json:"home_directory" gorm:"uniqueIndex:compositeindex"` ExitCode int `json:"exit_code" gorm:"uniqueIndex:compositeindex"` StartTime time.Time `json:"start_time" gorm:"uniqueIndex:compositeindex,index:start_time_index"` EndTime time.Time `json:"end_time" gorm:"uniqueIndex:compositeindex,index:end_time_index"` DeviceId string `json:"device_id" gorm:"uniqueIndex:compositeindex"` EntryId string `json:"entry_id" gorm:"uniqueIndex:compositeindex,uniqueIndex:entry_id_index"` CustomColumns CustomColumns `json:"custom_columns"` }
func DecryptHistoryEntry ¶
func DecryptHistoryEntry(userSecret string, entry shared.EncHistoryEntry) (HistoryEntry, error)
func (*HistoryEntry) GoString ¶
func (h *HistoryEntry) GoString() string
Click to show internal directories.
Click to hide internal directories.