postgresql

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package postgresql defines the IssuanceChainStorage type, which implements IssuanceChainStorage interface with FindByKey and Add methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IssuanceChainStorage

type IssuanceChainStorage struct {
	// contains filtered or unexported fields
}

IssuanceChainStorage is a PostgreSQL implementation of the IssuanceChainStorage interface.

func NewIssuanceChainStorage

func NewIssuanceChainStorage(_ context.Context, dbConn string) *IssuanceChainStorage

NewIssuanceChainStorage takes the database connection string as the input and return the IssuanceChainStorage.

func (*IssuanceChainStorage) Add

func (s *IssuanceChainStorage) Add(ctx context.Context, key []byte, chain []byte) error

Add inserts the key-value pair of issuance chain.

func (*IssuanceChainStorage) FindByKey

func (s *IssuanceChainStorage) FindByKey(ctx context.Context, key []byte) ([]byte, error)

FindByKey returns the key-value pair of issuance chain by the key.

Jump to

Keyboard shortcuts

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