models

package
v0.0.0-...-54b4e54 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB
View Source
var Hc_uuid uuid.UUID

Functions

func DecryptAES

func DecryptAES(key []byte, ct string) string

func EncryptAES

func EncryptAES(key []byte, plaintext string) string

func InitDb

func InitDb()

func SetEncryptionKey

func SetEncryptionKey(k []byte)

Types

type EncryptedString

type EncryptedString string

func (*EncryptedString) Scan

func (es *EncryptedString) Scan(ctx context.Context, field *schema.Field, dst reflect.Value, dbValue interface{}) (err error)

ctx: contains request-scoped values field: the field using the serializer, contains GORM settings, struct tags dst: current model value dbValue: current field's value in database

func (EncryptedString) Value

func (es EncryptedString) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue interface{}) (interface{}, error)

ctx: contains request-scoped values field: the field using the serializer, contains GORM settings, struct tags dst: current model value fieldValue: current field's value of the dst

type HealthCheck

type HealthCheck struct {
	Id        int `gorm:"primary_key"`
	UUID      uuid.UUID
	UpdatedAt time.Time `gorm:"autoUpdateTime:true"`
}

type TodoItem

type TodoItem struct {
	Id          int `gorm:"primary_key"`
	Description string
	Completed   bool
	CreatedAt   time.Time `gorm:"autoCreateTime:true"`
	UpdatedAt   time.Time `gorm:"autoUpdateTime:true"`
}

Jump to

Keyboard shortcuts

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