50 lines
968 B
Go
50 lines
968 B
Go
package imap
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
|
|
imapbackend "github.com/emersion/go-imap/backend"
|
|
)
|
|
|
|
var (
|
|
notImplemented = fmt.Errorf("Not yet implemented")
|
|
)
|
|
|
|
// type Session implements the User interface for emersion/go-imap
|
|
type Session struct {
|
|
ID uint64
|
|
AccountName string
|
|
ServiceName string
|
|
}
|
|
|
|
func (s *Session) Username() string {
|
|
return s.AccountName
|
|
}
|
|
|
|
func (s *Session) ListMailboxes(subscribed bool) ([]imapbackend.Mailbox, error) {
|
|
return nil, notImplemented
|
|
}
|
|
|
|
func (s *Session) GetMailbox(name string) (imapbackend.Mailbox, error) {
|
|
return nil, notImplemented
|
|
}
|
|
|
|
func (s *Session) CreateMailbox(name string) error {
|
|
return notImplemented
|
|
}
|
|
|
|
func (s *Session) DeleteMailbox(name string) error {
|
|
return notImplemented
|
|
}
|
|
|
|
func (s *Session) RenameMailbox(existingName, newName string) error {
|
|
return notImplemented
|
|
}
|
|
|
|
func (s *Session) Logout() error {
|
|
log.Printf("Ending %s session %d for %s", s.ServiceName, s.ID, s.AccountName)
|
|
|
|
return nil
|
|
}
|