mongostore

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package mongostore adapts MongoDB collections to GoMyAdmin resources.

Package mongostore provides a MongoDB-backed AdminStore adapter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	server.ResourceMetadataStore
	// contains filtered or unexported fields
}

func New

func New(db *mongo.Database, app *admin.App) *Store

func (*Store) AddFile

func (s *Store) AddFile(ctx context.Context, record server.Record) error

func (*Store) Audit

func (s *Store) Audit(ctx context.Context, tenantID, role string) ([]server.AuditEvent, error)

func (*Store) Create

func (s *Store) Create(ctx context.Context, table, tenantID string, input server.Record) (server.Record, error)

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, table, id, tenantID, role string) (server.Record, error)

func (*Store) DeleteMany

func (s *Store) DeleteMany(ctx context.Context, table string, ids []string, tenantID, role string) ([]server.Record, error)

func (*Store) FileKey

func (s *Store) FileKey(ctx context.Context, id, tenantID, role string) (string, error)

func (*Store) Files

func (s *Store) Files(ctx context.Context, tenantID, role string) ([]server.Record, error)

func (*Store) Get

func (s *Store) Get(ctx context.Context, table, id, tenantID, role string) (server.Record, error)

func (*Store) List

func (s *Store) List(ctx context.Context, table, tenantID, role, search, sortBy string, filters map[string]string, page, perPage int) ([]server.Record, int, error)

func (*Store) RecordAudit

func (s *Store) RecordAudit(ctx context.Context, event server.AuditEvent)

func (*Store) Update

func (s *Store) Update(ctx context.Context, table, id, tenantID, role string, input server.Record) (server.Record, server.Record, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL