Don't expose client struct.
This commit is contained in:
parent
a793114fdf
commit
fe67025b94
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Client struct {
|
type client struct {
|
||||||
JID JID
|
JID JID
|
||||||
stream *Stream
|
stream *Stream
|
||||||
}
|
}
|
||||||
|
|
@ -18,7 +18,7 @@ type ClientConfig struct {
|
||||||
InsecureSkipVerify bool
|
InsecureSkipVerify bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewClient(jid JID, password string, config *ClientConfig) (*Client, error) {
|
func NewClient(jid JID, password string, config *ClientConfig) (*client, error) {
|
||||||
|
|
||||||
stream, err := NewStream(jid.Domain + ":5222")
|
stream, err := NewStream(jid.Domain + ":5222")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -71,7 +71,7 @@ func NewClient(jid JID, password string, config *ClientConfig) (*Client, error)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return &Client{jid, stream}, nil
|
return &client{jid, stream}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func authenticate(stream *Stream, mechanisms []string, user, password string) error {
|
func authenticate(stream *Stream, mechanisms []string, user, password string) error {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue