zone

package
v0.0.0-...-54b8d16 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(s *state.State, projectName string, zoneInfo *api.NetworkZonesPost) error

Create validates supplied record and creates new Network zone record in the database.

func Exists

func Exists(s *state.State, name ...string) error

Exists checks the zone name(s) provided exists. If multiple names are provided, also checks that duplicate names aren't specified in the list.

Types

type NetworkZone

type NetworkZone interface {

	// Info.
	ID() int64
	Project() string
	Info() *api.NetworkZone
	Etag() []any
	UsedBy() ([]string, error)
	Content() (*strings.Builder, error)
	SOA() (*strings.Builder, error)

	// Records.
	AddRecord(req api.NetworkZoneRecordsPost) error
	GetRecords() ([]api.NetworkZoneRecord, error)
	GetRecord(name string) (*api.NetworkZoneRecord, error)
	UpdateRecord(name string, req api.NetworkZoneRecordPut, clientType request.ClientType) error
	DeleteRecord(name string) error

	// Modifications.
	Update(config *api.NetworkZonePut, clientType request.ClientType) error
	Delete() error
	// contains filtered or unexported methods
}

NetworkZone represents a Network zone.

func LoadByName

func LoadByName(s *state.State, name string) (NetworkZone, error)

LoadByName loads and initialises a Network zone from the database by name.

func LoadByNameAndProject

func LoadByNameAndProject(s *state.State, projectName string, name string) (NetworkZone, error)

LoadByNameAndProject loads and initialises a Network zone from the database by project and name.

Jump to

Keyboard shortcuts

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