rename master module

This commit is contained in:
Wouter Groeneveld 2021-04-09 18:04:04 +02:00
parent 9f6450e367
commit 3933e4d43b
20 changed files with 47 additions and 45 deletions

View File

@ -1,8 +1,10 @@
# go-jammin' 🥞
Go module `brainbaking.com/go-jamming`:
> A minimalistic Go-powered jamstack-augmented microservice for webmentions etc
**This is a fork of [https://github.com/wgroeneveld/serve-my-jams](serve-my-jams)**, the Node-powered original microservice, which is no longer being maintained.
**This is a fork of [https://github.com/wgroeneveld/serve-my-jams](serve-my-jams)**, the Node-powered original microservice, which is no longer being maintained.
**Are you looking for a way to DO something with this?** See https://github.com/wgroeneveld/jam-my-stack !

View File

@ -5,7 +5,7 @@ import (
"net/http"
"fmt"
"github.com/wgroeneveld/go-jamming/common"
"brainbaking.com/go-jamming/common"
)
func Handle(conf *common.Config) http.HandlerFunc {

View File

@ -3,7 +3,7 @@ package mf
import (
"crypto/md5"
"fmt"
"github.com/wgroeneveld/go-jamming/common"
"brainbaking.com/go-jamming/common"
"net/url"
)

View File

@ -4,7 +4,7 @@ import (
"strings"
"time"
"willnorris.com/go/microformats"
"github.com/wgroeneveld/go-jamming/common"
"brainbaking.com/go-jamming/common"
)
const (

View File

@ -4,10 +4,10 @@ package pingback
import (
"encoding/xml"
"github.com/rs/zerolog/log"
"github.com/wgroeneveld/go-jamming/app/mf"
"github.com/wgroeneveld/go-jamming/app/webmention/receive"
"github.com/wgroeneveld/go-jamming/common"
"github.com/wgroeneveld/go-jamming/rest"
"brainbaking.com/go-jamming/app/mf"
"brainbaking.com/go-jamming/app/webmention/recv"
"brainbaking.com/go-jamming/common"
"brainbaking.com/go-jamming/rest"
"io/ioutil"
"net/http"
)
@ -33,7 +33,7 @@ func HandlePost(conf *common.Config) http.HandlerFunc {
Source: rpc.Source(),
Target: rpc.Target(),
}
receiver := receive.Receiver{
receiver := recv.Receiver{
RestClient: &rest.HttpClient{},
Conf: conf,
}

View File

@ -2,8 +2,8 @@ package send
import (
"github.com/rs/zerolog/log"
"github.com/wgroeneveld/go-jamming/app/mf"
"github.com/wgroeneveld/go-jamming/rest"
"brainbaking.com/go-jamming/app/mf"
"brainbaking.com/go-jamming/rest"
"strings"
)

View File

@ -2,8 +2,8 @@ package send
import (
"github.com/stretchr/testify/assert"
"github.com/wgroeneveld/go-jamming/app/mf"
"github.com/wgroeneveld/go-jamming/mocks"
"brainbaking.com/go-jamming/app/mf"
"brainbaking.com/go-jamming/mocks"
"testing"
)

View File

@ -1,7 +1,7 @@
package pingback
import (
"github.com/wgroeneveld/go-jamming/common"
"brainbaking.com/go-jamming/common"
"strings"
)

View File

@ -3,7 +3,7 @@ package pingback
import (
"encoding/xml"
"github.com/stretchr/testify/assert"
"github.com/wgroeneveld/go-jamming/common"
"brainbaking.com/go-jamming/common"
"testing"
)

View File

@ -2,9 +2,9 @@
package app
import (
"github.com/wgroeneveld/go-jamming/app/index"
"github.com/wgroeneveld/go-jamming/app/pingback"
"github.com/wgroeneveld/go-jamming/app/webmention"
"brainbaking.com/go-jamming/app/index"
"brainbaking.com/go-jamming/app/pingback"
"brainbaking.com/go-jamming/app/webmention"
)
// stole ideas from https://pace.dev/blog/2018/05/09/how-I-write-http-services-after-eight-years.html

View File

@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"github.com/wgroeneveld/go-jamming/common"
"brainbaking.com/go-jamming/common"
"github.com/gorilla/mux"
"github.com/rs/zerolog/log"

View File

@ -3,7 +3,7 @@ package app
import (
"github.com/gorilla/mux"
"github.com/stretchr/testify/assert"
"github.com/wgroeneveld/go-jamming/common"
"brainbaking.com/go-jamming/common"
"net/http"
"net/http/httptest"
"testing"

View File

@ -4,13 +4,13 @@ package webmention
import (
"fmt"
"github.com/gorilla/mux"
"github.com/wgroeneveld/go-jamming/app/mf"
"github.com/wgroeneveld/go-jamming/app/webmention/receive"
"github.com/wgroeneveld/go-jamming/app/webmention/send"
"brainbaking.com/go-jamming/app/mf"
"brainbaking.com/go-jamming/app/webmention/recv"
"brainbaking.com/go-jamming/app/webmention/send"
"net/http"
"github.com/wgroeneveld/go-jamming/common"
"github.com/wgroeneveld/go-jamming/rest"
"brainbaking.com/go-jamming/common"
"brainbaking.com/go-jamming/rest"
)
var httpClient = &rest.HttpClient{}
@ -26,7 +26,7 @@ func HandlePut(conf *common.Config) http.HandlerFunc {
since := getSinceQueryParam(r)
domain := mux.Vars(r)["domain"]
snder := send.Sender{
snder := &send.Sender{
RestClient: httpClient,
Conf: conf,
}
@ -62,7 +62,7 @@ func HandlePost(conf *common.Config) http.HandlerFunc {
Source: r.FormValue("source"),
Target: target,
}
recv := &receive.Receiver{
recv := &recv.Receiver{
RestClient: httpClient,
Conf: conf,
}

View File

@ -1,11 +1,11 @@
package receive
package recv
import (
"encoding/json"
"github.com/wgroeneveld/go-jamming/app/mf"
"github.com/wgroeneveld/go-jamming/common"
"github.com/wgroeneveld/go-jamming/rest"
"brainbaking.com/go-jamming/app/mf"
"brainbaking.com/go-jamming/common"
"brainbaking.com/go-jamming/rest"
"io/fs"
"io/ioutil"
"os"

View File

@ -1,17 +1,17 @@
package receive
package recv
import (
"errors"
"github.com/stretchr/testify/assert"
"github.com/wgroeneveld/go-jamming/app/mf"
"brainbaking.com/go-jamming/app/mf"
"io/ioutil"
"os"
"testing"
"time"
"github.com/wgroeneveld/go-jamming/common"
"github.com/wgroeneveld/go-jamming/mocks"
"brainbaking.com/go-jamming/common"
"brainbaking.com/go-jamming/mocks"
)
var conf = &common.Config{

View File

@ -2,10 +2,10 @@ package send
import (
"github.com/rs/zerolog/log"
"github.com/wgroeneveld/go-jamming/app/mf"
"github.com/wgroeneveld/go-jamming/app/pingback/send"
"github.com/wgroeneveld/go-jamming/common"
"github.com/wgroeneveld/go-jamming/rest"
"brainbaking.com/go-jamming/app/mf"
"brainbaking.com/go-jamming/app/pingback/send"
"brainbaking.com/go-jamming/common"
"brainbaking.com/go-jamming/rest"
)
type Sender struct {

View File

@ -4,8 +4,8 @@ package webmention
import (
"strings"
"github.com/wgroeneveld/go-jamming/common"
"github.com/wgroeneveld/go-jamming/rest"
"brainbaking.com/go-jamming/common"
"brainbaking.com/go-jamming/rest"
"github.com/rs/zerolog/log"
)

View File

@ -6,8 +6,8 @@ import (
"errors"
"net/http"
"github.com/wgroeneveld/go-jamming/common"
"github.com/wgroeneveld/go-jamming/mocks"
"brainbaking.com/go-jamming/common"
"brainbaking.com/go-jamming/mocks"
)
type httpReqMock struct {

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/wgroeneveld/go-jamming
module brainbaking.com/go-jamming
go 1.16

View File

@ -4,7 +4,7 @@ package main
import (
"os"
"github.com/wgroeneveld/go-jamming/app"
"brainbaking.com/go-jamming/app"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"