Skip to content

Commit c7bbac6

Browse files
committed
Update READMEs and CHANGELOG for v1.0.0
1 parent c2285ce commit c7bbac6

File tree

5 files changed

+109
-43
lines changed

5 files changed

+109
-43
lines changed

CHANGELOG

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
1-
master 2019-02-24
1+
v1.0.0 2020-07-09
2+
3+
* Rename Callbacks to FederatingCallbacks in FederatingProtocol.
4+
* Rename Callbacks to SocialCallbacks in SocialProtocol.
5+
* Rename NewID to NewID on the Database interface.
6+
* Added approx. 200 unit tests at ~70% LOC coverage.
7+
* More fixes where nil pointers would be dereferenced.
8+
* Modified programmatic delivery to be lenient instead of strict.
9+
* Even more 'astool' bugfixes to handle multiple vocabulary code generation.
10+
* Added request lifecycle hooks to allow implementations greater control when
11+
using the 'context' standard library package and its 'Context'.
12+
* Fixed bugs in programmatic delivery, handling rare forms of HTTP successes,
13+
handling of JSON-LD's @context, race conditions.
14+
* Provide a Mastodon-compliant http-signatures Transport implementation, when
15+
using the github.com/go-fed/httpsig library.
16+
* Support programmatic sending of Activities
17+
* Added support for 3 vocabularies in addition to ActivityStreams: toot
18+
(Mastodon), security v1, and ForgeFed.
19+
* Modify 'astool' to address quirky logic and underspecification in various
20+
vocabulary definitions.
21+
* Fixed bugs in the 'astool' logic.
22+
* Added more helpful functions to the code generated by 'astool'.
23+
* Inbox forwarding bug fixes.
24+
* Migrate to go modules.
25+
26+
2019-02-24
227

328
* Removed 'tools'.
429
* Removed 'vocab'.

README.md

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,51 @@ ActivityStreams vocabulary.
1010
* `pub`: ActivityPub Social Protocol (Client-to-Server or C2S) and Federating
1111
Protocol (Server-to-Server or S2S)
1212

13+
Check out [go-fed.org](https://go-fed.org/) for tutorials and documentation.
14+
1315
## Status
1416

15-
**Preview (unstable) 1.0.0** ([Semantic Versioning](https://semver.org/))
17+
**1.0.0** ([Semantic Versioning](https://semver.org/))
18+
19+
This library has been successfully used to
20+
[federate since May 17, 2019](https://cjslep.com/c/blog/this-blog-is-federated).
1621

1722
An [official implementation report](https://activitypub.rocks/implementation-report/)
1823
was last submitted for version **0.2.0** [here](https://github.com/w3c/activitypub/issues/318).
19-
24+
Unfortunately, the official implementation report tool is no longer maintained.
2025
Previous unofficial implementation reports are available in [issue #46](https://github.com/go-fed/activity/issues/46).
2126

2227
Please see CHANGELOG for changes between versions.
2328

2429
## Getting Started
2530

26-
See `astool`, `streams`, or `pub` for their own README.
31+
Check out [go-fed.org](https://go-fed.org/) for tutorials and documentation.
2732

28-
## How can I get help, file issues, or contribute?
33+
Also, see `astool`, `streams`, or `pub` for their own README.
2934

30-
Please see the CONTRIBUTING.md file!
35+
## FAQ
3136

32-
## How well tested are these libraries?
37+
### What vocabularies are supported?
38+
39+
* [ActivityStreams](https://www.w3.org/TR/activitystreams-vocabulary).
40+
* A subset of the [toot](https://github.com/tootsuite/mastodon/blob/master/app/lib/activitypub/adapter.rb) vocabulary.
41+
* A subset of the [security](https://w3c-ccg.github.io/security-vocab/) vocabulary.
42+
* [ForgeFed](https://forgefed.peers.community/vocabulary.html).
43+
44+
### How well tested are these libraries?
3345

3446
I took great care to add numerous tests using examples directly from
3547
specifications, official test repositories, and my own end-to-end tests.
3648

37-
**v1.0.0** still has a lot of unit tests to be written. Bug fixes and small
38-
backwards-incompatible behavior is expected before it is blessed as being
39-
released.
49+
**v1.0.0** has around 200 unit tests. The **federation** or **S2S** portion of
50+
the library is very well tested. The **social** or **C2S** portion could use
51+
additional unit tests, but is far less popular than federation. About 70% of the
52+
lines are covered by unit tests.
53+
54+
### Who is using this library currently?
4055

41-
## Who is using this library currently?
56+
Note: This list only includes those who have reached out to me to explicitly be
57+
included.
4258

4359
| Application | Description | Repository | Point Of Contact | Homepage |
4460
|:-----------:|:-------------------------------------------------:|:--------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------:|:------------------------------------:|
@@ -47,15 +63,17 @@ released.
4763
| Read.as | Long-form reader built on open protocols | [https://github.com/writeas/Read.as](https://github.com/writeas/Read.as) | [@write_as@writing.exchange](https://writing.exchange/@write_as) or [hello@write.as](mailto:hello@write.as) | [https://read.as](https://read.as) |
4864
| go-fed/apcore | Generic ActivityPub server framework in Go | [https://github.com/go-fed/apcore](https://github.com/go-fed/apcore) | [@cj@mastodon.technology](https://mastodon.technology/@cj) or [cjslep@gmail.com](mailto:cjslep@gmail.com) | [https://go-fed.org](https://go-fed.org) |
4965

50-
## How do I use these libraries?
66+
### How do I use these libraries?
67+
68+
Check out [go-fed.org](https://go-fed.org/) for tutorials and documentation.
5169

5270
Please see each subdirectory for its own README for further elaboration.
5371

54-
## FAQ
72+
### How can I get help, file issues, or contribute?
5573

5674
Please see the CONTRIBUTING.md file!
5775

58-
## Useful References
76+
### Useful References
5977

6078
* [ActivityPub Specification](https://www.w3.org/TR/activitypub)
6179
* [ActivityPub GitHub Repo](https://github.com/w3c/activitypub)

astool/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ tool is `activitystreams.jsonld` which contains the OWL2 definition of the
5252
ActivityStreams specification. To generate the code, in your `$GOPATH` do:
5353

5454
```
55-
mkdir tmp
56-
cd tmp
57-
astool -spec activitystreams.jsonld
55+
cd $GOPATH/github.com/go-fed/activity/astool
56+
go generate
5857
```
5958

6059
This will automatically generate a number of files containing the functions,

pub/README.md

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,68 @@
22

33
Implements the Social and Federating Protocols in the ActivityPub specification.
44

5-
## Preview Release
5+
## Reference & Tutorial
66

7-
v1.0.0 still has a lot of unit tests that need to be written. Please run
8-
`go test -v` to see the latest state of unit testing.
7+
The [go-fed website](https://go-fed.org/) contains tutorials and reference
8+
materials, in addition to the rest of this README.
99

1010
## How To Use
1111

1212
```
1313
go get github.com/go-fed/activity
1414
```
1515

16-
The root of all ActivityPub behavior is the `Actor`:
16+
The root of all ActivityPub behavior is the `Actor`, which requires you to
17+
implement a few interfaces:
1718

1819
```golang
19-
// Only support Social protocol
20+
import (
21+
"github.com/go-fed/activity/pub"
22+
)
23+
24+
type myActivityPubApp struct { /* ... */ }
25+
type myAppsDatabase struct { /* ... */ }
26+
type myAppsClock struct { /* ... */ }
27+
28+
var (
29+
// Your app will implement pub.CommonBehavior, and either
30+
// pub.SocialProtocol, pub.FederatingProtocol, or both.
31+
myApp = &myActivityPubApp{}
32+
myCommonBehavior pub.CommonBehavior = myApp
33+
mySocialProtocol pub.SocialProtocol = myApp
34+
myFederatingProtocol pub.FederatingProtocol = myApp
35+
// Your app's database implementation.
36+
myDatabase pub.Database = &myAppsDatabase{}
37+
// Your app's clock.
38+
myClock pub.Clock = &myAppsClock{}
39+
)
40+
41+
// Only support the C2S Social protocol
2042
actor := pub.NewSocialActor(
21-
myAppsCommonBehavior,
22-
myAppsSocialProtocol,
23-
myAppsDatabase,
24-
myAppsClock)
43+
myCommonBehavior,
44+
mySocialProtocol,
45+
myDatabase,
46+
myClock)
2547
// OR
2648
//
27-
// Only support Federating protocol
49+
// Only support S2S Federating protocol
2850
actor = pub.NewFederatingActor(
29-
myAppsCommonBehavior,
30-
myAppsFederatingProtocol,
31-
myAppsDatabase,
32-
myAppsClock)
51+
myCommonBehavior,
52+
myFederatingProtocol,
53+
myDatabase,
54+
myClock)
3355
// OR
3456
//
35-
// Support both Social and Federating protocol.
57+
// Support both C2S Social and S2S Federating protocol.
3658
actor = pub.NewActor(
37-
myAppsCommonBehavior,
38-
myAppsSocialProtocol,
39-
myAppsFederatingProtocol,
40-
myAppsDatabase,
41-
myAppsClock)
59+
myCommonBehavior,
60+
mySocialProtocol,
61+
myFederatingProtocol,
62+
myDatabase,
63+
myClock)
4264
```
4365

44-
Next, hook the `Actor` into the HTTP server:
66+
Next, hook the `Actor` into your web server:
4567

4668
```golang
4769
// The application's actor
@@ -93,10 +115,7 @@ server.Handler = serveMux
93115
To serve ActivityStreams data:
94116

95117
```golang
96-
myHander := pub.NewActivityStreamsHandler(
97-
myAppsAuthenticateFunc,
98-
myAppsDatabase,
99-
myAppsClock)
118+
myHander := pub.NewActivityStreamsHandler(myDatabase, myClock)
100119
var activityStreamsHandler http.HandlerFunc = func(w http.ResponseWriter, r *http.Request) {
101120
c := context.Background()
102121
// Populate c with request-specific information
@@ -239,7 +258,7 @@ interface can be used to obtain an `Actor`:
239258
```golang
240259
// Use custom ActivityPub implementation
241260
actor = pub.NewCustomActor(
242-
myAppsDelegateActor,
261+
myDelegateActor,
243262
isSocialProtocolEnabled,
244263
isFederatedProtocolEnabled,
245264
myAppsClock)

streams/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
ActivityStreams vocabularies automatically code-generated with `astool`.
44

5+
## Reference & Tutorial
6+
7+
The [go-fed website](https://go-fed.org/) contains tutorials and reference
8+
materials, in addition to the rest of this README.
9+
510
## How To Use
611

712
```

0 commit comments

Comments
 (0)