Documentation
¶
Index ¶
- Constants
- Variables
- func AsSlice[T any](entities ...*proto.EntityResponse) ([]T, error)
- func BasicMask(unmasked string) string
- func Changes(a, b interface{}) (map[Property]*proto.Value, error)
- func ChangesFromDefault(v interface{}) (map[Property]*proto.Value, error)
- func ChildrenFromLoader[T any](loader ChildLoader) []*T
- func DynamicPropertiesFromStruct(s interface{}) ([]*proto.EntityProperty, error)
- func DynamicPropertiesFromStructWithoutDefaults(s interface{}) ([]*proto.EntityProperty, error)
- func EidHash(entityID ID) string
- func FromByteMap(from map[string][]byte, to any)
- func MapProperties(v interface{}) (map[Property]proto.PropertyDefinition, error)
- func MapPropertiesWithPrefix(v interface{}, prefix string) (map[Property]proto.PropertyDefinition, error)
- func Marshal(v interface{}) (map[Property]*proto.Value, error)
- func MarshalValue(v interface{}) (*proto.Value, error)
- func MockConnection() (*Connection, *MockServer, *bufconn.Listener, *grpc.Server)
- func New[T any](entity *proto.EntityResponse) (T, error)
- func NewDynamicProperties(props map[string]interface{}) []*proto.EntityProperty
- func NewDynamicProperty(key string, value interface{}) *proto.EntityProperty
- func Pointer[T any](d T) *T
- func PropertyName(str string) string
- func PropertyNames(str ...string) []string
- func ToByteMap(from any) map[string][]byte
- func Type(input interface{}) string
- func Unmarshal(from *proto.EntityResponse, v interface{}) error
- func UnmarshalGeneric(resp *proto.EntityResponse, dst GenericResult) error
- func UnmarshalProperties(data map[Property]*proto.Value, v interface{}) error
- func UnmarshalToMap(dst any, entities ...*proto.EntityResponse) error
- func UnmarshalToSlice(dstPtr any, entities ...*proto.EntityResponse) error
- func UploadError(resp *http.Response, err error) error
- type AKVProperty
- type Actor
- func (a *Actor) AKVGet(ctx context.Context, properties ...string) (map[string]*proto.Value, error)
- func (a *Actor) AKVPut(ctx context.Context, properties ...AKVProperty) (*proto.GenericResponse, error)
- func (a *Actor) Anonymize(piiToken string) (*proto.PiiAnonymizeResponse, error)
- func (a *Actor) AnonymizeRollback(piiToken string) (*proto.PiiAnonymizeResponse, error)
- func (a *Actor) AppID() string
- func (a *Actor) Authorization() *proto.Authorization
- func (a *Actor) AuthorizeContext(ctx context.Context) context.Context
- func (a *Actor) Client() string
- func (a *Actor) CloneWithoutWorkspace() *Actor
- func (a *Actor) Connection() *Connection
- func (a *Actor) EventStream(ctx context.Context, handler func(response *proto.EventStreamResponse) error, ...) error
- func (a *Actor) Find(ctx context.Context, entityType string, retrieve RetrieveOption, ...) ([]*proto.EntityResponse, error)
- func (a *Actor) Get(ctx context.Context, retrieveBy RetrieveBy, dst interface{}, ...) error
- func (a *Actor) GetByID(ctx context.Context, entityID ID, dst interface{}, retrieve ...RetrieveOption) error
- func (a *Actor) GetByUniqueProperty(ctx context.Context, uniqueId, propertyName string, dst interface{}, ...) error
- func (a *Actor) GetDynamicProperties(ctx context.Context, entityID string, properties ...string) (PropertyValueList, error)
- func (a *Actor) GetSharedByID(ctx context.Context, owner *proto.VendorApp, entityID ID, dst interface{}, ...) error
- func (a *Actor) GroupCount(ctx context.Context, entityType string, groupBy []string, ...) (map[string]*proto.GroupCountResponse_Result, error)
- func (a *Actor) List(ctx context.Context, entityType string, retrieveProperties []string, ...) ([]*proto.EntityResponse, error)deprecated
- func (a *Actor) Mutate(ctx context.Context, src interface{}, options ...MutateOption) error
- func (a *Actor) MutateWithDefaultWatcher(ctx context.Context, src interface{}, options ...MutateOption) error
- func (a *Actor) MutateWithWatcher(ctx context.Context, src interface{}, w *Watcher, options ...MutateOption) error
- func (a *Actor) NewCCPAToken(reference string) (string, error)
- func (a *Actor) NewGDPRToken(reference, country string) (string, error)
- func (a *Actor) NewPiiToken(reference, country string, regulation PiiRegulation) (string, error)
- func (a *Actor) NewPiiTokenWithExpiry(reference, country string, regulation PiiRegulation, expiry time.Time, ...) (string, error)
- func (a *Actor) NewRateLimit(key string, hardLimit, limitMinutes int32) *RateLimit
- func (a *Actor) NewTrackedRateLimit(key string, hardLimit, limitMinutes int32) *RateLimit
- func (a *Actor) PermanentlyDestroyEntity(ctx context.Context, schemaType string, entityID ID, ...) (bool, error)
- func (a *Actor) QueryIndex(ctx context.Context, entityType string, retrieveProperties []string, ...) ([]*proto.EntityResponse, error)
- func (a *Actor) RemoteGet(ctx context.Context, remoteID ID, dst interface{}, retrieve ...RetrieveOption) error
- func (a *Actor) RemoteGetProperties(ctx context.Context, entityID ID, dst interface{}, properties ...string) error
- func (a *Actor) RemoteIP() string
- func (a *Actor) RemoteMutate(ctx context.Context, entityID ID, src interface{}, options ...MutateOption) error
- func (a *Actor) ReplaceConnection(c *Connection)
- func (a *Actor) ReportTimeSeries(ctx context.Context, src interface{}) error
- func (a *Actor) ServerStatus() (*proto.StatusResponse, error)
- func (a *Actor) SetClientName(client string)
- func (a *Actor) SetDynamicProperties(ctx context.Context, entityID string, setProperties []*proto.EntityProperty, ...) error
- func (a *Actor) SetTraceID(id string)
- func (a *Actor) ShareView(ctx context.Context, with *proto.VendorApp, def *SharedView) (*proto.SharedViewResponse, error)
- func (a *Actor) SharedViews(ctx context.Context, with *proto.VendorApp, entityID ID, entityType string, ...) (*proto.SharedViewsResponse, error)
- func (a *Actor) Snapshot(entityType interface{}, eid ID) (bool, error)
- func (a *Actor) Squid(sequenceKey string) (*proto.SquidResponse, error)
- func (a *Actor) SquidRetrieve(sequenceKey, squat string) (*proto.SquidResponse, error)
- func (a *Actor) TaskPush(ctx context.Context, taskName, taskID string, data map[string]string) error
- func (a *Actor) TaskStream(ctx context.Context, taskName string, ...) error
- func (a *Actor) TraceID() string
- func (a *Actor) User() *proto.User
- func (a *Actor) UserAgent() string
- func (a *Actor) UserID() string
- func (a *Actor) VendorApp() *proto.VendorApp
- func (a *Actor) VendorID() string
- func (a *Actor) WorkspaceID() string
- type Amount
- func (a *Amount) Diff(with *Amount) *Amount
- func (a *Amount) Equals(other *Amount) bool
- func (a *Amount) GetCurrency() string
- func (a *Amount) GetUnits() int64
- func (a *Amount) GreaterThan(other *Amount) bool
- func (a *Amount) IsZero() bool
- func (a *Amount) LessThan(other *Amount) bool
- func (a *Amount) MarshalValue() (*proto.Value, error)
- func (a *Amount) PropertyDefinition() proto.PropertyDefinition
- func (a *Amount) String() string
- func (a *Amount) UnitString() string
- func (a *Amount) UnmarshalValue(value *proto.Value) error
- type Amounts
- type BaseChildEntity
- type BaseEntity
- type Child
- type ChildEntity
- type ChildLoader
- type ChildProvider
- type ChildUpdateProvider
- type Connection
- func (c *Connection) AKVDel(ctx context.Context, in *proto.AKVDelRequest, opts ...grpc.CallOption) (*proto.GenericResponse, error)
- func (c *Connection) AKVGet(ctx context.Context, in *proto.AKVGetRequest, opts ...grpc.CallOption) (*proto.AKVGetResponse, error)
- func (c *Connection) AKVPut(ctx context.Context, in *proto.AKVPutRequest, opts ...grpc.CallOption) (*proto.GenericResponse, error)
- func (c *Connection) Actor(workspaceID, remoteIP, userID, userAgent string) Actor
- func (c *Connection) ChartTimeSeries(ctx context.Context, in *proto.ChartTimeSeriesRequest, opts ...grpc.CallOption) (*proto.ChartTimeSeriesResponse, error)
- func (c *Connection) DailyEntities(ctx context.Context, in *proto.DailyEntityRequest, opts ...grpc.CallOption) (*proto.DailyEntityResponse, error)
- func (c *Connection) Define(ctx context.Context, in *proto.SchemaRequest, opts ...grpc.CallOption) (*proto.Schema, error)
- func (c *Connection) Destroy(ctx context.Context, in *proto.DestroyRequest, opts ...grpc.CallOption) (*proto.DestroyResponse, error)
- func (c *Connection) DirectClient() proto.KeystoneClient
- func (c *Connection) EventStream(ctx context.Context, in *proto.EventStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[proto.EventStreamResponse], error)
- func (c *Connection) Events(ctx context.Context, in *proto.EventRequest, opts ...grpc.CallOption) (*proto.EventsResponse, error)
- func (c *Connection) Find(ctx context.Context, in *proto.FindRequest, opts ...grpc.CallOption) (*proto.FindResponse, error)
- func (c *Connection) GroupCount(ctx context.Context, in *proto.GroupCountRequest, opts ...grpc.CallOption) (*proto.GroupCountResponse, error)
- func (c *Connection) IID(ctx context.Context, in *proto.IIDCreateRequest, opts ...grpc.CallOption) (*proto.IIDResponse, error)
- func (c *Connection) IIDLookup(ctx context.Context, in *proto.IIDRequest, opts ...grpc.CallOption) (*proto.IIDsResponse, error)
- func (c *Connection) List(ctx context.Context, in *proto.ListRequest, opts ...grpc.CallOption) (*proto.ListResponse, error)
- func (c *Connection) Log(ctx context.Context, in *proto.LogRequest, opts ...grpc.CallOption) (*proto.LogResponse, error)
- func (c *Connection) Logs(ctx context.Context, in *proto.LogsRequest, opts ...grpc.CallOption) (*proto.LogsResponse, error)
- func (c *Connection) Mutate(ctx context.Context, in *proto.MutateRequest, opts ...grpc.CallOption) (*proto.MutateResponse, error)
- func (c *Connection) PiiAnonymize(ctx context.Context, in *proto.PiiAnonymizeRequest, opts ...grpc.CallOption) (*proto.PiiAnonymizeResponse, error)
- func (c *Connection) PiiToken(ctx context.Context, in *proto.PiiTokenRequest, opts ...grpc.CallOption) (*proto.PiiTokenResponse, error)
- func (c *Connection) PushTask(ctx context.Context, in *proto.PushTaskRequest, opts ...grpc.CallOption) (*proto.GenericResponse, error)
- func (c *Connection) QueryIndex(ctx context.Context, in *proto.QueryIndexRequest, opts ...grpc.CallOption) (*proto.QueryIndexResponse, error)
- func (c *Connection) RateLimit(ctx context.Context, in *proto.RateLimitRequest, opts ...grpc.CallOption) (*proto.RateLimitResponse, error)
- func (c *Connection) RegisterTypes(types ...interface{}) int
- func (c *Connection) ReportTimeSeries(ctx context.Context, in *proto.ReportTimeSeriesRequest, ...) (*proto.MutateResponse, error)
- func (c *Connection) Retrieve(ctx context.Context, in *proto.EntityRequest, opts ...grpc.CallOption) (*proto.EntityResponse, error)
- func (c *Connection) SQUID(ctx context.Context, in *proto.SquidRequest, opts ...grpc.CallOption) (*proto.SquidResponse, error)
- func (c *Connection) SQUIDRecover(ctx context.Context, in *proto.SquidRecoverRequest, opts ...grpc.CallOption) (*proto.SquidResponse, error)
- func (c *Connection) SchemaStatistics(ctx context.Context, in *proto.SchemaStatisticsRequest, ...) (*proto.SchemaStatisticsResponse, error)
- func (c *Connection) ShareView(ctx context.Context, in *proto.ShareViewRequest, opts ...grpc.CallOption) (*proto.SharedViewResponse, error)
- func (c *Connection) SharedViews(ctx context.Context, in *proto.SharedViewsRequest, opts ...grpc.CallOption) (*proto.SharedViewsResponse, error)
- func (c *Connection) SnapshotReport(ctx context.Context, in *proto.SnapshotReportRequest, opts ...grpc.CallOption) (*proto.MutateResponse, error)
- func (c *Connection) Status(ctx context.Context, in *proto.Authorization, opts ...grpc.CallOption) (*proto.StatusResponse, error)
- func (c *Connection) SyncSchema() *sync.WaitGroup
- func (c *Connection) TaskStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[proto.TaskAckRequest, proto.TaskResponse], error)
- type ConvertStructToDynamicProperties
- type Country
- type DynamicChild
- func (e *DynamicChild) Append(key string, value []byte)
- func (e *DynamicChild) KeystoneData() map[string][]byte
- func (e *DynamicChild) KeystoneDataAppend() map[string][]byte
- func (e *DynamicChild) KeystoneRemoveData() []string
- func (e *DynamicChild) Reduce(key string)
- func (e *DynamicChild) ReplaceData(with map[string][]byte)
- func (e *DynamicChild) SetChildID(id string)
- type DynamicRemoteEntity
- type Email
- type EmbeddedChildren
- func (e *EmbeddedChildren) AddChild(child NestedChild)
- func (e *EmbeddedChildren) AddChildren(child ...any)
- func (e *EmbeddedChildren) ClearChildChanges() error
- func (e *EmbeddedChildren) GetChildrenToRemove() []*proto.EntityChild
- func (e *EmbeddedChildren) GetChildrenToStore() []*proto.EntityChild
- func (e *EmbeddedChildren) GetTruncateChildrenType() []*proto.Key
- func (e *EmbeddedChildren) RemoveChild(childType any, cid ...string)
- func (e *EmbeddedChildren) TruncateByType(childType interface{})
- type EmbeddedDetails
- type EmbeddedEntity
- func (e *EmbeddedEntity) ExistsInKeystone() bool
- func (e *EmbeddedEntity) GetKeystoneID() ID
- func (e *EmbeddedEntity) ObserveMutation(resp *proto.MutateResponse)
- func (e *EmbeddedEntity) ObserveRetrieve(resp *proto.EntityResponse)
- func (e *EmbeddedEntity) SetHashID(id string) error
- func (e *EmbeddedEntity) SetKeystoneID(id ID)
- func (e *EmbeddedEntity) StoredInKeystone() *bool
- type EmbeddedEvents
- type EmbeddedLabels
- type EmbeddedLock
- type EmbeddedLogs
- func (e *EmbeddedLogs) ClearLogs() error
- func (e *EmbeddedLogs) GetLogs() []*proto.EntityLog
- func (e *EmbeddedLogs) Log(level proto.LogLevel, message, reference, actor, traceID string, ...)
- func (e *EmbeddedLogs) LogAlert(message, reference, actor, traceID string, data map[string]string)
- func (e *EmbeddedLogs) LogCritical(message, reference, actor, traceID string, data map[string]string)
- func (e *EmbeddedLogs) LogDebug(message, reference, actor, traceID string, data map[string]string)
- func (e *EmbeddedLogs) LogError(message, reference, actor, traceID string, data map[string]string)
- func (e *EmbeddedLogs) LogFatal(message, reference, actor, traceID string, data map[string]string)
- func (e *EmbeddedLogs) LogInfo(message, reference, actor, traceID string, data map[string]string)
- func (e *EmbeddedLogs) LogNotice(message, reference, actor, traceID string, data map[string]string)
- func (e *EmbeddedLogs) LogWarn(message, reference, actor, traceID string, data map[string]string)
- type EmbeddedObjects
- type EmbeddedRelationships
- func (e *EmbeddedRelationships) AddRelationship(relationshipType string, target ID, meta map[string]string, since time.Time)
- func (e *EmbeddedRelationships) ClearRelationships() error
- func (e *EmbeddedRelationships) GetRelationships() []*proto.EntityRelationship
- func (e *EmbeddedRelationships) SetRelationships(links []*proto.EntityRelationship)
- type EmbeddedSensors
- func (e *EmbeddedSensors) AddSensorMeasurement(sensor string, value float64)
- func (e *EmbeddedSensors) AddSensorMeasurementWithData(sensor string, value float64, data map[string]string)
- func (e *EmbeddedSensors) ClearSensorMeasurements() error
- func (e *EmbeddedSensors) GetSensorMeasurements() []*proto.EntitySensorMeasurement
- type EmbeddedWatcher
- type Entity
- type EntityDefinition
- type EntityDetail
- type EntityObject
- func (e *EntityObject) GetPath() string
- func (e *EntityObject) GetUploadURL() string
- func (e *EntityObject) ReadyForUpload() bool
- func (e *EntityObject) SetContentDisposition(contentDisposition string)
- func (e *EntityObject) SetContentEncoding(contentEncoding string)
- func (e *EntityObject) SetContentLanguage(contentLanguage string)
- func (e *EntityObject) SetContentType(contentType string)
- func (e *EntityObject) SetData(data []byte)
- func (e *EntityObject) SetExpiry(expiry time.Time)
- func (e *EntityObject) SetMeta(key, value string)
- func (e *EntityObject) SetPublic(public bool)
- func (e *EntityObject) Upload(content io.Reader) (*http.Response, error)
- func (e *EntityObject) UploadToJson(content interface{}) (*http.Response, error)
- type Error
- type EventProvider
- type ExternalID
- func (f *ExternalID) FromString(input string) error
- func (f *ExternalID) ID() *ID
- func (f *ExternalID) IsZero() bool
- func (f *ExternalID) MarshalValue() (*proto.Value, error)
- func (f *ExternalID) PropertyDefinition() proto.PropertyDefinition
- func (f *ExternalID) Source() *Key
- func (f *ExternalID) String() string
- func (f *ExternalID) UnmarshalValue(value *proto.Value) error
- type FindOption
- func And(filters ...FindOption) FindOption
- func ChildOf(entityID string) FindOption
- func IsNotNull(key string) FindOption
- func IsNull(key string) FindOption
- func Limit(perPage, pageNumber int32) FindOption
- func Or(filters ...FindOption) FindOption
- func RelationOf(entityID, relationshipType, relVendor, relApp string) FindOption
- func RelationOfSibling(entityID, relationshipType string) FindOption
- func RelationTo(entityID ID, relationshipType, relVendor, relApp string) FindOption
- func RelationToSibling(entityID ID, relationshipType string) FindOption
- func SortAsc(property string) FindOption
- func SortBy(property string, descending bool) FindOption
- func SortByNullFirst(property string, descending bool) FindOption
- func SortDesc(property string) FindOption
- func Where(key, operator string, values ...any) FindOption
- func WhereBetween(key string, value1, value2 any) FindOption
- func WhereContains(key string, value any) FindOption
- func WhereEndsWith(key string, value any) FindOption
- func WhereEquals(key string, value any) FindOption
- func WhereGreaterThan(key string, value any) FindOption
- func WhereGreaterThanOrEquals(key string, value any) FindOption
- func WhereIn(key string, value ...any) FindOption
- func WhereLessThan(key string, value any) FindOption
- func WhereLessThanOrEquals(key string, value any) FindOption
- func WhereNotContains(key string, value any) FindOption
- func WhereNotEquals(key string, value any) FindOption
- func WhereNotIn(key string, value ...any) FindOption
- func WhereStartsWith(key string, value any) FindOption
- func WithEntityIDs(ids []string) FindOption
- func WithLabel(name, value string) FindOption
- type GenericResult
- type ID
- type IPAddress
- type IncrementingID
- type IntSet
- func (s *IntSet) Add(value int64)
- func (s *IntSet) Append(value ...int64)
- func (s *IntSet) Clear()
- func (s *IntSet) CurrentValues() []int64
- func (s *IntSet) Diff(values ...int64) []int64
- func (s *IntSet) Has(value int64) bool
- func (s *IntSet) IsEmpty() bool
- func (s *IntSet) IsZero() bool
- func (s *IntSet) MarshalValue() (*proto.Value, error)
- func (s *IntSet) ObserveMutation(resp *proto.MutateResponse)
- func (s *IntSet) PropertyDefinition() proto.PropertyDefinition
- func (s *IntSet) Reduce(value ...int64)
- func (s *IntSet) Remove(value int64)
- func (s *IntSet) ReplaceExisting() bool
- func (s *IntSet) ReplaceWith(values ...int64)
- func (s *IntSet) ToAdd() []int64
- func (s *IntSet) ToRemove() []int64
- func (s *IntSet) UnmarshalValue(value *proto.Value) error
- func (s *IntSet) Values() []int64
- type Key
- type KeyMixed
- func (s *KeyMixed) Append(key string, value Mixed)
- func (s *KeyMixed) Clear()
- func (s *KeyMixed) Diff(with map[string]Mixed) map[string]Mixed
- func (s *KeyMixed) Get(key string) *Mixed
- func (s *KeyMixed) Has(value string) bool
- func (s *KeyMixed) IsEmpty() bool
- func (s *KeyMixed) IsZero() bool
- func (s *KeyMixed) MarshalValue() (*proto.Value, error)
- func (s *KeyMixed) ObserveMutation(resp *proto.MutateResponse)
- func (s *KeyMixed) PropertyDefinition() proto.PropertyDefinition
- func (s *KeyMixed) Remove(key string)
- func (s *KeyMixed) ReplaceExisting() bool
- func (s *KeyMixed) Set(key string, value Mixed)
- func (s *KeyMixed) UnmarshalValue(value *proto.Value) error
- func (s *KeyMixed) Values() map[string]Mixed
- type LabelProvider
- type LockInfo
- type Locker
- type LogProvider
- type MarshaledEntity
- type Marshaler
- type MinMax
- func (s *MinMax) IsZero() bool
- func (s *MinMax) MarshalValue() (*proto.Value, error)
- func (s *MinMax) Max() int64
- func (s *MinMax) Min() int64
- func (s *MinMax) PropertyDefinition() proto.PropertyDefinition
- func (s *MinMax) SetMax(value int64)
- func (s *MinMax) SetMin(value int64)
- func (s *MinMax) UnmarshalValue(value *proto.Value) error
- func (s *MinMax) Update(min, max int64)
- type Mixed
- func (m *Mixed) Bool() bool
- func (m *Mixed) Float() float64
- func (m *Mixed) Int() int64
- func (m *Mixed) IsZero() bool
- func (m *Mixed) MarshalValue() (*proto.Value, error)
- func (m *Mixed) Matches(with *Mixed) bool
- func (m *Mixed) PropertyDefinition() proto.PropertyDefinition
- func (m *Mixed) Raw() []byte
- func (m *Mixed) SetBool(b bool)
- func (m *Mixed) SetFloat(f float64)
- func (m *Mixed) SetInt(i int64)
- func (m *Mixed) SetRaw(raw []byte)
- func (m *Mixed) SetString(text string)
- func (m *Mixed) SetTime(t time.Time)
- func (m *Mixed) SetValue(value any)
- func (m *Mixed) String() string
- func (m *Mixed) Time() time.Time
- func (m *Mixed) ToString() string
- func (m *Mixed) UnmarshalValue(value *proto.Value) error
- type MockServer
- func (m *MockServer) ChartTimeSeries(ctx context.Context, req *proto.ChartTimeSeriesRequest) (*proto.ChartTimeSeriesResponse, error)
- func (m *MockServer) DailyEntities(ctx context.Context, req *proto.DailyEntityRequest) (*proto.DailyEntityResponse, error)
- func (m *MockServer) Define(ctx context.Context, req *proto.SchemaRequest) (*proto.Schema, error)
- func (m *MockServer) Events(ctx context.Context, req *proto.EventRequest) (*proto.EventsResponse, error)
- func (m *MockServer) Find(ctx context.Context, req *proto.FindRequest) (*proto.FindResponse, error)
- func (m *MockServer) GroupCount(ctx context.Context, req *proto.GroupCountRequest) (*proto.GroupCountResponse, error)
- func (m *MockServer) List(ctx context.Context, req *proto.ListRequest) (*proto.ListResponse, error)
- func (m *MockServer) Log(ctx context.Context, req *proto.LogRequest) (*proto.LogResponse, error)
- func (m *MockServer) Logs(ctx context.Context, req *proto.LogsRequest) (*proto.LogsResponse, error)
- func (m *MockServer) Mutate(ctx context.Context, req *proto.MutateRequest) (*proto.MutateResponse, error)
- func (m *MockServer) RateLimit(ctx context.Context, req *proto.RateLimitRequest) (*proto.RateLimitResponse, error)
- func (m *MockServer) ReportTimeSeries(ctx context.Context, req *proto.ReportTimeSeriesRequest) (*proto.MutateResponse, error)
- func (m *MockServer) Retrieve(ctx context.Context, req *proto.EntityRequest) (*proto.EntityResponse, error)
- func (m *MockServer) SchemaStatistics(ctx context.Context, req *proto.SchemaStatisticsRequest) (*proto.SchemaStatisticsResponse, error)
- func (m *MockServer) ShareView(ctx context.Context, req *proto.ShareViewRequest) (*proto.SharedViewResponse, error)
- func (m *MockServer) ShareViews(ctx context.Context, req *proto.SharedViewsRequest) (*proto.SharedViewsResponse, error)
- func (m *MockServer) Status(ctx context.Context, req *proto.Authorization) (*proto.StatusResponse, error)
- type MutateOption
- func BackgroundIndex() MutateOption
- func MatchExisting(options ...FindOption) MutateOption
- func MutateProperties(property ...string) MutateOption
- func OnConflictIgnore() MutateOption
- func OnConflictUseID(property ...string) MutateOption
- func PrepareUploads(objs ...*EntityObject) MutateOption
- func WithMutationComment(comment string) MutateOption
- func WithPiiReference(vendorId, appId, piiKey string) MutateOption
- func WithPiiToken(piiToken string) MutateOption
- type MutationObserver
- type MutationOptionWatcherPrepare
- type NestedChild
- type NestedChildAggregateValue
- type NestedChildDataMutator
- type NestedChildDataProvider
- type NestedChildDataReceiver
- type ObjectProvider
- type PII
- type PersonName
- type Phone
- type PiiRegulation
- type Property
- type PropertyValueList
- func (p PropertyValueList) Get(key string) *proto.Value
- func (p PropertyValueList) GetBool(key string, defaultValue bool) bool
- func (p PropertyValueList) GetFloat(key string, defaultValue float64) float64
- func (p PropertyValueList) GetInt(key string, defaultValue int64) int64
- func (p PropertyValueList) GetText(key, defaultValue string) string
- type RateLimit
- type RateLimitResult
- type Reflector
- type RelationshipProvider
- type Remote
- type RetrieveBy
- type RetrieveEntityOption
- type RetrieveObserver
- type RetrieveOption
- func RetrieveOptions(opts ...RetrieveOption) RetrieveOption
- func WithChildSummary() RetrieveOption
- func WithDatum() RetrieveOption
- func WithDecryptedProperties(properties ...string) RetrieveOption
- func WithDescendantCount(entityType string) RetrieveOption
- func WithLabels() RetrieveOption
- func WithLock(note string, ttlSeconds int32) RetrieveOption
- func WithObjects(paths ...string) RetrieveOption
- func WithProperties(properties ...string) RetrieveOption
- func WithProperty(decrypt bool, properties ...string) RetrieveOption
- func WithRelationshipCount(relationType, appId, vendorId string) RetrieveOption
- func WithRelationships(keys ...string) RetrieveOption
- func WithSiblingRelationshipCount(relationType string) RetrieveOption
- func WithSummary() RetrieveOption
- func WithTotalRelationshipCount() RetrieveOption
- func WithVerifiedProperty(property, compare string) RetrieveOption
- func WithView(name string) RetrieveOption
- type SecureIP
- type SecurePII
- type SecureString
- func (e *SecureString) IsZero() bool
- func (e *SecureString) MarshalJSON() ([]byte, error)
- func (e *SecureString) MarshalValue() (*proto.Value, error)
- func (e *SecureString) PropertyDefinition() proto.PropertyDefinition
- func (e *SecureString) String() string
- func (e *SecureString) UnmarshalJSON(data []byte) error
- func (e *SecureString) UnmarshalValue(value *proto.Value) error
- type SensorProvider
- type SettableWatchedEntity
- type SharedView
- func (s *SharedView) Add(property string, allowPii, allowSecure bool) *SharedView
- func (s *SharedView) ForAllWorkspaces() *SharedView
- func (s *SharedView) ForEntity(entityID ID) *SharedView
- func (s *SharedView) ForType(forType string) *SharedView
- func (s *SharedView) WithComment(comment string) *SharedView
- type String
- type StringSet
- func (s *StringSet) Add(value string)
- func (s *StringSet) Append(value ...string)
- func (s *StringSet) Clear()
- func (s *StringSet) CurrentValues() []string
- func (s *StringSet) Diff(values ...string) []string
- func (s *StringSet) Has(value string) bool
- func (s *StringSet) IsEmpty() bool
- func (s *StringSet) IsZero() bool
- func (s *StringSet) MarshalValue() (*proto.Value, error)
- func (s *StringSet) ObserveMutation(resp *proto.MutateResponse)
- func (s *StringSet) PropertyDefinition() proto.PropertyDefinition
- func (s *StringSet) Reduce(value ...string)
- func (s *StringSet) Remove(value string)
- func (s *StringSet) ReplaceExisting() bool
- func (s *StringSet) ReplaceWith(values ...string)
- func (s *StringSet) ToAdd() []string
- func (s *StringSet) ToRemove() []string
- func (s *StringSet) UnmarshalValue(value *proto.Value) error
- func (s *StringSet) Values() []string
- type TSEntity
- type TimeSeriesEntity
- type TypeDefinition
- type URL
- type UserInput
- type ValueMarshaler
- type VerifyString
- func (e *VerifyString) IsZero() bool
- func (e *VerifyString) MarshalValue() (*proto.Value, error)
- func (e *VerifyString) PropertyDefinition() proto.PropertyDefinition
- func (e *VerifyString) String() string
- func (e *VerifyString) UnmarshalValue(value *proto.Value) error
- func (e *VerifyString) Verified() bool
- func (e *VerifyString) WasChecked() bool
- type WatchedEntity
- type Watcher
Constants ¶
const CurrencyMixed = "mixed"
Variables ¶
var CannotMapNil = errors.New("cannot map nil")
var CannotMapPrimitives = errors.New("cannot map primitive type")
var CannotMarshalNil = errors.New("cannot marshal nil")
var CannotMarshalPrimitives = errors.New("cannot marshal primitive type")
var CannotMarshalValueError = errors.New("cannot marshal Value")
var ErrCommentedMutations = errors.New("you must provide a mutation comment")
var ErrEntityIDMissing = errors.New("entity ID missing")
var ErrMustBeMapOrSlice = errors.New("you must unmarshal onto a map or slice")
var ErrMustMapStringStruct = errors.New("you must pass a map[string]Struct")
var ErrMustPassPointer = errors.New("you must pass a pointer")
var ErrMustPointerSlice = errors.New("you must pass a pointer to a []Struct")
var ErrNilMapGiven = errors.New("you must pass a non-nil map")
var (
NestedChildType = reflect.TypeFor[NestedChild]()
)
Functions ¶
func ChildrenFromLoader ¶
func ChildrenFromLoader[T any](loader ChildLoader) []*T
func DynamicPropertiesFromStruct ¶
func DynamicPropertiesFromStruct(s interface{}) ([]*proto.EntityProperty, error)
func DynamicPropertiesFromStructWithoutDefaults ¶
func DynamicPropertiesFromStructWithoutDefaults(s interface{}) ([]*proto.EntityProperty, error)
func FromByteMap ¶
func MapProperties ¶
func MapProperties(v interface{}) (map[Property]proto.PropertyDefinition, error)
func MapPropertiesWithPrefix ¶
func MapPropertiesWithPrefix(v interface{}, prefix string) (map[Property]proto.PropertyDefinition, error)
func MarshalValue ¶
func MockConnection ¶
func MockConnection() (*Connection, *MockServer, *bufconn.Listener, *grpc.Server)
func NewDynamicProperties ¶
func NewDynamicProperties(props map[string]interface{}) []*proto.EntityProperty
func NewDynamicProperty ¶
func NewDynamicProperty(key string, value interface{}) *proto.EntityProperty
func PropertyName ¶
func PropertyNames ¶
func Unmarshal ¶
func Unmarshal(from *proto.EntityResponse, v interface{}) error
func UnmarshalGeneric ¶
func UnmarshalGeneric(resp *proto.EntityResponse, dst GenericResult) error
func UnmarshalProperties ¶
func UnmarshalToMap ¶
func UnmarshalToMap(dst any, entities ...*proto.EntityResponse) error
func UnmarshalToSlice ¶
func UnmarshalToSlice(dstPtr any, entities ...*proto.EntityResponse) error
Types ¶
type AKVProperty ¶
func AKV ¶
func AKV(property string, value any) AKVProperty
type Actor ¶
type Actor struct {
// contains filtered or unexported fields
}
Actor is a struct that represents an actor making requests to keystone
func (*Actor) AKVPut ¶
func (a *Actor) AKVPut(ctx context.Context, properties ...AKVProperty) (*proto.GenericResponse, error)
func (*Actor) Anonymize ¶
func (a *Actor) Anonymize(piiToken string) (*proto.PiiAnonymizeResponse, error)
func (*Actor) AnonymizeRollback ¶
func (a *Actor) AnonymizeRollback(piiToken string) (*proto.PiiAnonymizeResponse, error)
func (*Actor) Authorization ¶
func (a *Actor) Authorization() *proto.Authorization
func (*Actor) AuthorizeContext ¶
func (*Actor) CloneWithoutWorkspace ¶
func (*Actor) Connection ¶
func (a *Actor) Connection() *Connection
func (*Actor) EventStream ¶
func (*Actor) Find ¶
func (a *Actor) Find(ctx context.Context, entityType string, retrieve RetrieveOption, options ...FindOption) ([]*proto.EntityResponse, error)
Find returns a list of entities matching the given entityType and retrieveProperties
func (*Actor) Get ¶
func (a *Actor) Get(ctx context.Context, retrieveBy RetrieveBy, dst interface{}, retrieve ...RetrieveOption) error
Get retrieves an entity by the given retrieveBy, storing the result in dst
func (*Actor) GetByUniqueProperty ¶
func (*Actor) GetDynamicProperties ¶
func (*Actor) GetSharedByID ¶
func (a *Actor) GetSharedByID(ctx context.Context, owner *proto.VendorApp, entityID ID, dst interface{}, retrieve ...RetrieveOption) error
GetSharedByID retrieves an entity by the given retrieveBy, storing the result in dst
func (*Actor) GroupCount ¶
func (a *Actor) GroupCount(ctx context.Context, entityType string, groupBy []string, options ...FindOption) (map[string]*proto.GroupCountResponse_Result, error)
GroupCount returns a list of entities within an active set
func (*Actor) List
deprecated
func (a *Actor) List(ctx context.Context, entityType string, retrieveProperties []string, options ...FindOption) ([]*proto.EntityResponse, error)
Deprecated: use keystone.Connection.List instead
func (*Actor) Mutate ¶
func (a *Actor) Mutate(ctx context.Context, src interface{}, options ...MutateOption) error
Mutate is a function that can mutate an entity
func (*Actor) MutateWithDefaultWatcher ¶
func (a *Actor) MutateWithDefaultWatcher(ctx context.Context, src interface{}, options ...MutateOption) error
func (*Actor) MutateWithWatcher ¶
func (*Actor) NewGDPRToken ¶
func (*Actor) NewPiiToken ¶
func (a *Actor) NewPiiToken(reference, country string, regulation PiiRegulation) (string, error)
func (*Actor) NewPiiTokenWithExpiry ¶
func (*Actor) NewRateLimit ¶
func (*Actor) NewTrackedRateLimit ¶
func (*Actor) PermanentlyDestroyEntity ¶
func (*Actor) QueryIndex ¶
func (a *Actor) QueryIndex(ctx context.Context, entityType string, retrieveProperties []string, options ...FindOption) ([]*proto.EntityResponse, error)
QueryIndex returns a list of entities within the index
func (*Actor) RemoteGet ¶
func (a *Actor) RemoteGet(ctx context.Context, remoteID ID, dst interface{}, retrieve ...RetrieveOption) error
RemoteGet retrieves an entity by the given ID, storing the result in dst
func (*Actor) RemoteGetProperties ¶
func (*Actor) RemoteMutate ¶
func (*Actor) ReplaceConnection ¶
func (a *Actor) ReplaceConnection(c *Connection)
func (*Actor) ReportTimeSeries ¶
ReportTimeSeries writes point in time data
func (*Actor) ServerStatus ¶
func (a *Actor) ServerStatus() (*proto.StatusResponse, error)
func (*Actor) SetClientName ¶
SetClientName sets the client name for the actor
func (*Actor) SetDynamicProperties ¶
func (*Actor) SetTraceID ¶
func (*Actor) ShareView ¶
func (a *Actor) ShareView(ctx context.Context, with *proto.VendorApp, def *SharedView) (*proto.SharedViewResponse, error)
func (*Actor) SharedViews ¶
func (*Actor) SquidRetrieve ¶
func (a *Actor) SquidRetrieve(sequenceKey, squat string) (*proto.SquidResponse, error)
func (*Actor) TaskStream ¶
func (*Actor) WorkspaceID ¶
type Amount ¶
Amount represents money
func (*Amount) GetCurrency ¶
func (*Amount) GreaterThan ¶
func (*Amount) PropertyDefinition ¶
func (a *Amount) PropertyDefinition() proto.PropertyDefinition
func (*Amount) UnitString ¶
type BaseChildEntity ¶
type BaseChildEntity struct { BaseEntity // contains filtered or unexported fields }
BaseChildEntity is a full entity, but keyed under a parent entity
func (*BaseChildEntity) GetKeystoneChildID ¶
func (e *BaseChildEntity) GetKeystoneChildID() string
func (*BaseChildEntity) GetKeystoneParentID ¶
func (e *BaseChildEntity) GetKeystoneParentID() string
func (*BaseChildEntity) SetKeystoneChildID ¶
func (e *BaseChildEntity) SetKeystoneChildID(id string)
func (*BaseChildEntity) SetKeystoneID ¶
func (e *BaseChildEntity) SetKeystoneID(id ID)
func (*BaseChildEntity) SetKeystoneParentID ¶
func (e *BaseChildEntity) SetKeystoneParentID(id ID)
type BaseEntity ¶
type Child ¶
type Child struct {
// contains filtered or unexported fields
}
func (*Child) AggregateValue ¶
func (*Child) SetAggregateValue ¶
func (*Child) SetChildID ¶
type ChildEntity ¶
type ChildLoader ¶
type ChildLoader struct {
// contains filtered or unexported fields
}
func WithChildren ¶
func WithChildren(childType string, ids ...string) ChildLoader
WithChildren is a retrieve option that loads Children
func (*ChildLoader) Apply ¶
func (l *ChildLoader) Apply(config *proto.EntityView)
func (*ChildLoader) ObserveRetrieve ¶
func (l *ChildLoader) ObserveRetrieve(resp *proto.EntityResponse)
type ChildProvider ¶
type ChildProvider interface { GetChildrenToStore() []*proto.EntityChild GetChildrenToRemove() []*proto.EntityChild ClearChildChanges() error GetTruncateChildrenType() []*proto.Key }
ChildProvider is an interface for entities that can have Children
type ChildUpdateProvider ¶
type ChildUpdateProvider interface {
// contains filtered or unexported methods
}
type Connection ¶
type Connection struct { proto.KeystoneClient // contains filtered or unexported fields }
Connection is a connection to a keystone server
func DefaultConnection ¶
func DefaultConnection(host, port, vendorID, appID, accessToken string) *Connection
func NewConnection ¶
func NewConnection(client proto.KeystoneClient, vendorID, appID, accessToken string) *Connection
NewConnection creates a new connection to a keystone server
func (*Connection) AKVDel ¶
func (c *Connection) AKVDel(ctx context.Context, in *proto.AKVDelRequest, opts ...grpc.CallOption) (*proto.GenericResponse, error)
func (*Connection) AKVGet ¶
func (c *Connection) AKVGet(ctx context.Context, in *proto.AKVGetRequest, opts ...grpc.CallOption) (*proto.AKVGetResponse, error)
func (*Connection) AKVPut ¶
func (c *Connection) AKVPut(ctx context.Context, in *proto.AKVPutRequest, opts ...grpc.CallOption) (*proto.GenericResponse, error)
func (*Connection) Actor ¶
func (c *Connection) Actor(workspaceID, remoteIP, userID, userAgent string) Actor
Actor returns an actor for the given workspace, remote IP, user ID, and user agent
func (*Connection) ChartTimeSeries ¶
func (c *Connection) ChartTimeSeries(ctx context.Context, in *proto.ChartTimeSeriesRequest, opts ...grpc.CallOption) (*proto.ChartTimeSeriesResponse, error)
func (*Connection) DailyEntities ¶
func (c *Connection) DailyEntities(ctx context.Context, in *proto.DailyEntityRequest, opts ...grpc.CallOption) (*proto.DailyEntityResponse, error)
func (*Connection) Define ¶
func (c *Connection) Define(ctx context.Context, in *proto.SchemaRequest, opts ...grpc.CallOption) (*proto.Schema, error)
func (*Connection) Destroy ¶
func (c *Connection) Destroy(ctx context.Context, in *proto.DestroyRequest, opts ...grpc.CallOption) (*proto.DestroyResponse, error)
func (*Connection) DirectClient ¶
func (c *Connection) DirectClient() proto.KeystoneClient
DirectClient avoid using the direct client in case of changes
func (*Connection) EventStream ¶
func (c *Connection) EventStream(ctx context.Context, in *proto.EventStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[proto.EventStreamResponse], error)
func (*Connection) Events ¶
func (c *Connection) Events(ctx context.Context, in *proto.EventRequest, opts ...grpc.CallOption) (*proto.EventsResponse, error)
func (*Connection) Find ¶
func (c *Connection) Find(ctx context.Context, in *proto.FindRequest, opts ...grpc.CallOption) (*proto.FindResponse, error)
func (*Connection) GroupCount ¶
func (c *Connection) GroupCount(ctx context.Context, in *proto.GroupCountRequest, opts ...grpc.CallOption) (*proto.GroupCountResponse, error)
func (*Connection) IID ¶
func (c *Connection) IID(ctx context.Context, in *proto.IIDCreateRequest, opts ...grpc.CallOption) (*proto.IIDResponse, error)
func (*Connection) IIDLookup ¶
func (c *Connection) IIDLookup(ctx context.Context, in *proto.IIDRequest, opts ...grpc.CallOption) (*proto.IIDsResponse, error)
func (*Connection) List ¶
func (c *Connection) List(ctx context.Context, in *proto.ListRequest, opts ...grpc.CallOption) (*proto.ListResponse, error)
func (*Connection) Log ¶
func (c *Connection) Log(ctx context.Context, in *proto.LogRequest, opts ...grpc.CallOption) (*proto.LogResponse, error)
func (*Connection) Logs ¶
func (c *Connection) Logs(ctx context.Context, in *proto.LogsRequest, opts ...grpc.CallOption) (*proto.LogsResponse, error)
func (*Connection) Mutate ¶
func (c *Connection) Mutate(ctx context.Context, in *proto.MutateRequest, opts ...grpc.CallOption) (*proto.MutateResponse, error)
func (*Connection) PiiAnonymize ¶
func (c *Connection) PiiAnonymize(ctx context.Context, in *proto.PiiAnonymizeRequest, opts ...grpc.CallOption) (*proto.PiiAnonymizeResponse, error)
func (*Connection) PiiToken ¶
func (c *Connection) PiiToken(ctx context.Context, in *proto.PiiTokenRequest, opts ...grpc.CallOption) (*proto.PiiTokenResponse, error)
func (*Connection) PushTask ¶
func (c *Connection) PushTask(ctx context.Context, in *proto.PushTaskRequest, opts ...grpc.CallOption) (*proto.GenericResponse, error)
func (*Connection) QueryIndex ¶
func (c *Connection) QueryIndex(ctx context.Context, in *proto.QueryIndexRequest, opts ...grpc.CallOption) (*proto.QueryIndexResponse, error)
func (*Connection) RateLimit ¶
func (c *Connection) RateLimit(ctx context.Context, in *proto.RateLimitRequest, opts ...grpc.CallOption) (*proto.RateLimitResponse, error)
func (*Connection) RegisterTypes ¶
func (c *Connection) RegisterTypes(types ...interface{}) int
RegisterTypes registers the given types with the connection, returning the number of new types registered
func (*Connection) ReportTimeSeries ¶
func (c *Connection) ReportTimeSeries(ctx context.Context, in *proto.ReportTimeSeriesRequest, opts ...grpc.CallOption) (*proto.MutateResponse, error)
func (*Connection) Retrieve ¶
func (c *Connection) Retrieve(ctx context.Context, in *proto.EntityRequest, opts ...grpc.CallOption) (*proto.EntityResponse, error)
func (*Connection) SQUID ¶
func (c *Connection) SQUID(ctx context.Context, in *proto.SquidRequest, opts ...grpc.CallOption) (*proto.SquidResponse, error)
func (*Connection) SQUIDRecover ¶
func (c *Connection) SQUIDRecover(ctx context.Context, in *proto.SquidRecoverRequest, opts ...grpc.CallOption) (*proto.SquidResponse, error)
func (*Connection) SchemaStatistics ¶
func (c *Connection) SchemaStatistics(ctx context.Context, in *proto.SchemaStatisticsRequest, opts ...grpc.CallOption) (*proto.SchemaStatisticsResponse, error)
func (*Connection) ShareView ¶
func (c *Connection) ShareView(ctx context.Context, in *proto.ShareViewRequest, opts ...grpc.CallOption) (*proto.SharedViewResponse, error)
func (*Connection) SharedViews ¶
func (c *Connection) SharedViews(ctx context.Context, in *proto.SharedViewsRequest, opts ...grpc.CallOption) (*proto.SharedViewsResponse, error)
func (*Connection) SnapshotReport ¶
func (c *Connection) SnapshotReport(ctx context.Context, in *proto.SnapshotReportRequest, opts ...grpc.CallOption) (*proto.MutateResponse, error)
func (*Connection) Status ¶
func (c *Connection) Status(ctx context.Context, in *proto.Authorization, opts ...grpc.CallOption) (*proto.StatusResponse, error)
func (*Connection) SyncSchema ¶
func (c *Connection) SyncSchema() *sync.WaitGroup
SyncSchema syncs the schema with the server
func (*Connection) TaskStream ¶
func (c *Connection) TaskStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[proto.TaskAckRequest, proto.TaskResponse], error)
type ConvertStructToDynamicProperties ¶
type ConvertStructToDynamicProperties interface {
// contains filtered or unexported methods
}
type Country ¶
type Country String
func (*Country) PropertyDefinition ¶
func (s *Country) PropertyDefinition() proto.PropertyDefinition
type DynamicChild ¶
type DynamicChild struct { Child // contains filtered or unexported fields }
func NewDynamicChild ¶
func NewDynamicChild(from interface{}) *DynamicChild
func (*DynamicChild) Append ¶
func (e *DynamicChild) Append(key string, value []byte)
func (*DynamicChild) KeystoneData ¶
func (e *DynamicChild) KeystoneData() map[string][]byte
func (*DynamicChild) KeystoneDataAppend ¶
func (e *DynamicChild) KeystoneDataAppend() map[string][]byte
func (*DynamicChild) KeystoneRemoveData ¶
func (e *DynamicChild) KeystoneRemoveData() []string
func (*DynamicChild) Reduce ¶
func (e *DynamicChild) Reduce(key string)
func (*DynamicChild) ReplaceData ¶
func (e *DynamicChild) ReplaceData(with map[string][]byte)
func (*DynamicChild) SetChildID ¶
func (e *DynamicChild) SetChildID(id string)
type DynamicRemoteEntity ¶
type DynamicRemoteEntity struct {
Remote
}
type Email ¶
type Email struct{ SecureString }
func (*Email) PropertyDefinition ¶
func (s *Email) PropertyDefinition() proto.PropertyDefinition
type EmbeddedChildren ¶
type EmbeddedChildren struct {
// contains filtered or unexported fields
}
EmbeddedChildren is a struct that implements ChildProvider
func (*EmbeddedChildren) AddChild ¶
func (e *EmbeddedChildren) AddChild(child NestedChild)
AddChild adds a child to storage
func (*EmbeddedChildren) AddChildren ¶
func (e *EmbeddedChildren) AddChildren(child ...any)
AddChildren adds multiple children to storage
func (*EmbeddedChildren) ClearChildChanges ¶
func (e *EmbeddedChildren) ClearChildChanges() error
func (*EmbeddedChildren) GetChildrenToRemove ¶
func (e *EmbeddedChildren) GetChildrenToRemove() []*proto.EntityChild
func (*EmbeddedChildren) GetChildrenToStore ¶
func (e *EmbeddedChildren) GetChildrenToStore() []*proto.EntityChild
func (*EmbeddedChildren) GetTruncateChildrenType ¶
func (e *EmbeddedChildren) GetTruncateChildrenType() []*proto.Key
func (*EmbeddedChildren) RemoveChild ¶
func (e *EmbeddedChildren) RemoveChild(childType any, cid ...string)
RemoveChild removes a child from the list of children, and prepares for removal
func (*EmbeddedChildren) TruncateByType ¶
func (e *EmbeddedChildren) TruncateByType(childType interface{})
WARNING: Adding children by this same type will not work in a single mutate call
type EmbeddedDetails ¶
type EmbeddedDetails struct {
// contains filtered or unexported fields
}
func (*EmbeddedDetails) DateCreated ¶
func (e *EmbeddedDetails) DateCreated() time.Time
func (*EmbeddedDetails) KeystoneState ¶
func (e *EmbeddedDetails) KeystoneState() proto.EntityState
func (*EmbeddedDetails) LastUpdated ¶
func (e *EmbeddedDetails) LastUpdated() time.Time
func (*EmbeddedDetails) SetEntityDetail ¶
func (e *EmbeddedDetails) SetEntityDetail(entity *proto.Entity)
type EmbeddedEntity ¶
type EmbeddedEntity struct {
// contains filtered or unexported fields
}
func (*EmbeddedEntity) ExistsInKeystone ¶
func (e *EmbeddedEntity) ExistsInKeystone() bool
func (*EmbeddedEntity) GetKeystoneID ¶
func (e *EmbeddedEntity) GetKeystoneID() ID
func (*EmbeddedEntity) ObserveMutation ¶
func (e *EmbeddedEntity) ObserveMutation(resp *proto.MutateResponse)
func (*EmbeddedEntity) ObserveRetrieve ¶
func (e *EmbeddedEntity) ObserveRetrieve(resp *proto.EntityResponse)
func (*EmbeddedEntity) SetHashID ¶
func (e *EmbeddedEntity) SetHashID(id string) error
func (*EmbeddedEntity) SetKeystoneID ¶
func (e *EmbeddedEntity) SetKeystoneID(id ID)
func (*EmbeddedEntity) StoredInKeystone ¶
func (e *EmbeddedEntity) StoredInKeystone() *bool
type EmbeddedEvents ¶
type EmbeddedEvents struct {
// contains filtered or unexported fields
}
EmbeddedEvents is a struct that implements EventProvider
func (*EmbeddedEvents) AddEvent ¶
func (e *EmbeddedEvents) AddEvent(eventType string, properties map[string]string)
AddEvent adds an event
func (*EmbeddedEvents) ClearEvents ¶
func (e *EmbeddedEvents) ClearEvents() error
ClearEvents clears the events
func (*EmbeddedEvents) GetEvents ¶
func (e *EmbeddedEvents) GetEvents() []*proto.EntityEvent
GetEvents returns the events
type EmbeddedLabels ¶
type EmbeddedLabels struct {
// contains filtered or unexported fields
}
EmbeddedLabels is a struct that implements LabelProvider
func (*EmbeddedLabels) AddLabel ¶
func (e *EmbeddedLabels) AddLabel(name, value string)
AddLabel adds a label
func (*EmbeddedLabels) ClearLabels ¶
func (e *EmbeddedLabels) ClearLabels() error
ClearLabels clears the labels
func (*EmbeddedLabels) GetLabels ¶
func (e *EmbeddedLabels) GetLabels() []*proto.EntityLabel
GetLabels returns the labels
type EmbeddedLock ¶
type EmbeddedLock struct {
// contains filtered or unexported fields
}
func (*EmbeddedLock) AcquiredLock ¶
func (e *EmbeddedLock) AcquiredLock() bool
func (*EmbeddedLock) LockData ¶
func (e *EmbeddedLock) LockData() *LockInfo
func (*EmbeddedLock) SetLockResult ¶
func (e *EmbeddedLock) SetLockResult(lockInfo *LockInfo)
type EmbeddedLogs ¶
type EmbeddedLogs struct {
// contains filtered or unexported fields
}
EmbeddedLogs is a struct that implements LogProvider
func (*EmbeddedLogs) GetLogs ¶
func (e *EmbeddedLogs) GetLogs() []*proto.EntityLog
GetLogs returns the logs
func (*EmbeddedLogs) Log ¶
func (e *EmbeddedLogs) Log(level proto.LogLevel, message, reference, actor, traceID string, logTime time.Time, data map[string]string)
Log logs a message
func (*EmbeddedLogs) LogAlert ¶
func (e *EmbeddedLogs) LogAlert(message, reference, actor, traceID string, data map[string]string)
LogAlert logs an alert message
func (*EmbeddedLogs) LogCritical ¶
func (e *EmbeddedLogs) LogCritical(message, reference, actor, traceID string, data map[string]string)
LogCritical logs a critical message
func (*EmbeddedLogs) LogDebug ¶
func (e *EmbeddedLogs) LogDebug(message, reference, actor, traceID string, data map[string]string)
LogDebug logs a debug message
func (*EmbeddedLogs) LogError ¶
func (e *EmbeddedLogs) LogError(message, reference, actor, traceID string, data map[string]string)
LogError logs an error message
func (*EmbeddedLogs) LogFatal ¶
func (e *EmbeddedLogs) LogFatal(message, reference, actor, traceID string, data map[string]string)
LogFatal logs a fatal message
func (*EmbeddedLogs) LogInfo ¶
func (e *EmbeddedLogs) LogInfo(message, reference, actor, traceID string, data map[string]string)
LogInfo logs an info message
type EmbeddedObjects ¶
type EmbeddedObjects struct {
// contains filtered or unexported fields
}
EmbeddedObjects is a struct that implements ObjectProvider
func (*EmbeddedObjects) ClearObjects ¶
func (e *EmbeddedObjects) ClearObjects() error
ClearObjects clears the Objects
func (*EmbeddedObjects) GetObject ¶
func (e *EmbeddedObjects) GetObject(path string) *proto.EntityObject
GetObject returns an Object by path
func (*EmbeddedObjects) GetObjects ¶
func (e *EmbeddedObjects) GetObjects() []*proto.EntityObject
GetObjects returns the Objects
type EmbeddedRelationships ¶
type EmbeddedRelationships struct {
// contains filtered or unexported fields
}
EmbeddedRelationships is a struct that implements RelationshipProvider
func (*EmbeddedRelationships) AddRelationship ¶
func (e *EmbeddedRelationships) AddRelationship(relationshipType string, target ID, meta map[string]string, since time.Time)
AddRelationship adds a relationship
func (*EmbeddedRelationships) ClearRelationships ¶
func (e *EmbeddedRelationships) ClearRelationships() error
ClearRelationships clears the relationships
func (*EmbeddedRelationships) GetRelationships ¶
func (e *EmbeddedRelationships) GetRelationships() []*proto.EntityRelationship
GetRelationships returns the relationships
func (*EmbeddedRelationships) SetRelationships ¶
func (e *EmbeddedRelationships) SetRelationships(links []*proto.EntityRelationship)
SetRelationships sets the relationships
type EmbeddedSensors ¶
type EmbeddedSensors struct {
// contains filtered or unexported fields
}
EmbeddedSensors is a struct that implements SensorProvider
func (*EmbeddedSensors) AddSensorMeasurement ¶
func (e *EmbeddedSensors) AddSensorMeasurement(sensor string, value float64)
AddSensorMeasurement adds a Sensor measurement
func (*EmbeddedSensors) AddSensorMeasurementWithData ¶
func (e *EmbeddedSensors) AddSensorMeasurementWithData(sensor string, value float64, data map[string]string)
AddSensorMeasurementWithData adds a Sensor measurement
func (*EmbeddedSensors) ClearSensorMeasurements ¶
func (e *EmbeddedSensors) ClearSensorMeasurements() error
ClearSensorMeasurements clears the Sensors
func (*EmbeddedSensors) GetSensorMeasurements ¶
func (e *EmbeddedSensors) GetSensorMeasurements() []*proto.EntitySensorMeasurement
GetSensorMeasurements returns the Sensors measurements
type EmbeddedWatcher ¶
type EmbeddedWatcher struct {
// contains filtered or unexported fields
}
func (*EmbeddedWatcher) HasWatcher ¶
func (e *EmbeddedWatcher) HasWatcher() bool
func (*EmbeddedWatcher) SetWatcher ¶
func (e *EmbeddedWatcher) SetWatcher(watcher *Watcher)
func (*EmbeddedWatcher) Watcher ¶
func (e *EmbeddedWatcher) Watcher() *Watcher
type EntityDefinition ¶
type EntityDefinition interface {
GetKeystoneDefinition() TypeDefinition
}
EntityDefinition is an interface that defines the keystone entity
type EntityDetail ¶
type EntityObject ¶
type EntityObject struct {
// contains filtered or unexported fields
}
func NewUpload ¶
func NewUpload(path string, storageClass proto.ObjectType) *EntityObject
func (*EntityObject) GetPath ¶
func (e *EntityObject) GetPath() string
func (*EntityObject) GetUploadURL ¶
func (e *EntityObject) GetUploadURL() string
func (*EntityObject) ReadyForUpload ¶
func (e *EntityObject) ReadyForUpload() bool
func (*EntityObject) SetContentDisposition ¶
func (e *EntityObject) SetContentDisposition(contentDisposition string)
func (*EntityObject) SetContentEncoding ¶
func (e *EntityObject) SetContentEncoding(contentEncoding string)
func (*EntityObject) SetContentLanguage ¶
func (e *EntityObject) SetContentLanguage(contentLanguage string)
func (*EntityObject) SetContentType ¶
func (e *EntityObject) SetContentType(contentType string)
func (*EntityObject) SetData ¶
func (e *EntityObject) SetData(data []byte)
func (*EntityObject) SetExpiry ¶
func (e *EntityObject) SetExpiry(expiry time.Time)
func (*EntityObject) SetMeta ¶
func (e *EntityObject) SetMeta(key, value string)
func (*EntityObject) SetPublic ¶
func (e *EntityObject) SetPublic(public bool)
func (*EntityObject) UploadToJson ¶
func (e *EntityObject) UploadToJson(content interface{}) (*http.Response, error)
type EventProvider ¶
type EventProvider interface { ClearEvents() error GetEvents() []*proto.EntityEvent }
EventProvider is an interface for entities that can have events
type ExternalID ¶
type ExternalID struct {
// contains filtered or unexported fields
}
func ExternalIDFromString ¶
func ExternalIDFromString(input string) (*ExternalID, error)
func NewExternalID ¶
func NewExternalID(vendorID, appID, entityType string, id ID) ExternalID
func (*ExternalID) FromString ¶
func (f *ExternalID) FromString(input string) error
func (*ExternalID) ID ¶
func (f *ExternalID) ID() *ID
func (*ExternalID) IsZero ¶
func (f *ExternalID) IsZero() bool
func (*ExternalID) MarshalValue ¶
func (f *ExternalID) MarshalValue() (*proto.Value, error)
func (*ExternalID) PropertyDefinition ¶
func (f *ExternalID) PropertyDefinition() proto.PropertyDefinition
func (*ExternalID) Source ¶
func (f *ExternalID) Source() *Key
func (*ExternalID) String ¶
func (f *ExternalID) String() string
func (*ExternalID) UnmarshalValue ¶
func (f *ExternalID) UnmarshalValue(value *proto.Value) error
type FindOption ¶
type FindOption interface {
Apply(config *filterRequest)
}
FindOption is an interface for options to be applied to a find request
func And ¶
func And(filters ...FindOption) FindOption
func ChildOf ¶
func ChildOf(entityID string) FindOption
func IsNotNull ¶
func IsNotNull(key string) FindOption
IsNotNull is a find option that filters entities by a Property not being null
func IsNull ¶
func IsNull(key string) FindOption
IsNull is a find option that filters entities by a Property being null
func Limit ¶
func Limit(perPage, pageNumber int32) FindOption
func Or ¶
func Or(filters ...FindOption) FindOption
func RelationOf ¶
func RelationOf(entityID, relationshipType, relVendor, relApp string) FindOption
func RelationOfSibling ¶
func RelationOfSibling(entityID, relationshipType string) FindOption
func RelationTo ¶
func RelationTo(entityID ID, relationshipType, relVendor, relApp string) FindOption
func RelationToSibling ¶
func RelationToSibling(entityID ID, relationshipType string) FindOption
func SortAsc ¶
func SortAsc(property string) FindOption
func SortBy ¶
func SortBy(property string, descending bool) FindOption
func SortByNullFirst ¶
func SortByNullFirst(property string, descending bool) FindOption
func SortDesc ¶
func SortDesc(property string) FindOption
func Where ¶
func Where(key, operator string, values ...any) FindOption
Where allows for filtering entities by a Property, with a string operator
func WhereBetween ¶
func WhereBetween(key string, value1, value2 any) FindOption
WhereBetween is a find option that filters entities by a Property being between two values
func WhereContains ¶
func WhereContains(key string, value any) FindOption
WhereContains is a find option that filters entities by a Property containing a Value
func WhereEndsWith ¶
func WhereEndsWith(key string, value any) FindOption
WhereEndsWith is a find option that filters entities by a Property ending with a Value
func WhereEquals ¶
func WhereEquals(key string, value any) FindOption
WhereEquals is a find option that filters entities by a Property equaling a Value
func WhereGreaterThan ¶
func WhereGreaterThan(key string, value any) FindOption
WhereGreaterThan is a find option that filters entities by a Property being greater than a Value
func WhereGreaterThanOrEquals ¶
func WhereGreaterThanOrEquals(key string, value any) FindOption
WhereGreaterThanOrEquals is a find option that filters entities by a Property being greater than or equal to a Value
func WhereIn ¶
func WhereIn(key string, value ...any) FindOption
WhereIn is a find option that filters entities by a Property being in a list of values
func WhereLessThan ¶
func WhereLessThan(key string, value any) FindOption
WhereLessThan is a find option that filters entities by a Property being less than a Value
func WhereLessThanOrEquals ¶
func WhereLessThanOrEquals(key string, value any) FindOption
WhereLessThanOrEquals is a find option that filters entities by a Property being less than or equal to a Value
func WhereNotContains ¶
func WhereNotContains(key string, value any) FindOption
WhereNotContains is a find option that filters entities by a Property not containing a Value
func WhereNotEquals ¶
func WhereNotEquals(key string, value any) FindOption
WhereNotEquals is a find option that filters entities by a Property not equaling a Value
func WhereNotIn ¶
func WhereNotIn(key string, value ...any) FindOption
WhereNotIn is a find option that filters entities by a Property not being in a list of values
func WhereStartsWith ¶
func WhereStartsWith(key string, value any) FindOption
WhereStartsWith is a find option that filters entities by a Property starting with a Value
func WithEntityIDs ¶
func WithEntityIDs(ids []string) FindOption
func WithLabel ¶
func WithLabel(name, value string) FindOption
type GenericResult ¶
type GenericResult map[string]interface{}
GenericResult is a map that can be used to retrieve a generic result
type ID ¶
type ID string
ID is a unique identifier for a remote object
type IPAddress ¶
type IPAddress String
func (*IPAddress) PropertyDefinition ¶
func (s *IPAddress) PropertyDefinition() proto.PropertyDefinition
type IncrementingID ¶
type IncrementingID struct {
// contains filtered or unexported fields
}
func NewIncrementingID ¶
func NewIncrementingID(eid ID, incrementKeys ...string) *IncrementingID
func (*IncrementingID) Commit ¶
func (i *IncrementingID) Commit(a *Actor) (*proto.IIDResponse, error)
func (*IncrementingID) WithMeta ¶
func (i *IncrementingID) WithMeta(meta map[string]string) *IncrementingID
func (*IncrementingID) WithRead ¶
func (i *IncrementingID) WithRead(keys ...string) *IncrementingID
type IntSet ¶
type IntSet struct {
// contains filtered or unexported fields
}
func (*IntSet) CurrentValues ¶
func (*IntSet) ObserveMutation ¶
func (s *IntSet) ObserveMutation(resp *proto.MutateResponse)
func (*IntSet) PropertyDefinition ¶
func (s *IntSet) PropertyDefinition() proto.PropertyDefinition
func (*IntSet) ReplaceExisting ¶
func (*IntSet) ReplaceWith ¶
type KeyMixed ¶
type KeyMixed struct {
// contains filtered or unexported fields
}
KeyMixed is a map of mixed values
func NewKeyMixed ¶
func (*KeyMixed) ObserveMutation ¶
func (s *KeyMixed) ObserveMutation(resp *proto.MutateResponse)
func (*KeyMixed) PropertyDefinition ¶
func (s *KeyMixed) PropertyDefinition() proto.PropertyDefinition
func (*KeyMixed) ReplaceExisting ¶
type LabelProvider ¶
type LabelProvider interface { ClearLabels() error GetLabels() []*proto.EntityLabel }
LabelProvider is an interface for entities that can provide labels
type LogProvider ¶
LogProvider is an interface for entities that can have logs
type MarshaledEntity ¶
func NewMarshaledEntity ¶
func NewMarshaledEntity() MarshaledEntity
func (*MarshaledEntity) Append ¶
func (m *MarshaledEntity) Append(name string, val interface{}) error
type MinMax ¶
type MinMax struct {
// contains filtered or unexported fields
}
func (*MinMax) PropertyDefinition ¶
func (s *MinMax) PropertyDefinition() proto.PropertyDefinition
type Mixed ¶
type Mixed struct {
// contains filtered or unexported fields
}
Mixed is a mixed value
func (*Mixed) PropertyDefinition ¶
func (m *Mixed) PropertyDefinition() proto.PropertyDefinition
type MockServer ¶
type MockServer struct { proto.UnimplementedKeystoneServer DefineFunc func(context.Context, *proto.SchemaRequest) (*proto.Schema, error) MutateFunc func(context.Context, *proto.MutateRequest) (*proto.MutateResponse, error) ReportTimeSeriesFunc func(context.Context, *proto.ReportTimeSeriesRequest) (*proto.MutateResponse, error) RetrieveFunc func(context.Context, *proto.EntityRequest) (*proto.EntityResponse, error) FindFunc func(context.Context, *proto.FindRequest) (*proto.FindResponse, error) ListFunc func(context.Context, *proto.ListRequest) (*proto.ListResponse, error) GroupCountFunc func(context.Context, *proto.GroupCountRequest) (*proto.GroupCountResponse, error) LogFunc func(context.Context, *proto.LogRequest) (*proto.LogResponse, error) LogsFunc func(context.Context, *proto.LogsRequest) (*proto.LogsResponse, error) EventsFunc func(context.Context, *proto.EventRequest) (*proto.EventsResponse, error) DailyEntitiesFunc func(context.Context, *proto.DailyEntityRequest) (*proto.DailyEntityResponse, error) SchemaStatisticsFunc func(context.Context, *proto.SchemaStatisticsRequest) (*proto.SchemaStatisticsResponse, error) ChartTimeSeriesFunc func(context.Context, *proto.ChartTimeSeriesRequest) (*proto.ChartTimeSeriesResponse, error) RateLimitFunc func(context.Context, *proto.RateLimitRequest) (*proto.RateLimitResponse, error) StatusFunc func(context.Context, *proto.Authorization) (*proto.StatusResponse, error) }
func (*MockServer) ChartTimeSeries ¶
func (m *MockServer) ChartTimeSeries(ctx context.Context, req *proto.ChartTimeSeriesRequest) (*proto.ChartTimeSeriesResponse, error)
func (*MockServer) DailyEntities ¶
func (m *MockServer) DailyEntities(ctx context.Context, req *proto.DailyEntityRequest) (*proto.DailyEntityResponse, error)
func (*MockServer) Define ¶
func (m *MockServer) Define(ctx context.Context, req *proto.SchemaRequest) (*proto.Schema, error)
func (*MockServer) Events ¶
func (m *MockServer) Events(ctx context.Context, req *proto.EventRequest) (*proto.EventsResponse, error)
func (*MockServer) Find ¶
func (m *MockServer) Find(ctx context.Context, req *proto.FindRequest) (*proto.FindResponse, error)
func (*MockServer) GroupCount ¶
func (m *MockServer) GroupCount(ctx context.Context, req *proto.GroupCountRequest) (*proto.GroupCountResponse, error)
func (*MockServer) List ¶
func (m *MockServer) List(ctx context.Context, req *proto.ListRequest) (*proto.ListResponse, error)
func (*MockServer) Log ¶
func (m *MockServer) Log(ctx context.Context, req *proto.LogRequest) (*proto.LogResponse, error)
func (*MockServer) Logs ¶
func (m *MockServer) Logs(ctx context.Context, req *proto.LogsRequest) (*proto.LogsResponse, error)
func (*MockServer) Mutate ¶
func (m *MockServer) Mutate(ctx context.Context, req *proto.MutateRequest) (*proto.MutateResponse, error)
func (*MockServer) RateLimit ¶
func (m *MockServer) RateLimit(ctx context.Context, req *proto.RateLimitRequest) (*proto.RateLimitResponse, error)
func (*MockServer) ReportTimeSeries ¶
func (m *MockServer) ReportTimeSeries(ctx context.Context, req *proto.ReportTimeSeriesRequest) (*proto.MutateResponse, error)
func (*MockServer) Retrieve ¶
func (m *MockServer) Retrieve(ctx context.Context, req *proto.EntityRequest) (*proto.EntityResponse, error)
func (*MockServer) SchemaStatistics ¶
func (m *MockServer) SchemaStatistics(ctx context.Context, req *proto.SchemaStatisticsRequest) (*proto.SchemaStatisticsResponse, error)
func (*MockServer) ShareView ¶
func (m *MockServer) ShareView(ctx context.Context, req *proto.ShareViewRequest) (*proto.SharedViewResponse, error)
func (*MockServer) ShareViews ¶
func (m *MockServer) ShareViews(ctx context.Context, req *proto.SharedViewsRequest) (*proto.SharedViewsResponse, error)
func (*MockServer) Status ¶
func (m *MockServer) Status(ctx context.Context, req *proto.Authorization) (*proto.StatusResponse, error)
type MutateOption ¶
type MutateOption interface {
// contains filtered or unexported methods
}
func BackgroundIndex ¶
func BackgroundIndex() MutateOption
BackgroundIndex will avoid waiting for indexing to complete
func MatchExisting ¶
func MatchExisting(options ...FindOption) MutateOption
func MutateProperties ¶
func MutateProperties(property ...string) MutateOption
MutateProperties Only mutate the specified properties
func OnConflictIgnore ¶
func OnConflictIgnore() MutateOption
OnConflictIgnore will skip the mutation if the entity already exists
func OnConflictUseID ¶
func OnConflictUseID(property ...string) MutateOption
OnConflictUseID should set the unique properties that can be used to identify an existing identity
func PrepareUploads ¶
func PrepareUploads(objs ...*EntityObject) MutateOption
func WithMutationComment ¶
func WithMutationComment(comment string) MutateOption
func WithPiiReference ¶
func WithPiiReference(vendorId, appId, piiKey string) MutateOption
func WithPiiToken ¶
func WithPiiToken(piiToken string) MutateOption
type MutationObserver ¶
type MutationObserver interface {
ObserveMutation(response *proto.MutateResponse)
}
type MutationOptionWatcherPrepare ¶
type MutationOptionWatcherPrepare interface {
// contains filtered or unexported methods
}
type NestedChild ¶
NestedChild is an interface that defines a child struct - these are not standalone entities
type NestedChildAggregateValue ¶
NestedChildAggregateValue defines the aggregate Value of a child entity
type NestedChildDataMutator ¶
type NestedChildDataProvider ¶
type NestedChildDataReceiver ¶
type ObjectProvider ¶
type ObjectProvider interface { ClearObjects() error GetObjects() []*proto.EntityObject // contains filtered or unexported methods }
ObjectProvider is an interface for entities that can provide Objects
type PII ¶
type PII String
func (*PII) PropertyDefinition ¶
func (s *PII) PropertyDefinition() proto.PropertyDefinition
type PersonName ¶
type PersonName struct{ SecureString }
func NewPersonName ¶
func NewPersonName(name string) PersonName
func (*PersonName) PropertyDefinition ¶
func (s *PersonName) PropertyDefinition() proto.PropertyDefinition
type Phone ¶
type Phone struct{ SecureString }
func (*Phone) PropertyDefinition ¶
func (s *Phone) PropertyDefinition() proto.PropertyDefinition
type PiiRegulation ¶
type PiiRegulation string
const ( RegulationGDPR PiiRegulation = "GDPR" RegulationCCPA PiiRegulation = "CCPA" )
func (PiiRegulation) String ¶
func (p PiiRegulation) String() string
type Property ¶
type Property struct {
// contains filtered or unexported fields
}
func NewPrefixProperty ¶
func NewProperty ¶
func ReflectProperty ¶
func ReflectProperty(f reflect.StructField, prefix string) (Property, proto.PropertyDefinition)
func (*Property) HydrateOnly ¶
type PropertyValueList ¶
func (PropertyValueList) GetBool ¶
func (p PropertyValueList) GetBool(key string, defaultValue bool) bool
func (PropertyValueList) GetFloat ¶
func (p PropertyValueList) GetFloat(key string, defaultValue float64) float64
func (PropertyValueList) GetInt ¶
func (p PropertyValueList) GetInt(key string, defaultValue int64) int64
func (PropertyValueList) GetText ¶
func (p PropertyValueList) GetText(key, defaultValue string) string
type RateLimitResult ¶
type RateLimitResult struct {
// contains filtered or unexported fields
}
func (RateLimitResult) CurrentCount ¶
func (r RateLimitResult) CurrentCount() int32
func (RateLimitResult) HitLimit ¶
func (r RateLimitResult) HitLimit() bool
func (RateLimitResult) Percent ¶
func (r RateLimitResult) Percent() float64
type Reflector ¶
type RelationshipProvider ¶
type RelationshipProvider interface { ClearRelationships() error GetRelationships() []*proto.EntityRelationship SetRelationships(links []*proto.EntityRelationship) }
RelationshipProvider is an interface for entities that can have relationships
type Remote ¶
type Remote struct { EmbeddedSensors EmbeddedLogs EmbeddedEvents EmbeddedObjects // contains filtered or unexported fields }
func RemoteEntity ¶
RemoteEntity is a remote entity that is not stored in the local database
func (Remote) GetKeystoneID ¶
func (Remote) SetKeystoneID ¶
type RetrieveBy ¶
type RetrieveBy interface { BaseRequest() *proto.EntityRequest EntityType() string }
RetrieveBy is an interface that defines a retriever
func ByEntityID ¶
func ByEntityID(entityType interface{}, entityID ID) RetrieveBy
func ByHashID ¶
func ByHashID(entityType interface{}, entityID string) RetrieveBy
func ByUniqueProperty ¶
func ByUniqueProperty(entityType interface{}, uniqueID, property string) RetrieveBy
type RetrieveEntityOption ¶
type RetrieveEntityOption interface {
ApplyRequest(config *proto.EntityRequest)
}
type RetrieveObserver ¶
type RetrieveObserver interface {
ObserveRetrieve(resp *proto.EntityResponse)
}
type RetrieveOption ¶
type RetrieveOption interface {
Apply(config *proto.EntityView)
}
RetrieveOption is an interface for options to be applied to an entity request
func RetrieveOptions ¶
func RetrieveOptions(opts ...RetrieveOption) RetrieveOption
func WithChildSummary ¶
func WithChildSummary() RetrieveOption
func WithDecryptedProperties ¶
func WithDecryptedProperties(properties ...string) RetrieveOption
WithDecryptedProperties is a retrieve option that loads decrypted properties
func WithDescendantCount ¶
func WithDescendantCount(entityType string) RetrieveOption
func WithLabels ¶
func WithLabels() RetrieveOption
WithLabels is a retrieve option that loads labels
func WithLock ¶
func WithLock(note string, ttlSeconds int32) RetrieveOption
func WithObjects ¶
func WithObjects(paths ...string) RetrieveOption
func WithProperties ¶
func WithProperties(properties ...string) RetrieveOption
WithProperties is a retrieve option that loads properties
func WithProperty ¶
func WithProperty(decrypt bool, properties ...string) RetrieveOption
WithProperty is a retrieve option that loads properties
func WithRelationshipCount ¶
func WithRelationshipCount(relationType, appId, vendorId string) RetrieveOption
func WithRelationships ¶
func WithRelationships(keys ...string) RetrieveOption
WithRelationships is a retrieve option that loads relationships
func WithSiblingRelationshipCount ¶
func WithSiblingRelationshipCount(relationType string) RetrieveOption
func WithSummary ¶
func WithSummary() RetrieveOption
WithSummary is a retrieve option that loads summaries
func WithTotalRelationshipCount ¶
func WithTotalRelationshipCount() RetrieveOption
func WithVerifiedProperty ¶
func WithVerifiedProperty(property, compare string) RetrieveOption
func WithView ¶
func WithView(name string) RetrieveOption
type SecureIP ¶
type SecureIP struct{ SecureString }
func NewSecureIPV4 ¶
func (*SecureIP) PropertyDefinition ¶
func (s *SecureIP) PropertyDefinition() proto.PropertyDefinition
type SecurePII ¶
type SecurePII struct{ SecureString }
func NewSecurePII ¶
func (*SecurePII) PropertyDefinition ¶
func (s *SecurePII) PropertyDefinition() proto.PropertyDefinition
type SecureString ¶
SecureString is a string that represents sensitive Data
func NewSecureString ¶
func NewSecureString(original, masked string) SecureString
NewSecureString creates a new SecureString
func (*SecureString) IsZero ¶
func (e *SecureString) IsZero() bool
func (*SecureString) MarshalJSON ¶
func (e *SecureString) MarshalJSON() ([]byte, error)
func (*SecureString) MarshalValue ¶
func (e *SecureString) MarshalValue() (*proto.Value, error)
func (*SecureString) PropertyDefinition ¶
func (e *SecureString) PropertyDefinition() proto.PropertyDefinition
func (*SecureString) String ¶
func (e *SecureString) String() string
String returns the original string if it exists, otherwise the masked string
func (*SecureString) UnmarshalJSON ¶
func (e *SecureString) UnmarshalJSON(data []byte) error
func (*SecureString) UnmarshalValue ¶
func (e *SecureString) UnmarshalValue(value *proto.Value) error
type SensorProvider ¶
type SensorProvider interface { ClearSensorMeasurements() error GetSensorMeasurements() []*proto.EntitySensorMeasurement }
SensorProvider is an interface for entities that can provide Sensors
type SettableWatchedEntity ¶
type SettableWatchedEntity interface { WatchedEntity SetWatcher(*Watcher) }
type SharedView ¶
type SharedView struct {
// contains filtered or unexported fields
}
func NewSharedView ¶
func NewSharedView(properties ...string) *SharedView
func (*SharedView) Add ¶
func (s *SharedView) Add(property string, allowPii, allowSecure bool) *SharedView
func (*SharedView) ForAllWorkspaces ¶
func (s *SharedView) ForAllWorkspaces() *SharedView
func (*SharedView) ForEntity ¶
func (s *SharedView) ForEntity(entityID ID) *SharedView
func (*SharedView) ForType ¶
func (s *SharedView) ForType(forType string) *SharedView
func (*SharedView) WithComment ¶
func (s *SharedView) WithComment(comment string) *SharedView
type String ¶
type String string
func (*String) PropertyDefinition ¶
func (s *String) PropertyDefinition() proto.PropertyDefinition
type StringSet ¶
type StringSet struct {
// contains filtered or unexported fields
}
func NewStringSet ¶
func (*StringSet) CurrentValues ¶
func (*StringSet) ObserveMutation ¶
func (s *StringSet) ObserveMutation(resp *proto.MutateResponse)
func (*StringSet) PropertyDefinition ¶
func (s *StringSet) PropertyDefinition() proto.PropertyDefinition
func (*StringSet) ReplaceExisting ¶
func (*StringSet) ReplaceWith ¶
type TimeSeriesEntity ¶
type TimeSeriesEntity struct {
// contains filtered or unexported fields
}
func (*TimeSeriesEntity) GetTimeSeriesInputTime ¶
func (e *TimeSeriesEntity) GetTimeSeriesInputTime() time.Time
func (*TimeSeriesEntity) SetTimeSeriesInputTime ¶
func (e *TimeSeriesEntity) SetTimeSeriesInputTime(t time.Time)
type TypeDefinition ¶
type TypeDefinition struct { Type string // Unique Type Name e.g. user Name string // Friendly name of the entity e.g. Library User Description string // Description of the entity Singular string // Name for a single one of these entities e.g. User Plural string // Name for a collection of these entities e.g. Users Options []proto.Schema_Option KeystoneType proto.Schema_Type Properties map[Property]proto.PropertyDefinition // contains filtered or unexported fields }
TypeDefinition is a definition of a keystone type
func Define ¶
func Define(input interface{}) TypeDefinition
func NewTypeDefinition ¶
func NewTypeDefinition() TypeDefinition
func QuickDefine ¶
func QuickDefine(input interface{}) TypeDefinition
func (TypeDefinition) HasOption ¶
func (t TypeDefinition) HasOption(option proto.Schema_Option) bool
func (TypeDefinition) Schema ¶
func (t TypeDefinition) Schema() *proto.Schema
type URL ¶
type URL String
func (*URL) PropertyDefinition ¶
func (s *URL) PropertyDefinition() proto.PropertyDefinition
type UserInput ¶
type UserInput String
func (*UserInput) PropertyDefinition ¶
func (s *UserInput) PropertyDefinition() proto.PropertyDefinition
type ValueMarshaler ¶
type VerifyString ¶
type VerifyString struct { Original string `json:"original,omitempty"` // contains filtered or unexported fields }
VerifyString is a string that can be verified
func NewVerifyString ¶
func NewVerifyString(original string) VerifyString
NewVerifyString creates a new VerifyString
func (*VerifyString) IsZero ¶
func (e *VerifyString) IsZero() bool
func (*VerifyString) MarshalValue ¶
func (e *VerifyString) MarshalValue() (*proto.Value, error)
func (*VerifyString) PropertyDefinition ¶
func (e *VerifyString) PropertyDefinition() proto.PropertyDefinition
func (*VerifyString) String ¶
func (e *VerifyString) String() string
String returns the original string if it exists, otherwise the masked string
func (*VerifyString) UnmarshalValue ¶
func (e *VerifyString) UnmarshalValue(value *proto.Value) error
func (*VerifyString) Verified ¶
func (e *VerifyString) Verified() bool
Verified returns true if the string is confirmed to be the same as remote
func (*VerifyString) WasChecked ¶
func (e *VerifyString) WasChecked() bool
WasChecked returns true if the string was checked
type WatchedEntity ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func NewDefaultsWatcher ¶
NewDefaultsWatcher creates a new watcher with the default values of the given type
func NewWatcher ¶
NewWatcher creates a new watcher with the given Value
func (*Watcher) AppendKnownValues ¶
Source Files
¶
- actor.go
- actor_akv.go
- actor_destroy.go
- actor_event_stream.go
- actor_find.go
- actor_get.go
- actor_group_count.go
- actor_iid.go
- actor_mutate.go
- actor_pii.go
- actor_query_index.go
- actor_ratelimit.go
- actor_remoteget.go
- actor_report_timeseries.go
- actor_snapshot.go
- actor_sqid.go
- actor_status.go
- actor_task.go
- bytemap.go
- child_entity.go
- connection.go
- convert.go
- dynamic_properties.go
- entity.go
- entity_children.go
- entity_definition.go
- entity_details.go
- entity_events.go
- entity_labels.go
- entity_lock.go
- entity_logs.go
- entity_objects.go
- entity_relationships.go
- entity_sensors.go
- entity_timeseries.go
- entity_watcher.go
- error.go
- filter.go
- find_child.go
- find_eids.go
- find_label.go
- find_limit.go
- find_options.go
- find_property.go
- find_relation.go
- find_sortby.go
- funcs.go
- generic.go
- id.go
- interfaces.go
- marshal.go
- mock.go
- mutate_options.go
- mutation.go
- nested_child.go
- objects.go
- property.go
- reflectors.go
- remote_entity.go
- retrieve_children.go
- retrieve_options.go
- shared_view.go
- type_amount.go
- type_external_id.go
- type_intset.go
- type_keymixed.go
- type_minmax.go
- type_mixed.go
- type_pii.go
- type_securestring.go
- type_strings.go
- type_stringset.go
- type_verifystring.go
- unmarshal.go
- watcher.go