internal

package
v4.20.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 12 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 Client

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

func NewClient

func NewClient(baseURL string, username, password string) *Client

func (*Client) AddEntity

func (c *Client) AddEntity(ctx context.Context, 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-Legacy-v1-API-Guide/POST/v1/addEntity/9.5.0

func (*Client) CreateAuthenticatedContext added in v4.12.0

func (c *Client) CreateAuthenticatedContext(ctx context.Context) (context.Context, error)

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, objectID uint) error

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

func (*Client) Deploy

func (c *Client) Deploy(ctx context.Context, entityID uint) error

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

func (*Client) GetEntityByName

func (c *Client) GetEntityByName(ctx context.Context, 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-Legacy-v1-API-Guide/GET/v1/getEntityById/9.5.0

func (*Client) Logout

func (c *Client) Logout(ctx context.Context) error

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

func (*Client) LookupParentZoneID

func (c *Client) LookupParentZoneID(ctx context.Context, viewID uint, fqdn string) (uint, string, error)

LookupParentZoneID returns the entityId of the parent zone by iterating through the root labels. Also return the simple name of the host.

func (*Client) LookupViewID

func (c *Client) LookupViewID(ctx context.Context, 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