Documentation ¶
Index ¶
- func MIMETypeFromReader(r io.Reader) (mime string, reader io.Reader)
- type Attachment
- type Config
- type Contact
- type ContactStore
- type Group
- type GroupStore
- type Message
- type MessageHandler
- type Profile
- type Signal
- func (s *Signal) GetProfile(tel string, key []byte) (*Profile, error)
- func (s *Signal) ListenAndServe() error
- func (s *Signal) NeedsRegistration() bool
- func (s *Signal) RegisterKeys() error
- func (s *Signal) RequestCode(method string) error
- func (s *Signal) SendAttachment(tel, msg string, r io.Reader) (uint64, error)
- func (s *Signal) SendGroupAttachment(hexid, msg string, r io.Reader) (uint64, error)
- func (s *Signal) SendGroupMessage(hexid string, msg string) (uint64, error)
- func (s *Signal) SendMessage(tel, msg string) (uint64, error)
- func (s *Signal) Shutdown() error
- func (s *Signal) VerifyCode(code string) error
- type SyncReadHandler
- type SyncSentHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attachment ¶
Attachment represents an attachment received from server
func (Attachment) MimeType ¶
func (a Attachment) MimeType() string
MimeType returns Attachment MIME Type
func (Attachment) Reader ¶
func (a Attachment) Reader() io.Reader
Reader returns io.Reader for attachment
type Config ¶
type Config interface { GetTel() (string, error) GetServer() (string, error) GetHTTPSignalingKey() ([]byte, error) SetHTTPSignalingKey([]byte) error GetHTTPPassword() (string, error) SetHTTPPassword(string) error }
Config is an interface for libsignal configuration
type ContactStore ¶
ContactStore is an interface for storing contact information
type Group ¶
type Group struct { ID []byte Hexid string Flags uint32 Name string Members []string Avatar *Attachment }
Group holds signal group information for sending group messages
type GroupStore ¶
type GroupStore interface { Get(string) (*Group, error) GetAll() ([]*Group, error) Save(*Group) error }
GroupStore is an interface for storing Signal Groups
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message holds incoming message information
func (Message) Attachments ¶
func (m Message) Attachments() []*Attachment
Attachments returns Message Attachments
type MessageHandler ¶
type MessageHandler interface {
Message(*Message)
}
MessageHandler is an interface for recieving signal messages
func MessageHandlerFunc ¶
func MessageHandlerFunc(f func(*Message)) MessageHandler
type Signal ¶
type Signal struct { Config Config IdentityStore axolotl.IdentityStore PreKeyStore axolotl.PreKeyStore SignedPreKeyStore axolotl.SignedPreKeyStore SessionStore axolotl.SessionStore GroupStore GroupStore ContactStore ContactStore HTTPClient *http.Client Handler interface{} // contains filtered or unexported fields }
Signal is golibsignal's Main Struct Config, HTTPClient, and All Stores required
func (*Signal) GetProfile ¶
GetProfile Gets and Decrypts Signal Profile for number
func (*Signal) ListenAndServe ¶
ListenAndServe connects to the server and handles incoming messages
func (*Signal) NeedsRegistration ¶
NeedsRegistration checks if libsignal is initalized
func (*Signal) RegisterKeys ¶
RegisterKeys creates and uploads keys to signal server, must be ran after verification
func (*Signal) RequestCode ¶
RequestCode sends code to phone for verification, allowed methods are sms and voice
func (*Signal) SendAttachment ¶
SendAttachment sends the contents of a reader, along with an optional message to a given number.
func (*Signal) SendGroupAttachment ¶
SendGroupAttachment sends the contents of a reader, along with an optional message to a given group.
func (*Signal) SendGroupMessage ¶
SendGroupMessage sends a text message to a given group
func (*Signal) SendMessage ¶
SendMessage sends the given text message to the given number
func (*Signal) VerifyCode ¶
VerifyCode verifies code sent to phone
type SyncReadHandler ¶
SyncReadHandler is required to recieve SyncRead Messages
type SyncSentHandler ¶
SyncSentHandler is required to recieve SyncSent Messages
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package axolotl implements the Axolotl ratchet as used by TextSecure protocol version 3.
|
Package axolotl implements the Axolotl ratchet as used by TextSecure protocol version 3. |
protobuf
Package textsecure is a generated protocol buffer package.
|
Package textsecure is a generated protocol buffer package. |
examples
|
|
store
|
|