bovine_store.models
BovineActor
Bases: Model
Source code in bovine_store/bovine_store/models.py
bovine_name = fields.CharField(max_length=255, unique=True)
class-attribute
instance-attribute
Internally used name to identify the actor — unique
handle_name = fields.CharField(max_length=255)
class-attribute
instance-attribute
The preferred user name - not necessarily unique
unsure if really necessary here
properties = fields.JSONField()
class-attribute
instance-attribute
Additional properties of the actor
For example: name, url or icon. Currently arbitrary properties are not allowed yet, but should be in the future. Some thinking is needed here how to handle the context and so on.
BovineActorEndpoint
Bases: Model
Source code in bovine_store/bovine_store/models.py
bovine_actor = fields.ForeignKeyField('models.BovineActor', related_name='endpoints')
class-attribute
instance-attribute
The actor this endpoint belongs to
endpoint_type = fields.CharEnumField(enum_type=EndpointType)
class-attribute
instance-attribute
type of the endpoint, e.g. endpoint
name = fields.CharField(max_length=255)
class-attribute
instance-attribute
The url the endpoint points to
stream_name = fields.CharField(max_length=255)
class-attribute
instance-attribute
Human readable name of the endpoint
BovineActorKeyPair
Bases: Model
Represents identifiers associated with the actor. It contains currently a mix of identities. These are:
- server key, e.g. RSA key pair for HTTP Signatures
- identifiers used to lookup the actor, e.g. acct:handle@domain
- did keys used to identify one is a BovineClient
FIXME: Do we need a type, an order, a should display? Think about these things https://socialhub.activitypub.rocks/t/alsoknownas-and-acct/3132?u=helge
Source code in bovine_store/bovine_store/models.py
bovine_actor = fields.ForeignKeyField('models.BovineActor', related_name='keypairs')
class-attribute
instance-attribute
The actor this keypair belongs to
name = fields.CharField(max_length=255)
class-attribute
instance-attribute
Human readable name
private_key = fields.TextField(null=True)
class-attribute
instance-attribute
the secret in the keypair. The private_key is null if the keypair is used to gain access to the Actor from a Client
public_key = fields.TextField()
class-attribute
instance-attribute
the public key
CollectionItem
Bases: Model
Source code in bovine_store/bovine_store/models.py
id = fields.IntField(primary_key=True)
class-attribute
instance-attribute
id of the collection, an integer, used for pagination
object_id = fields.CharField(max_length=255)
class-attribute
instance-attribute
id of the element in the collection
part_of = fields.CharField(max_length=255)
class-attribute
instance-attribute
id of the collection
StoredJsonObject
Bases: Model
Stores an object
Source code in bovine_store/bovine_store/models.py
content = fields.JSONField()
class-attribute
instance-attribute
content of the object as json
id = fields.CharField(max_length=255, primary_key=True)
class-attribute
instance-attribute
The id of the object
owner = fields.CharField(max_length=255)
class-attribute
instance-attribute
The owner of the object, usually either
- content[“actor”]
- content[“attributedTo”]
VisibleTo
Bases: Model
Source code in bovine_store/bovine_store/models.py
main_object = fields.ForeignKeyField('models.StoredJsonObject', related_name='visible_to')
class-attribute
instance-attribute
Stored object, has foreign key
object_id = fields.CharField(max_length=255)
class-attribute
instance-attribute
id of the object that it is visible to