Documentation
¶
Index ¶
- Variables
- type EntityServer
- func (e *EntityServer) Create(ctx context.Context, req *entityserver_v1alpha.EntityAccessCreate) error
- func (e *EntityServer) CreateSession(ctx context.Context, req *entityserver_v1alpha.EntityAccessCreateSession) error
- func (e *EntityServer) Delete(ctx context.Context, req *entityserver_v1alpha.EntityAccessDelete) error
- func (e *EntityServer) Ensure(ctx context.Context, req *entityserver_v1alpha.EntityAccessEnsure) error
- func (e *EntityServer) Get(ctx context.Context, req *entityserver_v1alpha.EntityAccessGet) error
- func (e *EntityServer) GetAttributesByTag(ctx context.Context, req *entityserver_v1alpha.EntityAccessGetAttributesByTag) error
- func (e *EntityServer) GetDocument(ctx context.Context, req *entityserver_v1alpha.EntityAccessGetDocument) error
- func (e *EntityServer) List(ctx context.Context, req *entityserver_v1alpha.EntityAccessList) error
- func (e *EntityServer) ListDocuments(ctx context.Context, req *entityserver_v1alpha.EntityAccessListDocuments) error
- func (e *EntityServer) LookupKind(ctx context.Context, req *entityserver_v1alpha.EntityAccessLookupKind) error
- func (e *EntityServer) MakeAttr(ctx context.Context, req *entityserver_v1alpha.EntityAccessMakeAttr) error
- func (e *EntityServer) Parse(ctx context.Context, req *entityserver_v1alpha.EntityAccessParse) error
- func (e *EntityServer) Patch(ctx context.Context, req *entityserver_v1alpha.EntityAccessPatch) error
- func (e *EntityServer) PingSession(ctx context.Context, req *entityserver_v1alpha.EntityAccessPingSession) error
- func (e *EntityServer) Put(ctx context.Context, req *entityserver_v1alpha.EntityAccessPut) error
- func (e *EntityServer) PutSession(ctx context.Context, req *entityserver_v1alpha.EntityAccessPutSession) error
- func (e *EntityServer) Reindex(ctx context.Context, req *entityserver_v1alpha.EntityAccessReindex) error
- func (e *EntityServer) Replace(ctx context.Context, req *entityserver_v1alpha.EntityAccessReplace) error
- func (e *EntityServer) RevokeSession(ctx context.Context, req *entityserver_v1alpha.EntityAccessRevokeSession) error
- func (e *EntityServer) WatchEntity(ctx context.Context, req *entityserver_v1alpha.EntityAccessWatchEntity) error
- func (e *EntityServer) WatchIndex(ctx context.Context, req *entityserver_v1alpha.EntityAccessWatchIndex) error
Constants ¶
This section is empty.
Variables ¶
var MaxPageLimit int64 = 500
MaxPageLimit bounds one response. Without it a caller asking for everything makes the server hold every entity in the index, its rendered document, and the marshalled array all at once, which is the opposite of the property paging exists to give. A caller that wants the whole index still gets it, one page and one cursor at a time.
A var rather than a const so a test can shrink it and exercise multi-page walks without materialising hundreds of entities.
Functions ¶
This section is empty.
Types ¶
type EntityServer ¶
type EntityServer struct {
Log *slog.Logger
Store entity.Store
// contains filtered or unexported fields
}
func NewEntityServer ¶
func (*EntityServer) Create ¶
func (e *EntityServer) Create(ctx context.Context, req *entityserver_v1alpha.EntityAccessCreate) error
func (*EntityServer) CreateSession ¶
func (e *EntityServer) CreateSession(ctx context.Context, req *entityserver_v1alpha.EntityAccessCreateSession) error
func (*EntityServer) Delete ¶
func (e *EntityServer) Delete(ctx context.Context, req *entityserver_v1alpha.EntityAccessDelete) error
func (*EntityServer) Ensure ¶
func (e *EntityServer) Ensure(ctx context.Context, req *entityserver_v1alpha.EntityAccessEnsure) error
func (*EntityServer) Get ¶
func (e *EntityServer) Get(ctx context.Context, req *entityserver_v1alpha.EntityAccessGet) error
func (*EntityServer) GetAttributesByTag ¶
func (e *EntityServer) GetAttributesByTag(ctx context.Context, req *entityserver_v1alpha.EntityAccessGetAttributesByTag) error
func (*EntityServer) GetDocument ¶ added in v0.14.0
func (e *EntityServer) GetDocument(ctx context.Context, req *entityserver_v1alpha.EntityAccessGetDocument) error
GetDocument renders a single entity into its presentation form.
func (*EntityServer) List ¶
func (e *EntityServer) List(ctx context.Context, req *entityserver_v1alpha.EntityAccessList) error
func (*EntityServer) ListDocuments ¶ added in v0.14.0
func (e *EntityServer) ListDocuments(ctx context.Context, req *entityserver_v1alpha.EntityAccessListDocuments) error
ListDocuments renders a bounded page of entities.
Paging happens in the store, so the entities past the limit are never read at all and a page costs the same whether the index holds ten entries or a million.
func (*EntityServer) LookupKind ¶
func (e *EntityServer) LookupKind(ctx context.Context, req *entityserver_v1alpha.EntityAccessLookupKind) error
func (*EntityServer) MakeAttr ¶
func (e *EntityServer) MakeAttr(ctx context.Context, req *entityserver_v1alpha.EntityAccessMakeAttr) error
func (*EntityServer) Parse ¶
func (e *EntityServer) Parse(ctx context.Context, req *entityserver_v1alpha.EntityAccessParse) error
func (*EntityServer) Patch ¶
func (e *EntityServer) Patch(ctx context.Context, req *entityserver_v1alpha.EntityAccessPatch) error
func (*EntityServer) PingSession ¶
func (e *EntityServer) PingSession(ctx context.Context, req *entityserver_v1alpha.EntityAccessPingSession) error
AssertLease keeps the lease alive
func (*EntityServer) Put ¶
func (e *EntityServer) Put(ctx context.Context, req *entityserver_v1alpha.EntityAccessPut) error
func (*EntityServer) PutSession ¶
func (e *EntityServer) PutSession(ctx context.Context, req *entityserver_v1alpha.EntityAccessPutSession) error
func (*EntityServer) Reindex ¶
func (e *EntityServer) Reindex(ctx context.Context, req *entityserver_v1alpha.EntityAccessReindex) error
func (*EntityServer) Replace ¶
func (e *EntityServer) Replace(ctx context.Context, req *entityserver_v1alpha.EntityAccessReplace) error
func (*EntityServer) RevokeSession ¶
func (e *EntityServer) RevokeSession(ctx context.Context, req *entityserver_v1alpha.EntityAccessRevokeSession) error
RevokeLease
func (*EntityServer) WatchEntity ¶
func (e *EntityServer) WatchEntity(ctx context.Context, req *entityserver_v1alpha.EntityAccessWatchEntity) error
func (*EntityServer) WatchIndex ¶
func (e *EntityServer) WatchIndex(ctx context.Context, req *entityserver_v1alpha.EntityAccessWatchIndex) error