metastore

package
v0.5.0-beta Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemoryMeta   = config.MemoryMeta
	SqliteMeta   = config.SqliteMeta
	PostgresMeta = config.PostgresMeta
)

Variables

This section is empty.

Functions

func DisableMetrics

func DisableMetrics()

Types

type ChunkStore

type ChunkStore interface {
	NextSegmentID(ctx context.Context) (int64, error)
	ListSegments(ctx context.Context, oid, chunkID int64, allChunk bool) ([]types.ChunkSeg, error)
	AppendSegments(ctx context.Context, seg types.ChunkSeg) (*types.Metadata, error)
	DeleteSegment(ctx context.Context, segID int64) error
}

type DEntry

type DEntry interface {
	SystemInfo(ctx context.Context) (*types.SystemInfo, error)

	GetEntry(ctx context.Context, id int64) (*types.Metadata, error)
	FindEntry(ctx context.Context, parentID int64, name string) (*types.Metadata, error)
	CreateEntry(ctx context.Context, parentID int64, newEntry *types.Metadata) error
	RemoveEntry(ctx context.Context, parentID, entryID int64) error
	DeleteRemovedEntry(ctx context.Context, entryID int64) error
	UpdateEntryMetadata(ctx context.Context, entry *types.Metadata) error

	SaveEntryUri(ctx context.Context, entryUri *types.EntryUri) error
	GetEntryUri(ctx context.Context, uri string) (*types.EntryUri, error)
	GetEntryUriById(ctx context.Context, id int64) (*types.EntryUri, error)
	DeleteEntryUri(ctx context.Context, id int64) error
	DeleteEntryUriByPrefix(ctx context.Context, prefix string) error

	ListEntryChildren(ctx context.Context, parentId int64) (EntryIterator, error)
	FilterEntries(ctx context.Context, filter types.Filter) (EntryIterator, error)

	Open(ctx context.Context, id int64, attr types.OpenAttr) (*types.Metadata, error)
	Flush(ctx context.Context, id int64, size int64) error
	MirrorEntry(ctx context.Context, newEntry *types.Metadata) error
	ChangeEntryParent(ctx context.Context, targetEntryId int64, newParentId int64, newName string, opt types.ChangeParentAttr) error

	GetEntryExtendData(ctx context.Context, id int64) (types.ExtendData, error)
	UpdateEntryExtendData(ctx context.Context, id int64, ed types.ExtendData) error
	GetEntryLabels(ctx context.Context, id int64) (types.Labels, error)
	UpdateEntryLabels(ctx context.Context, id int64, labels types.Labels) error

	SaveDocument(ctx context.Context, doc *types.Document) error
	ListDocument(ctx context.Context, parentId int64) ([]*types.Document, error)
	GetDocument(ctx context.Context, id int64) (*types.Document, error)
	GetDocumentByEntryId(ctx context.Context, oid int64) (*types.Document, error)
	GetDocumentByName(ctx context.Context, name string) (*types.Document, error)
	DeleteDocument(ctx context.Context, id int64) error
	GetDocumentFeed(ctx context.Context, feedID string) (*types.DocumentFeed, error)
	EnableDocumentFeed(ctx context.Context, feed types.DocumentFeed) error
	DisableDocumentFeed(ctx context.Context, feed types.DocumentFeed) error

	ListFridayAccount(ctx context.Context, refId int64) ([]*types.FridayAccount, error)
	CreateFridayAccount(ctx context.Context, account *types.FridayAccount) error
}

type EntryIterator

type EntryIterator interface {
	HasNext() bool
	Next() *types.Metadata
}

type Meta

func NewMetaStorage

func NewMetaStorage(metaType string, meta config.Meta) (m Meta, err error)

type NotificationRecorder

type NotificationRecorder interface {
	ListNotifications(ctx context.Context) ([]types.Notification, error)
	RecordNotification(ctx context.Context, nid string, no types.Notification) error
	UpdateNotificationStatus(ctx context.Context, nid, status string) error
}

type ScheduledTaskRecorder

type ScheduledTaskRecorder interface {
	ListTask(ctx context.Context, taskID string, filter types.ScheduledTaskFilter) ([]*types.ScheduledTask, error)
	SaveTask(ctx context.Context, task *types.ScheduledTask) error
	DeleteFinishedTask(ctx context.Context, aliveTime time.Duration) error

	GetWorkflow(ctx context.Context, wfID string) (*types.WorkflowSpec, error)
	ListWorkflow(ctx context.Context) ([]*types.WorkflowSpec, error)
	DeleteWorkflow(ctx context.Context, wfID string) error
	GetWorkflowJob(ctx context.Context, jobID string) (*types.WorkflowJob, error)
	ListWorkflowJob(ctx context.Context, filter types.JobFilter) ([]*types.WorkflowJob, error)
	SaveWorkflow(ctx context.Context, wf *types.WorkflowSpec) error
	SaveWorkflowJob(ctx context.Context, wf *types.WorkflowJob) error
	DeleteWorkflowJob(ctx context.Context, wfJobID ...string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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