models

package
v0.0.0-...-05462b1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Aliases  []string  `json:"aliases"`    // email aliases
	Birthday string    `json:"birth_date"` // birthday YYYY-MM-DD
	Counters *Counters `json:"counters"`
	Domain   string    `json:"domain"`   // domain name
	Enabled  string    `json:"enabled"`  // email account status
	Error    string    `json:"error"`    // error code
	FName    string    `json:"fname"`    // last name
	IName    string    `json:"iname"`    // first name
	Login    string    `json:"login"`    // email address
	MailList string    `json:"maillist"` // email for newsletter
	Question string    `json:"hintq"`    // secret question
	Ready    string    `json:"ready"`    // ready to work
	Sex      int       `json:"sex"`      // 0 - not set; 1 - male; 2 - female
	Success  string    `json:"success"`  // request status
	UID      int       `json:"uid"`      // email id
	User     string    `json:"fio"`      // full name
}

Account struct

func (*Account) Add

func (a *Account) Add(account string) (*Account, error)

Add account in domain.

func (*Account) Disable

func (a *Account) Disable(accountName string) (*Account, error)

Disable account

func (*Account) Enable

func (a *Account) Enable(accountName string) (*Account, error)

Enable diactivated account

func (*Account) Remove

func (a *Account) Remove(accountName string) (*Account, error)

Remove domain from YandexPDD.

func (*Account) UnreadMail

func (a *Account) UnreadMail(account string) (*Account, error)

UnreadMail gets count of unread emails in account.

func (*Account) Update

func (a *Account) Update(accountName string, params map[string]string) (*Account, error)

Update account informations

type Counters

type Counters struct {
	Unread int `json:"unread"`
	New    int `json:"new"`
}

Counters of unread mails struct

type DKIM

type DKIM struct {
	Status    string `json:"enabled"`   // dkim connection status
	TxtRecord string `json:"txtrecord"` // TXT record
	NSReady   string `json:"nsready"`   // presence of the TXT record
	MailReady string // YandexPDD readiness to sign letters according to DKIM
	SecretKey string // DKIM secret key
}

DKIM structure

type DNSRecord

type DNSRecord struct {
	Content   string `json:"content"`
	Domain    string `json:"domain"`
	FQDN      string `json:"fqdn"`
	RecordID  int64  `json:"record_id"`
	Subdomain string `json:"subdomain"`
	TTL       int    `json:"ttl"`
	Type      string `json:"type"`
}

DNSRecord structure.

type DNSRecords

type DNSRecords struct {
	Records []*DNSRecord `json:"records"` // dns records
	Success string       `json:"success"` // request status
	Error   string       `json:"error"`   // error message
}

DNSRecords structure.

func (*DNSRecords) DNSRecords

func (d *DNSRecords) DNSRecords(domainName string) (*DNSRecords, error)

DNSRecords gets list of dns records in domain.

type Domain

type Domain struct {
	Accounts       []*Account `json:"accounts"`      // user account
	Aliases        []string   `json:"aliases"`       // list of domain aliases
	CheckResults   string     `json:"check_results"` // last check result
	Country        string     `json:"country"`       // interface language for mailboxes by default.
	Delegated      string     `json:"delegated"`     // status of the domain name delegation on the Yandex servers
	DKIM           DKIM
	Domain         string   `json:"domain"`           // domain name
	EmailsCount    int      `json:"emails-count"`     // number of available mailboxes
	EmailsMaxCount int      `json:"emails-max-count"` // maximum number of mailboxes that can be created for the domain
	Error          string   `json:"error"`            // error message
	ImapEnabled    int      `json:"imap_enabled"`     // imap status
	LastCheck      string   `json:"last_check"`       // date and time of last check
	LogoURL        string   `json:"logo_url"`         // logo URL
	Name           string   `json:"name"`             // domain name
	NextCheck      string   `json:"next_check"`       // date and time of next check
	NoDKIM         bool     `json:"nodkim"`           // a sign that DKIM is not connected
	NSDelegated    bool     `json:"nsdelegated"`      // status of the domain name delegation on the Yandex servers
	PopEnabled     int      `json:"pop_enabled"`      // pop status
	Secrets        *Secrets `json:"secrets"`          // Secret data test file (or CNAME records)
	Status         string   `json:"status"`           // domain status
	Success        string   `json:"success"`          // request status
	Total          int      `json:"total"`            // total counts of user account
}

Domain struct

func (*Domain) Add

func (d *Domain) Add(domainName string) (*Domain, error)

Add domain into Yandex PDD.

func (*Domain) Config

func (d *Domain) Config(domainName string) (*Domain, error)

Config gets domain settings.

func (*Domain) ConnectionStatus

func (d *Domain) ConnectionStatus(domainName string) (*Domain, error)

ConnectionStatus gets domain connetion status.

func (*Domain) DKIMDisable

func (d *Domain) DKIMDisable(domainName string) (*Domain, error)

DKIMDisable for domain.

func (*Domain) DKIMEnable

func (d *Domain) DKIMEnable(domainName string) (*Domain, error)

DKIMEnable for domain.

func (*Domain) DKIMStatus

func (d *Domain) DKIMStatus(domainName string) (*Domain, error)

DKIMStatus gets DKIM informations.

func (*Domain) List

func (d *Domain) List(domainName string) (*Domain, error)

List accounts in domain.

func (*Domain) Remove

func (d *Domain) Remove(domainName string) (*Domain, error)

Remove domain from YandexPDD.

func (*Domain) SetCountry

func (d *Domain) SetCountry(domainName string) (*Domain, error)

SetCountry for domain.

type Domains

type Domains struct {
	Total   int       `json:"total"`   // total counts of user domains
	Domains []*Domain `json:"domains"` // list of domains
	Success string    `json:"success"` // request status
	Error   string    `json:"error"`   // error message
}

Domains struct

func (*Domains) List

func (d *Domains) List() (*Domains, error)

List gets list of user domains.

type Secrets

type Secrets struct {
	Name    string `json:"name"`    // secret part of the actual file name (or CNAME records)
	Content string `json:"content"` // secret contents of the test file
}

Secrets data struct

Jump to

Keyboard shortcuts

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