shared

package
v0.0.0-...-91c206c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NEW_INSTANCE         = 0
	RUNNING              = 200
	UNAUTHORIZED         = 401
	FORBIDDEN            = 403
	NOT_FOUND            = 404
	UNPROCESSABLE_ENTITY = 422
	TOOMANYREQUESTS      = 429
	INTERNAL_ERROR       = 500
	CLIENT_ISSUE         = 600
	ONION_PROTOCOL       = 601
	BAD_RESPONSE         = 602
	BAD_NODEINFO         = 604
	UNSUPPORTED_INSTANCE = 605
	STREAM_ENDED         = 606
	KEEPALIVE            = 607
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountType

type AccountType struct {
	Acct         string `json:"acct"`
	Avatar       string `json:"avatar"`
	Bot          bool   `json:"bot"`
	Created_at   string `json:"created_at"`
	Display_name string `json:"display_name"`
	Url          string `json:"url"`
}

type NodeInfo

type NodeInfo struct {
	Software NodeInfoSoftware `json:"software"`
}

type NodeInfoSoftware

type NodeInfoSoftware struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type ObjectType

type ObjectType struct {
	Id string `json:"id"`
}

type PleromaStreamHeader

type PleromaStreamHeader struct {
	Event   string `json:"event"`
	Payload string `json:"payload"`
}

type ReportActivity

type ReportActivity struct {

	// Retrieved values
	Id         string `json:"id"`
	Uri        string `json:"uri"`
	Account    AccountType
	Content    string `json:"content"`
	Created_at string `json:"created_at"`
	// contains filtered or unexported fields
}

Parsing Unmarshal JSON type

type RunningInstance

type RunningInstance struct {
	Software         string      `json:"software"`
	Version          string      `json:"version"`
	Status           int         `json:"status"`
	LastRun          string      `json:"lastrun"`
	CaptureType      string      `json:"capturetype"`
	Banned           bool        `json:"-"`
	Alwaysbot        bool        `json:"-"`
	Client           http.Client `json:"-"`
	Client_id        string      `json:"-"`
	Client_secret    string      `json:"-"`
	Recentactivities *UniqueFifo `json:"-"`
	Recentactors     *UniqueFifo `json:"-"`
}

Instance's new min_id value

type UniqueFifo

type UniqueFifo struct {
	Mu sync.Mutex
	// contains filtered or unexported fields
}

func NewUniqueFifo

func NewUniqueFifo(size int) *UniqueFifo

func (*UniqueFifo) Add

func (q *UniqueFifo) Add(k string, v interface{}) bool

func (*UniqueFifo) Contains

func (q *UniqueFifo) Contains(k string) (int, interface{})

func (*UniqueFifo) Remove

func (q *UniqueFifo) Remove(r int)

type Userinfo

type Userinfo struct {
	Id                        string `"json:id"`
	Type                      string `"json:type"`
	Following                 string `"json:following"`
	Followers                 string `"json:followers"`
	Inbox                     string `"json:inbox"`
	Outbox                    string `"json:outbox"`
	Featured                  string `"json:featured"`
	PreferredUsername         string `"json:preferredUsername"`
	Name                      string `"json:name"`
	Summary                   string `"json:summary"`
	Url                       string `"json:Url"`
	ManuallyApprovesFollowers string `"json:manuallyApprovesFollowers"`
	Discoverable              string `"json:discoverable"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL