internal

package
v4.9.11 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigType = "Configuration"
	ViewType   = "View"
	ZoneType   = "Zone"
	TXTType    = "TXTRecord"
)

Object types.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int
	Resource   string
	Message    string
}

func (APIError) Error

func (a APIError) Error() string

type Client

type Client struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseURL string) *Client

func (*Client) AddEntity

func (c *Client) AddEntity(parentID uint, entity Entity) (uint64, error)

AddEntity A generic method for adding configurations, DNS zones, and DNS resource records. https://docs.bluecatnetworks.com/r/Address-Manager-API-Guide/POST/v1/addEntity/9.1.0

func (*Client) Delete

func (c *Client) Delete(objectID uint) error

Delete Deletes an object using the generic delete method. https://docs.bluecatnetworks.com/r/Address-Manager-API-Guide/DELETE/v1/delete/9.1.0

func (*Client) Deploy

func (c *Client) Deploy(entityID uint) error

Deploy the DNS config for the specified entity to the authoritative servers. https://docs.bluecatnetworks.com/r/Address-Manager-API-Guide/POST/v1/quickDeploy/9.1.0

func (*Client) GetEntityByName

func (c *Client) GetEntityByName(parentID uint, name, objType string) (*EntityResponse, error)

GetEntityByName Returns objects from the database referenced by their database ID and with its properties fields populated. https://docs.bluecatnetworks.com/r/Address-Manager-API-Guide/GET/v1/getEntityById/9.1.0

func (*Client) Login

func (c *Client) Login(username, password string) error

Login Logs in as API user. Authenticates and receives a token to be used in for subsequent requests. https://docs.bluecatnetworks.com/r/Address-Manager-API-Guide/GET/v1/login/9.1.0

func (*Client) Logout

func (c *Client) Logout() error

Logout Logs out of the current API session. https://docs.bluecatnetworks.com/r/Address-Manager-API-Guide/GET/v1/logout/9.1.0

func (*Client) LookupParentZoneID

func (c *Client) LookupParentZoneID(viewID uint, fqdn string) (uint, string, error)

LookupParentZoneID Return the entityId of the parent zone by recursing from the root view. Also return the simple name of the host.

func (*Client) LookupViewID

func (c *Client) LookupViewID(configName, viewName string) (uint, error)

LookupViewID Find the DNS view with the given name within.

type Entity

type Entity struct {
	ID         string `json:"id,omitempty"`
	Name       string `json:"name"`
	Type       string `json:"type"`
	Properties string `json:"properties"`
}

Entity JSON body for Bluecat entity requests.

type EntityResponse

type EntityResponse struct {
	ID         uint   `json:"id"`
	Name       string `json:"name"`
	Type       string `json:"type"`
	Properties string `json:"properties"`
}

EntityResponse JSON body for Bluecat entity responses.

Jump to

Keyboard shortcuts

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