Versions in this module Expand all Collapse all v0 v0.1.1 Jul 16, 2022 v0.1.0 Jun 26, 2022 Changes in this version + var ActorCache = make(map[string]Actor) + func AcceptActivity(header string) bool + func AddInstanceToIndexDB(actor string) error + func CreatePem(actor Actor) error + func CreatePublicKeyFromPrivate(actor *Actor, publicKeyPem string) error + func FingerRequest(actor string, instance string) (*http.Response, error) + func GetActorAndInstance(path string) (string, string) + func GetActorFollowNameFromPath(path string) string + func GetActorPemFileFromDB(pemID string) (string, error) + func GetObjectsWithoutPreviewsCallback(...) error + func GetToFromJson(to []byte) ([]string, error) + func HasContextFromJson(context []byte) (bool, error) + func StorePemToDB(actor Actor) error + type Activity struct + Actor *Actor + Auth string + Bto []string + Cc []string + Id string + Name string + Object ObjectBase + Published time.Time + Summary string + To []string + Type string + func GetActivityFromJson(ctx *fiber.Ctx) (Activity, error) + func (activity Activity) AcceptFollow() Activity + func (activity Activity) AddFollowersTo() (Activity, error) + func (activity Activity) CheckValid() (Collection, bool, error) + func (activity Activity) GetCollection() (Collection, error) + func (activity Activity) IsLocal() (bool, error) + func (activity Activity) MakeRequestInbox() error + func (activity Activity) MakeRequestOutbox() error + func (activity Activity) Process() error + func (activity Activity) Reject() Activity + func (activity Activity) Report(reason string) (bool, error) + func (activity Activity) SetActorFollower() (Activity, error) + func (activity Activity) SetActorFollowing() (Activity, error) + type ActivityRaw struct + ActorRaw json.RawMessage + Auth string + BtoRaw json.RawMessage + CcRaw json.RawMessage + Id string + Name string + ObjectRaw json.RawMessage + Published time.Time + Summary string + ToRaw json.RawMessage + Type string + type Actor struct + AuthRequirement []string + Followers string + Following string + Id string + Inbox string + Name string + Outbox string + PreferredUsername string + PublicKey PublicKeyPem + Restricted bool + Summary string + Type string + func CreateNewActor(board string, prefName string, summary string, authReq []string, ...) *Actor + func FingerActor(path string) (Actor, error) + func GetActor(id string) (Actor, error) + func GetActorByNameFromDB(name string) (Actor, error) + func GetActorFromDB(id string) (Actor, error) + func GetActorFromJson(actor []byte) (Actor, error) + func GetBoards() ([]Actor, error) + func (actor Actor) ActivitySign(signature string) (string, error) + func (actor Actor) AddFollower(follower string) error + func (actor Actor) ArchivePosts() error + func (actor Actor) AutoFollow() error + func (actor Actor) CreateVerification(verify util.Verify) error + func (actor Actor) DeleteCache() error + func (actor Actor) DeleteVerification(verify util.Verify) error + func (actor Actor) GetAllArchive(offset int) (Collection, error) + func (actor Actor) GetAutoSubscribe() (bool, error) + func (actor Actor) GetCatalogCollection() (Collection, error) + func (actor Actor) GetCollection() (Collection, error) + func (actor Actor) GetCollectionPage(page int) (Collection, error) + func (actor Actor) GetCollectionType(nType string) (Collection, error) + func (actor Actor) GetCollectionTypeLimit(nType string, limit int) (Collection, error) + func (actor Actor) GetFollowFromName(name string) ([]string, error) + func (actor Actor) GetFollower() ([]ObjectBase, error) + func (actor Actor) GetFollowersResp(ctx *fiber.Ctx) error + func (actor Actor) GetFollowersTotal() (int, error) + func (actor Actor) GetFollowing() ([]ObjectBase, error) + func (actor Actor) GetFollowingResp(ctx *fiber.Ctx) error + func (actor Actor) GetFollowingTotal() (int, error) + func (actor Actor) GetImgTotal() (int, error) + func (actor Actor) GetInfoResp(ctx *fiber.Ctx) error + func (actor Actor) GetJanitors() ([]util.Verify, error) + func (actor Actor) GetOutbox(ctx *fiber.Ctx) error + func (actor Actor) GetPostTotal() (int, error) + func (actor Actor) GetRecentPosts() ([]ObjectBase, error) + func (actor Actor) GetReported() ([]ObjectBase, error) + func (actor Actor) GetReportedTotal() (int, error) + func (actor Actor) GetStickies() (Collection, error) + func (actor Actor) HasValidation(ctx *fiber.Ctx) bool + func (actor Actor) IsAlreadyFollower(follow string) (bool, error) + func (actor Actor) IsAlreadyFollowing(follow string) (bool, error) + func (actor Actor) IsLocal() (bool, error) + func (actor Actor) IsValid() (Actor, bool, error) + func (actor Actor) MakeFollowActivity(follow string) (Activity, error) + func (actor Actor) ProcessInboxCreate(activity Activity) error + func (actor Actor) ReportedResp(ctx *fiber.Ctx) error + func (actor Actor) SendToFollowers(activity Activity) error + func (actor Actor) SetAutoSubscribe() error + func (actor Actor) UnArchiveLast() error + func (actor Actor) Verify(signature string, verify string) error + func (actor Actor) VerifyHeaderSignature(ctx *fiber.Ctx) bool + func (actor Actor) WantToServePage(page int) (Collection, error) + func (actor Actor) WriteCache() error + type ActorString struct + Actor string + type AtContext struct + Context string + type AtContextArray struct + Context []interface{} + type AtContextRaw struct + Context json.RawMessage + type AtContextString struct + Context string + type CcArray struct + Cc []string + type CcOjectString struct + Cc string + type Collection struct + func GetActorCollectionReq(collection string) (Collection, error) + func GetActorsFollowPostFromId(actors []string, id string) (Collection, error) + type CollectionBase struct + Actor Actor + Items []ObjectBase + OrderedItems []ObjectBase + Summary string + TotalImgs int + TotalItems int + Type string + type CryptoCur struct + Address string + Type string + type NestedObjectBase struct + Actor string + Alias string + Attachment []ObjectBase + AttributedTo string + Audience string + Bcc string + Bto []string + Cc []string + Content string + ContentHTML template.HTML + Deleted string + Duration string + EndTime string + Generator string + Href string + Icon string + Id string + Image string + InReplyTo []ObjectBase + Location string + MediaType string + Name string + Preview ObjectBase + Published time.Time + Replies *CollectionBase + Size int64 + StartTime string + Summary string + Tag []ObjectBase + To []string + TripCode string + Type string + Updated time.Time + Url []ObjectBase + func (obj NestedObjectBase) GetPreview() (*NestedObjectBase, error) + func (obj NestedObjectBase) WritePreview() error + func (obj NestedObjectBase) WritePreviewCache() error + type Object struct + Object *ObjectBase + type ObjectArray struct + Object []ObjectBase + type ObjectBase struct + Actor string + Alias string + Attachment []ObjectBase + AttributedTo string + Audience string + Bcc string + Bto []string + Cc []string + Content string + ContentHTML template.HTML + Deleted string + Duration string + EndTime string + Generator string + Href string + Icon string + Id string + Image string + InReplyTo []ObjectBase + Location string + Locked bool + MediaType string + Name string + Object *NestedObjectBase + Option []string + Preview *NestedObjectBase + Published time.Time + Replies CollectionBase + Sensitive bool + Size int64 + StartTime string + Sticky bool + Summary string + Tag []ObjectBase + To []string + TripCode string + Type string + Updated time.Time + Url []ObjectBase + Wallet []CryptoCur + func CreateAttachmentObject(file multipart.File, header *multipart.FileHeader) ([]ObjectBase, *os.File, error) + func CreateObject(objType string) ObjectBase + func GetObjectFromJson(obj []byte) (ObjectBase, error) + func (obj ObjectBase) CheckIfOP() (bool, error) + func (obj ObjectBase) CreateActivity(activityType string) (Activity, error) + func (obj ObjectBase) CreatePreview() *NestedObjectBase + func (obj ObjectBase) Delete() error + func (obj ObjectBase) DeleteAll() error + func (obj ObjectBase) DeleteAndRepliesRequest() error + func (obj ObjectBase) DeleteAttachment() error + func (obj ObjectBase) DeleteAttachmentFromFile() error + func (obj ObjectBase) DeleteInReplyTo() error + func (obj ObjectBase) DeletePreview() error + func (obj ObjectBase) DeletePreviewFromFile() error + func (obj ObjectBase) DeleteRepliedTo() error + func (obj ObjectBase) DeleteReported() error + func (obj ObjectBase) DeleteRequest() error + func (obj ObjectBase) GetAttachment() ([]ObjectBase, error) + func (obj ObjectBase) GetCollectionFromPath() (Collection, error) + func (obj ObjectBase) GetCollectionLocal() (Collection, error) + func (obj ObjectBase) GetFromPath() (ObjectBase, error) + func (obj ObjectBase) GetInReplyTo() ([]ObjectBase, error) + func (obj ObjectBase) GetOP() (string, error) + func (obj ObjectBase) GetReplies() (CollectionBase, int, int, error) + func (obj ObjectBase) GetRepliesCount() (int, int, error) + func (obj ObjectBase) GetRepliesLimit(limit int) (CollectionBase, int, int, error) + func (obj ObjectBase) GetRepliesReplies() (CollectionBase, int, int, error) + func (obj ObjectBase) GetType() (string, error) + func (obj ObjectBase) IsCached() (bool, error) + func (obj ObjectBase) IsLocal() (bool, error) + func (obj ObjectBase) IsLocked() (bool, error) + func (obj ObjectBase) IsReplyInThread(id string) (bool, error) + func (obj ObjectBase) IsSticky() (bool, error) + func (obj ObjectBase) MarkLocked(actorID string) error + func (obj ObjectBase) MarkSensitive(sensitive bool) error + func (obj ObjectBase) MarkSticky(actorID string) error + func (obj ObjectBase) SendEmailNotify() error + func (obj ObjectBase) SetAttachmentRepliesType(_type string) error + func (obj ObjectBase) SetAttachmentType(_type string) error + func (obj ObjectBase) SetPreviewRepliesType(_type string) error + func (obj ObjectBase) SetPreviewType(_type string) error + func (obj ObjectBase) SetRepliesType(_type string) error + func (obj ObjectBase) SetType(_type string) error + func (obj ObjectBase) Tombstone() error + func (obj ObjectBase) TombstoneAttachment() error + func (obj ObjectBase) TombstoneAttachmentReplies() error + func (obj ObjectBase) TombstonePreview() error + func (obj ObjectBase) TombstonePreviewReplies() error + func (obj ObjectBase) TombstoneReplies() error + func (obj ObjectBase) UpdatePreview(preview string) error + func (obj ObjectBase) UpdateType(_type string) error + func (obj ObjectBase) WantToCache(actor Actor) (bool, error) + func (obj ObjectBase) Write() (ObjectBase, error) + func (obj ObjectBase) WriteAttachment() error + func (obj ObjectBase) WriteAttachmentCache() error + func (obj ObjectBase) WriteCache() (ObjectBase, error) + func (obj ObjectBase) WriteCacheWithAttachment(attachment ObjectBase) error + func (obj ObjectBase) WriteReply() error + func (obj ObjectBase) WriteUpdate() error + func (obj ObjectBase) WriteWallet() error + func (obj ObjectBase) WriteWithAttachment(attachment ObjectBase) + type ObjectBaseSortAsc []ObjectBase + func (a ObjectBaseSortAsc) Len() int + func (a ObjectBaseSortAsc) Less(i, j int) bool + func (a ObjectBaseSortAsc) Swap(i, j int) + type ObjectBaseSortDesc []ObjectBase + func (a ObjectBaseSortDesc) Len() int + func (a ObjectBaseSortDesc) Less(i, j int) bool + func (a ObjectBaseSortDesc) Swap(i, j int) + type ObjectString struct + Object string + type PublicKeyPem struct + Id string + Owner string + PublicKeyPem string + func GetActorPemFromDB(pemID string) (PublicKeyPem, error) + type Signature struct + Algorithm string + Headers []string + KeyId string + Signature string + func ParseHeaderSignature(signature string) Signature + type ToArray struct + To []string + type ToString struct + To string + type Webfinger struct + Links []WebfingerLink + Subject string + type WebfingerLink struct + Href string + Rel string + Type string