コミットグラフ

41 コミット

作成者 SHA1 メッセージ 日付
Cory Slep 31482f867e Add constructors for the streams package. 2018-11-17 16:59:49 +01:00
Cory Slep 8795587007 Experimental: Add RDF package for JSONLD context definitions.
This package will be the frontend for reading the JSONLD context
descriptions that specify ActivityStreams vocabularies. This will allow
ingesting publicly hosted or manually-created vocabularies and
generating an internal representation for later code generation.
2018-11-17 16:33:42 +01:00
Cory Slep 137c1d51fb Remove unnecessary whitespace 2018-11-17 16:33:21 +01:00
Cory Slep 7f8b7a6723 experimental: Add disjoint type function
Also fix a bug where the Name() method was being called on a string.
2018-11-04 19:20:42 +01:00
Cory Slep 2ebd905f76 experimental: More type improvements.
- Fixed extendedBy generated method behaving like extends
- Add the extends generated method
- Extends / extendedBy examine the parent / children as well
- Properties and types cache their generated structs, only creating the
  codegen types once
- Create convenience constructor methods
2018-11-04 19:05:56 +01:00
Cory Slep d08cc46275 experimental: Add ActivityPub types.
This begins adding types as standalone compositions of properties, along
with helper functions to manage the hierarchy better than the current v0
implementation.

I think it will still need to be focused on flexibility at compile time
over runtime; but this will still allow extensions to be generated
easily from existing code.

This is a natural extension of the v0 philosophy: many folks still
cannot understand the similarity that to deploy new meaningful behaviors
with interpreted javascript/python/etc then code still needs to be
written and deployed, just as this go code will need to be regenerated,
written against, and deployed.

Code generation plus type system means a lot of the heavy lifting and
potential errors are already thought through for an ActivityPub
developer.
2018-11-03 16:56:09 +01:00
Cory Slep e834879207 Experimental: restructure directories 2018-10-19 22:44:13 +02:00
Cory Slep c4425ee50e experimental: Keep single-type special-case API
After deliberating on the APIs for properties that can have a single
type vs multiple types, I've decided to keep the distinctly separate
APIs for the single-type properties. This means humans reading the APIs
will use simpler and more reasonable getters/setters, etc. However, by
default the two kinds of properties will not be able to satisfy the same
interface.

If this is needed, in the future we can auto-generate thin-wrapper types
around single-type properties that cause them to have a shared API with
the multi-type properties. But that won't be tackled for now, as its
expected use case is small.
2018-10-16 22:08:10 +02:00
Cory Slep 4f628f1b7e Support natual language maps for properties. 2018-10-16 22:00:18 +02:00
Cory Slep c91db1e4ae Support unknown property types when serializing and deserializing 2018-10-11 12:15:55 +02:00
Cory Slep 3a9b9812b5 Fix spacing in generated comment 2018-10-11 11:38:46 +02:00
Cory Slep 4a35079fd0 Add comments, clean up code 2018-10-10 00:32:37 +02:00
Cory Slep eb09223588 Make code generation more robust 2018-10-08 22:19:10 +02:00
Cory Slep c8431878da Now that core fundamentals are working, begin refactoring 2018-09-25 23:21:07 +02:00
Cory Slep 1426f30be1 Add comments to nonfunctional properties. 2018-09-20 19:24:20 +02:00
Cory Slep d0c1e6a3e3 Add comments to functional properties.
Also, clean up the spacing for generated code so it is pleasing to look at.
2018-09-18 23:00:08 +02:00
Cory Slep 87032d3af9 Add serialization/deserialization generated code. 2018-09-16 00:02:11 +02:00
Cory Slep c3ec4d5344 More exprimentation with property-oriented code generation 2018-09-12 22:45:59 +02:00
Cory Slep 1a1c50acfb Experimental directory for v1 code generation. 2018-09-04 23:44:16 +02:00
Cory Slep a7d2d52351 Add multiply-typed unknown property methods to vocab interfaces. 2018-08-21 22:26:13 +02:00
Cory Slep befab36c29 Add the missing 'shares' property to vocab.Object 2018-08-21 18:59:18 +02:00
Cory Slep 1c057922ca Fix intransitive activity generated code in vocab.
The sub-types of Intransitive Activity (Arrive, etc) would not satisfy
the vocab.IntransitiveActivityType interface, due to not accounting for
the parent WithoutProperties definition.

This fixes that code generation, so that all Activity subtypes will be
able to be properly converted to vocab.ActivityType or
vocab.IntransitiveActivityType.

Updated the PostOutbox code path to properly handle this distinction
when receiving a C2S IntransitiveActivity.
2018-08-20 23:08:02 +02:00
Cory Slep d0812c9471 Support unknown (extended) properties in vocab 2018-08-19 23:37:02 +02:00
Cory Slep 377455aa70 Add IsPublic to streams types 2018-08-04 15:30:31 +02:00
Cory Slep c655c635ff Add IsPublic to vocab.Object types & subtypes.
The IsPublic method will return 'true' if the special public collection
defined in the ActivityPub spec is addressed in the 'to', 'bto' 'cc', or
'bcc' properties of the Object or any of the types extending from them.
2018-08-04 15:20:34 +02:00
Cory Slep af5ed41bad Remove duplicate intermediate types.
This condenses the N types and M properties from N*M intermediate type
definitions to just M intermediate type definitions. These intermediate
types are no longer generated in the gen_<TYPE>.go files, but are all
within the separate gen_intermediate.go file.

This will hopefully reduce resource consumption during compilation of
the vocab package.
2018-06-17 18:51:30 +02:00
Cory Slep b1609bd71a Generate streams package to multiple files 2018-06-13 22:01:53 +02:00
Cory Slep f155f0a3d0 Generate vocab package to multiple files. 2018-06-13 21:53:01 +02:00
Cory Slep fb16747c4e Migrate Typer and type-detection functions to vocab
This helps ensure that the code to detect specific ActivityStream types
continues to live in the code-generation algorithms, reducing
maintenance burdens.
2018-06-12 23:29:30 +02:00
Cory Slep e910e86bd6 Update all the READMEs 2018-05-30 23:48:34 +02:00
Cory Slep 00423c0cdf Tools now pass go vet 2018-05-30 21:40:20 +02:00
Cory Slep ba40dc50b4 Use *url.URL instead of url.URL.
He who fights with monsters should be careful lest he thereby become a monster.
And if thou gaze long into an abyss, the abyss will also gaze into thee.
2018-05-29 21:57:39 +02:00
Cory Slep bed3dbef16 Change vocab Add methods to Append and Prepend
This allows the reverse chronological order to be set as items are
easily prepended to non-functional activity stream properties.
2018-05-27 17:07:40 +02:00
Cory Slep bcaa3a9059 Fix handling of null JSON literals in vocab
We now recognize an all-empty intermediate value to mean that the
unknown value is really a null one.
2018-04-28 16:22:17 +02:00
Cory Slep f19599cb2c Update actor properties to include collections. 2018-04-09 23:03:55 +02:00
Cory Slep 56e7e842d3 Add AnyObject/Link/Activity callbacks to Deserialize 2018-04-01 16:52:54 +02:00
Cory Slep 07a04262d9 Support likes, liked, blocking, auto-accept/reject follows. 2018-02-20 00:09:29 +01:00
Cory Slep fe707109c4 Make substantial progress on ActivityPub client & server implmentation 2018-02-04 17:42:22 +01:00
Cory Slep 9300d8583e Migrate pub to go-fed. 2018-01-26 00:19:21 +01:00
Cory Slep dbea5a923c Migrate streams library to go-fed. 2018-01-24 00:31:50 +01:00
Cory Slep 5257e5cb31 Migrate vocabulary library to go-fed. 2018-01-24 00:13:06 +01:00