sync

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImapServer

type ImapServer struct {
	Host string `json:"host" validate:"required"`
	Port *int   `json:"port"`
}

func (ImapServer) GetHost

func (i ImapServer) GetHost() string

func (ImapServer) GetPort

func (i ImapServer) GetPort() string

type Mailbox

type Mailbox struct {
	User        string `json:"user" validate:"required"`
	Password    string `json:"password" validate:"required"`
	SrcPassword string `json:"srcPassword"`
	SrcUser     string `json:"srcUser"`
	DstPassword string `json:"dstPassword"`
	DstUser     string `json:"dstUser"`
	Active      *bool  `json:"active"`
}

func (Mailbox) GetDstPassword

func (m Mailbox) GetDstPassword() string

func (Mailbox) GetDstUser

func (m Mailbox) GetDstUser() string

func (Mailbox) GetSrcPassword

func (m Mailbox) GetSrcPassword() string

func (Mailbox) GetSrcUser

func (m Mailbox) GetSrcUser() string

func (Mailbox) IsActive

func (m Mailbox) IsActive() bool

type Service

type Service struct {
	ConcurrentSyncs int
	Syncs           []Sync
}

func NewService

func NewService(concurrentSyncs int) Service

func (Service) SyncMailboxes

func (s Service) SyncMailboxes(syncs []Sync)

type Sync

type Sync struct {
	Src       ImapServer `json:"src" validate:"required"`
	Dst       ImapServer `json:"dst" validate:"required"`
	Mailboxes []Mailbox  `json:"mailboxes" validate:"required"`
}

func (Sync) GetActiveMailboxes

func (s Sync) GetActiveMailboxes() []Mailbox

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL