diff --git a/cmd/ek/main.go b/cmd/ek/main.go
index f65a43b..76b17ef 100644
--- a/cmd/ek/main.go
+++ b/cmd/ek/main.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
// Ek is a microsub client.
package main
diff --git a/cmd/eksterd/app.go b/cmd/eksterd/app.go
index d02c015..9c00e06 100644
--- a/cmd/eksterd/app.go
+++ b/cmd/eksterd/app.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
import (
diff --git a/cmd/eksterd/auth.go b/cmd/eksterd/auth.go
index 48eb5d9..5877756 100644
--- a/cmd/eksterd/auth.go
+++ b/cmd/eksterd/auth.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
import (
diff --git a/cmd/eksterd/db/migrations/000001_create_channels_table.down.sql b/cmd/eksterd/db/migrations/000001_create_channels_table.down.sql
index d22a3ec..d28fba2 100644
--- a/cmd/eksterd/db/migrations/000001_create_channels_table.down.sql
+++ b/cmd/eksterd/db/migrations/000001_create_channels_table.down.sql
@@ -1 +1,19 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
DROP TABLE "channels";
diff --git a/cmd/eksterd/db/migrations/000001_create_channels_table.up.sql b/cmd/eksterd/db/migrations/000001_create_channels_table.up.sql
index 9b68fe2..a893c7f 100644
--- a/cmd/eksterd/db/migrations/000001_create_channels_table.up.sql
+++ b/cmd/eksterd/db/migrations/000001_create_channels_table.up.sql
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
CREATE TABLE IF NOT EXISTS "channels" (
"id" int primary key generated always as identity,
"uid" varchar(255) unique,
diff --git a/cmd/eksterd/db/migrations/000002_create_feeds_table.down.sql b/cmd/eksterd/db/migrations/000002_create_feeds_table.down.sql
index 9d140b8..9c4f049 100644
--- a/cmd/eksterd/db/migrations/000002_create_feeds_table.down.sql
+++ b/cmd/eksterd/db/migrations/000002_create_feeds_table.down.sql
@@ -1 +1,19 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
DROP TABLE "feeds";
diff --git a/cmd/eksterd/db/migrations/000002_create_feeds_table.up.sql b/cmd/eksterd/db/migrations/000002_create_feeds_table.up.sql
index 54a2de1..ccb6ab4 100644
--- a/cmd/eksterd/db/migrations/000002_create_feeds_table.up.sql
+++ b/cmd/eksterd/db/migrations/000002_create_feeds_table.up.sql
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
CREATE TABLE "feeds" (
"id" int primary key generated always as identity,
"channel_id" int references "channels" (id) on update cascade on delete cascade,
diff --git a/cmd/eksterd/db/migrations/000003_add_default_channels.down.sql b/cmd/eksterd/db/migrations/000003_add_default_channels.down.sql
index 75b3e6b..b07efd6 100644
--- a/cmd/eksterd/db/migrations/000003_add_default_channels.down.sql
+++ b/cmd/eksterd/db/migrations/000003_add_default_channels.down.sql
@@ -1 +1,19 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
DELETE FROM "channels" WHERE "uid" IN ('home', 'notifications');
diff --git a/cmd/eksterd/db/migrations/000003_add_default_channels.up.sql b/cmd/eksterd/db/migrations/000003_add_default_channels.up.sql
index f59758b..91771c1 100644
--- a/cmd/eksterd/db/migrations/000003_add_default_channels.up.sql
+++ b/cmd/eksterd/db/migrations/000003_add_default_channels.up.sql
@@ -1 +1,19 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
INSERT INTO "channels" ("uid", "name") VALUES ('home', 'Home'), ('notifications', 'Notifications');
diff --git a/cmd/eksterd/db/migrations/000004_create_items_table.down.sql b/cmd/eksterd/db/migrations/000004_create_items_table.down.sql
index df0147f..68bfe59 100644
--- a/cmd/eksterd/db/migrations/000004_create_items_table.down.sql
+++ b/cmd/eksterd/db/migrations/000004_create_items_table.down.sql
@@ -1 +1,19 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
DROP TABLE "items";
diff --git a/cmd/eksterd/db/migrations/000004_create_items_table.up.sql b/cmd/eksterd/db/migrations/000004_create_items_table.up.sql
index 3c0bacd..bfc1e06 100644
--- a/cmd/eksterd/db/migrations/000004_create_items_table.up.sql
+++ b/cmd/eksterd/db/migrations/000004_create_items_table.up.sql
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
CREATE TABLE IF NOT EXISTS "items" (
"id" int primary key generated always as identity,
"channel_id" int references "channels" on delete cascade,
diff --git a/cmd/eksterd/db/migrations/000005_alter_items_add_feed_id.down.sql b/cmd/eksterd/db/migrations/000005_alter_items_add_feed_id.down.sql
index 613547f..b29d65f 100644
--- a/cmd/eksterd/db/migrations/000005_alter_items_add_feed_id.down.sql
+++ b/cmd/eksterd/db/migrations/000005_alter_items_add_feed_id.down.sql
@@ -1 +1,19 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
ALTER TABLE "items" DROP COLUMN "feed_id";
diff --git a/cmd/eksterd/db/migrations/000005_alter_items_add_feed_id.up.sql b/cmd/eksterd/db/migrations/000005_alter_items_add_feed_id.up.sql
index f28fc0c..615a9b8 100644
--- a/cmd/eksterd/db/migrations/000005_alter_items_add_feed_id.up.sql
+++ b/cmd/eksterd/db/migrations/000005_alter_items_add_feed_id.up.sql
@@ -1 +1,19 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
ALTER TABLE "items" ADD COLUMN "feed_id" INT REFERENCES "feeds" ON DELETE CASCADE;
diff --git a/cmd/eksterd/db/migrations/000006_create_subscriptions_table.down.sql b/cmd/eksterd/db/migrations/000006_create_subscriptions_table.down.sql
index 4f21273..307559a 100644
--- a/cmd/eksterd/db/migrations/000006_create_subscriptions_table.down.sql
+++ b/cmd/eksterd/db/migrations/000006_create_subscriptions_table.down.sql
@@ -1 +1,19 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
DROP TABLE "subscriptions";
diff --git a/cmd/eksterd/db/migrations/000006_create_subscriptions_table.up.sql b/cmd/eksterd/db/migrations/000006_create_subscriptions_table.up.sql
index 47ae511..79c0452 100644
--- a/cmd/eksterd/db/migrations/000006_create_subscriptions_table.up.sql
+++ b/cmd/eksterd/db/migrations/000006_create_subscriptions_table.up.sql
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
CREATE TABLE "subscriptions" (
"id" int primary key generated always as identity,
"topic" varchar(1024) not null references "feeds" ("url") on update cascade on delete cascade,
diff --git a/cmd/eksterd/http.go b/cmd/eksterd/http.go
index 5f9b6da..beeddd3 100644
--- a/cmd/eksterd/http.go
+++ b/cmd/eksterd/http.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
import (
diff --git a/cmd/eksterd/hubbackend.go b/cmd/eksterd/hubbackend.go
index d1a51fd..382bd5f 100644
--- a/cmd/eksterd/hubbackend.go
+++ b/cmd/eksterd/hubbackend.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
import (
diff --git a/cmd/eksterd/incoming.go b/cmd/eksterd/incoming.go
index b3d1fee..20b9229 100644
--- a/cmd/eksterd/incoming.go
+++ b/cmd/eksterd/incoming.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
import (
diff --git a/cmd/eksterd/main.go b/cmd/eksterd/main.go
index 78a1c6d..534b6e6 100644
--- a/cmd/eksterd/main.go
+++ b/cmd/eksterd/main.go
@@ -1,14 +1,20 @@
-// Copyright (C) 2018 Peter Stuifzand
-//
-// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
-// later version.
-//
-// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
-// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along with this program. If not,
-// see .
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
/*
Eksterd is a microsub server that is extendable.
diff --git a/cmd/eksterd/memory.go b/cmd/eksterd/memory.go
index ce3a21a..c17a9c6 100644
--- a/cmd/eksterd/memory.go
+++ b/cmd/eksterd/memory.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
import (
diff --git a/cmd/eksterd/memory_test.go b/cmd/eksterd/memory_test.go
index 202b4d4..090dd87 100644
--- a/cmd/eksterd/memory_test.go
+++ b/cmd/eksterd/memory_test.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
// func Test_memoryBackend_ChannelsCreate(t *testing.T) {
diff --git a/cmd/eksterd/micropub.go b/cmd/eksterd/micropub.go
index b311b91..f10776f 100644
--- a/cmd/eksterd/micropub.go
+++ b/cmd/eksterd/micropub.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
import (
diff --git a/cmd/eksterd/search.go b/cmd/eksterd/search.go
index 910bd48..6224f5e 100644
--- a/cmd/eksterd/search.go
+++ b/cmd/eksterd/search.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
import (
diff --git a/cmd/jf2test/main.go b/cmd/jf2test/main.go
index 0147e70..a02a3bb 100644
--- a/cmd/jf2test/main.go
+++ b/cmd/jf2test/main.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package main
import (
diff --git a/pkg/auth/types.go b/pkg/auth/types.go
index d5707d0..c208833 100644
--- a/pkg/auth/types.go
+++ b/pkg/auth/types.go
@@ -1,6 +1,24 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package auth
-// Auther
+// Auther checks of the token in the head is accepted and fills TokenResponse
type Auther interface {
AuthTokenAccepted(header string, r *TokenResponse) bool
}
diff --git a/pkg/client/requests.go b/pkg/client/requests.go
index d664771..f72b993 100644
--- a/pkg/client/requests.go
+++ b/pkg/client/requests.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package client
import (
diff --git a/pkg/fetch/fetch.go b/pkg/fetch/fetch.go
index ad3b0fc..6f461f9 100644
--- a/pkg/fetch/fetch.go
+++ b/pkg/fetch/fetch.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
// Package fetch provides an API for fetching information about urls.
package fetch
diff --git a/pkg/fetch/fetch_test.go b/pkg/fetch/fetch_test.go
index 64727d6..75f7ba4 100644
--- a/pkg/fetch/fetch_test.go
+++ b/pkg/fetch/fetch_test.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package fetch
import (
diff --git a/pkg/fetch/fetcher.go b/pkg/fetch/fetcher.go
index 1f11dbe..959188c 100644
--- a/pkg/fetch/fetcher.go
+++ b/pkg/fetch/fetcher.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package fetch
import "net/http"
diff --git a/pkg/indieauth/auth.go b/pkg/indieauth/auth.go
index 361bbfb..fb98a3f 100644
--- a/pkg/indieauth/auth.go
+++ b/pkg/indieauth/auth.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package indieauth
import (
diff --git a/pkg/jf2/reflect.go b/pkg/jf2/reflect.go
index cf5e984..0076a30 100644
--- a/pkg/jf2/reflect.go
+++ b/pkg/jf2/reflect.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package jf2
import (
diff --git a/pkg/jf2/simplify.go b/pkg/jf2/simplify.go
index 42ec0aa..b08e603 100644
--- a/pkg/jf2/simplify.go
+++ b/pkg/jf2/simplify.go
@@ -1,21 +1,22 @@
-// Package jf2 converts microformats to JF2
/*
- ekster - microsub server
- Copyright (C) 2018 Peter Stuifzand
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
+// Package jf2 converts microformats to JF2
package jf2
import (
diff --git a/pkg/jf2/simplify_test.go b/pkg/jf2/simplify_test.go
index f01f1fa..beb9e4b 100644
--- a/pkg/jf2/simplify_test.go
+++ b/pkg/jf2/simplify_test.go
@@ -1,20 +1,20 @@
/*
- ekster - microsub server
- Copyright (C) 2018 Peter Stuifzand
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
package jf2_test
import (
diff --git a/pkg/jsonfeed/jsonfeed.go b/pkg/jsonfeed/jsonfeed.go
index 49a50be..193e7f9 100644
--- a/pkg/jsonfeed/jsonfeed.go
+++ b/pkg/jsonfeed/jsonfeed.go
@@ -1,18 +1,22 @@
-// Package jsonfeed contains the types and a parse function for JSON feeds.
-// Copyright (C) 2018 Peter Stuifzand
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+// Package jsonfeed parses feeds in the jsonfeed format
package jsonfeed
import (
diff --git a/pkg/jsonfeed/jsonfeed_test.go b/pkg/jsonfeed/jsonfeed_test.go
index 51c4dea..3942388 100644
--- a/pkg/jsonfeed/jsonfeed_test.go
+++ b/pkg/jsonfeed/jsonfeed_test.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package jsonfeed
import (
diff --git a/pkg/microsub/database.go b/pkg/microsub/database.go
index aa3899f..067b033 100644
--- a/pkg/microsub/database.go
+++ b/pkg/microsub/database.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package microsub
import (
diff --git a/pkg/microsub/protocol.go b/pkg/microsub/protocol.go
index d4024d9..df5f69e 100644
--- a/pkg/microsub/protocol.go
+++ b/pkg/microsub/protocol.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
// Package microsub describes the protocol methods of the Microsub protocol
package microsub
diff --git a/pkg/microsub/protocol_test.go b/pkg/microsub/protocol_test.go
index 1a911e2..a1a8d9f 100644
--- a/pkg/microsub/protocol_test.go
+++ b/pkg/microsub/protocol_test.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package microsub
import (
diff --git a/pkg/server/microsub.go b/pkg/server/microsub.go
index 669c2d3..dc364bb 100644
--- a/pkg/server/microsub.go
+++ b/pkg/server/microsub.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
/*
Package server contains the microsub server itself. It implements http.Handler.
It follows the spec at https://indieweb.org/Microsub-spec.
diff --git a/pkg/server/microsub_test.go b/pkg/server/microsub_test.go
index 0dd268a..7be0a2a 100644
--- a/pkg/server/microsub_test.go
+++ b/pkg/server/microsub_test.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package server
import (
diff --git a/pkg/server/null.go b/pkg/server/null.go
index 7593b4f..a1aee92 100644
--- a/pkg/server/null.go
+++ b/pkg/server/null.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package server
import (
diff --git a/pkg/sse/events.go b/pkg/sse/events.go
index 42a1c17..f8c796e 100644
--- a/pkg/sse/events.go
+++ b/pkg/sse/events.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package sse
import (
diff --git a/pkg/timeline/null.go b/pkg/timeline/null.go
index f9f4fdd..49283bc 100644
--- a/pkg/timeline/null.go
+++ b/pkg/timeline/null.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package timeline
import "p83.nl/go/ekster/pkg/microsub"
diff --git a/pkg/timeline/postgres.go b/pkg/timeline/postgres.go
index 1eed283..e164681 100644
--- a/pkg/timeline/postgres.go
+++ b/pkg/timeline/postgres.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package timeline
import (
diff --git a/pkg/timeline/redisset.go b/pkg/timeline/redisset.go
index c84526f..e9637c5 100644
--- a/pkg/timeline/redisset.go
+++ b/pkg/timeline/redisset.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package timeline
import (
diff --git a/pkg/timeline/redisstreams.go b/pkg/timeline/redisstreams.go
index 70f9c1a..ab8f85d 100644
--- a/pkg/timeline/redisstreams.go
+++ b/pkg/timeline/redisstreams.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package timeline
import (
diff --git a/pkg/timeline/timeline.go b/pkg/timeline/timeline.go
index 261a1f2..dd66ecb 100644
--- a/pkg/timeline/timeline.go
+++ b/pkg/timeline/timeline.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
// Package timeline contains different types of timeline backends.
//
// "sorted-set" uses Redis sorted sets as a backend
diff --git a/pkg/util/algorithm.go b/pkg/util/algorithm.go
index b409518..bf69069 100644
--- a/pkg/util/algorithm.go
+++ b/pkg/util/algorithm.go
@@ -1,7 +1,26 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package util
import "reflect"
+// Rotate rotates values of an array, between index f and l with midpoint k
func Rotate(a interface{}, f, k, l int) int {
swapper := reflect.Swapper(a)
if f == k {
@@ -38,6 +57,7 @@ func Rotate(a interface{}, f, k, l int) int {
return ret
}
+// StablePartition partitions elements of the array between indices f and l according to predicate p
func StablePartition(a interface{}, f, l int, p func(i int) bool) int {
n := l - f
@@ -48,7 +68,7 @@ func StablePartition(a interface{}, f, l int, p func(i int) bool) int {
if n == 1 {
t := f
if p(f) {
- t += 1
+ t++
}
return t
}
diff --git a/pkg/util/randkey.go b/pkg/util/randkey.go
index 9e47777..326794f 100644
--- a/pkg/util/randkey.go
+++ b/pkg/util/randkey.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package util
import (
@@ -6,6 +24,7 @@ import (
const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+// RandStringBytes generates a random string of n characters
func RandStringBytes(n int) string {
b := make([]byte, n)
for i := range b {
diff --git a/pkg/websub/signature.go b/pkg/websub/signature.go
index 67d42ec..f96e209 100644
--- a/pkg/websub/signature.go
+++ b/pkg/websub/signature.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package websub
import (
diff --git a/pkg/websub/signature_test.go b/pkg/websub/signature_test.go
index 4af77ff..53e3500 100644
--- a/pkg/websub/signature_test.go
+++ b/pkg/websub/signature_test.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package websub
import (
diff --git a/pkg/websub/subscribe.go b/pkg/websub/subscribe.go
index 9b5501d..e076823 100644
--- a/pkg/websub/subscribe.go
+++ b/pkg/websub/subscribe.go
@@ -1,3 +1,21 @@
+/*
+ * Ekster is a microsub server
+ * Copyright (c) 2021 The Ekster authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package websub
import (