utils

package
v0.0.0-...-6574dfe Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitEncryption

func InitEncryption(key string) (err error)

func LoadFromYaml

func LoadFromYaml(path string, cfg interface{}) error

func Now

func Now() int64

func StrLen

func StrLen(s string) int

func ToDate

func ToDate(n int64) string

func ToDateTime

func ToDateTime(n int64) string

Types

type Config

type Config struct {
	EncryptionKey string `json:"encryption_key"  required:"true"`
}

type SymmetricEncryption

type SymmetricEncryption interface {
	Encrypt(plaintext []byte) (string, error)
	Decrypt(ciphertext string) ([]byte, error)
}
var Encryption SymmetricEncryption

Jump to

Keyboard shortcuts

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