zone

package
v0.0.0-...-f2e76ad Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context) ([]string, error)
	Content(ctx context.Context) (*strings.Builder, error)
	SOA() (*strings.Builder, error)

	// Records.
	AddRecord(ctx context.Context, req api.NetworkZoneRecordsPost) error
	GetRecords(ctx context.Context) ([]api.NetworkZoneRecord, error)
	GetRecord(ctx context.Context, name string) (*api.NetworkZoneRecord, error)
	UpdateRecord(ctx context.Context, name string, req api.NetworkZoneRecordPut) error
	DeleteRecord(ctx context.Context, name string) error

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

NetworkZone represents a Network zone.

func LoadByName

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

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

func LoadByNameAndProject

func LoadByNameAndProject(ctx context.Context, 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