Documentation ¶
Index ¶
- Constants
- Variables
- type ConceptChangeLogEvent
- type ConceptChanges
- type ConceptEvent
- type ConceptService
- func (s *ConceptService) Check() error
- func (s *ConceptService) DecodeJSON(dec *json.Decoder) (interface{}, string, error)
- func (s *ConceptService) Delete(uuid string, transID string) ([]string, error)
- func (s *ConceptService) Initialise() error
- func (s *ConceptService) Read(uuid string, transID string) (interface{}, bool, error)
- func (s *ConceptService) Write(thing interface{}, transID string) (interface{}, error)
- type ConceptServicer
- type ConceptsHandler
- func (h *ConceptsHandler) DeleteConcept(w http.ResponseWriter, r *http.Request)
- func (h *ConceptsHandler) GTG() gtg.Status
- func (h *ConceptsHandler) GetConcept(w http.ResponseWriter, r *http.Request)
- func (h *ConceptsHandler) PutConcept(w http.ResponseWriter, r *http.Request)
- func (h *ConceptsHandler) RegisterAdminHandlers(router *mux.Router, log *logger.UPPLogger, ...) http.Handler
- func (h *ConceptsHandler) RegisterHandlers(router *mux.Router)
- type ConcordanceEvent
- type Event
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 ConceptChanges ¶
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) 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 (*ConceptsHandler) RegisterHandlers ¶
func (h *ConceptsHandler) RegisterHandlers(router *mux.Router)
type ConcordanceEvent ¶
Click to show internal directories.
Click to hide internal directories.