hansken_extraction_plugin.framework.DataMessages.proto Maven / Gradle / Ivy
syntax = "proto3";
// UPDATE NOTICE
//
// If you make changes to the proto definitions (add, update, delete)s, please
// also update VersionUitl.java and apiversion.properties as described in the
// projects README.md
package org.hansken.extraction.plugin.grpc;
option java_multiple_files = true;
option java_package = "org.hansken.extraction.plugin.grpc";
import "google/protobuf/any.proto";
/**
* This proto file contains message definitions which represent domain objects, such
* as a trace, a property of a trace, an author, etc...
*/
/**
* The type of the plugin. Used to determine on the client (Hansken) side
* which type of plugin we are dealing with.
*/
enum RpcPluginType {
ExtractionPlugin = 0;
MetaExtractionPlugin = 1;
DeferredExtractionPlugin = 2;
}
/**
* Message that is used to describe the extraction plugin,
* used as reply in the the info() call.
*/
message RpcPluginInfo {
RpcPluginType type = 1;
string apiVersion = 2;
/**
* The name of the plugin.
* @deprecated since version 0.3.1: use id instead.
*/
string name = 3 [deprecated=true];
string version = 4;
string description = 5;
RpcAuthor author = 6;
RpcMaturity maturity = 7;
/**
* A Matcher specifies which traces can be processed by an extraction plugin.
* A Matcher is written in HQL-Lite syntax.
*/
string matcher = 8;
/** URL to a webpage that belongs to this plugin. This can also be a link to a webpage of the git repository of the remote plugin. */
string webpageUrl = 9;
/**
* When using a deferred extraction plugin, this number indicates the maximum number of iterations the process step is deferred.
* This value should be between 1 and 20. It is ignored for other types of extraction plugins.
*/
int32 deferredIterations = 10;
RpcPluginIdentifier id = 11;
/**
* The licence name of the plugin. For example 'Apache License 2.0'.
*/
string license = 13;
RpcPluginResources resources = 14;
}
/**
* Message to describe the identifier of a plugin. A plugin identifier must be unique and consists of domain/category/name.
*/
message RpcPluginIdentifier {
string domain = 1;
string category = 2;
string name = 3;
}
/**
* Message that is used to describe the author of a plugin.
*/
message RpcAuthor {
string name = 1;
string email = 2;
string organisation = 3;
}
/**
* Value to indicate the maturity level of a plugin.
*/
enum RpcMaturity {
ProofOfConcept = 0;
ReadyForTest = 1;
ProductionReady = 2;
}
/**
* Message that is used to describe the amount of resources a plugin is allowed to use.
*/
message RpcPluginResources {
float maxCpu = 1;
uint32 maxMemory = 2;
uint32 maxWorkers = 3;
}
/**
* The name and value of a property.
*/
message RpcTraceProperty {
string name = 1;
google.protobuf.Any value = 2;
}
/**
* The base name of the Tracelet and its properties.
*/
message RpcTracelet {
string name = 1;
repeated RpcTraceProperty properties = 2;
}
/**
* A description of a trace, containing the set of types and properties of that trace. It also
* contains an id. This is a String consisting of numbers separated with a dash,
* each consecutive numbers representing a level deeper in the trace tree.
*
* For example, if this trace has an id of {@code '0-0-1-2'}, the parent of this
* trace has an id of {@code '0-0-1'} and the root trace has an id of {@code '0'}.
* It is only used internally in order to verify that we are operating on the correct trace.
*/
message RpcTrace {
string id = 1;
repeated string types = 2;
repeated RpcTraceProperty properties = 3;
repeated RpcTracelet tracelets = 4;
repeated RpcDataStreamTransformation transformations = 5;
}
/**
* A message containing an ordered list of Transformations that will be appended to the hierarchy of transformations
* of a trace, for a certain dataType.
*
* The first transformation in the list will be the parent of the second transformation and so forth.
*/
message RpcDataStreamTransformation {
string dataType = 1;
repeated RpcTransformation transformations = 2;
}
/**
* A description of a searched trace belonging to a deferred plugin. It contains an id. This is a
* String consisting of numbers separated with a dash, each consecutive numbers representing a level
* deeper in the trace tree. It also contains a set of types and a set of contexts.
*/
message RpcSearchTrace {
string id = 1;
repeated string types = 2;
repeated RpcTraceProperty properties = 3;
repeated RpcRandomAccessDataMeta data = 4;
}
/**
* A description of the data context which contains information of the data
* stream of a Trace that is currently being processed.
*/
message RpcDataContext {
string dataType = 1;
RpcRandomAccessDataMeta data = 2;
}
/**
* A description of a data sequence from which can be read, see RpcCallMessages#Read.
*/
message RpcRandomAccessDataMeta {
string type = 1;
int64 size = 2;
bytes firstBytes = 3;
}
/**
* Message containing one of several types of Transformations, like a super-class. Currently only
* RpcRangedTransformation is supported.
*
* Transformations are pointers to actual raw data. They describe how data can be obtained by reading on certain
* positions, using decryption, or combinations of these. The benefit of using Transformations is that they take up
* less space than the actual data.
*/
message RpcTransformation {
oneof value {
RpcRangedTransformation rangedTransformation = 1;
}
}
/**
* Ranged Transformation, describes a list of ranges of bytes.
*/
message RpcRangedTransformation {
repeated RpcRange ranges = 1;
}
/**
* Ranged Transformation, describes a range of bytes.
*/
message RpcRange {
int64 offset = 1;
int64 length = 2;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy