infoblox

package
v0.0.0-...-ca89114 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package infoblox is responsible for communication with Infoblox instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Username   string
	Password   string
	ClientCert []byte
	ClientKey  []byte
}

AuthConfig contains authentication parameters to use for authenticating against the API.

func AuthConfigFromSecretData

func AuthConfigFromSecretData(data map[string][]byte) (AuthConfig, error)

AuthConfigFromSecretData creates a AuthConfig from the contents of a secret. The secret must contain either username/password or clientCert/clientKey values. The former is used if both are present.

type Client

type Client interface {
	// GetOrAllocateAddress allocates an address for a given hostname if none exists, and returns the new or existing address.
	GetOrAllocateAddress(view string, subnet netip.Prefix, hostname, zone string) (netip.Addr, error)
	// ReleaseAddress releases an address for a given hostname.
	ReleaseAddress(view string, subnet netip.Prefix, hostname string) error
	// CheckNetworkViewExists checks if Infoblox network view exists
	CheckNetworkViewExists(view string) (bool, error)
	// CheckNetworkExists checks if Infoblox network exists
	CheckNetworkExists(view string, subnet netip.Prefix) (bool, error)
	GetHostConfig() *HostConfig
}

Client is a wrapper around the infoblox client that can allocate and release addresses indempotently.

func NewClient

func NewClient(config Config) (Client, error)

NewClient creates a new infoblox client.

type Config

type Config struct {
	HostConfig
	AuthConfig
}

Config is a wrapper config structures.

type HostConfig

type HostConfig struct {
	Host                   string
	Version                string
	DisableTLSVerification bool
	CustomCAPath           string
	DefaultNetworkView     string
}

HostConfig contains host configuration patameters.

Directories

Path Synopsis
Package ibmock is a generated GoMock package.
Package ibmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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