mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-25 13:16:40 +00:00
Manually approves followers (#146)
* update go-fed * update go-fed * manuallyapprovesfollowers * serialize manuallyApprovesFollowers
This commit is contained in:
parent
4920229a3b
commit
071eca20ce
2
go.mod
2
go.mod
|
@ -19,7 +19,7 @@ require (
|
|||
github.com/gin-contrib/sessions v0.0.3
|
||||
github.com/gin-gonic/gin v1.7.2-0.20210722225815-d4ca9a0fb121
|
||||
github.com/go-errors/errors v1.4.0 // indirect
|
||||
github.com/go-fed/activity v1.0.1-0.20210426194615-e0de0863dcc1
|
||||
github.com/go-fed/activity v1.0.1-0.20210803212804-d866ba75dd0f
|
||||
github.com/go-fed/httpsig v1.1.0
|
||||
github.com/go-pg/pg/extra/pgdebug v0.2.0
|
||||
github.com/go-pg/pg/v10 v10.10.3
|
||||
|
|
4
go.sum
4
go.sum
|
@ -123,8 +123,8 @@ github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWE
|
|||
github.com/go-errors/errors v1.1.1/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
|
||||
github.com/go-errors/errors v1.4.0 h1:2OA7MFw38+e9na72T1xgkomPb6GzZzzxvJ5U630FoRM=
|
||||
github.com/go-errors/errors v1.4.0/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||
github.com/go-fed/activity v1.0.1-0.20210426194615-e0de0863dcc1 h1:go9MogQW0eTLwdOs/ZfNCGpwUkVcr7IMUbI3u8wYQxw=
|
||||
github.com/go-fed/activity v1.0.1-0.20210426194615-e0de0863dcc1/go.mod h1:v4QoPaAzjWZ8zN2VFVGL5ep9C02mst0hQYHUpQwso4Q=
|
||||
github.com/go-fed/activity v1.0.1-0.20210803212804-d866ba75dd0f h1:etNMc6V75EEoPVbFxXjMb7r6bmIoodXN4McXuPuljLY=
|
||||
github.com/go-fed/activity v1.0.1-0.20210803212804-d866ba75dd0f/go.mod h1:v4QoPaAzjWZ8zN2VFVGL5ep9C02mst0hQYHUpQwso4Q=
|
||||
github.com/go-fed/httpsig v0.1.1-0.20190914113940-c2de3672e5b5/go.mod h1:T56HUNYZUQ1AGUzhAYPugZfp36sKApVnGBgKlIY+aIE=
|
||||
github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI=
|
||||
github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=
|
||||
|
|
|
@ -39,6 +39,7 @@ type Accountable interface {
|
|||
WithFollowing
|
||||
WithFollowers
|
||||
WithFeatured
|
||||
WithManuallyApprovesFollowers
|
||||
}
|
||||
|
||||
// Statusable represents the minimum activitypub interface for representing a 'status'.
|
||||
|
@ -319,3 +320,8 @@ type WithPartOf interface {
|
|||
type WithItems interface {
|
||||
GetActivityStreamsItems() vocab.ActivityStreamsItemsProperty
|
||||
}
|
||||
|
||||
// WithManuallyApprovesFollowers represents a Person or profile with the ManuallyApprovesFollowers property.
|
||||
type WithManuallyApprovesFollowers interface {
|
||||
GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ type Account struct {
|
|||
*/
|
||||
|
||||
// Does this account need an approval for new followers?
|
||||
Locked bool `pg:",default:true"`
|
||||
Locked bool `pg:",default:true,use_zero"`
|
||||
// Should this account be shown in the instance's profile directory?
|
||||
Discoverable bool `pg:",default:false"`
|
||||
// Default post privacy for this account
|
||||
|
|
|
@ -105,7 +105,12 @@ func (c *converter) ASRepresentationToAccount(accountable ap.Accountable, update
|
|||
}
|
||||
acct.ActorType = accountable.GetTypeName()
|
||||
|
||||
// TODO: locked aka manuallyApprovesFollowers
|
||||
// locked aka manuallyApprovesFollowers
|
||||
acct.Locked = true // assume locked by default
|
||||
maf := accountable.GetActivityStreamsManuallyApprovesFollowers()
|
||||
if maf != nil && maf.IsXMLSchemaBoolean() {
|
||||
acct.Locked = maf.Get()
|
||||
}
|
||||
|
||||
// discoverable
|
||||
// default to false -- take custom value if it's set though
|
||||
|
|
|
@ -346,14 +346,26 @@ func (suite *ASToInternalTestSuite) SetupTest() {
|
|||
}
|
||||
|
||||
func (suite *ASToInternalTestSuite) TestParsePerson() {
|
||||
|
||||
testPerson := suite.people["new_person_1"]
|
||||
|
||||
acct, err := suite.typeconverter.ASRepresentationToAccount(testPerson, false)
|
||||
assert.NoError(suite.T(), err)
|
||||
|
||||
fmt.Printf("%+v", acct)
|
||||
// TODO: write assertions here, rn we're just eyeballing the output
|
||||
suite.Equal("https://unknown-instance.com/users/brand_new_person", acct.URI)
|
||||
suite.Equal("https://unknown-instance.com/users/brand_new_person/following", acct.FollowingURI)
|
||||
suite.Equal("https://unknown-instance.com/users/brand_new_person/followers", acct.FollowersURI)
|
||||
suite.Equal("https://unknown-instance.com/users/brand_new_person/inbox", acct.InboxURI)
|
||||
suite.Equal("https://unknown-instance.com/users/brand_new_person/outbox", acct.OutboxURI)
|
||||
suite.Equal("https://unknown-instance.com/users/brand_new_person/collections/featured", acct.FeaturedCollectionURI)
|
||||
suite.Equal("brand_new_person", acct.Username)
|
||||
suite.Equal("Geoff Brando New Personson", acct.DisplayName)
|
||||
suite.Equal("hey I'm a new person, your instance hasn't seen me yet uwu", acct.Note)
|
||||
suite.Equal("https://unknown-instance.com/@brand_new_person", acct.URL)
|
||||
suite.True(acct.Discoverable)
|
||||
suite.Equal("https://unknown-instance.com/users/brand_new_person#main-key", acct.PublicKeyURI)
|
||||
suite.Equal("https://unknown-instance.com/media/some_avatar_filename.jpeg", acct.AvatarRemoteURL)
|
||||
suite.Equal("https://unknown-instance.com/media/some_header_filename.jpeg", acct.HeaderRemoteURL)
|
||||
suite.False(acct.Locked)
|
||||
}
|
||||
|
||||
func (suite *ASToInternalTestSuite) TestParseGargron() {
|
||||
|
|
|
@ -143,7 +143,9 @@ func (c *converter) AccountToAS(a *gtsmodel.Account) (vocab.ActivityStreamsPerso
|
|||
|
||||
// manuallyApprovesFollowers
|
||||
// Will be shown as a locked account.
|
||||
// TODO: NOT IMPLEMENTED **YET** -- this needs to be added as an activitypub extension to https://github.com/go-fed/activity, see https://github.com/go-fed/activity/tree/master/astool
|
||||
manuallyApprovesFollowersProp := streams.NewActivityStreamsManuallyApprovesFollowersProperty()
|
||||
manuallyApprovesFollowersProp.Set(a.Locked)
|
||||
person.SetActivityStreamsManuallyApprovesFollowers(manuallyApprovesFollowersProp)
|
||||
|
||||
// discoverable
|
||||
// Will be shown in the profile directory.
|
||||
|
|
|
@ -1274,6 +1274,7 @@ func NewTestFediPeople() map[string]ap.Accountable {
|
|||
"image/jpeg",
|
||||
URLMustParse("https://unknown-instance.com/media/some_header_filename.jpeg"),
|
||||
"image/png",
|
||||
false,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
@ -1416,7 +1417,8 @@ func newPerson(
|
|||
avatarURL *url.URL,
|
||||
avatarContentType string,
|
||||
headerURL *url.URL,
|
||||
headerContentType string) ap.Accountable {
|
||||
headerContentType string,
|
||||
manuallyApprovesFollowers bool) ap.Accountable {
|
||||
person := streams.NewActivityStreamsPerson()
|
||||
|
||||
// id should be the activitypub URI of this user
|
||||
|
@ -1489,8 +1491,9 @@ func newPerson(
|
|||
person.SetActivityStreamsUrl(urlProp)
|
||||
|
||||
// manuallyApprovesFollowers
|
||||
// Will be shown as a locked account.
|
||||
// TODO: NOT IMPLEMENTED **YET** -- this needs to be added as an activitypub extension to https://github.com/go-fed/activity, see https://github.com/go-fed/activity/tree/master/astool
|
||||
manuallyApprovesFollowersProp := streams.NewActivityStreamsManuallyApprovesFollowersProperty()
|
||||
manuallyApprovesFollowersProp.Set(manuallyApprovesFollowers)
|
||||
person.SetActivityStreamsManuallyApprovesFollowers(manuallyApprovesFollowersProp)
|
||||
|
||||
// discoverable
|
||||
// Will be shown in the profile directory.
|
||||
|
@ -1575,6 +1578,7 @@ func newPerson(
|
|||
headerURLProperty.AppendIRI(headerURL)
|
||||
headerImage.SetActivityStreamsUrl(headerURLProperty)
|
||||
headerProperty.AppendActivityStreamsImage(headerImage)
|
||||
person.SetActivityStreamsImage(headerProperty)
|
||||
|
||||
return person
|
||||
}
|
||||
|
|
3
vendor/github.com/go-fed/activity/streams/gen_consts.go
generated
vendored
3
vendor/github.com/go-fed/activity/streams/gen_consts.go
generated
vendored
|
@ -362,6 +362,9 @@
|
|||
// ActivityStreamsLongitudePropertyName is the string literal of the name for the longitude property in the ActivityStreams vocabulary.
|
||||
var ActivityStreamsLongitudePropertyName string = "longitude"
|
||||
|
||||
// ActivityStreamsManuallyApprovesFollowersPropertyName is the string literal of the name for the manuallyApprovesFollowers property in the ActivityStreams vocabulary.
|
||||
var ActivityStreamsManuallyApprovesFollowersPropertyName string = "manuallyApprovesFollowers"
|
||||
|
||||
// ActivityStreamsMediaTypePropertyName is the string literal of the name for the mediaType property in the ActivityStreams vocabulary.
|
||||
var ActivityStreamsMediaTypePropertyName string = "mediaType"
|
||||
|
||||
|
|
2
vendor/github.com/go-fed/activity/streams/gen_init.go
generated
vendored
2
vendor/github.com/go-fed/activity/streams/gen_init.go
generated
vendored
|
@ -41,6 +41,7 @@
|
|||
propertylikes "github.com/go-fed/activity/streams/impl/activitystreams/property_likes"
|
||||
propertylocation "github.com/go-fed/activity/streams/impl/activitystreams/property_location"
|
||||
propertylongitude "github.com/go-fed/activity/streams/impl/activitystreams/property_longitude"
|
||||
propertymanuallyapprovesfollowers "github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers"
|
||||
propertymediatype "github.com/go-fed/activity/streams/impl/activitystreams/property_mediatype"
|
||||
propertyname "github.com/go-fed/activity/streams/impl/activitystreams/property_name"
|
||||
propertynext "github.com/go-fed/activity/streams/impl/activitystreams/property_next"
|
||||
|
@ -218,6 +219,7 @@ func init() {
|
|||
propertylikes.SetManager(mgr)
|
||||
propertylocation.SetManager(mgr)
|
||||
propertylongitude.SetManager(mgr)
|
||||
propertymanuallyapprovesfollowers.SetManager(mgr)
|
||||
propertymediatype.SetManager(mgr)
|
||||
propertyname.SetManager(mgr)
|
||||
propertynext.SetManager(mgr)
|
||||
|
|
15
vendor/github.com/go-fed/activity/streams/gen_manager.go
generated
vendored
15
vendor/github.com/go-fed/activity/streams/gen_manager.go
generated
vendored
|
@ -41,6 +41,7 @@
|
|||
propertylikes "github.com/go-fed/activity/streams/impl/activitystreams/property_likes"
|
||||
propertylocation "github.com/go-fed/activity/streams/impl/activitystreams/property_location"
|
||||
propertylongitude "github.com/go-fed/activity/streams/impl/activitystreams/property_longitude"
|
||||
propertymanuallyapprovesfollowers "github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers"
|
||||
propertymediatype "github.com/go-fed/activity/streams/impl/activitystreams/property_mediatype"
|
||||
propertyname "github.com/go-fed/activity/streams/impl/activitystreams/property_name"
|
||||
propertynext "github.com/go-fed/activity/streams/impl/activitystreams/property_next"
|
||||
|
@ -1323,6 +1324,20 @@ func (this Manager) DeserializeLongitudePropertyActivityStreams() func(map[strin
|
|||
}
|
||||
}
|
||||
|
||||
// DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the
|
||||
// deserialization method for the
|
||||
// "ActivityStreamsManuallyApprovesFollowersProperty" non-functional property
|
||||
// in the vocabulary "ActivityStreams"
|
||||
func (this Manager) DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error) {
|
||||
return func(m map[string]interface{}, aliasMap map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error) {
|
||||
i, err := propertymanuallyapprovesfollowers.DeserializeManuallyApprovesFollowersProperty(m, aliasMap)
|
||||
if i == nil {
|
||||
return nil, err
|
||||
}
|
||||
return i, err
|
||||
}
|
||||
}
|
||||
|
||||
// DeserializeMediaTypePropertyActivityStreams returns the deserialization method
|
||||
// for the "ActivityStreamsMediaTypeProperty" non-functional property in the
|
||||
// vocabulary "ActivityStreams"
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
propertylikes "github.com/go-fed/activity/streams/impl/activitystreams/property_likes"
|
||||
propertylocation "github.com/go-fed/activity/streams/impl/activitystreams/property_location"
|
||||
propertylongitude "github.com/go-fed/activity/streams/impl/activitystreams/property_longitude"
|
||||
propertymanuallyapprovesfollowers "github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers"
|
||||
propertymediatype "github.com/go-fed/activity/streams/impl/activitystreams/property_mediatype"
|
||||
propertyname "github.com/go-fed/activity/streams/impl/activitystreams/property_name"
|
||||
propertynext "github.com/go-fed/activity/streams/impl/activitystreams/property_next"
|
||||
|
@ -305,6 +306,12 @@ func NewActivityStreamsLongitudeProperty() vocab.ActivityStreamsLongitudePropert
|
|||
return propertylongitude.NewActivityStreamsLongitudeProperty()
|
||||
}
|
||||
|
||||
// NewActivityStreamsActivityStreamsManuallyApprovesFollowersProperty creates a
|
||||
// new ActivityStreamsManuallyApprovesFollowersProperty
|
||||
func NewActivityStreamsManuallyApprovesFollowersProperty() vocab.ActivityStreamsManuallyApprovesFollowersProperty {
|
||||
return propertymanuallyapprovesfollowers.NewActivityStreamsManuallyApprovesFollowersProperty()
|
||||
}
|
||||
|
||||
// NewActivityStreamsActivityStreamsMediaTypeProperty creates a new
|
||||
// ActivityStreamsMediaTypeProperty
|
||||
func NewActivityStreamsMediaTypeProperty() vocab.ActivityStreamsMediaTypeProperty {
|
||||
|
|
17
vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_doc.go
generated
vendored
Normal file
17
vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_doc.go
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Code generated by astool. DO NOT EDIT.
|
||||
|
||||
// Package propertymanuallyapprovesfollowers contains the implementation for the
|
||||
// manuallyApprovesFollowers property. All applications are strongly
|
||||
// encouraged to use the interface instead of this concrete definition. The
|
||||
// interfaces allow applications to consume only the types and properties
|
||||
// needed and be independent of the go-fed implementation if another
|
||||
// alternative implementation is created. This package is code-generated and
|
||||
// subject to the same license as the go-fed tool used to generate it.
|
||||
//
|
||||
// This package is independent of other types' and properties' implementations
|
||||
// by having a Manager injected into it to act as a factory for the concrete
|
||||
// implementations. The implementations have been generated into their own
|
||||
// separate subpackages for each vocabulary.
|
||||
//
|
||||
// Strongly consider using the interfaces instead of this package.
|
||||
package propertymanuallyapprovesfollowers
|
15
vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_pkg.go
generated
vendored
Normal file
15
vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_pkg.go
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Code generated by astool. DO NOT EDIT.
|
||||
|
||||
package propertymanuallyapprovesfollowers
|
||||
|
||||
var mgr privateManager
|
||||
|
||||
// privateManager abstracts the code-generated manager that provides access to
|
||||
// concrete implementations.
|
||||
type privateManager interface{}
|
||||
|
||||
// SetManager sets the manager package-global variable. For internal use only, do
|
||||
// not use as part of Application behavior. Must be called at golang init time.
|
||||
func SetManager(m privateManager) {
|
||||
mgr = m
|
||||
}
|
|
@ -0,0 +1,206 @@
|
|||
// Code generated by astool. DO NOT EDIT.
|
||||
|
||||
package propertymanuallyapprovesfollowers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
boolean "github.com/go-fed/activity/streams/values/boolean"
|
||||
vocab "github.com/go-fed/activity/streams/vocab"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// ActivityStreamsManuallyApprovesFollowersProperty is the functional property
|
||||
// "manuallyApprovesFollowers". It is permitted to be a single default-valued
|
||||
// value type.
|
||||
type ActivityStreamsManuallyApprovesFollowersProperty struct {
|
||||
xmlschemaBooleanMember bool
|
||||
hasBooleanMember bool
|
||||
unknown interface{}
|
||||
iri *url.URL
|
||||
alias string
|
||||
}
|
||||
|
||||
// DeserializeManuallyApprovesFollowersProperty creates a
|
||||
// "manuallyApprovesFollowers" property from an interface representation that
|
||||
// has been unmarshalled from a text or binary format.
|
||||
func DeserializeManuallyApprovesFollowersProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsManuallyApprovesFollowersProperty, error) {
|
||||
alias := ""
|
||||
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
|
||||
alias = a
|
||||
}
|
||||
propName := "manuallyApprovesFollowers"
|
||||
if len(alias) > 0 {
|
||||
// Use alias both to find the property, and set within the property.
|
||||
propName = fmt.Sprintf("%s:%s", alias, "manuallyApprovesFollowers")
|
||||
}
|
||||
i, ok := m[propName]
|
||||
|
||||
if ok {
|
||||
if s, ok := i.(string); ok {
|
||||
u, err := url.Parse(s)
|
||||
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
|
||||
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
|
||||
if err == nil && len(u.Scheme) > 0 {
|
||||
this := &ActivityStreamsManuallyApprovesFollowersProperty{
|
||||
alias: alias,
|
||||
iri: u,
|
||||
}
|
||||
return this, nil
|
||||
}
|
||||
}
|
||||
if v, err := boolean.DeserializeBoolean(i); err == nil {
|
||||
this := &ActivityStreamsManuallyApprovesFollowersProperty{
|
||||
alias: alias,
|
||||
hasBooleanMember: true,
|
||||
xmlschemaBooleanMember: v,
|
||||
}
|
||||
return this, nil
|
||||
}
|
||||
this := &ActivityStreamsManuallyApprovesFollowersProperty{
|
||||
alias: alias,
|
||||
unknown: i,
|
||||
}
|
||||
return this, nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewActivityStreamsManuallyApprovesFollowersProperty creates a new
|
||||
// manuallyApprovesFollowers property.
|
||||
func NewActivityStreamsManuallyApprovesFollowersProperty() *ActivityStreamsManuallyApprovesFollowersProperty {
|
||||
return &ActivityStreamsManuallyApprovesFollowersProperty{alias: ""}
|
||||
}
|
||||
|
||||
// Clear ensures no value of this property is set. Calling IsXMLSchemaBoolean
|
||||
// afterwards will return false.
|
||||
func (this *ActivityStreamsManuallyApprovesFollowersProperty) Clear() {
|
||||
this.unknown = nil
|
||||
this.iri = nil
|
||||
this.hasBooleanMember = false
|
||||
}
|
||||
|
||||
// Get returns the value of this property. When IsXMLSchemaBoolean returns false,
|
||||
// Get will return any arbitrary value.
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) Get() bool {
|
||||
return this.xmlschemaBooleanMember
|
||||
}
|
||||
|
||||
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
|
||||
// return any arbitrary value.
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) GetIRI() *url.URL {
|
||||
return this.iri
|
||||
}
|
||||
|
||||
// HasAny returns true if the value or IRI is set.
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) HasAny() bool {
|
||||
return this.IsXMLSchemaBoolean() || this.iri != nil
|
||||
}
|
||||
|
||||
// IsIRI returns true if this property is an IRI.
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) IsIRI() bool {
|
||||
return this.iri != nil
|
||||
}
|
||||
|
||||
// IsXMLSchemaBoolean returns true if this property is set and not an IRI.
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) IsXMLSchemaBoolean() bool {
|
||||
return this.hasBooleanMember
|
||||
}
|
||||
|
||||
// JSONLDContext returns the JSONLD URIs required in the context string for this
|
||||
// property and the specific values that are set. The value in the map is the
|
||||
// alias used to import the property's value or values.
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) JSONLDContext() map[string]string {
|
||||
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
|
||||
var child map[string]string
|
||||
|
||||
/*
|
||||
Since the literal maps in this function are determined at
|
||||
code-generation time, this loop should not overwrite an existing key with a
|
||||
new value.
|
||||
*/
|
||||
for k, v := range child {
|
||||
m[k] = v
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
// KindIndex computes an arbitrary value for indexing this kind of value. This is
|
||||
// a leaky API detail only for folks looking to replace the go-fed
|
||||
// implementation. Applications should not use this method.
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) KindIndex() int {
|
||||
if this.IsXMLSchemaBoolean() {
|
||||
return 0
|
||||
}
|
||||
if this.IsIRI() {
|
||||
return -2
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
// LessThan compares two instances of this property with an arbitrary but stable
|
||||
// comparison. Applications should not use this because it is only meant to
|
||||
// help alternative implementations to go-fed to be able to normalize
|
||||
// nonfunctional properties.
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) LessThan(o vocab.ActivityStreamsManuallyApprovesFollowersProperty) bool {
|
||||
// LessThan comparison for if either or both are IRIs.
|
||||
if this.IsIRI() && o.IsIRI() {
|
||||
return this.iri.String() < o.GetIRI().String()
|
||||
} else if this.IsIRI() {
|
||||
// IRIs are always less than other values, none, or unknowns
|
||||
return true
|
||||
} else if o.IsIRI() {
|
||||
// This other, none, or unknown value is always greater than IRIs
|
||||
return false
|
||||
}
|
||||
// LessThan comparison for the single value or unknown value.
|
||||
if !this.IsXMLSchemaBoolean() && !o.IsXMLSchemaBoolean() {
|
||||
// Both are unknowns.
|
||||
return false
|
||||
} else if this.IsXMLSchemaBoolean() && !o.IsXMLSchemaBoolean() {
|
||||
// Values are always greater than unknown values.
|
||||
return false
|
||||
} else if !this.IsXMLSchemaBoolean() && o.IsXMLSchemaBoolean() {
|
||||
// Unknowns are always less than known values.
|
||||
return true
|
||||
} else {
|
||||
// Actual comparison.
|
||||
return boolean.LessBoolean(this.Get(), o.Get())
|
||||
}
|
||||
}
|
||||
|
||||
// Name returns the name of this property: "manuallyApprovesFollowers".
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) Name() string {
|
||||
if len(this.alias) > 0 {
|
||||
return this.alias + ":" + "manuallyApprovesFollowers"
|
||||
} else {
|
||||
return "manuallyApprovesFollowers"
|
||||
}
|
||||
}
|
||||
|
||||
// Serialize converts this into an interface representation suitable for
|
||||
// marshalling into a text or binary format. Applications should not need this
|
||||
// function as most typical use cases serialize types instead of individual
|
||||
// properties. It is exposed for alternatives to go-fed implementations to use.
|
||||
func (this ActivityStreamsManuallyApprovesFollowersProperty) Serialize() (interface{}, error) {
|
||||
if this.IsXMLSchemaBoolean() {
|
||||
return boolean.SerializeBoolean(this.Get())
|
||||
} else if this.IsIRI() {
|
||||
return this.iri.String(), nil
|
||||
}
|
||||
return this.unknown, nil
|
||||
}
|
||||
|
||||
// Set sets the value of this property. Calling IsXMLSchemaBoolean afterwards will
|
||||
// return true.
|
||||
func (this *ActivityStreamsManuallyApprovesFollowersProperty) Set(v bool) {
|
||||
this.Clear()
|
||||
this.xmlschemaBooleanMember = v
|
||||
this.hasBooleanMember = true
|
||||
}
|
||||
|
||||
// SetIRI sets the value of this property. Calling IsIRI afterwards will return
|
||||
// true.
|
||||
func (this *ActivityStreamsManuallyApprovesFollowersProperty) SetIRI(v *url.URL) {
|
||||
this.Clear()
|
||||
this.iri = v
|
||||
}
|
|
@ -108,6 +108,11 @@ type privateManager interface {
|
|||
// method for the "ActivityStreamsLocationProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error)
|
||||
// DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the
|
||||
// deserialization method for the
|
||||
// "ActivityStreamsManuallyApprovesFollowersProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error)
|
||||
// DeserializeMediaTypePropertyActivityStreams returns the deserialization
|
||||
// method for the "ActivityStreamsMediaTypeProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
|
|
|
@ -40,6 +40,7 @@ type ActivityStreamsApplication struct {
|
|||
ActivityStreamsLiked vocab.ActivityStreamsLikedProperty
|
||||
ActivityStreamsLikes vocab.ActivityStreamsLikesProperty
|
||||
ActivityStreamsLocation vocab.ActivityStreamsLocationProperty
|
||||
ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty
|
||||
ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty
|
||||
ActivityStreamsName vocab.ActivityStreamsNameProperty
|
||||
ActivityStreamsObject vocab.ActivityStreamsObjectProperty
|
||||
|
@ -255,6 +256,11 @@ func DeserializeApplication(m map[string]interface{}, aliasMap map[string]string
|
|||
} else if p != nil {
|
||||
this.ActivityStreamsLocation = p
|
||||
}
|
||||
if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = p
|
||||
}
|
||||
if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
|
@ -420,6 +426,8 @@ func DeserializeApplication(m map[string]interface{}, aliasMap map[string]string
|
|||
continue
|
||||
} else if k == "location" {
|
||||
continue
|
||||
} else if k == "manuallyApprovesFollowers" {
|
||||
continue
|
||||
} else if k == "mediaType" {
|
||||
continue
|
||||
} else if k == "name" {
|
||||
|
@ -624,6 +632,12 @@ func (this ActivityStreamsApplication) GetActivityStreamsLocation() vocab.Activi
|
|||
return this.ActivityStreamsLocation
|
||||
}
|
||||
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil otherwise.
|
||||
func (this ActivityStreamsApplication) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty {
|
||||
return this.ActivityStreamsManuallyApprovesFollowers
|
||||
}
|
||||
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it exists, and
|
||||
// nil otherwise.
|
||||
func (this ActivityStreamsApplication) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty {
|
||||
|
@ -818,6 +832,7 @@ func (this ActivityStreamsApplication) JSONLDContext() map[string]string {
|
|||
m = this.helperJSONLDContext(this.ActivityStreamsLiked, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLikes, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLocation, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsName, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsObject, m)
|
||||
|
@ -1184,6 +1199,20 @@ func (this ActivityStreamsApplication) LessThan(o vocab.ActivityStreamsApplicati
|
|||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "manuallyApprovesFollowers"
|
||||
if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
return true
|
||||
} else if rhs.LessThan(lhs) {
|
||||
return false
|
||||
}
|
||||
} else if lhs == nil && rhs != nil {
|
||||
// Nil is less than anything else
|
||||
return true
|
||||
} else if rhs != nil && rhs == nil {
|
||||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "mediaType"
|
||||
if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
|
@ -1707,6 +1736,14 @@ func (this ActivityStreamsApplication) Serialize() (map[string]interface{}, erro
|
|||
m[this.ActivityStreamsLocation.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "manuallyApprovesFollowers"
|
||||
if this.ActivityStreamsManuallyApprovesFollowers != nil {
|
||||
if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil {
|
||||
return nil, err
|
||||
} else if i != nil {
|
||||
m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "mediaType"
|
||||
if this.ActivityStreamsMediaType != nil {
|
||||
if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil {
|
||||
|
@ -2002,6 +2039,12 @@ func (this *ActivityStreamsApplication) SetActivityStreamsLocation(i vocab.Activ
|
|||
this.ActivityStreamsLocation = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
func (this *ActivityStreamsApplication) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
func (this *ActivityStreamsApplication) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) {
|
||||
this.ActivityStreamsMediaType = i
|
||||
|
|
5
vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_pkg.go
generated
vendored
5
vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_pkg.go
generated
vendored
|
@ -108,6 +108,11 @@ type privateManager interface {
|
|||
// method for the "ActivityStreamsLocationProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error)
|
||||
// DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the
|
||||
// deserialization method for the
|
||||
// "ActivityStreamsManuallyApprovesFollowersProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error)
|
||||
// DeserializeMediaTypePropertyActivityStreams returns the deserialization
|
||||
// method for the "ActivityStreamsMediaTypeProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
|
|
|
@ -40,6 +40,7 @@ type ActivityStreamsGroup struct {
|
|||
ActivityStreamsLiked vocab.ActivityStreamsLikedProperty
|
||||
ActivityStreamsLikes vocab.ActivityStreamsLikesProperty
|
||||
ActivityStreamsLocation vocab.ActivityStreamsLocationProperty
|
||||
ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty
|
||||
ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty
|
||||
ActivityStreamsName vocab.ActivityStreamsNameProperty
|
||||
ActivityStreamsObject vocab.ActivityStreamsObjectProperty
|
||||
|
@ -235,6 +236,11 @@ func DeserializeGroup(m map[string]interface{}, aliasMap map[string]string) (*Ac
|
|||
} else if p != nil {
|
||||
this.ActivityStreamsLocation = p
|
||||
}
|
||||
if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = p
|
||||
}
|
||||
if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
|
@ -400,6 +406,8 @@ func DeserializeGroup(m map[string]interface{}, aliasMap map[string]string) (*Ac
|
|||
continue
|
||||
} else if k == "location" {
|
||||
continue
|
||||
} else if k == "manuallyApprovesFollowers" {
|
||||
continue
|
||||
} else if k == "mediaType" {
|
||||
continue
|
||||
} else if k == "name" {
|
||||
|
@ -624,6 +632,12 @@ func (this ActivityStreamsGroup) GetActivityStreamsLocation() vocab.ActivityStre
|
|||
return this.ActivityStreamsLocation
|
||||
}
|
||||
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil otherwise.
|
||||
func (this ActivityStreamsGroup) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty {
|
||||
return this.ActivityStreamsManuallyApprovesFollowers
|
||||
}
|
||||
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it exists, and
|
||||
// nil otherwise.
|
||||
func (this ActivityStreamsGroup) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty {
|
||||
|
@ -818,6 +832,7 @@ func (this ActivityStreamsGroup) JSONLDContext() map[string]string {
|
|||
m = this.helperJSONLDContext(this.ActivityStreamsLiked, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLikes, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLocation, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsName, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsObject, m)
|
||||
|
@ -1184,6 +1199,20 @@ func (this ActivityStreamsGroup) LessThan(o vocab.ActivityStreamsGroup) bool {
|
|||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "manuallyApprovesFollowers"
|
||||
if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
return true
|
||||
} else if rhs.LessThan(lhs) {
|
||||
return false
|
||||
}
|
||||
} else if lhs == nil && rhs != nil {
|
||||
// Nil is less than anything else
|
||||
return true
|
||||
} else if rhs != nil && rhs == nil {
|
||||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "mediaType"
|
||||
if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
|
@ -1707,6 +1736,14 @@ func (this ActivityStreamsGroup) Serialize() (map[string]interface{}, error) {
|
|||
m[this.ActivityStreamsLocation.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "manuallyApprovesFollowers"
|
||||
if this.ActivityStreamsManuallyApprovesFollowers != nil {
|
||||
if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil {
|
||||
return nil, err
|
||||
} else if i != nil {
|
||||
m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "mediaType"
|
||||
if this.ActivityStreamsMediaType != nil {
|
||||
if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil {
|
||||
|
@ -2002,6 +2039,12 @@ func (this *ActivityStreamsGroup) SetActivityStreamsLocation(i vocab.ActivityStr
|
|||
this.ActivityStreamsLocation = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
func (this *ActivityStreamsGroup) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
func (this *ActivityStreamsGroup) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) {
|
||||
this.ActivityStreamsMediaType = i
|
||||
|
|
|
@ -108,6 +108,11 @@ type privateManager interface {
|
|||
// method for the "ActivityStreamsLocationProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error)
|
||||
// DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the
|
||||
// deserialization method for the
|
||||
// "ActivityStreamsManuallyApprovesFollowersProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error)
|
||||
// DeserializeMediaTypePropertyActivityStreams returns the deserialization
|
||||
// method for the "ActivityStreamsMediaTypeProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
|
|
|
@ -40,6 +40,7 @@ type ActivityStreamsOrganization struct {
|
|||
ActivityStreamsLiked vocab.ActivityStreamsLikedProperty
|
||||
ActivityStreamsLikes vocab.ActivityStreamsLikesProperty
|
||||
ActivityStreamsLocation vocab.ActivityStreamsLocationProperty
|
||||
ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty
|
||||
ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty
|
||||
ActivityStreamsName vocab.ActivityStreamsNameProperty
|
||||
ActivityStreamsObject vocab.ActivityStreamsObjectProperty
|
||||
|
@ -235,6 +236,11 @@ func DeserializeOrganization(m map[string]interface{}, aliasMap map[string]strin
|
|||
} else if p != nil {
|
||||
this.ActivityStreamsLocation = p
|
||||
}
|
||||
if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = p
|
||||
}
|
||||
if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
|
@ -400,6 +406,8 @@ func DeserializeOrganization(m map[string]interface{}, aliasMap map[string]strin
|
|||
continue
|
||||
} else if k == "location" {
|
||||
continue
|
||||
} else if k == "manuallyApprovesFollowers" {
|
||||
continue
|
||||
} else if k == "mediaType" {
|
||||
continue
|
||||
} else if k == "name" {
|
||||
|
@ -624,6 +632,12 @@ func (this ActivityStreamsOrganization) GetActivityStreamsLocation() vocab.Activ
|
|||
return this.ActivityStreamsLocation
|
||||
}
|
||||
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil otherwise.
|
||||
func (this ActivityStreamsOrganization) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty {
|
||||
return this.ActivityStreamsManuallyApprovesFollowers
|
||||
}
|
||||
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it exists, and
|
||||
// nil otherwise.
|
||||
func (this ActivityStreamsOrganization) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty {
|
||||
|
@ -818,6 +832,7 @@ func (this ActivityStreamsOrganization) JSONLDContext() map[string]string {
|
|||
m = this.helperJSONLDContext(this.ActivityStreamsLiked, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLikes, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLocation, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsName, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsObject, m)
|
||||
|
@ -1184,6 +1199,20 @@ func (this ActivityStreamsOrganization) LessThan(o vocab.ActivityStreamsOrganiza
|
|||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "manuallyApprovesFollowers"
|
||||
if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
return true
|
||||
} else if rhs.LessThan(lhs) {
|
||||
return false
|
||||
}
|
||||
} else if lhs == nil && rhs != nil {
|
||||
// Nil is less than anything else
|
||||
return true
|
||||
} else if rhs != nil && rhs == nil {
|
||||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "mediaType"
|
||||
if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
|
@ -1707,6 +1736,14 @@ func (this ActivityStreamsOrganization) Serialize() (map[string]interface{}, err
|
|||
m[this.ActivityStreamsLocation.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "manuallyApprovesFollowers"
|
||||
if this.ActivityStreamsManuallyApprovesFollowers != nil {
|
||||
if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil {
|
||||
return nil, err
|
||||
} else if i != nil {
|
||||
m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "mediaType"
|
||||
if this.ActivityStreamsMediaType != nil {
|
||||
if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil {
|
||||
|
@ -2002,6 +2039,12 @@ func (this *ActivityStreamsOrganization) SetActivityStreamsLocation(i vocab.Acti
|
|||
this.ActivityStreamsLocation = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
func (this *ActivityStreamsOrganization) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
func (this *ActivityStreamsOrganization) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) {
|
||||
this.ActivityStreamsMediaType = i
|
||||
|
|
|
@ -108,6 +108,11 @@ type privateManager interface {
|
|||
// method for the "ActivityStreamsLocationProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error)
|
||||
// DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the
|
||||
// deserialization method for the
|
||||
// "ActivityStreamsManuallyApprovesFollowersProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error)
|
||||
// DeserializeMediaTypePropertyActivityStreams returns the deserialization
|
||||
// method for the "ActivityStreamsMediaTypeProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
|
|
|
@ -40,6 +40,7 @@ type ActivityStreamsPerson struct {
|
|||
ActivityStreamsLiked vocab.ActivityStreamsLikedProperty
|
||||
ActivityStreamsLikes vocab.ActivityStreamsLikesProperty
|
||||
ActivityStreamsLocation vocab.ActivityStreamsLocationProperty
|
||||
ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty
|
||||
ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty
|
||||
ActivityStreamsName vocab.ActivityStreamsNameProperty
|
||||
ActivityStreamsObject vocab.ActivityStreamsObjectProperty
|
||||
|
@ -235,6 +236,11 @@ func DeserializePerson(m map[string]interface{}, aliasMap map[string]string) (*A
|
|||
} else if p != nil {
|
||||
this.ActivityStreamsLocation = p
|
||||
}
|
||||
if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = p
|
||||
}
|
||||
if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
|
@ -400,6 +406,8 @@ func DeserializePerson(m map[string]interface{}, aliasMap map[string]string) (*A
|
|||
continue
|
||||
} else if k == "location" {
|
||||
continue
|
||||
} else if k == "manuallyApprovesFollowers" {
|
||||
continue
|
||||
} else if k == "mediaType" {
|
||||
continue
|
||||
} else if k == "name" {
|
||||
|
@ -624,6 +632,12 @@ func (this ActivityStreamsPerson) GetActivityStreamsLocation() vocab.ActivityStr
|
|||
return this.ActivityStreamsLocation
|
||||
}
|
||||
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil otherwise.
|
||||
func (this ActivityStreamsPerson) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty {
|
||||
return this.ActivityStreamsManuallyApprovesFollowers
|
||||
}
|
||||
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it exists, and
|
||||
// nil otherwise.
|
||||
func (this ActivityStreamsPerson) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty {
|
||||
|
@ -818,6 +832,7 @@ func (this ActivityStreamsPerson) JSONLDContext() map[string]string {
|
|||
m = this.helperJSONLDContext(this.ActivityStreamsLiked, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLikes, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLocation, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsName, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsObject, m)
|
||||
|
@ -1184,6 +1199,20 @@ func (this ActivityStreamsPerson) LessThan(o vocab.ActivityStreamsPerson) bool {
|
|||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "manuallyApprovesFollowers"
|
||||
if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
return true
|
||||
} else if rhs.LessThan(lhs) {
|
||||
return false
|
||||
}
|
||||
} else if lhs == nil && rhs != nil {
|
||||
// Nil is less than anything else
|
||||
return true
|
||||
} else if rhs != nil && rhs == nil {
|
||||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "mediaType"
|
||||
if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
|
@ -1707,6 +1736,14 @@ func (this ActivityStreamsPerson) Serialize() (map[string]interface{}, error) {
|
|||
m[this.ActivityStreamsLocation.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "manuallyApprovesFollowers"
|
||||
if this.ActivityStreamsManuallyApprovesFollowers != nil {
|
||||
if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil {
|
||||
return nil, err
|
||||
} else if i != nil {
|
||||
m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "mediaType"
|
||||
if this.ActivityStreamsMediaType != nil {
|
||||
if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil {
|
||||
|
@ -2002,6 +2039,12 @@ func (this *ActivityStreamsPerson) SetActivityStreamsLocation(i vocab.ActivitySt
|
|||
this.ActivityStreamsLocation = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
func (this *ActivityStreamsPerson) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
func (this *ActivityStreamsPerson) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) {
|
||||
this.ActivityStreamsMediaType = i
|
||||
|
|
|
@ -108,6 +108,11 @@ type privateManager interface {
|
|||
// method for the "ActivityStreamsLocationProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error)
|
||||
// DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the
|
||||
// deserialization method for the
|
||||
// "ActivityStreamsManuallyApprovesFollowersProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error)
|
||||
// DeserializeMediaTypePropertyActivityStreams returns the deserialization
|
||||
// method for the "ActivityStreamsMediaTypeProperty" non-functional
|
||||
// property in the vocabulary "ActivityStreams"
|
||||
|
|
|
@ -40,6 +40,7 @@ type ActivityStreamsService struct {
|
|||
ActivityStreamsLiked vocab.ActivityStreamsLikedProperty
|
||||
ActivityStreamsLikes vocab.ActivityStreamsLikesProperty
|
||||
ActivityStreamsLocation vocab.ActivityStreamsLocationProperty
|
||||
ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty
|
||||
ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty
|
||||
ActivityStreamsName vocab.ActivityStreamsNameProperty
|
||||
ActivityStreamsObject vocab.ActivityStreamsObjectProperty
|
||||
|
@ -235,6 +236,11 @@ func DeserializeService(m map[string]interface{}, aliasMap map[string]string) (*
|
|||
} else if p != nil {
|
||||
this.ActivityStreamsLocation = p
|
||||
}
|
||||
if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = p
|
||||
}
|
||||
if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil {
|
||||
return nil, err
|
||||
} else if p != nil {
|
||||
|
@ -400,6 +406,8 @@ func DeserializeService(m map[string]interface{}, aliasMap map[string]string) (*
|
|||
continue
|
||||
} else if k == "location" {
|
||||
continue
|
||||
} else if k == "manuallyApprovesFollowers" {
|
||||
continue
|
||||
} else if k == "mediaType" {
|
||||
continue
|
||||
} else if k == "name" {
|
||||
|
@ -624,6 +632,12 @@ func (this ActivityStreamsService) GetActivityStreamsLocation() vocab.ActivitySt
|
|||
return this.ActivityStreamsLocation
|
||||
}
|
||||
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil otherwise.
|
||||
func (this ActivityStreamsService) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty {
|
||||
return this.ActivityStreamsManuallyApprovesFollowers
|
||||
}
|
||||
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it exists, and
|
||||
// nil otherwise.
|
||||
func (this ActivityStreamsService) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty {
|
||||
|
@ -818,6 +832,7 @@ func (this ActivityStreamsService) JSONLDContext() map[string]string {
|
|||
m = this.helperJSONLDContext(this.ActivityStreamsLiked, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLikes, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsLocation, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsName, m)
|
||||
m = this.helperJSONLDContext(this.ActivityStreamsObject, m)
|
||||
|
@ -1184,6 +1199,20 @@ func (this ActivityStreamsService) LessThan(o vocab.ActivityStreamsService) bool
|
|||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "manuallyApprovesFollowers"
|
||||
if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
return true
|
||||
} else if rhs.LessThan(lhs) {
|
||||
return false
|
||||
}
|
||||
} else if lhs == nil && rhs != nil {
|
||||
// Nil is less than anything else
|
||||
return true
|
||||
} else if rhs != nil && rhs == nil {
|
||||
// Anything else is greater than nil
|
||||
return false
|
||||
} // Else: Both are nil
|
||||
// Compare property "mediaType"
|
||||
if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil {
|
||||
if lhs.LessThan(rhs) {
|
||||
|
@ -1707,6 +1736,14 @@ func (this ActivityStreamsService) Serialize() (map[string]interface{}, error) {
|
|||
m[this.ActivityStreamsLocation.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "manuallyApprovesFollowers"
|
||||
if this.ActivityStreamsManuallyApprovesFollowers != nil {
|
||||
if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil {
|
||||
return nil, err
|
||||
} else if i != nil {
|
||||
m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i
|
||||
}
|
||||
}
|
||||
// Maybe serialize property "mediaType"
|
||||
if this.ActivityStreamsMediaType != nil {
|
||||
if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil {
|
||||
|
@ -2002,6 +2039,12 @@ func (this *ActivityStreamsService) SetActivityStreamsLocation(i vocab.ActivityS
|
|||
this.ActivityStreamsLocation = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
func (this *ActivityStreamsService) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) {
|
||||
this.ActivityStreamsManuallyApprovesFollowers = i
|
||||
}
|
||||
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
func (this *ActivityStreamsService) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) {
|
||||
this.ActivityStreamsMediaType = i
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "context": "https://example.dev/luke/myrepo",
|
||||
// "id": "https://example.dev/luke/myrepo/branches/master",
|
||||
// "context": "https://example.org/luke/myrepo",
|
||||
// "id": "https://example.org/luke/myrepo/branches/master",
|
||||
// "name": "master",
|
||||
// "ref": "refs/heads/master",
|
||||
// "type": "Branch"
|
||||
|
|
|
@ -19,17 +19,17 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "attributedTo": "https://example.dev/bob",
|
||||
// "attributedTo": "https://example.org/bob",
|
||||
// "committed": "2019-07-26T23:45:01Z",
|
||||
// "committedBy": "https://example.dev/alice",
|
||||
// "context": "https://example.dev/alice/myrepo",
|
||||
// "committedBy": "https://example.org/alice",
|
||||
// "context": "https://example.org/alice/myrepo",
|
||||
// "created": "2019-07-11T12:34:56Z",
|
||||
// "description": {
|
||||
// "content": "It's about time people can install on their computers!",
|
||||
// "mediaType": "text/plain"
|
||||
// },
|
||||
// "hash": "109ec9a09c7df7fec775d2ba0b9d466e5643ec8c",
|
||||
// "id": "https://example.dev/alice/myrepo/commits/109ec9a09c7df7fec775d2ba0b9d466e5643ec8c",
|
||||
// "id": "https://example.org/alice/myrepo/commits/109ec9a09c7df7fec775d2ba0b9d466e5643ec8c",
|
||||
// "summary": "Add an installation script, fixes issue #89",
|
||||
// "type": "Commit"
|
||||
// }
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "actor": "https://example.dev/aviva",
|
||||
// "context": "https://example.dev/aviva/myproject",
|
||||
// "id": "https://example.dev/aviva/outbox/reBGo",
|
||||
// "actor": "https://example.org/aviva",
|
||||
// "context": "https://example.org/aviva/myproject",
|
||||
// "id": "https://example.org/aviva/outbox/reBGo",
|
||||
// "object": {
|
||||
// "items": [
|
||||
// {
|
||||
// "attributedTo": "https://example.dev/aviva",
|
||||
// "context": "https://example.dev/aviva/myproject",
|
||||
// "attributedTo": "https://example.org/aviva",
|
||||
// "context": "https://example.org/aviva/myproject",
|
||||
// "created": "2019-11-03T13:43:59Z",
|
||||
// "hash": "d96596230322716bd6f87a232a648ca9822a1c20",
|
||||
// "id": "https://example.dev/aviva/myproject/commits/d96596230322716bd6f87a232a648ca9822a1c20",
|
||||
// "id": "https://example.org/aviva/myproject/commits/d96596230322716bd6f87a232a648ca9822a1c20",
|
||||
// "summary": "Provide hints in sign-up form fields",
|
||||
// "type": "Commit"
|
||||
// }
|
||||
|
@ -35,12 +35,12 @@
|
|||
// },
|
||||
// "summary": "\u003cp\u003eAviva pushed a commit to
|
||||
// myproject\u003c/p\u003e",
|
||||
// "target": "https://example.dev/aviva/myproject/branches/master",
|
||||
// "target": "https://example.org/aviva/myproject/branches/master",
|
||||
// "to": [
|
||||
// "https://example.dev/aviva/followers",
|
||||
// "https://example.dev/aviva/myproject",
|
||||
// "https://example.dev/aviva/myproject/team",
|
||||
// "https://example.dev/aviva/myproject/followers"
|
||||
// "https://example.org/aviva/followers",
|
||||
// "https://example.org/aviva/myproject",
|
||||
// "https://example.org/aviva/myproject/team",
|
||||
// "https://example.org/aviva/myproject/followers"
|
||||
// ],
|
||||
// "type": "Push"
|
||||
// }
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "assignedTo": "https://example.dev/alice",
|
||||
// "attributedTo": "https://dev.community/bob",
|
||||
// "assignedTo": "https://example.org/alice",
|
||||
// "attributedTo": "https://example.com/bob",
|
||||
// "content": "\u003cp\u003ePlease fix.
|
||||
// \u003ci\u003eEverything\u003c/i\u003e is broken!\u003c/p\u003e",
|
||||
// "context": "https://example.dev/alice/myrepo",
|
||||
// "id": "https://example.dev/alice/myrepo/issues/42",
|
||||
// "context": "https://example.org/alice/myrepo",
|
||||
// "id": "https://example.org/alice/myrepo/issues/42",
|
||||
// "isResolved": false,
|
||||
// "mediaType": "text/html",
|
||||
// "source": {
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "attributedTo": "https://example.dev/alice",
|
||||
// "id": "https://example.dev/ticket-deps/2342593",
|
||||
// "object": "https://dev.community/bob/coolproj/issues/85",
|
||||
// "attributedTo": "https://example.org/alice",
|
||||
// "id": "https://example.org/ticket-deps/2342593",
|
||||
// "object": "https://example.com/bob/coolproj/issues/85",
|
||||
// "published": "2019-07-11T12:34:56Z",
|
||||
// "relationship": "dependsOn",
|
||||
// "subject": "https://example.dev/alice/myproj/issues/42",
|
||||
// "subject": "https://example.org/alice/myproj/issues/42",
|
||||
// "summary": "Alice's ticket depends on Bob's ticket",
|
||||
// "type": [
|
||||
// "Relationship",
|
||||
|
|
53
vendor/github.com/go-fed/activity/streams/vocab/gen_property_activitystreams_manuallyApprovesFollowers_interface.go
generated
vendored
Normal file
53
vendor/github.com/go-fed/activity/streams/vocab/gen_property_activitystreams_manuallyApprovesFollowers_interface.go
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
// Code generated by astool. DO NOT EDIT.
|
||||
|
||||
package vocab
|
||||
|
||||
import "net/url"
|
||||
|
||||
// Indicates that the actor manually approves Follow activities and that an
|
||||
// automatic Accept should not be expected.
|
||||
type ActivityStreamsManuallyApprovesFollowersProperty interface {
|
||||
// Clear ensures no value of this property is set. Calling
|
||||
// IsXMLSchemaBoolean afterwards will return false.
|
||||
Clear()
|
||||
// Get returns the value of this property. When IsXMLSchemaBoolean returns
|
||||
// false, Get will return any arbitrary value.
|
||||
Get() bool
|
||||
// GetIRI returns the IRI of this property. When IsIRI returns false,
|
||||
// GetIRI will return any arbitrary value.
|
||||
GetIRI() *url.URL
|
||||
// HasAny returns true if the value or IRI is set.
|
||||
HasAny() bool
|
||||
// IsIRI returns true if this property is an IRI.
|
||||
IsIRI() bool
|
||||
// IsXMLSchemaBoolean returns true if this property is set and not an IRI.
|
||||
IsXMLSchemaBoolean() bool
|
||||
// JSONLDContext returns the JSONLD URIs required in the context string
|
||||
// for this property and the specific values that are set. The value
|
||||
// in the map is the alias used to import the property's value or
|
||||
// values.
|
||||
JSONLDContext() map[string]string
|
||||
// KindIndex computes an arbitrary value for indexing this kind of value.
|
||||
// This is a leaky API detail only for folks looking to replace the
|
||||
// go-fed implementation. Applications should not use this method.
|
||||
KindIndex() int
|
||||
// LessThan compares two instances of this property with an arbitrary but
|
||||
// stable comparison. Applications should not use this because it is
|
||||
// only meant to help alternative implementations to go-fed to be able
|
||||
// to normalize nonfunctional properties.
|
||||
LessThan(o ActivityStreamsManuallyApprovesFollowersProperty) bool
|
||||
// Name returns the name of this property: "manuallyApprovesFollowers".
|
||||
Name() string
|
||||
// Serialize converts this into an interface representation suitable for
|
||||
// marshalling into a text or binary format. Applications should not
|
||||
// need this function as most typical use cases serialize types
|
||||
// instead of individual properties. It is exposed for alternatives to
|
||||
// go-fed implementations to use.
|
||||
Serialize() (interface{}, error)
|
||||
// Set sets the value of this property. Calling IsXMLSchemaBoolean
|
||||
// afterwards will return true.
|
||||
Set(v bool)
|
||||
// SetIRI sets the value of this property. Calling IsIRI afterwards will
|
||||
// return true.
|
||||
SetIRI(v *url.URL)
|
||||
}
|
|
@ -14,15 +14,15 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "attributedTo": "https://example.dev/bob",
|
||||
// "context": "https://example.dev/alice/myrepo",
|
||||
// "attributedTo": "https://example.org/bob",
|
||||
// "context": "https://example.org/alice/myrepo",
|
||||
// "created": "2019-07-11T12:34:56Z",
|
||||
// "description": {
|
||||
// "content": "It's about time people can install on their computers!",
|
||||
// "mediaType": "text/plain"
|
||||
// },
|
||||
// "hash": "109ec9a09c7df7fec775d2ba0b9d466e5643ec8c",
|
||||
// "id": "https://example.dev/alice/myrepo/commits/109ec9a09c7df7fec775d2ba0b9d466e5643ec8c",
|
||||
// "id": "https://example.org/alice/myrepo/commits/109ec9a09c7df7fec775d2ba0b9d466e5643ec8c",
|
||||
// "summary": "Add an installation script, fixes issue #89",
|
||||
// "type": "Commit"
|
||||
// }
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "context": "https://example.dev/luke/myrepo",
|
||||
// "id": "https://example.dev/luke/myrepo/branches/master",
|
||||
// "context": "https://example.org/luke/myrepo",
|
||||
// "id": "https://example.org/luke/myrepo/branches/master",
|
||||
// "name": "master",
|
||||
// "ref": "refs/heads/master",
|
||||
// "type": "Branch"
|
||||
|
|
|
@ -73,6 +73,10 @@ type ActivityStreamsApplication interface {
|
|||
// GetActivityStreamsLocation returns the "location" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsLocation() ActivityStreamsLocationProperty
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil
|
||||
// otherwise.
|
||||
GetActivityStreamsManuallyApprovesFollowers() ActivityStreamsManuallyApprovesFollowersProperty
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsMediaType() ActivityStreamsMediaTypeProperty
|
||||
|
@ -212,6 +216,9 @@ type ActivityStreamsApplication interface {
|
|||
SetActivityStreamsLikes(i ActivityStreamsLikesProperty)
|
||||
// SetActivityStreamsLocation sets the "location" property.
|
||||
SetActivityStreamsLocation(i ActivityStreamsLocationProperty)
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
SetActivityStreamsManuallyApprovesFollowers(i ActivityStreamsManuallyApprovesFollowersProperty)
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
SetActivityStreamsMediaType(i ActivityStreamsMediaTypeProperty)
|
||||
// SetActivityStreamsName sets the "name" property.
|
||||
|
|
|
@ -73,6 +73,10 @@ type ActivityStreamsGroup interface {
|
|||
// GetActivityStreamsLocation returns the "location" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsLocation() ActivityStreamsLocationProperty
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil
|
||||
// otherwise.
|
||||
GetActivityStreamsManuallyApprovesFollowers() ActivityStreamsManuallyApprovesFollowersProperty
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsMediaType() ActivityStreamsMediaTypeProperty
|
||||
|
@ -211,6 +215,9 @@ type ActivityStreamsGroup interface {
|
|||
SetActivityStreamsLikes(i ActivityStreamsLikesProperty)
|
||||
// SetActivityStreamsLocation sets the "location" property.
|
||||
SetActivityStreamsLocation(i ActivityStreamsLocationProperty)
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
SetActivityStreamsManuallyApprovesFollowers(i ActivityStreamsManuallyApprovesFollowersProperty)
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
SetActivityStreamsMediaType(i ActivityStreamsMediaTypeProperty)
|
||||
// SetActivityStreamsName sets the "name" property.
|
||||
|
|
|
@ -73,6 +73,10 @@ type ActivityStreamsOrganization interface {
|
|||
// GetActivityStreamsLocation returns the "location" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsLocation() ActivityStreamsLocationProperty
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil
|
||||
// otherwise.
|
||||
GetActivityStreamsManuallyApprovesFollowers() ActivityStreamsManuallyApprovesFollowersProperty
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsMediaType() ActivityStreamsMediaTypeProperty
|
||||
|
@ -212,6 +216,9 @@ type ActivityStreamsOrganization interface {
|
|||
SetActivityStreamsLikes(i ActivityStreamsLikesProperty)
|
||||
// SetActivityStreamsLocation sets the "location" property.
|
||||
SetActivityStreamsLocation(i ActivityStreamsLocationProperty)
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
SetActivityStreamsManuallyApprovesFollowers(i ActivityStreamsManuallyApprovesFollowersProperty)
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
SetActivityStreamsMediaType(i ActivityStreamsMediaTypeProperty)
|
||||
// SetActivityStreamsName sets the "name" property.
|
||||
|
|
|
@ -73,6 +73,10 @@ type ActivityStreamsPerson interface {
|
|||
// GetActivityStreamsLocation returns the "location" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsLocation() ActivityStreamsLocationProperty
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil
|
||||
// otherwise.
|
||||
GetActivityStreamsManuallyApprovesFollowers() ActivityStreamsManuallyApprovesFollowersProperty
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsMediaType() ActivityStreamsMediaTypeProperty
|
||||
|
@ -211,6 +215,9 @@ type ActivityStreamsPerson interface {
|
|||
SetActivityStreamsLikes(i ActivityStreamsLikesProperty)
|
||||
// SetActivityStreamsLocation sets the "location" property.
|
||||
SetActivityStreamsLocation(i ActivityStreamsLocationProperty)
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
SetActivityStreamsManuallyApprovesFollowers(i ActivityStreamsManuallyApprovesFollowersProperty)
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
SetActivityStreamsMediaType(i ActivityStreamsMediaTypeProperty)
|
||||
// SetActivityStreamsName sets the "name" property.
|
||||
|
|
|
@ -73,6 +73,10 @@ type ActivityStreamsService interface {
|
|||
// GetActivityStreamsLocation returns the "location" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsLocation() ActivityStreamsLocationProperty
|
||||
// GetActivityStreamsManuallyApprovesFollowers returns the
|
||||
// "manuallyApprovesFollowers" property if it exists, and nil
|
||||
// otherwise.
|
||||
GetActivityStreamsManuallyApprovesFollowers() ActivityStreamsManuallyApprovesFollowersProperty
|
||||
// GetActivityStreamsMediaType returns the "mediaType" property if it
|
||||
// exists, and nil otherwise.
|
||||
GetActivityStreamsMediaType() ActivityStreamsMediaTypeProperty
|
||||
|
@ -212,6 +216,9 @@ type ActivityStreamsService interface {
|
|||
SetActivityStreamsLikes(i ActivityStreamsLikesProperty)
|
||||
// SetActivityStreamsLocation sets the "location" property.
|
||||
SetActivityStreamsLocation(i ActivityStreamsLocationProperty)
|
||||
// SetActivityStreamsManuallyApprovesFollowers sets the
|
||||
// "manuallyApprovesFollowers" property.
|
||||
SetActivityStreamsManuallyApprovesFollowers(i ActivityStreamsManuallyApprovesFollowersProperty)
|
||||
// SetActivityStreamsMediaType sets the "mediaType" property.
|
||||
SetActivityStreamsMediaType(i ActivityStreamsMediaTypeProperty)
|
||||
// SetActivityStreamsName sets the "name" property.
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "context": "https://example.dev/luke/myrepo",
|
||||
// "id": "https://example.dev/luke/myrepo/branches/master",
|
||||
// "context": "https://example.org/luke/myrepo",
|
||||
// "id": "https://example.org/luke/myrepo/branches/master",
|
||||
// "name": "master",
|
||||
// "ref": "refs/heads/master",
|
||||
// "type": "Branch"
|
||||
|
|
|
@ -13,17 +13,17 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "attributedTo": "https://example.dev/bob",
|
||||
// "attributedTo": "https://example.org/bob",
|
||||
// "committed": "2019-07-26T23:45:01Z",
|
||||
// "committedBy": "https://example.dev/alice",
|
||||
// "context": "https://example.dev/alice/myrepo",
|
||||
// "committedBy": "https://example.org/alice",
|
||||
// "context": "https://example.org/alice/myrepo",
|
||||
// "created": "2019-07-11T12:34:56Z",
|
||||
// "description": {
|
||||
// "content": "It's about time people can install on their computers!",
|
||||
// "mediaType": "text/plain"
|
||||
// },
|
||||
// "hash": "109ec9a09c7df7fec775d2ba0b9d466e5643ec8c",
|
||||
// "id": "https://example.dev/alice/myrepo/commits/109ec9a09c7df7fec775d2ba0b9d466e5643ec8c",
|
||||
// "id": "https://example.org/alice/myrepo/commits/109ec9a09c7df7fec775d2ba0b9d466e5643ec8c",
|
||||
// "summary": "Add an installation script, fixes issue #89",
|
||||
// "type": "Commit"
|
||||
// }
|
||||
|
|
22
vendor/github.com/go-fed/activity/streams/vocab/gen_type_forgefed_push_interface.go
generated
vendored
22
vendor/github.com/go-fed/activity/streams/vocab/gen_type_forgefed_push_interface.go
generated
vendored
|
@ -9,17 +9,17 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "actor": "https://example.dev/aviva",
|
||||
// "context": "https://example.dev/aviva/myproject",
|
||||
// "id": "https://example.dev/aviva/outbox/reBGo",
|
||||
// "actor": "https://example.org/aviva",
|
||||
// "context": "https://example.org/aviva/myproject",
|
||||
// "id": "https://example.org/aviva/outbox/reBGo",
|
||||
// "object": {
|
||||
// "items": [
|
||||
// {
|
||||
// "attributedTo": "https://example.dev/aviva",
|
||||
// "context": "https://example.dev/aviva/myproject",
|
||||
// "attributedTo": "https://example.org/aviva",
|
||||
// "context": "https://example.org/aviva/myproject",
|
||||
// "created": "2019-11-03T13:43:59Z",
|
||||
// "hash": "d96596230322716bd6f87a232a648ca9822a1c20",
|
||||
// "id": "https://example.dev/aviva/myproject/commits/d96596230322716bd6f87a232a648ca9822a1c20",
|
||||
// "id": "https://example.org/aviva/myproject/commits/d96596230322716bd6f87a232a648ca9822a1c20",
|
||||
// "summary": "Provide hints in sign-up form fields",
|
||||
// "type": "Commit"
|
||||
// }
|
||||
|
@ -29,12 +29,12 @@
|
|||
// },
|
||||
// "summary": "\u003cp\u003eAviva pushed a commit to
|
||||
// myproject\u003c/p\u003e",
|
||||
// "target": "https://example.dev/aviva/myproject/branches/master",
|
||||
// "target": "https://example.org/aviva/myproject/branches/master",
|
||||
// "to": [
|
||||
// "https://example.dev/aviva/followers",
|
||||
// "https://example.dev/aviva/myproject",
|
||||
// "https://example.dev/aviva/myproject/team",
|
||||
// "https://example.dev/aviva/myproject/followers"
|
||||
// "https://example.org/aviva/followers",
|
||||
// "https://example.org/aviva/myproject",
|
||||
// "https://example.org/aviva/myproject/team",
|
||||
// "https://example.org/aviva/myproject/followers"
|
||||
// ],
|
||||
// "type": "Push"
|
||||
// }
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "assignedTo": "https://example.dev/alice",
|
||||
// "attributedTo": "https://dev.community/bob",
|
||||
// "assignedTo": "https://example.org/alice",
|
||||
// "attributedTo": "https://example.com/bob",
|
||||
// "content": "\u003cp\u003ePlease fix.
|
||||
// \u003ci\u003eEverything\u003c/i\u003e is broken!\u003c/p\u003e",
|
||||
// "context": "https://example.dev/alice/myrepo",
|
||||
// "id": "https://example.dev/alice/myrepo/issues/42",
|
||||
// "context": "https://example.org/alice/myrepo",
|
||||
// "id": "https://example.org/alice/myrepo/issues/42",
|
||||
// "isResolved": false,
|
||||
// "mediaType": "text/html",
|
||||
// "source": {
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
// "https://www.w3.org/ns/activitystreams",
|
||||
// "https://forgefed.peers.community/ns"
|
||||
// ],
|
||||
// "attributedTo": "https://example.dev/alice",
|
||||
// "id": "https://example.dev/ticket-deps/2342593",
|
||||
// "object": "https://dev.community/bob/coolproj/issues/85",
|
||||
// "attributedTo": "https://example.org/alice",
|
||||
// "id": "https://example.org/ticket-deps/2342593",
|
||||
// "object": "https://example.com/bob/coolproj/issues/85",
|
||||
// "published": "2019-07-11T12:34:56Z",
|
||||
// "relationship": "dependsOn",
|
||||
// "subject": "https://example.dev/alice/myproj/issues/42",
|
||||
// "subject": "https://example.org/alice/myproj/issues/42",
|
||||
// "summary": "Alice's ticket depends on Bob's ticket",
|
||||
// "type": [
|
||||
// "Relationship",
|
||||
|
|
3
vendor/modules.txt
vendored
3
vendor/modules.txt
vendored
|
@ -63,7 +63,7 @@ github.com/gin-gonic/gin/render
|
|||
# github.com/go-errors/errors v1.4.0
|
||||
## explicit
|
||||
github.com/go-errors/errors
|
||||
# github.com/go-fed/activity v1.0.1-0.20210426194615-e0de0863dcc1
|
||||
# github.com/go-fed/activity v1.0.1-0.20210803212804-d866ba75dd0f
|
||||
## explicit
|
||||
github.com/go-fed/activity/pub
|
||||
github.com/go-fed/activity/streams
|
||||
|
@ -105,6 +105,7 @@ github.com/go-fed/activity/streams/impl/activitystreams/property_liked
|
|||
github.com/go-fed/activity/streams/impl/activitystreams/property_likes
|
||||
github.com/go-fed/activity/streams/impl/activitystreams/property_location
|
||||
github.com/go-fed/activity/streams/impl/activitystreams/property_longitude
|
||||
github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers
|
||||
github.com/go-fed/activity/streams/impl/activitystreams/property_mediatype
|
||||
github.com/go-fed/activity/streams/impl/activitystreams/property_name
|
||||
github.com/go-fed/activity/streams/impl/activitystreams/property_next
|
||||
|
|
Loading…
Reference in a new issue