class

Artistry::Registry

Inherits Reference < Object

Constructors

new(code : String, kind : String, plugin : String, description : Nil | String, symbol : Nil | String, version : Int32)
Source

Class methods

all

List all registrations

Source
allocate_code(db, kind : String) : String

Find the shortest unique prefix for a kind name

Source
find(plugin : String, kind : String) : Registry | Nil

Lookup a registration by plugin and kind

Source
find(code : String) : Registry | Nil

Lookup a registration by code

Source
find_by_kind(kind : String) : Registry | Nil

Lookup a registration by kind name only (returns first match if multiple plugins use same kind)

Source
get_schema(code : String, version : Int32) : JSON::Any | Nil

Get the schema JSON for a code and version

Source
hash_schema(json : String) : String
Source
normalize_schema(schema) : String
Source
register(kind : String, plugin : String, schema, description : String | Nil = nil, symbol : String | Nil = nil, index : Array(String) = [] of String) : String

Register a new artifact kind. Returns the assigned code. Schema can be any JSON-serializable value. Index is a list of field names to create expression indexes on.

Source

Instance methods

code
Source
description
Source
kind
Source
plugin
Source
symbol
Source
version
Source