Documentation ¶
Index ¶
- Variables
- type Condition
- func (c Condition) DeepClone() *Condition
- func (*Condition) Descriptor() ([]byte, []int)
- func (m *Condition) GetOperator() Condition_Operator
- func (m *Condition) GetValue() string
- func (*Condition) ProtoMessage()
- func (m *Condition) Reset()
- func (m *Condition) String() string
- func (this *Condition) Validate() error
- func (m *Condition) XXX_DiscardUnknown()
- func (m *Condition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Condition) XXX_Merge(src proto.Message)
- func (m *Condition) XXX_Size() int
- func (m *Condition) XXX_Unmarshal(b []byte) error
- type Condition_Operator
- type Filter
- func (f Filter) DeepClone() *Filter
- func (*Filter) Descriptor() ([]byte, []int)
- func (m *Filter) GetConditions() []*Condition
- func (m *Filter) GetKey() *PropertyKey
- func (*Filter) ProtoMessage()
- func (m *Filter) Reset()
- func (m *Filter) String() string
- func (this *Filter) Validate() error
- func (m *Filter) XXX_DiscardUnknown()
- func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Filter) XXX_Merge(src proto.Message)
- func (m *Filter) XXX_Size() int
- func (m *Filter) XXX_Unmarshal(b []byte) error
- type OracleData
- func (o OracleData) DeepClone() *OracleData
- func (*OracleData) Descriptor() ([]byte, []int)
- func (m *OracleData) GetBroadcastAt() int64
- func (m *OracleData) GetData() []*Property
- func (m *OracleData) GetMatchedSpecIds() []string
- func (m *OracleData) GetPubKeys() []string
- func (*OracleData) ProtoMessage()
- func (m *OracleData) Reset()
- func (m *OracleData) String() string
- func (this *OracleData) Validate() error
- func (m *OracleData) XXX_DiscardUnknown()
- func (m *OracleData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OracleData) XXX_Merge(src proto.Message)
- func (m *OracleData) XXX_Size() int
- func (m *OracleData) XXX_Unmarshal(b []byte) error
- type OracleSpec
- func (o OracleSpec) DeepClone() *OracleSpec
- func (*OracleSpec) Descriptor() ([]byte, []int)
- func (m *OracleSpec) GetCreatedAt() int64
- func (m *OracleSpec) GetFilters() []*Filter
- func (m *OracleSpec) GetId() string
- func (m *OracleSpec) GetPubKeys() []string
- func (m *OracleSpec) GetStatus() OracleSpec_Status
- func (m *OracleSpec) GetUpdatedAt() int64
- func (OracleSpec) IsEvent()
- func (*OracleSpec) ProtoMessage()
- func (m *OracleSpec) Reset()
- func (m *OracleSpec) String() string
- func (this *OracleSpec) Validate() error
- func (m *OracleSpec) XXX_DiscardUnknown()
- func (m *OracleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OracleSpec) XXX_Merge(src proto.Message)
- func (m *OracleSpec) XXX_Size() int
- func (m *OracleSpec) XXX_Unmarshal(b []byte) error
- type OracleSpecConfiguration
- func (o OracleSpecConfiguration) DeepClone() *OracleSpecConfiguration
- func (*OracleSpecConfiguration) Descriptor() ([]byte, []int)
- func (m *OracleSpecConfiguration) GetFilters() []*Filter
- func (m *OracleSpecConfiguration) GetPubKeys() []string
- func (*OracleSpecConfiguration) ProtoMessage()
- func (m *OracleSpecConfiguration) Reset()
- func (m *OracleSpecConfiguration) String() string
- func (o *OracleSpecConfiguration) ToOracleSpec() *OracleSpec
- func (this *OracleSpecConfiguration) Validate() error
- func (m *OracleSpecConfiguration) XXX_DiscardUnknown()
- func (m *OracleSpecConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OracleSpecConfiguration) XXX_Merge(src proto.Message)
- func (m *OracleSpecConfiguration) XXX_Size() int
- func (m *OracleSpecConfiguration) XXX_Unmarshal(b []byte) error
- type OracleSpec_Status
- type Property
- func (p Property) DeepClone() *Property
- func (*Property) Descriptor() ([]byte, []int)
- func (m *Property) GetName() string
- func (m *Property) GetValue() string
- func (*Property) ProtoMessage()
- func (m *Property) Reset()
- func (m *Property) String() string
- func (this *Property) Validate() error
- func (m *Property) XXX_DiscardUnknown()
- func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Property) XXX_Merge(src proto.Message)
- func (m *Property) XXX_Size() int
- func (m *Property) XXX_Unmarshal(b []byte) error
- type PropertyKey
- func (p PropertyKey) DeepClone() *PropertyKey
- func (*PropertyKey) Descriptor() ([]byte, []int)
- func (m *PropertyKey) GetName() string
- func (m *PropertyKey) GetType() PropertyKey_Type
- func (*PropertyKey) ProtoMessage()
- func (m *PropertyKey) Reset()
- func (m *PropertyKey) String() string
- func (this *PropertyKey) Validate() error
- func (m *PropertyKey) XXX_DiscardUnknown()
- func (m *PropertyKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PropertyKey) XXX_Merge(src proto.Message)
- func (m *PropertyKey) XXX_Size() int
- func (m *PropertyKey) XXX_Unmarshal(b []byte) error
- type PropertyKey_Type
Constants ¶
This section is empty.
Variables ¶
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",
}
var 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,
}
var OracleSpec_Status_name = map[int32]string{
0: "STATUS_UNSPECIFIED",
1: "STATUS_ACTIVE",
2: "STATUS_DEACTIVATED",
}
var OracleSpec_Status_value = map[string]int32{
"STATUS_UNSPECIFIED": 0,
"STATUS_ACTIVE": 1,
"STATUS_DEACTIVATED": 2,
}
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",
}
var 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,
}
Functions ¶
This section is empty.
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=oracles.v1.Condition_Operator" json:"operator,omitempty"` // value is used by the comparator. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Condition describes the condition that must be validated by the
func (*Condition) Descriptor ¶
func (*Condition) GetOperator ¶
func (m *Condition) GetOperator() Condition_Operator
func (*Condition) ProtoMessage ¶
func (*Condition) ProtoMessage()
func (*Condition) XXX_DiscardUnknown ¶
func (m *Condition) XXX_DiscardUnknown()
func (*Condition) XXX_Marshal ¶
func (*Condition) XXX_Unmarshal ¶
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 oracle data value is greater than the Condition value. Condition_OPERATOR_GREATER_THAN Condition_Operator = 2 // Verify if the oracle data value is greater than or equal to the Condition // value. Condition_OPERATOR_GREATER_THAN_OR_EQUAL Condition_Operator = 3 // Verify if the oracle data value is less than the Condition value. Condition_OPERATOR_LESS_THAN Condition_Operator = 4 // Verify if the oracle data value is less or equal to than the Condition // value. Condition_OPERATOR_LESS_THAN_OR_EQUAL Condition_Operator = 5 )
func (Condition_Operator) EnumDescriptor ¶
func (Condition_Operator) EnumDescriptor() ([]byte, []int)
func (Condition_Operator) String ¶
func (x Condition_Operator) String() string
type Filter ¶
type Filter struct { // key is the oracle 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Filter describes the conditions under which an oracle data is considered of interest or not.
func (*Filter) Descriptor ¶
func (*Filter) GetConditions ¶
func (*Filter) GetKey ¶
func (m *Filter) GetKey() *PropertyKey
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) XXX_DiscardUnknown ¶
func (m *Filter) XXX_DiscardUnknown()
func (*Filter) XXX_Marshal ¶
func (*Filter) XXX_Unmarshal ¶
type OracleData ¶
type OracleData struct { // pubKeys is the list of authorized public keys that signed the data for this // oracle. All the public keys in the oracle data should be contained in these // public keys. PubKeys []string `protobuf:"bytes,1,rep,name=pub_keys,json=pubKeys,proto3" json:"pub_keys,omitempty"` // data holds all the properties of the oracle data Data []*Property `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // matched_specs_ids lists all the oracle specs that matched this oracle 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 for the first // time. BroadcastAt int64 `protobuf:"varint,4,opt,name=broadcast_at,json=broadcastAt,proto3" json:"broadcast_at,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
OracleData describes an oracle data that has been broadcast.
func (OracleData) DeepClone ¶
func (o OracleData) DeepClone() *OracleData
func (*OracleData) Descriptor ¶
func (*OracleData) Descriptor() ([]byte, []int)
func (*OracleData) GetBroadcastAt ¶
func (m *OracleData) GetBroadcastAt() int64
func (*OracleData) GetData ¶
func (m *OracleData) GetData() []*Property
func (*OracleData) GetMatchedSpecIds ¶
func (m *OracleData) GetMatchedSpecIds() []string
func (*OracleData) GetPubKeys ¶
func (m *OracleData) GetPubKeys() []string
func (*OracleData) ProtoMessage ¶
func (*OracleData) ProtoMessage()
func (*OracleData) Reset ¶
func (m *OracleData) Reset()
func (*OracleData) String ¶
func (m *OracleData) String() string
func (*OracleData) Validate ¶
func (this *OracleData) Validate() error
func (*OracleData) XXX_DiscardUnknown ¶
func (m *OracleData) XXX_DiscardUnknown()
func (*OracleData) XXX_Marshal ¶
func (m *OracleData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OracleData) XXX_Merge ¶
func (m *OracleData) XXX_Merge(src proto.Message)
func (*OracleData) XXX_Size ¶
func (m *OracleData) XXX_Size() int
func (*OracleData) XXX_Unmarshal ¶
func (m *OracleData) XXX_Unmarshal(b []byte) error
type OracleSpec ¶
type OracleSpec struct { // id is a hash generated from the OracleSpec data. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Creation Date time CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Last Updated timestamp UpdatedAt int64 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // pubKeys is the list of authorized public keys that signed the data for this // oracle. All the public keys in the oracle data should be contained in these // public keys. PubKeys []string `protobuf:"bytes,4,rep,name=pub_keys,json=pubKeys,proto3" json:"pub_keys,omitempty"` // filters describes which oracle data are considered of interest or not for // the product (or the risk model). Filters []*Filter `protobuf:"bytes,5,rep,name=filters,proto3" json:"filters,omitempty"` // status describes the status of the oracle spec Status OracleSpec_Status `protobuf:"varint,6,opt,name=status,proto3,enum=oracles.v1.OracleSpec_Status" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
An oracle spec describe the oracle data that a product (or a risk model) wants to get from the oracle engine. This message contains additional information used by the API.
func NewOracleSpec ¶
func NewOracleSpec(pubKeys []string, filters []*Filter) *OracleSpec
func (OracleSpec) DeepClone ¶
func (o OracleSpec) DeepClone() *OracleSpec
func (*OracleSpec) Descriptor ¶
func (*OracleSpec) Descriptor() ([]byte, []int)
func (*OracleSpec) GetCreatedAt ¶
func (m *OracleSpec) GetCreatedAt() int64
func (*OracleSpec) GetFilters ¶
func (m *OracleSpec) GetFilters() []*Filter
func (*OracleSpec) GetId ¶
func (m *OracleSpec) GetId() string
func (*OracleSpec) GetPubKeys ¶
func (m *OracleSpec) GetPubKeys() []string
func (*OracleSpec) GetStatus ¶
func (m *OracleSpec) GetStatus() OracleSpec_Status
func (*OracleSpec) GetUpdatedAt ¶
func (m *OracleSpec) GetUpdatedAt() int64
func (OracleSpec) IsEvent ¶
func (OracleSpec) IsEvent()
func (*OracleSpec) ProtoMessage ¶
func (*OracleSpec) ProtoMessage()
func (*OracleSpec) Reset ¶
func (m *OracleSpec) Reset()
func (*OracleSpec) String ¶
func (m *OracleSpec) String() string
func (*OracleSpec) Validate ¶
func (this *OracleSpec) Validate() error
func (*OracleSpec) XXX_DiscardUnknown ¶
func (m *OracleSpec) XXX_DiscardUnknown()
func (*OracleSpec) XXX_Marshal ¶
func (m *OracleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OracleSpec) XXX_Merge ¶
func (m *OracleSpec) XXX_Merge(src proto.Message)
func (*OracleSpec) XXX_Size ¶
func (m *OracleSpec) XXX_Size() int
func (*OracleSpec) XXX_Unmarshal ¶
func (m *OracleSpec) XXX_Unmarshal(b []byte) error
type OracleSpecConfiguration ¶
type OracleSpecConfiguration struct { // pubKeys is the list of authorized public keys that signed the data for this // oracle. All the public keys in the oracle data should be contained in these // public keys. PubKeys []string `protobuf:"bytes,1,rep,name=pub_keys,json=pubKeys,proto3" json:"pub_keys,omitempty"` // filters describes which oracle data are considered of interest or not for // the product (or the risk model). Filters []*Filter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
An oracle spec describe the oracle data that a product (or a risk model) wants to get from the oracle engine.
func (OracleSpecConfiguration) DeepClone ¶
func (o OracleSpecConfiguration) DeepClone() *OracleSpecConfiguration
func (*OracleSpecConfiguration) Descriptor ¶
func (*OracleSpecConfiguration) Descriptor() ([]byte, []int)
func (*OracleSpecConfiguration) GetFilters ¶
func (m *OracleSpecConfiguration) GetFilters() []*Filter
func (*OracleSpecConfiguration) GetPubKeys ¶
func (m *OracleSpecConfiguration) GetPubKeys() []string
func (*OracleSpecConfiguration) ProtoMessage ¶
func (*OracleSpecConfiguration) ProtoMessage()
func (*OracleSpecConfiguration) Reset ¶
func (m *OracleSpecConfiguration) Reset()
func (*OracleSpecConfiguration) String ¶
func (m *OracleSpecConfiguration) String() string
func (*OracleSpecConfiguration) ToOracleSpec ¶
func (o *OracleSpecConfiguration) ToOracleSpec() *OracleSpec
func (*OracleSpecConfiguration) Validate ¶
func (this *OracleSpecConfiguration) Validate() error
func (*OracleSpecConfiguration) XXX_DiscardUnknown ¶
func (m *OracleSpecConfiguration) XXX_DiscardUnknown()
func (*OracleSpecConfiguration) XXX_Marshal ¶
func (m *OracleSpecConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OracleSpecConfiguration) XXX_Merge ¶
func (m *OracleSpecConfiguration) XXX_Merge(src proto.Message)
func (*OracleSpecConfiguration) XXX_Size ¶
func (m *OracleSpecConfiguration) XXX_Size() int
func (*OracleSpecConfiguration) XXX_Unmarshal ¶
func (m *OracleSpecConfiguration) XXX_Unmarshal(b []byte) error
type OracleSpec_Status ¶
type OracleSpec_Status int32
Status describe the status of the oracle spec
const ( // The default value. OracleSpec_STATUS_UNSPECIFIED OracleSpec_Status = 0 // STATUS_ACTIVE describes an active oracle spec. OracleSpec_STATUS_ACTIVE OracleSpec_Status = 1 // STATUS_DEACTIVATED describes an oracle spec that is not listening to data // anymore. OracleSpec_STATUS_DEACTIVATED OracleSpec_Status = 2 )
func (OracleSpec_Status) EnumDescriptor ¶
func (OracleSpec_Status) EnumDescriptor() ([]byte, []int)
func (OracleSpec_Status) String ¶
func (x OracleSpec_Status) 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Property describes one property of an oracle spec with a key with its value.
func (*Property) Descriptor ¶
func (*Property) ProtoMessage ¶
func (*Property) ProtoMessage()
func (*Property) XXX_DiscardUnknown ¶
func (m *Property) XXX_DiscardUnknown()
func (*Property) XXX_Marshal ¶
func (*Property) XXX_Unmarshal ¶
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=oracles.v1.PropertyKey_Type" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
PropertyKey describes the property key contained in an oracle data.
func (PropertyKey) DeepClone ¶
func (p PropertyKey) DeepClone() *PropertyKey
func (*PropertyKey) Descriptor ¶
func (*PropertyKey) Descriptor() ([]byte, []int)
func (*PropertyKey) GetName ¶
func (m *PropertyKey) GetName() string
func (*PropertyKey) GetType ¶
func (m *PropertyKey) GetType() PropertyKey_Type
func (*PropertyKey) ProtoMessage ¶
func (*PropertyKey) ProtoMessage()
func (*PropertyKey) Reset ¶
func (m *PropertyKey) Reset()
func (*PropertyKey) String ¶
func (m *PropertyKey) String() string
func (*PropertyKey) Validate ¶
func (this *PropertyKey) Validate() error
func (*PropertyKey) XXX_DiscardUnknown ¶
func (m *PropertyKey) XXX_DiscardUnknown()
func (*PropertyKey) XXX_Marshal ¶
func (m *PropertyKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PropertyKey) XXX_Merge ¶
func (m *PropertyKey) XXX_Merge(src proto.Message)
func (*PropertyKey) XXX_Size ¶
func (m *PropertyKey) XXX_Size() int
func (*PropertyKey) XXX_Unmarshal ¶
func (m *PropertyKey) XXX_Unmarshal(b []byte) error
type PropertyKey_Type ¶
type PropertyKey_Type int32
Type describes the type of properties that are supported by the oracle 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) EnumDescriptor ¶
func (PropertyKey_Type) EnumDescriptor() ([]byte, []int)
func (PropertyKey_Type) String ¶
func (x PropertyKey_Type) String() string