60 行
1.8 KiB
Go
60 行
1.8 KiB
Go
package pub
|
|
|
|
import (
|
|
"github.com/go-fed/activity/vocab"
|
|
"net/url"
|
|
)
|
|
|
|
// ActorObject is an object that has "actor" or "attributedTo" properties,
|
|
// representing the author or originator of the object.
|
|
type ActorObject interface {
|
|
// TODO: Populate
|
|
}
|
|
|
|
// DeliverableObject is an object that is able to be sent to recipients via the
|
|
// "to", "bto", "cc", "bcc", and "audience" objects and/or links and/or IRIs.
|
|
type DeliverableObject interface {
|
|
ActorObject
|
|
ToLen() (l int)
|
|
IsToObject(index int) (ok bool)
|
|
GetToObject(index int) (v vocab.ObjectType)
|
|
IsToLink(index int) (ok bool)
|
|
GetToLink(index int) (v vocab.LinkType)
|
|
IsToIRI(index int) (ok bool)
|
|
GetToIRI(index int) (v url.URL)
|
|
BtoLen() (l int)
|
|
IsBtoObject(index int) (ok bool)
|
|
GetBtoObject(index int) (v vocab.ObjectType)
|
|
RemoveBtoObject(index int)
|
|
IsBtoLink(index int) (ok bool)
|
|
GetBtoLink(index int) (v vocab.LinkType)
|
|
RemoveBtoLink(index int)
|
|
IsBtoIRI(index int) (ok bool)
|
|
GetBtoIRI(index int) (v url.URL)
|
|
RemoveBtoIRI(index int)
|
|
CcLen() (l int)
|
|
IsCcObject(index int) (ok bool)
|
|
GetCcObject(index int) (v vocab.ObjectType)
|
|
IsCcLink(index int) (ok bool)
|
|
GetCcLink(index int) (v vocab.LinkType)
|
|
IsCcIRI(index int) (ok bool)
|
|
GetCcIRI(index int) (v url.URL)
|
|
BccLen() (l int)
|
|
IsBccObject(index int) (ok bool)
|
|
GetBccObject(index int) (v vocab.ObjectType)
|
|
RemoveBccObject(index int)
|
|
IsBccLink(index int) (ok bool)
|
|
GetBccLink(index int) (v vocab.LinkType)
|
|
RemoveBccLink(index int)
|
|
IsBccIRI(index int) (ok bool)
|
|
GetBccIRI(index int) (v url.URL)
|
|
RemoveBccIRI(index int)
|
|
AudienceLen() (l int)
|
|
IsAudienceObject(index int) (ok bool)
|
|
GetAudienceObject(index int) (v vocab.ObjectType)
|
|
IsAudienceLink(index int) (ok bool)
|
|
GetAudienceLink(index int) (v vocab.LinkType)
|
|
IsAudienceIRI(index int) (ok bool)
|
|
GetAudienceIRI(index int) (v url.URL)
|
|
}
|