Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface {
	GetDBType() string
	CreateEntity(entity *types.Entity) (*types.Entity, error)
	CreateAsset(asset oam.Asset) (*types.Entity, error)
	FindEntityById(id string) (*types.Entity, error)
	FindEntitiesByContent(asset oam.Asset, since time.Time) ([]*types.Entity, error)
	FindEntitiesByType(atype oam.AssetType, since time.Time) ([]*types.Entity, error)
	DeleteEntity(id string) error
	CreateEdge(edge *types.Edge) (*types.Edge, error)
	FindEdgeById(id string) (*types.Edge, error)
	IncomingEdges(entity *types.Entity, since time.Time, labels ...string) ([]*types.Edge, error)
	OutgoingEdges(entity *types.Entity, since time.Time, labels ...string) ([]*types.Edge, error)
	DeleteEdge(id string) error
	CreateEntityTag(entity *types.Entity, tag *types.EntityTag) (*types.EntityTag, error)
	CreateEntityProperty(entity *types.Entity, property oam.Property) (*types.EntityTag, error)
	FindEntityTagById(id string) (*types.EntityTag, error)
	FindEntityTagsByContent(prop oam.Property, since time.Time) ([]*types.EntityTag, error)
	GetEntityTags(entity *types.Entity, since time.Time, names ...string) ([]*types.EntityTag, error)
	DeleteEntityTag(id string) error
	CreateEdgeTag(edge *types.Edge, tag *types.EdgeTag) (*types.EdgeTag, error)
	CreateEdgeProperty(edge *types.Edge, property oam.Property) (*types.EdgeTag, error)
	FindEdgeTagById(id string) (*types.EdgeTag, error)
	FindEdgeTagsByContent(prop oam.Property, since time.Time) ([]*types.EdgeTag, error)
	GetEdgeTags(edge *types.Edge, since time.Time, names ...string) ([]*types.EdgeTag, error)
	DeleteEdgeTag(id string) error
	Close() error
}
    Repository defines the methods for interacting with the asset database. It provides operations for creating, retrieving, tagging, and linking assets.
func New ¶
func New(dbtype, dsn string) (Repository, error)
New creates a new instance of the asset database repository.
 Click to show internal directories. 
   Click to hide internal directories.