gen

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package gen provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpec

func GetSpec() (swagger *openapi3.T, err error)

GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.

func GetSpecJSON

func GetSpecJSON() ([]byte, error)

GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.

func GetSwagger deprecated

func GetSwagger() (*openapi3.T, error)

GetSwagger returns the OpenAPI specification corresponding to the generated code in this file.

Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger to openapi3.T. Use GetSpec instead. This wrapper is retained for backwards compatibility.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func NewCreateRecordRequest

func NewCreateRecordRequest(server string, zoneId ZoneID, body CreateRecordJSONRequestBody) (*http.Request, error)

NewCreateRecordRequest calls the generic CreateRecord builder with application/json body

func NewCreateRecordRequestWithBody

func NewCreateRecordRequestWithBody(server string, zoneId ZoneID, contentType string, body io.Reader) (*http.Request, error)

NewCreateRecordRequestWithBody constructs an http.Request for the CreateRecord method, with any body, and a specified content type

func NewCreateSessionRequest

func NewCreateSessionRequest(server string, body CreateSessionJSONRequestBody) (*http.Request, error)

NewCreateSessionRequest calls the generic CreateSession builder with application/json body

func NewCreateSessionRequestWithBody

func NewCreateSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateSessionRequestWithBody constructs an http.Request for the CreateSession method, with any body, and a specified content type

func NewCreateTokenRequest

func NewCreateTokenRequest(server string, body CreateTokenJSONRequestBody) (*http.Request, error)

NewCreateTokenRequest calls the generic CreateToken builder with application/json body

func NewCreateTokenRequestWithBody

func NewCreateTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateTokenRequestWithBody constructs an http.Request for the CreateToken method, with any body, and a specified content type

func NewCreateZoneRequest

func NewCreateZoneRequest(server string, body CreateZoneJSONRequestBody) (*http.Request, error)

NewCreateZoneRequest calls the generic CreateZone builder with application/json body

func NewCreateZoneRequestWithBody

func NewCreateZoneRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateZoneRequestWithBody constructs an http.Request for the CreateZone method, with any body, and a specified content type

func NewDeleteRecordRequest

func NewDeleteRecordRequest(server string, recordId RecordID) (*http.Request, error)

NewDeleteRecordRequest constructs an http.Request for the DeleteRecord method

func NewDeleteSessionRequest

func NewDeleteSessionRequest(server string) (*http.Request, error)

NewDeleteSessionRequest constructs an http.Request for the DeleteSession method

func NewDeleteZoneRequest

func NewDeleteZoneRequest(server string, zoneId ZoneID) (*http.Request, error)

NewDeleteZoneRequest constructs an http.Request for the DeleteZone method

func NewDetachRecordRequest

func NewDetachRecordRequest(server string, recordId RecordID) (*http.Request, error)

NewDetachRecordRequest constructs an http.Request for the DetachRecord method

func NewExportZoneRequest

func NewExportZoneRequest(server string, zoneId ZoneID) (*http.Request, error)

NewExportZoneRequest constructs an http.Request for the ExportZone method

func NewGetCommitRequest

func NewGetCommitRequest(server string, commitId string) (*http.Request, error)

NewGetCommitRequest constructs an http.Request for the GetCommit method

func NewGetHealthRequest

func NewGetHealthRequest(server string) (*http.Request, error)

NewGetHealthRequest constructs an http.Request for the GetHealth method

func NewGetMetricsRequest

func NewGetMetricsRequest(server string) (*http.Request, error)

NewGetMetricsRequest constructs an http.Request for the GetMetrics method

func NewGetRecordRequest

func NewGetRecordRequest(server string, recordId RecordID) (*http.Request, error)

NewGetRecordRequest constructs an http.Request for the GetRecord method

func NewGetSessionRequest

func NewGetSessionRequest(server string) (*http.Request, error)

NewGetSessionRequest constructs an http.Request for the GetSession method

func NewGetSettingsRequest

func NewGetSettingsRequest(server string) (*http.Request, error)

NewGetSettingsRequest constructs an http.Request for the GetSettings method

func NewGetZoneRequest

func NewGetZoneRequest(server string, zoneId ZoneID) (*http.Request, error)

NewGetZoneRequest constructs an http.Request for the GetZone method

func NewImportZoneRequestWithBody

func NewImportZoneRequestWithBody(server string, params *ImportZoneParams, contentType string, body io.Reader) (*http.Request, error)

NewImportZoneRequestWithBody constructs an http.Request for the ImportZone method, with any body, and a specified content type

func NewListCommitsRequest

func NewListCommitsRequest(server string, params *ListCommitsParams) (*http.Request, error)

NewListCommitsRequest constructs an http.Request for the ListCommits method

func NewListRecordsRequest

func NewListRecordsRequest(server string, zoneId ZoneID, params *ListRecordsParams) (*http.Request, error)

NewListRecordsRequest constructs an http.Request for the ListRecords method

func NewListTokensRequest

func NewListTokensRequest(server string) (*http.Request, error)

NewListTokensRequest constructs an http.Request for the ListTokens method

func NewListZonesRequest

func NewListZonesRequest(server string, params *ListZonesParams) (*http.Request, error)

NewListZonesRequest constructs an http.Request for the ListZones method

func NewReplaceRRsetsRequest

func NewReplaceRRsetsRequest(server string, zoneId ZoneID, body ReplaceRRsetsJSONRequestBody) (*http.Request, error)

NewReplaceRRsetsRequest calls the generic ReplaceRRsets builder with application/json body

func NewReplaceRRsetsRequestWithBody

func NewReplaceRRsetsRequestWithBody(server string, zoneId ZoneID, contentType string, body io.Reader) (*http.Request, error)

NewReplaceRRsetsRequestWithBody constructs an http.Request for the ReplaceRRsets method, with any body, and a specified content type

func NewRevokeTokenRequest

func NewRevokeTokenRequest(server string, tokenId string) (*http.Request, error)

NewRevokeTokenRequest constructs an http.Request for the RevokeToken method

func NewRollbackZoneRequest

func NewRollbackZoneRequest(server string, zoneId ZoneID, body RollbackZoneJSONRequestBody) (*http.Request, error)

NewRollbackZoneRequest calls the generic RollbackZone builder with application/json body

func NewRollbackZoneRequestWithBody

func NewRollbackZoneRequestWithBody(server string, zoneId ZoneID, contentType string, body io.Reader) (*http.Request, error)

NewRollbackZoneRequestWithBody constructs an http.Request for the RollbackZone method, with any body, and a specified content type

func NewStreamQueriesRequest

func NewStreamQueriesRequest(server string, params *StreamQueriesParams) (*http.Request, error)

NewStreamQueriesRequest constructs an http.Request for the StreamQueries method

func NewUpdateRecordRequest

func NewUpdateRecordRequest(server string, recordId RecordID, body UpdateRecordJSONRequestBody) (*http.Request, error)

NewUpdateRecordRequest calls the generic UpdateRecord builder with application/json body

func NewUpdateRecordRequestWithBody

func NewUpdateRecordRequestWithBody(server string, recordId RecordID, contentType string, body io.Reader) (*http.Request, error)

NewUpdateRecordRequestWithBody constructs an http.Request for the UpdateRecord method, with any body, and a specified content type

func NewUpdateSettingsRequest

func NewUpdateSettingsRequest(server string, body UpdateSettingsJSONRequestBody) (*http.Request, error)

NewUpdateSettingsRequest calls the generic UpdateSettings builder with application/json body

func NewUpdateSettingsRequestWithBody

func NewUpdateSettingsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateSettingsRequestWithBody constructs an http.Request for the UpdateSettings method, with any body, and a specified content type

func NewUpdateZoneRequest

func NewUpdateZoneRequest(server string, zoneId ZoneID, body UpdateZoneJSONRequestBody) (*http.Request, error)

NewUpdateZoneRequest calls the generic UpdateZone builder with application/json body

func NewUpdateZoneRequestWithBody

func NewUpdateZoneRequestWithBody(server string, zoneId ZoneID, contentType string, body io.Reader) (*http.Request, error)

NewUpdateZoneRequestWithBody constructs an http.Request for the UpdateZone method, with any body, and a specified content type

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateRecord

func (c *Client) CreateRecord(ctx context.Context, zoneId ZoneID, body CreateRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateRecord Add a record to a zone

An address record may generate a PTR in the reverse zone answering for it. What that produced, and what it could not produce, comes back in the response rather than in a log line (docs/decisions.md D3 and D6).

Takes a body of the `application/json` content type.

Corresponds with POST /zones/{zoneId}/records (the `CreateRecord` operationId).

func (*Client) CreateRecordWithBody

func (c *Client) CreateRecordWithBody(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateRecordWithBody Add a record to a zone

An address record may generate a PTR in the reverse zone answering for it. What that produced, and what it could not produce, comes back in the response rather than in a log line (docs/decisions.md D3 and D6).

Takes any type of body and a specified content type.

Corresponds with POST /zones/{zoneId}/records (the `CreateRecord` operationId).

func (*Client) CreateSession

func (c *Client) CreateSession(ctx context.Context, body CreateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateSession Exchange a token for a browser session

The web interface does not hold a long-lived token. It posts one here once and receives an `httpOnly` session cookie, which no script that gets injected into the page can read, which is the whole point.

A second, readable cookie carries a CSRF value. Every state-changing request authenticated by the session cookie has to repeat it in the `X-Wegweiser-CSRF` header. `SameSite=Strict` already blocks a cross-site form post; this is the second layer. A request that authenticates with a bearer token skips the check, because CSRF needs ambient credentials and a bearer token is not ambient.

Unauthenticated, because a request that could authenticate would not need this. The token inside is checked the same way and is rate-limited the same way.

Takes a body of the `application/json` content type.

Corresponds with POST /auth/session (the `CreateSession` operationId).

func (*Client) CreateSessionWithBody

func (c *Client) CreateSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateSessionWithBody Exchange a token for a browser session

The web interface does not hold a long-lived token. It posts one here once and receives an `httpOnly` session cookie, which no script that gets injected into the page can read, which is the whole point.

A second, readable cookie carries a CSRF value. Every state-changing request authenticated by the session cookie has to repeat it in the `X-Wegweiser-CSRF` header. `SameSite=Strict` already blocks a cross-site form post; this is the second layer. A request that authenticates with a bearer token skips the check, because CSRF needs ambient credentials and a bearer token is not ambient.

Unauthenticated, because a request that could authenticate would not need this. The token inside is checked the same way and is rate-limited the same way.

Takes any type of body and a specified content type.

Corresponds with POST /auth/session (the `CreateSession` operationId).

func (*Client) CreateToken

func (c *Client) CreateToken(ctx context.Context, body CreateTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateToken Mint a token

The secret comes back in this response and never again. It is 256 bits from a cryptographic source; what the server keeps is its SHA-256, so a copy of the database is not a copy of the credentials.

Takes a body of the `application/json` content type.

Corresponds with POST /tokens (the `CreateToken` operationId).

func (*Client) CreateTokenWithBody

func (c *Client) CreateTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateTokenWithBody Mint a token

The secret comes back in this response and never again. It is 256 bits from a cryptographic source; what the server keeps is its SHA-256, so a copy of the database is not a copy of the credentials.

Takes any type of body and a specified content type.

Corresponds with POST /tokens (the `CreateToken` operationId).

func (*Client) CreateZone

func (c *Client) CreateZone(ctx context.Context, body CreateZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateZone Create a zone

Takes a body of the `application/json` content type.

Corresponds with POST /zones (the `CreateZone` operationId).

func (*Client) CreateZoneWithBody

func (c *Client) CreateZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateZoneWithBody Create a zone

Takes any type of body and a specified content type.

Corresponds with POST /zones (the `CreateZone` operationId).

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteRecord Delete a record

Corresponds with DELETE /records/{recordId} (the `DeleteRecord` operationId).

func (*Client) DeleteSession

func (c *Client) DeleteSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteSession End the session

The cookies are cleared and the session is forgotten here, so a copy of the cookie taken beforehand stops working too. The token it was opened with is untouched.

Corresponds with DELETE /auth/session (the `DeleteSession` operationId).

func (*Client) DeleteZone

func (c *Client) DeleteZone(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteZone Delete a zone and everything in it

Corresponds with DELETE /zones/{zoneId} (the `DeleteZone` operationId).

func (*Client) DetachRecord

func (c *Client) DetachRecord(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*http.Response, error)

DetachRecord Take over a generated record

The record keeps its data and its identity, loses its link to the record it was generated from, and the automation stops maintaining it (docs/decisions.md D4). A record that was already authored is returned unchanged: asking for it to be nobody's derivative has got what it asked for.

Corresponds with POST /records/{recordId}/detach (the `DetachRecord` operationId).

func (*Client) ExportZone

func (c *Client) ExportZone(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*http.Response, error)

ExportZone Write a zone out as a zonefile

The presentation format of RFC 1035 §5, which any other authoritative server reads. Every name is absolute and every record carries its own TTL and class, so no line means something different when it is copied out; records come out in the canonical order of RFC 4034 §6.1, so exporting the same zone twice is the same bytes and a diff of two exports is a diff of two zones.

A disabled record is left out. It is not part of the zone as it answers, and a file has nowhere to say "present but switched off".

Corresponds with GET /zones/{zoneId}/export (the `ExportZone` operationId).

func (*Client) GetCommit

func (c *Client) GetCommit(ctx context.Context, commitId string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetCommit Read one commit and everything it changed

The events are the diff: every record that was removed and every record that was added, both carrying their full data. That is what RFC 1995 §2 asks of an incremental transfer, and it is also what an interface needs to render the change and what restoring an earlier state needs to undo it.

Corresponds with GET /commits/{commitId} (the `GetCommit` operationId).

func (*Client) GetHealth

func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

GetHealth Report whether the server is fit to answer queries

Unauthenticated on purpose: a health check that needs a credential is one more thing that can fail for a reason unrelated to health.

Corresponds with GET /healthz (the `GetHealth` operationId).

func (*Client) GetMetrics

func (c *Client) GetMetrics(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

GetMetrics Export the current metrics

The Prometheus text exposition format: queries by transport, type and response code, latency, response sizes, drops, truncations, what the snapshot being answered from holds, and the Go runtime and process collectors that come with any Go exporter.

Authenticated like everything else here. What a server is asked, how often and by how many zones is operational detail, and a scraper can carry a bearer token: Prometheus has had `authorization` in its scrape configuration for years. `/healthz` is the one endpoint that needs no credential, because a load balancer cannot be given one.

The response carries the exposition format's version in its `Content-Type`, which is where a scraper reads it.

Corresponds with GET /metrics (the `GetMetrics` operationId).

func (*Client) GetRecord

func (c *Client) GetRecord(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*http.Response, error)

GetRecord Read one record

Corresponds with GET /records/{recordId} (the `GetRecord` operationId).

func (*Client) GetSession

func (c *Client) GetSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

GetSession Report who this request is authenticated as

What an interface asks when it loads, to find out whether it has to show a login at all, and what to grey out if it does not.

Corresponds with GET /auth/session (the `GetSession` operationId).

func (*Client) GetSettings

func (c *Client) GetSettings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

GetSettings Read the server-wide settings

These are the defaults a zone that says nothing about itself inherits. They live in the database, so changing one takes effect on the next write without a restart (docs/decisions.md D11).

Corresponds with GET /settings (the `GetSettings` operationId).

func (*Client) GetZone

func (c *Client) GetZone(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*http.Response, error)

GetZone Read one zone

Corresponds with GET /zones/{zoneId} (the `GetZone` operationId).

func (*Client) ImportZoneWithBody

func (c *Client) ImportZoneWithBody(ctx context.Context, params *ImportZoneParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

ImportZoneWithBody Bring a whole zone in from a zonefile

The body is the file itself, in the presentation format of RFC 1035 §5. The zone it describes is wherever its SOA sits, so the name is not sent separately and cannot be sent inconsistently.

The serial in the file is the serial the zone starts at. A migrated zone that restarted at 1 would look older than itself to every secondary that has already seen it (RFC 1982 §3.2), which is the single most common way to break a migration (docs/decisions.md D2).

`$INCLUDE` is refused: a file arriving here that could pull in a path would read this server's filesystem out loud.

Records that a delegation in the same file makes unanswerable are left out rather than failing the whole file, and come back in `skipped`. Real zones carry them, and a migration that stops on one is a migration nobody finishes.

The zone must not already exist. A file is the complete contents of a zone, so bringing one into a zone that holds records is a replacement rather than an import.

Takes any type of body and a specified content type.

Corresponds with POST /zones/import (the `ImportZone` operationId).

func (*Client) ListCommits

func (c *Client) ListCommits(ctx context.Context, params *ListCommitsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListCommits List commits, newest first

Every write is a commit, so this is the whole history of the server. Commits are listed without their events, which is what makes a page of history cheap on a zone that has been edited for years; read one commit to get the changes it made.

A commit outlives the zone it describes, so the history of a deleted zone is still here, under the name it had.

Corresponds with GET /commits (the `ListCommits` operationId).

func (*Client) ListRecords

func (c *Client) ListRecords(ctx context.Context, zoneId ZoneID, params *ListRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListRecords List the records of a zone

Corresponds with GET /zones/{zoneId}/records (the `ListRecords` operationId).

func (*Client) ListTokens

func (c *Client) ListTokens(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListTokens List the tokens that may use this API

Revoked and expired tokens are listed too, so that a name in the history can still be looked up. No response ever carries a secret: what is stored is its SHA-256, and the leading characters kept in the clear are there to tell two tokens apart, not to authenticate with.

Corresponds with GET /tokens (the `ListTokens` operationId).

func (*Client) ListZones

func (c *Client) ListZones(ctx context.Context, params *ListZonesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListZones List zones

Corresponds with GET /zones (the `ListZones` operationId).

func (*Client) ReplaceRRsets

func (c *Client) ReplaceRRsets(ctx context.Context, zoneId ZoneID, body ReplaceRRsetsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

ReplaceRRsets Make the named RRsets exactly what is given

An RRset (everything sharing an owner name, class and type) is the unit DNS answers with (RFC 2181 §5), and therefore the unit a record editor edits. Sending the set rather than a list of additions and removals means the client says what it wants to be true, and the server works out the difference; a record whose data did not change keeps its identity, and with it its comment, its provenance and the history pointing at it.

Only the RRsets named here are touched. An empty `records` removes one.

Everything in one request becomes one commit, so a page of edits saved together is one line in the history and one point to roll back to.

The RRsets are named in the body rather than in the path because a DNS label may hold any octet, `/` among them, so there is no path form that is safe for every name.

Takes a body of the `application/json` content type.

Corresponds with PUT /zones/{zoneId}/rrsets (the `ReplaceRRsets` operationId).

func (*Client) ReplaceRRsetsWithBody

func (c *Client) ReplaceRRsetsWithBody(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

ReplaceRRsetsWithBody Make the named RRsets exactly what is given

An RRset (everything sharing an owner name, class and type) is the unit DNS answers with (RFC 2181 §5), and therefore the unit a record editor edits. Sending the set rather than a list of additions and removals means the client says what it wants to be true, and the server works out the difference; a record whose data did not change keeps its identity, and with it its comment, its provenance and the history pointing at it.

Only the RRsets named here are touched. An empty `records` removes one.

Everything in one request becomes one commit, so a page of edits saved together is one line in the history and one point to roll back to.

The RRsets are named in the body rather than in the path because a DNS label may hold any octet, `/` among them, so there is no path form that is safe for every name.

Takes any type of body and a specified content type.

Corresponds with PUT /zones/{zoneId}/rrsets (the `ReplaceRRsets` operationId).

func (*Client) RevokeToken

func (c *Client) RevokeToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error)

RevokeToken Withdraw a token

The token is marked unusable rather than removed, so that the history it appears in still names something. Revoking a token that is already revoked changes nothing and is not an error.

The last token that can still administer the server is refused: a server nobody can reach is not a state this API will put itself in.

Corresponds with DELETE /tokens/{tokenId} (the `RevokeToken` operationId).

func (*Client) RollbackZone

func (c *Client) RollbackZone(ctx context.Context, zoneId ZoneID, body RollbackZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

RollbackZone Restore a zone to the state it had at a serial

The difference between the zone as it stands and the zone as it stood is written as a **new** commit that moves forward to that state. It is not a rewind: a secondary that has already seen serial 90 will never accept a jump back to 42, because RFC 1982 arithmetic makes 42 older and RFC 1995 has no way to express going backwards.

Records that did not change in between are not touched, so they keep their identity, their comments and the history pointing at them. Records the server generated are not restored directly: they follow from the records they were generated from, so restoring those is what moves them.

A rollback to the serial the zone is already at changes nothing and answers with no commit.

Takes a body of the `application/json` content type.

Corresponds with POST /zones/{zoneId}/rollback (the `RollbackZone` operationId).

func (*Client) RollbackZoneWithBody

func (c *Client) RollbackZoneWithBody(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

RollbackZoneWithBody Restore a zone to the state it had at a serial

The difference between the zone as it stands and the zone as it stood is written as a **new** commit that moves forward to that state. It is not a rewind: a secondary that has already seen serial 90 will never accept a jump back to 42, because RFC 1982 arithmetic makes 42 older and RFC 1995 has no way to express going backwards.

Records that did not change in between are not touched, so they keep their identity, their comments and the history pointing at them. Records the server generated are not restored directly: they follow from the records they were generated from, so restoring those is what moves them.

A rollback to the serial the zone is already at changes nothing and answers with no commit.

Takes any type of body and a specified content type.

Corresponds with POST /zones/{zoneId}/rollback (the `RollbackZone` operationId).

func (*Client) StreamQueries

func (c *Client) StreamQueries(ctx context.Context, params *StreamQueriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

StreamQueries Watch queries as they are answered

A live tail of the exchanges matching the filter, as Server-Sent Events. Two kinds of message arrive:

  • `query`, one per exchange, carrying a `QueryEvent`.
  • `status`, whenever what the stream is leaving out changes and every few seconds regardless, carrying a `StreamStatus`. It says what the stream is sampling at and how much it has dropped, because a stream that quietly leaves things out while looking complete is worse than one that admits to showing every fiftieth query (docs/decisions.md D9).

The filter is applied before anything is buffered, so watching one zone stays complete however busy the rest of the server is. A watcher that stops reading loses its oldest exchanges, never its newest: this is a live view, and it is never allowed to slow a query down.

How many watchers may be open at once is bounded, because each one costs the query path a filter evaluation per query. A request past the bound is refused with 503.

Corresponds with GET /queries/stream (the `StreamQueries` operationId).

func (*Client) UpdateRecord

func (c *Client) UpdateRecord(ctx context.Context, recordId RecordID, body UpdateRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateRecord Change a record

Only the fields that are present are changed. The record keeps its identity, and with it its comment, its provenance and the history pointing at it, which is what tells an edit apart from a delete and an add.

A record the server generated is refused, naming the record it came from; detach it first to take it over (docs/decisions.md D4).

Takes a body of the `application/json` content type.

Corresponds with PATCH /records/{recordId} (the `UpdateRecord` operationId).

func (*Client) UpdateRecordWithBody

func (c *Client) UpdateRecordWithBody(ctx context.Context, recordId RecordID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateRecordWithBody Change a record

Only the fields that are present are changed. The record keeps its identity, and with it its comment, its provenance and the history pointing at it, which is what tells an edit apart from a delete and an add.

A record the server generated is refused, naming the record it came from; detach it first to take it over (docs/decisions.md D4).

Takes any type of body and a specified content type.

Corresponds with PATCH /records/{recordId} (the `UpdateRecord` operationId).

func (*Client) UpdateSettings

func (c *Client) UpdateSettings(ctx context.Context, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateSettings Change the server-wide settings

A field that is absent is left alone, so a client may send only what it means to change.

Takes a body of the `application/json` content type.

Corresponds with PATCH /settings (the `UpdateSettings` operationId).

func (*Client) UpdateSettingsWithBody

func (c *Client) UpdateSettingsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateSettingsWithBody Change the server-wide settings

A field that is absent is left alone, so a client may send only what it means to change.

Takes any type of body and a specified content type.

Corresponds with PATCH /settings (the `UpdateSettings` operationId).

func (*Client) UpdateZone

func (c *Client) UpdateZone(ctx context.Context, zoneId ZoneID, body UpdateZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateZone Change a zone's own settings

Only the fields that are present are changed. The zone's records are not touched, and the zone cannot be renamed: every owner name, every sort key and the whole journal belong to the name it has.

Changing anything that is served advances the serial, like any other change. Changing nothing writes nothing.

Takes a body of the `application/json` content type.

Corresponds with PATCH /zones/{zoneId} (the `UpdateZone` operationId).

func (*Client) UpdateZoneWithBody

func (c *Client) UpdateZoneWithBody(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateZoneWithBody Change a zone's own settings

Only the fields that are present are changed. The zone's records are not touched, and the zone cannot be renamed: every owner name, every sort key and the whole journal belong to the name it has.

Changing anything that is served advances the serial, like any other change. Changing nothing writes nothing.

Takes any type of body and a specified content type.

Corresponds with PATCH /zones/{zoneId} (the `UpdateZone` operationId).

type ClientInterface

type ClientInterface interface {

	// DeleteSession End the session
	//
	// The cookies are cleared and the session is forgotten here, so a copy of
	// the cookie taken beforehand stops working too. The token it was opened
	// with is untouched.
	//
	// Corresponds with DELETE /auth/session (the `DeleteSession` operationId).
	DeleteSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSession Report who this request is authenticated as
	//
	// What an interface asks when it loads, to find out whether it has to
	// show a login at all, and what to grey out if it does not.
	//
	// Corresponds with GET /auth/session (the `GetSession` operationId).
	GetSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateSessionWithBody Exchange a token for a browser session
	//
	// The web interface does not hold a long-lived token. It posts one here
	// once and receives an `httpOnly` session cookie, which no script that
	// gets injected into the page can read, which is the whole point.
	//
	// A second, readable cookie carries a CSRF value. Every state-changing
	// request authenticated by the session cookie has to repeat it in the
	// `X-Wegweiser-CSRF` header. `SameSite=Strict` already blocks a
	// cross-site form post; this is the second layer. A request that
	// authenticates with a bearer token skips the check, because CSRF needs
	// ambient credentials and a bearer token is not ambient.
	//
	// Unauthenticated, because a request that could authenticate would not
	// need this. The token inside is checked the same way and is rate-limited
	// the same way.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /auth/session (the `CreateSession` operationId).
	CreateSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateSession Exchange a token for a browser session
	//
	// The web interface does not hold a long-lived token. It posts one here
	// once and receives an `httpOnly` session cookie, which no script that
	// gets injected into the page can read, which is the whole point.
	//
	// A second, readable cookie carries a CSRF value. Every state-changing
	// request authenticated by the session cookie has to repeat it in the
	// `X-Wegweiser-CSRF` header. `SameSite=Strict` already blocks a
	// cross-site form post; this is the second layer. A request that
	// authenticates with a bearer token skips the check, because CSRF needs
	// ambient credentials and a bearer token is not ambient.
	//
	// Unauthenticated, because a request that could authenticate would not
	// need this. The token inside is checked the same way and is rate-limited
	// the same way.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /auth/session (the `CreateSession` operationId).
	CreateSession(ctx context.Context, body CreateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCommits List commits, newest first
	//
	// Every write is a commit, so this is the whole history of the server.
	// Commits are listed without their events, which is what makes a page of
	// history cheap on a zone that has been edited for years; read one commit
	// to get the changes it made.
	//
	// A commit outlives the zone it describes, so the history of a deleted
	// zone is still here, under the name it had.
	//
	// Corresponds with GET /commits (the `ListCommits` operationId).
	ListCommits(ctx context.Context, params *ListCommitsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCommit Read one commit and everything it changed
	//
	// The events are the diff: every record that was removed and every record
	// that was added, both carrying their full data. That is what RFC 1995 §2
	// asks of an incremental transfer, and it is also what an interface needs
	// to render the change and what restoring an earlier state needs to undo
	// it.
	//
	// Corresponds with GET /commits/{commitId} (the `GetCommit` operationId).
	GetCommit(ctx context.Context, commitId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHealth Report whether the server is fit to answer queries
	//
	// Unauthenticated on purpose: a health check that needs a credential is
	// one more thing that can fail for a reason unrelated to health.
	//
	// Corresponds with GET /healthz (the `GetHealth` operationId).
	GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetMetrics Export the current metrics
	//
	// The Prometheus text exposition format: queries by transport, type and
	// response code, latency, response sizes, drops, truncations, what the
	// snapshot being answered from holds, and the Go runtime and process
	// collectors that come with any Go exporter.
	//
	// Authenticated like everything else here. What a server is asked, how
	// often and by how many zones is operational detail, and a scraper can
	// carry a bearer token: Prometheus has had `authorization` in its scrape
	// configuration for years. `/healthz` is the one endpoint that needs no
	// credential, because a load balancer cannot be given one.
	//
	// The response carries the exposition format's version in its
	// `Content-Type`, which is where a scraper reads it.
	//
	// Corresponds with GET /metrics (the `GetMetrics` operationId).
	GetMetrics(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StreamQueries Watch queries as they are answered
	//
	// A live tail of the exchanges matching the filter, as Server-Sent
	// Events. Two kinds of message arrive:
	//
	// - `query`, one per exchange, carrying a `QueryEvent`.
	// - `status`, whenever what the stream is leaving out changes and every
	//   few seconds regardless, carrying a `StreamStatus`. It says what the
	//   stream is sampling at and how much it has dropped, because a stream
	//   that quietly leaves things out while looking complete is worse than
	//   one that admits to showing every fiftieth query
	//   (docs/decisions.md D9).
	//
	// The filter is applied before anything is buffered, so watching one zone
	// stays complete however busy the rest of the server is. A watcher that
	// stops reading loses its oldest exchanges, never its newest: this is a
	// live view, and it is never allowed to slow a query down.
	//
	// How many watchers may be open at once is bounded, because each one
	// costs the query path a filter evaluation per query. A request past the
	// bound is refused with 503.
	//
	// Corresponds with GET /queries/stream (the `StreamQueries` operationId).
	StreamQueries(ctx context.Context, params *StreamQueriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteRecord Delete a record
	//
	// Corresponds with DELETE /records/{recordId} (the `DeleteRecord` operationId).
	DeleteRecord(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRecord Read one record
	//
	// Corresponds with GET /records/{recordId} (the `GetRecord` operationId).
	GetRecord(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateRecordWithBody Change a record
	//
	// Only the fields that are present are changed. The record keeps its
	// identity, and with it its comment, its provenance and the history
	// pointing at it, which is what tells an edit apart from a delete and an
	// add.
	//
	// A record the server generated is refused, naming the record it came
	// from; detach it first to take it over (docs/decisions.md D4).
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PATCH /records/{recordId} (the `UpdateRecord` operationId).
	UpdateRecordWithBody(ctx context.Context, recordId RecordID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateRecord Change a record
	//
	// Only the fields that are present are changed. The record keeps its
	// identity, and with it its comment, its provenance and the history
	// pointing at it, which is what tells an edit apart from a delete and an
	// add.
	//
	// A record the server generated is refused, naming the record it came
	// from; detach it first to take it over (docs/decisions.md D4).
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PATCH /records/{recordId} (the `UpdateRecord` operationId).
	UpdateRecord(ctx context.Context, recordId RecordID, body UpdateRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DetachRecord Take over a generated record
	//
	// The record keeps its data and its identity, loses its link to the
	// record it was generated from, and the automation stops maintaining it
	// (docs/decisions.md D4). A record that was already authored is returned
	// unchanged: asking for it to be nobody's derivative has got what it
	// asked for.
	//
	// Corresponds with POST /records/{recordId}/detach (the `DetachRecord` operationId).
	DetachRecord(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSettings Read the server-wide settings
	//
	// These are the defaults a zone that says nothing about itself inherits.
	// They live in the database, so changing one takes effect on the next
	// write without a restart (docs/decisions.md D11).
	//
	// Corresponds with GET /settings (the `GetSettings` operationId).
	GetSettings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateSettingsWithBody Change the server-wide settings
	//
	// A field that is absent is left alone, so a client may send only what it
	// means to change.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PATCH /settings (the `UpdateSettings` operationId).
	UpdateSettingsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateSettings Change the server-wide settings
	//
	// A field that is absent is left alone, so a client may send only what it
	// means to change.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PATCH /settings (the `UpdateSettings` operationId).
	UpdateSettings(ctx context.Context, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListTokens List the tokens that may use this API
	//
	// Revoked and expired tokens are listed too, so that a name in the
	// history can still be looked up. No response ever carries a secret: what
	// is stored is its SHA-256, and the leading characters kept in the clear
	// are there to tell two tokens apart, not to authenticate with.
	//
	// Corresponds with GET /tokens (the `ListTokens` operationId).
	ListTokens(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateTokenWithBody Mint a token
	//
	// The secret comes back in this response and never again. It is 256 bits
	// from a cryptographic source; what the server keeps is its SHA-256, so a
	// copy of the database is not a copy of the credentials.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /tokens (the `CreateToken` operationId).
	CreateTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateToken Mint a token
	//
	// The secret comes back in this response and never again. It is 256 bits
	// from a cryptographic source; what the server keeps is its SHA-256, so a
	// copy of the database is not a copy of the credentials.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /tokens (the `CreateToken` operationId).
	CreateToken(ctx context.Context, body CreateTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RevokeToken Withdraw a token
	//
	// The token is marked unusable rather than removed, so that the history
	// it appears in still names something. Revoking a token that is already
	// revoked changes nothing and is not an error.
	//
	// The last token that can still administer the server is refused: a
	// server nobody can reach is not a state this API will put itself in.
	//
	// Corresponds with DELETE /tokens/{tokenId} (the `RevokeToken` operationId).
	RevokeToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListZones List zones
	//
	// Corresponds with GET /zones (the `ListZones` operationId).
	ListZones(ctx context.Context, params *ListZonesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateZoneWithBody Create a zone
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /zones (the `CreateZone` operationId).
	CreateZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateZone Create a zone
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /zones (the `CreateZone` operationId).
	CreateZone(ctx context.Context, body CreateZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ImportZoneWithBody Bring a whole zone in from a zonefile
	//
	// The body is the file itself, in the presentation format of RFC 1035 §5.
	// The zone it describes is wherever its SOA sits, so the name is not sent
	// separately and cannot be sent inconsistently.
	//
	// The serial in the file is the serial the zone starts at. A migrated
	// zone that restarted at 1 would look older than itself to every
	// secondary that has already seen it (RFC 1982 §3.2), which is the single
	// most common way to break a migration (docs/decisions.md D2).
	//
	// `$INCLUDE` is refused: a file arriving here that could pull in a path
	// would read this server's filesystem out loud.
	//
	// Records that a delegation in the same file makes unanswerable are left
	// out rather than failing the whole file, and come back in `skipped`.
	// Real zones carry them, and a migration that stops on one is a migration
	// nobody finishes.
	//
	// The zone must not already exist. A file is the complete contents of a
	// zone, so bringing one into a zone that holds records is a replacement
	// rather than an import.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /zones/import (the `ImportZone` operationId).
	ImportZoneWithBody(ctx context.Context, params *ImportZoneParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteZone Delete a zone and everything in it
	//
	// Corresponds with DELETE /zones/{zoneId} (the `DeleteZone` operationId).
	DeleteZone(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetZone Read one zone
	//
	// Corresponds with GET /zones/{zoneId} (the `GetZone` operationId).
	GetZone(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateZoneWithBody Change a zone's own settings
	//
	// Only the fields that are present are changed. The zone's records are
	// not touched, and the zone cannot be renamed: every owner name, every
	// sort key and the whole journal belong to the name it has.
	//
	// Changing anything that is served advances the serial, like any other
	// change. Changing nothing writes nothing.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PATCH /zones/{zoneId} (the `UpdateZone` operationId).
	UpdateZoneWithBody(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateZone Change a zone's own settings
	//
	// Only the fields that are present are changed. The zone's records are
	// not touched, and the zone cannot be renamed: every owner name, every
	// sort key and the whole journal belong to the name it has.
	//
	// Changing anything that is served advances the serial, like any other
	// change. Changing nothing writes nothing.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PATCH /zones/{zoneId} (the `UpdateZone` operationId).
	UpdateZone(ctx context.Context, zoneId ZoneID, body UpdateZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ExportZone Write a zone out as a zonefile
	//
	// The presentation format of RFC 1035 §5, which any other authoritative
	// server reads. Every name is absolute and every record carries its own
	// TTL and class, so no line means something different when it is copied
	// out; records come out in the canonical order of RFC 4034 §6.1, so
	// exporting the same zone twice is the same bytes and a diff of two
	// exports is a diff of two zones.
	//
	// A disabled record is left out. It is not part of the zone as it
	// answers, and a file has nowhere to say "present but switched off".
	//
	// Corresponds with GET /zones/{zoneId}/export (the `ExportZone` operationId).
	ExportZone(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListRecords List the records of a zone
	//
	// Corresponds with GET /zones/{zoneId}/records (the `ListRecords` operationId).
	ListRecords(ctx context.Context, zoneId ZoneID, params *ListRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateRecordWithBody Add a record to a zone
	//
	// An address record may generate a PTR in the reverse zone answering for
	// it. What that produced, and what it could not produce, comes back in
	// the response rather than in a log line (docs/decisions.md D3 and D6).
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /zones/{zoneId}/records (the `CreateRecord` operationId).
	CreateRecordWithBody(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateRecord Add a record to a zone
	//
	// An address record may generate a PTR in the reverse zone answering for
	// it. What that produced, and what it could not produce, comes back in
	// the response rather than in a log line (docs/decisions.md D3 and D6).
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /zones/{zoneId}/records (the `CreateRecord` operationId).
	CreateRecord(ctx context.Context, zoneId ZoneID, body CreateRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RollbackZoneWithBody Restore a zone to the state it had at a serial
	//
	// The difference between the zone as it stands and the zone as it stood
	// is written as a **new** commit that moves forward to that state. It is
	// not a rewind: a secondary that has already seen serial 90 will never
	// accept a jump back to 42, because RFC 1982 arithmetic makes 42 older
	// and RFC 1995 has no way to express going backwards.
	//
	// Records that did not change in between are not touched, so they keep
	// their identity, their comments and the history pointing at them.
	// Records the server generated are not restored directly: they follow
	// from the records they were generated from, so restoring those is what
	// moves them.
	//
	// A rollback to the serial the zone is already at changes nothing and
	// answers with no commit.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /zones/{zoneId}/rollback (the `RollbackZone` operationId).
	RollbackZoneWithBody(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RollbackZone Restore a zone to the state it had at a serial
	//
	// The difference between the zone as it stands and the zone as it stood
	// is written as a **new** commit that moves forward to that state. It is
	// not a rewind: a secondary that has already seen serial 90 will never
	// accept a jump back to 42, because RFC 1982 arithmetic makes 42 older
	// and RFC 1995 has no way to express going backwards.
	//
	// Records that did not change in between are not touched, so they keep
	// their identity, their comments and the history pointing at them.
	// Records the server generated are not restored directly: they follow
	// from the records they were generated from, so restoring those is what
	// moves them.
	//
	// A rollback to the serial the zone is already at changes nothing and
	// answers with no commit.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /zones/{zoneId}/rollback (the `RollbackZone` operationId).
	RollbackZone(ctx context.Context, zoneId ZoneID, body RollbackZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ReplaceRRsetsWithBody Make the named RRsets exactly what is given
	//
	// An RRset (everything sharing an owner name, class and type) is the
	// unit DNS answers with (RFC 2181 §5), and therefore the unit a record
	// editor edits. Sending the set rather than a list of additions and
	// removals means the client says what it wants to be true, and the server
	// works out the difference; a record whose data did not change keeps its
	// identity, and with it its comment, its provenance and the history
	// pointing at it.
	//
	// Only the RRsets named here are touched. An empty `records` removes one.
	//
	// Everything in one request becomes one commit, so a page of edits saved
	// together is one line in the history and one point to roll back to.
	//
	// The RRsets are named in the body rather than in the path because a DNS
	// label may hold any octet, `/` among them, so there is no path form that
	// is safe for every name.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /zones/{zoneId}/rrsets (the `ReplaceRRsets` operationId).
	ReplaceRRsetsWithBody(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ReplaceRRsets Make the named RRsets exactly what is given
	//
	// An RRset (everything sharing an owner name, class and type) is the
	// unit DNS answers with (RFC 2181 §5), and therefore the unit a record
	// editor edits. Sending the set rather than a list of additions and
	// removals means the client says what it wants to be true, and the server
	// works out the difference; a record whose data did not change keeps its
	// identity, and with it its comment, its provenance and the history
	// pointing at it.
	//
	// Only the RRsets named here are touched. An empty `records` removes one.
	//
	// Everything in one request becomes one commit, so a page of edits saved
	// together is one line in the history and one point to roll back to.
	//
	// The RRsets are named in the body rather than in the path because a DNS
	// label may hold any octet, `/` among them, so there is no path form that
	// is safe for every name.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /zones/{zoneId}/rrsets (the `ReplaceRRsets` operationId).
	ReplaceRRsets(ctx context.Context, zoneId ZoneID, body ReplaceRRsetsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateRecordWithBodyWithResponse

func (c *ClientWithResponses) CreateRecordWithBodyWithResponse(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRecordResponse, error)

CreateRecordWithBodyWithResponse Add a record to a zone

An address record may generate a PTR in the reverse zone answering for it. What that produced, and what it could not produce, comes back in the response rather than in a log line (docs/decisions.md D3 and D6).

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /zones/{zoneId}/records (the `CreateRecord` operationId).

func (*ClientWithResponses) CreateRecordWithResponse

func (c *ClientWithResponses) CreateRecordWithResponse(ctx context.Context, zoneId ZoneID, body CreateRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRecordResponse, error)

CreateRecordWithResponse Add a record to a zone

An address record may generate a PTR in the reverse zone answering for it. What that produced, and what it could not produce, comes back in the response rather than in a log line (docs/decisions.md D3 and D6).

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /zones/{zoneId}/records (the `CreateRecord` operationId).

func (*ClientWithResponses) CreateSessionWithBodyWithResponse

func (c *ClientWithResponses) CreateSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSessionResponse, error)

CreateSessionWithBodyWithResponse Exchange a token for a browser session

The web interface does not hold a long-lived token. It posts one here once and receives an `httpOnly` session cookie, which no script that gets injected into the page can read, which is the whole point.

A second, readable cookie carries a CSRF value. Every state-changing request authenticated by the session cookie has to repeat it in the `X-Wegweiser-CSRF` header. `SameSite=Strict` already blocks a cross-site form post; this is the second layer. A request that authenticates with a bearer token skips the check, because CSRF needs ambient credentials and a bearer token is not ambient.

Unauthenticated, because a request that could authenticate would not need this. The token inside is checked the same way and is rate-limited the same way.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /auth/session (the `CreateSession` operationId).

func (*ClientWithResponses) CreateSessionWithResponse

func (c *ClientWithResponses) CreateSessionWithResponse(ctx context.Context, body CreateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSessionResponse, error)

CreateSessionWithResponse Exchange a token for a browser session

The web interface does not hold a long-lived token. It posts one here once and receives an `httpOnly` session cookie, which no script that gets injected into the page can read, which is the whole point.

A second, readable cookie carries a CSRF value. Every state-changing request authenticated by the session cookie has to repeat it in the `X-Wegweiser-CSRF` header. `SameSite=Strict` already blocks a cross-site form post; this is the second layer. A request that authenticates with a bearer token skips the check, because CSRF needs ambient credentials and a bearer token is not ambient.

Unauthenticated, because a request that could authenticate would not need this. The token inside is checked the same way and is rate-limited the same way.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /auth/session (the `CreateSession` operationId).

func (*ClientWithResponses) CreateTokenWithBodyWithResponse

func (c *ClientWithResponses) CreateTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTokenResponse, error)

CreateTokenWithBodyWithResponse Mint a token

The secret comes back in this response and never again. It is 256 bits from a cryptographic source; what the server keeps is its SHA-256, so a copy of the database is not a copy of the credentials.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /tokens (the `CreateToken` operationId).

func (*ClientWithResponses) CreateTokenWithResponse

func (c *ClientWithResponses) CreateTokenWithResponse(ctx context.Context, body CreateTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTokenResponse, error)

CreateTokenWithResponse Mint a token

The secret comes back in this response and never again. It is 256 bits from a cryptographic source; what the server keeps is its SHA-256, so a copy of the database is not a copy of the credentials.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /tokens (the `CreateToken` operationId).

func (*ClientWithResponses) CreateZoneWithBodyWithResponse

func (c *ClientWithResponses) CreateZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateZoneResponse, error)

CreateZoneWithBodyWithResponse Create a zone

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /zones (the `CreateZone` operationId).

func (*ClientWithResponses) CreateZoneWithResponse

func (c *ClientWithResponses) CreateZoneWithResponse(ctx context.Context, body CreateZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateZoneResponse, error)

CreateZoneWithResponse Create a zone

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /zones (the `CreateZone` operationId).

func (*ClientWithResponses) DeleteRecordWithResponse

func (c *ClientWithResponses) DeleteRecordWithResponse(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*DeleteRecordResponse, error)

DeleteRecordWithResponse Delete a record

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /records/{recordId} (the `DeleteRecord` operationId).

func (*ClientWithResponses) DeleteSessionWithResponse

func (c *ClientWithResponses) DeleteSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteSessionResponse, error)

DeleteSessionWithResponse End the session

The cookies are cleared and the session is forgotten here, so a copy of the cookie taken beforehand stops working too. The token it was opened with is untouched.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /auth/session (the `DeleteSession` operationId).

func (*ClientWithResponses) DeleteZoneWithResponse

func (c *ClientWithResponses) DeleteZoneWithResponse(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*DeleteZoneResponse, error)

DeleteZoneWithResponse Delete a zone and everything in it

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /zones/{zoneId} (the `DeleteZone` operationId).

func (*ClientWithResponses) DetachRecordWithResponse

func (c *ClientWithResponses) DetachRecordWithResponse(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*DetachRecordResponse, error)

DetachRecordWithResponse Take over a generated record

The record keeps its data and its identity, loses its link to the record it was generated from, and the automation stops maintaining it (docs/decisions.md D4). A record that was already authored is returned unchanged: asking for it to be nobody's derivative has got what it asked for.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /records/{recordId}/detach (the `DetachRecord` operationId).

func (*ClientWithResponses) ExportZoneWithResponse

func (c *ClientWithResponses) ExportZoneWithResponse(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*ExportZoneResponse, error)

ExportZoneWithResponse Write a zone out as a zonefile

The presentation format of RFC 1035 §5, which any other authoritative server reads. Every name is absolute and every record carries its own TTL and class, so no line means something different when it is copied out; records come out in the canonical order of RFC 4034 §6.1, so exporting the same zone twice is the same bytes and a diff of two exports is a diff of two zones.

A disabled record is left out. It is not part of the zone as it answers, and a file has nowhere to say "present but switched off".

Returns a wrapper object for the known response body format(s).

Corresponds with GET /zones/{zoneId}/export (the `ExportZone` operationId).

func (*ClientWithResponses) GetCommitWithResponse

func (c *ClientWithResponses) GetCommitWithResponse(ctx context.Context, commitId string, reqEditors ...RequestEditorFn) (*GetCommitResponse, error)

GetCommitWithResponse Read one commit and everything it changed

The events are the diff: every record that was removed and every record that was added, both carrying their full data. That is what RFC 1995 §2 asks of an incremental transfer, and it is also what an interface needs to render the change and what restoring an earlier state needs to undo it.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /commits/{commitId} (the `GetCommit` operationId).

func (*ClientWithResponses) GetHealthWithResponse

func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

GetHealthWithResponse Report whether the server is fit to answer queries

Unauthenticated on purpose: a health check that needs a credential is one more thing that can fail for a reason unrelated to health.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /healthz (the `GetHealth` operationId).

func (*ClientWithResponses) GetMetricsWithResponse

func (c *ClientWithResponses) GetMetricsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetricsResponse, error)

GetMetricsWithResponse Export the current metrics

The Prometheus text exposition format: queries by transport, type and response code, latency, response sizes, drops, truncations, what the snapshot being answered from holds, and the Go runtime and process collectors that come with any Go exporter.

Authenticated like everything else here. What a server is asked, how often and by how many zones is operational detail, and a scraper can carry a bearer token: Prometheus has had `authorization` in its scrape configuration for years. `/healthz` is the one endpoint that needs no credential, because a load balancer cannot be given one.

The response carries the exposition format's version in its `Content-Type`, which is where a scraper reads it.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /metrics (the `GetMetrics` operationId).

func (*ClientWithResponses) GetRecordWithResponse

func (c *ClientWithResponses) GetRecordWithResponse(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*GetRecordResponse, error)

GetRecordWithResponse Read one record

Returns a wrapper object for the known response body format(s).

Corresponds with GET /records/{recordId} (the `GetRecord` operationId).

func (*ClientWithResponses) GetSessionWithResponse

func (c *ClientWithResponses) GetSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSessionResponse, error)

GetSessionWithResponse Report who this request is authenticated as

What an interface asks when it loads, to find out whether it has to show a login at all, and what to grey out if it does not.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /auth/session (the `GetSession` operationId).

func (*ClientWithResponses) GetSettingsWithResponse

func (c *ClientWithResponses) GetSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error)

GetSettingsWithResponse Read the server-wide settings

These are the defaults a zone that says nothing about itself inherits. They live in the database, so changing one takes effect on the next write without a restart (docs/decisions.md D11).

Returns a wrapper object for the known response body format(s).

Corresponds with GET /settings (the `GetSettings` operationId).

func (*ClientWithResponses) GetZoneWithResponse

func (c *ClientWithResponses) GetZoneWithResponse(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*GetZoneResponse, error)

GetZoneWithResponse Read one zone

Returns a wrapper object for the known response body format(s).

Corresponds with GET /zones/{zoneId} (the `GetZone` operationId).

func (*ClientWithResponses) ImportZoneWithBodyWithResponse

func (c *ClientWithResponses) ImportZoneWithBodyWithResponse(ctx context.Context, params *ImportZoneParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImportZoneResponse, error)

ImportZoneWithBodyWithResponse Bring a whole zone in from a zonefile

The body is the file itself, in the presentation format of RFC 1035 §5. The zone it describes is wherever its SOA sits, so the name is not sent separately and cannot be sent inconsistently.

The serial in the file is the serial the zone starts at. A migrated zone that restarted at 1 would look older than itself to every secondary that has already seen it (RFC 1982 §3.2), which is the single most common way to break a migration (docs/decisions.md D2).

`$INCLUDE` is refused: a file arriving here that could pull in a path would read this server's filesystem out loud.

Records that a delegation in the same file makes unanswerable are left out rather than failing the whole file, and come back in `skipped`. Real zones carry them, and a migration that stops on one is a migration nobody finishes.

The zone must not already exist. A file is the complete contents of a zone, so bringing one into a zone that holds records is a replacement rather than an import.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /zones/import (the `ImportZone` operationId).

func (*ClientWithResponses) ListCommitsWithResponse

func (c *ClientWithResponses) ListCommitsWithResponse(ctx context.Context, params *ListCommitsParams, reqEditors ...RequestEditorFn) (*ListCommitsResponse, error)

ListCommitsWithResponse List commits, newest first

Every write is a commit, so this is the whole history of the server. Commits are listed without their events, which is what makes a page of history cheap on a zone that has been edited for years; read one commit to get the changes it made.

A commit outlives the zone it describes, so the history of a deleted zone is still here, under the name it had.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /commits (the `ListCommits` operationId).

func (*ClientWithResponses) ListRecordsWithResponse

func (c *ClientWithResponses) ListRecordsWithResponse(ctx context.Context, zoneId ZoneID, params *ListRecordsParams, reqEditors ...RequestEditorFn) (*ListRecordsResponse, error)

ListRecordsWithResponse List the records of a zone

Returns a wrapper object for the known response body format(s).

Corresponds with GET /zones/{zoneId}/records (the `ListRecords` operationId).

func (*ClientWithResponses) ListTokensWithResponse

func (c *ClientWithResponses) ListTokensWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListTokensResponse, error)

ListTokensWithResponse List the tokens that may use this API

Revoked and expired tokens are listed too, so that a name in the history can still be looked up. No response ever carries a secret: what is stored is its SHA-256, and the leading characters kept in the clear are there to tell two tokens apart, not to authenticate with.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /tokens (the `ListTokens` operationId).

func (*ClientWithResponses) ListZonesWithResponse

func (c *ClientWithResponses) ListZonesWithResponse(ctx context.Context, params *ListZonesParams, reqEditors ...RequestEditorFn) (*ListZonesResponse, error)

ListZonesWithResponse List zones

Returns a wrapper object for the known response body format(s).

Corresponds with GET /zones (the `ListZones` operationId).

func (*ClientWithResponses) ReplaceRRsetsWithBodyWithResponse

func (c *ClientWithResponses) ReplaceRRsetsWithBodyWithResponse(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceRRsetsResponse, error)

ReplaceRRsetsWithBodyWithResponse Make the named RRsets exactly what is given

An RRset (everything sharing an owner name, class and type) is the unit DNS answers with (RFC 2181 §5), and therefore the unit a record editor edits. Sending the set rather than a list of additions and removals means the client says what it wants to be true, and the server works out the difference; a record whose data did not change keeps its identity, and with it its comment, its provenance and the history pointing at it.

Only the RRsets named here are touched. An empty `records` removes one.

Everything in one request becomes one commit, so a page of edits saved together is one line in the history and one point to roll back to.

The RRsets are named in the body rather than in the path because a DNS label may hold any octet, `/` among them, so there is no path form that is safe for every name.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /zones/{zoneId}/rrsets (the `ReplaceRRsets` operationId).

func (*ClientWithResponses) ReplaceRRsetsWithResponse

func (c *ClientWithResponses) ReplaceRRsetsWithResponse(ctx context.Context, zoneId ZoneID, body ReplaceRRsetsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceRRsetsResponse, error)

ReplaceRRsetsWithResponse Make the named RRsets exactly what is given

An RRset (everything sharing an owner name, class and type) is the unit DNS answers with (RFC 2181 §5), and therefore the unit a record editor edits. Sending the set rather than a list of additions and removals means the client says what it wants to be true, and the server works out the difference; a record whose data did not change keeps its identity, and with it its comment, its provenance and the history pointing at it.

Only the RRsets named here are touched. An empty `records` removes one.

Everything in one request becomes one commit, so a page of edits saved together is one line in the history and one point to roll back to.

The RRsets are named in the body rather than in the path because a DNS label may hold any octet, `/` among them, so there is no path form that is safe for every name.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /zones/{zoneId}/rrsets (the `ReplaceRRsets` operationId).

func (*ClientWithResponses) RevokeTokenWithResponse

func (c *ClientWithResponses) RevokeTokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*RevokeTokenResponse, error)

RevokeTokenWithResponse Withdraw a token

The token is marked unusable rather than removed, so that the history it appears in still names something. Revoking a token that is already revoked changes nothing and is not an error.

The last token that can still administer the server is refused: a server nobody can reach is not a state this API will put itself in.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /tokens/{tokenId} (the `RevokeToken` operationId).

func (*ClientWithResponses) RollbackZoneWithBodyWithResponse

func (c *ClientWithResponses) RollbackZoneWithBodyWithResponse(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RollbackZoneResponse, error)

RollbackZoneWithBodyWithResponse Restore a zone to the state it had at a serial

The difference between the zone as it stands and the zone as it stood is written as a **new** commit that moves forward to that state. It is not a rewind: a secondary that has already seen serial 90 will never accept a jump back to 42, because RFC 1982 arithmetic makes 42 older and RFC 1995 has no way to express going backwards.

Records that did not change in between are not touched, so they keep their identity, their comments and the history pointing at them. Records the server generated are not restored directly: they follow from the records they were generated from, so restoring those is what moves them.

A rollback to the serial the zone is already at changes nothing and answers with no commit.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /zones/{zoneId}/rollback (the `RollbackZone` operationId).

func (*ClientWithResponses) RollbackZoneWithResponse

func (c *ClientWithResponses) RollbackZoneWithResponse(ctx context.Context, zoneId ZoneID, body RollbackZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*RollbackZoneResponse, error)

RollbackZoneWithResponse Restore a zone to the state it had at a serial

The difference between the zone as it stands and the zone as it stood is written as a **new** commit that moves forward to that state. It is not a rewind: a secondary that has already seen serial 90 will never accept a jump back to 42, because RFC 1982 arithmetic makes 42 older and RFC 1995 has no way to express going backwards.

Records that did not change in between are not touched, so they keep their identity, their comments and the history pointing at them. Records the server generated are not restored directly: they follow from the records they were generated from, so restoring those is what moves them.

A rollback to the serial the zone is already at changes nothing and answers with no commit.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /zones/{zoneId}/rollback (the `RollbackZone` operationId).

func (*ClientWithResponses) StreamQueriesWithResponse

func (c *ClientWithResponses) StreamQueriesWithResponse(ctx context.Context, params *StreamQueriesParams, reqEditors ...RequestEditorFn) (*StreamQueriesResponse, error)

StreamQueriesWithResponse Watch queries as they are answered

A live tail of the exchanges matching the filter, as Server-Sent Events. Two kinds of message arrive:

  • `query`, one per exchange, carrying a `QueryEvent`.
  • `status`, whenever what the stream is leaving out changes and every few seconds regardless, carrying a `StreamStatus`. It says what the stream is sampling at and how much it has dropped, because a stream that quietly leaves things out while looking complete is worse than one that admits to showing every fiftieth query (docs/decisions.md D9).

The filter is applied before anything is buffered, so watching one zone stays complete however busy the rest of the server is. A watcher that stops reading loses its oldest exchanges, never its newest: this is a live view, and it is never allowed to slow a query down.

How many watchers may be open at once is bounded, because each one costs the query path a filter evaluation per query. A request past the bound is refused with 503.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /queries/stream (the `StreamQueries` operationId).

func (*ClientWithResponses) UpdateRecordWithBodyWithResponse

func (c *ClientWithResponses) UpdateRecordWithBodyWithResponse(ctx context.Context, recordId RecordID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateRecordResponse, error)

UpdateRecordWithBodyWithResponse Change a record

Only the fields that are present are changed. The record keeps its identity, and with it its comment, its provenance and the history pointing at it, which is what tells an edit apart from a delete and an add.

A record the server generated is refused, naming the record it came from; detach it first to take it over (docs/decisions.md D4).

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PATCH /records/{recordId} (the `UpdateRecord` operationId).

func (*ClientWithResponses) UpdateRecordWithResponse

func (c *ClientWithResponses) UpdateRecordWithResponse(ctx context.Context, recordId RecordID, body UpdateRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateRecordResponse, error)

UpdateRecordWithResponse Change a record

Only the fields that are present are changed. The record keeps its identity, and with it its comment, its provenance and the history pointing at it, which is what tells an edit apart from a delete and an add.

A record the server generated is refused, naming the record it came from; detach it first to take it over (docs/decisions.md D4).

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PATCH /records/{recordId} (the `UpdateRecord` operationId).

func (*ClientWithResponses) UpdateSettingsWithBodyWithResponse

func (c *ClientWithResponses) UpdateSettingsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error)

UpdateSettingsWithBodyWithResponse Change the server-wide settings

A field that is absent is left alone, so a client may send only what it means to change.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PATCH /settings (the `UpdateSettings` operationId).

func (*ClientWithResponses) UpdateSettingsWithResponse

func (c *ClientWithResponses) UpdateSettingsWithResponse(ctx context.Context, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error)

UpdateSettingsWithResponse Change the server-wide settings

A field that is absent is left alone, so a client may send only what it means to change.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PATCH /settings (the `UpdateSettings` operationId).

func (*ClientWithResponses) UpdateZoneWithBodyWithResponse

func (c *ClientWithResponses) UpdateZoneWithBodyWithResponse(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateZoneResponse, error)

UpdateZoneWithBodyWithResponse Change a zone's own settings

Only the fields that are present are changed. The zone's records are not touched, and the zone cannot be renamed: every owner name, every sort key and the whole journal belong to the name it has.

Changing anything that is served advances the serial, like any other change. Changing nothing writes nothing.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PATCH /zones/{zoneId} (the `UpdateZone` operationId).

func (*ClientWithResponses) UpdateZoneWithResponse

func (c *ClientWithResponses) UpdateZoneWithResponse(ctx context.Context, zoneId ZoneID, body UpdateZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateZoneResponse, error)

UpdateZoneWithResponse Change a zone's own settings

Only the fields that are present are changed. The zone's records are not touched, and the zone cannot be renamed: every owner name, every sort key and the whole journal belong to the name it has.

Changing anything that is served advances the serial, like any other change. Changing nothing writes nothing.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PATCH /zones/{zoneId} (the `UpdateZone` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// DeleteSessionWithResponse End the session
	//
	// The cookies are cleared and the session is forgotten here, so a copy of
	// the cookie taken beforehand stops working too. The token it was opened
	// with is untouched.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /auth/session (the `DeleteSession` operationId).
	DeleteSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteSessionResponse, error)

	// GetSessionWithResponse Report who this request is authenticated as
	//
	// What an interface asks when it loads, to find out whether it has to
	// show a login at all, and what to grey out if it does not.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /auth/session (the `GetSession` operationId).
	GetSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSessionResponse, error)

	// CreateSessionWithBodyWithResponse Exchange a token for a browser session
	//
	// The web interface does not hold a long-lived token. It posts one here
	// once and receives an `httpOnly` session cookie, which no script that
	// gets injected into the page can read, which is the whole point.
	//
	// A second, readable cookie carries a CSRF value. Every state-changing
	// request authenticated by the session cookie has to repeat it in the
	// `X-Wegweiser-CSRF` header. `SameSite=Strict` already blocks a
	// cross-site form post; this is the second layer. A request that
	// authenticates with a bearer token skips the check, because CSRF needs
	// ambient credentials and a bearer token is not ambient.
	//
	// Unauthenticated, because a request that could authenticate would not
	// need this. The token inside is checked the same way and is rate-limited
	// the same way.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /auth/session (the `CreateSession` operationId).
	CreateSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSessionResponse, error)

	// CreateSessionWithResponse Exchange a token for a browser session
	//
	// The web interface does not hold a long-lived token. It posts one here
	// once and receives an `httpOnly` session cookie, which no script that
	// gets injected into the page can read, which is the whole point.
	//
	// A second, readable cookie carries a CSRF value. Every state-changing
	// request authenticated by the session cookie has to repeat it in the
	// `X-Wegweiser-CSRF` header. `SameSite=Strict` already blocks a
	// cross-site form post; this is the second layer. A request that
	// authenticates with a bearer token skips the check, because CSRF needs
	// ambient credentials and a bearer token is not ambient.
	//
	// Unauthenticated, because a request that could authenticate would not
	// need this. The token inside is checked the same way and is rate-limited
	// the same way.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /auth/session (the `CreateSession` operationId).
	CreateSessionWithResponse(ctx context.Context, body CreateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSessionResponse, error)

	// ListCommitsWithResponse List commits, newest first
	//
	// Every write is a commit, so this is the whole history of the server.
	// Commits are listed without their events, which is what makes a page of
	// history cheap on a zone that has been edited for years; read one commit
	// to get the changes it made.
	//
	// A commit outlives the zone it describes, so the history of a deleted
	// zone is still here, under the name it had.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /commits (the `ListCommits` operationId).
	ListCommitsWithResponse(ctx context.Context, params *ListCommitsParams, reqEditors ...RequestEditorFn) (*ListCommitsResponse, error)

	// GetCommitWithResponse Read one commit and everything it changed
	//
	// The events are the diff: every record that was removed and every record
	// that was added, both carrying their full data. That is what RFC 1995 §2
	// asks of an incremental transfer, and it is also what an interface needs
	// to render the change and what restoring an earlier state needs to undo
	// it.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /commits/{commitId} (the `GetCommit` operationId).
	GetCommitWithResponse(ctx context.Context, commitId string, reqEditors ...RequestEditorFn) (*GetCommitResponse, error)

	// GetHealthWithResponse Report whether the server is fit to answer queries
	//
	// Unauthenticated on purpose: a health check that needs a credential is
	// one more thing that can fail for a reason unrelated to health.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /healthz (the `GetHealth` operationId).
	GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

	// GetMetricsWithResponse Export the current metrics
	//
	// The Prometheus text exposition format: queries by transport, type and
	// response code, latency, response sizes, drops, truncations, what the
	// snapshot being answered from holds, and the Go runtime and process
	// collectors that come with any Go exporter.
	//
	// Authenticated like everything else here. What a server is asked, how
	// often and by how many zones is operational detail, and a scraper can
	// carry a bearer token: Prometheus has had `authorization` in its scrape
	// configuration for years. `/healthz` is the one endpoint that needs no
	// credential, because a load balancer cannot be given one.
	//
	// The response carries the exposition format's version in its
	// `Content-Type`, which is where a scraper reads it.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /metrics (the `GetMetrics` operationId).
	GetMetricsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetricsResponse, error)

	// StreamQueriesWithResponse Watch queries as they are answered
	//
	// A live tail of the exchanges matching the filter, as Server-Sent
	// Events. Two kinds of message arrive:
	//
	// - `query`, one per exchange, carrying a `QueryEvent`.
	// - `status`, whenever what the stream is leaving out changes and every
	//   few seconds regardless, carrying a `StreamStatus`. It says what the
	//   stream is sampling at and how much it has dropped, because a stream
	//   that quietly leaves things out while looking complete is worse than
	//   one that admits to showing every fiftieth query
	//   (docs/decisions.md D9).
	//
	// The filter is applied before anything is buffered, so watching one zone
	// stays complete however busy the rest of the server is. A watcher that
	// stops reading loses its oldest exchanges, never its newest: this is a
	// live view, and it is never allowed to slow a query down.
	//
	// How many watchers may be open at once is bounded, because each one
	// costs the query path a filter evaluation per query. A request past the
	// bound is refused with 503.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /queries/stream (the `StreamQueries` operationId).
	StreamQueriesWithResponse(ctx context.Context, params *StreamQueriesParams, reqEditors ...RequestEditorFn) (*StreamQueriesResponse, error)

	// DeleteRecordWithResponse Delete a record
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /records/{recordId} (the `DeleteRecord` operationId).
	DeleteRecordWithResponse(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*DeleteRecordResponse, error)

	// GetRecordWithResponse Read one record
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /records/{recordId} (the `GetRecord` operationId).
	GetRecordWithResponse(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*GetRecordResponse, error)

	// UpdateRecordWithBodyWithResponse Change a record
	//
	// Only the fields that are present are changed. The record keeps its
	// identity, and with it its comment, its provenance and the history
	// pointing at it, which is what tells an edit apart from a delete and an
	// add.
	//
	// A record the server generated is refused, naming the record it came
	// from; detach it first to take it over (docs/decisions.md D4).
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /records/{recordId} (the `UpdateRecord` operationId).
	UpdateRecordWithBodyWithResponse(ctx context.Context, recordId RecordID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateRecordResponse, error)

	// UpdateRecordWithResponse Change a record
	//
	// Only the fields that are present are changed. The record keeps its
	// identity, and with it its comment, its provenance and the history
	// pointing at it, which is what tells an edit apart from a delete and an
	// add.
	//
	// A record the server generated is refused, naming the record it came
	// from; detach it first to take it over (docs/decisions.md D4).
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /records/{recordId} (the `UpdateRecord` operationId).
	UpdateRecordWithResponse(ctx context.Context, recordId RecordID, body UpdateRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateRecordResponse, error)

	// DetachRecordWithResponse Take over a generated record
	//
	// The record keeps its data and its identity, loses its link to the
	// record it was generated from, and the automation stops maintaining it
	// (docs/decisions.md D4). A record that was already authored is returned
	// unchanged: asking for it to be nobody's derivative has got what it
	// asked for.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /records/{recordId}/detach (the `DetachRecord` operationId).
	DetachRecordWithResponse(ctx context.Context, recordId RecordID, reqEditors ...RequestEditorFn) (*DetachRecordResponse, error)

	// GetSettingsWithResponse Read the server-wide settings
	//
	// These are the defaults a zone that says nothing about itself inherits.
	// They live in the database, so changing one takes effect on the next
	// write without a restart (docs/decisions.md D11).
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /settings (the `GetSettings` operationId).
	GetSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error)

	// UpdateSettingsWithBodyWithResponse Change the server-wide settings
	//
	// A field that is absent is left alone, so a client may send only what it
	// means to change.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /settings (the `UpdateSettings` operationId).
	UpdateSettingsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error)

	// UpdateSettingsWithResponse Change the server-wide settings
	//
	// A field that is absent is left alone, so a client may send only what it
	// means to change.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /settings (the `UpdateSettings` operationId).
	UpdateSettingsWithResponse(ctx context.Context, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error)

	// ListTokensWithResponse List the tokens that may use this API
	//
	// Revoked and expired tokens are listed too, so that a name in the
	// history can still be looked up. No response ever carries a secret: what
	// is stored is its SHA-256, and the leading characters kept in the clear
	// are there to tell two tokens apart, not to authenticate with.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /tokens (the `ListTokens` operationId).
	ListTokensWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListTokensResponse, error)

	// CreateTokenWithBodyWithResponse Mint a token
	//
	// The secret comes back in this response and never again. It is 256 bits
	// from a cryptographic source; what the server keeps is its SHA-256, so a
	// copy of the database is not a copy of the credentials.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /tokens (the `CreateToken` operationId).
	CreateTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTokenResponse, error)

	// CreateTokenWithResponse Mint a token
	//
	// The secret comes back in this response and never again. It is 256 bits
	// from a cryptographic source; what the server keeps is its SHA-256, so a
	// copy of the database is not a copy of the credentials.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /tokens (the `CreateToken` operationId).
	CreateTokenWithResponse(ctx context.Context, body CreateTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTokenResponse, error)

	// RevokeTokenWithResponse Withdraw a token
	//
	// The token is marked unusable rather than removed, so that the history
	// it appears in still names something. Revoking a token that is already
	// revoked changes nothing and is not an error.
	//
	// The last token that can still administer the server is refused: a
	// server nobody can reach is not a state this API will put itself in.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /tokens/{tokenId} (the `RevokeToken` operationId).
	RevokeTokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*RevokeTokenResponse, error)

	// ListZonesWithResponse List zones
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /zones (the `ListZones` operationId).
	ListZonesWithResponse(ctx context.Context, params *ListZonesParams, reqEditors ...RequestEditorFn) (*ListZonesResponse, error)

	// CreateZoneWithBodyWithResponse Create a zone
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /zones (the `CreateZone` operationId).
	CreateZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateZoneResponse, error)

	// CreateZoneWithResponse Create a zone
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /zones (the `CreateZone` operationId).
	CreateZoneWithResponse(ctx context.Context, body CreateZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateZoneResponse, error)

	// ImportZoneWithBodyWithResponse Bring a whole zone in from a zonefile
	//
	// The body is the file itself, in the presentation format of RFC 1035 §5.
	// The zone it describes is wherever its SOA sits, so the name is not sent
	// separately and cannot be sent inconsistently.
	//
	// The serial in the file is the serial the zone starts at. A migrated
	// zone that restarted at 1 would look older than itself to every
	// secondary that has already seen it (RFC 1982 §3.2), which is the single
	// most common way to break a migration (docs/decisions.md D2).
	//
	// `$INCLUDE` is refused: a file arriving here that could pull in a path
	// would read this server's filesystem out loud.
	//
	// Records that a delegation in the same file makes unanswerable are left
	// out rather than failing the whole file, and come back in `skipped`.
	// Real zones carry them, and a migration that stops on one is a migration
	// nobody finishes.
	//
	// The zone must not already exist. A file is the complete contents of a
	// zone, so bringing one into a zone that holds records is a replacement
	// rather than an import.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /zones/import (the `ImportZone` operationId).
	ImportZoneWithBodyWithResponse(ctx context.Context, params *ImportZoneParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImportZoneResponse, error)

	// DeleteZoneWithResponse Delete a zone and everything in it
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /zones/{zoneId} (the `DeleteZone` operationId).
	DeleteZoneWithResponse(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*DeleteZoneResponse, error)

	// GetZoneWithResponse Read one zone
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /zones/{zoneId} (the `GetZone` operationId).
	GetZoneWithResponse(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*GetZoneResponse, error)

	// UpdateZoneWithBodyWithResponse Change a zone's own settings
	//
	// Only the fields that are present are changed. The zone's records are
	// not touched, and the zone cannot be renamed: every owner name, every
	// sort key and the whole journal belong to the name it has.
	//
	// Changing anything that is served advances the serial, like any other
	// change. Changing nothing writes nothing.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /zones/{zoneId} (the `UpdateZone` operationId).
	UpdateZoneWithBodyWithResponse(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateZoneResponse, error)

	// UpdateZoneWithResponse Change a zone's own settings
	//
	// Only the fields that are present are changed. The zone's records are
	// not touched, and the zone cannot be renamed: every owner name, every
	// sort key and the whole journal belong to the name it has.
	//
	// Changing anything that is served advances the serial, like any other
	// change. Changing nothing writes nothing.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /zones/{zoneId} (the `UpdateZone` operationId).
	UpdateZoneWithResponse(ctx context.Context, zoneId ZoneID, body UpdateZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateZoneResponse, error)

	// ExportZoneWithResponse Write a zone out as a zonefile
	//
	// The presentation format of RFC 1035 §5, which any other authoritative
	// server reads. Every name is absolute and every record carries its own
	// TTL and class, so no line means something different when it is copied
	// out; records come out in the canonical order of RFC 4034 §6.1, so
	// exporting the same zone twice is the same bytes and a diff of two
	// exports is a diff of two zones.
	//
	// A disabled record is left out. It is not part of the zone as it
	// answers, and a file has nowhere to say "present but switched off".
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /zones/{zoneId}/export (the `ExportZone` operationId).
	ExportZoneWithResponse(ctx context.Context, zoneId ZoneID, reqEditors ...RequestEditorFn) (*ExportZoneResponse, error)

	// ListRecordsWithResponse List the records of a zone
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /zones/{zoneId}/records (the `ListRecords` operationId).
	ListRecordsWithResponse(ctx context.Context, zoneId ZoneID, params *ListRecordsParams, reqEditors ...RequestEditorFn) (*ListRecordsResponse, error)

	// CreateRecordWithBodyWithResponse Add a record to a zone
	//
	// An address record may generate a PTR in the reverse zone answering for
	// it. What that produced, and what it could not produce, comes back in
	// the response rather than in a log line (docs/decisions.md D3 and D6).
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /zones/{zoneId}/records (the `CreateRecord` operationId).
	CreateRecordWithBodyWithResponse(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRecordResponse, error)

	// CreateRecordWithResponse Add a record to a zone
	//
	// An address record may generate a PTR in the reverse zone answering for
	// it. What that produced, and what it could not produce, comes back in
	// the response rather than in a log line (docs/decisions.md D3 and D6).
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /zones/{zoneId}/records (the `CreateRecord` operationId).
	CreateRecordWithResponse(ctx context.Context, zoneId ZoneID, body CreateRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRecordResponse, error)

	// RollbackZoneWithBodyWithResponse Restore a zone to the state it had at a serial
	//
	// The difference between the zone as it stands and the zone as it stood
	// is written as a **new** commit that moves forward to that state. It is
	// not a rewind: a secondary that has already seen serial 90 will never
	// accept a jump back to 42, because RFC 1982 arithmetic makes 42 older
	// and RFC 1995 has no way to express going backwards.
	//
	// Records that did not change in between are not touched, so they keep
	// their identity, their comments and the history pointing at them.
	// Records the server generated are not restored directly: they follow
	// from the records they were generated from, so restoring those is what
	// moves them.
	//
	// A rollback to the serial the zone is already at changes nothing and
	// answers with no commit.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /zones/{zoneId}/rollback (the `RollbackZone` operationId).
	RollbackZoneWithBodyWithResponse(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RollbackZoneResponse, error)

	// RollbackZoneWithResponse Restore a zone to the state it had at a serial
	//
	// The difference between the zone as it stands and the zone as it stood
	// is written as a **new** commit that moves forward to that state. It is
	// not a rewind: a secondary that has already seen serial 90 will never
	// accept a jump back to 42, because RFC 1982 arithmetic makes 42 older
	// and RFC 1995 has no way to express going backwards.
	//
	// Records that did not change in between are not touched, so they keep
	// their identity, their comments and the history pointing at them.
	// Records the server generated are not restored directly: they follow
	// from the records they were generated from, so restoring those is what
	// moves them.
	//
	// A rollback to the serial the zone is already at changes nothing and
	// answers with no commit.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /zones/{zoneId}/rollback (the `RollbackZone` operationId).
	RollbackZoneWithResponse(ctx context.Context, zoneId ZoneID, body RollbackZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*RollbackZoneResponse, error)

	// ReplaceRRsetsWithBodyWithResponse Make the named RRsets exactly what is given
	//
	// An RRset (everything sharing an owner name, class and type) is the
	// unit DNS answers with (RFC 2181 §5), and therefore the unit a record
	// editor edits. Sending the set rather than a list of additions and
	// removals means the client says what it wants to be true, and the server
	// works out the difference; a record whose data did not change keeps its
	// identity, and with it its comment, its provenance and the history
	// pointing at it.
	//
	// Only the RRsets named here are touched. An empty `records` removes one.
	//
	// Everything in one request becomes one commit, so a page of edits saved
	// together is one line in the history and one point to roll back to.
	//
	// The RRsets are named in the body rather than in the path because a DNS
	// label may hold any octet, `/` among them, so there is no path form that
	// is safe for every name.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /zones/{zoneId}/rrsets (the `ReplaceRRsets` operationId).
	ReplaceRRsetsWithBodyWithResponse(ctx context.Context, zoneId ZoneID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceRRsetsResponse, error)

	// ReplaceRRsetsWithResponse Make the named RRsets exactly what is given
	//
	// An RRset (everything sharing an owner name, class and type) is the
	// unit DNS answers with (RFC 2181 §5), and therefore the unit a record
	// editor edits. Sending the set rather than a list of additions and
	// removals means the client says what it wants to be true, and the server
	// works out the difference; a record whose data did not change keeps its
	// identity, and with it its comment, its provenance and the history
	// pointing at it.
	//
	// Only the RRsets named here are touched. An empty `records` removes one.
	//
	// Everything in one request becomes one commit, so a page of edits saved
	// together is one line in the history and one point to roll back to.
	//
	// The RRsets are named in the body rather than in the path because a DNS
	// label may hold any octet, `/` among them, so there is no path form that
	// is safe for every name.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /zones/{zoneId}/rrsets (the `ReplaceRRsets` operationId).
	ReplaceRRsetsWithResponse(ctx context.Context, zoneId ZoneID, body ReplaceRRsetsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceRRsetsResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Commit

type Commit struct {
	// Actor Who caused it, as far as the interface it arrived through could tell.
	Actor     *string   `json:"actor,omitempty"`
	Comment   *string   `json:"comment,omitempty"`
	CreatedAt time.Time `json:"createdAt"`

	// Events The records this commit removed and added, in order. Absent in a
	// listing, which is what keeps a page of history cheap.
	Events *[]Event `json:"events,omitempty"`
	Id     string   `json:"id"`

	// Kind What a commit did, for an interface that would rather say it than recite the events.
	Kind CommitKind `json:"kind"`

	// RevertsTo The serial a rollback restored the zone to. Absent on every other
	// kind of commit, which is what the schema enforces.
	RevertsTo *int64 `json:"revertsTo,omitempty"`

	// SerialFrom The serial this commit was applied to.
	SerialFrom int64 `json:"serialFrom"`

	// SerialTo The serial it produced. Exactly one step on (docs/decisions.md D2).
	SerialTo int64 `json:"serialTo"`

	// Source The interface a change arrived through.
	Source CommitSource `json:"source"`
	ZoneId string       `json:"zoneId"`

	// ZoneName Carried on the commit rather than joined from the zone, because a
	// commit outlives the zone: the last thing that happens to a zone is
	// that someone deletes it.
	ZoneName string `json:"zoneName"`
}

Commit One atomic change to one zone.

type CommitKind

type CommitKind string

CommitKind What a commit did, for an interface that would rather say it than recite the events.

const (
	CommitKindEdit       CommitKind = "edit"
	CommitKindImport     CommitKind = "import"
	CommitKindRollback   CommitKind = "rollback"
	CommitKindZoneCreate CommitKind = "zone_create"
	CommitKindZoneDelete CommitKind = "zone_delete"
	CommitKindZoneUpdate CommitKind = "zone_update"
)

Defines values for CommitKind.

func (CommitKind) Valid

func (e CommitKind) Valid() bool

Valid indicates whether the value is a known member of the CommitKind enum.

type CommitPage

type CommitPage struct {
	Items      []Commit `json:"items"`
	NextCursor *string  `json:"nextCursor,omitempty"`
}

CommitPage defines model for CommitPage.

type CommitSource

type CommitSource string

CommitSource The interface a change arrived through.

const (
	CommitSourceApi    CommitSource = "api"
	CommitSourceCli    CommitSource = "cli"
	CommitSourceImport CommitSource = "import"
	CommitSourceSystem CommitSource = "system"
)

Defines values for CommitSource.

func (CommitSource) Valid

func (e CommitSource) Valid() bool

Valid indicates whether the value is a known member of the CommitSource enum.

type Conflict

type Conflict struct {
	Address          string  `json:"address"`
	ExistingName     string  `json:"existingName"`
	ExistingRecordId *string `json:"existingRecordId,omitempty"`

	// Policy The policy that decided what happened here, so a client can say
	// whether the existing name was kept, replaced or joined rather than
	// leaving the reader to guess from the records.
	Policy        ReverseConflictPolicy `json:"policy"`
	RequestedName string                `json:"requestedName"`
}

Conflict An address already answers with another name (docs/decisions.md D3). It is data rather than an error: which name should be canonical is a decision for a person.

type CreateRecord

type CreateRecord struct {
	// Class Defaults to IN, which is the only class this server answers.
	Class   *string `json:"class,omitempty"`
	Comment *string `json:"comment,omitempty"`
	Data    string  `json:"data"`

	// Name The owner name, absolute. A trailing dot is optional and changes
	// nothing: `www.example.com` and `www.example.com.` are the same
	// name. A name is never completed with the zone apex; that is what
	// turns `www.example.com` into `www.example.com.example.com.` in a
	// zonefile, and an interface that offers a relative field completes
	// it before it gets here.
	Name string `json:"name"`

	// Ttl Defaults to the zone's own default TTL.
	Ttl  *int64 `json:"ttl,omitempty"`
	Type string `json:"type"`
}

CreateRecord defines model for CreateRecord.

type CreateRecord201JSONResponse

type CreateRecord201JSONResponse struct {
	Body    RecordWritten
	Headers CreateRecord201ResponseHeaders
}

func (CreateRecord201JSONResponse) VisitCreateRecordResponse

func (response CreateRecord201JSONResponse) VisitCreateRecordResponse(w http.ResponseWriter) error

type CreateRecord201ResponseHeaders

type CreateRecord201ResponseHeaders struct {
	Location *string
}

type CreateRecordJSONRequestBody

type CreateRecordJSONRequestBody = CreateRecord

CreateRecordJSONRequestBody defines body for CreateRecord for application/json ContentType.

type CreateRecordRequestObject

type CreateRecordRequestObject struct {
	ZoneId ZoneID `json:"zoneId"`
	Body   *CreateRecordJSONRequestBody
}

type CreateRecordResponse

type CreateRecordResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *RecordWritten
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
	// Headers201 the parsed response headers for an HTTP 201 response
	Headers201 *CreateRecordResponse201Headers
}

func ParseCreateRecordResponse

func ParseCreateRecordResponse(rsp *http.Response) (*CreateRecordResponse, error)

ParseCreateRecordResponse parses an HTTP response from a CreateRecordWithResponse call

func (CreateRecordResponse) ContentType

func (r CreateRecordResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateRecordResponse) GetApplicationproblemJSONDefault

func (r CreateRecordResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (CreateRecordResponse) GetBody

func (r CreateRecordResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateRecordResponse) GetJSON201

func (r CreateRecordResponse) GetJSON201() *RecordWritten

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateRecordResponse) Status

func (r CreateRecordResponse) Status() string

Status returns HTTPResponse.Status

func (CreateRecordResponse) StatusCode

func (r CreateRecordResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateRecordResponse201Headers

type CreateRecordResponse201Headers struct {
	Location *string
}

CreateRecordResponse201Headers the declared response headers of an HTTP 201 response for CreateRecord

type CreateRecordResponseObject

type CreateRecordResponseObject interface {
	VisitCreateRecordResponse(w http.ResponseWriter) error
}

type CreateRecorddefaultApplicationProblemPlusJSONResponse

type CreateRecorddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateRecorddefaultApplicationProblemPlusJSONResponse) VisitCreateRecordResponse

type CreateSession

type CreateSession struct {
	// Token The API token to open the session with.
	Token string `json:"token"`
}

CreateSession defines model for CreateSession.

type CreateSession201JSONResponse

type CreateSession201JSONResponse struct {
	Body    Session
	Headers CreateSession201ResponseHeaders
}

func (CreateSession201JSONResponse) VisitCreateSessionResponse

func (response CreateSession201JSONResponse) VisitCreateSessionResponse(w http.ResponseWriter) error

type CreateSession201ResponseHeaders

type CreateSession201ResponseHeaders struct {
	SetCookie *string
}

type CreateSessionJSONRequestBody

type CreateSessionJSONRequestBody = CreateSession

CreateSessionJSONRequestBody defines body for CreateSession for application/json ContentType.

type CreateSessionRequestObject

type CreateSessionRequestObject struct {
	Body *CreateSessionJSONRequestBody
}

type CreateSessionResponse

type CreateSessionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *Session
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
	// Headers201 the parsed response headers for an HTTP 201 response
	Headers201 *CreateSessionResponse201Headers
}

func ParseCreateSessionResponse

func ParseCreateSessionResponse(rsp *http.Response) (*CreateSessionResponse, error)

ParseCreateSessionResponse parses an HTTP response from a CreateSessionWithResponse call

func (CreateSessionResponse) ContentType

func (r CreateSessionResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateSessionResponse) GetApplicationproblemJSONDefault

func (r CreateSessionResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (CreateSessionResponse) GetBody

func (r CreateSessionResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateSessionResponse) GetJSON201

func (r CreateSessionResponse) GetJSON201() *Session

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateSessionResponse) Status

func (r CreateSessionResponse) Status() string

Status returns HTTPResponse.Status

func (CreateSessionResponse) StatusCode

func (r CreateSessionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateSessionResponse201Headers

type CreateSessionResponse201Headers struct {
	SetCookie *string
}

CreateSessionResponse201Headers the declared response headers of an HTTP 201 response for CreateSession

type CreateSessionResponseObject

type CreateSessionResponseObject interface {
	VisitCreateSessionResponse(w http.ResponseWriter) error
}

type CreateSessiondefaultApplicationProblemPlusJSONResponse

type CreateSessiondefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateSessiondefaultApplicationProblemPlusJSONResponse) VisitCreateSessionResponse

type CreateToken

type CreateToken struct {
	// ExpiresAt When the token stops working. Absent means it does not.
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`
	Name      string     `json:"name"`
	Scopes    []Scope    `json:"scopes"`
}

CreateToken defines model for CreateToken.

type CreateToken201JSONResponse

type CreateToken201JSONResponse TokenCreated

func (CreateToken201JSONResponse) VisitCreateTokenResponse

func (response CreateToken201JSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateTokenJSONRequestBody

type CreateTokenJSONRequestBody = CreateToken

CreateTokenJSONRequestBody defines body for CreateToken for application/json ContentType.

type CreateTokenRequestObject

type CreateTokenRequestObject struct {
	Body *CreateTokenJSONRequestBody
}

type CreateTokenResponse

type CreateTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *TokenCreated
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseCreateTokenResponse

func ParseCreateTokenResponse(rsp *http.Response) (*CreateTokenResponse, error)

ParseCreateTokenResponse parses an HTTP response from a CreateTokenWithResponse call

func (CreateTokenResponse) ContentType

func (r CreateTokenResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateTokenResponse) GetApplicationproblemJSONDefault

func (r CreateTokenResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (CreateTokenResponse) GetBody

func (r CreateTokenResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateTokenResponse) GetJSON201

func (r CreateTokenResponse) GetJSON201() *TokenCreated

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateTokenResponse) Status

func (r CreateTokenResponse) Status() string

Status returns HTTPResponse.Status

func (CreateTokenResponse) StatusCode

func (r CreateTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateTokenResponseObject

type CreateTokenResponseObject interface {
	VisitCreateTokenResponse(w http.ResponseWriter) error
}

type CreateTokendefaultApplicationProblemPlusJSONResponse

type CreateTokendefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateTokendefaultApplicationProblemPlusJSONResponse) VisitCreateTokenResponse

type CreateZone

type CreateZone struct {
	Comment    *string `json:"comment,omitempty"`
	DefaultTtl *int64  `json:"defaultTtl,omitempty"`

	// Name The apex. A trailing dot is optional; the name is absolute either
	// way.
	//
	// A network in CIDR notation is accepted here instead, and becomes
	// the reverse zone that answers for it: `192.168.0.0/16` is
	// `168.192.in-addr.arpa.`, `192.0.2.0/25` is the classless
	// `0/25.2.0.192.in-addr.arpa.` of RFC 2317, and `2001:db8::/32` is
	// eight nibbles written backwards. Working that out by hand is the
	// first thing that sends somebody to a manual.
	//
	// A prefix and a name cannot be confused for one another, so nothing
	// is guessed. A bare address is refused with the network it probably
	// meant.
	Name string `json:"name"`

	// Soa The start-of-authority fields a client may set, on a zone it is
	// creating and on one it is changing. Every field is optional in both
	// cases: creating a zone fills what is not given from this server's
	// defaults, and changing one leaves it as it was. A client that only
	// cares about the name server should not have to send five timers it has
	// no opinion about.
	//
	// The serial is not among them: one commit advances it by exactly one,
	// and that is what lets the journal be replayed (docs/decisions.md D2).
	Soa *SOAInput `json:"soa,omitempty"`
}

CreateZone defines model for CreateZone.

type CreateZone201JSONResponse

type CreateZone201JSONResponse struct {
	Body    Zone
	Headers CreateZone201ResponseHeaders
}

func (CreateZone201JSONResponse) VisitCreateZoneResponse

func (response CreateZone201JSONResponse) VisitCreateZoneResponse(w http.ResponseWriter) error

type CreateZone201ResponseHeaders

type CreateZone201ResponseHeaders struct {
	Location *string
}

type CreateZoneJSONRequestBody

type CreateZoneJSONRequestBody = CreateZone

CreateZoneJSONRequestBody defines body for CreateZone for application/json ContentType.

type CreateZoneRequestObject

type CreateZoneRequestObject struct {
	Body *CreateZoneJSONRequestBody
}

type CreateZoneResponse

type CreateZoneResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *Zone
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
	// Headers201 the parsed response headers for an HTTP 201 response
	Headers201 *CreateZoneResponse201Headers
}

func ParseCreateZoneResponse

func ParseCreateZoneResponse(rsp *http.Response) (*CreateZoneResponse, error)

ParseCreateZoneResponse parses an HTTP response from a CreateZoneWithResponse call

func (CreateZoneResponse) ContentType

func (r CreateZoneResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateZoneResponse) GetApplicationproblemJSONDefault

func (r CreateZoneResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (CreateZoneResponse) GetBody

func (r CreateZoneResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateZoneResponse) GetJSON201

func (r CreateZoneResponse) GetJSON201() *Zone

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateZoneResponse) Status

func (r CreateZoneResponse) Status() string

Status returns HTTPResponse.Status

func (CreateZoneResponse) StatusCode

func (r CreateZoneResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateZoneResponse201Headers

type CreateZoneResponse201Headers struct {
	Location *string
}

CreateZoneResponse201Headers the declared response headers of an HTTP 201 response for CreateZone

type CreateZoneResponseObject

type CreateZoneResponseObject interface {
	VisitCreateZoneResponse(w http.ResponseWriter) error
}

type CreateZonedefaultApplicationProblemPlusJSONResponse

type CreateZonedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (CreateZonedefaultApplicationProblemPlusJSONResponse) VisitCreateZoneResponse

type Cursor

type Cursor = string

Cursor defines model for Cursor.

type DeleteRecord204Response

type DeleteRecord204Response struct {
}

func (DeleteRecord204Response) VisitDeleteRecordResponse

func (response DeleteRecord204Response) VisitDeleteRecordResponse(w http.ResponseWriter) error

type DeleteRecordRequestObject

type DeleteRecordRequestObject struct {
	RecordId RecordID `json:"recordId"`
}

type DeleteRecordResponse

type DeleteRecordResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseDeleteRecordResponse

func ParseDeleteRecordResponse(rsp *http.Response) (*DeleteRecordResponse, error)

ParseDeleteRecordResponse parses an HTTP response from a DeleteRecordWithResponse call

func (DeleteRecordResponse) ContentType

func (r DeleteRecordResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteRecordResponse) GetApplicationproblemJSONDefault

func (r DeleteRecordResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (DeleteRecordResponse) GetBody

func (r DeleteRecordResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteRecordResponse) Status

func (r DeleteRecordResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteRecordResponse) StatusCode

func (r DeleteRecordResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteRecordResponseObject

type DeleteRecordResponseObject interface {
	VisitDeleteRecordResponse(w http.ResponseWriter) error
}

type DeleteRecorddefaultApplicationProblemPlusJSONResponse

type DeleteRecorddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteRecorddefaultApplicationProblemPlusJSONResponse) VisitDeleteRecordResponse

type DeleteSession204Response

type DeleteSession204Response struct {
}

func (DeleteSession204Response) VisitDeleteSessionResponse

func (response DeleteSession204Response) VisitDeleteSessionResponse(w http.ResponseWriter) error

type DeleteSessionRequestObject

type DeleteSessionRequestObject struct {
}

type DeleteSessionResponse

type DeleteSessionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseDeleteSessionResponse

func ParseDeleteSessionResponse(rsp *http.Response) (*DeleteSessionResponse, error)

ParseDeleteSessionResponse parses an HTTP response from a DeleteSessionWithResponse call

func (DeleteSessionResponse) ContentType

func (r DeleteSessionResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteSessionResponse) GetApplicationproblemJSONDefault

func (r DeleteSessionResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (DeleteSessionResponse) GetBody

func (r DeleteSessionResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteSessionResponse) Status

func (r DeleteSessionResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteSessionResponse) StatusCode

func (r DeleteSessionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteSessionResponseObject

type DeleteSessionResponseObject interface {
	VisitDeleteSessionResponse(w http.ResponseWriter) error
}

type DeleteSessiondefaultApplicationProblemPlusJSONResponse

type DeleteSessiondefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteSessiondefaultApplicationProblemPlusJSONResponse) VisitDeleteSessionResponse

type DeleteZone204Response

type DeleteZone204Response struct {
}

func (DeleteZone204Response) VisitDeleteZoneResponse

func (response DeleteZone204Response) VisitDeleteZoneResponse(w http.ResponseWriter) error

type DeleteZoneRequestObject

type DeleteZoneRequestObject struct {
	ZoneId ZoneID `json:"zoneId"`
}

type DeleteZoneResponse

type DeleteZoneResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseDeleteZoneResponse

func ParseDeleteZoneResponse(rsp *http.Response) (*DeleteZoneResponse, error)

ParseDeleteZoneResponse parses an HTTP response from a DeleteZoneWithResponse call

func (DeleteZoneResponse) ContentType

func (r DeleteZoneResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteZoneResponse) GetApplicationproblemJSONDefault

func (r DeleteZoneResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (DeleteZoneResponse) GetBody

func (r DeleteZoneResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteZoneResponse) Status

func (r DeleteZoneResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteZoneResponse) StatusCode

func (r DeleteZoneResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteZoneResponseObject

type DeleteZoneResponseObject interface {
	VisitDeleteZoneResponse(w http.ResponseWriter) error
}

type DeleteZonedefaultApplicationProblemPlusJSONResponse

type DeleteZonedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DeleteZonedefaultApplicationProblemPlusJSONResponse) VisitDeleteZoneResponse

type DetachRecord200JSONResponse

type DetachRecord200JSONResponse RecordWritten

func (DetachRecord200JSONResponse) VisitDetachRecordResponse

func (response DetachRecord200JSONResponse) VisitDetachRecordResponse(w http.ResponseWriter) error

type DetachRecordRequestObject

type DetachRecordRequestObject struct {
	RecordId RecordID `json:"recordId"`
}

type DetachRecordResponse

type DetachRecordResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *RecordWritten
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseDetachRecordResponse

func ParseDetachRecordResponse(rsp *http.Response) (*DetachRecordResponse, error)

ParseDetachRecordResponse parses an HTTP response from a DetachRecordWithResponse call

func (DetachRecordResponse) ContentType

func (r DetachRecordResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DetachRecordResponse) GetApplicationproblemJSONDefault

func (r DetachRecordResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (DetachRecordResponse) GetBody

func (r DetachRecordResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DetachRecordResponse) GetJSON200

func (r DetachRecordResponse) GetJSON200() *RecordWritten

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DetachRecordResponse) Status

func (r DetachRecordResponse) Status() string

Status returns HTTPResponse.Status

func (DetachRecordResponse) StatusCode

func (r DetachRecordResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DetachRecordResponseObject

type DetachRecordResponseObject interface {
	VisitDetachRecordResponse(w http.ResponseWriter) error
}

type DetachRecorddefaultApplicationProblemPlusJSONResponse

type DetachRecorddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (DetachRecorddefaultApplicationProblemPlusJSONResponse) VisitDetachRecordResponse

type Event

type Event struct {
	Class string  `json:"class"`
	Data  string  `json:"data"`
	Name  string  `json:"name"`
	Op    EventOp `json:"op"`

	// Seq Orders the events within the commit, counting from zero.
	Seq  int    `json:"seq"`
	Ttl  int64  `json:"ttl"`
	Type string `json:"type"`
}

Event One resource-record change. There is no "modify": a modification is a removal and an addition, which is how RFC 1995 §2 expresses it too. Both directions carry the full record data, so a removal can be undone as well as replayed.

type EventOp

type EventOp string

EventOp defines model for Event.Op.

const (
	Add EventOp = "add"
	Del EventOp = "del"
)

Defines values for EventOp.

func (EventOp) Valid

func (e EventOp) Valid() bool

Valid indicates whether the value is a known member of the EventOp enum.

type ExportZone200TextdnsResponse

type ExportZone200TextdnsResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (ExportZone200TextdnsResponse) VisitExportZoneResponse

func (response ExportZone200TextdnsResponse) VisitExportZoneResponse(w http.ResponseWriter) error

type ExportZoneRequestObject

type ExportZoneRequestObject struct {
	ZoneId ZoneID `json:"zoneId"`
}

type ExportZoneResponse

type ExportZoneResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseExportZoneResponse

func ParseExportZoneResponse(rsp *http.Response) (*ExportZoneResponse, error)

ParseExportZoneResponse parses an HTTP response from a ExportZoneWithResponse call

func (ExportZoneResponse) ContentType

func (r ExportZoneResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ExportZoneResponse) GetApplicationproblemJSONDefault

func (r ExportZoneResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (ExportZoneResponse) GetBody

func (r ExportZoneResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ExportZoneResponse) Status

func (r ExportZoneResponse) Status() string

Status returns HTTPResponse.Status

func (ExportZoneResponse) StatusCode

func (r ExportZoneResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ExportZoneResponseObject

type ExportZoneResponseObject interface {
	VisitExportZoneResponse(w http.ResponseWriter) error
}

type ExportZonedefaultApplicationProblemPlusJSONResponse

type ExportZonedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ExportZonedefaultApplicationProblemPlusJSONResponse) VisitExportZoneResponse

type GetCommit200JSONResponse

type GetCommit200JSONResponse Commit

func (GetCommit200JSONResponse) VisitGetCommitResponse

func (response GetCommit200JSONResponse) VisitGetCommitResponse(w http.ResponseWriter) error

type GetCommitRequestObject

type GetCommitRequestObject struct {
	CommitId string `json:"commitId"`
}

type GetCommitResponse

type GetCommitResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Commit
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseGetCommitResponse

func ParseGetCommitResponse(rsp *http.Response) (*GetCommitResponse, error)

ParseGetCommitResponse parses an HTTP response from a GetCommitWithResponse call

func (GetCommitResponse) ContentType

func (r GetCommitResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetCommitResponse) GetApplicationproblemJSONDefault

func (r GetCommitResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (GetCommitResponse) GetBody

func (r GetCommitResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetCommitResponse) GetJSON200

func (r GetCommitResponse) GetJSON200() *Commit

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetCommitResponse) Status

func (r GetCommitResponse) Status() string

Status returns HTTPResponse.Status

func (GetCommitResponse) StatusCode

func (r GetCommitResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCommitResponseObject

type GetCommitResponseObject interface {
	VisitGetCommitResponse(w http.ResponseWriter) error
}

type GetCommitdefaultApplicationProblemPlusJSONResponse

type GetCommitdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetCommitdefaultApplicationProblemPlusJSONResponse) VisitGetCommitResponse

type GetHealth200JSONResponse

type GetHealth200JSONResponse Health

func (GetHealth200JSONResponse) VisitGetHealthResponse

func (response GetHealth200JSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error

type GetHealth503ApplicationProblemPlusJSONResponse

type GetHealth503ApplicationProblemPlusJSONResponse Problem

func (GetHealth503ApplicationProblemPlusJSONResponse) VisitGetHealthResponse

func (response GetHealth503ApplicationProblemPlusJSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error

type GetHealthRequestObject

type GetHealthRequestObject struct {
}

type GetHealthResponse

type GetHealthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Health
	// ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response
	ApplicationproblemJSON503 *Problem
}

func ParseGetHealthResponse

func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error)

ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call

func (GetHealthResponse) ContentType

func (r GetHealthResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHealthResponse) GetApplicationproblemJSON503

func (r GetHealthResponse) GetApplicationproblemJSON503() *Problem

GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response

func (GetHealthResponse) GetBody

func (r GetHealthResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetHealthResponse) GetJSON200

func (r GetHealthResponse) GetJSON200() *Health

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetHealthResponse) Status

func (r GetHealthResponse) Status() string

Status returns HTTPResponse.Status

func (GetHealthResponse) StatusCode

func (r GetHealthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHealthResponseObject

type GetHealthResponseObject interface {
	VisitGetHealthResponse(w http.ResponseWriter) error
}

type GetMetrics200TextResponse

type GetMetrics200TextResponse string

func (GetMetrics200TextResponse) VisitGetMetricsResponse

func (response GetMetrics200TextResponse) VisitGetMetricsResponse(w http.ResponseWriter) error

type GetMetricsRequestObject

type GetMetricsRequestObject struct {
}

type GetMetricsResponse

type GetMetricsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseGetMetricsResponse

func ParseGetMetricsResponse(rsp *http.Response) (*GetMetricsResponse, error)

ParseGetMetricsResponse parses an HTTP response from a GetMetricsWithResponse call

func (GetMetricsResponse) ContentType

func (r GetMetricsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetMetricsResponse) GetApplicationproblemJSONDefault

func (r GetMetricsResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (GetMetricsResponse) GetBody

func (r GetMetricsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetMetricsResponse) Status

func (r GetMetricsResponse) Status() string

Status returns HTTPResponse.Status

func (GetMetricsResponse) StatusCode

func (r GetMetricsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMetricsResponseObject

type GetMetricsResponseObject interface {
	VisitGetMetricsResponse(w http.ResponseWriter) error
}

type GetMetricsdefaultApplicationProblemPlusJSONResponse

type GetMetricsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetMetricsdefaultApplicationProblemPlusJSONResponse) VisitGetMetricsResponse

type GetRecord200JSONResponse

type GetRecord200JSONResponse Record

func (GetRecord200JSONResponse) VisitGetRecordResponse

func (response GetRecord200JSONResponse) VisitGetRecordResponse(w http.ResponseWriter) error

type GetRecordRequestObject

type GetRecordRequestObject struct {
	RecordId RecordID `json:"recordId"`
}

type GetRecordResponse

type GetRecordResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Record
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseGetRecordResponse

func ParseGetRecordResponse(rsp *http.Response) (*GetRecordResponse, error)

ParseGetRecordResponse parses an HTTP response from a GetRecordWithResponse call

func (GetRecordResponse) ContentType

func (r GetRecordResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetRecordResponse) GetApplicationproblemJSONDefault

func (r GetRecordResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (GetRecordResponse) GetBody

func (r GetRecordResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetRecordResponse) GetJSON200

func (r GetRecordResponse) GetJSON200() *Record

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetRecordResponse) Status

func (r GetRecordResponse) Status() string

Status returns HTTPResponse.Status

func (GetRecordResponse) StatusCode

func (r GetRecordResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetRecordResponseObject

type GetRecordResponseObject interface {
	VisitGetRecordResponse(w http.ResponseWriter) error
}

type GetRecorddefaultApplicationProblemPlusJSONResponse

type GetRecorddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetRecorddefaultApplicationProblemPlusJSONResponse) VisitGetRecordResponse

type GetSession200JSONResponse

type GetSession200JSONResponse Session

func (GetSession200JSONResponse) VisitGetSessionResponse

func (response GetSession200JSONResponse) VisitGetSessionResponse(w http.ResponseWriter) error

type GetSessionRequestObject

type GetSessionRequestObject struct {
}

type GetSessionResponse

type GetSessionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Session
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseGetSessionResponse

func ParseGetSessionResponse(rsp *http.Response) (*GetSessionResponse, error)

ParseGetSessionResponse parses an HTTP response from a GetSessionWithResponse call

func (GetSessionResponse) ContentType

func (r GetSessionResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetSessionResponse) GetApplicationproblemJSONDefault

func (r GetSessionResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (GetSessionResponse) GetBody

func (r GetSessionResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetSessionResponse) GetJSON200

func (r GetSessionResponse) GetJSON200() *Session

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetSessionResponse) Status

func (r GetSessionResponse) Status() string

Status returns HTTPResponse.Status

func (GetSessionResponse) StatusCode

func (r GetSessionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSessionResponseObject

type GetSessionResponseObject interface {
	VisitGetSessionResponse(w http.ResponseWriter) error
}

type GetSessiondefaultApplicationProblemPlusJSONResponse

type GetSessiondefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetSessiondefaultApplicationProblemPlusJSONResponse) VisitGetSessionResponse

type GetSettings200JSONResponse

type GetSettings200JSONResponse Settings

func (GetSettings200JSONResponse) VisitGetSettingsResponse

func (response GetSettings200JSONResponse) VisitGetSettingsResponse(w http.ResponseWriter) error

type GetSettingsRequestObject

type GetSettingsRequestObject struct {
}

type GetSettingsResponse

type GetSettingsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Settings
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseGetSettingsResponse

func ParseGetSettingsResponse(rsp *http.Response) (*GetSettingsResponse, error)

ParseGetSettingsResponse parses an HTTP response from a GetSettingsWithResponse call

func (GetSettingsResponse) ContentType

func (r GetSettingsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetSettingsResponse) GetApplicationproblemJSONDefault

func (r GetSettingsResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (GetSettingsResponse) GetBody

func (r GetSettingsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetSettingsResponse) GetJSON200

func (r GetSettingsResponse) GetJSON200() *Settings

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetSettingsResponse) Status

func (r GetSettingsResponse) Status() string

Status returns HTTPResponse.Status

func (GetSettingsResponse) StatusCode

func (r GetSettingsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSettingsResponseObject

type GetSettingsResponseObject interface {
	VisitGetSettingsResponse(w http.ResponseWriter) error
}

type GetSettingsdefaultApplicationProblemPlusJSONResponse

type GetSettingsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetSettingsdefaultApplicationProblemPlusJSONResponse) VisitGetSettingsResponse

type GetZone200JSONResponse

type GetZone200JSONResponse Zone

func (GetZone200JSONResponse) VisitGetZoneResponse

func (response GetZone200JSONResponse) VisitGetZoneResponse(w http.ResponseWriter) error

type GetZoneRequestObject

type GetZoneRequestObject struct {
	ZoneId ZoneID `json:"zoneId"`
}

type GetZoneResponse

type GetZoneResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Zone
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseGetZoneResponse

func ParseGetZoneResponse(rsp *http.Response) (*GetZoneResponse, error)

ParseGetZoneResponse parses an HTTP response from a GetZoneWithResponse call

func (GetZoneResponse) ContentType

func (r GetZoneResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetZoneResponse) GetApplicationproblemJSONDefault

func (r GetZoneResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (GetZoneResponse) GetBody

func (r GetZoneResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetZoneResponse) GetJSON200

func (r GetZoneResponse) GetJSON200() *Zone

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetZoneResponse) Status

func (r GetZoneResponse) Status() string

Status returns HTTPResponse.Status

func (GetZoneResponse) StatusCode

func (r GetZoneResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetZoneResponseObject

type GetZoneResponseObject interface {
	VisitGetZoneResponse(w http.ResponseWriter) error
}

type GetZonedefaultApplicationProblemPlusJSONResponse

type GetZonedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (GetZonedefaultApplicationProblemPlusJSONResponse) VisitGetZoneResponse

type Health

type Health struct {
	// Records Records the query path currently answers from.
	Records int          `json:"records"`
	Status  HealthStatus `json:"status"`
	Version string       `json:"version"`

	// Zones Zones the query path currently answers for.
	Zones int `json:"zones"`
}

Health defines model for Health.

type HealthStatus

type HealthStatus string

HealthStatus defines model for Health.Status.

const (
	Serving  HealthStatus = "serving"
	Starting HealthStatus = "starting"
)

Defines values for HealthStatus.

func (HealthStatus) Valid

func (e HealthStatus) Valid() bool

Valid indicates whether the value is a known member of the HealthStatus enum.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ImportZone201JSONResponse

type ImportZone201JSONResponse struct {
	Body    ZoneImported
	Headers ImportZone201ResponseHeaders
}

func (ImportZone201JSONResponse) VisitImportZoneResponse

func (response ImportZone201JSONResponse) VisitImportZoneResponse(w http.ResponseWriter) error

type ImportZone201ResponseHeaders

type ImportZone201ResponseHeaders struct {
	Location *string
}

type ImportZoneParams

type ImportZoneParams struct {
	// Origin Where relative names are resolved from, for a file that sets no
	// `$ORIGIN` of its own. Not needed otherwise.
	Origin *string `form:"origin,omitempty" json:"origin,omitempty"`
}

ImportZoneParams defines parameters for ImportZone.

type ImportZoneRequestObject

type ImportZoneRequestObject struct {
	Params ImportZoneParams
	Body   io.Reader
}

type ImportZoneResponse

type ImportZoneResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *ZoneImported
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
	// Headers201 the parsed response headers for an HTTP 201 response
	Headers201 *ImportZoneResponse201Headers
}

func ParseImportZoneResponse

func ParseImportZoneResponse(rsp *http.Response) (*ImportZoneResponse, error)

ParseImportZoneResponse parses an HTTP response from a ImportZoneWithResponse call

func (ImportZoneResponse) ContentType

func (r ImportZoneResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ImportZoneResponse) GetApplicationproblemJSONDefault

func (r ImportZoneResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (ImportZoneResponse) GetBody

func (r ImportZoneResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ImportZoneResponse) GetJSON201

func (r ImportZoneResponse) GetJSON201() *ZoneImported

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (ImportZoneResponse) Status

func (r ImportZoneResponse) Status() string

Status returns HTTPResponse.Status

func (ImportZoneResponse) StatusCode

func (r ImportZoneResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ImportZoneResponse201Headers

type ImportZoneResponse201Headers struct {
	Location *string
}

ImportZoneResponse201Headers the declared response headers of an HTTP 201 response for ImportZone

type ImportZoneResponseObject

type ImportZoneResponseObject interface {
	VisitImportZoneResponse(w http.ResponseWriter) error
}

type ImportZonedefaultApplicationProblemPlusJSONResponse

type ImportZonedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ImportZonedefaultApplicationProblemPlusJSONResponse) VisitImportZoneResponse

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type Limit

type Limit = int

Limit defines model for Limit.

type ListCommits200JSONResponse

type ListCommits200JSONResponse CommitPage

func (ListCommits200JSONResponse) VisitListCommitsResponse

func (response ListCommits200JSONResponse) VisitListCommitsResponse(w http.ResponseWriter) error

type ListCommitsParams

type ListCommitsParams struct {
	// Cursor Continue a listing where the last page ended.
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`

	// Limit How many items to return at most.
	Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`

	// ZoneId Restrict the history to one zone.
	ZoneId *string `form:"zoneId,omitempty" json:"zoneId,omitempty"`

	// Kind Restrict to commits of these kinds.
	Kind *[]CommitKind `form:"kind,omitempty" json:"kind,omitempty"`

	// Actor Match the recorded actor exactly.
	Actor *string `form:"actor,omitempty" json:"actor,omitempty"`

	// Since Only commits at or after this time.
	Since *time.Time `form:"since,omitempty" json:"since,omitempty"`

	// Until Only commits before this time.
	Until *time.Time `form:"until,omitempty" json:"until,omitempty"`
}

ListCommitsParams defines parameters for ListCommits.

type ListCommitsRequestObject

type ListCommitsRequestObject struct {
	Params ListCommitsParams
}

type ListCommitsResponse

type ListCommitsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *CommitPage
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseListCommitsResponse

func ParseListCommitsResponse(rsp *http.Response) (*ListCommitsResponse, error)

ParseListCommitsResponse parses an HTTP response from a ListCommitsWithResponse call

func (ListCommitsResponse) ContentType

func (r ListCommitsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListCommitsResponse) GetApplicationproblemJSONDefault

func (r ListCommitsResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (ListCommitsResponse) GetBody

func (r ListCommitsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListCommitsResponse) GetJSON200

func (r ListCommitsResponse) GetJSON200() *CommitPage

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListCommitsResponse) Status

func (r ListCommitsResponse) Status() string

Status returns HTTPResponse.Status

func (ListCommitsResponse) StatusCode

func (r ListCommitsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCommitsResponseObject

type ListCommitsResponseObject interface {
	VisitListCommitsResponse(w http.ResponseWriter) error
}

type ListCommitsdefaultApplicationProblemPlusJSONResponse

type ListCommitsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListCommitsdefaultApplicationProblemPlusJSONResponse) VisitListCommitsResponse

type ListRecords200JSONResponse

type ListRecords200JSONResponse RecordPage

func (ListRecords200JSONResponse) VisitListRecordsResponse

func (response ListRecords200JSONResponse) VisitListRecordsResponse(w http.ResponseWriter) error

type ListRecordsParams

type ListRecordsParams struct {
	// Cursor Continue a listing where the last page ended.
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`

	// Limit How many items to return at most.
	Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`

	// Name Match one owner name exactly.
	Name *string `form:"name,omitempty" json:"name,omitempty"`

	// Type Match one record type.
	Type *string `form:"type,omitempty" json:"type,omitempty"`

	// Search Match anywhere in the owner name or the record data,
	// case-insensitively. It is what backs the filter above a record
	// listing, the same way it does above the zone listing: `name` and
	// `type` answer "which record is this", and this answers "where does
	// 192.0.2.10 appear".
	Search *string `form:"search,omitempty" json:"search,omitempty"`
}

ListRecordsParams defines parameters for ListRecords.

type ListRecordsRequestObject

type ListRecordsRequestObject struct {
	ZoneId ZoneID `json:"zoneId"`
	Params ListRecordsParams
}

type ListRecordsResponse

type ListRecordsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *RecordPage
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseListRecordsResponse

func ParseListRecordsResponse(rsp *http.Response) (*ListRecordsResponse, error)

ParseListRecordsResponse parses an HTTP response from a ListRecordsWithResponse call

func (ListRecordsResponse) ContentType

func (r ListRecordsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListRecordsResponse) GetApplicationproblemJSONDefault

func (r ListRecordsResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (ListRecordsResponse) GetBody

func (r ListRecordsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListRecordsResponse) GetJSON200

func (r ListRecordsResponse) GetJSON200() *RecordPage

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListRecordsResponse) Status

func (r ListRecordsResponse) Status() string

Status returns HTTPResponse.Status

func (ListRecordsResponse) StatusCode

func (r ListRecordsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListRecordsResponseObject

type ListRecordsResponseObject interface {
	VisitListRecordsResponse(w http.ResponseWriter) error
}

type ListRecordsdefaultApplicationProblemPlusJSONResponse

type ListRecordsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListRecordsdefaultApplicationProblemPlusJSONResponse) VisitListRecordsResponse

type ListTokens200JSONResponse

type ListTokens200JSONResponse []Token

func (ListTokens200JSONResponse) VisitListTokensResponse

func (response ListTokens200JSONResponse) VisitListTokensResponse(w http.ResponseWriter) error

type ListTokensRequestObject

type ListTokensRequestObject struct {
}

type ListTokensResponse

type ListTokensResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]Token
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseListTokensResponse

func ParseListTokensResponse(rsp *http.Response) (*ListTokensResponse, error)

ParseListTokensResponse parses an HTTP response from a ListTokensWithResponse call

func (ListTokensResponse) ContentType

func (r ListTokensResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListTokensResponse) GetApplicationproblemJSONDefault

func (r ListTokensResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (ListTokensResponse) GetBody

func (r ListTokensResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListTokensResponse) GetJSON200

func (r ListTokensResponse) GetJSON200() *[]Token

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListTokensResponse) Status

func (r ListTokensResponse) Status() string

Status returns HTTPResponse.Status

func (ListTokensResponse) StatusCode

func (r ListTokensResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListTokensResponseObject

type ListTokensResponseObject interface {
	VisitListTokensResponse(w http.ResponseWriter) error
}

type ListTokensdefaultApplicationProblemPlusJSONResponse

type ListTokensdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListTokensdefaultApplicationProblemPlusJSONResponse) VisitListTokensResponse

type ListZones200JSONResponse

type ListZones200JSONResponse ZonePage

func (ListZones200JSONResponse) VisitListZonesResponse

func (response ListZones200JSONResponse) VisitListZonesResponse(w http.ResponseWriter) error

type ListZonesParams

type ListZonesParams struct {
	// Cursor Continue a listing where the last page ended.
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`

	// Limit How many items to return at most.
	Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`

	// Kind Restrict the listing to forward or to reverse zones.
	Kind *ZoneKind `form:"kind,omitempty" json:"kind,omitempty"`

	// Name Match one apex exactly. This is how a client turns a name a person
	// typed into the zone it belongs to; `search` cannot, because
	// `example.com` also matches `notexample.com`.
	Name *string `form:"name,omitempty" json:"name,omitempty"`

	// Search Match anywhere in the zone name, case-insensitively.
	Search *string `form:"search,omitempty" json:"search,omitempty"`

	// Disabled Select only disabled or only enabled zones.
	Disabled *bool `form:"disabled,omitempty" json:"disabled,omitempty"`
}

ListZonesParams defines parameters for ListZones.

type ListZonesRequestObject

type ListZonesRequestObject struct {
	Params ListZonesParams
}

type ListZonesResponse

type ListZonesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ZonePage
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseListZonesResponse

func ParseListZonesResponse(rsp *http.Response) (*ListZonesResponse, error)

ParseListZonesResponse parses an HTTP response from a ListZonesWithResponse call

func (ListZonesResponse) ContentType

func (r ListZonesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListZonesResponse) GetApplicationproblemJSONDefault

func (r ListZonesResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (ListZonesResponse) GetBody

func (r ListZonesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListZonesResponse) GetJSON200

func (r ListZonesResponse) GetJSON200() *ZonePage

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListZonesResponse) Status

func (r ListZonesResponse) Status() string

Status returns HTTPResponse.Status

func (ListZonesResponse) StatusCode

func (r ListZonesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListZonesResponseObject

type ListZonesResponseObject interface {
	VisitListZonesResponse(w http.ResponseWriter) error
}

type ListZonesdefaultApplicationProblemPlusJSONResponse

type ListZonesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ListZonesdefaultApplicationProblemPlusJSONResponse) VisitListZonesResponse

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type MissingZone

type MissingZone struct {
	Address string `json:"address"`

	// ZoneName The reverse zone that would be needed.
	ZoneName string `json:"zoneName"`
}

MissingZone A reverse entry has nowhere to go, because no zone covers the address. Creating one is an assertion of authority, so it is offered rather than done (docs/decisions.md D6).

type Problem

type Problem struct {
	// Conflicts Reverse entries that were not written because another name already claims the address.
	Conflicts *[]Conflict `json:"conflicts,omitempty"`

	// Detail What went wrong with this particular request.
	Detail *string `json:"detail,omitempty"`

	// Instance The request this failure belongs to.
	Instance *string `json:"instance,omitempty"`

	// MissingZones Reverse zones that would be needed and do not exist.
	MissingZones *[]MissingZone `json:"missingZones,omitempty"`

	// Status The HTTP status code, repeated for clients that lost it.
	Status int `json:"status"`

	// Title A short, stable summary of the kind of failure.
	Title string `json:"title"`

	// Type A URI reference naming the kind of failure.
	Type string `json:"type"`
}

Problem A failure, in the shape of RFC 9457. Anything a client has to act on travels as a field rather than as prose in `detail`, because no client should be parsing English.

type ProblemApplicationProblemPlusJSONResponse

type ProblemApplicationProblemPlusJSONResponse Problem

type QueryEvent

type QueryEvent struct {
	// At When the query was read.
	At    time.Time `json:"at"`
	Class string    `json:"class"`

	// Client The address the query came from.
	Client string `json:"client"`

	// Dropped Whether nothing was sent at all. Two messages have no safe reply,
	// and a query that got silence is exactly what somebody debugging is
	// looking for.
	Dropped bool `json:"dropped"`

	// LatencyUs How long the exchange took, in microseconds, from reading the
	// query to having written the response.
	LatencyUs int `json:"latencyUs"`

	// Name The question name, in the casing the client sent it, not the
	// casing this server stores, which is always lowercase.
	Name string `json:"name"`

	// Port The port it came from.
	Port *int `json:"port,omitempty"`

	// Rcode The response code sent, by mnemonic. Meaningless when `dropped` is set.
	Rcode string `json:"rcode"`

	// Size The response, in octets on the wire. Zero when nothing was sent.
	Size      int                 `json:"size"`
	Transport QueryEventTransport `json:"transport"`

	// Truncated Whether the response was cut to fit the transport and marked TC (RFC 1035 §4.1.1).
	Truncated bool   `json:"truncated"`
	Type      string `json:"type"`
}

QueryEvent One exchange, as a watcher sees it.

type QueryEventTransport

type QueryEventTransport string

QueryEventTransport defines model for QueryEvent.Transport.

const (
	Tcp QueryEventTransport = "tcp"
	Udp QueryEventTransport = "udp"
)

Defines values for QueryEventTransport.

func (QueryEventTransport) Valid

func (e QueryEventTransport) Valid() bool

Valid indicates whether the value is a known member of the QueryEventTransport enum.

type RRset

type RRset struct {
	// Class Defaults to IN, which is the only class this server answers.
	Class *string `json:"class,omitempty"`

	// Name The owner name, absolute, as for a single record.
	Name string `json:"name"`

	// Records What the set should hold. Empty removes it.
	Records []RRsetMember `json:"records"`

	// Ttl Defaults to the zone's own default TTL.
	Ttl  *int64 `json:"ttl,omitempty"`
	Type string `json:"type"`
}

RRset Every record sharing an owner name, class and type. The TTL belongs to the set rather than to each record: RFC 2181 §5.2 requires them to be equal, and a field that can be set inconsistently is one that will be.

type RRsetMember

type RRsetMember struct {
	Comment *string `json:"comment,omitempty"`
	Data    string  `json:"data"`

	// Disabled A disabled record is kept but not answered with.
	Disabled *bool `json:"disabled,omitempty"`
}

RRsetMember defines model for RRsetMember.

type RRsetsWritten

type RRsetsWritten struct {
	Conflicts *[]Conflict `json:"conflicts,omitempty"`

	// Generated Records written automatically, such as the PTR for an address.
	Generated    *[]Record      `json:"generated,omitempty"`
	MissingZones *[]MissingZone `json:"missingZones,omitempty"`

	// Records Every record now in the named RRsets, in the order the sets were given.
	Records []Record `json:"records"`
}

RRsetsWritten The named RRsets as they now stand, and what writing them caused.

type Record

type Record struct {
	Class     string    `json:"class"`
	Comment   *string   `json:"comment,omitempty"`
	CreatedAt time.Time `json:"createdAt"`

	// Data The record data in presentation format, canonicalised.
	Data     string `json:"data"`
	Disabled bool   `json:"disabled"`
	Id       string `json:"id"`

	// ManagedBy The record this one was generated from, for a generated record.
	ManagedBy *string `json:"managedBy,omitempty"`

	// ManagedKind Why this record was generated.
	ManagedKind *string `json:"managedKind,omitempty"`

	// Name The owner name, fully qualified.
	Name      string    `json:"name"`
	Ttl       int64     `json:"ttl"`
	Type      string    `json:"type"`
	UpdatedAt time.Time `json:"updatedAt"`
	ZoneId    string    `json:"zoneId"`
}

Record defines model for Record.

type RecordID

type RecordID = string

RecordID defines model for RecordID.

type RecordPage

type RecordPage struct {
	Items      []Record `json:"items"`
	NextCursor *string  `json:"nextCursor,omitempty"`
}

RecordPage defines model for RecordPage.

type RecordWritten

type RecordWritten struct {
	Conflicts *[]Conflict `json:"conflicts,omitempty"`

	// Generated Records written automatically, such as the PTR for an address.
	Generated    *[]Record      `json:"generated,omitempty"`
	MissingZones *[]MissingZone `json:"missingZones,omitempty"`
	Record       Record         `json:"record"`
}

RecordWritten The record as it now stands, together with what writing it caused.

type ReplaceRRsets

type ReplaceRRsets struct {
	// Comment Why, for the history.
	Comment *string `json:"comment,omitempty"`
	Rrsets  []RRset `json:"rrsets"`
}

ReplaceRRsets defines model for ReplaceRRsets.

type ReplaceRRsets200JSONResponse

type ReplaceRRsets200JSONResponse RRsetsWritten

func (ReplaceRRsets200JSONResponse) VisitReplaceRRsetsResponse

func (response ReplaceRRsets200JSONResponse) VisitReplaceRRsetsResponse(w http.ResponseWriter) error

type ReplaceRRsetsJSONRequestBody

type ReplaceRRsetsJSONRequestBody = ReplaceRRsets

ReplaceRRsetsJSONRequestBody defines body for ReplaceRRsets for application/json ContentType.

type ReplaceRRsetsRequestObject

type ReplaceRRsetsRequestObject struct {
	ZoneId ZoneID `json:"zoneId"`
	Body   *ReplaceRRsetsJSONRequestBody
}

type ReplaceRRsetsResponse

type ReplaceRRsetsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *RRsetsWritten
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseReplaceRRsetsResponse

func ParseReplaceRRsetsResponse(rsp *http.Response) (*ReplaceRRsetsResponse, error)

ParseReplaceRRsetsResponse parses an HTTP response from a ReplaceRRsetsWithResponse call

func (ReplaceRRsetsResponse) ContentType

func (r ReplaceRRsetsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ReplaceRRsetsResponse) GetApplicationproblemJSONDefault

func (r ReplaceRRsetsResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (ReplaceRRsetsResponse) GetBody

func (r ReplaceRRsetsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ReplaceRRsetsResponse) GetJSON200

func (r ReplaceRRsetsResponse) GetJSON200() *RRsetsWritten

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ReplaceRRsetsResponse) Status

func (r ReplaceRRsetsResponse) Status() string

Status returns HTTPResponse.Status

func (ReplaceRRsetsResponse) StatusCode

func (r ReplaceRRsetsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReplaceRRsetsResponseObject

type ReplaceRRsetsResponseObject interface {
	VisitReplaceRRsetsResponse(w http.ResponseWriter) error
}

type ReplaceRRsetsdefaultApplicationProblemPlusJSONResponse

type ReplaceRRsetsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (ReplaceRRsetsdefaultApplicationProblemPlusJSONResponse) VisitReplaceRRsetsResponse

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

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 ReverseConflictPolicy

type ReverseConflictPolicy string

ReverseConflictPolicy What happens when an address already answers a reverse lookup with some other name (docs/decisions.md D3).

  • `first-wins` keeps the entry that is there and reports the conflict. The default, and the only value that never changes an answer nobody asked to change.
  • `last-wins` replaces a generated entry with the new one, still reporting the conflict. An entry somebody wrote by hand is never replaced.
  • `multi` keeps both, which is the literal reading of "generate the reverse entry" and turns a routine change into a multi-record PTR set that reverse-lookup checks are not built for.
  • `reject` refuses the whole change.
const (
	FirstWins ReverseConflictPolicy = "first-wins"
	LastWins  ReverseConflictPolicy = "last-wins"
	Multi     ReverseConflictPolicy = "multi"
	Reject    ReverseConflictPolicy = "reject"
)

Defines values for ReverseConflictPolicy.

func (ReverseConflictPolicy) Valid

func (e ReverseConflictPolicy) Valid() bool

Valid indicates whether the value is a known member of the ReverseConflictPolicy enum.

type RevokeToken204Response

type RevokeToken204Response struct {
}

func (RevokeToken204Response) VisitRevokeTokenResponse

func (response RevokeToken204Response) VisitRevokeTokenResponse(w http.ResponseWriter) error

type RevokeTokenRequestObject

type RevokeTokenRequestObject struct {
	TokenId string `json:"tokenId"`
}

type RevokeTokenResponse

type RevokeTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseRevokeTokenResponse

func ParseRevokeTokenResponse(rsp *http.Response) (*RevokeTokenResponse, error)

ParseRevokeTokenResponse parses an HTTP response from a RevokeTokenWithResponse call

func (RevokeTokenResponse) ContentType

func (r RevokeTokenResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RevokeTokenResponse) GetApplicationproblemJSONDefault

func (r RevokeTokenResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (RevokeTokenResponse) GetBody

func (r RevokeTokenResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RevokeTokenResponse) Status

func (r RevokeTokenResponse) Status() string

Status returns HTTPResponse.Status

func (RevokeTokenResponse) StatusCode

func (r RevokeTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RevokeTokenResponseObject

type RevokeTokenResponseObject interface {
	VisitRevokeTokenResponse(w http.ResponseWriter) error
}

type RevokeTokendefaultApplicationProblemPlusJSONResponse

type RevokeTokendefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (RevokeTokendefaultApplicationProblemPlusJSONResponse) VisitRevokeTokenResponse

type RollbackResult

type RollbackResult struct {
	// Commit The commit that moved the zone to that state, with its events.
	// Absent when the zone was already there and nothing was written.
	Commit       *Commit        `json:"commit,omitempty"`
	Conflicts    *[]Conflict    `json:"conflicts,omitempty"`
	MissingZones *[]MissingZone `json:"missingZones,omitempty"`
}

RollbackResult What restoring the state produced.

type RollbackZone

type RollbackZone struct {
	// Comment Why, for the history.
	Comment *string `json:"comment,omitempty"`

	// Serial The serial to restore the zone to. It has to be one the zone actually had.
	Serial int64 `json:"serial"`
}

RollbackZone defines model for RollbackZone.

type RollbackZone200JSONResponse

type RollbackZone200JSONResponse RollbackResult

func (RollbackZone200JSONResponse) VisitRollbackZoneResponse

func (response RollbackZone200JSONResponse) VisitRollbackZoneResponse(w http.ResponseWriter) error

type RollbackZoneJSONRequestBody

type RollbackZoneJSONRequestBody = RollbackZone

RollbackZoneJSONRequestBody defines body for RollbackZone for application/json ContentType.

type RollbackZoneRequestObject

type RollbackZoneRequestObject struct {
	ZoneId ZoneID `json:"zoneId"`
	Body   *RollbackZoneJSONRequestBody
}

type RollbackZoneResponse

type RollbackZoneResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *RollbackResult
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseRollbackZoneResponse

func ParseRollbackZoneResponse(rsp *http.Response) (*RollbackZoneResponse, error)

ParseRollbackZoneResponse parses an HTTP response from a RollbackZoneWithResponse call

func (RollbackZoneResponse) ContentType

func (r RollbackZoneResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RollbackZoneResponse) GetApplicationproblemJSONDefault

func (r RollbackZoneResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (RollbackZoneResponse) GetBody

func (r RollbackZoneResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RollbackZoneResponse) GetJSON200

func (r RollbackZoneResponse) GetJSON200() *RollbackResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (RollbackZoneResponse) Status

func (r RollbackZoneResponse) Status() string

Status returns HTTPResponse.Status

func (RollbackZoneResponse) StatusCode

func (r RollbackZoneResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RollbackZoneResponseObject

type RollbackZoneResponseObject interface {
	VisitRollbackZoneResponse(w http.ResponseWriter) error
}

type RollbackZonedefaultApplicationProblemPlusJSONResponse

type RollbackZonedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (RollbackZonedefaultApplicationProblemPlusJSONResponse) VisitRollbackZoneResponse

type SOA

type SOA struct {
	Expire int64 `json:"expire"`

	// Mailbox The RNAME field, as a domain name.
	Mailbox string `json:"mailbox"`

	// Minimum The negative-caching TTL of RFC 2308 §4, not a floor on record TTLs.
	Minimum int64 `json:"minimum"`

	// PrimaryNs The MNAME field, fully qualified.
	PrimaryNs string `json:"primaryNs"`
	Refresh   int64  `json:"refresh"`
	Retry     int64  `json:"retry"`

	// Serial Advanced by exactly one per commit (docs/decisions.md D2).
	Serial *int64 `json:"serial,omitempty"`

	// Ttl The time to live of the SOA record itself.
	Ttl int64 `json:"ttl"`
}

SOA The start-of-authority parameters of a zone (RFC 1035 §3.3.13).

type SOAInput

type SOAInput struct {
	Expire    *int64  `json:"expire,omitempty"`
	Mailbox   *string `json:"mailbox,omitempty"`
	Minimum   *int64  `json:"minimum,omitempty"`
	PrimaryNs *string `json:"primaryNs,omitempty"`
	Refresh   *int64  `json:"refresh,omitempty"`
	Retry     *int64  `json:"retry,omitempty"`
	Ttl       *int64  `json:"ttl,omitempty"`
}

SOAInput The start-of-authority fields a client may set, on a zone it is creating and on one it is changing. Every field is optional in both cases: creating a zone fills what is not given from this server's defaults, and changing one leaves it as it was. A client that only cares about the name server should not have to send five timers it has no opinion about.

The serial is not among them: one commit advances it by exactly one, and that is what lets the journal be replayed (docs/decisions.md D2).

type Scope

type Scope string

Scope What a token may do. The scopes are ordered (admin allows everything write allows, and write everything read allows) so a token carries the strongest one it needs rather than a list.

const (
	Admin Scope = "admin"
	Read  Scope = "read"
	Write Scope = "write"
)

Defines values for Scope.

func (Scope) Valid

func (e Scope) Valid() bool

Valid indicates whether the value is a known member of the Scope enum.

type ServerInterface

type ServerInterface interface {
	// DeleteSession End the session
	// (DELETE /auth/session)
	DeleteSession(w http.ResponseWriter, r *http.Request)
	// GetSession Report who this request is authenticated as
	// (GET /auth/session)
	GetSession(w http.ResponseWriter, r *http.Request)
	// CreateSession Exchange a token for a browser session
	// (POST /auth/session)
	CreateSession(w http.ResponseWriter, r *http.Request)
	// ListCommits List commits, newest first
	// (GET /commits)
	ListCommits(w http.ResponseWriter, r *http.Request, params ListCommitsParams)
	// GetCommit Read one commit and everything it changed
	// (GET /commits/{commitId})
	GetCommit(w http.ResponseWriter, r *http.Request, commitId string)
	// GetHealth Report whether the server is fit to answer queries
	// (GET /healthz)
	GetHealth(w http.ResponseWriter, r *http.Request)
	// GetMetrics Export the current metrics
	// (GET /metrics)
	GetMetrics(w http.ResponseWriter, r *http.Request)
	// StreamQueries Watch queries as they are answered
	// (GET /queries/stream)
	StreamQueries(w http.ResponseWriter, r *http.Request, params StreamQueriesParams)
	// DeleteRecord Delete a record
	// (DELETE /records/{recordId})
	DeleteRecord(w http.ResponseWriter, r *http.Request, recordId RecordID)
	// GetRecord Read one record
	// (GET /records/{recordId})
	GetRecord(w http.ResponseWriter, r *http.Request, recordId RecordID)
	// UpdateRecord Change a record
	// (PATCH /records/{recordId})
	UpdateRecord(w http.ResponseWriter, r *http.Request, recordId RecordID)
	// DetachRecord Take over a generated record
	// (POST /records/{recordId}/detach)
	DetachRecord(w http.ResponseWriter, r *http.Request, recordId RecordID)
	// GetSettings Read the server-wide settings
	// (GET /settings)
	GetSettings(w http.ResponseWriter, r *http.Request)
	// UpdateSettings Change the server-wide settings
	// (PATCH /settings)
	UpdateSettings(w http.ResponseWriter, r *http.Request)
	// ListTokens List the tokens that may use this API
	// (GET /tokens)
	ListTokens(w http.ResponseWriter, r *http.Request)
	// CreateToken Mint a token
	// (POST /tokens)
	CreateToken(w http.ResponseWriter, r *http.Request)
	// RevokeToken Withdraw a token
	// (DELETE /tokens/{tokenId})
	RevokeToken(w http.ResponseWriter, r *http.Request, tokenId string)
	// ListZones List zones
	// (GET /zones)
	ListZones(w http.ResponseWriter, r *http.Request, params ListZonesParams)
	// CreateZone Create a zone
	// (POST /zones)
	CreateZone(w http.ResponseWriter, r *http.Request)
	// ImportZone Bring a whole zone in from a zonefile
	// (POST /zones/import)
	ImportZone(w http.ResponseWriter, r *http.Request, params ImportZoneParams)
	// DeleteZone Delete a zone and everything in it
	// (DELETE /zones/{zoneId})
	DeleteZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)
	// GetZone Read one zone
	// (GET /zones/{zoneId})
	GetZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)
	// UpdateZone Change a zone's own settings
	// (PATCH /zones/{zoneId})
	UpdateZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)
	// ExportZone Write a zone out as a zonefile
	// (GET /zones/{zoneId}/export)
	ExportZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)
	// ListRecords List the records of a zone
	// (GET /zones/{zoneId}/records)
	ListRecords(w http.ResponseWriter, r *http.Request, zoneId ZoneID, params ListRecordsParams)
	// CreateRecord Add a record to a zone
	// (POST /zones/{zoneId}/records)
	CreateRecord(w http.ResponseWriter, r *http.Request, zoneId ZoneID)
	// RollbackZone Restore a zone to the state it had at a serial
	// (POST /zones/{zoneId}/rollback)
	RollbackZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)
	// ReplaceRRsets Make the named RRsets exactly what is given
	// (PUT /zones/{zoneId}/rrsets)
	ReplaceRRsets(w http.ResponseWriter, r *http.Request, zoneId ZoneID)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

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) CreateRecord

func (siw *ServerInterfaceWrapper) CreateRecord(w http.ResponseWriter, r *http.Request)

CreateRecord operation middleware

func (*ServerInterfaceWrapper) CreateSession

func (siw *ServerInterfaceWrapper) CreateSession(w http.ResponseWriter, r *http.Request)

CreateSession operation middleware

func (*ServerInterfaceWrapper) CreateToken

func (siw *ServerInterfaceWrapper) CreateToken(w http.ResponseWriter, r *http.Request)

CreateToken operation middleware

func (*ServerInterfaceWrapper) CreateZone

func (siw *ServerInterfaceWrapper) CreateZone(w http.ResponseWriter, r *http.Request)

CreateZone operation middleware

func (*ServerInterfaceWrapper) DeleteRecord

func (siw *ServerInterfaceWrapper) DeleteRecord(w http.ResponseWriter, r *http.Request)

DeleteRecord operation middleware

func (*ServerInterfaceWrapper) DeleteSession

func (siw *ServerInterfaceWrapper) DeleteSession(w http.ResponseWriter, r *http.Request)

DeleteSession operation middleware

func (*ServerInterfaceWrapper) DeleteZone

func (siw *ServerInterfaceWrapper) DeleteZone(w http.ResponseWriter, r *http.Request)

DeleteZone operation middleware

func (*ServerInterfaceWrapper) DetachRecord

func (siw *ServerInterfaceWrapper) DetachRecord(w http.ResponseWriter, r *http.Request)

DetachRecord operation middleware

func (*ServerInterfaceWrapper) ExportZone

func (siw *ServerInterfaceWrapper) ExportZone(w http.ResponseWriter, r *http.Request)

ExportZone operation middleware

func (*ServerInterfaceWrapper) GetCommit

func (siw *ServerInterfaceWrapper) GetCommit(w http.ResponseWriter, r *http.Request)

GetCommit operation middleware

func (*ServerInterfaceWrapper) GetHealth

func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth operation middleware

func (*ServerInterfaceWrapper) GetMetrics

func (siw *ServerInterfaceWrapper) GetMetrics(w http.ResponseWriter, r *http.Request)

GetMetrics operation middleware

func (*ServerInterfaceWrapper) GetRecord

func (siw *ServerInterfaceWrapper) GetRecord(w http.ResponseWriter, r *http.Request)

GetRecord operation middleware

func (*ServerInterfaceWrapper) GetSession

func (siw *ServerInterfaceWrapper) GetSession(w http.ResponseWriter, r *http.Request)

GetSession operation middleware

func (*ServerInterfaceWrapper) GetSettings

func (siw *ServerInterfaceWrapper) GetSettings(w http.ResponseWriter, r *http.Request)

GetSettings operation middleware

func (*ServerInterfaceWrapper) GetZone

GetZone operation middleware

func (*ServerInterfaceWrapper) ImportZone

func (siw *ServerInterfaceWrapper) ImportZone(w http.ResponseWriter, r *http.Request)

ImportZone operation middleware

func (*ServerInterfaceWrapper) ListCommits

func (siw *ServerInterfaceWrapper) ListCommits(w http.ResponseWriter, r *http.Request)

ListCommits operation middleware

func (*ServerInterfaceWrapper) ListRecords

func (siw *ServerInterfaceWrapper) ListRecords(w http.ResponseWriter, r *http.Request)

ListRecords operation middleware

func (*ServerInterfaceWrapper) ListTokens

func (siw *ServerInterfaceWrapper) ListTokens(w http.ResponseWriter, r *http.Request)

ListTokens operation middleware

func (*ServerInterfaceWrapper) ListZones

func (siw *ServerInterfaceWrapper) ListZones(w http.ResponseWriter, r *http.Request)

ListZones operation middleware

func (*ServerInterfaceWrapper) ReplaceRRsets

func (siw *ServerInterfaceWrapper) ReplaceRRsets(w http.ResponseWriter, r *http.Request)

ReplaceRRsets operation middleware

func (*ServerInterfaceWrapper) RevokeToken

func (siw *ServerInterfaceWrapper) RevokeToken(w http.ResponseWriter, r *http.Request)

RevokeToken operation middleware

func (*ServerInterfaceWrapper) RollbackZone

func (siw *ServerInterfaceWrapper) RollbackZone(w http.ResponseWriter, r *http.Request)

RollbackZone operation middleware

func (*ServerInterfaceWrapper) StreamQueries

func (siw *ServerInterfaceWrapper) StreamQueries(w http.ResponseWriter, r *http.Request)

StreamQueries operation middleware

func (*ServerInterfaceWrapper) UpdateRecord

func (siw *ServerInterfaceWrapper) UpdateRecord(w http.ResponseWriter, r *http.Request)

UpdateRecord operation middleware

func (*ServerInterfaceWrapper) UpdateSettings

func (siw *ServerInterfaceWrapper) UpdateSettings(w http.ResponseWriter, r *http.Request)

UpdateSettings operation middleware

func (*ServerInterfaceWrapper) UpdateZone

func (siw *ServerInterfaceWrapper) UpdateZone(w http.ResponseWriter, r *http.Request)

UpdateZone operation middleware

type Session

type Session struct {
	// ExpiresAt When the session ends. Absent when the request authenticated with a bearer token.
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`

	// Name The name of the token this authenticates as.
	Name   string  `json:"name"`
	Scopes []Scope `json:"scopes"`
}

Session Who a request is authenticated as, and what it may do.

type Settings

type Settings struct {
	// ReverseConflictPolicy What happens when an address already answers a reverse lookup with some
	// other name (docs/decisions.md D3).
	//
	// - `first-wins` keeps the entry that is there and reports the conflict.
	//   The default, and the only value that never changes an answer nobody
	//   asked to change.
	// - `last-wins` replaces a generated entry with the new one, still
	//   reporting the conflict. An entry somebody wrote by hand is never
	//   replaced.
	// - `multi` keeps both, which is the literal reading of "generate the
	//   reverse entry" and turns a routine change into a multi-record PTR set
	//   that reverse-lookup checks are not built for.
	// - `reject` refuses the whole change.
	ReverseConflictPolicy ReverseConflictPolicy `json:"reverseConflictPolicy"`
}

Settings defines model for Settings.

type SkippedRecord

type SkippedRecord struct {
	// Reason Why the zone could never answer with it.
	Reason string `json:"reason"`

	// Record The record as the file had it, in presentation format.
	Record string `json:"record"`
}

SkippedRecord defines model for SkippedRecord.

type StreamQueries200TexteventStreamResponse

type StreamQueries200TexteventStreamResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (StreamQueries200TexteventStreamResponse) VisitStreamQueriesResponse

func (response StreamQueries200TexteventStreamResponse) VisitStreamQueriesResponse(w http.ResponseWriter) error

type StreamQueriesParams

type StreamQueriesParams struct {
	// Name Watch a name and everything below it. Matching is
	// case-insensitive (RFC 4343), so it finds a query however 0x20
	// encoding wrote it.
	Name *string `form:"name,omitempty" json:"name,omitempty"`

	// Type Watch only these question types. Repeat for more than one.
	Type *[]string `form:"type,omitempty" json:"type,omitempty"`

	// Rcode Watch only these response codes, by mnemonic, `NXDOMAIN`,
	// `REFUSED`. Repeat for more than one.
	Rcode *[]string `form:"rcode,omitempty" json:"rcode,omitempty"`

	// Client Watch only this address or network, in CIDR notation. A bare
	// address is taken as a single host.
	Client *string `form:"client,omitempty" json:"client,omitempty"`
}

StreamQueriesParams defines parameters for StreamQueries.

type StreamQueriesRequestObject

type StreamQueriesRequestObject struct {
	Params StreamQueriesParams
}

type StreamQueriesResponse

type StreamQueriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseStreamQueriesResponse

func ParseStreamQueriesResponse(rsp *http.Response) (*StreamQueriesResponse, error)

ParseStreamQueriesResponse parses an HTTP response from a StreamQueriesWithResponse call

func (StreamQueriesResponse) ContentType

func (r StreamQueriesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (StreamQueriesResponse) GetApplicationproblemJSONDefault

func (r StreamQueriesResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (StreamQueriesResponse) GetBody

func (r StreamQueriesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (StreamQueriesResponse) Status

func (r StreamQueriesResponse) Status() string

Status returns HTTPResponse.Status

func (StreamQueriesResponse) StatusCode

func (r StreamQueriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StreamQueriesResponseObject

type StreamQueriesResponseObject interface {
	VisitStreamQueriesResponse(w http.ResponseWriter) error
}

type StreamQueriesdefaultApplicationProblemPlusJSONResponse

type StreamQueriesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (StreamQueriesdefaultApplicationProblemPlusJSONResponse) VisitStreamQueriesResponse

type StreamStatus

type StreamStatus struct {
	// Dropped How many were thrown away because this watcher was not reading fast enough.
	Dropped int `json:"dropped"`

	// Matched Exchanges that passed the filter.
	Matched int `json:"matched"`

	// Ratio What the stream is sampling at now. 1 is everything; 50 means one
	// exchange in fifty is being sent.
	Ratio int `json:"ratio"`

	// Sampled How many were left out because the filtered stream was faster than the cap.
	Sampled int `json:"sampled"`

	// Sent How many of those reached this watcher.
	Sent int `json:"sent"`
}

StreamStatus What this stream is leaving out. Part of the interface rather than a debug detail: a stream that is sampling has to say so, or what it shows reads as everything that happened.

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, request any) (any, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// DeleteSession End the session
	// (DELETE /auth/session)
	DeleteSession(ctx context.Context, request DeleteSessionRequestObject) (DeleteSessionResponseObject, error)
	// GetSession Report who this request is authenticated as
	// (GET /auth/session)
	GetSession(ctx context.Context, request GetSessionRequestObject) (GetSessionResponseObject, error)
	// CreateSession Exchange a token for a browser session
	// (POST /auth/session)
	CreateSession(ctx context.Context, request CreateSessionRequestObject) (CreateSessionResponseObject, error)
	// ListCommits List commits, newest first
	// (GET /commits)
	ListCommits(ctx context.Context, request ListCommitsRequestObject) (ListCommitsResponseObject, error)
	// GetCommit Read one commit and everything it changed
	// (GET /commits/{commitId})
	GetCommit(ctx context.Context, request GetCommitRequestObject) (GetCommitResponseObject, error)
	// GetHealth Report whether the server is fit to answer queries
	// (GET /healthz)
	GetHealth(ctx context.Context, request GetHealthRequestObject) (GetHealthResponseObject, error)
	// GetMetrics Export the current metrics
	// (GET /metrics)
	GetMetrics(ctx context.Context, request GetMetricsRequestObject) (GetMetricsResponseObject, error)
	// StreamQueries Watch queries as they are answered
	// (GET /queries/stream)
	StreamQueries(ctx context.Context, request StreamQueriesRequestObject) (StreamQueriesResponseObject, error)
	// DeleteRecord Delete a record
	// (DELETE /records/{recordId})
	DeleteRecord(ctx context.Context, request DeleteRecordRequestObject) (DeleteRecordResponseObject, error)
	// GetRecord Read one record
	// (GET /records/{recordId})
	GetRecord(ctx context.Context, request GetRecordRequestObject) (GetRecordResponseObject, error)
	// UpdateRecord Change a record
	// (PATCH /records/{recordId})
	UpdateRecord(ctx context.Context, request UpdateRecordRequestObject) (UpdateRecordResponseObject, error)
	// DetachRecord Take over a generated record
	// (POST /records/{recordId}/detach)
	DetachRecord(ctx context.Context, request DetachRecordRequestObject) (DetachRecordResponseObject, error)
	// GetSettings Read the server-wide settings
	// (GET /settings)
	GetSettings(ctx context.Context, request GetSettingsRequestObject) (GetSettingsResponseObject, error)
	// UpdateSettings Change the server-wide settings
	// (PATCH /settings)
	UpdateSettings(ctx context.Context, request UpdateSettingsRequestObject) (UpdateSettingsResponseObject, error)
	// ListTokens List the tokens that may use this API
	// (GET /tokens)
	ListTokens(ctx context.Context, request ListTokensRequestObject) (ListTokensResponseObject, error)
	// CreateToken Mint a token
	// (POST /tokens)
	CreateToken(ctx context.Context, request CreateTokenRequestObject) (CreateTokenResponseObject, error)
	// RevokeToken Withdraw a token
	// (DELETE /tokens/{tokenId})
	RevokeToken(ctx context.Context, request RevokeTokenRequestObject) (RevokeTokenResponseObject, error)
	// ListZones List zones
	// (GET /zones)
	ListZones(ctx context.Context, request ListZonesRequestObject) (ListZonesResponseObject, error)
	// CreateZone Create a zone
	// (POST /zones)
	CreateZone(ctx context.Context, request CreateZoneRequestObject) (CreateZoneResponseObject, error)
	// ImportZone Bring a whole zone in from a zonefile
	// (POST /zones/import)
	ImportZone(ctx context.Context, request ImportZoneRequestObject) (ImportZoneResponseObject, error)
	// DeleteZone Delete a zone and everything in it
	// (DELETE /zones/{zoneId})
	DeleteZone(ctx context.Context, request DeleteZoneRequestObject) (DeleteZoneResponseObject, error)
	// GetZone Read one zone
	// (GET /zones/{zoneId})
	GetZone(ctx context.Context, request GetZoneRequestObject) (GetZoneResponseObject, error)
	// UpdateZone Change a zone's own settings
	// (PATCH /zones/{zoneId})
	UpdateZone(ctx context.Context, request UpdateZoneRequestObject) (UpdateZoneResponseObject, error)
	// ExportZone Write a zone out as a zonefile
	// (GET /zones/{zoneId}/export)
	ExportZone(ctx context.Context, request ExportZoneRequestObject) (ExportZoneResponseObject, error)
	// ListRecords List the records of a zone
	// (GET /zones/{zoneId}/records)
	ListRecords(ctx context.Context, request ListRecordsRequestObject) (ListRecordsResponseObject, error)
	// CreateRecord Add a record to a zone
	// (POST /zones/{zoneId}/records)
	CreateRecord(ctx context.Context, request CreateRecordRequestObject) (CreateRecordResponseObject, error)
	// RollbackZone Restore a zone to the state it had at a serial
	// (POST /zones/{zoneId}/rollback)
	RollbackZone(ctx context.Context, request RollbackZoneRequestObject) (RollbackZoneResponseObject, error)
	// ReplaceRRsets Make the named RRsets exactly what is given
	// (PUT /zones/{zoneId}/rrsets)
	ReplaceRRsets(ctx context.Context, request ReplaceRRsetsRequestObject) (ReplaceRRsetsResponseObject, error)
}

StrictServerInterface represents all server handlers.

type Token

type Token struct {
	CreatedAt time.Time `json:"createdAt"`

	// ExpiresAt Absent for a token that does not expire.
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`
	Id        string     `json:"id"`

	// LastUsedAt Absent for a token that has never authenticated a request. Advisory, and may lag.
	LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`

	// Name What this token is for, as a person would say it.
	Name string `json:"name"`

	// Prefix The leading characters of the secret, kept in the clear so that two
	// tokens can be told apart in a list and in the history.
	Prefix string `json:"prefix"`

	// RevokedAt Absent for a token that is still usable.
	RevokedAt *time.Time `json:"revokedAt,omitempty"`
	Scopes    []Scope    `json:"scopes"`
}

Token A credential, without the secret it authenticates with.

type TokenCreated

type TokenCreated struct {
	// Secret The credential itself, shown here and nowhere else. There is no way
	// to read it again, because the server does not have it.
	Secret string `json:"secret"`

	// Token A credential, without the secret it authenticates with.
	Token Token `json:"token"`
}

TokenCreated defines model for TokenCreated.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) CreateRecord

func (_ Unimplemented) CreateRecord(w http.ResponseWriter, r *http.Request, zoneId ZoneID)

CreateRecord Add a record to a zone (POST /zones/{zoneId}/records)

func (Unimplemented) CreateSession

func (_ Unimplemented) CreateSession(w http.ResponseWriter, r *http.Request)

CreateSession Exchange a token for a browser session (POST /auth/session)

func (Unimplemented) CreateToken

func (_ Unimplemented) CreateToken(w http.ResponseWriter, r *http.Request)

CreateToken Mint a token (POST /tokens)

func (Unimplemented) CreateZone

func (_ Unimplemented) CreateZone(w http.ResponseWriter, r *http.Request)

CreateZone Create a zone (POST /zones)

func (Unimplemented) DeleteRecord

func (_ Unimplemented) DeleteRecord(w http.ResponseWriter, r *http.Request, recordId RecordID)

DeleteRecord Delete a record (DELETE /records/{recordId})

func (Unimplemented) DeleteSession

func (_ Unimplemented) DeleteSession(w http.ResponseWriter, r *http.Request)

DeleteSession End the session (DELETE /auth/session)

func (Unimplemented) DeleteZone

func (_ Unimplemented) DeleteZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)

DeleteZone Delete a zone and everything in it (DELETE /zones/{zoneId})

func (Unimplemented) DetachRecord

func (_ Unimplemented) DetachRecord(w http.ResponseWriter, r *http.Request, recordId RecordID)

DetachRecord Take over a generated record (POST /records/{recordId}/detach)

func (Unimplemented) ExportZone

func (_ Unimplemented) ExportZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)

ExportZone Write a zone out as a zonefile (GET /zones/{zoneId}/export)

func (Unimplemented) GetCommit

func (_ Unimplemented) GetCommit(w http.ResponseWriter, r *http.Request, commitId string)

GetCommit Read one commit and everything it changed (GET /commits/{commitId})

func (Unimplemented) GetHealth

func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth Report whether the server is fit to answer queries (GET /healthz)

func (Unimplemented) GetMetrics

func (_ Unimplemented) GetMetrics(w http.ResponseWriter, r *http.Request)

GetMetrics Export the current metrics (GET /metrics)

func (Unimplemented) GetRecord

func (_ Unimplemented) GetRecord(w http.ResponseWriter, r *http.Request, recordId RecordID)

GetRecord Read one record (GET /records/{recordId})

func (Unimplemented) GetSession

func (_ Unimplemented) GetSession(w http.ResponseWriter, r *http.Request)

GetSession Report who this request is authenticated as (GET /auth/session)

func (Unimplemented) GetSettings

func (_ Unimplemented) GetSettings(w http.ResponseWriter, r *http.Request)

GetSettings Read the server-wide settings (GET /settings)

func (Unimplemented) GetZone

func (_ Unimplemented) GetZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)

GetZone Read one zone (GET /zones/{zoneId})

func (Unimplemented) ImportZone

func (_ Unimplemented) ImportZone(w http.ResponseWriter, r *http.Request, params ImportZoneParams)

ImportZone Bring a whole zone in from a zonefile (POST /zones/import)

func (Unimplemented) ListCommits

func (_ Unimplemented) ListCommits(w http.ResponseWriter, r *http.Request, params ListCommitsParams)

ListCommits List commits, newest first (GET /commits)

func (Unimplemented) ListRecords

func (_ Unimplemented) ListRecords(w http.ResponseWriter, r *http.Request, zoneId ZoneID, params ListRecordsParams)

ListRecords List the records of a zone (GET /zones/{zoneId}/records)

func (Unimplemented) ListTokens

func (_ Unimplemented) ListTokens(w http.ResponseWriter, r *http.Request)

ListTokens List the tokens that may use this API (GET /tokens)

func (Unimplemented) ListZones

func (_ Unimplemented) ListZones(w http.ResponseWriter, r *http.Request, params ListZonesParams)

ListZones List zones (GET /zones)

func (Unimplemented) ReplaceRRsets

func (_ Unimplemented) ReplaceRRsets(w http.ResponseWriter, r *http.Request, zoneId ZoneID)

ReplaceRRsets Make the named RRsets exactly what is given (PUT /zones/{zoneId}/rrsets)

func (Unimplemented) RevokeToken

func (_ Unimplemented) RevokeToken(w http.ResponseWriter, r *http.Request, tokenId string)

RevokeToken Withdraw a token (DELETE /tokens/{tokenId})

func (Unimplemented) RollbackZone

func (_ Unimplemented) RollbackZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)

RollbackZone Restore a zone to the state it had at a serial (POST /zones/{zoneId}/rollback)

func (Unimplemented) StreamQueries

func (_ Unimplemented) StreamQueries(w http.ResponseWriter, r *http.Request, params StreamQueriesParams)

StreamQueries Watch queries as they are answered (GET /queries/stream)

func (Unimplemented) UpdateRecord

func (_ Unimplemented) UpdateRecord(w http.ResponseWriter, r *http.Request, recordId RecordID)

UpdateRecord Change a record (PATCH /records/{recordId})

func (Unimplemented) UpdateSettings

func (_ Unimplemented) UpdateSettings(w http.ResponseWriter, r *http.Request)

UpdateSettings Change the server-wide settings (PATCH /settings)

func (Unimplemented) UpdateZone

func (_ Unimplemented) UpdateZone(w http.ResponseWriter, r *http.Request, zoneId ZoneID)

UpdateZone Change a zone's own settings (PATCH /zones/{zoneId})

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateRecord

type UpdateRecord struct {
	Comment *string `json:"comment,omitempty"`
	Data    *string `json:"data,omitempty"`

	// Disabled A disabled record is kept but not answered with.
	Disabled *bool   `json:"disabled,omitempty"`
	Name     *string `json:"name,omitempty"`
	Ttl      *int64  `json:"ttl,omitempty"`
	Type     *string `json:"type,omitempty"`
}

UpdateRecord The parts of a record that may be changed. A field that is absent is left as it is. The class is not among them, because IN is the only class this server answers.

type UpdateRecord200JSONResponse

type UpdateRecord200JSONResponse RecordWritten

func (UpdateRecord200JSONResponse) VisitUpdateRecordResponse

func (response UpdateRecord200JSONResponse) VisitUpdateRecordResponse(w http.ResponseWriter) error

type UpdateRecordJSONRequestBody

type UpdateRecordJSONRequestBody = UpdateRecord

UpdateRecordJSONRequestBody defines body for UpdateRecord for application/json ContentType.

type UpdateRecordRequestObject

type UpdateRecordRequestObject struct {
	RecordId RecordID `json:"recordId"`
	Body     *UpdateRecordJSONRequestBody
}

type UpdateRecordResponse

type UpdateRecordResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *RecordWritten
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseUpdateRecordResponse

func ParseUpdateRecordResponse(rsp *http.Response) (*UpdateRecordResponse, error)

ParseUpdateRecordResponse parses an HTTP response from a UpdateRecordWithResponse call

func (UpdateRecordResponse) ContentType

func (r UpdateRecordResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateRecordResponse) GetApplicationproblemJSONDefault

func (r UpdateRecordResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (UpdateRecordResponse) GetBody

func (r UpdateRecordResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdateRecordResponse) GetJSON200

func (r UpdateRecordResponse) GetJSON200() *RecordWritten

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (UpdateRecordResponse) Status

func (r UpdateRecordResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateRecordResponse) StatusCode

func (r UpdateRecordResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateRecordResponseObject

type UpdateRecordResponseObject interface {
	VisitUpdateRecordResponse(w http.ResponseWriter) error
}

type UpdateRecorddefaultApplicationProblemPlusJSONResponse

type UpdateRecorddefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (UpdateRecorddefaultApplicationProblemPlusJSONResponse) VisitUpdateRecordResponse

type UpdateSettings

type UpdateSettings struct {
	// ReverseConflictPolicy What happens when an address already answers a reverse lookup with some
	// other name (docs/decisions.md D3).
	//
	// - `first-wins` keeps the entry that is there and reports the conflict.
	//   The default, and the only value that never changes an answer nobody
	//   asked to change.
	// - `last-wins` replaces a generated entry with the new one, still
	//   reporting the conflict. An entry somebody wrote by hand is never
	//   replaced.
	// - `multi` keeps both, which is the literal reading of "generate the
	//   reverse entry" and turns a routine change into a multi-record PTR set
	//   that reverse-lookup checks are not built for.
	// - `reject` refuses the whole change.
	ReverseConflictPolicy *ReverseConflictPolicy `json:"reverseConflictPolicy,omitempty"`
}

UpdateSettings A field that is absent is left as it is.

type UpdateSettings200JSONResponse

type UpdateSettings200JSONResponse Settings

func (UpdateSettings200JSONResponse) VisitUpdateSettingsResponse

func (response UpdateSettings200JSONResponse) VisitUpdateSettingsResponse(w http.ResponseWriter) error

type UpdateSettingsJSONRequestBody

type UpdateSettingsJSONRequestBody = UpdateSettings

UpdateSettingsJSONRequestBody defines body for UpdateSettings for application/json ContentType.

type UpdateSettingsRequestObject

type UpdateSettingsRequestObject struct {
	Body *UpdateSettingsJSONRequestBody
}

type UpdateSettingsResponse

type UpdateSettingsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Settings
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseUpdateSettingsResponse

func ParseUpdateSettingsResponse(rsp *http.Response) (*UpdateSettingsResponse, error)

ParseUpdateSettingsResponse parses an HTTP response from a UpdateSettingsWithResponse call

func (UpdateSettingsResponse) ContentType

func (r UpdateSettingsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateSettingsResponse) GetApplicationproblemJSONDefault

func (r UpdateSettingsResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (UpdateSettingsResponse) GetBody

func (r UpdateSettingsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdateSettingsResponse) GetJSON200

func (r UpdateSettingsResponse) GetJSON200() *Settings

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (UpdateSettingsResponse) Status

func (r UpdateSettingsResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateSettingsResponse) StatusCode

func (r UpdateSettingsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateSettingsResponseObject

type UpdateSettingsResponseObject interface {
	VisitUpdateSettingsResponse(w http.ResponseWriter) error
}

type UpdateSettingsdefaultApplicationProblemPlusJSONResponse

type UpdateSettingsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (UpdateSettingsdefaultApplicationProblemPlusJSONResponse) VisitUpdateSettingsResponse

func (response UpdateSettingsdefaultApplicationProblemPlusJSONResponse) VisitUpdateSettingsResponse(w http.ResponseWriter) error

type UpdateZone

type UpdateZone struct {
	// AutoReverse Whether address records in this zone generate PTRs. Null puts the
	// zone back on the server-wide setting, which is a third state and
	// not the same as false.
	AutoReverse nullable.Nullable[bool] `json:"autoReverse,omitempty"`
	Comment     *string                 `json:"comment,omitempty"`
	DefaultTtl  *int64                  `json:"defaultTtl,omitempty"`

	// Disabled A disabled zone stops answering entirely.
	Disabled *bool `json:"disabled,omitempty"`

	// Soa The start-of-authority fields a client may set, on a zone it is
	// creating and on one it is changing. Every field is optional in both
	// cases: creating a zone fills what is not given from this server's
	// defaults, and changing one leaves it as it was. A client that only
	// cares about the name server should not have to send five timers it has
	// no opinion about.
	//
	// The serial is not among them: one commit advances it by exactly one,
	// and that is what lets the journal be replayed (docs/decisions.md D2).
	Soa *SOAInput `json:"soa,omitempty"`
}

UpdateZone The zone settings that may be changed. A field that is absent is left as it is, which is what makes this a partial edit rather than a replacement that a client has to read the whole zone to send.

type UpdateZone200JSONResponse

type UpdateZone200JSONResponse Zone

func (UpdateZone200JSONResponse) VisitUpdateZoneResponse

func (response UpdateZone200JSONResponse) VisitUpdateZoneResponse(w http.ResponseWriter) error

type UpdateZoneJSONRequestBody

type UpdateZoneJSONRequestBody = UpdateZone

UpdateZoneJSONRequestBody defines body for UpdateZone for application/json ContentType.

type UpdateZoneRequestObject

type UpdateZoneRequestObject struct {
	ZoneId ZoneID `json:"zoneId"`
	Body   *UpdateZoneJSONRequestBody
}

type UpdateZoneResponse

type UpdateZoneResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Zone
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *Problem
}

func ParseUpdateZoneResponse

func ParseUpdateZoneResponse(rsp *http.Response) (*UpdateZoneResponse, error)

ParseUpdateZoneResponse parses an HTTP response from a UpdateZoneWithResponse call

func (UpdateZoneResponse) ContentType

func (r UpdateZoneResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateZoneResponse) GetApplicationproblemJSONDefault

func (r UpdateZoneResponse) GetApplicationproblemJSONDefault() *Problem

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (UpdateZoneResponse) GetBody

func (r UpdateZoneResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdateZoneResponse) GetJSON200

func (r UpdateZoneResponse) GetJSON200() *Zone

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (UpdateZoneResponse) Status

func (r UpdateZoneResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateZoneResponse) StatusCode

func (r UpdateZoneResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateZoneResponseObject

type UpdateZoneResponseObject interface {
	VisitUpdateZoneResponse(w http.ResponseWriter) error
}

type UpdateZonedefaultApplicationProblemPlusJSONResponse

type UpdateZonedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (UpdateZonedefaultApplicationProblemPlusJSONResponse) VisitUpdateZoneResponse

type Zone

type Zone struct {
	// AutoReverse Whether address records in this zone generate PTRs. Absent inherits the global setting.
	AutoReverse *bool     `json:"autoReverse,omitempty"`
	Comment     *string   `json:"comment,omitempty"`
	CreatedAt   time.Time `json:"createdAt"`

	// DefaultTtl Applied to a record added without one.
	DefaultTtl int64 `json:"defaultTtl"`

	// Disabled A disabled zone is invisible on the wire, not merely marked.
	Disabled bool     `json:"disabled"`
	Id       string   `json:"id"`
	Kind     ZoneKind `json:"kind"`

	// Name The apex, fully qualified.
	Name string `json:"name"`

	// Prefix The network a reverse zone answers for, in CIDR form.
	Prefix *string `json:"prefix,omitempty"`

	// Soa The start-of-authority parameters of a zone (RFC 1035 §3.3.13).
	Soa       SOA       `json:"soa"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Zone defines model for Zone.

type ZoneID

type ZoneID = string

ZoneID defines model for ZoneID.

type ZoneImported

type ZoneImported struct {
	Conflicts    *[]Conflict    `json:"conflicts,omitempty"`
	MissingZones *[]MissingZone `json:"missingZones,omitempty"`

	// Records How many records were written.
	Records int `json:"records"`

	// Skipped Records the file carried that the zone could never answer with, so
	// they were left out. Data rather than an error: whether the source
	// zone meant them is a question for a person.
	Skipped *[]SkippedRecord `json:"skipped,omitempty"`
	Zone    Zone             `json:"zone"`
}

ZoneImported The zone a file produced, and what reading it ran into.

type ZoneKind

type ZoneKind string

ZoneKind defines model for ZoneKind.

const (
	Forward ZoneKind = "forward"
	Reverse ZoneKind = "reverse"
)

Defines values for ZoneKind.

func (ZoneKind) Valid

func (e ZoneKind) Valid() bool

Valid indicates whether the value is a known member of the ZoneKind enum.

type ZonePage

type ZonePage struct {
	Items []Zone `json:"items"`

	// NextCursor Absent once the listing is exhausted.
	NextCursor *string `json:"nextCursor,omitempty"`
}

ZonePage defines model for ZonePage.

Jump to

Keyboard shortcuts

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