Moved to go-ap
This commit is contained in:
parent
4bd3a14ffa
commit
281b73cbc2
14
README.md
14
README.md
|
@ -1,17 +1,17 @@
|
|||
# Activity Pub for Go
|
||||
|
||||
[![MIT Licensed](https://img.shields.io/github/license/mariusor/activitypub.go.svg)](https://raw.githubusercontent.com/mariusor/activitypub.go/master/LICENSE)
|
||||
[![Build status](https://img.shields.io/travis/mariusor/activitypub.go.svg)](https://travis-ci.org/mariusor/activitypub.go)
|
||||
[![Test Coverage](https://img.shields.io/codecov/c/github/mariusor/activitypub.go.svg)](https://codecov.io/gh/mariusor/activitypub.go)
|
||||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/29664f7ae6c643bca76700143e912cd3)](https://www.codacy.com/app/mariusor/activitypub.go/dashboard)
|
||||
<!-- [![Go Report Card](https://goreportcard.com/badge/github.com/mariusor/activitypub.go)](https://goreportcard.com/report/github.com/mariusor/activitypub.go) -->
|
||||
[![MIT Licensed](https://img.shields.io/github/license/go-ap/activitypub.go.svg)](https://raw.githubusercontent.com/go-ap/activitypub.go/master/LICENSE)
|
||||
[![Build status](https://img.shields.io/travis/go-ap/activitypub.go.svg)](https://travis-ci.org/go-ap/activitypub.go)
|
||||
[![Test Coverage](https://img.shields.io/codecov/c/github/go-ap/activitypub.go.svg)](https://codecov.io/gh/go-ap/activitypub.go)
|
||||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/29664f7ae6c643bca76700143e912cd3)](https://www.codacy.com/app/go-ap/activitypub.go/dashboard)
|
||||
<!-- [![Go Report Card](https://goreportcard.com/badge/github.com/go-ap/activitypub.go)](https://goreportcard.com/report/github.com/go-ap/activitypub.go) -->
|
||||
|
||||
Basic lib for using [activity pub](https://www.w3.org/TR/activitypub/#Overview) API in Go.
|
||||
|
||||
Please see issue [#1](https://github.com/mariusor/activitypub.go/issues/1) before considering this project for real life applications.
|
||||
Please see issue [#1](https://github.com/go-ap/activitypub.go/issues/1) before considering this project for real life applications.
|
||||
|
||||
## Usage
|
||||
|
||||
```go
|
||||
import "github.com/mariusor/activitypub.go/activitypub"
|
||||
import "github.com/go-ap/activitypub.go/activitypub"
|
||||
```
|
||||
|
|
13
activitypub/actor.go
Normal file
13
activitypub/actor.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package activitypub
|
||||
|
||||
import as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
|
||||
// Actor is the ActivityPub version of an Activity Streams vocabulary Actor
|
||||
type Actor struct {
|
||||
as.Actor
|
||||
|
||||
Inbox InboxStream
|
||||
Outbox OutboxStream
|
||||
Followers FollowersCollection
|
||||
Following FollowingCollection
|
||||
}
|
|
@ -3,7 +3,7 @@ package activitypub
|
|||
import (
|
||||
"time"
|
||||
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
)
|
||||
|
||||
// CreateActivity is the type for a create activity message
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
)
|
||||
|
||||
func TestCreateActivityNew(t *testing.T) {
|
||||
|
|
|
@ -2,7 +2,7 @@ package activitypub
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
)
|
||||
|
||||
type (
|
||||
|
|
|
@ -2,7 +2,7 @@ package activitypub
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
)
|
||||
|
||||
type (
|
||||
|
|
|
@ -3,7 +3,7 @@ package activitypub
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
)
|
||||
|
||||
type (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package activitypub
|
||||
|
||||
import (
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package activitypub
|
||||
|
||||
import (
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package activitypub
|
||||
|
||||
import (
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package activitypub
|
||||
|
||||
import as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
import as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
|
||||
type (
|
||||
// LikedCollection is a list of every object from all of the actor's Like activities,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package activitypub
|
||||
|
||||
import (
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package activitypub
|
||||
|
||||
import as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
import as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
|
||||
type (
|
||||
// LikesCollection is a list of all Like activities with this object as the object property,
|
||||
|
|
|
@ -2,7 +2,7 @@ package activitypub
|
|||
|
||||
import (
|
||||
"github.com/buger/jsonparser"
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
)
|
||||
|
||||
// Source is intended to convey some sort of source from which the content markup was derived,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package activitypub
|
||||
|
||||
import as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
import as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
|
||||
type (
|
||||
// OutboxStream contains activities the user has published,
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
)
|
||||
|
||||
func TestOutboxNew(t *testing.T) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package activitypub
|
||||
|
||||
import as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
import as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
|
||||
type (
|
||||
// SharesCollection is a list of all Announce activities with this object as the object property,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package activitypub
|
||||
|
||||
import (
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package activitypub
|
||||
|
||||
import (
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"net/http"
|
||||
"net/url"
|
||||
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
)
|
||||
|
||||
type signFn func(*http.Request) error
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
as "github.com/mariusor/activitypub.go/activitystreams"
|
||||
as "github.com/go-ap/activitypub.go/activitystreams"
|
||||
)
|
||||
|
||||
func TestNewClient(t *testing.T) {
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,3 +1,3 @@
|
|||
module github.com/mariusor/activitypub.go
|
||||
module github.com/go-ap/activitypub.go
|
||||
|
||||
require github.com/buger/jsonparser v0.0.0-20181023193515-52c6e1462ebd
|
||||
|
|
|
@ -3,8 +3,8 @@ package tests
|
|||
import (
|
||||
"testing"
|
||||
|
||||
a "github.com/mariusor/activitypub.go/activitystreams"
|
||||
j "github.com/mariusor/activitypub.go/jsonld"
|
||||
a "github.com/go-ap/activitypub.go/activitystreams"
|
||||
j "github.com/go-ap/activitypub.go/jsonld"
|
||||
|
||||
"strings"
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@ package tests
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
a "github.com/mariusor/activitypub.go/activitystreams"
|
||||
a "github.com/go-ap/activitypub.go/activitystreams"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ import (
|
|||
"time"
|
||||
"unsafe"
|
||||
|
||||
ap "github.com/mariusor/activitypub.go/activitypub"
|
||||
a "github.com/mariusor/activitypub.go/activitystreams"
|
||||
j "github.com/mariusor/activitypub.go/jsonld"
|
||||
ap "github.com/go-ap/activitypub.go/activitypub"
|
||||
a "github.com/go-ap/activitypub.go/activitystreams"
|
||||
j "github.com/go-ap/activitypub.go/jsonld"
|
||||
)
|
||||
|
||||
const dir = "./mocks"
|
||||
|
@ -437,18 +437,18 @@ var allTests = tests{
|
|||
result: &a.Object{
|
||||
Type: a.ObjectType,
|
||||
ID: a.ObjectID("http://www.test.example/object/1"),
|
||||
To: a.ItemCollection{
|
||||
To: a.ItemCollection{
|
||||
a.IRI("https://www.w3.org/ns/activitystreams#Public"),
|
||||
},
|
||||
Bto: a.ItemCollection{
|
||||
Bto: a.ItemCollection{
|
||||
a.IRI("http://example.com/sharedInbox"),
|
||||
},
|
||||
CC: a.ItemCollection{
|
||||
CC: a.ItemCollection{
|
||||
a.IRI("https://example.com/actors/ana"),
|
||||
a.IRI("https://example.com/actors/bob"),
|
||||
},
|
||||
BCC: a.ItemCollection{
|
||||
a.IRI( "https://darkside.cookie/actors/darthvader"),
|
||||
BCC: a.ItemCollection{
|
||||
a.IRI("https://darkside.cookie/actors/darthvader"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Reference in a new issue