records

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package records contains the HTTP adapter for Syfon's internal record representation. The domain value remains free of generated API and JSON behavior; this package owns the compatibility codec.

Index

Constants

View Source
const (
	RouteIndex                       = "/index"
	RouteIndexDetail                 = "/index/:id"
	RouteIndexControlledAccessRemove = "/index/:id/controlled-access/remove"
	RouteBulkHashes                  = "/index/bulk/hashes"
	RouteBulkDeleteHashes            = "/index/bulk/delete"
	RouteBulkSHA256                  = "/index/bulk/sha256/validity"
	RouteBulkSHA256Missing           = "/index/bulk/sha256/missing"
	RouteBulkCreate                  = "/index/bulk"
	RouteBulkDocs                    = "/index/bulk/documents"
	RouteBulkOverwrite               = "/index/bulk/overwrite"
)

Variables

This section is empty.

Functions

func Decode

func Decode(data []byte) (objects.Record, error)

Decode parses the internal record wire shape, including legacy did/hashes fields and unknown property round-tripping.

func Encode

func Encode(record objects.Record) ([]byte, error)

Encode writes the compatibility record representation. Unknown fields are copied first; canonical fields then override them and retired auth fields remain omitted.

func FromInternalRecord

func FromInternalRecord(value generated.InternalRecord, now time.Time) (objects.Record, error)

FromInternalRecord translates the generated internal-index record into a domain record. Scope policy is applied by the core caller after translation.

func RegisterRoutes

func RegisterRoutes(router fiber.Router, objectService *objectrecords.Service)

func ToInternalRecord

func ToInternalRecord(record objects.Record) generated.InternalRecord

ToInternalRecord translates a domain record to the generated internal-index response model.

func ToInternalRecordResponse

func ToInternalRecordResponse(record objects.Record) generated.InternalRecordResponse

ToInternalRecordResponse translates a domain record to the generated internal-index response envelope.

Types

This section is empty.

Jump to

Keyboard shortcuts

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