simpledoc

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SimpleDocType processor.DocumentType = "simple-doc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleDoc

type SimpleDoc struct {
	Issuer string      `json:"issuer"`
	Info   string      `json:"info,omitempty"`
	Nested []SimpleDoc `json:"nested,omitempty"`
}

type SimpleDocProc

type SimpleDocProc struct{}

SimpleDocProc is a document processor for a simple document It is of JSON blob type

It should have an issuer field, that should match up with issuer URI in TrustInformation

SourceInformation should be propagated

Schema check should include: issuer (required) - string info (optional) - string nested - list of objects that match currnet schema

and no other fields

Example object is

{
	"issuer": "google.com",
	"info": "this is a cool document"
}

Example object with nested is

{
	"issuer": "google.com",
	"info": "this is a cool document",
	"nested": [{
		"issuer": "google.com",
		"info": "this is a cooler nested doc 1"
	},{
		"issuer": "google.com",
		"info": "this is a cooler nested doc 2"
 }]
}

func (*SimpleDocProc) GuessDocumentType

func (_ *SimpleDocProc) GuessDocumentType(blob []byte, f processor.FormatType) processor.DocumentType

func (*SimpleDocProc) Unpack

func (dp *SimpleDocProc) Unpack(d *processor.Document) ([]*processor.Document, error)

func (*SimpleDocProc) ValidateSchema

func (dp *SimpleDocProc) ValidateSchema(d *processor.Document) error

Jump to

Keyboard shortcuts

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