idec

package
v0.0.0-...-e8bbdd1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareMessageForSend

func PrepareMessageForSend(m Message) string

PrepareMessageForSend Make base64 encoded message

Types

type Echo

type Echo struct {
	Name        string `json:"name"`
	Size        int    `json:"size"`
	Description string `json:"description"`
}

Echo echo description

func ParseEchoList

func ParseEchoList(list string) ([]Echo, error)

ParseEchoList parse /list.txt

type Extensions

type Extensions struct {
	ListTXT      string `json:"list_txt"`
	BlacklistTXT string `json:"backlist_txt"`
	Features     string `json:"features"`
	XCount       string `json:"xcount"`
}

Extensions IDEC extensions

func NewExtensions

func NewExtensions() Extensions

NewExtensions ...

type FetchConfig

type FetchConfig struct {
	Node   string   `json:"node"`
	Echoes []string `json:"echo"`
	Num    int      `json:"count"`
	Offset int      `json:"offset"`
	Limit  int      `json:"limit"`
}

FetchConfig node, echo, and other connection settings

func (FetchConfig) GetAllMessagesIDS

func (f FetchConfig) GetAllMessagesIDS() ([]ID, error)

GetAllMessagesIDS get all message ids from node

func (FetchConfig) GetEchoList

func (f FetchConfig) GetEchoList() ([]Echo, error)

GetEchoList ...

func (FetchConfig) GetMessagesIDS

func (f FetchConfig) GetMessagesIDS() ([]ID, error)

GetMessagesIDS get message ids from node

func (FetchConfig) GetRawMessages

func (f FetchConfig) GetRawMessages(ids []ID) ([]MSG, error)

GetRawMessages get messages from node

type ID

type ID struct {
	Echo  string `json:"echo"`
	MsgID string `json:"msgids"`
}

ID ...

type MSG

type MSG struct {
	Message string `json:"message"`
	ID      string `json:"id"`
}

MSG ...

type Message

type Message struct {
	From      string `json:"from"`
	To        string `json:"to"`
	Address   string `json:"address"`
	Echo      string `json:"echo"`
	Subg      string `json:"subg"`
	ID        string `json:"id"`
	Timestamp int    `json:"timestamp"`
	Body      string `json:"body"`
	Tags      string `json:"tags"`
	Repto     string `json:"repto"`
}

Message IDEC message structure

func ParseMessage

func ParseMessage(message string) (Message, error)

ParseMessage ...

Jump to

Keyboard shortcuts

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