Versions in this module Expand all Collapse all v0 v0.1.0 Sep 27, 2022 Changes in this version + const DefaultOperationTimeout + const DefaultPage + const DefaultPageSize + const MaxPageSize + var ErrNotFound = fmt.Errorf("not found") + type CreateOpts struct + type CreateOptsFunc func(*CreateOpts) + type DeleteOpts struct + func NewDeleteOpts(fns ...DeleteOptsFunc) *DeleteOpts + type DeleteOptsFunc func(*DeleteOpts) + func DeleteByID(id string) DeleteOptsFunc + func DeleteByType(typ model.Type) DeleteOptsFunc + type ErrConstraint struct + Index model.Index + Message string + func (e ErrConstraint) Error() string + type ErrUnsupportedListOpts struct + func (e ErrUnsupportedListOpts) Error() string + type ListOpts struct + Filter *exprpb.Expr + Page int + PageSize int + ReferenceID string + ReferenceType model.Type + func NewListOpts(fns ...ListOptsFunc) (*ListOpts, error) + type ListOptsFunc func(*ListOpts) + func ListFor(typ model.Type, id string) ListOptsFunc + func ListWithFilter(expr *exprpb.Expr) ListOptsFunc + func ListWithPageNum(page int) ListOptsFunc + func ListWithPageSize(pageSize int) ListOptsFunc + type ObjectStore struct + func New(persister persistence.Persister, logger *zap.Logger) *ObjectStore + func (s *ObjectStore) Create(ctx context.Context, object model.Object, _ ...CreateOptsFunc) error + func (s *ObjectStore) Delete(ctx context.Context, opts ...DeleteOptsFunc) error + func (s *ObjectStore) ForCluster(cluster string) *ObjectStore + func (s *ObjectStore) List(ctx context.Context, list model.ObjectList, opts ...ListOptsFunc) error + func (s *ObjectStore) Read(ctx context.Context, object model.Object, opts ...ReadOptsFunc) error + func (s *ObjectStore) Upsert(ctx context.Context, object model.Object, _ ...CreateOptsFunc) error + type ReadOpts struct + func NewReadOpts(fns ...ReadOptsFunc) *ReadOpts + type ReadOptsFunc func(*ReadOpts) + func GetByID(id string) ReadOptsFunc + func GetByIndex(indexName, indexValue string) ReadOptsFunc + func GetByName(name string) ReadOptsFunc + type Store interface + Create func(context.Context, model.Object, ...CreateOptsFunc) error + Delete func(context.Context, ...DeleteOptsFunc) error + List func(context.Context, model.ObjectList, ...ListOptsFunc) error + Read func(context.Context, model.Object, ...ReadOptsFunc) error + Upsert func(context.Context, model.Object, ...CreateOptsFunc) error