Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseReptoField ¶
ParseReptoField @repto:MSGID, drops @repto prefix and return raw MSGID
Types ¶
type Echo ¶
type Echo struct { Name string `json:"name"` Size int `json:"size"` Description string `json:"description"` }
Echo echo description
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
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) 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
func (FetchConfig) PostMessage ¶
func (f FetchConfig) PostMessage(authstring, message string) error
PostMessage sends prepared base64 point message to the node
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 Tags `json:"tags"` Repto string `json:"repto"` }
Message IDEC message structure
func MakeBundledMessage ¶
func MakeBundledMessage(pointMessage *PointMessage) (Message, error)
MakeBundledMessage from point message. Returns Message with empty From and Address fields you must set this somewhere outside
type PointMessage ¶
type PointMessage struct { Echo string `json:"echo"` To string `json:"to"` Subg string `json:"subg"` EmptyLine string `json:"empty_line"` Repto string `json:"repto"` Body string `json:"body"` }
PointMessage
func ParsePointMessage ¶
func ParsePointMessage(message string) (*PointMessage, error)
ParsePointMessage ...
func (*PointMessage) PrepareMessageForSend ¶
func (p *PointMessage) PrepareMessageForSend() string
PrepareMessageForSend Make base64 encoded message. Client.
func (*PointMessage) Validate ¶
func (p *PointMessage) Validate() error
Validate point message Returns error if one of the message fields is invalid Also, attach repto into body is it does not