Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Package api contains generated server code for openapi contract
Index ¶
- Constants
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- type BackupRequest
- type BadRequest
- type Config
- type ConfigID
- type ConfigImportRequest
- type ConfigItem
- type ConfigItemData0
- type ConfigItemData1
- type ConfigItem_Data
- func (t ConfigItem_Data) AsConfigItemData0() (ConfigItemData0, error)
- func (t ConfigItem_Data) AsConfigItemData1() (ConfigItemData1, error)
- func (t *ConfigItem_Data) FromConfigItemData0(v ConfigItemData0) error
- func (t *ConfigItem_Data) FromConfigItemData1(v ConfigItemData1) error
- func (t ConfigItem_Data) MarshalJSON() ([]byte, error)
- func (t *ConfigItem_Data) MergeConfigItemData0(v ConfigItemData0) error
- func (t *ConfigItem_Data) MergeConfigItemData1(v ConfigItemData1) error
- func (t *ConfigItem_Data) UnmarshalJSON(b []byte) error
- type ConfigSection
- type ConfigSetRequest
- type ConfigSetRequestData0
- type ConfigSetRequestData1
- type ConfigSetRequest_Data
- func (t ConfigSetRequest_Data) AsConfigSetRequestData0() (ConfigSetRequestData0, error)
- func (t ConfigSetRequest_Data) AsConfigSetRequestData1() (ConfigSetRequestData1, error)
- func (t *ConfigSetRequest_Data) FromConfigSetRequestData0(v ConfigSetRequestData0) error
- func (t *ConfigSetRequest_Data) FromConfigSetRequestData1(v ConfigSetRequestData1) error
- func (t ConfigSetRequest_Data) MarshalJSON() ([]byte, error)
- func (t *ConfigSetRequest_Data) MergeConfigSetRequestData0(v ConfigSetRequestData0) error
- func (t *ConfigSetRequest_Data) MergeConfigSetRequestData1(v ConfigSetRequestData1) error
- func (t *ConfigSetRequest_Data) UnmarshalJSON(b []byte) error
- type Created
- type DeleteConfigTransactionItemParams
- type DeleteZoneRecordParams
- type DeleteZoneTransactionRecordParams
- type Error
- type GetConfigExportParams
- type GetConfigParams
- type GetConfigTransactionDiffParams
- type GetConfigTransactionItemParams
- type GetStatsParams
- type GetStatusParams
- type GetZoneRecordsParams
- type GetZoneStatsParams
- type GetZoneStatusParams
- type GetZoneStatusParamsFilter
- type GetZoneTransactionRecordsParams
- type GetZonesParams
- type InternalError
- type InvalidParamFormatError
- type MiddlewareFunc
- type NotFound
- type OK
- type PostConfigImportJSONRequestBody
- type PostZoneBackupJSONRequestBody
- type PostZoneFlushParams
- type PostZoneKeyRolloverParamsKeyType
- type PostZonePurgeParams
- type PostZoneRecordJSONRequestBody
- type PostZoneRecordsBatchJSONRequestBody
- type PostZoneRestoreJSONRequestBody
- type PostZoneTransactionJSONRequestBody
- type PutConfigTransactionItemJSONRequestBody
- type PutZoneSerialJSONRequestBody
- type PutZoneTransactionRecordJSONRequestBody
- type Record
- type RecordBatchRequest
- type RecordBatchResponse
- type RecordOwner
- type RecordResponse
- type RecordType
- type RecordWrite
- type RequiredHeaderError
- type RequiredParamError
- type SerialRequest
- type SerialResponse
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) DeleteConfigTransactionItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteZoneRecord(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteZoneTransactionRecord(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetConfig(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetConfigExport(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetConfigTransactionDiff(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetConfigTransactionItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetStats(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetStatus(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetZoneRecords(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetZoneSerial(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetZoneStats(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetZoneStatus(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetZoneTransactionDiff(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetZoneTransactionRecords(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetZones(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostConfigCheck(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostConfigImport(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostConfigInit(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostConfigTransaction(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostConfigTransactionAbort(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostConfigTransactionCommit(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostReload(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostStop(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneBackup(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneCheck(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneFlush(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneFreeze(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneKSKSubmitted(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneKeyRollover(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneKeysLoad(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneNotify(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZonePurge(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneRecord(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneRecordsBatch(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneRefresh(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneReload(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneRestore(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneRetransfer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneSign(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneThaw(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneTransaction(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneTransactionAbort(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneTransactionCommit(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneValidate(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneXFRFreeze(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostZoneXFRThaw(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutConfigTransactionItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutZoneSerial(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutZoneTransactionRecord(w http.ResponseWriter, r *http.Request)
- type ServerStatus
- type ServerStatusStatus
- type Stats
- type StdHTTPServerOptions
- type TooManyValuesForParamError
- type Unauthorized
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type Zone
- type ZoneDiff
- type ZoneFilter
- type ZoneList
- type ZoneStatus
- type ZoneStatusRole
- type ZoneTransactionBeginRequest
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type BackupRequest ¶
type BackupRequest struct {
// BackupDir Absolute server-side directory path for the backup.
BackupDir string `json:"backupDir"`
// Filter Space-separated list of knot filter names (without the leading `+`)
// to control what is included in the backup.
Filter *string `json:"filter,omitempty"`
}
BackupRequest defines model for BackupRequest.
type ConfigImportRequest ¶
type ConfigImportRequest struct {
// Filename Absolute server-side path to the configuration file.
Filename string `json:"filename"`
// Nopurge When `true`, existing confdb data is preserved; the file is merged
// in rather than replacing the current configuration.
Nopurge *bool `json:"nopurge,omitempty"`
}
ConfigImportRequest defines model for ConfigImportRequest.
type ConfigItem ¶
type ConfigItem struct {
// Data Item value or list of values. Single-value items are returned as
// a string; multi-value items are returned as an array of strings.
Data *ConfigItem_Data `json:"data,omitempty"`
// Id Section identifier (the bracketed part in `zone[example.com]`).
// Empty when the section has no per-instance identifiers.
Id *string `json:"id,omitempty"`
// Item Item name within the section.
Item *string `json:"item,omitempty"`
// Section Configuration section name.
Section *string `json:"section,omitempty"`
}
ConfigItem defines model for ConfigItem.
type ConfigItem_Data ¶
type ConfigItem_Data struct {
// contains filtered or unexported fields
}
ConfigItem_Data Item value or list of values. Single-value items are returned as a string; multi-value items are returned as an array of strings.
func (ConfigItem_Data) AsConfigItemData0 ¶
func (t ConfigItem_Data) AsConfigItemData0() (ConfigItemData0, error)
AsConfigItemData0 returns the union data inside the ConfigItem_Data as a ConfigItemData0
func (ConfigItem_Data) AsConfigItemData1 ¶
func (t ConfigItem_Data) AsConfigItemData1() (ConfigItemData1, error)
AsConfigItemData1 returns the union data inside the ConfigItem_Data as a ConfigItemData1
func (*ConfigItem_Data) FromConfigItemData0 ¶
func (t *ConfigItem_Data) FromConfigItemData0(v ConfigItemData0) error
FromConfigItemData0 overwrites any union data inside the ConfigItem_Data as the provided ConfigItemData0
func (*ConfigItem_Data) FromConfigItemData1 ¶
func (t *ConfigItem_Data) FromConfigItemData1(v ConfigItemData1) error
FromConfigItemData1 overwrites any union data inside the ConfigItem_Data as the provided ConfigItemData1
func (ConfigItem_Data) MarshalJSON ¶
func (t ConfigItem_Data) MarshalJSON() ([]byte, error)
func (*ConfigItem_Data) MergeConfigItemData0 ¶
func (t *ConfigItem_Data) MergeConfigItemData0(v ConfigItemData0) error
MergeConfigItemData0 performs a merge with any union data inside the ConfigItem_Data, using the provided ConfigItemData0
func (*ConfigItem_Data) MergeConfigItemData1 ¶
func (t *ConfigItem_Data) MergeConfigItemData1(v ConfigItemData1) error
MergeConfigItemData1 performs a merge with any union data inside the ConfigItem_Data, using the provided ConfigItemData1
func (*ConfigItem_Data) UnmarshalJSON ¶
func (t *ConfigItem_Data) UnmarshalJSON(b []byte) error
type ConfigSetRequest ¶
type ConfigSetRequest struct {
// Data One or more data values to set. Provide a string for a
// single value or an array for multiple values.
Data ConfigSetRequest_Data `json:"data"`
// Id Section identifier, if applicable (e.g. a zone name for `zone`
// sections). Omit or leave empty for sections without identifiers.
Id *string `json:"id,omitempty"`
// Item Item name within the section.
Item string `json:"item"`
// Section Configuration section name.
Section string `json:"section"`
}
ConfigSetRequest defines model for ConfigSetRequest.
type ConfigSetRequestData0 ¶
type ConfigSetRequestData0 = string
ConfigSetRequestData0 defines model for .
type ConfigSetRequestData1 ¶
type ConfigSetRequestData1 = []string
ConfigSetRequestData1 defines model for .
type ConfigSetRequest_Data ¶
type ConfigSetRequest_Data struct {
// contains filtered or unexported fields
}
ConfigSetRequest_Data One or more data values to set. Provide a string for a single value or an array for multiple values.
func (ConfigSetRequest_Data) AsConfigSetRequestData0 ¶
func (t ConfigSetRequest_Data) AsConfigSetRequestData0() (ConfigSetRequestData0, error)
AsConfigSetRequestData0 returns the union data inside the ConfigSetRequest_Data as a ConfigSetRequestData0
func (ConfigSetRequest_Data) AsConfigSetRequestData1 ¶
func (t ConfigSetRequest_Data) AsConfigSetRequestData1() (ConfigSetRequestData1, error)
AsConfigSetRequestData1 returns the union data inside the ConfigSetRequest_Data as a ConfigSetRequestData1
func (*ConfigSetRequest_Data) FromConfigSetRequestData0 ¶
func (t *ConfigSetRequest_Data) FromConfigSetRequestData0(v ConfigSetRequestData0) error
FromConfigSetRequestData0 overwrites any union data inside the ConfigSetRequest_Data as the provided ConfigSetRequestData0
func (*ConfigSetRequest_Data) FromConfigSetRequestData1 ¶
func (t *ConfigSetRequest_Data) FromConfigSetRequestData1(v ConfigSetRequestData1) error
FromConfigSetRequestData1 overwrites any union data inside the ConfigSetRequest_Data as the provided ConfigSetRequestData1
func (ConfigSetRequest_Data) MarshalJSON ¶
func (t ConfigSetRequest_Data) MarshalJSON() ([]byte, error)
func (*ConfigSetRequest_Data) MergeConfigSetRequestData0 ¶
func (t *ConfigSetRequest_Data) MergeConfigSetRequestData0(v ConfigSetRequestData0) error
MergeConfigSetRequestData0 performs a merge with any union data inside the ConfigSetRequest_Data, using the provided ConfigSetRequestData0
func (*ConfigSetRequest_Data) MergeConfigSetRequestData1 ¶
func (t *ConfigSetRequest_Data) MergeConfigSetRequestData1(v ConfigSetRequestData1) error
MergeConfigSetRequestData1 performs a merge with any union data inside the ConfigSetRequest_Data, using the provided ConfigSetRequestData1
func (*ConfigSetRequest_Data) UnmarshalJSON ¶
func (t *ConfigSetRequest_Data) UnmarshalJSON(b []byte) error
type DeleteConfigTransactionItemParams ¶
type DeleteConfigTransactionItemParams struct {
// Section Configuration section name (e.g. `server`, `zone`, `remote`).
Section *ConfigSection `form:"section,omitempty" json:"section,omitempty"`
// Id Section identifier — the bracketed part in `zone[example.com]`. Used
// for sections that have per-instance configuration.
Id *ConfigID `form:"id,omitempty" json:"id,omitempty"`
// Item Item name within the section (e.g. `listen`, `file`).
Item *Config `form:"item,omitempty" json:"item,omitempty"`
// Data Specific data value to remove. Omit to remove all values for the
// item.
Data *string `form:"data,omitempty" json:"data,omitempty"`
}
DeleteConfigTransactionItemParams defines parameters for DeleteConfigTransactionItem.
type DeleteZoneRecordParams ¶
type DeleteZoneRecordParams struct {
// Data Specific rdata value to remove (presentation format). Omit to
// remove all records matching `owner` and `type`.
Data *string `form:"data,omitempty" json:"data,omitempty"`
}
DeleteZoneRecordParams defines parameters for DeleteZoneRecord.
type DeleteZoneTransactionRecordParams ¶
type DeleteZoneTransactionRecordParams struct {
// Data Specific rdata value to remove (presentation format). Omit to
// remove all records matching `owner` and `type`.
Data *string `form:"data,omitempty" json:"data,omitempty"`
}
DeleteZoneTransactionRecordParams defines parameters for DeleteZoneTransactionRecord.
type Error ¶
type Error struct {
// Error Human-readable error message from the knot control socket.
Error string `json:"error"`
}
Error defines model for Error.
type GetConfigExportParams ¶
type GetConfigExportParams struct {
// Schema When true, export the JSON schema instead of the configuration.
Schema *bool `form:"schema,omitempty" json:"schema,omitempty"`
// Filename Server-side path to write the export to. When omitted, the export
// is returned in the response body.
Filename *string `form:"filename,omitempty" json:"filename,omitempty"`
}
GetConfigExportParams defines parameters for GetConfigExport.
type GetConfigParams ¶
type GetConfigParams struct {
// Section Configuration section name (e.g. `server`, `zone`, `remote`).
Section *ConfigSection `form:"section,omitempty" json:"section,omitempty"`
// Id Section identifier — the bracketed part in `zone[example.com]`. Used
// for sections that have per-instance configuration.
Id *ConfigID `form:"id,omitempty" json:"id,omitempty"`
// Item Item name within the section (e.g. `listen`, `file`).
Item *Config `form:"item,omitempty" json:"item,omitempty"`
}
GetConfigParams defines parameters for GetConfig.
type GetConfigTransactionDiffParams ¶
type GetConfigTransactionDiffParams struct {
// Section Configuration section name (e.g. `server`, `zone`, `remote`).
Section *ConfigSection `form:"section,omitempty" json:"section,omitempty"`
// Id Section identifier — the bracketed part in `zone[example.com]`. Used
// for sections that have per-instance configuration.
Id *ConfigID `form:"id,omitempty" json:"id,omitempty"`
// Item Item name within the section (e.g. `listen`, `file`).
Item *Config `form:"item,omitempty" json:"item,omitempty"`
}
GetConfigTransactionDiffParams defines parameters for GetConfigTransactionDiff.
type GetConfigTransactionItemParams ¶
type GetConfigTransactionItemParams struct {
// Section Configuration section name (e.g. `server`, `zone`, `remote`).
Section *ConfigSection `form:"section,omitempty" json:"section,omitempty"`
// Id Section identifier — the bracketed part in `zone[example.com]`. Used
// for sections that have per-instance configuration.
Id *ConfigID `form:"id,omitempty" json:"id,omitempty"`
// Item Item name within the section (e.g. `listen`, `file`).
Item *Config `form:"item,omitempty" json:"item,omitempty"`
}
GetConfigTransactionItemParams defines parameters for GetConfigTransactionItem.
type GetStatsParams ¶
type GetStatsParams struct {
// Module Module name (e.g. `mod-stats`). Omit to return all modules.
Module *string `form:"module,omitempty" json:"module,omitempty"`
// Counter Counter name within the module. Requires `module` to be set.
Counter *string `form:"counter,omitempty" json:"counter,omitempty"`
}
GetStatsParams defines parameters for GetStats.
type GetStatusParams ¶
type GetStatusParams struct {
// Detail Optional detail level passed to the status command.
Detail *string `form:"detail,omitempty" json:"detail,omitempty"`
}
GetStatusParams defines parameters for GetStatus.
type GetZoneRecordsParams ¶
type GetZoneRecordsParams struct {
// Owner Filter by owner name (FQDN, e.g. `www.example.com.`).
Owner *string `form:"owner,omitempty" json:"owner,omitempty"`
// Type Filter by record type (e.g. `A`, `AAAA`, `MX`).
Type *string `form:"type,omitempty" json:"type,omitempty"`
}
GetZoneRecordsParams defines parameters for GetZoneRecords.
type GetZoneStatsParams ¶
type GetZoneStatsParams struct {
// Module Module name. Omit to return all modules.
Module *string `form:"module,omitempty" json:"module,omitempty"`
// Counter Counter name within the module. Requires `module` to be set.
Counter *string `form:"counter,omitempty" json:"counter,omitempty"`
}
GetZoneStatsParams defines parameters for GetZoneStats.
type GetZoneStatusParams ¶
type GetZoneStatusParams struct {
// Filter Status fields to include in the response.
Filter *[]GetZoneStatusParamsFilter `form:"filter,omitempty" json:"filter,omitempty"`
}
GetZoneStatusParams defines parameters for GetZoneStatus.
type GetZoneStatusParamsFilter ¶
type GetZoneStatusParamsFilter string
GetZoneStatusParamsFilter defines parameters for GetZoneStatus.
const ( AutoDnssec GetZoneStatusParamsFilter = "auto-dnssec" Catalog GetZoneStatusParamsFilter = "catalog" Events GetZoneStatusParamsFilter = "events" Freeze GetZoneStatusParamsFilter = "freeze" Modules GetZoneStatusParamsFilter = "modules" Role GetZoneStatusParamsFilter = "role" Serial GetZoneStatusParamsFilter = "serial" Transaction GetZoneStatusParamsFilter = "transaction" )
Defines values for GetZoneStatusParamsFilter.
type GetZoneTransactionRecordsParams ¶
type GetZoneTransactionRecordsParams struct {
// Owner Filter by owner name (FQDN).
Owner *string `form:"owner,omitempty" json:"owner,omitempty"`
// Type Filter by record type.
Type *string `form:"type,omitempty" json:"type,omitempty"`
}
GetZoneTransactionRecordsParams defines parameters for GetZoneTransactionRecords.
type GetZonesParams ¶ added in v0.1.1
type GetZonesParams struct {
// Filter Optional filter to apply (e.g. `type=slave`).
Filter *string `form:"filter,omitempty" json:"filter,omitempty"`
}
GetZonesParams defines parameters for GetZones.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type PostConfigImportJSONRequestBody ¶
type PostConfigImportJSONRequestBody = ConfigImportRequest
PostConfigImportJSONRequestBody defines body for PostConfigImport for application/json ContentType.
type PostZoneBackupJSONRequestBody ¶
type PostZoneBackupJSONRequestBody = BackupRequest
PostZoneBackupJSONRequestBody defines body for PostZoneBackup for application/json ContentType.
type PostZoneFlushParams ¶
type PostZoneFlushParams struct {
// Filter Space-separated list of knot filter names (without the leading `+`),
// e.g. `expire journal-content`.
Filter *ZoneFilter `form:"filter,omitempty" json:"filter,omitempty"`
}
PostZoneFlushParams defines parameters for PostZoneFlush.
type PostZoneKeyRolloverParamsKeyType ¶
type PostZoneKeyRolloverParamsKeyType string
PostZoneKeyRolloverParamsKeyType defines parameters for PostZoneKeyRollover.
const ( Ksk PostZoneKeyRolloverParamsKeyType = "ksk" Zsk PostZoneKeyRolloverParamsKeyType = "zsk" )
Defines values for PostZoneKeyRolloverParamsKeyType.
type PostZonePurgeParams ¶
type PostZonePurgeParams struct {
// Filter Space-separated list of knot filter names (without the leading `+`),
// e.g. `expire journal-content`.
Filter *ZoneFilter `form:"filter,omitempty" json:"filter,omitempty"`
}
PostZonePurgeParams defines parameters for PostZonePurge.
type PostZoneRecordJSONRequestBody ¶
type PostZoneRecordJSONRequestBody = RecordWrite
PostZoneRecordJSONRequestBody defines body for PostZoneRecord for application/json ContentType.
type PostZoneRecordsBatchJSONRequestBody ¶
type PostZoneRecordsBatchJSONRequestBody = RecordBatchRequest
PostZoneRecordsBatchJSONRequestBody defines body for PostZoneRecordsBatch for application/json ContentType.
type PostZoneRestoreJSONRequestBody ¶
type PostZoneRestoreJSONRequestBody = BackupRequest
PostZoneRestoreJSONRequestBody defines body for PostZoneRestore for application/json ContentType.
type PostZoneTransactionJSONRequestBody ¶
type PostZoneTransactionJSONRequestBody = ZoneTransactionBeginRequest
PostZoneTransactionJSONRequestBody defines body for PostZoneTransaction for application/json ContentType.
type PutConfigTransactionItemJSONRequestBody ¶
type PutConfigTransactionItemJSONRequestBody = ConfigSetRequest
PutConfigTransactionItemJSONRequestBody defines body for PutConfigTransactionItem for application/json ContentType.
type PutZoneSerialJSONRequestBody ¶
type PutZoneSerialJSONRequestBody = SerialRequest
PutZoneSerialJSONRequestBody defines body for PutZoneSerial for application/json ContentType.
type PutZoneTransactionRecordJSONRequestBody ¶
type PutZoneTransactionRecordJSONRequestBody = RecordWrite
PutZoneTransactionRecordJSONRequestBody defines body for PutZoneTransactionRecord for application/json ContentType.
type Record ¶
type Record struct {
// Data Record data in presentation format.
Data string `json:"data"`
// Owner Record owner name (FQDN).
Owner string `json:"owner"`
// Ttl Time-to-live in seconds.
Ttl *int `json:"ttl,omitempty"`
// Type Record type in uppercase presentation format.
Type string `json:"type"`
}
Record defines model for Record.
type RecordBatchRequest ¶
type RecordBatchRequest struct {
// Add Records to add or update.
Add *[]struct {
// Data Record data in presentation format.
Data string `json:"data"`
// Owner Record owner name (FQDN).
Owner string `json:"owner"`
// Ttl TTL in seconds. Omit to use zone default.
Ttl *int `json:"ttl,omitempty"`
// Type Record type in uppercase presentation format.
Type string `json:"type"`
} `json:"add,omitempty"`
// Delete Records to delete.
Delete *[]struct {
// Data Specific rdata value to remove. Omit to remove all records
// matching owner and type.
Data *string `json:"data,omitempty"`
// Owner Record owner name (FQDN).
Owner string `json:"owner"`
// Type Record type in uppercase presentation format.
Type string `json:"type"`
} `json:"delete,omitempty"`
}
RecordBatchRequest defines model for RecordBatchRequest.
type RecordBatchResponse ¶
type RecordBatchResponse struct {
// Added Number of records added/updated.
Added *int `json:"added,omitempty"`
// Deleted Number of records deleted.
Deleted *int `json:"deleted,omitempty"`
// Message Success message.
Message *string `json:"message,omitempty"`
}
RecordBatchResponse defines model for RecordBatchResponse.
type RecordResponse ¶
type RecordResponse struct {
// Data Record data in presentation format.
Data string `json:"data"`
// Message Success message.
Message *string `json:"message,omitempty"`
// Owner Record owner name (FQDN).
Owner string `json:"owner"`
// Ttl TTL in seconds.
Ttl *int `json:"ttl,omitempty"`
// Type Record type in uppercase presentation format.
Type string `json:"type"`
}
RecordResponse defines model for RecordResponse.
type RecordWrite ¶
type RecordWrite struct {
// Data Record data in presentation format.
Data string `json:"data"`
// Ttl TTL in seconds. Omit to use the zone default TTL.
Ttl *int `json:"ttl,omitempty"`
}
RecordWrite defines model for RecordWrite.
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type SerialRequest ¶
type SerialRequest struct {
// Serial SOA serial update value.
// - A plain integer sets the serial directly (e.g. `"2024010101"`).
// - A value prefixed with `+` increments the current serial by that
// amount (e.g. `"+1"`).
Serial string `json:"serial"`
}
SerialRequest defines model for SerialRequest.
type SerialResponse ¶
type SerialResponse struct {
// Serial Current SOA serial number.
Serial int `json:"serial"`
}
SerialResponse defines model for SerialResponse.
type ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
ServeHTTP(w http.ResponseWriter, r *http.Request)
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// Read the active configuration
// (GET /config)
GetConfig(w http.ResponseWriter, r *http.Request, params GetConfigParams)
// Check the server configuration for errors
// (POST /config/check)
PostConfigCheck(w http.ResponseWriter, r *http.Request)
// Export the confdb or its JSON schema
// (GET /config/export)
GetConfigExport(w http.ResponseWriter, r *http.Request, params GetConfigExportParams)
// Import a configuration file into the confdb
// (POST /config/import)
PostConfigImport(w http.ResponseWriter, r *http.Request)
// Initialise the configuration database
// (POST /config/init)
PostConfigInit(w http.ResponseWriter, r *http.Request)
// Begin a configuration write transaction
// (POST /config/transaction)
PostConfigTransaction(w http.ResponseWriter, r *http.Request)
// Roll back the open configuration transaction
// (POST /config/transaction/abort)
PostConfigTransactionAbort(w http.ResponseWriter, r *http.Request)
// Commit the open configuration transaction
// (POST /config/transaction/commit)
PostConfigTransactionCommit(w http.ResponseWriter, r *http.Request)
// Get configuration differences within the open transaction
// (GET /config/transaction/diff)
GetConfigTransactionDiff(w http.ResponseWriter, r *http.Request, params GetConfigTransactionDiffParams)
// Unset a configuration item within the open transaction
// (DELETE /config/transaction/item)
DeleteConfigTransactionItem(w http.ResponseWriter, r *http.Request, params DeleteConfigTransactionItemParams)
// Read a configuration item within the open transaction
// (GET /config/transaction/item)
GetConfigTransactionItem(w http.ResponseWriter, r *http.Request, params GetConfigTransactionItemParams)
// Set a configuration item within the open transaction
// (PUT /config/transaction/item)
PutConfigTransactionItem(w http.ResponseWriter, r *http.Request)
// Reload server configuration and modified zones
// (POST /reload)
PostReload(w http.ResponseWriter, r *http.Request)
// Show global statistics counters
// (GET /stats)
GetStats(w http.ResponseWriter, r *http.Request, params GetStatsParams)
// Check server status
// (GET /status)
GetStatus(w http.ResponseWriter, r *http.Request, params GetStatusParams)
// Stop the server
// (POST /stop)
PostStop(w http.ResponseWriter, r *http.Request)
// List all zones
// (GET /zones/)
GetZones(w http.ResponseWriter, r *http.Request, params GetZonesParams)
// Back up zone data and metadata to a server-side directory
// (POST /zones/{zone}/backup)
PostZoneBackup(w http.ResponseWriter, r *http.Request, zone Zone)
// Check if the zone can be loaded from disk
// (POST /zones/{zone}/check)
PostZoneCheck(w http.ResponseWriter, r *http.Request, zone Zone)
// Flush zone journal into the zone file
// (POST /zones/{zone}/flush)
PostZoneFlush(w http.ResponseWriter, r *http.Request, zone Zone, params PostZoneFlushParams)
// Temporarily postpone automatic zone-changing events
// (POST /zones/{zone}/freeze)
PostZoneFreeze(w http.ResponseWriter, r *http.Request, zone Zone)
// Reload keys from the KASP database and re-sign the zone
// (POST /zones/{zone}/keys/load)
PostZoneKeysLoad(w http.ResponseWriter, r *http.Request, zone Zone)
// Trigger an immediate key rollover
// (POST /zones/{zone}/keys/{keyType}/rollover)
PostZoneKeyRollover(w http.ResponseWriter, r *http.Request, zone Zone, keyType PostZoneKeyRolloverParamsKeyType)
// Confirm that the parent DS record is present after KSK submission
// (POST /zones/{zone}/ksk-submitted)
PostZoneKSKSubmitted(w http.ResponseWriter, r *http.Request, zone Zone)
// Send a NOTIFY to all configured remotes
// (POST /zones/{zone}/notify)
PostZoneNotify(w http.ResponseWriter, r *http.Request, zone Zone)
// Purge zone data, zone file, journal, timers, and KASP data
// (POST /zones/{zone}/purge)
PostZonePurge(w http.ResponseWriter, r *http.Request, zone Zone, params PostZonePurgeParams)
// Read zone records currently being served
// (GET /zones/{zone}/records)
GetZoneRecords(w http.ResponseWriter, r *http.Request, zone Zone, params GetZoneRecordsParams)
// Batch add/update/delete multiple DNS records (convenience endpoint)
// (POST /zones/{zone}/records/batch)
PostZoneRecordsBatch(w http.ResponseWriter, r *http.Request, zone Zone)
// Delete a DNS record (convenience endpoint)
// (DELETE /zones/{zone}/records/{owner}/{type})
DeleteZoneRecord(w http.ResponseWriter, r *http.Request, zone Zone, owner RecordOwner, pType RecordType, params DeleteZoneRecordParams)
// Add or update a DNS record (convenience endpoint)
// (POST /zones/{zone}/records/{owner}/{type})
PostZoneRecord(w http.ResponseWriter, r *http.Request, zone Zone, owner RecordOwner, pType RecordType)
// Force a slave zone refresh
// (POST /zones/{zone}/refresh)
PostZoneRefresh(w http.ResponseWriter, r *http.Request, zone Zone)
// Reload zone from disk
// (POST /zones/{zone}/reload)
PostZoneReload(w http.ResponseWriter, r *http.Request, zone Zone)
// Restore zone data and metadata from a server-side backup directory
// (POST /zones/{zone}/restore)
PostZoneRestore(w http.ResponseWriter, r *http.Request, zone Zone)
// Force slave zone retransfer without a serial check
// (POST /zones/{zone}/retransfer)
PostZoneRetransfer(w http.ResponseWriter, r *http.Request, zone Zone)
// Get the current SOA serial number
// (GET /zones/{zone}/serial)
GetZoneSerial(w http.ResponseWriter, r *http.Request, zone Zone)
// Set or increment the SOA serial number
// (PUT /zones/{zone}/serial)
PutZoneSerial(w http.ResponseWriter, r *http.Request, zone Zone)
// Re-sign the automatically signed zone
// (POST /zones/{zone}/sign)
PostZoneSign(w http.ResponseWriter, r *http.Request, zone Zone)
// Show zone statistics counters
// (GET /zones/{zone}/stats)
GetZoneStats(w http.ResponseWriter, r *http.Request, zone Zone, params GetZoneStatsParams)
// Show zone status
// (GET /zones/{zone}/status)
GetZoneStatus(w http.ResponseWriter, r *http.Request, zone Zone, params GetZoneStatusParams)
// Dismiss a zone freeze
// (POST /zones/{zone}/thaw)
PostZoneThaw(w http.ResponseWriter, r *http.Request, zone Zone)
// Begin a zone transaction
// (POST /zones/{zone}/transaction)
PostZoneTransaction(w http.ResponseWriter, r *http.Request, zone Zone)
// Abort and roll back the open zone transaction
// (POST /zones/{zone}/transaction/abort)
PostZoneTransactionAbort(w http.ResponseWriter, r *http.Request, zone Zone)
// Commit the open zone transaction
// (POST /zones/{zone}/transaction/commit)
PostZoneTransactionCommit(w http.ResponseWriter, r *http.Request, zone Zone)
// Get zone record changes within the open transaction
// (GET /zones/{zone}/transaction/diff)
GetZoneTransactionDiff(w http.ResponseWriter, r *http.Request, zone Zone)
// Read zone records within the open transaction
// (GET /zones/{zone}/transaction/records)
GetZoneTransactionRecords(w http.ResponseWriter, r *http.Request, zone Zone, params GetZoneTransactionRecordsParams)
// Remove records within the open transaction
// (DELETE /zones/{zone}/transaction/records/{owner}/{type})
DeleteZoneTransactionRecord(w http.ResponseWriter, r *http.Request, zone Zone, owner RecordOwner, pType RecordType, params DeleteZoneTransactionRecordParams)
// Add or replace a record within the open transaction
// (PUT /zones/{zone}/transaction/records/{owner}/{type})
PutZoneTransactionRecord(w http.ResponseWriter, r *http.Request, zone Zone, owner RecordOwner, pType RecordType)
// Trigger DNSSEC validation of the zone
// (POST /zones/{zone}/validate)
PostZoneValidate(w http.ResponseWriter, r *http.Request, zone Zone)
// Temporarily disable outgoing AXFR/IXFR
// (POST /zones/{zone}/xfr/freeze)
PostZoneXFRFreeze(w http.ResponseWriter, r *http.Request, zone Zone)
// Re-enable outgoing AXFR/IXFR
// (POST /zones/{zone}/xfr/thaw)
PostZoneXFRThaw(w http.ResponseWriter, r *http.Request, zone Zone)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) DeleteConfigTransactionItem ¶
func (siw *ServerInterfaceWrapper) DeleteConfigTransactionItem(w http.ResponseWriter, r *http.Request)
DeleteConfigTransactionItem operation middleware
func (*ServerInterfaceWrapper) DeleteZoneRecord ¶
func (siw *ServerInterfaceWrapper) DeleteZoneRecord(w http.ResponseWriter, r *http.Request)
DeleteZoneRecord operation middleware
func (*ServerInterfaceWrapper) DeleteZoneTransactionRecord ¶
func (siw *ServerInterfaceWrapper) DeleteZoneTransactionRecord(w http.ResponseWriter, r *http.Request)
DeleteZoneTransactionRecord operation middleware
func (*ServerInterfaceWrapper) GetConfig ¶
func (siw *ServerInterfaceWrapper) GetConfig(w http.ResponseWriter, r *http.Request)
GetConfig operation middleware
func (*ServerInterfaceWrapper) GetConfigExport ¶
func (siw *ServerInterfaceWrapper) GetConfigExport(w http.ResponseWriter, r *http.Request)
GetConfigExport operation middleware
func (*ServerInterfaceWrapper) GetConfigTransactionDiff ¶
func (siw *ServerInterfaceWrapper) GetConfigTransactionDiff(w http.ResponseWriter, r *http.Request)
GetConfigTransactionDiff operation middleware
func (*ServerInterfaceWrapper) GetConfigTransactionItem ¶
func (siw *ServerInterfaceWrapper) GetConfigTransactionItem(w http.ResponseWriter, r *http.Request)
GetConfigTransactionItem operation middleware
func (*ServerInterfaceWrapper) GetStats ¶
func (siw *ServerInterfaceWrapper) GetStats(w http.ResponseWriter, r *http.Request)
GetStats operation middleware
func (*ServerInterfaceWrapper) GetStatus ¶
func (siw *ServerInterfaceWrapper) GetStatus(w http.ResponseWriter, r *http.Request)
GetStatus operation middleware
func (*ServerInterfaceWrapper) GetZoneRecords ¶
func (siw *ServerInterfaceWrapper) GetZoneRecords(w http.ResponseWriter, r *http.Request)
GetZoneRecords operation middleware
func (*ServerInterfaceWrapper) GetZoneSerial ¶
func (siw *ServerInterfaceWrapper) GetZoneSerial(w http.ResponseWriter, r *http.Request)
GetZoneSerial operation middleware
func (*ServerInterfaceWrapper) GetZoneStats ¶
func (siw *ServerInterfaceWrapper) GetZoneStats(w http.ResponseWriter, r *http.Request)
GetZoneStats operation middleware
func (*ServerInterfaceWrapper) GetZoneStatus ¶
func (siw *ServerInterfaceWrapper) GetZoneStatus(w http.ResponseWriter, r *http.Request)
GetZoneStatus operation middleware
func (*ServerInterfaceWrapper) GetZoneTransactionDiff ¶
func (siw *ServerInterfaceWrapper) GetZoneTransactionDiff(w http.ResponseWriter, r *http.Request)
GetZoneTransactionDiff operation middleware
func (*ServerInterfaceWrapper) GetZoneTransactionRecords ¶
func (siw *ServerInterfaceWrapper) GetZoneTransactionRecords(w http.ResponseWriter, r *http.Request)
GetZoneTransactionRecords operation middleware
func (*ServerInterfaceWrapper) GetZones ¶ added in v0.1.1
func (siw *ServerInterfaceWrapper) GetZones(w http.ResponseWriter, r *http.Request)
GetZones operation middleware
func (*ServerInterfaceWrapper) PostConfigCheck ¶
func (siw *ServerInterfaceWrapper) PostConfigCheck(w http.ResponseWriter, r *http.Request)
PostConfigCheck operation middleware
func (*ServerInterfaceWrapper) PostConfigImport ¶
func (siw *ServerInterfaceWrapper) PostConfigImport(w http.ResponseWriter, r *http.Request)
PostConfigImport operation middleware
func (*ServerInterfaceWrapper) PostConfigInit ¶
func (siw *ServerInterfaceWrapper) PostConfigInit(w http.ResponseWriter, r *http.Request)
PostConfigInit operation middleware
func (*ServerInterfaceWrapper) PostConfigTransaction ¶
func (siw *ServerInterfaceWrapper) PostConfigTransaction(w http.ResponseWriter, r *http.Request)
PostConfigTransaction operation middleware
func (*ServerInterfaceWrapper) PostConfigTransactionAbort ¶
func (siw *ServerInterfaceWrapper) PostConfigTransactionAbort(w http.ResponseWriter, r *http.Request)
PostConfigTransactionAbort operation middleware
func (*ServerInterfaceWrapper) PostConfigTransactionCommit ¶
func (siw *ServerInterfaceWrapper) PostConfigTransactionCommit(w http.ResponseWriter, r *http.Request)
PostConfigTransactionCommit operation middleware
func (*ServerInterfaceWrapper) PostReload ¶
func (siw *ServerInterfaceWrapper) PostReload(w http.ResponseWriter, r *http.Request)
PostReload operation middleware
func (*ServerInterfaceWrapper) PostStop ¶
func (siw *ServerInterfaceWrapper) PostStop(w http.ResponseWriter, r *http.Request)
PostStop operation middleware
func (*ServerInterfaceWrapper) PostZoneBackup ¶
func (siw *ServerInterfaceWrapper) PostZoneBackup(w http.ResponseWriter, r *http.Request)
PostZoneBackup operation middleware
func (*ServerInterfaceWrapper) PostZoneCheck ¶
func (siw *ServerInterfaceWrapper) PostZoneCheck(w http.ResponseWriter, r *http.Request)
PostZoneCheck operation middleware
func (*ServerInterfaceWrapper) PostZoneFlush ¶
func (siw *ServerInterfaceWrapper) PostZoneFlush(w http.ResponseWriter, r *http.Request)
PostZoneFlush operation middleware
func (*ServerInterfaceWrapper) PostZoneFreeze ¶
func (siw *ServerInterfaceWrapper) PostZoneFreeze(w http.ResponseWriter, r *http.Request)
PostZoneFreeze operation middleware
func (*ServerInterfaceWrapper) PostZoneKSKSubmitted ¶
func (siw *ServerInterfaceWrapper) PostZoneKSKSubmitted(w http.ResponseWriter, r *http.Request)
PostZoneKSKSubmitted operation middleware
func (*ServerInterfaceWrapper) PostZoneKeyRollover ¶
func (siw *ServerInterfaceWrapper) PostZoneKeyRollover(w http.ResponseWriter, r *http.Request)
PostZoneKeyRollover operation middleware
func (*ServerInterfaceWrapper) PostZoneKeysLoad ¶
func (siw *ServerInterfaceWrapper) PostZoneKeysLoad(w http.ResponseWriter, r *http.Request)
PostZoneKeysLoad operation middleware
func (*ServerInterfaceWrapper) PostZoneNotify ¶
func (siw *ServerInterfaceWrapper) PostZoneNotify(w http.ResponseWriter, r *http.Request)
PostZoneNotify operation middleware
func (*ServerInterfaceWrapper) PostZonePurge ¶
func (siw *ServerInterfaceWrapper) PostZonePurge(w http.ResponseWriter, r *http.Request)
PostZonePurge operation middleware
func (*ServerInterfaceWrapper) PostZoneRecord ¶
func (siw *ServerInterfaceWrapper) PostZoneRecord(w http.ResponseWriter, r *http.Request)
PostZoneRecord operation middleware
func (*ServerInterfaceWrapper) PostZoneRecordsBatch ¶
func (siw *ServerInterfaceWrapper) PostZoneRecordsBatch(w http.ResponseWriter, r *http.Request)
PostZoneRecordsBatch operation middleware
func (*ServerInterfaceWrapper) PostZoneRefresh ¶
func (siw *ServerInterfaceWrapper) PostZoneRefresh(w http.ResponseWriter, r *http.Request)
PostZoneRefresh operation middleware
func (*ServerInterfaceWrapper) PostZoneReload ¶
func (siw *ServerInterfaceWrapper) PostZoneReload(w http.ResponseWriter, r *http.Request)
PostZoneReload operation middleware
func (*ServerInterfaceWrapper) PostZoneRestore ¶
func (siw *ServerInterfaceWrapper) PostZoneRestore(w http.ResponseWriter, r *http.Request)
PostZoneRestore operation middleware
func (*ServerInterfaceWrapper) PostZoneRetransfer ¶
func (siw *ServerInterfaceWrapper) PostZoneRetransfer(w http.ResponseWriter, r *http.Request)
PostZoneRetransfer operation middleware
func (*ServerInterfaceWrapper) PostZoneSign ¶
func (siw *ServerInterfaceWrapper) PostZoneSign(w http.ResponseWriter, r *http.Request)
PostZoneSign operation middleware
func (*ServerInterfaceWrapper) PostZoneThaw ¶
func (siw *ServerInterfaceWrapper) PostZoneThaw(w http.ResponseWriter, r *http.Request)
PostZoneThaw operation middleware
func (*ServerInterfaceWrapper) PostZoneTransaction ¶
func (siw *ServerInterfaceWrapper) PostZoneTransaction(w http.ResponseWriter, r *http.Request)
PostZoneTransaction operation middleware
func (*ServerInterfaceWrapper) PostZoneTransactionAbort ¶
func (siw *ServerInterfaceWrapper) PostZoneTransactionAbort(w http.ResponseWriter, r *http.Request)
PostZoneTransactionAbort operation middleware
func (*ServerInterfaceWrapper) PostZoneTransactionCommit ¶
func (siw *ServerInterfaceWrapper) PostZoneTransactionCommit(w http.ResponseWriter, r *http.Request)
PostZoneTransactionCommit operation middleware
func (*ServerInterfaceWrapper) PostZoneValidate ¶
func (siw *ServerInterfaceWrapper) PostZoneValidate(w http.ResponseWriter, r *http.Request)
PostZoneValidate operation middleware
func (*ServerInterfaceWrapper) PostZoneXFRFreeze ¶
func (siw *ServerInterfaceWrapper) PostZoneXFRFreeze(w http.ResponseWriter, r *http.Request)
PostZoneXFRFreeze operation middleware
func (*ServerInterfaceWrapper) PostZoneXFRThaw ¶
func (siw *ServerInterfaceWrapper) PostZoneXFRThaw(w http.ResponseWriter, r *http.Request)
PostZoneXFRThaw operation middleware
func (*ServerInterfaceWrapper) PutConfigTransactionItem ¶
func (siw *ServerInterfaceWrapper) PutConfigTransactionItem(w http.ResponseWriter, r *http.Request)
PutConfigTransactionItem operation middleware
func (*ServerInterfaceWrapper) PutZoneSerial ¶
func (siw *ServerInterfaceWrapper) PutZoneSerial(w http.ResponseWriter, r *http.Request)
PutZoneSerial operation middleware
func (*ServerInterfaceWrapper) PutZoneTransactionRecord ¶
func (siw *ServerInterfaceWrapper) PutZoneTransactionRecord(w http.ResponseWriter, r *http.Request)
PutZoneTransactionRecord operation middleware
type ServerStatus ¶
type ServerStatus struct {
Status *ServerStatusStatus `json:"status,omitempty"`
// Version Knot DNS version string.
Version *string `json:"version,omitempty"`
// Workers Number of worker threads.
Workers *int `json:"workers,omitempty"`
}
ServerStatus defines model for ServerStatus.
type ServerStatusStatus ¶
type ServerStatusStatus string
ServerStatusStatus defines model for ServerStatus.Status.
const (
Running ServerStatusStatus = "running"
)
Defines values for ServerStatusStatus.
type Stats ¶
Stats Nested map of `module → counter → value`. Both levels are dynamic and depend on which modules are loaded.
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type ZoneDiff ¶
type ZoneDiff struct {
// Added Records added by the transaction.
Added *[]Record `json:"added,omitempty"`
// Removed Records removed by the transaction.
Removed *[]Record `json:"removed,omitempty"`
}
ZoneDiff defines model for ZoneDiff.
type ZoneList ¶ added in v0.1.1
type ZoneList = []ZoneStatus
ZoneList All zones currently loaded on the server.
type ZoneStatus ¶
type ZoneStatus struct {
// Frozen Whether automatic zone changes are suspended.
Frozen *bool `json:"frozen,omitempty"`
// NextEvent Name of the next scheduled internal event.
NextEvent *string `json:"nextEvent,omitempty"`
// Role Zone role on this server.
Role *ZoneStatusRole `json:"role,omitempty"`
// Serial Current SOA serial number.
Serial *int `json:"serial,omitempty"`
// Transaction Whether a write transaction is currently open.
Transaction *bool `json:"transaction,omitempty"`
// XfrFrozen Whether outgoing AXFR/IXFR is disabled.
XfrFrozen *bool `json:"xfrFrozen,omitempty"`
Zone *string `json:"zone,omitempty"`
}
ZoneStatus defines model for ZoneStatus.
type ZoneStatusRole ¶
type ZoneStatusRole string
ZoneStatusRole Zone role on this server.
const ( Master ZoneStatusRole = "master" SignedMaster ZoneStatusRole = "signed-master" SignedSlave ZoneStatusRole = "signed-slave" Slave ZoneStatusRole = "slave" )
Defines values for ZoneStatusRole.
type ZoneTransactionBeginRequest ¶
type ZoneTransactionBeginRequest struct {
// Benevolent When `true`, tolerate a pre-existing transaction from another
// client instead of returning a 409 conflict.
Benevolent *bool `json:"benevolent,omitempty"`
}
ZoneTransactionBeginRequest defines model for ZoneTransactionBeginRequest.