Documentation ¶
Index ¶
- func Start(network, address string, errChan chan error) error
- func Stop() error
- type Builder
- func (t *Builder) AppendDocumentPart(args *BuilderAppendDocumentPartArgs, notUsed *int) error
- func (t *Builder) AppendSignature(args *BuilderAppendSignatureArgs, notUsed *int) error
- func (t *Builder) Build(args *BuilderBuildArgs, notUsed *int) error
- func (t *Builder) Drop(args *BuilderDropArgs, notUsed *int) error
- func (t *Builder) GetDDCPart(args *BuilderGetDDCPartArgs, resp *BuilderGetDDCPartResp) error
- func (t *Builder) Register(args *BuilderRegisterArgs, id *string) error
- type BuilderAppendDocumentPartArgs
- type BuilderAppendSignatureArgs
- type BuilderBuildArgs
- type BuilderDropArgs
- type BuilderGetDDCPartArgs
- type BuilderGetDDCPartResp
- type BuilderRegisterArgs
- type Extractor
- func (t *Extractor) AppendDDCPart(args *ExtractorAppendDDCPartArgs, notUsed *int) error
- func (t *Extractor) Drop(args *ExtractorDropArgs, notUsed *int) error
- func (t *Extractor) GetDocumentPart(args *ExtractorGetDocumentPartArgs, resp *ExtractorGetDocumentPartResp) error
- func (t *Extractor) GetSignature(args *ExtractorGetSignatureArgs, resp *ExtractorGetSignatureResp) error
- func (t *Extractor) Parse(args *ExtractorParseArgs, documentFileName *string) error
- func (t *Extractor) Register(args *ExtractorRegisterArgs, id *string) error
- type ExtractorAppendDDCPartArgs
- type ExtractorDropArgs
- type ExtractorGetDocumentPartArgs
- type ExtractorGetDocumentPartResp
- type ExtractorGetSignatureArgs
- type ExtractorGetSignatureResp
- type ExtractorParseArgs
- type ExtractorRegisterArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder int
Builder can be exported via net/rpc and used to build DDC
func (*Builder) AppendDocumentPart ¶
func (t *Builder) AppendDocumentPart(args *BuilderAppendDocumentPartArgs, notUsed *int) error
AppendDocumentPart to the specified builder slot
func (*Builder) AppendSignature ¶
func (t *Builder) AppendSignature(args *BuilderAppendSignatureArgs, notUsed *int) error
AppendSignature to the specified builder slot
func (*Builder) Build ¶
func (t *Builder) Build(args *BuilderBuildArgs, notUsed *int) error
Build DDC in the specified slot, should be called once after all data've been passed to the slot via calls to AppendDocumentPart and AppendSignature
func (*Builder) Drop ¶
func (t *Builder) Drop(args *BuilderDropArgs, notUsed *int) error
Drop DDC in the specified slot
func (*Builder) GetDDCPart ¶
func (t *Builder) GetDDCPart(args *BuilderGetDDCPartArgs, resp *BuilderGetDDCPartResp) error
GetDDCPart retrieves parts of the DDC in the specified slot successively, should be called after Build
type BuilderAppendDocumentPartArgs ¶
type BuilderAppendDocumentPartArgs struct { // ID of the builder slot to use ID string // Part of the original document Bytes []byte }
BuilderAppendDocumentPartArgs used to pass data to Builder.AppendDocumentPart
type BuilderAppendSignatureArgs ¶
type BuilderAppendSignatureArgs struct { // ID of the builder slot to use ID string // SignatureInfo describes the signature SignatureInfo ddc.SignatureInfo }
BuilderAppendSignatureArgs used to pass data to Builder.AppendSignature
type BuilderBuildArgs ¶
type BuilderBuildArgs struct { // ID of the builder slot to use ID string // CreationDate should be current date and time in format "2021.01.31 13:45:00 UTC+6" // converted to time zone of Nur-Sultan. CreationDate string // BuilderName would be embedded into DDC visualization BuilderName string // HowToVerify should provide instructions to verify DDC HowToVerify string }
BuilderBuildArgs used to pass data to Builder.Build
type BuilderDropArgs ¶
type BuilderDropArgs struct { // ID of the builder slot to use ID string }
BuilderDropArgs used to pass data to Builder.GetDDCPart
type BuilderGetDDCPartArgs ¶
type BuilderGetDDCPartArgs struct { // ID of the builder slot to use ID string // MaxPartSize should be used to limit the size of the part MaxPartSize int }
BuilderGetDDCPartArgs used to pass data to Builder.GetDDCPart
type BuilderGetDDCPartResp ¶
type BuilderGetDDCPartResp struct { // Part of DDC not larger than MaxPartSize Part []byte // IsFinal signals that there are no more parts to return IsFinal bool }
BuilderGetDDCPartResp used to retrieve data from Builder.GetDDCPart
type BuilderRegisterArgs ¶
type BuilderRegisterArgs struct { // Title of the document Title string // Description of the document Description string // FileName of the original document FileName string }
BuilderRegisterArgs used to pass data to Builder.Register
type Extractor ¶
type Extractor int
Extractor can be exported via net/rpc and used to extract embedded files from DDC
func (*Extractor) AppendDDCPart ¶
func (t *Extractor) AppendDDCPart(args *ExtractorAppendDDCPartArgs, notUsed *int) error
AppendDDCPart to the specified extractor slot
func (*Extractor) Drop ¶
func (t *Extractor) Drop(args *ExtractorDropArgs, notUsed *int) error
Drop DDC in the specified slot
func (*Extractor) GetDocumentPart ¶
func (t *Extractor) GetDocumentPart(args *ExtractorGetDocumentPartArgs, resp *ExtractorGetDocumentPartResp) error
GetDocumentPart retrieves parts of the original document in the specified slot successively, should be called after Parse
func (*Extractor) GetSignature ¶
func (t *Extractor) GetSignature(args *ExtractorGetSignatureArgs, resp *ExtractorGetSignatureResp) error
GetSignature retrieves signatures that've benn embedded into DDC successively, should be called after Parse
type ExtractorAppendDDCPartArgs ¶
type ExtractorAppendDDCPartArgs struct { // ID of the extractor slot to use ID string // Part of the DDC Part []byte }
ExtractorAppendDDCPartArgs used to pass data to Extractor.AppendDDCPart
type ExtractorDropArgs ¶
type ExtractorDropArgs struct { // ID of the extractor slot to use ID string }
ExtractorDropArgs used to pass data to Extractor.GetDDCPart
type ExtractorGetDocumentPartArgs ¶
type ExtractorGetDocumentPartArgs struct { // ID of the extractor slot to use ID string // MaxPartSize should be used to limit the size of the part MaxPartSize int // Rewind to the beginning of the document Rewind bool }
ExtractorGetDocumentPartArgs used to pass data to Extractor.GetDocumentPart
type ExtractorGetDocumentPartResp ¶
type ExtractorGetDocumentPartResp struct { // Part of the original document not larger than MaxPartSize Part []byte // IsFinal signals that there are no more parts to return IsFinal bool }
ExtractorGetDocumentPartResp used to retrieve data from Extractor.GetDocumentPart
type ExtractorGetSignatureArgs ¶
type ExtractorGetSignatureArgs struct { // ID of the extractor slot to use ID string }
ExtractorGetSignatureArgs used to pass data to Extractor.GetSignature
type ExtractorGetSignatureResp ¶
type ExtractorGetSignatureResp struct { // Signature bytes and file name Signature ddc.AttachedFile // IsFinal signals that there are no more signatures to return IsFinal bool }
ExtractorGetSignatureResp used to retrieve data from Extractor.GetSignature
type ExtractorParseArgs ¶
type ExtractorParseArgs struct { // ID of the extractor slot to use ID string }
ExtractorParseArgs used to pass data to Extractor.Parse
type ExtractorRegisterArgs ¶
type ExtractorRegisterArgs struct { }
ExtractorRegisterArgs used to pass data to Extractor.Register