Files
gochat/internal/goimap_stub/client/client.go
T
2026-06-04 15:44:48 +08:00

56 lines
1.3 KiB
Go

package client
// Stub for github.com/emersion/go-imap/client — network unavailable.
// Client represents an IMAP client.
type Client struct {
State interface{}
Mailboxes []interface{}
Updates chan interface{}
ServerName string
}
// Login logs in to the IMAP server.
func (c *Client) Login(username, password string) error {
return nil
}
// Logout logs out from the IMAP server.
func (c *Client) Logout() error {
return nil
}
// Select selects a mailbox.
func (c *Client) Select(name string, readOnly bool) (*interface{}, error) {
return nil, nil
}
// List lists mailboxes.
func (c *Client) List(ref, name string, ch chan interface{}) error {
return nil
}
// Search searches messages.
func (c *Client) Search(criteria interface{}) ([]uint32, error) {
return nil, nil
}
// Fetch fetches messages.
func (c *Client) Fetch(seqset interface{}, items interface{}, ch chan interface{}) error {
return nil
}
// Dial connects to an IMAP server.
func Dial(addr string) (*Client, error) {
return &Client{}, nil
}
// DialTLS connects to an IMAP server with TLS.
func DialTLS(addr string, config interface{}) (*Client, error) {
return &Client{}, nil
}
// NewClient creates a new client from an existing connection.
func NewClient(conn interface{}) (*Client, error) {
return &Client{}, nil
}