Documentation ¶
Overview ¶
Package stategate is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCacheServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCacheServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CacheServiceClient) error
- func RegisterCacheServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCacheServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CacheServiceServer) error
- func RegisterCacheServiceServer(s *grpc.Server, srv CacheServiceServer)
- func RegisterEntityServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEntityServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EntityServiceClient) error
- func RegisterEntityServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEntityServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EntityServiceServer) error
- func RegisterEntityServiceServer(s *grpc.Server, srv EntityServiceServer)
- func RegisterEventServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEventServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventServiceClient) error
- func RegisterEventServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEventServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventServiceServer) error
- func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer)
- func RegisterMutexServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMutexServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MutexServiceClient) error
- func RegisterMutexServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMutexServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MutexServiceServer) error
- func RegisterMutexServiceServer(s *grpc.Server, srv MutexServiceServer)
- func RegisterPeerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPeerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PeerServiceClient) error
- func RegisterPeerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPeerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PeerServiceServer) error
- func RegisterPeerServiceServer(s *grpc.Server, srv PeerServiceServer)
- type Cache
- func (*Cache) Descriptor() ([]byte, []int)deprecated
- func (x *Cache) GetDomain() string
- func (x *Cache) GetExp() *timestamp.Timestamp
- func (x *Cache) GetKey() string
- func (x *Cache) GetValue() *_struct.Value
- func (*Cache) ProtoMessage()
- func (x *Cache) ProtoReflect() protoreflect.Message
- func (x *Cache) Reset()
- func (x *Cache) String() string
- func (this *Cache) Validate() error
- type CacheRef
- func (*CacheRef) Descriptor() ([]byte, []int)deprecated
- func (x *CacheRef) GetDomain() string
- func (x *CacheRef) GetKey() string
- func (*CacheRef) ProtoMessage()
- func (x *CacheRef) ProtoReflect() protoreflect.Message
- func (x *CacheRef) Reset()
- func (x *CacheRef) String() string
- func (this *CacheRef) Validate() error
- type CacheServiceClient
- type CacheServiceServer
- type Entities
- type Entity
- func (*Entity) Descriptor() ([]byte, []int)deprecated
- func (x *Entity) GetDomain() string
- func (x *Entity) GetKey() string
- func (x *Entity) GetType() string
- func (x *Entity) GetValues() *_struct.Struct
- func (*Entity) ProtoMessage()
- func (x *Entity) ProtoReflect() protoreflect.Message
- func (x *Entity) Reset()
- func (x *Entity) String() string
- func (this *Entity) Validate() error
- type EntityRef
- func (*EntityRef) Descriptor() ([]byte, []int)deprecated
- func (x *EntityRef) GetDomain() string
- func (x *EntityRef) GetKey() string
- func (x *EntityRef) GetType() string
- func (*EntityRef) ProtoMessage()
- func (x *EntityRef) ProtoReflect() protoreflect.Message
- func (x *EntityRef) Reset()
- func (x *EntityRef) String() string
- func (this *EntityRef) Validate() error
- type EntityServiceClient
- type EntityServiceServer
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetClaims() *_struct.Struct
- func (x *Event) GetEntity() *Entity
- func (x *Event) GetId() string
- func (x *Event) GetMethod() string
- func (x *Event) GetTime() int64
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- func (this *Event) Validate() error
- type EventRef
- func (*EventRef) Descriptor() ([]byte, []int)deprecated
- func (x *EventRef) GetDomain() string
- func (x *EventRef) GetId() string
- func (x *EventRef) GetKey() string
- func (x *EventRef) GetType() string
- func (*EventRef) ProtoMessage()
- func (x *EventRef) ProtoReflect() protoreflect.Message
- func (x *EventRef) Reset()
- func (x *EventRef) String() string
- func (this *EventRef) Validate() error
- type EventServiceClient
- type EventServiceServer
- type EventService_StreamClient
- type EventService_StreamServer
- type Events
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetBody() *_struct.Struct
- func (x *Message) GetChannel() string
- func (x *Message) GetDomain() string
- func (x *Message) GetType() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- func (this *Message) Validate() error
- type Mutex
- func (*Mutex) Descriptor() ([]byte, []int)deprecated
- func (x *Mutex) GetDomain() string
- func (x *Mutex) GetExp() *timestamp.Timestamp
- func (x *Mutex) GetKey() string
- func (*Mutex) ProtoMessage()
- func (x *Mutex) ProtoReflect() protoreflect.Message
- func (x *Mutex) Reset()
- func (x *Mutex) String() string
- func (this *Mutex) Validate() error
- type MutexRef
- func (*MutexRef) Descriptor() ([]byte, []int)deprecated
- func (x *MutexRef) GetDomain() string
- func (x *MutexRef) GetKey() string
- func (*MutexRef) ProtoMessage()
- func (x *MutexRef) ProtoReflect() protoreflect.Message
- func (x *MutexRef) Reset()
- func (x *MutexRef) String() string
- func (this *MutexRef) Validate() error
- type MutexServiceClient
- type MutexServiceServer
- type PeerMessage
- func (*PeerMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PeerMessage) GetBody() *_struct.Struct
- func (x *PeerMessage) GetChannel() string
- func (x *PeerMessage) GetClaims() *_struct.Struct
- func (x *PeerMessage) GetDomain() string
- func (x *PeerMessage) GetId() string
- func (x *PeerMessage) GetTime() int64
- func (x *PeerMessage) GetType() string
- func (*PeerMessage) ProtoMessage()
- func (x *PeerMessage) ProtoReflect() protoreflect.Message
- func (x *PeerMessage) Reset()
- func (x *PeerMessage) String() string
- func (this *PeerMessage) Validate() error
- type PeerServiceClient
- type PeerServiceServer
- type PeerService_StreamClient
- type PeerService_StreamServer
- type SearchEntityOpts
- func (*SearchEntityOpts) Descriptor() ([]byte, []int)deprecated
- func (x *SearchEntityOpts) GetDomain() string
- func (x *SearchEntityOpts) GetLimit() int32
- func (x *SearchEntityOpts) GetOffset() int32
- func (x *SearchEntityOpts) GetQueryString() string
- func (x *SearchEntityOpts) GetSort() *Sort
- func (x *SearchEntityOpts) GetType() string
- func (*SearchEntityOpts) ProtoMessage()
- func (x *SearchEntityOpts) ProtoReflect() protoreflect.Message
- func (x *SearchEntityOpts) Reset()
- func (x *SearchEntityOpts) String() string
- func (this *SearchEntityOpts) Validate() error
- type SearchEventOpts
- func (*SearchEventOpts) Descriptor() ([]byte, []int)deprecated
- func (x *SearchEventOpts) GetDomain() string
- func (x *SearchEventOpts) GetLimit() int32
- func (x *SearchEventOpts) GetMax() int64
- func (x *SearchEventOpts) GetMin() int64
- func (x *SearchEventOpts) GetOffset() int32
- func (x *SearchEventOpts) GetQueryString() string
- func (x *SearchEventOpts) GetSort() *Sort
- func (x *SearchEventOpts) GetType() string
- func (*SearchEventOpts) ProtoMessage()
- func (x *SearchEventOpts) ProtoReflect() protoreflect.Message
- func (x *SearchEventOpts) Reset()
- func (x *SearchEventOpts) String() string
- func (this *SearchEventOpts) Validate() error
- type Sort
- type StreamEventOpts
- func (*StreamEventOpts) Descriptor() ([]byte, []int)deprecated
- func (x *StreamEventOpts) GetDomain() string
- func (x *StreamEventOpts) GetType() string
- func (*StreamEventOpts) ProtoMessage()
- func (x *StreamEventOpts) ProtoReflect() protoreflect.Message
- func (x *StreamEventOpts) Reset()
- func (x *StreamEventOpts) String() string
- func (this *StreamEventOpts) Validate() error
- type StreamMessageOpts
- func (*StreamMessageOpts) Descriptor() ([]byte, []int)deprecated
- func (x *StreamMessageOpts) GetChannel() string
- func (x *StreamMessageOpts) GetDomain() string
- func (x *StreamMessageOpts) GetType() string
- func (*StreamMessageOpts) ProtoMessage()
- func (x *StreamMessageOpts) ProtoReflect() protoreflect.Message
- func (x *StreamMessageOpts) Reset()
- func (x *StreamMessageOpts) String() string
- func (this *StreamMessageOpts) Validate() error
- type UnimplementedCacheServiceServer
- type UnimplementedEntityServiceServer
- func (*UnimplementedEntityServiceServer) Del(context.Context, *EntityRef) (*empty.Empty, error)
- func (*UnimplementedEntityServiceServer) Edit(context.Context, *Entity) (*Entity, error)
- func (*UnimplementedEntityServiceServer) Get(context.Context, *EntityRef) (*Entity, error)
- func (*UnimplementedEntityServiceServer) Revert(context.Context, *EventRef) (*Entity, error)
- func (*UnimplementedEntityServiceServer) Search(context.Context, *SearchEntityOpts) (*Entities, error)
- func (*UnimplementedEntityServiceServer) Set(context.Context, *Entity) (*empty.Empty, error)
- type UnimplementedEventServiceServer
- type UnimplementedMutexServiceServer
- type UnimplementedPeerServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_schema_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCacheServiceHandler ¶ added in v0.9.0
func RegisterCacheServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCacheServiceHandler registers the http handlers for service CacheService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCacheServiceHandlerClient ¶ added in v0.9.0
func RegisterCacheServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CacheServiceClient) error
RegisterCacheServiceHandlerClient registers the http handlers for service CacheService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CacheServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CacheServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CacheServiceClient" to call the correct interceptors.
func RegisterCacheServiceHandlerFromEndpoint ¶ added in v0.9.0
func RegisterCacheServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCacheServiceHandlerFromEndpoint is same as RegisterCacheServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCacheServiceHandlerServer ¶ added in v0.9.0
func RegisterCacheServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CacheServiceServer) error
RegisterCacheServiceHandlerServer registers the http handlers for service CacheService to "mux". UnaryRPC :call CacheServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCacheServiceHandlerFromEndpoint instead.
func RegisterCacheServiceServer ¶ added in v0.9.0
func RegisterCacheServiceServer(s *grpc.Server, srv CacheServiceServer)
func RegisterEntityServiceHandler ¶ added in v0.6.0
func RegisterEntityServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEntityServiceHandler registers the http handlers for service EntityService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEntityServiceHandlerClient ¶ added in v0.6.0
func RegisterEntityServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EntityServiceClient) error
RegisterEntityServiceHandlerClient registers the http handlers for service EntityService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EntityServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EntityServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EntityServiceClient" to call the correct interceptors.
func RegisterEntityServiceHandlerFromEndpoint ¶ added in v0.6.0
func RegisterEntityServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEntityServiceHandlerFromEndpoint is same as RegisterEntityServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEntityServiceHandlerServer ¶ added in v0.6.0
func RegisterEntityServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EntityServiceServer) error
RegisterEntityServiceHandlerServer registers the http handlers for service EntityService to "mux". UnaryRPC :call EntityServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEntityServiceHandlerFromEndpoint instead.
func RegisterEntityServiceServer ¶ added in v0.6.0
func RegisterEntityServiceServer(s *grpc.Server, srv EntityServiceServer)
func RegisterEventServiceHandler ¶ added in v0.4.0
func RegisterEventServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEventServiceHandler registers the http handlers for service EventService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEventServiceHandlerClient ¶ added in v0.4.0
func RegisterEventServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventServiceClient) error
RegisterEventServiceHandlerClient registers the http handlers for service EventService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EventServiceClient" to call the correct interceptors.
func RegisterEventServiceHandlerFromEndpoint ¶ added in v0.4.0
func RegisterEventServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEventServiceHandlerFromEndpoint is same as RegisterEventServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEventServiceHandlerServer ¶ added in v0.4.0
func RegisterEventServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventServiceServer) error
RegisterEventServiceHandlerServer registers the http handlers for service EventService to "mux". UnaryRPC :call EventServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEventServiceHandlerFromEndpoint instead.
func RegisterEventServiceServer ¶ added in v0.4.0
func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer)
func RegisterMutexServiceHandler ¶ added in v0.9.0
func RegisterMutexServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMutexServiceHandler registers the http handlers for service MutexService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMutexServiceHandlerClient ¶ added in v0.9.0
func RegisterMutexServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MutexServiceClient) error
RegisterMutexServiceHandlerClient registers the http handlers for service MutexService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MutexServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MutexServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MutexServiceClient" to call the correct interceptors.
func RegisterMutexServiceHandlerFromEndpoint ¶ added in v0.9.0
func RegisterMutexServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMutexServiceHandlerFromEndpoint is same as RegisterMutexServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMutexServiceHandlerServer ¶ added in v0.9.0
func RegisterMutexServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MutexServiceServer) error
RegisterMutexServiceHandlerServer registers the http handlers for service MutexService to "mux". UnaryRPC :call MutexServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMutexServiceHandlerFromEndpoint instead.
func RegisterMutexServiceServer ¶ added in v0.9.0
func RegisterMutexServiceServer(s *grpc.Server, srv MutexServiceServer)
func RegisterPeerServiceHandler ¶ added in v0.8.0
func RegisterPeerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPeerServiceHandler registers the http handlers for service PeerService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPeerServiceHandlerClient ¶ added in v0.8.0
func RegisterPeerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PeerServiceClient) error
RegisterPeerServiceHandlerClient registers the http handlers for service PeerService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PeerServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PeerServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PeerServiceClient" to call the correct interceptors.
func RegisterPeerServiceHandlerFromEndpoint ¶ added in v0.8.0
func RegisterPeerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPeerServiceHandlerFromEndpoint is same as RegisterPeerServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPeerServiceHandlerServer ¶ added in v0.8.0
func RegisterPeerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PeerServiceServer) error
RegisterPeerServiceHandlerServer registers the http handlers for service PeerService to "mux". UnaryRPC :call PeerServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPeerServiceHandlerFromEndpoint instead.
func RegisterPeerServiceServer ¶ added in v0.8.0
func RegisterPeerServiceServer(s *grpc.Server, srv PeerServiceServer)
Types ¶
type Cache ¶ added in v0.9.0
type Cache struct { // the item's business domain(ex: accounting) Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // entity key (unique within type) Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // the cached value's value to store Value *_struct.Value `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // exp is the time at which the cached value will expire // if exp is 0, the value will never expire Exp *timestamp.Timestamp `protobuf:"bytes,4,opt,name=exp,proto3" json:"exp,omitempty"` // contains filtered or unexported fields }
Cache is a persisted value that will expire after a period of time. It is held in memory for maximum performance.
func (*Cache) Descriptor
deprecated
added in
v0.9.0
func (*Cache) ProtoMessage ¶ added in v0.9.0
func (*Cache) ProtoMessage()
func (*Cache) ProtoReflect ¶ added in v0.9.0
func (x *Cache) ProtoReflect() protoreflect.Message
type CacheRef ¶ added in v0.9.0
type CacheRef struct { // the cached value's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // cached value's key (unique within domain) // must not be empty or contain spaces Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
EntityRef is a reference to a cached value
func (*CacheRef) Descriptor
deprecated
added in
v0.9.0
func (*CacheRef) ProtoMessage ¶ added in v0.9.0
func (*CacheRef) ProtoMessage()
func (*CacheRef) ProtoReflect ¶ added in v0.9.0
func (x *CacheRef) ProtoReflect() protoreflect.Message
type CacheServiceClient ¶ added in v0.9.0
type CacheServiceClient interface { // Set sets a value in the cache Set(ctx context.Context, in *Cache, opts ...grpc.CallOption) (*empty.Empty, error) // Get gets a value from the cache Get(ctx context.Context, in *CacheRef, opts ...grpc.CallOption) (*Cache, error) // Del deletes a value from the cache Del(ctx context.Context, in *CacheRef, opts ...grpc.CallOption) (*empty.Empty, error) }
CacheServiceClient is the client API for CacheService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCacheServiceClient ¶ added in v0.9.0
func NewCacheServiceClient(cc grpc.ClientConnInterface) CacheServiceClient
type CacheServiceServer ¶ added in v0.9.0
type CacheServiceServer interface { // Set sets a value in the cache Set(context.Context, *Cache) (*empty.Empty, error) // Get gets a value from the cache Get(context.Context, *CacheRef) (*Cache, error) // Del deletes a value from the cache Del(context.Context, *CacheRef) (*empty.Empty, error) }
CacheServiceServer is the server API for CacheService service.
type Entities ¶ added in v0.6.0
type Entities struct { Entities []*Entity `protobuf:"bytes,1,rep,name=entities,proto3" json:"entities,omitempty"` // contains filtered or unexported fields }
Entities is an array of Entity
func (*Entities) Descriptor
deprecated
added in
v0.6.0
func (*Entities) GetEntities ¶ added in v0.6.0
func (*Entities) ProtoMessage ¶ added in v0.6.0
func (*Entities) ProtoMessage()
func (*Entities) ProtoReflect ¶ added in v0.6.0
func (x *Entities) ProtoReflect() protoreflect.Message
type Entity ¶ added in v0.6.0
type Entity struct { // the entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // the entity's type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // the entity's key (unique within type). // must not be empty or contain spaces Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // the entity's values (k/v pairs) Values *_struct.Struct `protobuf:"bytes,4,opt,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
Entity represents a single record(k/v pairs) with a unique key with a given [type](https://en.wikipedia.org/wiki/Type_system), belonging to a particular [domain](https://en.wikipedia.org/wiki/Domain-driven_design) EventService clients should use the EntityService to persist & interact with the current state of an entity.
func (*Entity) Descriptor
deprecated
added in
v0.6.0
func (*Entity) ProtoMessage ¶ added in v0.6.0
func (*Entity) ProtoMessage()
func (*Entity) ProtoReflect ¶ added in v0.6.0
func (x *Entity) ProtoReflect() protoreflect.Message
type EntityRef ¶ added in v0.6.0
type EntityRef struct { // the entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // entity type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // entity key (unique within type) // must not be empty or contain spaces Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
EntityRef is a reference to an existing entity
func (*EntityRef) Descriptor
deprecated
added in
v0.6.0
func (*EntityRef) ProtoMessage ¶ added in v0.6.0
func (*EntityRef) ProtoMessage()
func (*EntityRef) ProtoReflect ¶ added in v0.6.0
func (x *EntityRef) ProtoReflect() protoreflect.Message
type EntityServiceClient ¶ added in v0.6.0
type EntityServiceClient interface { // Set sets the current state value of an entity, adds it to the event log, then broadcast the event to all interested consumers(EventService.Stream) Set(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*empty.Empty, error) // Edit overwrites the k/v pairs present in the entity request without replacing the entire entity. // It then adds the state change to the event log, then broadcast the event to all interested consumers(EventService.Stream) // Edit returns the current state of the Entity after the mutation. Edit(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) // Revert reverts an Entity to a previous version of itself by querying the event store. // Reverting an entity dispatches another event since it is a state change Revert(ctx context.Context, in *EventRef, opts ...grpc.CallOption) (*Entity, error) // Get gets an entity's current state Get(ctx context.Context, in *EntityRef, opts ...grpc.CallOption) (*Entity, error) // Del hard deletes an entity from current state store, adds it's state prior to deletion to the event log, then broadcast the event to all interested consumers(EventService.Stream) // an Entity may be recovered via querying the Event store for historical records of the deleted Entity. Del(ctx context.Context, in *EntityRef, opts ...grpc.CallOption) (*empty.Empty, error) // Search queries the current state of entities Search(ctx context.Context, in *SearchEntityOpts, opts ...grpc.CallOption) (*Entities, error) }
EntityServiceClient is the client API for EntityService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEntityServiceClient ¶ added in v0.6.0
func NewEntityServiceClient(cc grpc.ClientConnInterface) EntityServiceClient
type EntityServiceServer ¶ added in v0.6.0
type EntityServiceServer interface { // Set sets the current state value of an entity, adds it to the event log, then broadcast the event to all interested consumers(EventService.Stream) Set(context.Context, *Entity) (*empty.Empty, error) // Edit overwrites the k/v pairs present in the entity request without replacing the entire entity. // It then adds the state change to the event log, then broadcast the event to all interested consumers(EventService.Stream) // Edit returns the current state of the Entity after the mutation. Edit(context.Context, *Entity) (*Entity, error) // Revert reverts an Entity to a previous version of itself by querying the event store. // Reverting an entity dispatches another event since it is a state change Revert(context.Context, *EventRef) (*Entity, error) // Get gets an entity's current state Get(context.Context, *EntityRef) (*Entity, error) // Del hard deletes an entity from current state store, adds it's state prior to deletion to the event log, then broadcast the event to all interested consumers(EventService.Stream) // an Entity may be recovered via querying the Event store for historical records of the deleted Entity. Del(context.Context, *EntityRef) (*empty.Empty, error) // Search queries the current state of entities Search(context.Context, *SearchEntityOpts) (*Entities, error) }
EntityServiceServer is the server API for EntityService service.
type Event ¶
type Event struct { // identifies the event(uuid v4). Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // state of an Entity after it has been mutated Entity *Entity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` // the invoked method that triggered the event Method string `protobuf:"bytes,5,opt,name=method,proto3" json:"method,omitempty"` // the authentication claims of the event producer. Claims *_struct.Struct `protobuf:"bytes,3,opt,name=claims,proto3" json:"claims,omitempty"` // timestamp(ns) of when the event was received. Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` // contains filtered or unexported fields }
Event is primitive that represents a single state change to an entity Events are persisted to history & broadcasted to interested consumers(Stream) any time an entity is created/modified/deleted Events are immutable after creation and may be searched. EventService client's may search events to query previous state of an entity(s)
func (*Event) Descriptor
deprecated
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventRef ¶ added in v0.7.0
type EventRef struct { // the event's entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // event entity type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // event's entity's key (unique within type) // must not be empty or contain spaces Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // id is the event id. Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
EventRef holds options for reverting an entity to a previous version of itself
func (*EventRef) Descriptor
deprecated
added in
v0.7.0
func (*EventRef) ProtoMessage ¶ added in v0.7.0
func (*EventRef) ProtoMessage()
func (*EventRef) ProtoReflect ¶ added in v0.7.0
func (x *EventRef) ProtoReflect() protoreflect.Message
type EventServiceClient ¶ added in v0.4.0
type EventServiceClient interface { // Stream creates an event stream/subscription to state changes to entities in real time. Glob matching is supported. Stream(ctx context.Context, in *StreamEventOpts, opts ...grpc.CallOption) (EventService_StreamClient, error) // Search queries historical events - every historical state change to an entity may be queried. Search(ctx context.Context, in *SearchEventOpts, opts ...grpc.CallOption) (*Events, error) // Get gets a single event Get(ctx context.Context, in *EventRef, opts ...grpc.CallOption) (*Event, error) }
EventServiceClient is the client API for EventService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventServiceClient ¶ added in v0.4.0
func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient
type EventServiceServer ¶ added in v0.4.0
type EventServiceServer interface { // Stream creates an event stream/subscription to state changes to entities in real time. Glob matching is supported. Stream(*StreamEventOpts, EventService_StreamServer) error // Search queries historical events - every historical state change to an entity may be queried. Search(context.Context, *SearchEventOpts) (*Events, error) // Get gets a single event Get(context.Context, *EventRef) (*Event, error) }
EventServiceServer is the server API for EventService service.
type EventService_StreamClient ¶ added in v0.4.0
type EventService_StreamClient interface { Recv() (*Event, error) grpc.ClientStream }
type EventService_StreamServer ¶ added in v0.4.0
type EventService_StreamServer interface { Send(*Event) error grpc.ServerStream }
type Events ¶
type Events struct { Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // contains filtered or unexported fields }
Events is an array of events
func (*Events) Descriptor
deprecated
func (*Events) ProtoMessage ¶
func (*Events) ProtoMessage()
func (*Events) ProtoReflect ¶
func (x *Events) ProtoReflect() protoreflect.Message
type Message ¶ added in v0.8.0
type Message struct { // the message's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // the message's channel(ex: general) // must not be empty or contain spaces Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` // message's type (ex: comment) // must not be empty or contain spaces Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // the body of the message(k/v values). Body *_struct.Struct `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
Message is an arbitrary message to be delivered to a Peer Messages are NOT persisted and should only be used to communicate with other Peers
func (*Message) Descriptor
deprecated
added in
v0.8.0
func (*Message) GetChannel ¶ added in v0.8.0
func (*Message) ProtoMessage ¶ added in v0.8.0
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶ added in v0.8.0
func (x *Message) ProtoReflect() protoreflect.Message
type Mutex ¶ added in v0.9.0
type Mutex struct { // the mutex's business domain(ex: accounting) Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // mutex key (unique within domain) Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // exp is the time at which the mutex value will expire // if exp is 0, the mutex will never expire Exp *timestamp.Timestamp `protobuf:"bytes,4,opt,name=exp,proto3" json:"exp,omitempty"` // contains filtered or unexported fields }
Mutex is a distributed mutex for preventing data-races amongst peer services
func (*Mutex) Descriptor
deprecated
added in
v0.9.0
func (*Mutex) ProtoMessage ¶ added in v0.9.0
func (*Mutex) ProtoMessage()
func (*Mutex) ProtoReflect ¶ added in v0.9.0
func (x *Mutex) ProtoReflect() protoreflect.Message
type MutexRef ¶ added in v0.9.0
type MutexRef struct { // the mutex's business domain(ex: accounting) Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // mutex key (unique within domain) Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
MutexRef is a reference to a distributed mutex
func (*MutexRef) Descriptor
deprecated
added in
v0.9.0
func (*MutexRef) ProtoMessage ¶ added in v0.9.0
func (*MutexRef) ProtoMessage()
func (*MutexRef) ProtoReflect ¶ added in v0.9.0
func (x *MutexRef) ProtoReflect() protoreflect.Message
type MutexServiceClient ¶ added in v0.9.0
type MutexServiceClient interface { // Lock locks a value for a period of time if it is not locked already. // If it is already locked, an error will be returned // It is best practice for client's to call Unlock when the distributed lock operation is completed instead of relying on the TTL Lock(ctx context.Context, in *Mutex, opts ...grpc.CallOption) (*empty.Empty, error) // Unlock unlocks the key(if it's currently locked) so that it may be locked again. // It is best practice for client's to call Unlock when the distributed lock operation is completed instead of relying on the TTL Unlock(ctx context.Context, in *MutexRef, opts ...grpc.CallOption) (*empty.Empty, error) }
MutexServiceClient is the client API for MutexService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMutexServiceClient ¶ added in v0.9.0
func NewMutexServiceClient(cc grpc.ClientConnInterface) MutexServiceClient
type MutexServiceServer ¶ added in v0.9.0
type MutexServiceServer interface { // Lock locks a value for a period of time if it is not locked already. // If it is already locked, an error will be returned // It is best practice for client's to call Unlock when the distributed lock operation is completed instead of relying on the TTL Lock(context.Context, *Mutex) (*empty.Empty, error) // Unlock unlocks the key(if it's currently locked) so that it may be locked again. // It is best practice for client's to call Unlock when the distributed lock operation is completed instead of relying on the TTL Unlock(context.Context, *MutexRef) (*empty.Empty, error) }
MutexServiceServer is the server API for MutexService service.
type PeerMessage ¶ added in v0.8.0
type PeerMessage struct { // the unique id of the message Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // the message's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` // the message's channel(ex: general) // must not be empty or contain spaces Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"` // message's type (ex: comment) // must not be empty or contain spaces Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // the body of the message(k/v values). Body *_struct.Struct `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` // the authentication claims of the message producer. Claims *_struct.Struct `protobuf:"bytes,6,opt,name=claims,proto3" json:"claims,omitempty"` // timestamp(ns) of when the message was broadcasted. Time int64 `protobuf:"varint,7,opt,name=time,proto3" json:"time,omitempty"` // contains filtered or unexported fields }
PeerMessage is a message produced by a client to the PeerService PeerMessages are NOT persisted and should only be used to communicate with other Peers
func (*PeerMessage) Descriptor
deprecated
added in
v0.8.0
func (*PeerMessage) Descriptor() ([]byte, []int)
Deprecated: Use PeerMessage.ProtoReflect.Descriptor instead.
func (*PeerMessage) GetBody ¶ added in v0.8.0
func (x *PeerMessage) GetBody() *_struct.Struct
func (*PeerMessage) GetChannel ¶ added in v0.8.0
func (x *PeerMessage) GetChannel() string
func (*PeerMessage) GetClaims ¶ added in v0.8.0
func (x *PeerMessage) GetClaims() *_struct.Struct
func (*PeerMessage) GetDomain ¶ added in v0.8.0
func (x *PeerMessage) GetDomain() string
func (*PeerMessage) GetId ¶ added in v0.8.0
func (x *PeerMessage) GetId() string
func (*PeerMessage) GetTime ¶ added in v0.8.0
func (x *PeerMessage) GetTime() int64
func (*PeerMessage) GetType ¶ added in v0.8.0
func (x *PeerMessage) GetType() string
func (*PeerMessage) ProtoMessage ¶ added in v0.8.0
func (*PeerMessage) ProtoMessage()
func (*PeerMessage) ProtoReflect ¶ added in v0.8.0
func (x *PeerMessage) ProtoReflect() protoreflect.Message
func (*PeerMessage) Reset ¶ added in v0.8.0
func (x *PeerMessage) Reset()
func (*PeerMessage) String ¶ added in v0.8.0
func (x *PeerMessage) String() string
func (*PeerMessage) Validate ¶ added in v0.8.0
func (this *PeerMessage) Validate() error
type PeerServiceClient ¶ added in v0.8.0
type PeerServiceClient interface { // Broadcast broadcasts a message to N subscribers(clients calling Stream) Broadcast(ctx context.Context, in *Message, opts ...grpc.CallOption) (*empty.Empty, error) // Stream consumes/streams messages from message producers(clients calling broadcast) Stream(ctx context.Context, in *StreamMessageOpts, opts ...grpc.CallOption) (PeerService_StreamClient, error) }
PeerServiceClient is the client API for PeerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPeerServiceClient ¶ added in v0.8.0
func NewPeerServiceClient(cc grpc.ClientConnInterface) PeerServiceClient
type PeerServiceServer ¶ added in v0.8.0
type PeerServiceServer interface { // Broadcast broadcasts a message to N subscribers(clients calling Stream) Broadcast(context.Context, *Message) (*empty.Empty, error) // Stream consumes/streams messages from message producers(clients calling broadcast) Stream(*StreamMessageOpts, PeerService_StreamServer) error }
PeerServiceServer is the server API for PeerService service.
type PeerService_StreamClient ¶ added in v0.8.0
type PeerService_StreamClient interface { Recv() (*PeerMessage, error) grpc.ClientStream }
type PeerService_StreamServer ¶ added in v0.8.0
type PeerService_StreamServer interface { Send(*PeerMessage) error grpc.ServerStream }
type SearchEntityOpts ¶ added in v0.6.2
type SearchEntityOpts struct { // the entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // State type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // json string to filter records that have values match k/v pairs ex: { "message": "hello world" } // please note that dot notation may be used to access nested fields QueryString string `protobuf:"bytes,3,opt,name=query_string,json=queryString,proto3" json:"query_string,omitempty"` // limit number of returned values Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` // offset returned events(pagination) Offset int32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` // sort sorts the returned entities by a specified field Sort *Sort `protobuf:"bytes,9,opt,name=sort,proto3" json:"sort,omitempty"` // contains filtered or unexported fields }
SearchEntityOpts are options when querying the current values of entities. If historical values are needed, SearchEvents should be used
func (*SearchEntityOpts) Descriptor
deprecated
added in
v0.6.2
func (*SearchEntityOpts) Descriptor() ([]byte, []int)
Deprecated: Use SearchEntityOpts.ProtoReflect.Descriptor instead.
func (*SearchEntityOpts) GetDomain ¶ added in v0.6.2
func (x *SearchEntityOpts) GetDomain() string
func (*SearchEntityOpts) GetLimit ¶ added in v0.6.2
func (x *SearchEntityOpts) GetLimit() int32
func (*SearchEntityOpts) GetOffset ¶ added in v0.6.2
func (x *SearchEntityOpts) GetOffset() int32
func (*SearchEntityOpts) GetQueryString ¶ added in v0.6.2
func (x *SearchEntityOpts) GetQueryString() string
func (*SearchEntityOpts) GetSort ¶ added in v0.6.2
func (x *SearchEntityOpts) GetSort() *Sort
func (*SearchEntityOpts) GetType ¶ added in v0.6.2
func (x *SearchEntityOpts) GetType() string
func (*SearchEntityOpts) ProtoMessage ¶ added in v0.6.2
func (*SearchEntityOpts) ProtoMessage()
func (*SearchEntityOpts) ProtoReflect ¶ added in v0.6.2
func (x *SearchEntityOpts) ProtoReflect() protoreflect.Message
func (*SearchEntityOpts) Reset ¶ added in v0.6.2
func (x *SearchEntityOpts) Reset()
func (*SearchEntityOpts) String ¶ added in v0.6.2
func (x *SearchEntityOpts) String() string
func (*SearchEntityOpts) Validate ¶ added in v0.6.2
func (this *SearchEntityOpts) Validate() error
type SearchEventOpts ¶ added in v0.2.2
type SearchEventOpts struct { // the entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // entity's type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // json string to filter events based with values that match k/v pairs ex: { "entity.values.message": "hello world" }. // please note that dot notation may be used to access nested fields QueryString string `protobuf:"bytes,4,opt,name=query_string,json=queryString,proto3" json:"query_string,omitempty"` // only return events that occurred after specified min timestamp Min int64 `protobuf:"varint,5,opt,name=min,proto3" json:"min,omitempty"` // only return events that occurred before specified max timestamp Max int64 `protobuf:"varint,6,opt,name=max,proto3" json:"max,omitempty"` // limit number of returned values Limit int32 `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"` // offset returned events(pagination) Offset int32 `protobuf:"varint,8,opt,name=offset,proto3" json:"offset,omitempty"` // sort sorts the returned entities by a specified field Sort *Sort `protobuf:"bytes,9,opt,name=sort,proto3" json:"sort,omitempty"` // contains filtered or unexported fields }
SearchEventOpts are options when querying historical events emitted from mutations made from State mutations
func (*SearchEventOpts) Descriptor
deprecated
added in
v0.2.2
func (*SearchEventOpts) Descriptor() ([]byte, []int)
Deprecated: Use SearchEventOpts.ProtoReflect.Descriptor instead.
func (*SearchEventOpts) GetDomain ¶ added in v0.4.0
func (x *SearchEventOpts) GetDomain() string
func (*SearchEventOpts) GetLimit ¶ added in v0.2.2
func (x *SearchEventOpts) GetLimit() int32
func (*SearchEventOpts) GetMax ¶ added in v0.2.2
func (x *SearchEventOpts) GetMax() int64
func (*SearchEventOpts) GetMin ¶ added in v0.2.2
func (x *SearchEventOpts) GetMin() int64
func (*SearchEventOpts) GetOffset ¶ added in v0.2.2
func (x *SearchEventOpts) GetOffset() int32
func (*SearchEventOpts) GetQueryString ¶ added in v0.4.0
func (x *SearchEventOpts) GetQueryString() string
func (*SearchEventOpts) GetSort ¶ added in v0.6.1
func (x *SearchEventOpts) GetSort() *Sort
func (*SearchEventOpts) GetType ¶ added in v0.2.2
func (x *SearchEventOpts) GetType() string
func (*SearchEventOpts) ProtoMessage ¶ added in v0.2.2
func (*SearchEventOpts) ProtoMessage()
func (*SearchEventOpts) ProtoReflect ¶ added in v0.2.2
func (x *SearchEventOpts) ProtoReflect() protoreflect.Message
func (*SearchEventOpts) Reset ¶ added in v0.2.2
func (x *SearchEventOpts) Reset()
func (*SearchEventOpts) String ¶ added in v0.2.2
func (x *SearchEventOpts) String() string
func (*SearchEventOpts) Validate ¶ added in v0.2.2
func (this *SearchEventOpts) Validate() error
type Sort ¶ added in v0.6.1
type Sort struct { // field is a field to sort the array by // please note that dot notation may be used to access nested fields Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` // reverse reverses the direction of the sort Reverse bool `protobuf:"varint,2,opt,name=reverse,proto3" json:"reverse,omitempty"` // contains filtered or unexported fields }
Sort is a primitive used to sort an array
func (*Sort) Descriptor
deprecated
added in
v0.6.1
func (*Sort) GetReverse ¶ added in v0.6.1
func (*Sort) ProtoMessage ¶ added in v0.6.1
func (*Sort) ProtoMessage()
func (*Sort) ProtoReflect ¶ added in v0.6.1
func (x *Sort) ProtoReflect() protoreflect.Message
type StreamEventOpts ¶ added in v0.8.0
type StreamEventOpts struct { // the domain of the entity (ex: acme) that triggered the event // * indicates any domain // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // the type of the entity (ex: user) that triggered the event // * indicates any type // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
StreamEventOpts are options for consumers looking to stream events. Events are automatically emitted from mutations made from State mutations within the EntityService
func (*StreamEventOpts) Descriptor
deprecated
added in
v0.8.0
func (*StreamEventOpts) Descriptor() ([]byte, []int)
Deprecated: Use StreamEventOpts.ProtoReflect.Descriptor instead.
func (*StreamEventOpts) GetDomain ¶ added in v0.8.0
func (x *StreamEventOpts) GetDomain() string
func (*StreamEventOpts) GetType ¶ added in v0.8.0
func (x *StreamEventOpts) GetType() string
func (*StreamEventOpts) ProtoMessage ¶ added in v0.8.0
func (*StreamEventOpts) ProtoMessage()
func (*StreamEventOpts) ProtoReflect ¶ added in v0.8.0
func (x *StreamEventOpts) ProtoReflect() protoreflect.Message
func (*StreamEventOpts) Reset ¶ added in v0.8.0
func (x *StreamEventOpts) Reset()
func (*StreamEventOpts) String ¶ added in v0.8.0
func (x *StreamEventOpts) String() string
func (*StreamEventOpts) Validate ¶ added in v0.8.0
func (this *StreamEventOpts) Validate() error
type StreamMessageOpts ¶ added in v0.8.0
type StreamMessageOpts struct { // the message's business domain(ex: accounting) to subscribe to // must not be empty or contain spaces // * indicates any domain Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // the message's channel(ex: general) to subscribe to // must not be empty or contain spaces // * indicates any channel Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` // message's type (ex: comment) to subscribe to // must not be empty or contain spaces // * indicates any type Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
StreamMessageOpts holds options for streaming messages produced by Peers
func (*StreamMessageOpts) Descriptor
deprecated
added in
v0.8.0
func (*StreamMessageOpts) Descriptor() ([]byte, []int)
Deprecated: Use StreamMessageOpts.ProtoReflect.Descriptor instead.
func (*StreamMessageOpts) GetChannel ¶ added in v0.8.0
func (x *StreamMessageOpts) GetChannel() string
func (*StreamMessageOpts) GetDomain ¶ added in v0.8.0
func (x *StreamMessageOpts) GetDomain() string
func (*StreamMessageOpts) GetType ¶ added in v0.8.0
func (x *StreamMessageOpts) GetType() string
func (*StreamMessageOpts) ProtoMessage ¶ added in v0.8.0
func (*StreamMessageOpts) ProtoMessage()
func (*StreamMessageOpts) ProtoReflect ¶ added in v0.8.0
func (x *StreamMessageOpts) ProtoReflect() protoreflect.Message
func (*StreamMessageOpts) Reset ¶ added in v0.8.0
func (x *StreamMessageOpts) Reset()
func (*StreamMessageOpts) String ¶ added in v0.8.0
func (x *StreamMessageOpts) String() string
func (*StreamMessageOpts) Validate ¶ added in v0.8.0
func (this *StreamMessageOpts) Validate() error
type UnimplementedCacheServiceServer ¶ added in v0.9.0
type UnimplementedCacheServiceServer struct { }
UnimplementedCacheServiceServer can be embedded to have forward compatible implementations.
type UnimplementedEntityServiceServer ¶ added in v0.6.0
type UnimplementedEntityServiceServer struct { }
UnimplementedEntityServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEntityServiceServer) Search ¶ added in v0.6.0
func (*UnimplementedEntityServiceServer) Search(context.Context, *SearchEntityOpts) (*Entities, error)
type UnimplementedEventServiceServer ¶ added in v0.4.0
type UnimplementedEventServiceServer struct { }
UnimplementedEventServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventServiceServer) Search ¶ added in v0.4.0
func (*UnimplementedEventServiceServer) Search(context.Context, *SearchEventOpts) (*Events, error)
func (*UnimplementedEventServiceServer) Stream ¶ added in v0.4.0
func (*UnimplementedEventServiceServer) Stream(*StreamEventOpts, EventService_StreamServer) error
type UnimplementedMutexServiceServer ¶ added in v0.9.0
type UnimplementedMutexServiceServer struct { }
UnimplementedMutexServiceServer can be embedded to have forward compatible implementations.
type UnimplementedPeerServiceServer ¶ added in v0.8.0
type UnimplementedPeerServiceServer struct { }
UnimplementedPeerServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedPeerServiceServer) Stream ¶ added in v0.8.0
func (*UnimplementedPeerServiceServer) Stream(*StreamMessageOpts, PeerService_StreamServer) error