records

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 16 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 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

type RecordsServer added in v0.4.1

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

func NewRecordsServer added in v0.4.1

func NewRecordsServer(objectService *objectrecords.Service) *RecordsServer

func (*RecordsServer) InternalBulkCreate added in v0.4.1

func (s *RecordsServer) InternalBulkCreate(c fiber.Ctx) error

func (*RecordsServer) InternalBulkDeleteHashes added in v0.4.1

func (s *RecordsServer) InternalBulkDeleteHashes(c fiber.Ctx) error

func (*RecordsServer) InternalBulkDocuments added in v0.4.1

func (s *RecordsServer) InternalBulkDocuments(c fiber.Ctx) error

func (*RecordsServer) InternalBulkHashes added in v0.4.1

func (s *RecordsServer) InternalBulkHashes(c fiber.Ctx) error

func (*RecordsServer) InternalBulkMissingSHA256 added in v0.4.1

func (s *RecordsServer) InternalBulkMissingSHA256(c fiber.Ctx) error

func (*RecordsServer) InternalBulkOverwrite added in v0.4.1

func (s *RecordsServer) InternalBulkOverwrite(c fiber.Ctx) error

func (*RecordsServer) InternalBulkSHA256Validity added in v0.4.1

func (s *RecordsServer) InternalBulkSHA256Validity(c fiber.Ctx) error

func (*RecordsServer) InternalCreate added in v0.4.1

func (s *RecordsServer) InternalCreate(c fiber.Ctx) error

func (*RecordsServer) InternalDelete added in v0.4.1

func (s *RecordsServer) InternalDelete(c fiber.Ctx, _ string) error

func (*RecordsServer) InternalDeleteByQuery added in v0.4.1

func (s *RecordsServer) InternalDeleteByQuery(c fiber.Ctx, _ internalapi.InternalDeleteByQueryParams) error

func (*RecordsServer) InternalGet added in v0.4.1

func (s *RecordsServer) InternalGet(c fiber.Ctx, _ string) error

func (*RecordsServer) InternalList added in v0.4.1

func (*RecordsServer) InternalRemoveControlledAccess added in v0.4.1

func (s *RecordsServer) InternalRemoveControlledAccess(c fiber.Ctx, _ string) error

func (*RecordsServer) InternalUpdate added in v0.4.1

func (s *RecordsServer) InternalUpdate(c fiber.Ctx, _ string) error

Jump to

Keyboard shortcuts

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