contracts

package
v0.0.0-...-17e6b21 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditContract

type AuditContract struct {
	contractapi.Contract
	// contains filtered or unexported fields
}

func (*AuditContract) CreateAuditRecord

func (c *AuditContract) CreateAuditRecord(ctx context.Context, record AuditRecord) error

func (*AuditContract) GetAuditTrail

func (c *AuditContract) GetAuditTrail(ctx context.Context, entityID string) ([]AuditRecord, error)

type AuditRecord

type AuditRecord struct {
	ID          string    `json:"id"`
	EntityType  string    `json:"entityType"`
	EntityID    string    `json:"entityId"`
	Action      string    `json:"action"`
	Timestamp   time.Time `json:"timestamp"`
	UserID      string    `json:"userId"`
	PrevHash    string    `json:"prevHash"`
	CurrentHash string    `json:"currentHash"`
	Signature   string    `json:"signature"`
	PublicKey   string    `json:"publicKey"`
}

Jump to

Keyboard shortcuts

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