1
0
Fork 0

fix: update lego.

This commit is contained in:
Fernandez Ludovic 2019-04-26 11:08:44 +02:00 committed by Traefiker Bot
parent b8b0c8f3e5
commit 8d848c3d60
169 changed files with 12224 additions and 605 deletions

View file

@ -1,28 +1,62 @@
// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package dns provides access to the Google Cloud DNS API.
//
// See https://developers.google.com/cloud-dns
// For product documentation, see: https://developers.google.com/cloud-dns
//
// Creating a client
//
// Usage example:
//
// import "google.golang.org/api/dns/v1"
// ...
// dnsService, err := dns.New(oauthHttpClient)
// ctx := context.Background()
// dnsService, err := dns.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// Other authentication options
//
// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
//
// dnsService, err := dns.NewService(ctx, option.WithScopes(dns.NdevClouddnsReadwriteScope))
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// dnsService, err := dns.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// dnsService, err := dns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package dns // import "google.golang.org/api/dns/v1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
context "golang.org/x/net/context"
ctxhttp "golang.org/x/net/context/ctxhttp"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
"io"
"net/http"
"net/url"
"strconv"
"strings"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
option "google.golang.org/api/option"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
@ -38,7 +72,6 @@ var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "dns:v1"
const apiName = "dns"
@ -60,6 +93,35 @@ const (
NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := option.WithScopes(
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/ndev.clouddns.readonly",
"https://www.googleapis.com/auth/ndev.clouddns.readwrite",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
@ -153,7 +215,13 @@ type ResourceRecordSetsService struct {
s *Service
}
// Change: An atomic update to a collection of ResourceRecordSets.
// Change: A Change represents a set of ResourceRecordSet additions and
// deletions applied atomically to a ManagedZone. ResourceRecordSets
// within a ManagedZone are modified by creating a new Change element in
// the Changes collection. In turn the Changes collection also records
// the past modifications to the ResourceRecordSets in a ManagedZone.
// The current state of the ManagedZone is the sum effect of applying
// all Change elements in the Changes collection in sequence.
type Change struct {
// Additions: Which ResourceRecordSets to add?
Additions []*ResourceRecordSet `json:"additions,omitempty"`
@ -177,7 +245,9 @@ type Change struct {
// (output only). This is in RFC3339 text format.
StartTime string `json:"startTime,omitempty"`
// Status: Status of the operation (output only).
// Status: Status of the operation (output only). A status of "done"
// means that the request to update the authoritative servers has been
// sent, but the servers might not be updated yet.
//
// Possible values:
// "done"
@ -411,11 +481,12 @@ type DnsKeySpec struct {
// KeyLength: Length of the keys in bits.
KeyLength int64 `json:"keyLength,omitempty"`
// KeyType: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type
// KEY_SIGNING have the Secure Entry Point flag set and, when active,
// will be used to sign only resource record sets of type DNSKEY.
// Otherwise, the Secure Entry Point flag will be cleared and this key
// will be used to sign only resource record sets of other types.
// KeyType: Specifies whether this is a key signing key (KSK) or a zone
// signing key (ZSK). Key signing keys have the Secure Entry Point flag
// set and, when active, will only be used to sign resource record sets
// of type DNSKEY. Zone signing keys do not have the Secure Entry Point
// flag set and will be used to sign all other types of resource record
// sets.
//
// Possible values:
// "keySigning"
@ -546,6 +617,19 @@ type ManagedZone struct {
// servers; defined by the server (output only)
NameServers []string `json:"nameServers,omitempty"`
// PrivateVisibilityConfig: For privately visible zones, the set of
// Virtual Private Cloud resources that the zone is visible from.
PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"`
// Visibility: The zone's visibility: public zones are exposed to the
// Internet, while private zones are visible only to Virtual Private
// Cloud resources.
//
// Possible values:
// "private"
// "public"
Visibility string `json:"visibility,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
@ -672,6 +756,70 @@ func (s *ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ManagedZonePrivateVisibilityConfig struct {
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "dns#managedZonePrivateVisibilityConfig".
Kind string `json:"kind,omitempty"`
// Networks: The list of VPC networks that can see this zone.
Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ManagedZonePrivateVisibilityConfig) MarshalJSON() ([]byte, error) {
type NoMethod ManagedZonePrivateVisibilityConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ManagedZonePrivateVisibilityConfigNetwork struct {
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "dns#managedZonePrivateVisibilityConfigNetwork".
Kind string `json:"kind,omitempty"`
// NetworkUrl: The fully qualified URL of the VPC network to bind to.
// This should be formatted like
// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
NetworkUrl string `json:"networkUrl,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ManagedZonePrivateVisibilityConfigNetwork) MarshalJSON() ([]byte, error) {
type NoMethod ManagedZonePrivateVisibilityConfigNetwork
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ManagedZonesListResponse struct {
Header *ResponseHeader `json:"header,omitempty"`
@ -747,7 +895,9 @@ type Operation struct {
StartTime string `json:"startTime,omitempty"`
// Status: Status of the operation. Can be one of the following:
// "PENDING" or "DONE" (output only).
// "PENDING" or "DONE" (output only). A status of "DONE" means that the
// request to update the authoritative servers has been sent, but the
// servers might not be updated yet.
//
// Possible values:
// "done"
@ -901,10 +1051,6 @@ func (s *Project) MarshalJSON() ([]byte, error) {
// Quota: Limits associated with a Project.
type Quota struct {
// BlackHoleHidesSystemZones: Whether a black hole zone should suppress
// system zones for this project.
BlackHoleHidesSystemZones bool `json:"blackHoleHidesSystemZones,omitempty"`
// DnsKeysPerManagedZone: Maximum allowed number of DnsKeys per
// ManagedZone.
DnsKeysPerManagedZone int64 `json:"dnsKeysPerManagedZone,omitempty"`
@ -916,6 +1062,14 @@ type Quota struct {
// ManagedZones: Maximum allowed number of managed zones in the project.
ManagedZones int64 `json:"managedZones,omitempty"`
// ManagedZonesPerNetwork: Maximum allowed number of managed zones which
// can be attached to a network.
ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"`
// NetworksPerManagedZone: Maximum allowed number of networks to which a
// privately scoped zone can be attached.
NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"`
// ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords
// per ResourceRecordSet.
ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"`
@ -941,21 +1095,21 @@ type Quota struct {
WhitelistedKeySpecs []*DnsKeySpec `json:"whitelistedKeySpecs,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "BlackHoleHidesSystemZones") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// "DnsKeysPerManagedZone") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "BlackHoleHidesSystemZones") to include in API requests with the JSON
// null value. By default, fields with empty values are omitted from API
// requests. However, any field with an empty value appearing in
// NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
// NullFields is a list of field names (e.g. "DnsKeysPerManagedZone") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
@ -976,7 +1130,7 @@ type ResourceRecordSet struct {
Name string `json:"name,omitempty"`
// Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section
// 3.6.1).
// 3.6.1) -- see examples.
Rrdatas []string `json:"rrdatas,omitempty"`
// SignatureRrdatas: As defined in RFC 4034 (section 3.2).
@ -986,8 +1140,8 @@ type ResourceRecordSet struct {
// resolvers.
Ttl int64 `json:"ttl,omitempty"`
// Type: The identifier of a supported record type, for example, A,
// AAAA, MX, TXT, and so on.
// Type: The identifier of a supported record type. See the list of
// Supported DNS record types.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") to
@ -1160,9 +1314,13 @@ func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -1327,9 +1485,13 @@ func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes/{changeId}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -1523,9 +1685,13 @@ func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -1742,9 +1908,13 @@ func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) {
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -1935,9 +2105,13 @@ func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) {
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/dnsKeys")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -2133,9 +2307,13 @@ func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, er
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/operations/{operation}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -2323,9 +2501,13 @@ func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, e
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/operations")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -2520,9 +2702,13 @@ func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -2663,9 +2849,13 @@ func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
req, err := http.NewRequest("DELETE", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -2797,9 +2987,13 @@ func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -2974,9 +3168,13 @@ func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -3155,9 +3353,13 @@ func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) {
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PATCH", urls, body)
req, err := http.NewRequest("PATCH", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -3313,9 +3515,13 @@ func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) {
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PUT", urls, body)
req, err := http.NewRequest("PUT", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -3476,9 +3682,13 @@ func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
@ -3655,9 +3865,13 @@ func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, erro
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/rrsets")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,