serviceimplementation

package
v0.0.0-...-e8a27b9 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteWorkerLocally

func ExecuteWorkerLocally(s DtaService, fileName string) string

ExecuteWorkerLocally executes the worker locally, and returns the transformation result as string

func InstanceIdString

func InstanceIdString(s DtaService, iids string) string

InstanceIdString executes the worker locally, and returns the transformation result as string

func MiidContained

func MiidContained(s DtaService, iids, miid string) bool

func Work

func Work(s *DtaService, input []byte, options *structpb.Struct) (string, []string, error)

Work returns an encoded JSON object containing the bytes count the number of bytes lines count the numnber of lines words count the number of words The Service returns the number of lines, words, and bytes contained in the input document

Types

type CountResults

type CountResults struct {
	Bytes int
	Lines int
	Words int
}

CountResults describes the results of the transformation

type DtaService

DtaService represents the service as offered by the DTA server

func (*DtaService) GetDocTransServer

func (s *DtaService) GetDocTransServer() *pb.GenDocTransServer

GetDocTransServer returns the server instance of this service

func (*DtaService) ListServices

func (s *DtaService) ListServices(ctx context.Context, req *empty.Empty) (*pb.ListServicesResponse, error)

ListServices lists the services, that this DTA instance is offering.

func (*DtaService) Options

func (*DtaService) Options(ctx context.Context, req *empty.Empty) (*pb.OptionsResponse, error)

Options is currently not implemented

func (*DtaService) TransformDocument

TransformDocument implements dtaservice.DTAServer

func (*DtaService) TransformDocumentPipe

TransformDocumentPipe is currently not implemented

Jump to

Keyboard shortcuts

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