concepts

package
v1.37.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const (
	//Event types
	UpdatedEvent   = "CONCEPT_UPDATED"
	AddedEvent     = "CONCORDANCE_ADDED"
	RemovedEvent   = "CONCORDANCE_REMOVED"
	ChangeLogEvent = "CONCEPT_CHANGE_LOG"
)

Variables

View Source
var (
	ErrUnexpectedReadResult = errors.New("unexpected read result count")
	ErrNotFound             = errors.New("concept was not found")
	ErrDeleteSource         = errors.New("cannot delete source concept different than the canonical")
	ErrDeleteRelated        = errors.New("cannot delete concept related with another thing")
)

Functions

This section is empty.

Types

type ConceptChangeLogEvent added in v1.35.8

type ConceptChangeLogEvent struct {
	Type              string `json:"eventType"`
	AnnotationsChange bool   `json:"annotationsChange"`
	ChangeLog         string `json:"changelog"`
}

type ConceptChanges

type ConceptChanges struct {
	ChangedRecords []Event  `json:"events"`
	UpdatedIds     []string `json:"updatedIDs"`
}

type ConceptEvent

type ConceptEvent struct {
	Type string `json:"eventType"`
}

type ConceptService

type ConceptService struct {
	// contains filtered or unexported fields
}

ConceptService - CypherDriver - CypherDriver

func NewConceptService

func NewConceptService(driver *cmneo4j.Driver, log *logger.UPPLogger, annotationsChangeFields []string) ConceptService

NewConceptService instantiate driver

func (*ConceptService) Check

func (s *ConceptService) Check() error

Check - checker

func (*ConceptService) DecodeJSON

func (s *ConceptService) DecodeJSON(dec *json.Decoder) (interface{}, string, error)

DecodeJSON - decode json

func (*ConceptService) Delete added in v1.34.0

func (s *ConceptService) Delete(uuid string, transID string) ([]string, error)

func (*ConceptService) Initialise

func (s *ConceptService) Initialise() error

Initialise tries to create indexes and constraints if they are not already created.

func (*ConceptService) Read

func (s *ConceptService) Read(uuid string, transID string) (interface{}, bool, error)

func (*ConceptService) Write

func (s *ConceptService) Write(thing interface{}, transID string) (interface{}, error)

type ConceptServicer

type ConceptServicer interface {
	Write(thing interface{}, transID string) (updatedIds interface{}, err error)
	Read(uuid string, transID string) (thing interface{}, found bool, err error)
	Delete(uuid string, transID string) (uuids []string, err error)
	DecodeJSON(*json.Decoder) (thing interface{}, identity string, err error)
	Check() error
	Initialise() error
}

ConceptServicer defines the functions any read-write application needs to implement

type ConceptsHandler

type ConceptsHandler struct {
	ConceptsService ConceptServicer
}

func (*ConceptsHandler) DeleteConcept added in v1.34.0

func (h *ConceptsHandler) DeleteConcept(w http.ResponseWriter, r *http.Request)

func (*ConceptsHandler) GTG

func (h *ConceptsHandler) GTG() gtg.Status

func (*ConceptsHandler) GetConcept

func (h *ConceptsHandler) GetConcept(w http.ResponseWriter, r *http.Request)

func (*ConceptsHandler) PutConcept

func (h *ConceptsHandler) PutConcept(w http.ResponseWriter, r *http.Request)

func (*ConceptsHandler) RegisterAdminHandlers

func (h *ConceptsHandler) RegisterAdminHandlers(router *mux.Router, log *logger.UPPLogger,
	appSystemCode, appName, appDescription string, enableRequestLogging bool) http.Handler

func (*ConceptsHandler) RegisterHandlers

func (h *ConceptsHandler) RegisterHandlers(router *mux.Router)

type ConcordanceEvent

type ConcordanceEvent struct {
	Type  string `json:"eventType"`
	OldID string `json:"oldID"`
	NewID string `json:"newID"`
}

type Event

type Event struct {
	ConceptType   string      `json:"type"`
	ConceptUUID   string      `json:"uuid"`
	AggregateHash string      `json:"aggregateHash"`
	TransactionID string      `json:"transactionID"`
	EventDetails  interface{} `json:"eventDetails"`
}

Jump to

Keyboard shortcuts

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