mirror of
https://github.com/ProtonMail/go-proton-api.git
synced 2025-12-23 23:57:50 -05:00
16 lines
281 B
Go
16 lines
281 B
Go
package proton
|
|
|
|
import "context"
|
|
|
|
func (m *Manager) GetDomains(ctx context.Context) ([]string, error) {
|
|
var res struct {
|
|
Domains []string
|
|
}
|
|
|
|
if _, err := m.r(ctx).SetResult(&res).Get("/core/v4/domains/available"); err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return res.Domains, nil
|
|
}
|