v1

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PropertyKey_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TYPE_EMPTY",
		2: "TYPE_INTEGER",
		3: "TYPE_STRING",
		4: "TYPE_BOOLEAN",
		5: "TYPE_DECIMAL",
		6: "TYPE_TIMESTAMP",
	}
	PropertyKey_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"TYPE_EMPTY":       1,
		"TYPE_INTEGER":     2,
		"TYPE_STRING":      3,
		"TYPE_BOOLEAN":     4,
		"TYPE_DECIMAL":     5,
		"TYPE_TIMESTAMP":   6,
	}
)

Enum value maps for PropertyKey_Type.

View Source
var (
	Condition_Operator_name = map[int32]string{
		0: "OPERATOR_UNSPECIFIED",
		1: "OPERATOR_EQUALS",
		2: "OPERATOR_GREATER_THAN",
		3: "OPERATOR_GREATER_THAN_OR_EQUAL",
		4: "OPERATOR_LESS_THAN",
		5: "OPERATOR_LESS_THAN_OR_EQUAL",
	}
	Condition_Operator_value = map[string]int32{
		"OPERATOR_UNSPECIFIED":           0,
		"OPERATOR_EQUALS":                1,
		"OPERATOR_GREATER_THAN":          2,
		"OPERATOR_GREATER_THAN_OR_EQUAL": 3,
		"OPERATOR_LESS_THAN":             4,
		"OPERATOR_LESS_THAN_OR_EQUAL":    5,
	}
)

Enum value maps for Condition_Operator.

View Source
var File_vega_data_v1_data_proto protoreflect.FileDescriptor
View Source
var File_vega_data_v1_spec_proto protoreflect.FileDescriptor

Functions

func NewID

func NewID(signers []*Signer, filters []*Filter) string

Types

type Condition

type Condition struct {

	// comparator is the type of comparison to make on the value.
	Operator Condition_Operator `protobuf:"varint,1,opt,name=operator,proto3,enum=vega.data.v1.Condition_Operator" json:"operator,omitempty"`
	// value is used by the comparator.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Condition describes the condition that must be validated by the network

func (Condition) DeepClone

func (c Condition) DeepClone() *Condition

func (*Condition) Descriptor deprecated

func (*Condition) Descriptor() ([]byte, []int)

Deprecated: Use Condition.ProtoReflect.Descriptor instead.

func (*Condition) GetOperator

func (x *Condition) GetOperator() Condition_Operator

func (*Condition) GetValue

func (x *Condition) GetValue() string

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) ProtoReflect

func (x *Condition) ProtoReflect() protoreflect.Message

func (*Condition) Reset

func (x *Condition) Reset()

func (*Condition) String

func (x *Condition) String() string

type Condition_Operator

type Condition_Operator int32

Comparator describes the type of comparison.

const (
	// The default value
	Condition_OPERATOR_UNSPECIFIED Condition_Operator = 0
	// Verify if the property values are strictly equal or not.
	Condition_OPERATOR_EQUALS Condition_Operator = 1
	// Verify if the data source data value is greater than the Condition value.
	Condition_OPERATOR_GREATER_THAN Condition_Operator = 2
	// Verify if the data source data value is greater than or equal to the Condition
	// value.
	Condition_OPERATOR_GREATER_THAN_OR_EQUAL Condition_Operator = 3
	// Verify if the data source data value is less than the Condition value.
	Condition_OPERATOR_LESS_THAN Condition_Operator = 4
	// Verify if the data source data value is less or equal to than the Condition
	// value.
	Condition_OPERATOR_LESS_THAN_OR_EQUAL Condition_Operator = 5
)

func (Condition_Operator) Descriptor

func (Condition_Operator) Enum

func (Condition_Operator) EnumDescriptor deprecated

func (Condition_Operator) EnumDescriptor() ([]byte, []int)

Deprecated: Use Condition_Operator.Descriptor instead.

func (Condition_Operator) Number

func (Condition_Operator) String

func (x Condition_Operator) String() string

func (Condition_Operator) Type

type Data

type Data struct {
	Signers []*Signer `protobuf:"bytes,1,rep,name=signers,proto3" json:"signers,omitempty"`
	// data holds all the properties of the data
	Data []*Property `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
	// matched_specs_ids lists all the specs that matched this data.
	// When the array is empty, it means no spec matched this data.
	MatchedSpecIds []string `protobuf:"bytes,3,rep,name=matched_spec_ids,json=matchedSpecIds,proto3" json:"matched_spec_ids,omitempty"`
	// broadcast_at is the time at which the data was broadcast to the markets
	// with a matching spec.
	// It has no value when the date did not match any spec.
	// The value is a Unix timestamp in nanoseconds.
	BroadcastAt int64 `protobuf:"varint,4,opt,name=broadcast_at,json=broadcastAt,proto3" json:"broadcast_at,omitempty"`
	// contains filtered or unexported fields
}

Data describes valid source data that has been received by the node. It represents both matched and unmatched data.

func (Data) DeepClone

func (d Data) DeepClone() *Data

func (*Data) Descriptor deprecated

func (*Data) Descriptor() ([]byte, []int)

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetBroadcastAt

func (x *Data) GetBroadcastAt() int64

func (*Data) GetData

func (x *Data) GetData() []*Property

func (*Data) GetMatchedSpecIds

func (x *Data) GetMatchedSpecIds() []string

func (*Data) GetSigners

func (x *Data) GetSigners() []*Signer

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

func (x *Data) ProtoReflect() protoreflect.Message

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

type ETHAddress

type ETHAddress struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*ETHAddress) Descriptor deprecated

func (*ETHAddress) Descriptor() ([]byte, []int)

Deprecated: Use ETHAddress.ProtoReflect.Descriptor instead.

func (*ETHAddress) GetAddress

func (x *ETHAddress) GetAddress() string

func (*ETHAddress) ProtoMessage

func (*ETHAddress) ProtoMessage()

func (*ETHAddress) ProtoReflect

func (x *ETHAddress) ProtoReflect() protoreflect.Message

func (*ETHAddress) Reset

func (x *ETHAddress) Reset()

func (*ETHAddress) String

func (x *ETHAddress) String() string

type ExternalData

type ExternalData struct {
	Data *Data `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (ExternalData) DeepClone

func (o ExternalData) DeepClone() ExternalData

func (*ExternalData) Descriptor deprecated

func (*ExternalData) Descriptor() ([]byte, []int)

Deprecated: Use ExternalData.ProtoReflect.Descriptor instead.

func (*ExternalData) GetData

func (x *ExternalData) GetData() *Data

func (*ExternalData) ProtoMessage

func (*ExternalData) ProtoMessage()

func (*ExternalData) ProtoReflect

func (x *ExternalData) ProtoReflect() protoreflect.Message

func (*ExternalData) Reset

func (x *ExternalData) Reset()

func (*ExternalData) String

func (x *ExternalData) String() string

type Filter

type Filter struct {

	// key is the data source data property key targeted by the filter.
	Key *PropertyKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// conditions are the conditions that should be matched by the data to be
	// considered of interest.
	Conditions []*Condition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"`
	// contains filtered or unexported fields
}

Filter describes the conditions under which a data source data is considered of interest or not.

func (Filter) DeepClone

func (f Filter) DeepClone() *Filter

func (*Filter) Descriptor deprecated

func (*Filter) Descriptor() ([]byte, []int)

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetConditions

func (x *Filter) GetConditions() []*Condition

func (*Filter) GetKey

func (x *Filter) GetKey() *PropertyKey

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect

func (x *Filter) ProtoReflect() protoreflect.Message

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) String

func (x *Filter) String() string

type Property

type Property struct {

	// name is the name of the property.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// value is the value of the property.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Property describes one property of data spec with a key with its value.

func (Property) DeepClone

func (p Property) DeepClone() *Property

func (*Property) Descriptor deprecated

func (*Property) Descriptor() ([]byte, []int)

Deprecated: Use Property.ProtoReflect.Descriptor instead.

func (*Property) GetName

func (x *Property) GetName() string

func (*Property) GetValue

func (x *Property) GetValue() string

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) ProtoReflect

func (x *Property) ProtoReflect() protoreflect.Message

func (*Property) Reset

func (x *Property) Reset()

func (*Property) String

func (x *Property) String() string

type PropertyKey

type PropertyKey struct {

	// name is the name of the property.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// type is the type of the property.
	Type PropertyKey_Type `protobuf:"varint,2,opt,name=type,proto3,enum=vega.data.v1.PropertyKey_Type" json:"type,omitempty"`
	// contains filtered or unexported fields
}

PropertyKey describes the property key contained in an data source data.

func (PropertyKey) DeepClone

func (p PropertyKey) DeepClone() *PropertyKey

func (*PropertyKey) Descriptor deprecated

func (*PropertyKey) Descriptor() ([]byte, []int)

Deprecated: Use PropertyKey.ProtoReflect.Descriptor instead.

func (*PropertyKey) GetName

func (x *PropertyKey) GetName() string

func (*PropertyKey) GetType

func (x *PropertyKey) GetType() PropertyKey_Type

func (*PropertyKey) ProtoMessage

func (*PropertyKey) ProtoMessage()

func (*PropertyKey) ProtoReflect

func (x *PropertyKey) ProtoReflect() protoreflect.Message

func (*PropertyKey) Reset

func (x *PropertyKey) Reset()

func (*PropertyKey) String

func (x *PropertyKey) String() string

type PropertyKey_Type

type PropertyKey_Type int32

Type describes the type of properties that are supported by the data source engine.

const (
	// The default value.
	PropertyKey_TYPE_UNSPECIFIED PropertyKey_Type = 0
	// Any type.
	PropertyKey_TYPE_EMPTY PropertyKey_Type = 1
	// Integer type.
	PropertyKey_TYPE_INTEGER PropertyKey_Type = 2
	// String type.
	PropertyKey_TYPE_STRING PropertyKey_Type = 3
	// Boolean type.
	PropertyKey_TYPE_BOOLEAN PropertyKey_Type = 4
	// Any floating point decimal type.
	PropertyKey_TYPE_DECIMAL PropertyKey_Type = 5
	// Timestamp date type.
	PropertyKey_TYPE_TIMESTAMP PropertyKey_Type = 6
)

func (PropertyKey_Type) Descriptor

func (PropertyKey_Type) Enum

func (PropertyKey_Type) EnumDescriptor deprecated

func (PropertyKey_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use PropertyKey_Type.Descriptor instead.

func (PropertyKey_Type) Number

func (PropertyKey_Type) String

func (x PropertyKey_Type) String() string

func (PropertyKey_Type) Type

type PubKey

type PubKey struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

PubKey is the public key that signed this data. Different public keys coming from different sources will be further separated.

func (*PubKey) Descriptor deprecated

func (*PubKey) Descriptor() ([]byte, []int)

Deprecated: Use PubKey.ProtoReflect.Descriptor instead.

func (*PubKey) GetKey

func (x *PubKey) GetKey() string

func (*PubKey) ProtoMessage

func (*PubKey) ProtoMessage()

func (*PubKey) ProtoReflect

func (x *PubKey) ProtoReflect() protoreflect.Message

func (*PubKey) Reset

func (x *PubKey) Reset()

func (*PubKey) String

func (x *PubKey) String() string

type Signer

type Signer struct {

	// Types that are assignable to Signer:
	//
	//	*Signer_PubKey
	//	*Signer_EthAddress
	Signer isSigner_Signer `protobuf_oneof:"signer"`
	// contains filtered or unexported fields
}

func (Signer) DeepClone

func (s Signer) DeepClone() *Signer

func (*Signer) Descriptor deprecated

func (*Signer) Descriptor() ([]byte, []int)

Deprecated: Use Signer.ProtoReflect.Descriptor instead.

func (*Signer) GetEthAddress

func (x *Signer) GetEthAddress() *ETHAddress

func (*Signer) GetPubKey

func (x *Signer) GetPubKey() *PubKey

func (*Signer) GetSigner

func (m *Signer) GetSigner() isSigner_Signer

func (*Signer) ProtoMessage

func (*Signer) ProtoMessage()

func (*Signer) ProtoReflect

func (x *Signer) ProtoReflect() protoreflect.Message

func (*Signer) Reset

func (x *Signer) Reset()

func (*Signer) String

func (x *Signer) String() string

type Signer_EthAddress

type Signer_EthAddress struct {
	// in case of an open oracle - Ethereum address will be submitted
	EthAddress *ETHAddress `protobuf:"bytes,2,opt,name=eth_address,json=ethAddress,proto3,oneof"`
}

type Signer_PubKey

type Signer_PubKey struct {
	// pubKeys is the list of authorized public keys that signed the data for this
	// source. All the public keys in the data should be contained in these
	// public keys.
	PubKey *PubKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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