sections

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package sections provides types and methods for working with the sections controller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	client.Client
}

Controller is the base client for the Sections controller.

func NewController

func NewController(sess *session.Session) *Controller

NewController returns a new instance of the client for the Sections controller.

func (*Controller) CreateSection

func (c *Controller) CreateSection(in Section) (message string, err error)

CreateSection creates a section by sending a POST request.

func (*Controller) DeleteSection

func (c *Controller) DeleteSection(id int) (err error)

DeleteSection deletes a section by sending a DELETE request. All subnets and addresses in the section will be deleted as well.

func (*Controller) GetSectionByID

func (c *Controller) GetSectionByID(id int) (out Section, err error)

GetSectionByID GETs a section via its ID.

func (*Controller) GetSectionByName

func (c *Controller) GetSectionByName(name string) (out Section, err error)

GetSectionByName GETs a section via its name.

func (*Controller) GetSubnetsInSection

func (c *Controller) GetSubnetsInSection(id int) (out []subnets.Subnet, err error)

GetSubnetsInSection GETs the subnets in a section by section ID.

func (*Controller) ListSections

func (c *Controller) ListSections() (out []Section, err error)

ListSections lists all sections.

func (*Controller) UpdateSection

func (c *Controller) UpdateSection(in Section) (err error)

UpdateSection updates a section by sending a PATCH request.

type Section

type Section struct {
	// The section ID.
	ID int `json:"id,omitempty"`

	// The section's name.
	Name string `json:"name,omitempty"`

	// The section's description.
	Description string `json:"description,omitempty"`

	// The ID of the section's parent, if nested.
	MasterSection int `json:"masterSection,omitempty"`

	// A JSON object, stringified, that represents the permissions for this
	// section.
	Permissions string `json:"permissions,omitempty"`

	// Whether or not to check consistency for subnets and IP addresses.
	StrictMode phpipam.BoolIntString `json:"strictMode,omitempty"`

	// How to order subnets in this section when viewing.
	SubnetOrdering string `json:"subnetOrdering,omitempty"`

	// The order position of this section when displaying sections.
	Order int `json:"order,omitempty"`

	// The date of the last edit to this resource.
	EditDate string `json:"editDate,omitempty"`

	// Whether or not to show VLANs in the subnet listing of this section.
	ShowVLAN phpipam.BoolInt `json:"showVLAN,omitempty"`

	// Whether or not to show VRF information in the subnet listing of this
	// section.
	ShowVRF phpipam.BoolInt `json:"showVRF,omitempty"`

	// Whether or not to show only supernets in the subnet listing of this
	// section.
	ShowSupernetOnly phpipam.BoolInt `json:"showSupernetOnly,omitempty"`

	// The ID of the DNS resolver to be used for this section.
	DNS int `json:"DNS,omitempty"`
}

Section represents a PHPIPAM section.

Jump to

Keyboard shortcuts

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