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-jammin' 🥞
Go module `brainbaking.com/go-jamming`:
> A minimalistic Go-powered jamstack-augmented microservice for webmentions etc > 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 ! **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" "net/http"
"fmt" "fmt"
"github.com/wgroeneveld/go-jamming/common" "brainbaking.com/go-jamming/common"
) )
func Handle(conf *common.Config) http.HandlerFunc { func Handle(conf *common.Config) http.HandlerFunc {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,9 +2,9 @@
package app package app
import ( import (
"github.com/wgroeneveld/go-jamming/app/index" "brainbaking.com/go-jamming/app/index"
"github.com/wgroeneveld/go-jamming/app/pingback" "brainbaking.com/go-jamming/app/pingback"
"github.com/wgroeneveld/go-jamming/app/webmention" "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 // 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" "net/http"
"strconv" "strconv"
"github.com/wgroeneveld/go-jamming/common" "brainbaking.com/go-jamming/common"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,8 +6,8 @@ import (
"errors" "errors"
"net/http" "net/http"
"github.com/wgroeneveld/go-jamming/common" "brainbaking.com/go-jamming/common"
"github.com/wgroeneveld/go-jamming/mocks" "brainbaking.com/go-jamming/mocks"
) )
type httpReqMock struct { 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 go 1.16

View File

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