Documentation
¶
Overview ¶
Package server implements the HTTP server and all api.ServerInterface handlers.
Index ¶
- type Server
- func (s *Server) DeleteConfigTransactionItem(w http.ResponseWriter, r *http.Request, ...)
- func (s *Server) DeleteZoneRecord(w http.ResponseWriter, r *http.Request, zone api.Zone, owner api.RecordOwner, ...)
- func (s *Server) DeleteZoneTransactionRecord(w http.ResponseWriter, r *http.Request, zone api.Zone, owner api.RecordOwner, ...)
- func (s *Server) GetConfig(w http.ResponseWriter, r *http.Request, params api.GetConfigParams)
- func (s *Server) GetConfigExport(w http.ResponseWriter, r *http.Request, params api.GetConfigExportParams)
- func (s *Server) GetConfigTransactionDiff(w http.ResponseWriter, r *http.Request, ...)
- func (s *Server) GetConfigTransactionItem(w http.ResponseWriter, r *http.Request, ...)
- func (s *Server) GetStats(w http.ResponseWriter, r *http.Request, params api.GetStatsParams)
- func (s *Server) GetStatus(w http.ResponseWriter, r *http.Request, params api.GetStatusParams)
- func (s *Server) GetZoneRecords(w http.ResponseWriter, r *http.Request, zone api.Zone, ...)
- func (s *Server) GetZoneSerial(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) GetZoneStats(w http.ResponseWriter, r *http.Request, zone api.Zone, ...)
- func (s *Server) GetZoneStatus(w http.ResponseWriter, r *http.Request, zone api.Zone, ...)
- func (s *Server) GetZoneTransactionDiff(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) GetZoneTransactionRecords(w http.ResponseWriter, r *http.Request, zone api.Zone, ...)
- func (s *Server) GetZones(w http.ResponseWriter, r *http.Request, params api.GetZonesParams)
- func (s *Server) PostConfigCheck(w http.ResponseWriter, r *http.Request)
- func (s *Server) PostConfigImport(w http.ResponseWriter, r *http.Request)
- func (s *Server) PostConfigInit(w http.ResponseWriter, r *http.Request)
- func (s *Server) PostConfigTransaction(w http.ResponseWriter, r *http.Request)
- func (s *Server) PostConfigTransactionAbort(w http.ResponseWriter, r *http.Request)
- func (s *Server) PostConfigTransactionCommit(w http.ResponseWriter, r *http.Request)
- func (s *Server) PostReload(w http.ResponseWriter, r *http.Request)
- func (s *Server) PostStop(w http.ResponseWriter, r *http.Request)
- func (s *Server) PostZoneBackup(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneCheck(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneFlush(w http.ResponseWriter, r *http.Request, zone api.Zone, ...)
- func (s *Server) PostZoneFreeze(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneKSKSubmitted(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneKeyRollover(w http.ResponseWriter, r *http.Request, zone api.Zone, ...)
- func (s *Server) PostZoneKeysLoad(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneNotify(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZonePurge(w http.ResponseWriter, r *http.Request, zone api.Zone, ...)
- func (s *Server) PostZoneRecord(w http.ResponseWriter, r *http.Request, zone api.Zone, owner api.RecordOwner, ...)
- func (s *Server) PostZoneRecordsBatch(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneRefresh(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneReload(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneRestore(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneRetransfer(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneSign(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneThaw(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneTransaction(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneTransactionAbort(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneTransactionCommit(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneValidate(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneXFRFreeze(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PostZoneXFRThaw(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PutConfigTransactionItem(w http.ResponseWriter, r *http.Request)
- func (s *Server) PutZoneSerial(w http.ResponseWriter, r *http.Request, zone api.Zone)
- func (s *Server) PutZoneTransactionRecord(w http.ResponseWriter, r *http.Request, zone api.Zone, owner api.RecordOwner, ...)
- func (s *Server) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the HTTP server and implements api.ServerInterface.
func New ¶
New creates a Server that listens on addr, connects to the knot control socket at socketPath, and authenticates requests using token.
func (*Server) DeleteConfigTransactionItem ¶
func (s *Server) DeleteConfigTransactionItem(w http.ResponseWriter, r *http.Request, params api.DeleteConfigTransactionItemParams)
DeleteConfigTransactionItem unsets a configuration item within the open transaction.
func (*Server) DeleteZoneRecord ¶
func (s *Server) DeleteZoneRecord(w http.ResponseWriter, r *http.Request, zone api.Zone, owner api.RecordOwner, pType api.RecordType, params api.DeleteZoneRecordParams)
DeleteZoneRecord deletes a DNS record with automatic transaction handling. This is a convenience wrapper that begins a transaction, deletes the record, and commits in a single operation.
func (*Server) DeleteZoneTransactionRecord ¶
func (s *Server) DeleteZoneTransactionRecord(w http.ResponseWriter, r *http.Request, zone api.Zone, owner api.RecordOwner, pType api.RecordType, params api.DeleteZoneTransactionRecordParams)
DeleteZoneTransactionRecord removes records within the open transaction.
func (*Server) GetConfig ¶
func (s *Server) GetConfig(w http.ResponseWriter, r *http.Request, params api.GetConfigParams)
GetConfig reads the active configuration.
func (*Server) GetConfigExport ¶
func (s *Server) GetConfigExport(w http.ResponseWriter, r *http.Request, params api.GetConfigExportParams)
GetConfigExport exports the confdb or its JSON schema.
func (*Server) GetConfigTransactionDiff ¶
func (s *Server) GetConfigTransactionDiff(w http.ResponseWriter, r *http.Request, params api.GetConfigTransactionDiffParams)
GetConfigTransactionDiff returns configuration differences within the open transaction.
func (*Server) GetConfigTransactionItem ¶
func (s *Server) GetConfigTransactionItem(w http.ResponseWriter, r *http.Request, params api.GetConfigTransactionItemParams)
GetConfigTransactionItem reads a configuration item within the open transaction.
func (*Server) GetStats ¶
func (s *Server) GetStats(w http.ResponseWriter, r *http.Request, params api.GetStatsParams)
GetStats returns global statistics counters.
func (*Server) GetStatus ¶
func (s *Server) GetStatus(w http.ResponseWriter, r *http.Request, params api.GetStatusParams)
GetStatus checks server status.
func (*Server) GetZoneRecords ¶
func (s *Server) GetZoneRecords(w http.ResponseWriter, r *http.Request, zone api.Zone, params api.GetZoneRecordsParams)
GetZoneRecords reads zone records currently being served.
func (*Server) GetZoneSerial ¶
GetZoneSerial returns the current SOA serial number.
func (*Server) GetZoneStats ¶
func (s *Server) GetZoneStats(w http.ResponseWriter, r *http.Request, zone api.Zone, params api.GetZoneStatsParams)
GetZoneStats shows zone statistics counters.
func (*Server) GetZoneStatus ¶
func (s *Server) GetZoneStatus(w http.ResponseWriter, r *http.Request, zone api.Zone, params api.GetZoneStatusParams)
GetZoneStatus shows zone status.
func (*Server) GetZoneTransactionDiff ¶
GetZoneTransactionDiff returns zone record changes within the open transaction.
func (*Server) GetZoneTransactionRecords ¶
func (s *Server) GetZoneTransactionRecords(w http.ResponseWriter, r *http.Request, zone api.Zone, params api.GetZoneTransactionRecordsParams)
GetZoneTransactionRecords reads zone records within the open transaction.
func (*Server) GetZones ¶ added in v0.1.1
func (s *Server) GetZones(w http.ResponseWriter, r *http.Request, params api.GetZonesParams)
GetZoneList returns a list of zones currently being served.
func (*Server) PostConfigCheck ¶
func (s *Server) PostConfigCheck(w http.ResponseWriter, r *http.Request)
PostConfigCheck checks the server configuration for errors.
func (*Server) PostConfigImport ¶
func (s *Server) PostConfigImport(w http.ResponseWriter, r *http.Request)
PostConfigImport imports a configuration file into the confdb.
func (*Server) PostConfigInit ¶
func (s *Server) PostConfigInit(w http.ResponseWriter, r *http.Request)
PostConfigInit initialises the configuration database.
func (*Server) PostConfigTransaction ¶
func (s *Server) PostConfigTransaction(w http.ResponseWriter, r *http.Request)
PostConfigTransaction begins a configuration write transaction.
func (*Server) PostConfigTransactionAbort ¶
func (s *Server) PostConfigTransactionAbort(w http.ResponseWriter, r *http.Request)
PostConfigTransactionAbort rolls back the open configuration transaction.
func (*Server) PostConfigTransactionCommit ¶
func (s *Server) PostConfigTransactionCommit(w http.ResponseWriter, r *http.Request)
PostConfigTransactionCommit commits the open configuration transaction.
func (*Server) PostReload ¶
func (s *Server) PostReload(w http.ResponseWriter, r *http.Request)
PostReload reloads server configuration and modified zones.
func (*Server) PostStop ¶
func (s *Server) PostStop(w http.ResponseWriter, r *http.Request)
PostStop stops the server.
func (*Server) PostZoneBackup ¶
PostZoneBackup backs up zone data to a server-side directory.
func (*Server) PostZoneCheck ¶
PostZoneCheck checks if the zone can be loaded from disk.
func (*Server) PostZoneFlush ¶
func (s *Server) PostZoneFlush(w http.ResponseWriter, r *http.Request, zone api.Zone, params api.PostZoneFlushParams)
PostZoneFlush flushes zone journal into the zone file.
func (*Server) PostZoneFreeze ¶
PostZoneFreeze temporarily postpones automatic zone-changing events.
func (*Server) PostZoneKSKSubmitted ¶
PostZoneKSKSubmitted confirms that the parent DS record is present after KSK submission.
func (*Server) PostZoneKeyRollover ¶
func (s *Server) PostZoneKeyRollover(w http.ResponseWriter, r *http.Request, zone api.Zone, keyType api.PostZoneKeyRolloverParamsKeyType)
PostZoneKeyRollover triggers an immediate key rollover.
func (*Server) PostZoneKeysLoad ¶
PostZoneKeysLoad reloads keys from the KASP database and re-signs the zone.
func (*Server) PostZoneNotify ¶
PostZoneNotify sends a NOTIFY to all configured remotes.
func (*Server) PostZonePurge ¶
func (s *Server) PostZonePurge(w http.ResponseWriter, r *http.Request, zone api.Zone, params api.PostZonePurgeParams)
PostZonePurge purges zone data, zone file, journal, timers, and KASP data.
func (*Server) PostZoneRecord ¶
func (s *Server) PostZoneRecord(w http.ResponseWriter, r *http.Request, zone api.Zone, owner api.RecordOwner, pType api.RecordType)
PostZoneRecord adds or updates a DNS record with automatic transaction handling. This is a convenience wrapper that begins a transaction, adds/updates the record, and commits in a single operation.
func (*Server) PostZoneRecordsBatch ¶
PostZoneRecordsBatch performs batch add/update/delete operations with automatic transaction handling. All operations succeed or fail together as a single atomic transaction.
func (*Server) PostZoneRefresh ¶
PostZoneRefresh forces a slave zone refresh.
func (*Server) PostZoneReload ¶
PostZoneReload reloads zone from disk.
func (*Server) PostZoneRestore ¶
PostZoneRestore restores zone data from a server-side backup directory.
func (*Server) PostZoneRetransfer ¶
PostZoneRetransfer forces slave zone retransfer without a serial check.
func (*Server) PostZoneSign ¶
PostZoneSign re-signs the automatically signed zone.
func (*Server) PostZoneThaw ¶
PostZoneThaw dismisses a zone freeze.
func (*Server) PostZoneTransaction ¶
PostZoneTransaction begins a zone transaction.
func (*Server) PostZoneTransactionAbort ¶
PostZoneTransactionAbort aborts and rolls back the open zone transaction.
func (*Server) PostZoneTransactionCommit ¶
PostZoneTransactionCommit commits the open zone transaction.
func (*Server) PostZoneValidate ¶
PostZoneValidate triggers DNSSEC validation of the zone.
func (*Server) PostZoneXFRFreeze ¶
PostZoneXFRFreeze temporarily disables outgoing AXFR/IXFR.
func (*Server) PostZoneXFRThaw ¶
PostZoneXFRThaw re-enables outgoing AXFR/IXFR.
func (*Server) PutConfigTransactionItem ¶
func (s *Server) PutConfigTransactionItem(w http.ResponseWriter, r *http.Request)
PutConfigTransactionItem sets a configuration item within the open transaction.
func (*Server) PutZoneSerial ¶
PutZoneSerial sets or increments the SOA serial number.
func (*Server) PutZoneTransactionRecord ¶
func (s *Server) PutZoneTransactionRecord(w http.ResponseWriter, r *http.Request, zone api.Zone, owner api.RecordOwner, pType api.RecordType)
PutZoneTransactionRecord adds or replaces a record within the open transaction.