This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MERCURE_URL=http://localhost:8000/.well-known/mercure | |
MERCURE_JWT_SECRET=eyJhbGciOiJIUzI1NiJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOlsiKiJdLCJzdWJzY3JpYmUiOlsiaHR0cHM6Ly9leGFtcGxlLmNvbS9teS1wcml2YXRlLXRvcGljIiwie3NjaGVtZX06Ly97K2hvc3R9L2RlbW8vYm9va3Mve2lkfS5qc29ubGQiLCIvLndlbGwta25vd24vbWVyY3VyZS9zdWJzY3JpcHRpb25zey90b3BpY317L3N1YnNjcmliZXJ9Il0sInBheWxvYWQiOnsidXNlciI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXNlcnMvZHVuZ2xhcyIsInJlbW90ZUFkZHIiOiIxMjcuMC4wLjEifX19.KKPIikwUzRuB3DTpVw6ajzwSChwFw5omBMmMcWKiDcM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if flag?(:win32) %} | |
lib LibC | |
STDOUT_HANDLE = 0xFFFFFFF5 | |
struct Point | |
x : UInt16 | |
y : UInt16 | |
end | |
struct SmallRect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "xml" | |
lib LibXML | |
type XMLSchemaParserCtxtPtr = Void* | |
type XMLSchemaValidCtxtPtr = Void* | |
struct XMLError | |
domain : Int | |
code : Int | |
message : UInt8* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@[ADI::Register] | |
# Central access point to DB related actions | |
class Blog::Services::EntityManager | |
@@connection : DB::Database = DB.open ENV["DATABASE_URL"] | |
# Each entity has a Repository to store query methods | |
# Longer term ofc this could be made a bit better but manual overload for each works just fine. | |
# | |
# Could prob use a macro loop over entity and add overload if the repo type exists | |
def repository(entity_class : Blog::Entities::User.class) : Blog::Entities::User::Repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "crinja" | |
ADI.configuration_annotation Blog::Annotations::Template, name : String | |
@[ADI::Register] | |
class HTMLFormatHandler | |
include Athena::Framework::View::FormatHandlerInterface | |
private CRINJA = Crinja.new loader: Crinja::Loader::FileSystemLoader.new "#{__DIR__}/../views" |