database

package
v0.0.0-...-647a4b5 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const TablePrefix = "tenant_id_"

TablePrefix is needed for table name cause of postgres name convention -> no integers allowed

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DbConnection
}

func New

func New(ctx context.Context, config pgPkg.Config, listSizeInBytes int) (*Database, error)

type DbConnection

type DbConnection interface {
	AllocateIndexInCurrentList(ctx context.Context, tenantId string) (*entity.StatusData, error)
	RevokeCredentialInSpecifiedList(ctx context.Context, tenantId string, listId int, index int) error
	CreateTableForTenantIdIfNotExists(ctx context.Context, tenantId string) error
	GetStatusList(ctx context.Context, tenantId string, listId int) ([]byte, error)
	CacheList(ctx context.Context, cacheId string, list []byte) error
	Ping() bool
	Close()
}

Jump to

Keyboard shortcuts

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