Commit graph

180 commits

Author SHA1 Message Date
Marius Orcsik
ab11b36979
Improvement towards ensuring we implement a type of unmarshaller before trying it 2018-08-05 16:27:39 +02:00
Marius Orcsik
295a299ccc
Revert from using unmarshalToAPObject in loading collection items 2018-08-05 16:20:26 +02:00
Marius Orcsik
716081ff13
Added generator to object unmarshal 2018-08-05 15:25:54 +02:00
Marius Orcsik
fb363aa377
Improve collection unmarshalling 2018-08-05 13:54:01 +02:00
Marius Orcsik
e5bc4e644c
Improve getAPObjectByType to return ObjectOrLink 2018-08-05 13:53:29 +02:00
Marius Orcsik
a3a8044267
Make all activities implement ObjectOrLink 2018-08-05 13:52:40 +02:00
Marius Orcsik
7643c4abdc
Make the hack for marshaling with context even uglier
Test if marshalled object is a payloadWithContext and only replace in
output if it is.
2018-08-04 13:20:24 +02:00
Marius Orcsik
f40d875d04
Going deeper and deeper down the jsonld rabbit hole.
The current approach doesn't look too good
2018-08-01 10:52:11 +02:00
Marius Orcsik
5a2c4b51dd
Making some tag related functionality exportable
Replacing global package var Context with WithContext().Marshal()
2018-07-31 23:24:33 +02:00
Marius Orcsik
43573f7d36
Exporting tag related functionality 2018-07-26 10:44:28 +02:00
Marius Orcsik
55205ca1d7
Fix coverage generation 2018-07-25 13:07:50 +02:00
Marius Orcsik
0eedce953c
Fix error regarding output specifier 2018-07-25 12:52:07 +02:00
Marius Orcsik
9317dd12c7
Force install of jsonparser before activitypub tests 2018-07-25 12:35:41 +02:00
Marius Orcsik
b4baafa9f3
Fix Outbox test 2018-07-25 12:34:36 +02:00
Marius Orcsik
c81b23876a
Use CollectionInterface as types for Actor collections 2018-07-25 12:13:55 +02:00
Marius Orcsik
51f73c2cba
Fix failing test regarding ObjectID 2018-07-25 11:57:49 +02:00
Marius Orcsik
a5dd932a24
Add go modules support 2018-07-25 11:56:05 +02:00
Marius Orcsik
8038688be4
Making []Item and URI/IRI structs conform to ObjectOrLink 2018-07-25 11:54:12 +02:00
Marius Orcsik
6285a8fc39
Add convenience method for returning the first element in NaturalLanguageValue map 2018-07-25 11:47:41 +02:00
Marius Orcsik
7a2ce46e04
Refactored GetID to allow it to return nil 2018-07-25 11:47:03 +02:00
Marius Orcsik
4dc584b0d4
Added UnmarshalJSON methods for some types
Add some tests
2018-07-24 23:11:08 +02:00
Marius Orcsik
57dab0cb45
More implementations for IsLink and GetType 2018-07-20 18:28:26 +02:00
Marius Orcsik
fb7c74da76
Making Collections obey ObjectOrLink interface too 2018-07-20 18:18:13 +02:00
Marius Orcsik
2183a1accc
Adding IsObject and GetID to Like and Dislike 2018-07-20 18:16:51 +02:00
Marius Orcsik
1100bd7ddc
Adding IsObject to collections 2018-07-18 21:34:08 +02:00
Marius Orcsik
e630cf771c
Move implementations for IsLink 2018-07-18 21:23:23 +02:00
Marius Orcsik
fa5b0e2012
Corrected some wrong doc comments 2018-07-18 18:18:19 +02:00
Marius Orcsik
9469b0ea40
Link.Rel can be ommited if empty 2018-07-18 17:33:58 +02:00
Marius Orcsik
a28dffdde4
Removed reference to activitypub package in test 2018-07-18 17:21:24 +02:00
Marius Orcsik
72c2d5c331
Use package aliases for jsonld and activitypub in tests 2018-07-18 16:33:40 +02:00
Marius Orcsik
23b0a13e95
Add local LangRef string type alias 2018-07-18 16:31:00 +02:00
Marius Orcsik
6b75ad6d68
Fix quotes being kept for string type aliases in UnmarshalJSON methods 2018-07-18 16:29:47 +02:00
Marius Orcsik
12f481a243
Adding mediaType to Object 2018-07-18 16:27:53 +02:00
Marius Orcsik
44bcbcfb3a
Adding/cleaning up some more function comments 2018-07-16 16:38:15 +02:00
Marius Orcsik
9a140c8036
Add tests for methods of various Collection objects 2018-07-16 15:48:37 +02:00
Marius Orcsik
8758b44a70
Adding tests for URI/IRI methods 2018-07-16 15:48:02 +02:00
Marius Orcsik
8308c6fb22
Converted the jsonld context to be an empty interface
This allows us to support passing it just as a string or URI
2018-07-16 13:26:26 +02:00
Marius Orcsik
327128b67f
Added initializer function for liked
Made Liked objects conform to ObjectOrLink, and Collection interfaces
2018-07-13 10:17:50 +02:00
Marius Orcsik
66767f675a
Made URI and IRI conform to the LinkOrUri interface
Added a convenience String method
2018-07-13 10:17:03 +02:00
Marius Orcsik
551072e561
Added initializer function for outbox
Made Outbox/Inbox objects conform to ObjectOrLink interface
2018-07-13 10:16:06 +02:00
Marius Orcsik
08d5f269c2
Added GetLink method to LinkOrUri interface
Made ObjectOrLink interface extend ActivityObject
2018-07-13 10:15:14 +02:00
Marius Orcsik
a60599cd02
Add outbox and liked initializations to person
Made Person conform to the LinkOrUri interface
2018-07-13 10:13:31 +02:00
Marius Orcsik
5d39ddce9a
Output the @context key when marshalling 2018-07-09 11:15:19 +02:00
Marius Orcsik
03a378280c
Updating types that can satisfy the Collection interface 2018-07-07 21:27:34 +02:00
Marius Orcsik
8bd5130d0f
Move the context to a package variable 2018-07-06 22:33:47 +02:00
Marius Orcsik
978985644e
Refactored how the repo looks 2018-07-06 12:48:04 +02:00
Marius Orcsik
133344f2a9
Adding start for json parser based unmarshall 2018-06-15 23:03:55 +02:00
Marius Orcsik
7f8193dff8
Refactored objects to include full AP structure 2018-06-09 14:05:46 +02:00
Marius Orcsik
55e0d31a75
Broken tests 2018-06-09 13:08:30 +02:00
Marius Orcsik
68c4bc41df
Renamed Object to BaseObject 2018-06-09 13:06:55 +02:00