Changes
25 changed files (+51/-38)
-
-
@@ -1,17 +1,17 @@# Activity Pub for Go [](https://raw.githubusercontent.com/mariusor/activitypub.go/master/LICENSE) [](https://travis-ci.org/mariusor/activitypub.go) [](https://codecov.io/gh/mariusor/activitypub.go) [](https://www.codacy.com/app/mariusor/activitypub.go/dashboard) <!-- [](https://goreportcard.com/report/github.com/mariusor/activitypub.go) --> [](https://raw.githubusercontent.com/go-ap/activitypub.go/master/LICENSE) [](https://travis-ci.org/go-ap/activitypub.go) [](https://codecov.io/gh/go-ap/activitypub.go) [](https://www.codacy.com/app/go-ap/activitypub.go/dashboard) <!-- [](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" ```
-
-
activitypub/actor.go (new)
-
@@ -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 activitypubimport ( "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 activitypubimport ( "fmt" as "github.com/mariusor/activitypub.go/activitystreams" as "github.com/go-ap/activitypub.go/activitystreams" ) type (
-
-
-
@@ -2,7 +2,7 @@ package activitypubimport ( "fmt" as "github.com/mariusor/activitypub.go/activitystreams" as "github.com/go-ap/activitypub.go/activitystreams" ) type (
-
-
-
@@ -3,7 +3,7 @@ package activitypubimport ( "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 activitypubimport ( "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) {
-
-
-
@@ -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 testsimport ( "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 testsimport ( "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"), }, }, },
-