gen_doc.go (3137B)
1 // Code generated by astool. DO NOT EDIT. 2 3 // Package streams contains constructors and functions necessary for applications 4 // to serialize, deserialize, and use ActivityStreams types in Go. This 5 // package is code-generated and subject to the same license as the go-fed 6 // tool used to generate it. 7 // 8 // This package is useful to three classes of developers: end-user-application 9 // developers, specification writers creating an ActivityStream Extension, and 10 // ActivityPub implementors wanting to create an alternate ActivityStreams 11 // implementation that still satisfies the interfaces generated by the go-fed 12 // tool. 13 // 14 // Application developers should limit their use to the Resolver type, the 15 // constructors beginning with "New", the "Extends" functions, the 16 // "DisjointWith" functions, the "ExtendedBy" functions, and any interfaces 17 // returned in those functions in this package. This lets applications use 18 // Resolvers to Deserialize or Dispatch specific types. The types themselves 19 // can Serialize as needed. The "Extends", "DisjointWith", and "ExtendedBy" 20 // functions help navigate the ActivityStreams hierarchy since it is not 21 // equivalent to object-oriented inheritance. 22 // 23 // When creating an ActivityStreams extension, developers will want to ensure 24 // that the generated code builds correctly and check that the properties, 25 // types, extensions, and disjointedness is set up correctly. Writing unit 26 // tests with concrete types is then the next step. If the tool has an error 27 // generating this code, a fix is needed in the tool as it is likely there is 28 // a new RDF type being used in the extension that the tool does not know how 29 // to resolve. Thus, most development will focus on the go-fed tool itself. 30 // 31 // Finally, ActivityStreams implementors that want drop-in replacement while 32 // still using the generated interfaces are highly encouraged to examine the 33 // Manager type in this package (in addition to the constructors) as these are 34 // the locations where concrete types are instantiated. When supplying a 35 // different type in these two locations, the other generated code will 36 // propagate it throughout the rest of an application. The Manager is 37 // instantiated as a singleton at init time in this library. It is then 38 // injected into each implementation library so they can deserialize their 39 // needed types without relying on the underlying concrete type. 40 // 41 // Subdirectories of this package include implementation files and functions 42 // that are not intended to be directly linked to applications, but are used 43 // by this particular package. It is strongly recommended to only use the 44 // property interfaces and type interfaces in subdirectories and limiting 45 // concrete types to those in this package. The go-fed tool is likely to 46 // contain a pruning feature in the future which will analyze an application 47 // and eliminate code that would be dead if it were to be generated which 48 // reduces the compilation time, compilation resources, and binary size of an 49 // application. Such a feature will not be compatible with applications that 50 // use the concrete implementation types. 51 package streams