storageschema

package
v0.0.0-...-b2ee15e Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MilliSecPrecision

func MilliSecPrecision(t time.Time) time.Time

MilliSecPrecision return the time to millisecond precision and in UTC. The extra precisions are truncated.

func StringMsToTime

func StringMsToTime(ms string) time.Time

StringMsToTime converts a string(Unix milliseconds) into a time. This is used for serialize timestamp into string when storing credential into vault.

func TimeToStringMs

func TimeToStringMs(time time.Time) (ms string)

TimeToStringMs converts a time into a string(Unix milliseconds). This is used for de-serialize timestamp from string when retrieve credential from vault.

func VaultSecretToServiceCred

func VaultSecretToServiceCred(owner, credID string, data VaultSecretData) (service.CredentialModel, error)

VaultSecretToServiceCred ...

Types

type VaultSecretData

type VaultSecretData map[string]interface{}

VaultSecretData is the data of KV secret in Vault

func ServiceCredToVaultSecret

func ServiceCredToVaultSecret(cred service.CredentialModel) (VaultSecretData, error)

ServiceCredToVaultSecret converts service model of credential into vault secret

Jump to

Keyboard shortcuts

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