Elixir ATProtocol firehose & subscription listener

Initial commit

ovyerus.com 3df61b08

+4
.formatter.exs
··· 1 + # Used by "mix format" 2 + [ 3 + inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] 4 + ]
+28
.gitignore
··· 1 + # The directory Mix will write compiled artifacts to. 2 + /_build/ 3 + 4 + # If you run "mix test --cover", coverage assets end up here. 5 + /cover/ 6 + 7 + # The directory Mix downloads your dependencies sources to. 8 + /deps/ 9 + 10 + # Where third-party dependencies like ExDoc output generated docs. 11 + /doc/ 12 + 13 + # If the VM crashes, it generates a dump, let's ignore it too. 14 + erl_crash.dump 15 + 16 + # Also ignore archive artifacts (built via "mix archive.build"). 17 + *.ez 18 + 19 + # Ignore package tarball (built via "mix hex.build"). 20 + drinkup-*.tar 21 + 22 + # Temporary files, for example, from tests. 23 + /tmp/ 24 + 25 + # Nix 26 + .envrc 27 + .direnv 28 + result
+4
README.md
··· 1 + # Drinkup 2 + 3 + Drinkup is an ELixir library for listening to events from an ATProtocol 4 + firehose.
+27
flake.lock
··· 1 + { 2 + "nodes": { 3 + "nixpkgs": { 4 + "locked": { 5 + "lastModified": 1748026106, 6 + "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", 7 + "owner": "nixos", 8 + "repo": "nixpkgs", 9 + "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "nixos", 14 + "ref": "nixos-unstable", 15 + "repo": "nixpkgs", 16 + "type": "github" 17 + } 18 + }, 19 + "root": { 20 + "inputs": { 21 + "nixpkgs": "nixpkgs" 22 + } 23 + } 24 + }, 25 + "root": "root", 26 + "version": 7 27 + }
+21
flake.nix
··· 1 + { 2 + inputs = { 3 + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; 4 + }; 5 + 6 + outputs = {nixpkgs, ...}: let 7 + forSystems = fn: 8 + nixpkgs.lib.genAttrs [ 9 + "aarch64-linux" 10 + "aarch64-darwin" 11 + "x86_64-darwin" 12 + "x86_64-linux" 13 + ] (system: fn nixpkgs.legacyPackages.${system}); 14 + defaultForSystems = fn: forSystems (pkgs: {default = fn pkgs;}); 15 + in { 16 + devShells = defaultForSystems (pkgs: 17 + pkgs.mkShell { 18 + nativeBuildInputs = with pkgs; [elixir erlang]; 19 + }); 20 + }; 21 + }
+18
lib/drinkup.ex
··· 1 + defmodule Drinkup do 2 + @moduledoc """ 3 + Documentation for `Drinkup`. 4 + """ 5 + 6 + @doc """ 7 + Hello world. 8 + 9 + ## Examples 10 + 11 + iex> Drinkup.hello() 12 + :world 13 + 14 + """ 15 + def hello do 16 + :world 17 + end 18 + end
+28
mix.exs
··· 1 + defmodule Drinkup.MixProject do 2 + use Mix.Project 3 + 4 + def project do 5 + [ 6 + app: :drinkup, 7 + version: "0.1.0", 8 + elixir: "~> 1.18", 9 + start_permanent: Mix.env() == :prod, 10 + deps: deps() 11 + ] 12 + end 13 + 14 + # Run "mix help compile.app" to learn about applications. 15 + def application do 16 + [ 17 + extra_applications: [:logger] 18 + ] 19 + end 20 + 21 + # Run "mix help deps" to learn about dependencies. 22 + defp deps do 23 + [ 24 + # {:dep_from_hexpm, "~> 0.3.0"}, 25 + # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} 26 + ] 27 + end 28 + end
+8
test/drinkup_test.exs
··· 1 + defmodule DrinkupTest do 2 + use ExUnit.Case 3 + doctest Drinkup 4 + 5 + test "greets the world" do 6 + assert Drinkup.hello() == :world 7 + end 8 + end
+1
test/test_helper.exs
··· 1 + ExUnit.start()