Documentation ¶
Index ¶
- func CreateActivity(ctx context.Context, db driver.Database, activity prov.NewActivity, ...) (prov.Activity, error)
- func CreateAgent(ctx context.Context, db driver.Database, agent prov.NewAgent, traceID string, ...) (prov.Agent, error)
- func CreateEntity(ctx context.Context, db driver.Database, entity prov.NewEntity, traceID string, ...) (prov.Entity, error)
- func FetchActivity(ctx context.Context, db driver.Database, id string) (prov.Activity, error)
- func FetchAgent(ctx context.Context, db driver.Database, id string) (prov.Agent, error)
- func FetchEntity(ctx context.Context, db driver.Database, id string) (prov.Entity, error)
- func ListActivities(ctx context.Context, db driver.Database) ([]prov.Activity, error)
- func ListAgents(ctx context.Context, db driver.Database) ([]prov.Agent, error)
- func ListEntities(ctx context.Context, db driver.Database) ([]prov.Entity, error)
- type Activity
- type Agent
- type Entity
- type Relationships
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateActivity ¶
func CreateActivity(ctx context.Context, db driver.Database, activity prov.NewActivity, traceID string, now time.Time) (prov.Activity, error)
CreateActivity can create an activity in an arango database.
func CreateAgent ¶
func CreateAgent(ctx context.Context, db driver.Database, agent prov.NewAgent, traceID string, now time.Time) (prov.Agent, error)
CreateAgent can create an agent in an arango database.
func CreateEntity ¶
func CreateEntity(ctx context.Context, db driver.Database, entity prov.NewEntity, traceID string, now time.Time) (prov.Entity, error)
CreateEntity can create an entity in an arango database.
func FetchActivity ¶
FetchActivity can fetch a single activity from an arango database.
func FetchAgent ¶
FetchAgent can fetch a single agent from an arango database.
func FetchEntity ¶
FetchEntity can fetch a single entity from an arango database.
func ListActivities ¶
ListActivities can fetch a list of activities from an arango database.
func ListAgents ¶
ListAgents can fetch a list of agents from an arango database.
Types ¶
type Activity ¶
type Activity struct { ID string `json:"_key"` // Unique identifier. CanonicalID string `json:"canonicalId,omitempty"` // Id for agent that exists outside of provly. Name string `json:"name"` // Human redable name of the agent. Kind string `json:"kind,omitempty"` // A reference to the kind of agent this is. Annotations map[string]string `json:"annotations"` // Machine readable annotations CreatedAt time.Time `json:"createdAt"` // When the agent was added. StartTime time.Time `json:"startTime"` // The time that the experiment started. Duration time.Duration `json:"duration"` // How long the experiment took. Used []Entity `json:"used"` // A list of entities that the activity used. WasAssociatedWith []Agent `json:"wasAssociatedWith"` // A list of agents the activity was associated with. WasInformedBy []Activity `json:"wasInformedBy"` // A separate activity that informed this activity }
Activity is an provenance activity that can be stored in an arango database.
type Agent ¶
type Agent struct { ID string `json:"_key"` // Unique identifier. CanonicalID string `json:"canonicalId,omitempty"` // Id for agent that exists outside of provly. Name string `json:"name"` // Human redable name of the agent. Kind string `json:"kind,omitempty"` // A reference to the kind of agent this is. Annotations map[string]string `json:"annotations"` // Machine readable annotations CreatedAt time.Time `json:"createdAt"` // When the agent was added. Hash string `json:"hash,omitempty"` // Hash of the asset to ensure integrity, this is probably only realistic for software. ActedOnBehalfOf *Agent `json:"actedOnBehalfOf,omitempty"` // An agent on which this agent was acting on behalf of. }
Agent is an person, organization or software.
type Entity ¶
type Entity struct { ID string `json:"_key"` // Unique identifier. CanonicalID string `json:"canonicalId,omitempty"` // Id for agent that exists outside of provly. Name string `json:"name"` // Human redable name of the agent. Kind string `json:"kind,omitempty"` // A reference to the kind of agent this is. Annotations map[string]string `json:"annotations"` // Machine readable annotations CreatedAt time.Time `json:"createdAt"` // When the agent was added. Hash string `json:"hash"` // A hash of the entity. WasDerivedFrom *Entity `json:"wasDerivedFrom"` // An entity this entity was derived from. WasGeneratedBy *Activity `json:"wasGeneratedBy"` // The activity that generated this entity. WasAttributedTo []Agent `json:"wasAttributedTo"` // The agents this entity was attributed to. }
Entity is a core provenance type.
type Relationships ¶
type Relationships struct { From string `json:"_from"` // The source entity. To string `json:"_to"` // The destination entity. Annotations map[string]string `json:"annotations"` // Machine readable annotations. CreatedAt time.Time `json:"createdAt"` // When the agent was added. }
Relationships is an abstraction on all provenance relationships. The from, to, annotations, and createdAt fields are part of the application while the RelationType field defines what relationship it is.