ns1-go.v2: gopkg.in/ns1/ns1-go.v2/rest/model/account Index | Files

package account

import "gopkg.in/ns1/ns1-go.v2/rest/model/account"

Package account contains definitions for NS1 apikeys/teams/users/etc.


Package Files

apikey.go doc.go permissions.go settings.go team.go user.go warning.go

type APIKey Uses

type APIKey struct {
    // Read-only fields
    ID         string `json:"id,omitempty"`
    Key        string `json:"key,omitempty"`
    LastAccess int    `json:"last_access,omitempty"`

    Name        string         `json:"name"`
    TeamIDs     []string       `json:"teams"`
    Permissions PermissionsMap `json:"permissions"`

APIKey wraps an NS1 /account/apikeys resource

type Address Uses

type Address struct {
    Country string `json:"country,omitempty"`
    Street  string `json:"street,omitempty"`
    State   string `json:"state,omitempty"`
    City    string `json:"city,omitempty"`
    Postal  string `json:"postalcode,omitempty"`

Address for Setting struct.

type NotificationSettings Uses

type NotificationSettings struct {
    Billing bool `json:"billing"`

NotificationSettings wraps a User's "notify" attribute

type PermissionsAccount Uses

type PermissionsAccount struct {
    ManageUsers           bool `json:"manage_users"`
    ManagePaymentMethods  bool `json:"manage_payment_methods"`
    ManagePlan            bool `json:"manage_plan"`
    ManageTeams           bool `json:"manage_teams"`
    ManageApikeys         bool `json:"manage_apikeys"`
    ManageAccountSettings bool `json:"manage_account_settings"`
    ViewActivityLog       bool `json:"view_activity_log"`
    ViewInvoices          bool `json:"view_invoices"`

PermissionsAccount wraps a User's "permissions.account" attribute

type PermissionsDNS Uses

type PermissionsDNS struct {
    ViewZones           bool     `json:"view_zones"`
    ManageZones         bool     `json:"manage_zones"`
    ZonesAllowByDefault bool     `json:"zones_allow_by_default"`
    ZonesDeny           []string `json:"zones_deny"`
    ZonesAllow          []string `json:"zones_allow"`

PermissionsDNS wraps a User's "permissions.dns" attribute

type PermissionsData Uses

type PermissionsData struct {
    PushToDatafeeds   bool `json:"push_to_datafeeds"`
    ManageDatasources bool `json:"manage_datasources"`
    ManageDatafeeds   bool `json:"manage_datafeeds"`

PermissionsData wraps a User's "permissions.data" attribute

type PermissionsMap Uses

type PermissionsMap struct {
    DNS        PermissionsDNS        `json:"dns"`
    Data       PermissionsData       `json:"data"`
    Account    PermissionsAccount    `json:"account"`
    Monitoring PermissionsMonitoring `json:"monitoring"`

PermissionsMap wraps a User's "permissions" attribute

type PermissionsMonitoring Uses

type PermissionsMonitoring struct {
    ManageLists bool `json:"manage_lists"`
    ManageJobs  bool `json:"manage_jobs"`
    ViewJobs    bool `json:"view_jobs"`

PermissionsMonitoring wraps a User's "permissions.monitoring" attribute

type Setting Uses

type Setting struct {
    CustomerID int     `json:"customerid,omitempty"`
    FirstName  string  `json:"firstname,omitempty"`
    LastName   string  `json:"lastname,omitempty"`
    Company    string  `json:"company,omitempty"`
    Phone      string  `json:"phone,omitempty"`
    Email      string  `json:"email,omitempty"`
    Address    Address `json:"address,omitempty"`

Setting represents an accounts' contact info.

type Team Uses

type Team struct {
    ID          string         `json:"id,omitempty"`
    Name        string         `json:"name"`
    Permissions PermissionsMap `json:"permissions"`

Team wraps an NS1 /accounts/teams resource

type UsageWarning Uses

type UsageWarning struct {
    Records Warning `json:"records"`
    Queries Warning `json:"queries"`

UsageWarning wraps an NS1 /account/usagewarnings resource

type User Uses

type User struct {
    // Read-only fields
    LastAccess float64 `json:"last_access"`

    Name        string               `json:"name"`
    Username    string               `json:"username"`
    Email       string               `json:"email"`
    TeamIDs     []string             `json:"teams"`
    Notify      NotificationSettings `json:"notify"`
    Permissions PermissionsMap       `json:"permissions"`

User wraps an NS1 /account/users resource

type Warning Uses

type Warning struct {
    Send bool `json:"send_warnings"`

    First  int `json:"warning_1"`
    Second int `json:"warning_2"`

Warning contains alerting toggles and thresholds for overage warning alert messages. First thresholds must be smaller than Second ones and all thresholds must be percentages between 0 and 100.

Package account is imported by 9 packages. Updated 2019-11-27. Refresh now. Tools for package owners.