Documentation ¶
Index ¶
- Variables
- func AsSlice[T any](entities ...*proto.EntityResponse) ([]T, error)
- func Changes(a, b interface{}) (map[Property]*proto.Value, error)
- func ChangesFromDefault(v interface{}) (map[Property]*proto.Value, error)
- 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 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
- type Actor
- func (a *Actor) AppID() string
- func (a *Actor) Authorization() *proto.Authorization
- func (a *Actor) Client() string
- func (a *Actor) Connection() *Connection
- 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 string, dst interface{}, ...) 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 string, dst interface{}, ...) error
- func (a *Actor) GroupCount(ctx context.Context, entityType string, groupBy []string, ...) ([]*proto.GroupCountResponse_Result, error)
- func (a *Actor) List(ctx context.Context, entityType string, retrieveProperties []string, ...) ([]*proto.EntityResponse, error)
- 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) NewRateLimit(key string, hardLimit, limitMinutes int32) *RateLimit
- func (a *Actor) NewTrackedRateLimit(key string, hardLimit, limitMinutes int32) *RateLimit
- func (a *Actor) RemoteIp() string
- func (a *Actor) RemoteMutate(ctx context.Context, src interface{}) error
- func (a *Actor) ReplaceConnection(c *Connection)
- func (a *Actor) ReportTimeSeries(ctx context.Context, src interface{}) 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, entityType string, ...) (*proto.SharedViewsResponse, 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
- type BaseChildEntity
- type BaseEntity
- type ChildEntity
- type Connection
- 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) DirectClient() proto.KeystoneClient
- 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) 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) 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) 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) SyncSchema() *sync.WaitGroup
- type Country
- type Email
- type EmbeddedChild
- type EmbeddedDetails
- type EmbeddedEntity
- 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 EmbeddedRelationships
- func (e *EmbeddedRelationships) AddRelationship(relationshipType, target string, 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 EventProvider
- type FindOption
- func ChildOf(entityID string) FindOption
- func Limit(perPage, pageNumber int32) FindOption
- func RelationOf(entityID, relationshipType, relVendor, relApp string) FindOption
- func RelationOfSibling(entityID, relationshipType string) FindOption
- func RelationTo(entityID, relationshipType, relVendor, relApp string) FindOption
- func RelationToSibling(entityID, relationshipType string) FindOption
- func SortBy(property string, descending bool) FindOption
- func WhereBetween(key string, value1, value2 any) FindOption
- func WhereContains(key string, value any) FindOption
- func WhereEndsWith(key string, value string) 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 WithLabel(name, value string) FindOption
- type GenericResult
- type IPAddress
- 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) MarshalValue() (*proto.Value, error)
- func (s *IntSet) MutationSuccess(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 LabelProvider
- type LockInfo
- type Locker
- type LogProvider
- type MarshaledEntity
- type Marshaler
- 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)
- type MutateOption
- type MutationObserver
- type MutationOptionWatcherPrepare
- type NestedChild
- type NestedChildAggregateValue
- type PII
- type PersonName
- type Phone
- 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 RetrieveOption
- func RetrieveOptions(opts ...RetrieveOption) RetrieveOption
- func WithChildSummary() RetrieveOption
- func WithChildren(childType string, ids ...string) 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 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 WithView(name string) RetrieveOption
- type SecureString
- 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 string) *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) MarshalValue() (*proto.Value, error)
- func (s *StringSet) MutationSuccess(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
- type WatchedEntity
- type Watcher
Constants ¶
This section is empty.
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")
Functions ¶
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 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 Actor ¶
type Actor struct {
// contains filtered or unexported fields
}
Actor is a struct that represents an actor making requests to keystone
func (*Actor) Authorization ¶
func (a *Actor) Authorization() *proto.Authorization
func (*Actor) Connection ¶
func (a *Actor) Connection() *Connection
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 string, 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) ([]*proto.GroupCountResponse_Result, error)
GroupCount returns a list of entities within an active set
func (*Actor) List ¶
func (a *Actor) List(ctx context.Context, entityType string, retrieveProperties []string, options ...FindOption) ([]*proto.EntityResponse, error)
List returns a list of entities within an active set
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) NewRateLimit ¶
func (*Actor) NewTrackedRateLimit ¶
func (*Actor) RemoteMutate ¶
func (*Actor) ReplaceConnection ¶
func (a *Actor) ReplaceConnection(c *Connection)
func (*Actor) ReportTimeSeries ¶
ReportTimeSeries writes point in time data
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) WorkspaceID ¶
type Amount ¶
Amount represents money
func (*Amount) PropertyDefinition ¶
func (a *Amount) PropertyDefinition() proto.PropertyDefinition
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 string)
func (*BaseChildEntity) SetKeystoneParentID ¶
func (e *BaseChildEntity) SetKeystoneParentID(id string)
type BaseEntity ¶
type BaseEntity struct { EmbeddedEntity EmbeddedWatcher EmbeddedDetails EmbeddedEvents EmbeddedLabels EmbeddedLock EmbeddedLogs EmbeddedRelationships EmbeddedSensors }
type ChildEntity ¶
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) 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) DirectClient ¶
func (c *Connection) DirectClient() proto.KeystoneClient
DirectClient avoid using the direct client in case of changes
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) 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) 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) 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) SyncSchema ¶
func (c *Connection) SyncSchema() *sync.WaitGroup
SyncSchema syncs the schema with the server
type Country ¶
type Country String
func (*Country) PropertyDefinition ¶
func (s *Country) PropertyDefinition() proto.PropertyDefinition
type Email ¶
type Email String
func (*Email) PropertyDefinition ¶
func (s *Email) PropertyDefinition() proto.PropertyDefinition
type EmbeddedChild ¶
type EmbeddedChild struct {
// contains filtered or unexported fields
}
func (*EmbeddedChild) AggregateValue ¶
func (e *EmbeddedChild) AggregateValue() int64
func (*EmbeddedChild) ChildID ¶
func (e *EmbeddedChild) ChildID() string
func (*EmbeddedChild) SetAggregateValue ¶
func (e *EmbeddedChild) SetAggregateValue(val int64)
func (*EmbeddedChild) SetChildID ¶
func (e *EmbeddedChild) SetChildID(id string)
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) GetKeystoneID ¶
func (e *EmbeddedEntity) GetKeystoneID() string
func (*EmbeddedEntity) MutationSuccess ¶
func (e *EmbeddedEntity) MutationSuccess(resp *proto.MutateResponse)
func (*EmbeddedEntity) SetKeystoneID ¶
func (e *EmbeddedEntity) SetKeystoneID(id string)
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 EmbeddedRelationships ¶
type EmbeddedRelationships struct {
// contains filtered or unexported fields
}
EmbeddedRelationships is a struct that implements RelationshipProvider
func (*EmbeddedRelationships) AddRelationship ¶
func (e *EmbeddedRelationships) AddRelationship(relationshipType, target string, 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 EventProvider ¶
type EventProvider interface { ClearEvents() error GetEvents() []*proto.EntityEvent }
EventProvider is an interface for entities that can have events
type FindOption ¶
type FindOption interface {
Apply(config *filterRequest)
}
FindOption is an interface for options to be applied to a find request
func ChildOf ¶
func ChildOf(entityID string) FindOption
func Limit ¶
func Limit(perPage, pageNumber int32) FindOption
func RelationOf ¶
func RelationOf(entityID, relationshipType, relVendor, relApp string) FindOption
func RelationOfSibling ¶
func RelationOfSibling(entityID, relationshipType string) FindOption
func RelationTo ¶
func RelationTo(entityID, relationshipType, relVendor, relApp string) FindOption
func RelationToSibling ¶
func RelationToSibling(entityID, relationshipType string) FindOption
func SortBy ¶
func SortBy(property string, descending bool) FindOption
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 string) 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 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 IPAddress ¶
type IPAddress String
func (*IPAddress) PropertyDefinition ¶
func (s *IPAddress) PropertyDefinition() proto.PropertyDefinition
type IntSet ¶
type IntSet struct {
// contains filtered or unexported fields
}
func (*IntSet) CurrentValues ¶
func (*IntSet) MutationSuccess ¶
func (s *IntSet) MutationSuccess(resp *proto.MutateResponse)
func (*IntSet) PropertyDefinition ¶
func (s *IntSet) PropertyDefinition() proto.PropertyDefinition
func (*IntSet) ReplaceExisting ¶
func (*IntSet) ReplaceWith ¶
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 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) }
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)
type MutateOption ¶
type MutateOption interface {
// contains filtered or unexported methods
}
func MutateProperties ¶
func MutateProperties(property ...string) MutateOption
MutateProperties Only mutate the specified properties
func OnConflictUseID ¶
func OnConflictUseID(property ...string) MutateOption
OnConflictUseID should set the unique properties that can be used to identify an existing identity
func WithMutationComment ¶
func WithMutationComment(comment string) MutateOption
type MutationObserver ¶
type MutationObserver interface {
MutationSuccess(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 PII ¶
type PII String
func (*PII) PropertyDefinition ¶
func (s *PII) PropertyDefinition() proto.PropertyDefinition
type PersonName ¶
type PersonName String
func (*PersonName) PropertyDefinition ¶
func (s *PersonName) PropertyDefinition() proto.PropertyDefinition
type Phone ¶
type Phone String
func (*Phone) PropertyDefinition ¶
func (s *Phone) PropertyDefinition() proto.PropertyDefinition
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 EmbeddedRelationships EmbeddedLabels EmbeddedEvents // 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 string) RetrieveBy
func ByUniqueProperty ¶
func ByUniqueProperty(entityType interface{}, uniqueID, property string) RetrieveBy
type RetrieveEntityOption ¶
type RetrieveEntityOption interface {
ApplyRequest(config *proto.EntityRequest)
}
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 WithChildren ¶
func WithChildren(childType string, ids ...string) RetrieveOption
WithChildren is a retrieve option that loads Children
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 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 WithView ¶
func WithView(name string) RetrieveOption
type SecureString ¶
SecureString is a string that represents sensitive Data
func NewSecretString ¶
func NewSecretString(original, masked string) SecureString
NewSecretString creates a new SecureString
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 string) *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) MutationSuccess ¶
func (s *StringSet) MutationSuccess(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) 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
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_find.go
- actor_get.go
- actor_group_count.go
- actor_list.go
- actor_mutate.go
- actor_ratelimit.go
- actor_report_timeseries.go
- child_entity.go
- connection.go
- convert.go
- dynamic_properties.go
- entity.go
- entity_definition.go
- entity_details.go
- entity_events.go
- entity_labels.go
- entity_lock.go
- entity_logs.go
- entity_relationships.go
- entity_sensors.go
- entity_timeseries.go
- entity_watcher.go
- filter.go
- find_child.go
- find_label.go
- find_limit.go
- find_options.go
- find_property.go
- find_relation.go
- find_sortby.go
- funcs.go
- generic.go
- interfaces.go
- marshal.go
- mock.go
- mutate_options.go
- mutation.go
- nested_child.go
- property.go
- reflectors.go
- remote_entity.go
- retrieve_options.go
- shared_view.go
- type_amount.go
- type_intset.go
- type_securestring.go
- type_strings.go
- type_stringset.go
- type_verifystring.go
- unmarshal.go
- watcher.go