types

package
v0.0.0-...-e0ac650 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterMetadata

type CharacterMetadata struct {
	Type    string `json:"type"`
	URI     string `json:"uri"`
	Content struct {
		Name    string   `json:"name"`
		Avatars []string `json:"avatars"`
		Banners []struct {
			Address  string `json:"address"`
			MimeType string `json:"mime_type"`
		} `json:"banners"`
		Websites   []string `json:"websites"`
		Attributes []struct {
			Value     any    `json:"value"` // Could be anything
			TraitType string `json:"trait_type"`
		} `json:"attributes"`
		ConnectedAccounts []interface{} `json:"connected_accounts"`
	} `json:"content"`
}

type ConcurrencyChannels

type ConcurrencyChannels struct {
	Stateful  *ConcurrencyControl
	Stateless *ConcurrencyControl
	Direct    *ConcurrencyControl
}

type ConcurrencyControl

type ConcurrencyControl struct {
	// contains filtered or unexported fields
}

func NewCtrl

func NewCtrl(limit int) *ConcurrencyControl

func (*ConcurrencyControl) Done

func (cc *ConcurrencyControl) Done()

func (*ConcurrencyControl) Request

func (cc *ConcurrencyControl) Request()

type ConnectedAccountsObject

type ConnectedAccountsObject struct {
	URI   string `json:"uri"`
	Extra struct {
		Witness          string `json:"witness"`
		Algorithm        string `json:"algorithm"`
		Signature        string `json:"signature"`
		SignaturePayload string `json:"signature_payload"`
	} `json:"extra"`
}

type ConnectedAccountsString = string

type NoteAttachment

type NoteAttachment struct {
	Name     *string `json:"name,omitempty"`
	Address  *string `json:"address,omitempty"`
	Content  *string `json:"content,omitempty"`
	MimeType *string `json:"mime_type,omitempty"`
	FileSize *uint   `json:"size_in_bytes,omitempty"`

	// Image & Video specified
	Alt    *string `json:"alt,omitempty"`
	Width  *uint   `json:"width,omitempty"`
	Height *uint   `json:"height,omitempty"`
}

type NoteAttribute

type NoteAttribute struct {
	Value       any    `json:"value"` // string | number | boolean | null
	TraitType   string `json:"trait_type,omitempty"`
	DisplayType string `json:"display_type"` // 'string' | 'number' | 'date' | 'boolean'
}

type NoteMetadata

type NoteMetadata struct {
	Type           string           `json:"type"` // "note"
	Authors        []string         `json:"authors"`
	Title          *string          `json:"title,omitempty"`
	Content        *string          `json:"content,omitempty"`
	Tags           []string         `json:"tags,omitempty"`
	Attachments    []NoteAttachment `json:"attachments,omitempty"`
	Sources        []string         `json:"sources,omitempty"`
	Attributes     []NoteAttribute  `json:"attributes,omitempty"`
	ExternalUrls   []string         `json:"external_urls,omitempty"`
	ContentWarning *string          `json:"content_warning,omitempty"` // 'nsfw' | 'sensitive' | 'spoiler'
	DatePublished  *string          `json:"date_published,omitempty"`  // ISO8601
}

https://github.com/Crossbell-Box/crossbell.js/blob/c5ff4c2/src/types/metadata/note.ts#L49

Jump to

Keyboard shortcuts

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