package nameserver

import "github.com/oslokommune/okctl/pkg/git/nameserver"

Package nameserver knows how to create git commits for zone delegation and revocation

Index

Constants

const (
	// DefaultWorkingDir represents the default working directory
	DefaultWorkingDir = "infrastructure/production/dns/oslo.systems/auto_applied_subdomains"
	// DefaultAutoWorkingDir represents the default auto working directory
	DefaultAutoWorkingDir = "infrastructure/production/dns/oslo.systems/auto_applied_subdomains/auto"
)

Functions

func BranchNameFromFQDN

func BranchNameFromFQDN(fqdn string) string

BranchNameFromFQDN returns a random branch name based on the provided fqdn

func CreateRecord

func CreateRecord(fqdn string, nameservers []string) []byte

CreateRecord returns the create record template

func DefaultRepositoryURL

func DefaultRepositoryURL() string

DefaultRepositoryURL represents the default repository URL

func FileNameFromFQDN

func FileNameFromFQDN(fqdn string) string

FileNameFromFQDN returns a filename based on the provided fqdn

Types

type Delegator

type Delegator struct{}

Delegator contains required state

func NewDelegator

func NewDelegator(seedRandom bool) *Delegator

NewDelegator returns an initialised delegator

func (*Delegator) Assign

func (d *Delegator) Assign(fqdn string, nameservers []string, workingDir string) *git.ChangeSet

Assign a delegation record

func (*Delegator) Revoke

func (d *Delegator) Revoke(fqdn string, workingDir string) *git.ChangeSet

Revoke a delegation record

Source Files

nameserver.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
8 packages
Last checked
18 hours ago

Tools for package owners.