Documentation
¶
Index ¶
- Constants
- 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 ChildrenFromLoader[T any](loader ChildLoader) []*T
- 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 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) 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 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, ...) ([]*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, 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) 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) 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) 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) 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) 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 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 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) RemoveChild(childType any, cid ...string)
- 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 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 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 ID, relationshipType, relVendor, relApp string) FindOption
- func RelationToSibling(entityID ID, 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 ID
- 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 MinMax
- 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 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 NestedChildDataMutator
- type NestedChildDataProvider
- type NestedChildDataReceiver
- type ObjectProvider
- 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 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 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 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) 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
- 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 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 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) 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 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) ([]*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) GetCurrency ¶
func (*Amount) GreaterThan ¶
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 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 }
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) 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 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 Email ¶
type Email String
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) RemoveChild ¶
func (e *EmbeddedChildren) RemoveChild(childType any, cid ...string)
RemoveChild removes a child from the list of children, and prepares for removal
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() ID
func (*EmbeddedEntity) MutationSuccess ¶
func (e *EmbeddedEntity) MutationSuccess(resp *proto.MutateResponse)
func (*EmbeddedEntity) SetKeystoneID ¶
func (e *EmbeddedEntity) SetKeystoneID(id ID)
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 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 ID, relationshipType, relVendor, relApp string) FindOption
func RelationToSibling ¶
func RelationToSibling(entityID ID, 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 MinMax ¶
type MinMax struct {
// contains filtered or unexported fields
}
func (*MinMax) PropertyDefinition ¶
func (s *MinMax) 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) }
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 MatchExisting ¶
func MatchExisting(options ...FindOption) MutateOption
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 PrepareUploads ¶
func PrepareUploads(objs ...*EntityObject) MutateOption
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 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 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 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 ID) 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 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 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) 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
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_find.go
- actor_get.go
- actor_group_count.go
- actor_list.go
- actor_mutate.go
- actor_ratelimit.go
- actor_report_timeseries.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_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_intset.go
- type_minmax.go
- type_securestring.go
- type_strings.go
- type_stringset.go
- type_verifystring.go
- unmarshal.go
- watcher.go