From 2f97dc2933d82706661f2d8bf64948f02a3d13b0 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 10 Apr 2019 15:41:22 +0200 Subject: [PATCH] go mod vendor && go mod tidy --- go.mod | 114 +- go.sum | 284 +- .../oneandone-cloudserver-sdk-go/.gitignore | 24 + vendor/github.com/Azure/go-ansiterm/README.md | 12 - .../github.com/Azure/go-ansiterm/constants.go | 188 - .../github.com/Azure/go-ansiterm/context.go | 7 - .../Azure/go-ansiterm/csi_entry_state.go | 49 - .../Azure/go-ansiterm/csi_param_state.go | 38 - .../go-ansiterm/escape_intermediate_state.go | 36 - .../Azure/go-ansiterm/escape_state.go | 47 - .../Azure/go-ansiterm/event_handler.go | 90 - .../Azure/go-ansiterm/ground_state.go | 24 - .../Azure/go-ansiterm/osc_string_state.go | 31 - vendor/github.com/Azure/go-ansiterm/parser.go | 151 - .../go-ansiterm/parser_action_helpers.go | 99 - .../Azure/go-ansiterm/parser_actions.go | 119 - vendor/github.com/Azure/go-ansiterm/states.go | 71 - .../github.com/Azure/go-ansiterm/utilities.go | 21 - .../Azure/go-ansiterm/winterm/ansi.go | 182 - .../Azure/go-ansiterm/winterm/api.go | 327 -- .../go-ansiterm/winterm/attr_translation.go | 100 - .../go-ansiterm/winterm/cursor_helpers.go | 101 - .../go-ansiterm/winterm/erase_helpers.go | 84 - .../go-ansiterm/winterm/scroll_helper.go | 118 - .../Azure/go-ansiterm/winterm/utilities.go | 9 - .../go-ansiterm/winterm/win_event_handler.go | 743 ---- .../github.com/Azure/go-ntlmssp/.travis.yml | 17 + .../ChrisTrenkamp/goxpath/.travis.yml | 16 + .../ChrisTrenkamp/goxpath/coverage.sh | 0 .../Telmate/proxmox-api-go/proxmox/client.go | 597 ---- .../proxmox-api-go/proxmox/config_qemu.go | 706 ---- .../Telmate/proxmox-api-go/proxmox/session.go | 319 -- vendor/github.com/antchfx/xpath/.gitignore | 32 + vendor/github.com/antchfx/xpath/.travis.yml | 12 + .../approvals/go-approval-tests/.gitignore | 25 + .../approvals/go-approval-tests/.travis.yml | 16 + vendor/github.com/armon/go-metrics/.gitignore | 24 + vendor/github.com/armon/go-radix/.gitignore | 22 + vendor/github.com/armon/go-radix/.travis.yml | 3 + vendor/github.com/armon/go-radix/go.mod | 1 + vendor/github.com/armon/go-radix/radix.go | 60 +- .../go-ansiterm => bgentry/go-netrc}/LICENSE | 5 +- .../github.com/bgentry/speakeasy/.gitignore | 2 + vendor/github.com/bgentry/speakeasy/LICENSE | 24 + .../bgentry/speakeasy/example/main.go | 18 - .../github.com/bgentry/speakeasy/speakeasy.go | 14 +- .../bgentry/speakeasy/speakeasy_unix.go | 2 +- .../bgentry/speakeasy/speakeasy_windows.go | 8 +- vendor/github.com/creack/goselect/.gitignore | 29 + .../creack/goselect/test_crosscompile.sh | 0 vendor/github.com/davecgh/go-spew/LICENSE | 2 +- .../github.com/davecgh/go-spew/spew/bypass.go | 187 +- .../davecgh/go-spew/spew/bypasssafe.go | 38 + .../github.com/davecgh/go-spew/spew/common.go | 2 +- .../github.com/davecgh/go-spew/spew/dump.go | 10 +- .../github.com/davecgh/go-spew/spew/format.go | 4 +- .../denverdino/aliyungo/common/client.go | 52 +- .../denverdino/aliyungo/common/endpoint.go | 25 +- .../denverdino/aliyungo/common/endpoints.xml | 11 + .../denverdino/aliyungo/common/regions.go | 13 +- .../denverdino/aliyungo/ecs/client.go | 9 + .../denverdino/aliyungo/ecs/disks.go | 11 +- .../github.com/denverdino/aliyungo/ecs/eni.go | 183 + .../denverdino/aliyungo/ecs/images.go | 28 +- .../denverdino/aliyungo/ecs/instance_types.go | 17 +- .../denverdino/aliyungo/ecs/instances.go | 206 +- .../denverdino/aliyungo/ecs/nat_gateway.go | 19 +- .../denverdino/aliyungo/ecs/networks.go | 41 +- .../denverdino/aliyungo/ecs/route_tables.go | 4 +- .../aliyungo/ecs/router_interface.go | 32 +- .../aliyungo/ecs/security_groups.go | 34 +- .../denverdino/aliyungo/ecs/snapshots.go | 2 + .../denverdino/aliyungo/ecs/snat_entry.go | 2 +- .../denverdino/aliyungo/ecs/ssh_key_pair.go | 10 +- .../denverdino/aliyungo/ecs/vpcs.go | 3 + .../denverdino/aliyungo/ecs/zones.go | 73 +- .../github.com/denverdino/aliyungo/ram/api.go | 3 + .../denverdino/aliyungo/ram/group.go | 2 +- .../denverdino/aliyungo/ram/policy.go | 2 +- .../denverdino/aliyungo/slb/certificates.go | 108 - .../denverdino/aliyungo/slb/client.go | 49 - .../denverdino/aliyungo/slb/listeners.go | 536 --- .../denverdino/aliyungo/slb/loadbalancers.go | 238 -- .../denverdino/aliyungo/slb/regions.go | 34 - .../denverdino/aliyungo/slb/rules.go | 126 - .../denverdino/aliyungo/slb/servers.go | 120 - .../denverdino/aliyungo/slb/tags.go | 85 - .../denverdino/aliyungo/slb/vserver_group.go | 159 - .../denverdino/aliyungo/util/encoding.go | 33 +- .../denverdino/aliyungo/util/signature.go | 1 - .../denverdino/aliyungo/util/util.go | 38 + vendor/github.com/dgrijalva/jwt-go/.gitignore | 4 + .../github.com/dgrijalva/jwt-go/.travis.yml | 13 + .../github.com/digitalocean/godo/.gitignore | 1 + .../github.com/digitalocean/godo/.travis.yml | 8 + .../github.com/digitalocean/godo/CHANGELOG.md | 48 + .../digitalocean/godo/CONTRIBUTING.md | 24 + vendor/github.com/digitalocean/godo/cdn.go | 45 +- .../github.com/digitalocean/godo/databases.go | 618 ++++ vendor/github.com/digitalocean/godo/doc.go | 9 + .../github.com/digitalocean/godo/domains.go | 8 +- .../github.com/digitalocean/godo/droplets.go | 3 + vendor/github.com/digitalocean/godo/godo.go | 26 +- .../digitalocean/godo/kubernetes.go | 62 +- .../digitalocean/godo/load_balancers.go | 10 + .../github.com/digitalocean/godo/projects.go | 6 +- .../github.com/digitalocean/godo/storage.go | 16 +- vendor/github.com/digitalocean/godo/tags.go | 15 +- vendor/github.com/digitalocean/godo/vpcs.go | 183 + vendor/github.com/docker/docker/AUTHORS | 1952 +++++++++++ .../pkg/namesgenerator/names-generator.go | 49 +- .../docker/docker/pkg/random/random.go | 71 - .../docker/pkg/term/windows/ansi_reader.go | 263 -- .../docker/pkg/term/windows/ansi_writer.go | 64 - .../docker/docker/pkg/term/windows/console.go | 35 - .../docker/docker/pkg/term/windows/windows.go | 33 - .../github.com/dustin/go-humanize/.travis.yml | 21 + .../dustin/go-humanize/README.markdown | 32 + vendor/github.com/dustin/go-humanize/comma.go | 10 +- vendor/github.com/dustin/go-humanize/ftoa.go | 25 +- vendor/github.com/dustin/go-humanize/si.go | 10 + vendor/github.com/dustin/go-humanize/times.go | 2 +- .../github.com/dylanmei/winrmtest/.gitignore | 1 + vendor/github.com/fatih/color/.travis.yml | 5 + vendor/github.com/fatih/color/Gopkg.lock | 27 + vendor/github.com/fatih/color/Gopkg.toml | 30 + vendor/github.com/fatih/color/LICENSE.md | 20 + vendor/github.com/fatih/color/README.md | 179 + vendor/github.com/fatih/color/color.go | 603 ++++ vendor/github.com/fatih/color/doc.go | 133 + vendor/github.com/go-ini/ini/.gitignore | 5 + vendor/github.com/go-ini/ini/.travis.yml | 17 + vendor/github.com/go-ini/ini/Makefile | 12 + vendor/github.com/go-ini/ini/README.md | 174 +- vendor/github.com/go-ini/ini/README_ZH.md | 178 +- vendor/github.com/go-ini/ini/error.go | 32 + vendor/github.com/go-ini/ini/ini.go | 794 +---- vendor/github.com/go-ini/ini/key.go | 703 ++++ vendor/github.com/go-ini/ini/parser.go | 76 +- vendor/github.com/go-ini/ini/section.go | 234 ++ vendor/github.com/go-ini/ini/struct.go | 209 +- vendor/github.com/gofrs/flock/README.md | 1 + vendor/github.com/gofrs/flock/flock.go | 10 +- vendor/github.com/golang/snappy/.gitignore | 16 + .../github.com/google/go-cmp/cmp/compare.go | 50 +- .../go-cmp/cmp/internal/value/format.go | 55 +- .../cmp/internal/value/pointer_purego.go | 23 - .../cmp/internal/value/pointer_unsafe.go | 26 - .../github.com/google/go-cmp/cmp/options.go | 3 - .../google/go-cmp/cmp/unsafe_panic.go | 15 + .../google/go-querystring/query/encode.go | 27 +- vendor/github.com/google/uuid/.travis.yml | 9 + vendor/github.com/google/uuid/README.md | 4 - vendor/github.com/google/uuid/marshal.go | 2 - vendor/github.com/google/uuid/node.go | 1 - .../gophercloud/gophercloud/.gitignore | 3 + .../gophercloud/gophercloud/.travis.yml | 21 + .../gophercloud/gophercloud/.zuul.yaml | 86 + .../gophercloud/openstack/auth_env.go | 31 +- .../blockstorage/v3/volumes/requests.go | 7 +- .../gophercloud/openstack/client.go | 19 + .../openstack/common/extensions/doc.go | 15 - .../openstack/common/extensions/errors.go | 1 - .../openstack/common/extensions/requests.go | 20 - .../openstack/common/extensions/results.go | 53 - .../openstack/common/extensions/urls.go | 13 - .../extensions/attachinterfaces/requests.go | 2 +- .../v2/extensions/attachinterfaces/results.go | 4 +- .../v2/extensions/bootfromvolume/requests.go | 8 + .../compute/v2/extensions/delegate.go | 23 - .../openstack/compute/v2/extensions/doc.go | 3 - .../compute/v2/extensions/floatingips/doc.go | 68 - .../v2/extensions/floatingips/requests.go | 114 - .../v2/extensions/floatingips/results.go | 115 - .../compute/v2/extensions/floatingips/urls.go | 37 - .../openstack/compute/v2/flavors/requests.go | 8 + .../openstack/compute/v2/flavors/results.go | 2 +- .../openstack/compute/v2/servers/requests.go | 73 +- .../openstack/compute/v2/servers/results.go | 30 +- .../openstack/identity/v3/tokens/requests.go | 23 +- .../imageservice/v2/images/requests.go | 45 +- .../imageservice/v2/images/results.go | 8 +- .../openstack/imageservice/v2/images/urls.go | 22 +- .../networking/v2/networks/requests.go | 7 +- .../openstack/utils/base_endpoint.go | 15 +- .../gophercloud/pagination/pager.go | 32 +- .../github.com/gorilla/websocket/.gitignore | 25 + .../github.com/gorilla/websocket/.travis.yml | 19 + .../github.com/gorilla/websocket/mask_safe.go | 15 + vendor/github.com/hashicorp/consul/api/acl.go | 419 ++- .../github.com/hashicorp/consul/api/agent.go | 129 +- vendor/github.com/hashicorp/consul/api/api.go | 62 +- .../hashicorp/consul/api/catalog.go | 45 +- .../github.com/hashicorp/consul/api/debug.go | 106 + .../github.com/hashicorp/consul/api/health.go | 28 +- .../hashicorp/consul/api/operator_area.go | 3 +- vendor/github.com/hashicorp/errwrap/README.md | 2 +- vendor/github.com/hashicorp/errwrap/go.mod | 1 + .../hashicorp/go-immutable-radix/go.mod | 6 + .../hashicorp/go-immutable-radix/go.sum | 4 + .../hashicorp/go-multierror/.travis.yml | 12 + .../hashicorp/go-multierror/Makefile | 31 + .../hashicorp/go-multierror/README.md | 6 + .../hashicorp/go-multierror/append.go | 8 +- .../hashicorp/go-multierror/format.go | 8 +- .../github.com/hashicorp/go-multierror/go.mod | 3 + .../github.com/hashicorp/go-multierror/go.sum | 4 + .../hashicorp/go-multierror/multierror.go | 4 +- .../hashicorp/go-multierror/sort.go | 16 + .../hashicorp/go-retryablehttp/client.go | 36 +- .../hashicorp/go-retryablehttp/go.mod | 3 + .../hashicorp/go-retryablehttp/go.sum | 2 + .../github.com/hashicorp/go-sockaddr/go.mod | 1 + vendor/github.com/hashicorp/go-uuid/README.md | 2 +- vendor/github.com/hashicorp/go-uuid/go.mod | 1 + vendor/github.com/hashicorp/go-uuid/uuid.go | 24 +- .../golang-lru/simplelru/lru_interface.go | 45 +- vendor/github.com/hashicorp/hcl/go.mod | 3 + vendor/github.com/hashicorp/hcl/go.sum | 2 + .../hashicorp/vault/api/auth_token.go | 58 +- .../github.com/hashicorp/vault/api/client.go | 146 +- vendor/github.com/hashicorp/vault/api/help.go | 6 +- .../github.com/hashicorp/vault/api/logical.go | 43 +- .../hashicorp/vault/api/output_string.go | 71 + .../github.com/hashicorp/vault/api/request.go | 4 +- .../github.com/hashicorp/vault/api/secret.go | 1 + vendor/github.com/hashicorp/vault/api/ssh.go | 13 +- .../hashicorp/vault/api/ssh_agent.go | 11 +- .../hashicorp/vault/api/sys_audit.go | 87 +- .../hashicorp/vault/api/sys_auth.go | 89 +- .../hashicorp/vault/api/sys_capabilities.go | 45 +- .../hashicorp/vault/api/sys_config_cors.go | 73 +- .../hashicorp/vault/api/sys_generate_root.go | 22 +- .../hashicorp/vault/api/sys_health.go | 10 +- .../hashicorp/vault/api/sys_init.go | 11 +- .../hashicorp/vault/api/sys_leader.go | 18 +- .../hashicorp/vault/api/sys_leases.go | 28 +- .../hashicorp/vault/api/sys_mounts.go | 82 +- .../hashicorp/vault/api/sys_plugins.go | 163 +- .../hashicorp/vault/api/sys_policy.go | 78 +- .../hashicorp/vault/api/sys_rekey.go | 125 +- .../hashicorp/vault/api/sys_rotate.go | 59 +- .../hashicorp/vault/api/sys_seal.go | 28 +- .../hashicorp/vault/api/sys_stepdown.go | 11 +- .../vault/helper/compressutil/compress.go | 75 +- .../hashicorp/vault/helper/consts/agent.go | 5 + .../hashicorp/vault/helper/consts/consts.go | 14 + .../hashicorp/vault/helper/consts/error.go | 16 + .../vault/helper/consts/plugin_types.go | 59 + .../vault/helper/consts/replication.go | 150 + .../vault/helper/parseutil/parseutil.go | 4 + .../hashicorp/vault/helper/strutil/strutil.go | 138 +- vendor/github.com/hashicorp/yamux/go.mod | 1 + vendor/github.com/hashicorp/yamux/mux.go | 13 +- vendor/github.com/hashicorp/yamux/session.go | 7 +- .../github.com/hetznercloud/hcloud-go/LICENSE | 0 .../hetznercloud/hcloud-go/hcloud/action.go | 0 .../hetznercloud/hcloud-go/hcloud/client.go | 0 .../hcloud-go/hcloud/datacenter.go | 0 .../hetznercloud/hcloud-go/hcloud/error.go | 18 +- .../hcloud-go/hcloud/floating_ip.go | 0 .../hetznercloud/hcloud-go/hcloud/hcloud.go | 2 +- .../hetznercloud/hcloud-go/hcloud/helper.go | 0 .../hetznercloud/hcloud-go/hcloud/image.go | 0 .../hetznercloud/hcloud-go/hcloud/iso.go | 0 .../hetznercloud/hcloud-go/hcloud/location.go | 0 .../hetznercloud/hcloud-go/hcloud/pricing.go | 0 .../hetznercloud/hcloud-go/hcloud/schema.go | 0 .../hcloud-go/hcloud/schema/action.go | 0 .../hcloud-go/hcloud/schema/datacenter.go | 0 .../hcloud-go/hcloud/schema/error.go | 0 .../hcloud-go/hcloud/schema/floating_ip.go | 0 .../hcloud-go/hcloud/schema/image.go | 0 .../hcloud-go/hcloud/schema/iso.go | 0 .../hcloud-go/hcloud/schema/location.go | 0 .../hcloud-go/hcloud/schema/meta.go | 0 .../hcloud-go/hcloud/schema/pricing.go | 0 .../hcloud-go/hcloud/schema/server.go | 2 + .../hcloud-go/hcloud/schema/server_type.go | 0 .../hcloud-go/hcloud/schema/ssh_key.go | 0 .../hcloud-go/hcloud/schema/volume.go | 15 +- .../hetznercloud/hcloud-go/hcloud/server.go | 7 + .../hcloud-go/hcloud/server_type.go | 0 .../hetznercloud/hcloud-go/hcloud/ssh_key.go | 0 .../hetznercloud/hcloud-go/hcloud/volume.go | 41 +- vendor/github.com/joyent/triton-go/.gitignore | 17 + .../github.com/joyent/triton-go/.travis.yml | 19 + vendor/github.com/klauspost/cpuid/.gitignore | 24 + vendor/github.com/klauspost/cpuid/.travis.yml | 7 + vendor/github.com/klauspost/crc32/.gitignore | 24 + vendor/github.com/klauspost/crc32/.travis.yml | 11 + vendor/github.com/klauspost/pgzip/.gitignore | 24 + vendor/github.com/klauspost/pgzip/.travis.yml | 13 + .../go-windows-terminal-sequences/LICENSE | 9 + .../go-windows-terminal-sequences/README.md | 40 + .../go-windows-terminal-sequences/go.mod | 1 + .../sequences.go | 36 + vendor/github.com/marstr/guid/.travis.yml | 18 + vendor/github.com/masterzen/winrm/.gitignore | 28 + vendor/github.com/masterzen/winrm/.travis.yml | 28 + .../github.com/mattn/go-colorable/.travis.yml | 9 + .../objx => mattn/go-colorable}/LICENSE | 5 +- .../github.com/mattn/go-colorable/README.md | 48 + .../mattn/go-colorable/colorable_appengine.go | 29 + .../mattn/go-colorable/colorable_others.go | 30 + .../mattn/go-colorable/colorable_windows.go | 884 +++++ .../mattn/go-colorable/noncolorable.go | 55 + vendor/github.com/mattn/go-tty/tty_windows.go | 31 + vendor/github.com/mitchellh/cli/.travis.yml | 14 + vendor/github.com/mitchellh/cli/cli.go | 29 +- vendor/github.com/mitchellh/cli/go.mod | 12 + vendor/github.com/mitchellh/cli/go.sum | 22 + vendor/github.com/mitchellh/cli/ui_colored.go | 32 +- .../mitchellh/mapstructure/.travis.yml | 8 + .../mitchellh/reflectwalk/.travis.yml | 1 + .../github.com/mitchellh/reflectwalk/go.mod | 1 + .../mitchellh/reflectwalk/location.go | 2 + .../mitchellh/reflectwalk/location_string.go | 8 +- .../mitchellh/reflectwalk/reflectwalk.go | 184 +- vendor/github.com/moul/anonuuid/.gitignore | 28 + vendor/github.com/moul/anonuuid/.godir | 1 + vendor/github.com/moul/anonuuid/.goxc.json | 12 + vendor/github.com/moul/anonuuid/.travis.yml | 30 + .../github.com/moul/gotty-client/.gitignore | 27 + .../github.com/moul/gotty-client/.goxc.json | 13 + .../github.com/moul/gotty-client/.travis.yml | 14 + vendor/github.com/nu7hatch/gouuid/.gitignore | 11 + .../olekukonko/tablewriter/.travis.yml | 12 + .../github.com/oracle/oci-go-sdk/CHANGELOG.md | 117 - .../oracle/oci-go-sdk/CONTRIBUTING.md | 24 - vendor/github.com/oracle/oci-go-sdk/Makefile | 62 - vendor/github.com/oracle/oci-go-sdk/README.md | 153 - .../oracle/oci-go-sdk/audit/audit_client.go | 176 - .../oracle/oci-go-sdk/audit/audit_event.go | 82 - .../oracle/oci-go-sdk/audit/configuration.go | 24 - .../get_configuration_request_response.go | 57 - .../audit/list_events_request_response.go | 79 - .../audit/update_configuration_details.go | 24 - .../update_configuration_request_response.go | 64 - .../oci-go-sdk/cmd/genver/version_template.go | 40 - .../common/auth/certificate_retriever.go | 158 - .../oci-go-sdk/common/auth/configuration.go | 61 - .../common/auth/federation_client.go | 292 -- .../auth/instance_principal_key_provider.go | 100 - .../oracle/oci-go-sdk/common/auth/jwt.go | 61 - .../oracle/oci-go-sdk/common/auth/utils.go | 64 - .../containerengine/add_on_options.go | 27 - .../oci-go-sdk/containerengine/cluster.go | 85 - .../containerengine/cluster_create_options.go | 30 - .../containerengine/cluster_endpoints.go | 24 - .../cluster_lifecycle_state.go | 21 - .../containerengine/cluster_metadata.go | 48 - .../containerengine/cluster_options.go | 24 - .../containerengine/cluster_summary.go | 85 - .../containerengine/containerengine_client.go | 761 ---- .../containerengine/create_cluster_details.go | 36 - ...eate_cluster_kubeconfig_content_details.go | 27 - .../create_cluster_request_response.go | 64 - .../create_kubeconfig_request_response.go | 65 - .../create_node_pool_details.go | 51 - .../create_node_pool_request_response.go | 64 - .../delete_cluster_request_response.go | 65 - .../delete_node_pool_request_response.go | 65 - .../delete_work_request_request_response.go | 63 - .../get_cluster_options_request_response.go | 61 - .../get_cluster_request_response.go | 64 - .../get_node_pool_options_request_response.go | 61 - .../get_node_pool_request_response.go | 64 - .../get_work_request_request_response.go | 67 - .../oci-go-sdk/containerengine/key_value.go | 27 - .../kubernetes_network_config.go | 27 - .../list_clusters_request_response.go | 163 - .../list_node_pools_request_response.go | 132 - ...st_work_request_errors_request_response.go | 64 - ...list_work_request_logs_request_response.go | 64 - .../list_work_requests_request_response.go | 198 -- .../oracle/oci-go-sdk/containerengine/node.go | 81 - .../oci-go-sdk/containerengine/node_error.go | 33 - .../oci-go-sdk/containerengine/node_pool.go | 60 - .../containerengine/node_pool_options.go | 30 - .../containerengine/node_pool_summary.go | 57 - .../oci-go-sdk/containerengine/sort_order.go | 21 - .../containerengine/update_cluster_details.go | 27 - .../update_cluster_request_response.go | 68 - .../update_node_pool_details.go | 36 - .../update_node_pool_request_response.go | 68 - .../containerengine/work_request.go | 109 - .../containerengine/work_request_error.go | 30 - .../containerengine/work_request_log_entry.go | 27 - .../work_request_operation_type.go | 21 - .../containerengine/work_request_resource.go | 64 - .../containerengine/work_request_status.go | 21 - .../containerengine/work_request_summary.go | 109 - .../oracle/oci-go-sdk/database/backup.go | 112 - .../oci-go-sdk/database/backup_summary.go | 112 - .../database/create_backup_details.go | 27 - .../create_backup_request_response.go | 71 - .../create_data_guard_association_details.go | 158 - ...data_guard_association_request_response.go | 74 - ...sociation_to_existing_db_system_details.go | 79 - .../database/create_database_details.go | 76 - .../create_database_from_backup_details.go | 30 - .../database/create_db_home_details.go | 28 - .../create_db_home_from_backup_details.go | 25 - .../create_db_home_request_response.go | 71 - .../create_db_home_with_db_system_id_base.go | 80 - ...reate_db_home_with_db_system_id_details.go | 57 - ...e_with_db_system_id_from_backup_details.go | 54 - .../database/data_guard_association.go | 211 -- .../data_guard_association_summary.go | 211 -- .../oracle/oci-go-sdk/database/database.go | 105 - .../oci-go-sdk/database/database_client.go | 1530 -------- .../oci-go-sdk/database/database_summary.go | 105 - .../oci-go-sdk/database/db_backup_config.go | 25 - .../oracle/oci-go-sdk/database/db_home.go | 82 - .../oci-go-sdk/database/db_home_summary.go | 82 - .../oracle/oci-go-sdk/database/db_node.go | 83 - .../db_node_action_request_response.go | 106 - .../oci-go-sdk/database/db_node_summary.go | 83 - .../oracle/oci-go-sdk/database/db_system.go | 246 -- .../database/db_system_shape_summary.go | 46 - .../oci-go-sdk/database/db_system_summary.go | 246 -- .../oci-go-sdk/database/db_version_summary.go | 28 - .../delete_backup_request_response.go | 63 - .../delete_db_home_request_response.go | 66 - ...failover_data_guard_association_details.go | 24 - ...data_guard_association_request_response.go | 75 - .../database/get_backup_request_response.go | 64 - ...data_guard_association_request_response.go | 67 - .../database/get_database_request_response.go | 64 - ...me_patch_history_entry_request_response.go | 67 - .../get_db_home_patch_request_response.go | 64 - .../database/get_db_home_request_response.go | 64 - .../database/get_db_node_request_response.go | 64 - ...em_patch_history_entry_request_response.go | 67 - .../get_db_system_patch_request_response.go | 64 - .../get_db_system_request_response.go | 64 - .../database/launch_db_system_base.go | 245 -- .../database/launch_db_system_details.go | 276 -- .../launch_db_system_from_backup_details.go | 276 -- .../launch_db_system_request_response.go | 71 - .../database/list_backups_request_response.go | 76 - ...ata_guard_associations_request_response.go | 73 - .../list_databases_request_response.go | 76 - ..._patch_history_entries_request_response.go | 73 - .../list_db_home_patches_request_response.go | 73 - .../list_db_homes_request_response.go | 76 - .../list_db_nodes_request_response.go | 76 - ..._patch_history_entries_request_response.go | 73 - ...list_db_system_patches_request_response.go | 73 - .../list_db_system_shapes_request_response.go | 76 - .../list_db_systems_request_response.go | 76 - .../list_db_versions_request_response.go | 79 - .../oracle/oci-go-sdk/database/patch.go | 122 - .../oci-go-sdk/database/patch_details.go | 52 - .../database/patch_history_entry.go | 91 - .../database/patch_history_entry_summary.go | 91 - .../oci-go-sdk/database/patch_summary.go | 122 - ...einstate_data_guard_association_details.go | 24 - ...data_guard_association_request_response.go | 75 - .../database/restore_database_details.go | 30 - .../restore_database_request_response.go | 72 - ...itchover_data_guard_association_details.go | 24 - ...data_guard_association_request_response.go | 75 - .../terminate_db_system_request_response.go | 63 - .../database/update_database_details.go | 32 - .../update_database_request_response.go | 72 - .../database/update_db_home_details.go | 22 - .../update_db_home_request_response.go | 72 - .../database/update_db_system_details.go | 42 - .../update_db_system_request_response.go | 72 - .../oci-go-sdk/dns/create_zone_details.go | 56 - .../dns/create_zone_request_response.go | 69 - .../delete_domain_records_request_response.go | 79 - .../dns/delete_r_r_set_request_response.go | 82 - .../dns/delete_zone_request_response.go | 76 - .../oracle/oci-go-sdk/dns/dns_client.go | 707 ---- .../oracle/oci-go-sdk/dns/external_master.go | 29 - .../get_domain_records_request_response.go | 159 - .../dns/get_r_r_set_request_response.go | 106 - .../dns/get_zone_records_request_response.go | 166 - .../dns/get_zone_request_response.go | 81 - .../dns/list_zones_request_response.go | 206 -- .../dns/patch_domain_records_details.go | 22 - .../patch_domain_records_request_response.go | 99 - .../dns/patch_r_r_set_request_response.go | 102 - .../oci-go-sdk/dns/patch_rr_set_details.go | 22 - .../dns/patch_zone_records_details.go | 22 - .../patch_zone_records_request_response.go | 96 - .../oracle/oci-go-sdk/dns/record.go | 46 - .../oci-go-sdk/dns/record_collection.go | 22 - .../oracle/oci-go-sdk/dns/record_details.go | 46 - .../oracle/oci-go-sdk/dns/record_operation.go | 89 - .../oracle/oci-go-sdk/dns/rr_set.go | 23 - .../oracle/oci-go-sdk/dns/sort_order.go | 21 - .../github.com/oracle/oci-go-sdk/dns/tsig.go | 32 - .../dns/update_domain_records_details.go | 22 - .../update_domain_records_request_response.go | 99 - .../dns/update_r_r_set_request_response.go | 102 - .../oci-go-sdk/dns/update_rr_set_details.go | 22 - .../oci-go-sdk/dns/update_zone_details.go | 24 - .../dns/update_zone_records_details.go | 22 - .../update_zone_records_request_response.go | 96 - .../dns/update_zone_request_response.go | 86 - .../github.com/oracle/oci-go-sdk/dns/zone.go | 107 - .../oracle/oci-go-sdk/dns/zone_summary.go | 72 - .../oci-go-sdk/email/create_sender_details.go | 27 - .../email/create_sender_request_response.go | 62 - .../email/create_suppression_details.go | 29 - .../create_suppression_request_response.go | 60 - .../email/delete_sender_request_response.go | 59 - .../delete_suppression_request_response.go | 59 - .../oracle/oci-go-sdk/email/email_client.go | 376 -- .../email/get_sender_request_response.go | 62 - .../email/get_suppression_request_response.go | 60 - .../email/list_senders_request_response.go | 140 - .../list_suppressions_request_response.go | 151 - .../oracle/oci-go-sdk/email/sender.go | 65 - .../oracle/oci-go-sdk/email/sender_summary.go | 61 - .../oracle/oci-go-sdk/email/suppression.go | 65 - .../oci-go-sdk/email/suppression_summary.go | 66 - .../oracle/oci-go-sdk/example/helpers/args.go | 41 - .../oci-go-sdk/example/helpers/helper.go | 153 - .../filestorage/create_export_details.go | 32 - .../create_export_request_response.go | 72 - .../filestorage/create_file_system_details.go | 33 - .../create_file_system_request_response.go | 72 - .../create_mount_target_details.go | 54 - .../create_mount_target_request_response.go | 72 - .../filestorage/create_snapshot_details.go | 31 - .../create_snapshot_request_response.go | 72 - .../delete_export_request_response.go | 66 - .../delete_file_system_request_response.go | 66 - .../delete_mount_target_request_response.go | 66 - .../delete_snapshot_request_response.go | 66 - .../oracle/oci-go-sdk/filestorage/export.go | 92 - .../oci-go-sdk/filestorage/export_set.go | 98 - .../filestorage/export_set_summary.go | 75 - .../oci-go-sdk/filestorage/export_summary.go | 70 - .../oci-go-sdk/filestorage/file_system.go | 86 - .../filestorage/file_system_summary.go | 78 - .../filestorage/filestorage_client.go | 934 ----- .../get_export_request_response.go | 65 - .../get_export_set_request_response.go | 65 - .../get_file_system_request_response.go | 65 - .../get_mount_target_request_response.go | 65 - .../get_snapshot_request_response.go | 65 - .../list_export_sets_request_response.go | 177 - .../list_exports_request_response.go | 175 - .../list_file_systems_request_response.go | 177 - .../list_mount_targets_request_response.go | 180 - .../list_snapshots_request_response.go | 140 - .../oci-go-sdk/filestorage/mount_target.go | 90 - .../filestorage/mount_target_summary.go | 85 - .../oracle/oci-go-sdk/filestorage/snapshot.go | 68 - .../filestorage/snapshot_summary.go | 68 - .../filestorage/update_export_set_details.go | 48 - .../update_export_set_request_response.go | 75 - .../filestorage/update_file_system_details.go | 26 - .../update_file_system_request_response.go | 75 - .../update_mount_target_details.go | 26 - .../update_mount_target_request_response.go | 75 - .../identity/add_user_to_group_details.go | 27 - .../add_user_to_group_request_response.go | 71 - .../oracle/oci-go-sdk/identity/api_key.go | 80 - .../oracle/oci-go-sdk/identity/auth_token.go | 85 - .../identity/availability_domain.go | 29 - .../oracle/oci-go-sdk/identity/compartment.go | 97 - .../identity/create_api_key_details.go | 24 - .../identity/create_auth_token_details.go | 24 - .../create_auth_token_request_response.go | 74 - .../identity/create_compartment_details.go | 41 - .../create_compartment_request_response.go | 71 - .../create_customer_secret_key_details.go | 24 - ...te_customer_secret_key_request_response.go | 74 - .../identity/create_dynamic_group_details.go | 35 - .../create_dynamic_group_request_response.go | 71 - .../identity/create_group_details.go | 41 - .../identity/create_group_request_response.go | 71 - .../create_identity_provider_details.go | 149 - ...eate_identity_provider_request_response.go | 71 - .../create_idp_group_mapping_details.go | 28 - ...eate_idp_group_mapping_request_response.go | 74 - ..._or_reset_u_i_password_request_response.go | 71 - .../identity/create_policy_details.go | 51 - .../create_policy_request_response.go | 71 - .../create_region_subscription_details.go | 30 - ...te_region_subscription_request_response.go | 71 - .../create_saml2_identity_provider_details.go | 101 - .../create_smtp_credential_details.go | 24 - ...create_smtp_credential_request_response.go | 74 - .../identity/create_swift_password_details.go | 24 - .../create_swift_password_request_response.go | 74 - .../oci-go-sdk/identity/create_tag_details.go | 37 - .../identity/create_tag_namespace_details.go | 40 - .../create_tag_namespace_request_response.go | 68 - .../identity/create_tag_request_response.go | 71 - .../identity/create_user_details.go | 41 - .../identity/create_user_request_response.go | 71 - .../identity/customer_secret_key.go | 82 - .../identity/customer_secret_key_summary.go | 76 - .../delete_api_key_request_response.go | 66 - .../delete_auth_token_request_response.go | 66 - ...te_customer_secret_key_request_response.go | 66 - .../delete_dynamic_group_request_response.go | 63 - .../identity/delete_group_request_response.go | 63 - ...lete_identity_provider_request_response.go | 63 - ...lete_idp_group_mapping_request_response.go | 66 - .../delete_policy_request_response.go | 63 - ...delete_smtp_credential_request_response.go | 66 - .../delete_swift_password_request_response.go | 66 - .../identity/delete_user_request_response.go | 63 - .../oci-go-sdk/identity/dynamic_group.go | 85 - .../get_compartment_request_response.go | 64 - .../get_dynamic_group_request_response.go | 64 - .../identity/get_group_request_response.go | 64 - .../get_identity_provider_request_response.go | 64 - .../get_idp_group_mapping_request_response.go | 67 - .../identity/get_policy_request_response.go | 64 - .../get_tag_namespace_request_response.go | 61 - .../identity/get_tag_request_response.go | 64 - .../identity/get_tenancy_request_response.go | 61 - ..._user_group_membership_request_response.go | 64 - .../identity/get_user_request_response.go | 64 - .../oracle/oci-go-sdk/identity/group.go | 94 - .../oci-go-sdk/identity/identity_client.go | 3092 ----------------- .../oci-go-sdk/identity/identity_provider.go | 209 -- .../oci-go-sdk/identity/idp_group_mapping.go | 84 - .../list_api_keys_request_response.go | 66 - .../list_auth_tokens_request_response.go | 66 - ...t_availability_domains_request_response.go | 66 - .../list_compartments_request_response.go | 72 - ...t_customer_secret_keys_request_response.go | 66 - .../list_dynamic_groups_request_response.go | 72 - .../identity/list_groups_request_response.go | 72 - ...ist_identity_providers_request_response.go | 96 - ...ist_idp_group_mappings_request_response.go | 72 - .../list_policies_request_response.go | 72 - ...t_region_subscriptions_request_response.go | 61 - .../identity/list_regions_request_response.go | 58 - .../list_smtp_credentials_request_response.go | 66 - .../list_swift_passwords_request_response.go | 66 - .../list_tag_namespaces_request_response.go | 76 - .../identity/list_tags_request_response.go | 72 - ...user_group_memberships_request_response.go | 78 - .../identity/list_users_request_response.go | 72 - .../oracle/oci-go-sdk/identity/policy.go | 101 - .../oracle/oci-go-sdk/identity/region.go | 42 - .../identity/region_subscription.go | 70 - ...remove_user_from_group_request_response.go | 63 - .../identity/saml2_identity_provider.go | 147 - .../oci-go-sdk/identity/smtp_credential.go | 86 - .../identity/smtp_credential_summary.go | 80 - .../oci-go-sdk/identity/swift_password.go | 84 - .../oracle/oci-go-sdk/identity/tag.go | 59 - .../oci-go-sdk/identity/tag_namespace.go | 52 - .../identity/tag_namespace_summary.go | 51 - .../oracle/oci-go-sdk/identity/tag_summary.go | 51 - .../oracle/oci-go-sdk/identity/tenancy.go | 55 - .../oracle/oci-go-sdk/identity/ui_password.go | 69 - .../identity/update_auth_token_details.go | 24 - .../update_auth_token_request_response.go | 75 - .../identity/update_compartment_details.go | 38 - .../update_compartment_request_response.go | 72 - .../update_customer_secret_key_details.go | 24 - ...te_customer_secret_key_request_response.go | 75 - .../identity/update_dynamic_group_details.go | 28 - .../update_dynamic_group_request_response.go | 72 - .../identity/update_group_details.go | 34 - .../identity/update_group_request_response.go | 72 - .../update_identity_provider_details.go | 91 - ...date_identity_provider_request_response.go | 72 - .../update_idp_group_mapping_details.go | 27 - ...date_idp_group_mapping_request_response.go | 75 - .../identity/update_policy_details.go | 44 - .../update_policy_request_response.go | 72 - .../update_saml2_identity_provider_details.go | 72 - .../update_smtp_credential_details.go | 24 - ...update_smtp_credential_request_response.go | 75 - .../identity/update_state_details.go | 24 - .../identity/update_swift_password_details.go | 24 - .../update_swift_password_request_response.go | 75 - .../oci-go-sdk/identity/update_tag_details.go | 38 - .../identity/update_tag_namespace_details.go | 38 - .../update_tag_namespace_request_response.go | 64 - .../identity/update_tag_request_response.go | 67 - .../identity/update_user_details.go | 34 - .../identity/update_user_request_response.go | 72 - .../update_user_state_request_response.go | 72 - .../upload_api_key_request_response.go | 74 - .../oracle/oci-go-sdk/identity/user.go | 102 - .../identity/user_group_membership.go | 74 - .../oracle/oci-go-sdk/loadbalancer/backend.go | 57 - .../loadbalancer/backend_details.go | 52 - .../oci-go-sdk/loadbalancer/backend_health.go | 58 - .../oci-go-sdk/loadbalancer/backend_set.go | 41 - .../loadbalancer/backend_set_details.go | 35 - .../loadbalancer/backend_set_health.go | 78 - .../oci-go-sdk/loadbalancer/certificate.go | 51 - .../loadbalancer/certificate_details.go | 65 - .../loadbalancer/connection_configuration.go | 28 - .../loadbalancer/create_backend_details.go | 54 - .../create_backend_request_response.go | 75 - .../create_backend_set_details.go | 41 - .../create_backend_set_request_response.go | 71 - .../create_certificate_details.go | 65 - .../create_certificate_request_response.go | 71 - .../loadbalancer/create_hostname_details.go | 31 - .../create_hostname_request_response.go | 71 - .../loadbalancer/create_listener_details.go | 54 - .../create_listener_request_response.go | 71 - .../create_load_balancer_details.go | 61 - .../create_load_balancer_request_response.go | 68 - .../create_path_route_set_details.go | 29 - .../create_path_route_set_request_response.go | 71 - .../delete_backend_request_response.go | 69 - .../delete_backend_set_request_response.go | 65 - .../delete_certificate_request_response.go | 66 - .../delete_hostname_request_response.go | 65 - .../delete_listener_request_response.go | 65 - .../delete_load_balancer_request_response.go | 61 - .../delete_path_route_set_request_response.go | 65 - .../get_backend_health_request_response.go | 69 - .../get_backend_request_response.go | 69 - ...get_backend_set_health_request_response.go | 65 - .../get_backend_set_request_response.go | 65 - .../get_health_checker_request_response.go | 65 - .../get_hostname_request_response.go | 65 - ...t_load_balancer_health_request_response.go | 61 - .../get_load_balancer_request_response.go | 61 - .../get_path_route_set_request_response.go | 65 - .../get_work_request_request_response.go | 61 - .../loadbalancer/health_check_result.go | 71 - .../oci-go-sdk/loadbalancer/health_checker.go | 57 - .../loadbalancer/health_checker_details.go | 55 - .../oci-go-sdk/loadbalancer/hostname.go | 31 - .../loadbalancer/hostname_details.go | 30 - .../oci-go-sdk/loadbalancer/ip_address.go | 30 - .../list_backend_sets_request_response.go | 61 - .../list_backends_request_response.go | 65 - .../list_certificates_request_response.go | 62 - .../list_hostnames_request_response.go | 62 - ..._load_balancer_healths_request_response.go | 74 - .../list_load_balancers_request_response.go | 139 - .../list_path_route_sets_request_response.go | 62 - .../list_policies_request_response.go | 74 - .../list_protocols_request_response.go | 74 - .../list_shapes_request_response.go | 74 - .../list_work_requests_request_response.go | 74 - .../oci-go-sdk/loadbalancer/listener.go | 53 - .../loadbalancer/listener_details.go | 47 - .../oci-go-sdk/loadbalancer/load_balancer.go | 109 - .../loadbalancer/load_balancer_health.go | 82 - .../load_balancer_health_summary.go | 64 - .../loadbalancer/load_balancer_policy.go | 27 - .../loadbalancer/load_balancer_protocol.go | 25 - .../loadbalancer/load_balancer_shape.go | 28 - .../loadbalancer/loadbalancer_client.go | 1727 --------- .../loadbalancer/path_match_type.go | 59 - .../oci-go-sdk/loadbalancer/path_route.go | 36 - .../oci-go-sdk/loadbalancer/path_route_set.go | 29 - .../loadbalancer/path_route_set_details.go | 24 - ...ssion_persistence_configuration_details.go | 37 - .../loadbalancer/ssl_configuration.go | 36 - .../loadbalancer/ssl_configuration_details.go | 35 - .../loadbalancer/update_backend_details.go | 44 - .../update_backend_request_response.go | 79 - .../update_backend_set_details.go | 35 - .../update_backend_set_request_response.go | 75 - .../update_health_checker_details.go | 54 - .../update_health_checker_request_response.go | 75 - .../loadbalancer/update_hostname_details.go | 28 - .../update_hostname_request_response.go | 69 - .../loadbalancer/update_listener_details.go | 47 - .../update_listener_request_response.go | 75 - .../update_load_balancer_details.go | 26 - .../update_load_balancer_request_response.go | 71 - .../update_path_route_set_details.go | 24 - .../update_path_route_set_request_response.go | 75 - .../oci-go-sdk/loadbalancer/work_request.go | 83 - .../loadbalancer/work_request_error.go | 48 - ...abort_multipart_upload_request_response.go | 71 - .../oracle/oci-go-sdk/objectstorage/bucket.go | 119 - .../objectstorage/bucket_summary.go | 52 - .../commit_multipart_upload_details.go | 30 - .../commit_multipart_upload_part_details.go | 29 - ...ommit_multipart_upload_request_response.go | 95 - .../objectstorage/create_bucket_details.go | 105 - .../create_bucket_request_response.go | 72 - .../create_multipart_upload_details.go | 40 - ...reate_multipart_upload_request_response.go | 81 - ...create_preauthenticated_request_details.go | 60 - ...eauthenticated_request_request_response.go | 70 - .../delete_bucket_request_response.go | 68 - .../delete_object_request_response.go | 75 - ...eauthenticated_request_request_response.go | 68 - .../get_bucket_request_response.go | 84 - ...get_namespace_metadata_request_response.go | 63 - .../get_namespace_request_response.go | 53 - .../get_object_request_response.go | 158 - ...eauthenticated_request_request_response.go | 71 - .../head_bucket_request_response.go | 81 - .../head_object_request_response.go | 147 - .../list_buckets_request_response.go | 104 - ...multipart_upload_parts_request_response.go | 86 - ...list_multipart_uploads_request_response.go | 78 - .../oci-go-sdk/objectstorage/list_objects.go | 34 - .../list_objects_request_response.go | 92 - ...authenticated_requests_request_response.go | 82 - .../objectstorage/multipart_upload.go | 43 - .../multipart_upload_part_summary.go | 36 - .../objectstorage/namespace_metadata.go | 30 - .../objectstorage/object_summary.go | 36 - .../objectstorage/objectstorage_client.go | 1088 ------ .../objectstorage/preauthenticated_request.go | 76 - .../preauthenticated_request_summary.go | 66 - .../put_object_request_response.go | 110 - .../objectstorage/rename_object_details.go | 38 - .../rename_object_request_response.go | 73 - .../objectstorage/restore_objects_details.go | 28 - .../restore_objects_request_response.go | 67 - .../objectstorage/update_bucket_details.go | 77 - .../update_bucket_request_response.go | 77 - .../update_namespace_metadata_details.go | 28 - ...ate_namespace_metadata_request_response.go | 66 - .../upload_part_request_response.go | 101 - vendor/github.com/oracle/oci-go-sdk/oci.go | 260 -- .../github.com/oracle/oci-go-sdk/wercker.yml | 26 - vendor/github.com/pierrec/lz4/.gitignore | 33 + vendor/github.com/pierrec/lz4/.travis.yml | 17 +- vendor/github.com/pierrec/lz4/README.md | 19 +- vendor/github.com/pierrec/lz4/block.go | 452 ++- vendor/github.com/pierrec/lz4/debug.go | 23 + vendor/github.com/pierrec/lz4/debug_stub.go | 7 + .../pierrec/lz4/internal/xxh32/xxh32zero.go | 222 ++ vendor/github.com/pierrec/lz4/lz4.go | 88 +- vendor/github.com/pierrec/lz4/lz4_go1.10.go | 29 + .../github.com/pierrec/lz4/lz4_notgo1.10.go | 29 + vendor/github.com/pierrec/lz4/reader.go | 449 +-- vendor/github.com/pierrec/lz4/writer.go | 409 +-- vendor/github.com/pierrec/xxHash/LICENSE | 28 - .../pierrec/xxHash/xxHash32/xxHash32.go | 205 -- vendor/github.com/pkg/errors/.travis.yml | 10 +- vendor/github.com/pkg/errors/README.md | 4 +- vendor/github.com/pkg/errors/stack.go | 11 +- vendor/github.com/pkg/sftp/.gitignore | 8 + vendor/github.com/pkg/sftp/.travis.yml | 21 + .../examples/buffered-read-benchmark/main.go | 77 - .../examples/buffered-write-benchmark/main.go | 83 - .../pkg/sftp/examples/sftp-server/README.md | 12 - .../pkg/sftp/examples/sftp-server/main.go | 134 - .../examples/streaming-read-benchmark/main.go | 84 - .../streaming-write-benchmark/main.go | 84 - .../pkg/sftp/server_standalone/main.go | 40 - vendor/github.com/posener/complete/.gitignore | 2 + .../github.com/posener/complete/.travis.yml | 17 + vendor/github.com/posener/complete/args.go | 43 +- .../posener/complete/cmd/install/fish.go | 50 + .../posener/complete/cmd/install/install.go | 29 +- .../posener/complete/cmd/install/utils.go | 19 + vendor/github.com/posener/complete/command.go | 17 +- .../github.com/posener/complete/complete.go | 31 +- .../posener/complete/predict_set.go | 11 +- vendor/github.com/posener/complete/readme.md | 5 +- vendor/github.com/posener/complete/test.sh | 0 .../profitbricks-sdk-go/.gitignore | 35 + .../github.com/ryanuber/go-glob/.travis.yml | 5 + vendor/github.com/satori/go.uuid/.travis.yml | 23 + vendor/github.com/satori/go.uuid/LICENSE | 2 +- vendor/github.com/satori/go.uuid/README.md | 2 +- vendor/github.com/satori/go.uuid/codec.go | 206 ++ vendor/github.com/satori/go.uuid/generator.go | 239 ++ vendor/github.com/satori/go.uuid/sql.go | 78 + vendor/github.com/satori/go.uuid/uuid.go | 434 +-- vendor/github.com/satori/uuid/LICENSE | 20 - vendor/github.com/satori/uuid/README.md | 65 - vendor/github.com/satori/uuid/uuid.go | 481 --- .../scaleway-cli/pkg/sshcommand/sshcommand.go | 4 +- vendor/github.com/sirupsen/logrus/.gitignore | 2 + vendor/github.com/sirupsen/logrus/.travis.yml | 51 + .../github.com/sirupsen/logrus/CHANGELOG.md | 42 + vendor/github.com/sirupsen/logrus/README.md | 97 +- vendor/github.com/sirupsen/logrus/entry.go | 196 +- vendor/github.com/sirupsen/logrus/exported.go | 60 +- .../github.com/sirupsen/logrus/formatter.go | 51 +- vendor/github.com/sirupsen/logrus/go.mod | 11 + vendor/github.com/sirupsen/logrus/go.sum | 15 + .../sirupsen/logrus/json_formatter.go | 54 +- vendor/github.com/sirupsen/logrus/logger.go | 152 +- vendor/github.com/sirupsen/logrus/logrus.go | 37 +- .../sirupsen/logrus/terminal_bsd.go | 10 - .../logrus/terminal_check_appengine.go | 2 +- .../sirupsen/logrus/terminal_check_js.go | 11 + .../logrus/terminal_check_notappengine.go | 2 +- .../sirupsen/logrus/terminal_check_windows.go | 20 + .../sirupsen/logrus/terminal_notwindows.go | 8 + .../sirupsen/logrus/terminal_windows.go | 18 + .../sirupsen/logrus/text_formatter.go | 139 +- vendor/github.com/sirupsen/logrus/writer.go | 2 + vendor/github.com/stretchr/objx/Gopkg.lock | 27 - vendor/github.com/stretchr/objx/Gopkg.toml | 3 - vendor/github.com/stretchr/objx/README.md | 78 - vendor/github.com/stretchr/objx/Taskfile.yml | 26 - vendor/github.com/stretchr/objx/accessors.go | 171 - vendor/github.com/stretchr/objx/constants.go | 13 - .../github.com/stretchr/objx/conversions.go | 108 - vendor/github.com/stretchr/objx/doc.go | 66 - vendor/github.com/stretchr/objx/map.go | 193 - vendor/github.com/stretchr/objx/mutations.go | 74 - vendor/github.com/stretchr/objx/security.go | 17 - vendor/github.com/stretchr/objx/tests.go | 17 - .../stretchr/objx/type_specific_codegen.go | 2501 ------------- vendor/github.com/stretchr/objx/value.go | 56 - .../stretchr/testify/Godeps/Godeps.json | 21 - .../github.com/stretchr/testify/Godeps/Readme | 5 - vendor/github.com/stretchr/testify/LICENSE | 35 +- .../stretchr/testify/_codegen/main.go | 287 -- .../testify/assert/assertion_format.go | 139 +- .../testify/assert/assertion_format.go.tmpl | 1 + .../testify/assert/assertion_forward.go | 278 +- .../testify/assert/assertion_forward.go.tmpl | 1 + .../stretchr/testify/assert/assertions.go | 244 +- .../testify/assert/http_assertions.go | 22 +- .../tencentcloud/common/client.go | 10 + .../tencentcloud/common/credentials.go | 52 +- .../tencentcloud/common/http/request.go | 3 +- .../tencentcloud/common/http/response.go | 6 +- .../tencentcloud/cvm/v20170312/client.go | 56 +- .../tencentcloud/cvm/v20170312/models.go | 706 +++- .../tencentcloud/vpc/v20170312/client.go | 239 +- .../tencentcloud/vpc/v20170312/models.go | 1511 +++++++- vendor/github.com/tent/http-link-go/LICENSE | 27 - vendor/github.com/tent/http-link-go/README.md | 12 - vendor/github.com/tent/http-link-go/link.go | 185 - .../ugorji/go/codec/codecgen/README.md | 36 - .../ugorji/go/codec/codecgen/gen.go | 273 -- .../github.com/ugorji/go/codec/codecgen/z.go | 3 - vendor/github.com/ugorji/go/codec/prebuild.sh | 0 vendor/github.com/ugorji/go/codec/test.py | 0 vendor/github.com/ugorji/go/codec/tests.sh | 0 vendor/github.com/vmware/govmomi/.drone.sec | 1 + vendor/github.com/vmware/govmomi/.drone.yml | 17 + vendor/github.com/vmware/govmomi/.gitignore | 1 + vendor/github.com/vmware/govmomi/.mailmap | 17 + vendor/github.com/vmware/govmomi/.travis.yml | 12 + vendor/golang.org/x/crypto/ssh/server.go | 1 + .../golang.org/x/crypto/ssh/terminal/util.go | 4 +- .../x/crypto/ssh/terminal/util_aix.go} | 10 +- .../x/crypto/ssh/terminal/util_plan9.go | 2 +- .../x/crypto/ssh/terminal/util_solaris.go | 2 +- .../x/crypto/ssh/terminal/util_windows.go | 2 +- vendor/gopkg.in/yaml.v2/.travis.yml | 12 + vendor/gopkg.in/yaml.v2/encode.go | 28 + vendor/modules.txt | 527 +++ vendor/vendor.json | 2127 ------------ 955 files changed, 18022 insertions(+), 62676 deletions(-) create mode 100644 vendor/github.com/1and1/oneandone-cloudserver-sdk-go/.gitignore delete mode 100644 vendor/github.com/Azure/go-ansiterm/README.md delete mode 100644 vendor/github.com/Azure/go-ansiterm/constants.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/context.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/csi_entry_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/csi_param_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/escape_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/event_handler.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/ground_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/osc_string_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/parser.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/parser_actions.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/states.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/utilities.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/ansi.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/api.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/utilities.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go create mode 100644 vendor/github.com/Azure/go-ntlmssp/.travis.yml create mode 100644 vendor/github.com/ChrisTrenkamp/goxpath/.travis.yml mode change 100755 => 100644 vendor/github.com/ChrisTrenkamp/goxpath/coverage.sh delete mode 100644 vendor/github.com/Telmate/proxmox-api-go/proxmox/client.go delete mode 100644 vendor/github.com/Telmate/proxmox-api-go/proxmox/config_qemu.go delete mode 100644 vendor/github.com/Telmate/proxmox-api-go/proxmox/session.go create mode 100644 vendor/github.com/antchfx/xpath/.gitignore create mode 100644 vendor/github.com/antchfx/xpath/.travis.yml create mode 100644 vendor/github.com/approvals/go-approval-tests/.gitignore create mode 100644 vendor/github.com/approvals/go-approval-tests/.travis.yml create mode 100644 vendor/github.com/armon/go-metrics/.gitignore create mode 100644 vendor/github.com/armon/go-radix/.gitignore create mode 100644 vendor/github.com/armon/go-radix/.travis.yml create mode 100644 vendor/github.com/armon/go-radix/go.mod rename vendor/github.com/{Azure/go-ansiterm => bgentry/go-netrc}/LICENSE (87%) create mode 100644 vendor/github.com/bgentry/speakeasy/.gitignore create mode 100644 vendor/github.com/bgentry/speakeasy/LICENSE delete mode 100644 vendor/github.com/bgentry/speakeasy/example/main.go create mode 100644 vendor/github.com/creack/goselect/.gitignore mode change 100755 => 100644 vendor/github.com/creack/goselect/test_crosscompile.sh create mode 100644 vendor/github.com/davecgh/go-spew/spew/bypasssafe.go create mode 100644 vendor/github.com/denverdino/aliyungo/ecs/eni.go delete mode 100644 vendor/github.com/denverdino/aliyungo/slb/certificates.go delete mode 100644 vendor/github.com/denverdino/aliyungo/slb/client.go delete mode 100644 vendor/github.com/denverdino/aliyungo/slb/listeners.go delete mode 100644 vendor/github.com/denverdino/aliyungo/slb/loadbalancers.go delete mode 100644 vendor/github.com/denverdino/aliyungo/slb/regions.go delete mode 100644 vendor/github.com/denverdino/aliyungo/slb/rules.go delete mode 100644 vendor/github.com/denverdino/aliyungo/slb/servers.go delete mode 100644 vendor/github.com/denverdino/aliyungo/slb/tags.go delete mode 100644 vendor/github.com/denverdino/aliyungo/slb/vserver_group.go create mode 100644 vendor/github.com/dgrijalva/jwt-go/.gitignore create mode 100644 vendor/github.com/dgrijalva/jwt-go/.travis.yml create mode 100644 vendor/github.com/digitalocean/godo/.gitignore create mode 100644 vendor/github.com/digitalocean/godo/.travis.yml create mode 100644 vendor/github.com/digitalocean/godo/databases.go create mode 100644 vendor/github.com/digitalocean/godo/vpcs.go create mode 100644 vendor/github.com/docker/docker/AUTHORS delete mode 100644 vendor/github.com/docker/docker/pkg/random/random.go delete mode 100644 vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go delete mode 100644 vendor/github.com/docker/docker/pkg/term/windows/ansi_writer.go delete mode 100644 vendor/github.com/docker/docker/pkg/term/windows/console.go delete mode 100644 vendor/github.com/docker/docker/pkg/term/windows/windows.go create mode 100644 vendor/github.com/dustin/go-humanize/.travis.yml create mode 100644 vendor/github.com/dylanmei/winrmtest/.gitignore create mode 100644 vendor/github.com/fatih/color/.travis.yml create mode 100644 vendor/github.com/fatih/color/Gopkg.lock create mode 100644 vendor/github.com/fatih/color/Gopkg.toml create mode 100644 vendor/github.com/fatih/color/LICENSE.md create mode 100644 vendor/github.com/fatih/color/README.md create mode 100644 vendor/github.com/fatih/color/color.go create mode 100644 vendor/github.com/fatih/color/doc.go create mode 100644 vendor/github.com/go-ini/ini/.gitignore create mode 100644 vendor/github.com/go-ini/ini/.travis.yml create mode 100644 vendor/github.com/go-ini/ini/Makefile create mode 100644 vendor/github.com/go-ini/ini/error.go create mode 100644 vendor/github.com/go-ini/ini/key.go create mode 100644 vendor/github.com/go-ini/ini/section.go create mode 100644 vendor/github.com/golang/snappy/.gitignore delete mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go delete mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go create mode 100644 vendor/github.com/google/go-cmp/cmp/unsafe_panic.go create mode 100644 vendor/github.com/google/uuid/.travis.yml create mode 100644 vendor/github.com/gophercloud/gophercloud/.gitignore create mode 100644 vendor/github.com/gophercloud/gophercloud/.travis.yml create mode 100644 vendor/github.com/gophercloud/gophercloud/.zuul.yaml delete mode 100644 vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/doc.go delete mode 100755 vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/errors.go delete mode 100755 vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/requests.go delete mode 100755 vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/results.go delete mode 100644 vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/urls.go delete mode 100644 vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/delegate.go delete mode 100644 vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/doc.go delete mode 100644 vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/doc.go delete mode 100644 vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/requests.go delete mode 100644 vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/results.go delete mode 100644 vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/urls.go create mode 100644 vendor/github.com/gorilla/websocket/.gitignore create mode 100644 vendor/github.com/gorilla/websocket/.travis.yml create mode 100644 vendor/github.com/gorilla/websocket/mask_safe.go create mode 100644 vendor/github.com/hashicorp/consul/api/debug.go create mode 100644 vendor/github.com/hashicorp/errwrap/go.mod create mode 100644 vendor/github.com/hashicorp/go-immutable-radix/go.mod create mode 100644 vendor/github.com/hashicorp/go-immutable-radix/go.sum create mode 100644 vendor/github.com/hashicorp/go-multierror/.travis.yml create mode 100644 vendor/github.com/hashicorp/go-multierror/Makefile create mode 100644 vendor/github.com/hashicorp/go-multierror/go.mod create mode 100644 vendor/github.com/hashicorp/go-multierror/go.sum create mode 100644 vendor/github.com/hashicorp/go-multierror/sort.go create mode 100644 vendor/github.com/hashicorp/go-retryablehttp/go.mod create mode 100644 vendor/github.com/hashicorp/go-retryablehttp/go.sum create mode 100644 vendor/github.com/hashicorp/go-sockaddr/go.mod create mode 100644 vendor/github.com/hashicorp/go-uuid/go.mod create mode 100644 vendor/github.com/hashicorp/hcl/go.mod create mode 100644 vendor/github.com/hashicorp/hcl/go.sum create mode 100644 vendor/github.com/hashicorp/vault/api/output_string.go create mode 100644 vendor/github.com/hashicorp/vault/helper/consts/agent.go create mode 100644 vendor/github.com/hashicorp/vault/helper/consts/consts.go create mode 100644 vendor/github.com/hashicorp/vault/helper/consts/error.go create mode 100644 vendor/github.com/hashicorp/vault/helper/consts/plugin_types.go create mode 100644 vendor/github.com/hashicorp/vault/helper/consts/replication.go create mode 100644 vendor/github.com/hashicorp/yamux/go.mod mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/LICENSE mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/action.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/client.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/datacenter.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/error.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/floating_ip.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/hcloud.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/helper.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/image.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/iso.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/location.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/pricing.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/action.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/datacenter.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/error.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/floating_ip.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/image.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/iso.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/location.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/meta.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/pricing.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/server.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/server_type.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/ssh_key.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/volume.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/server.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/server_type.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/ssh_key.go mode change 100755 => 100644 vendor/github.com/hetznercloud/hcloud-go/hcloud/volume.go create mode 100644 vendor/github.com/joyent/triton-go/.gitignore create mode 100644 vendor/github.com/joyent/triton-go/.travis.yml create mode 100644 vendor/github.com/klauspost/cpuid/.gitignore create mode 100644 vendor/github.com/klauspost/cpuid/.travis.yml create mode 100644 vendor/github.com/klauspost/crc32/.gitignore create mode 100644 vendor/github.com/klauspost/crc32/.travis.yml create mode 100644 vendor/github.com/klauspost/pgzip/.gitignore create mode 100644 vendor/github.com/klauspost/pgzip/.travis.yml create mode 100644 vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE create mode 100644 vendor/github.com/konsorten/go-windows-terminal-sequences/README.md create mode 100644 vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod create mode 100644 vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go create mode 100644 vendor/github.com/marstr/guid/.travis.yml create mode 100644 vendor/github.com/masterzen/winrm/.gitignore create mode 100644 vendor/github.com/masterzen/winrm/.travis.yml create mode 100644 vendor/github.com/mattn/go-colorable/.travis.yml rename vendor/github.com/{stretchr/objx => mattn/go-colorable}/LICENSE (91%) create mode 100644 vendor/github.com/mattn/go-colorable/README.md create mode 100644 vendor/github.com/mattn/go-colorable/colorable_appengine.go create mode 100644 vendor/github.com/mattn/go-colorable/colorable_others.go create mode 100644 vendor/github.com/mattn/go-colorable/colorable_windows.go create mode 100644 vendor/github.com/mattn/go-colorable/noncolorable.go create mode 100644 vendor/github.com/mitchellh/cli/.travis.yml create mode 100644 vendor/github.com/mitchellh/cli/go.mod create mode 100644 vendor/github.com/mitchellh/cli/go.sum create mode 100644 vendor/github.com/mitchellh/mapstructure/.travis.yml create mode 100644 vendor/github.com/mitchellh/reflectwalk/.travis.yml create mode 100644 vendor/github.com/mitchellh/reflectwalk/go.mod create mode 100644 vendor/github.com/moul/anonuuid/.gitignore create mode 100644 vendor/github.com/moul/anonuuid/.godir create mode 100644 vendor/github.com/moul/anonuuid/.goxc.json create mode 100644 vendor/github.com/moul/anonuuid/.travis.yml create mode 100644 vendor/github.com/moul/gotty-client/.gitignore create mode 100644 vendor/github.com/moul/gotty-client/.goxc.json create mode 100644 vendor/github.com/moul/gotty-client/.travis.yml create mode 100644 vendor/github.com/nu7hatch/gouuid/.gitignore create mode 100644 vendor/github.com/olekukonko/tablewriter/.travis.yml delete mode 100644 vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md delete mode 100644 vendor/github.com/oracle/oci-go-sdk/CONTRIBUTING.md delete mode 100644 vendor/github.com/oracle/oci-go-sdk/Makefile delete mode 100644 vendor/github.com/oracle/oci-go-sdk/README.md delete mode 100644 vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/audit/configuration.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/common/auth/jwt.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/common/auth/utils.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/key_value.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node_error.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/sort_order.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/backup.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_backup_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_to_existing_db_system_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_database_from_backup_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_db_home_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_db_home_from_backup_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_base.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_from_backup_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/data_guard_association.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/data_guard_association_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/database.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/database_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/database_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_backup_config.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_home.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_home_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_node.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_node_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_system.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/db_version_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_base.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_from_backup_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/patch.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/patch_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/patch_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/restore_database_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/update_db_home_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/create_zone_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/create_zone_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/delete_domain_records_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/delete_r_r_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/delete_zone_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/dns_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/external_master.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/get_domain_records_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/get_r_r_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/get_zone_records_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/get_zone_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/list_zones_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_r_r_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_rr_set_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/record.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/record_collection.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/record_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/record_operation.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/rr_set.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/sort_order.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/tsig.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_r_r_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_rr_set_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_zone_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/update_zone_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/zone.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/dns/zone_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/create_sender_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/create_sender_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/create_suppression_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/create_suppression_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/delete_sender_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/delete_suppression_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/email_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/get_sender_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/get_suppression_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/list_senders_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/list_suppressions_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/sender.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/sender_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/suppression.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/email/suppression_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/delete_export_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/delete_file_system_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/delete_mount_target_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/delete_snapshot_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/export.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/export_set.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/export_set_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/export_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/file_system.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/file_system_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/filestorage_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_file_system_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_mount_target_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/get_snapshot_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_export_sets_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_exports_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_file_systems_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_mount_targets_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/list_snapshots_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/api_key.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/auth_token.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/availability_domain.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/compartment.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_api_key_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_tag_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_tag_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_auth_token_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_dynamic_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_smtp_credential_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/dynamic_group.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_dynamic_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_tag_namespace_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_tag_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/group.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/idp_group_mapping.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_auth_tokens_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_dynamic_groups_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_smtp_credentials_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_tag_namespaces_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_tags_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/policy.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/region.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/tag.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/tag_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/ui_password.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_state_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_tag_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_tag_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/user.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/identity/user_group_membership.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_health.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/connection_configuration.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_hostname_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_path_route_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_hostname_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_path_route_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_hostnames_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_path_route_sets_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_match_type.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request_error.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_metadata_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/namespace_metadata.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_details.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/oci.go delete mode 100644 vendor/github.com/oracle/oci-go-sdk/wercker.yml create mode 100644 vendor/github.com/pierrec/lz4/.gitignore create mode 100644 vendor/github.com/pierrec/lz4/debug.go create mode 100644 vendor/github.com/pierrec/lz4/debug_stub.go create mode 100644 vendor/github.com/pierrec/lz4/internal/xxh32/xxh32zero.go create mode 100644 vendor/github.com/pierrec/lz4/lz4_go1.10.go create mode 100644 vendor/github.com/pierrec/lz4/lz4_notgo1.10.go delete mode 100644 vendor/github.com/pierrec/xxHash/LICENSE delete mode 100644 vendor/github.com/pierrec/xxHash/xxHash32/xxHash32.go create mode 100644 vendor/github.com/pkg/sftp/.gitignore create mode 100644 vendor/github.com/pkg/sftp/.travis.yml delete mode 100644 vendor/github.com/pkg/sftp/examples/buffered-read-benchmark/main.go delete mode 100644 vendor/github.com/pkg/sftp/examples/buffered-write-benchmark/main.go delete mode 100644 vendor/github.com/pkg/sftp/examples/sftp-server/README.md delete mode 100644 vendor/github.com/pkg/sftp/examples/sftp-server/main.go delete mode 100644 vendor/github.com/pkg/sftp/examples/streaming-read-benchmark/main.go delete mode 100644 vendor/github.com/pkg/sftp/examples/streaming-write-benchmark/main.go delete mode 100644 vendor/github.com/pkg/sftp/server_standalone/main.go create mode 100644 vendor/github.com/posener/complete/.gitignore create mode 100644 vendor/github.com/posener/complete/.travis.yml create mode 100644 vendor/github.com/posener/complete/cmd/install/fish.go mode change 100755 => 100644 vendor/github.com/posener/complete/test.sh create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore create mode 100644 vendor/github.com/ryanuber/go-glob/.travis.yml create mode 100644 vendor/github.com/satori/go.uuid/.travis.yml create mode 100644 vendor/github.com/satori/go.uuid/codec.go create mode 100644 vendor/github.com/satori/go.uuid/generator.go create mode 100644 vendor/github.com/satori/go.uuid/sql.go delete mode 100644 vendor/github.com/satori/uuid/LICENSE delete mode 100644 vendor/github.com/satori/uuid/README.md delete mode 100644 vendor/github.com/satori/uuid/uuid.go create mode 100644 vendor/github.com/sirupsen/logrus/.gitignore create mode 100644 vendor/github.com/sirupsen/logrus/.travis.yml create mode 100644 vendor/github.com/sirupsen/logrus/go.mod create mode 100644 vendor/github.com/sirupsen/logrus/go.sum delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_bsd.go create mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_js.go create mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_windows.go create mode 100644 vendor/github.com/sirupsen/logrus/terminal_notwindows.go create mode 100644 vendor/github.com/sirupsen/logrus/terminal_windows.go delete mode 100644 vendor/github.com/stretchr/objx/Gopkg.lock delete mode 100644 vendor/github.com/stretchr/objx/Gopkg.toml delete mode 100644 vendor/github.com/stretchr/objx/README.md delete mode 100644 vendor/github.com/stretchr/objx/Taskfile.yml delete mode 100644 vendor/github.com/stretchr/objx/accessors.go delete mode 100644 vendor/github.com/stretchr/objx/constants.go delete mode 100644 vendor/github.com/stretchr/objx/conversions.go delete mode 100644 vendor/github.com/stretchr/objx/doc.go delete mode 100644 vendor/github.com/stretchr/objx/map.go delete mode 100644 vendor/github.com/stretchr/objx/mutations.go delete mode 100644 vendor/github.com/stretchr/objx/security.go delete mode 100644 vendor/github.com/stretchr/objx/tests.go delete mode 100644 vendor/github.com/stretchr/objx/type_specific_codegen.go delete mode 100644 vendor/github.com/stretchr/objx/value.go delete mode 100644 vendor/github.com/stretchr/testify/Godeps/Godeps.json delete mode 100644 vendor/github.com/stretchr/testify/Godeps/Readme delete mode 100644 vendor/github.com/stretchr/testify/_codegen/main.go delete mode 100644 vendor/github.com/tent/http-link-go/LICENSE delete mode 100644 vendor/github.com/tent/http-link-go/README.md delete mode 100644 vendor/github.com/tent/http-link-go/link.go delete mode 100644 vendor/github.com/ugorji/go/codec/codecgen/README.md delete mode 100644 vendor/github.com/ugorji/go/codec/codecgen/gen.go delete mode 100644 vendor/github.com/ugorji/go/codec/codecgen/z.go mode change 100755 => 100644 vendor/github.com/ugorji/go/codec/prebuild.sh mode change 100755 => 100644 vendor/github.com/ugorji/go/codec/test.py mode change 100755 => 100644 vendor/github.com/ugorji/go/codec/tests.sh create mode 100644 vendor/github.com/vmware/govmomi/.drone.sec create mode 100644 vendor/github.com/vmware/govmomi/.drone.yml create mode 100644 vendor/github.com/vmware/govmomi/.gitignore create mode 100644 vendor/github.com/vmware/govmomi/.mailmap create mode 100644 vendor/github.com/vmware/govmomi/.travis.yml rename vendor/{github.com/sirupsen/logrus/terminal_linux.go => golang.org/x/crypto/ssh/terminal/util_aix.go} (53%) create mode 100644 vendor/gopkg.in/yaml.v2/.travis.yml create mode 100644 vendor/modules.txt delete mode 100644 vendor/vendor.json diff --git a/go.mod b/go.mod index e2eec92bc..d1725813d 100644 --- a/go.mod +++ b/go.mod @@ -3,113 +3,71 @@ module github.com/hashicorp/packer require ( github.com/1and1/oneandone-cloudserver-sdk-go v1.0.1 github.com/Azure/azure-sdk-for-go v17.3.1+incompatible - github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect github.com/Azure/go-autorest v10.12.0+incompatible github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4 // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20170625215350-4fe035839290 - github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895 // indirect - github.com/Jeffail/gabs v1.1.1 // indirect - github.com/Microsoft/go-winio v0.4.11 // indirect - github.com/NYTimes/gziphandler v1.0.1 // indirect github.com/NaverCloudPlatform/ncloud-sdk-go v0.0.0-20180110055012-c2e73f942591 - github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect - github.com/SAP/go-hdb v0.13.1 // indirect - github.com/SermoDigital/jose v0.9.1 // indirect github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af // indirect github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f github.com/antchfx/xpath v0.0.0-20170728053731-b5c552e1acbd // indirect github.com/antchfx/xquery v0.0.0-20170730121040-eb8c3c172607 // indirect github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 // indirect github.com/approvals/go-approval-tests v0.0.0-20160714161514-ad96e53bea43 - github.com/armon/go-metrics v0.0.0-20180713145231-3c58d8115a78 // indirect - github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 // indirect - github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf // indirect + github.com/armon/go-radix v1.0.0 // indirect github.com/aws/aws-sdk-go v1.16.24 - github.com/bgentry/speakeasy v0.0.0-20150902231413-36e9cfdd6909 // indirect github.com/biogo/hts v0.0.0-20160420073057-50da7d4131a3 - github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 // indirect - github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect - github.com/cenkalti/backoff v2.1.0+incompatible // indirect github.com/cheggaaa/pb v1.0.27 - github.com/circonus-labs/circonus-gometrics v2.2.5+incompatible // indirect - github.com/circonus-labs/circonusllhist v0.1.3 // indirect - github.com/containerd/continuity v0.0.0-20181203112020-004b46473808 // indirect github.com/creack/goselect v0.0.0-20180210034346-528c74964609 // indirect - github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f // indirect github.com/denverdino/aliyungo v0.0.0-20190220033614-36e2ae938978 github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/digitalocean/godo v1.7.3 + github.com/digitalocean/godo v1.11.1 github.com/dnaeon/go-vcr v1.0.0 // indirect - github.com/docker/docker v0.0.0-20170406124027-fa3e2d5ab9b5 // indirect - github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.3.3 // indirect - github.com/duosecurity/duo_api_golang v0.0.0-20181210160733-61e0defebf22 // indirect + github.com/docker/docker v0.0.0-20180422163414-57142e89befe // indirect github.com/dylanmei/iso8601 v0.1.0 // indirect github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 - github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect - github.com/fatih/structs v1.1.0 // indirect github.com/go-ini/ini v1.25.4 - github.com/go-ldap/ldap v2.5.1+incompatible // indirect - github.com/go-sql-driver/mysql v1.4.1 // indirect - github.com/go-test/deep v1.0.1 // indirect - github.com/gocql/gocql v0.0.0-20181124151448-70385f88b28b // indirect - github.com/gofrs/flock v0.7.0 - github.com/gogo/protobuf v1.2.0 // indirect + github.com/gofrs/flock v0.7.1 github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect github.com/google/go-cmp v0.2.0 github.com/google/shlex v0.0.0-20150127133951-6f45313302b9 - github.com/google/uuid v0.0.0-20171129191014-dec09d789f3d + github.com/google/uuid v1.0.0 github.com/gophercloud/gophercloud v0.0.0-20180903124057-ea7289ebdf06 github.com/gophercloud/utils v0.0.0-20190124192022-a5c25e7a53a6 github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect github.com/gorilla/websocket v0.0.0-20170319172727-a91eba7f9777 // indirect - github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect - github.com/hashicorp/consul v0.0.0-20180807174550-3e6313bebbf0 - github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce + github.com/hashicorp/consul v1.4.0 + github.com/hashicorp/errwrap v1.0.0 github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de github.com/hashicorp/go-cleanhttp v0.5.0 github.com/hashicorp/go-getter v1.2.0 - github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f // indirect - github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa // indirect - github.com/hashicorp/go-memdb v0.0.0-20181108192425-032f93b25bec // indirect - github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c // indirect - github.com/hashicorp/go-multierror v0.0.0-20150916205742-d30f09973e19 + github.com/hashicorp/go-multierror v1.0.0 github.com/hashicorp/go-oracle-terraform v0.0.0-20181016190316-007121241b79 - github.com/hashicorp/go-plugin v0.0.0-20181030172320-54b6ff97d818 // indirect - github.com/hashicorp/go-retryablehttp v0.0.0-20180718195005-e651d75abec6 // indirect + github.com/hashicorp/go-retryablehttp v0.5.2 // indirect github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 // indirect - github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 // indirect - github.com/hashicorp/go-uuid v0.0.0-20160329185618-73d19cdc2bf0 + github.com/hashicorp/go-uuid v1.0.1 github.com/hashicorp/go-version v1.1.0 - github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47 // indirect - github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce // indirect - github.com/hashicorp/memberlist v0.1.0 // indirect - github.com/hashicorp/serf v0.0.0-20180530155958-984a73625de3 // indirect - github.com/hashicorp/vault v0.0.0-20180724215049-b9adaf9c6959 - github.com/hashicorp/vault-plugin-secrets-kv v0.0.0-20181106190520-2236f141171e // indirect - github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/serf v0.8.2 // indirect + github.com/hashicorp/vault v1.1.0 + github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d github.com/hetznercloud/hcloud-go v1.12.0 github.com/hyperonecom/h1-client-go v0.0.0-20190122232013-cf38e8387775 - github.com/jefferai/jsonx v0.0.0-20160721235117-9cc31c3135ee // indirect github.com/joyent/triton-go v0.0.0-20180116165742-545edbe0d564 github.com/jtolds/gls v4.2.1+incompatible // indirect github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 - github.com/keybase/go-crypto v0.0.0-20181127160227-255a5089e85a // indirect github.com/klauspost/compress v0.0.0-20160131094358-f86d2e6d8a77 // indirect github.com/klauspost/cpuid v0.0.0-20160106104451-349c67577817 // indirect github.com/klauspost/crc32 v0.0.0-20160114101742-999f3125931f // indirect github.com/klauspost/pgzip v0.0.0-20151221113845-47f36e165cec github.com/kr/fs v0.0.0-20131111012553-2788f0dbd169 // indirect github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 // indirect - github.com/lib/pq v1.0.0 // indirect github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c // indirect github.com/masterzen/azure-sdk-for-go v0.0.0-20161014135628-ee4f0065d00c // indirect - github.com/masterzen/simplexml v0.0.0-20140219194429-95ba30457eb1 // indirect + github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect github.com/masterzen/winrm v0.0.0-20180224160350-7e40f93ae939 - github.com/mattn/go-tty v0.0.0-20190402035014-76a2065f1a95 + github.com/mattn/go-tty v0.0.0-20190407112021-83fae09cc007 github.com/miekg/dns v1.1.1 // indirect - github.com/mitchellh/cli v0.0.0-20170908181043-65fcae5817c8 - github.com/mitchellh/copystructure v1.0.0 // indirect + github.com/mitchellh/cli v1.0.0 github.com/mitchellh/go-fs v0.0.0-20180402234041-7b48fa161ea7 github.com/mitchellh/go-homedir v1.0.0 github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed @@ -125,52 +83,36 @@ require ( github.com/olekukonko/tablewriter v0.0.0-20180105111133-96aac992fc8b github.com/onsi/ginkgo v1.7.0 // indirect github.com/onsi/gomega v1.4.3 // indirect - github.com/opencontainers/go-digest v1.0.0-rc1 // indirect - github.com/opencontainers/image-spec v1.0.1 // indirect - github.com/opencontainers/runc v0.1.1 // indirect github.com/oracle/oci-go-sdk v1.8.0 - github.com/ory/dockertest v3.3.2+incompatible // indirect github.com/packer-community/winrmcp v0.0.0-20180921204643-0fd363d6159a - github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c // indirect - github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/pierrec/lz4 v0.0.0-20160112163551-383c0d87b5dd - github.com/pierrec/xxHash v0.0.0-20160112165351-5a004441f897 // indirect - github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e + github.com/pierrec/lz4 v2.0.5+incompatible + github.com/pkg/errors v0.8.0 github.com/pkg/sftp v0.0.0-20160118190721-e84cc8c755ca - github.com/posener/complete v0.0.0-20170908125245-88e59760adad + github.com/posener/complete v1.1.1 github.com/profitbricks/profitbricks-sdk-go v4.0.2+incompatible - github.com/prometheus/client_golang v0.9.2 // indirect github.com/renstrom/fuzzysearch v0.0.0-20160331204855-2d205ac6ec17 // indirect github.com/rwtodd/Go.Sed v0.0.0-20170507045331-d6d5d585814e github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 // indirect - github.com/satori/go.uuid v0.0.0-20170321230731-5bf94b69c6b6 // indirect + github.com/satori/go.uuid v1.2.0 // indirect github.com/scaleway/scaleway-cli v0.0.0-20180921094345-7b12c9699d70 - github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect - github.com/sirupsen/logrus v0.0.0-20180315010703-90150a8ed11b // indirect + github.com/sirupsen/logrus v1.2.0 // indirect github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c // indirect - github.com/stretchr/testify v1.2.2 + github.com/stretchr/testify v1.3.0 github.com/tencentcloud/tencentcloud-sdk-go v0.0.0-20181220135002-f1744d40d346 - github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9 // indirect - github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 // indirect github.com/ugorji/go v0.0.0-20151218193438-646ae4a518c1 github.com/ulikunitz/xz v0.5.5 github.com/vmware/govmomi v0.0.0-20170707011325-c2105a174311 github.com/xanzy/go-cloudstack v2.4.1+incompatible - golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16 + golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 golang.org/x/net v0.0.0-20190213061140-3a22650c66bd golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 - golang.org/x/sync v0.0.0-20181108010431-42b317875d0f - golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 + golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 + golang.org/x/sys v0.0.0-20181218192612-074acd46bca6 google.golang.org/api v0.1.0 google.golang.org/appengine v1.4.0 // indirect - gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect - gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect - gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect gopkg.in/h2non/gock.v1 v1.0.12 // indirect gopkg.in/jarcoal/httpmock.v1 v1.0.0-20181117152235-275e9df93516 // indirect - gopkg.in/ldap.v2 v2.5.1 // indirect - gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect - gopkg.in/vmihailenco/msgpack.v2 v2.9.1 // indirect - gotest.tools v2.2.0+incompatible // indirect + gopkg.in/yaml.v2 v2.2.2 // indirect ) diff --git a/go.sum b/go.sum index 505e4b08a..1f5f5be6a 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.36.0 h1:+aCSj7tOo2LODWVEuZDZeGCckdt6MlSF+X/rB3wUiS8= @@ -12,8 +11,6 @@ github.com/1and1/oneandone-cloudserver-sdk-go v1.0.1 h1:RMTyvS5bjvSWiUcfqfr/E2px github.com/1and1/oneandone-cloudserver-sdk-go v1.0.1/go.mod h1:61apmbkVJH4kg+38ftT+/l0XxdUCVnHggqcOTqZRSEE= github.com/Azure/azure-sdk-for-go v17.3.1+incompatible h1:9Nzge8xxnYm5lVRkvTpG1odiDN0fYDorQwVEaVfg1+g= github.com/Azure/azure-sdk-for-go v17.3.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v10.12.0+incompatible h1:6YphwUK+oXbzvCc1fd5VrnxCekwzDkpA7gUEbci2MvI= github.com/Azure/go-autorest v10.12.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4 h1:pSm8mp0T2OH2CPmPDPtwHPr3VAQaOwVF/JbllOPP4xA= @@ -21,22 +18,10 @@ github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzS github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/ChrisTrenkamp/goxpath v0.0.0-20170625215350-4fe035839290 h1:K9I21XUHNbYD3GNMmJBN0UKJCpdP+glftwNZ7Bo8kqY= github.com/ChrisTrenkamp/goxpath v0.0.0-20170625215350-4fe035839290/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= -github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895 h1:dmc/C8bpE5VkQn65PNbbyACDC8xw8Hpp/NEurdPmQDQ= -github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Jeffail/gabs v1.1.1 h1:V0uzR08Hj22EX8+8QMhyI9sX2hwRu+/RJhJUmnwda/E= -github.com/Jeffail/gabs v1.1.1/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc= -github.com/Microsoft/go-winio v0.4.11 h1:zoIOcVf0xPN1tnMVbTtEdI+P8OofVk3NObnwOQ6nK2Q= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/NYTimes/gziphandler v1.0.1 h1:iLrQrdwjDd52kHDA5op2UBJFjmOb9g+7scBan4RN8F0= -github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NaverCloudPlatform/ncloud-sdk-go v0.0.0-20180110055012-c2e73f942591 h1:/P9HCl71+Eh6vDbKNyRu+rpIIR70UCZWNOGexVV3e6k= github.com/NaverCloudPlatform/ncloud-sdk-go v0.0.0-20180110055012-c2e73f942591/go.mod h1:EHGzQGbwozJBj/4qj3WGrTJ0FqjgOTOxLQ0VNWvPn08= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/SAP/go-hdb v0.13.1 h1:BuZlUZtqbF/oVSQ8Vp+/+wOtcBLh55zwMV7XnvYcz8g= -github.com/SAP/go-hdb v0.13.1/go.mod h1:etBT+FAi1t5k3K3tf5vQTnosgYmhDkRi8jEnQqCnxF0= -github.com/SermoDigital/jose v0.9.1 h1:atYaHPD3lPICcbK1owly3aPm0iaJGSGPi0WD4vLznv8= -github.com/SermoDigital/jose v0.9.1/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= +github.com/Telmate/proxmox-api-go v0.0.0-20190410200643-f08824d5082d h1:igrCnHheXb+lZ1bW9Ths8JZZIjh9D4Vi/49JqiHE+cI= +github.com/Telmate/proxmox-api-go v0.0.0-20190410200643-f08824d5082d/go.mod h1:OGWyIMJ87/k/GCz8CGiWB2HOXsOVDM6Lpe/nFPkC4IQ= github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af h1:DBNMBMuMiWYu0b+8KMJuWmfCkcxl09JwdlqwDZZ6U14= github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f h1:jI4DIE5Vf4oRaHfthB0oRhU+yuYuoOTurDzwAlskP00= @@ -50,74 +35,47 @@ github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/approvals/go-approval-tests v0.0.0-20160714161514-ad96e53bea43 h1:ePCAQPf5tUc5IMcUvu6euhSGna7jzs7eiXtJXHig6Zc= github.com/approvals/go-approval-tests v0.0.0-20160714161514-ad96e53bea43/go.mod h1:S6puKjZ9ZeqUPBv2hEBnMZGcM2J6mOsDRQcmxkMAND0= -github.com/armon/go-metrics v0.0.0-20180713145231-3c58d8115a78 h1:mdRSArcFLfW0VoL34LZAKSz6LkkK4jFxVx2xYavACMg= -github.com/armon/go-metrics v0.0.0-20180713145231-3c58d8115a78/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 h1:MBXhrxjNkjdqJysfNbKMMPFNXlz6EzpOnPcsoYBeD3E= -github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzsP1G42dRafH3vf+al2vQIJU0YHX+1Tw87oco= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.16.24 h1:I/A3Hwbgs3IEAP6v1bFpHKXiT7wZDoToX9cb00nxZnM= github.com/aws/aws-sdk-go v1.16.24/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= -github.com/bgentry/speakeasy v0.0.0-20150902231413-36e9cfdd6909 h1:mUVWHQ4tjVv86uJhxSbYqwdz4o+Imcl6HoZtoaqC3zM= -github.com/bgentry/speakeasy v0.0.0-20150902231413-36e9cfdd6909/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/biogo/hts v0.0.0-20160420073057-50da7d4131a3 h1:3b+p838vN4sc37brz9W2HDphtSwZFcXZwFLyzm5Vk28= github.com/biogo/hts v0.0.0-20160420073057-50da7d4131a3/go.mod h1:YOY5xnRf7Jz2SZCLSKgVfyqNzbRgyTznM3HyDqQMxcU= -github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYEDvkta6I8/rnYM5gSdSV2tJ6XbZuEtY= -github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/cenkalti/backoff v2.1.0+incompatible h1:FIRvWBZrzS4YC7NT5cOuZjexzFvIr+Dbi6aD1cZaNBk= -github.com/cenkalti/backoff v2.1.0+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= -github.com/circonus-labs/circonus-gometrics v2.2.5+incompatible h1:KsuY3ogbxgVv3FNhbLUoT+SE9znoWEUIuChSIT4HukI= -github.com/circonus-labs/circonus-gometrics v2.2.5+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808 h1:4BX8f882bXEDKfWIf0wa8HRvpnBoPszJJXL+TVbBw4M= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/creack/goselect v0.0.0-20180210034346-528c74964609 h1:FSxXMd2wCHj6GqgBdo4UtVA9R2aieIDvSniepqyOppU= github.com/creack/goselect v0.0.0-20180210034346-528c74964609/go.mod h1:gHrIcH/9UZDn2qgeTUeW5K9eZsVYCH6/60J/FHysWyE= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f h1:WH0w/R4Yoey+04HhFxqZ6VX6I0d7RMyw5aXQ9UTvQPs= -github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc= github.com/denverdino/aliyungo v0.0.0-20190220033614-36e2ae938978 h1:oyfbRmu7YnytN4bXhvJPY1HPgUL52j5AxtgGDU0bMVs= github.com/denverdino/aliyungo v0.0.0-20190220033614-36e2ae938978/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/digitalocean/godo v1.7.3 h1:0tFPilFBDsVSiAKF8hyzj/MAmRYxNc5MGhAiYZYVrpo= -github.com/digitalocean/godo v1.7.3/go.mod h1:h6faOIcZ8lWIwNQ+DN7b3CgX4Kwby5T+nbpNqkUIozU= +github.com/digitalocean/godo v1.11.1 h1:OsTh37YFKk+g6DnAOrkXJ9oDArTkRx5UTkBJ2EWAO38= +github.com/digitalocean/godo v1.11.1/go.mod h1:h6faOIcZ8lWIwNQ+DN7b3CgX4Kwby5T+nbpNqkUIozU= github.com/dnaeon/go-vcr v1.0.0 h1:1QZ+ahihvRvppcJnFvuoHAdnZTf1PqKjO4Ftr1cfQTo= github.com/dnaeon/go-vcr v1.0.0/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/docker v0.0.0-20170406124027-fa3e2d5ab9b5 h1:DwY2bFs8p+xf2WaQewx2hnGdjYR5K4UAaxcNPyKkTek= -github.com/docker/docker v0.0.0-20170406124027-fa3e2d5ab9b5/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/duosecurity/duo_api_golang v0.0.0-20181210160733-61e0defebf22 h1:RqZJa9Ohzpyr5OADCKz/8t0vtdD2vczMdjqCbvTYz7o= -github.com/duosecurity/duo_api_golang v0.0.0-20181210160733-61e0defebf22/go.mod h1:UqXY1lYT/ERa4OEAywUqdok1T4RCRdArkhic1Opuavo= +github.com/docker/docker v0.0.0-20180422163414-57142e89befe h1:VW8TnWi0CZgg7oCv0wH6evNwkzcJg/emnw4HrVIWws4= +github.com/docker/docker v0.0.0-20180422163414-57142e89befe/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dylanmei/iso8601 v0.1.0 h1:812NGQDBcqquTfH5Yeo7lwR0nzx/cKdsmf3qMjPURUI= github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ= github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 h1:0bp6/GrNOrTDtSXe9YYGCwf8jp5Fb/b+4a6MTRm4qzY= github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08/go.mod h1:VBVDFSBXCIW8JaHQpI8lldSKfYaLMzP9oyq6IJ4fhzY= -github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= -github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -125,19 +83,9 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-ini/ini v1.25.4 h1:Mujh4R/dH6YL8bxuISne3xX2+qcQ9p0IxKAP6ExWoUo= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-ldap/ldap v2.5.1+incompatible h1:Opaoft5zMW8IU/VRULB0eGMBQ9P5buRvCW6sFTRmMn8= -github.com/go-ldap/ldap v2.5.1+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= -github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= -github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/gocql/gocql v0.0.0-20181124151448-70385f88b28b h1:dnUw9Ih14dCKzbtZxm+pwQRYIb+9ypiwtZgsCQN4zmg= -github.com/gocql/gocql v0.0.0-20181124151448-70385f88b28b/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= -github.com/gofrs/flock v0.7.0 h1:pGFUjl501gafK9HBt1VGL1KCOd/YhIooID+xgyJCf3g= -github.com/gofrs/flock v0.7.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc= +github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= @@ -145,12 +93,11 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= @@ -158,8 +105,7 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/shlex v0.0.0-20150127133951-6f45313302b9 h1:JM174NTeGNJ2m/oLH3UOWOvWQQKd+BoL3hcSCUWFLt0= github.com/google/shlex v0.0.0-20150127133951-6f45313302b9/go.mod h1:RpwtwJQFrIEPstU94h88MWPXP2ektJZ8cZ0YntAmXiE= -github.com/google/uuid v0.0.0-20171129191014-dec09d789f3d h1:rXQlD9GXkjA/PQZhmEaF/8Pj/sJfdZJK7GJG0gkS8I0= -github.com/google/uuid v0.0.0-20171129191014-dec09d789f3d/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3 h1:siORttZ36U2R/WjiJuDz8znElWBiAlO9rVt+mqJt0Cc= @@ -173,71 +119,55 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1 github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170319172727-a91eba7f9777 h1:JIM+OacoOJRU30xpjMf8sulYqjr0ViA3WDrTX6j/yDI= github.com/gorilla/websocket v0.0.0-20170319172727-a91eba7f9777/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= -github.com/hashicorp/consul v0.0.0-20180807174550-3e6313bebbf0 h1:vh/G7ew4mi/FcKNrRk4x1N1fWYzYB5/AaSHr9W+wrF4= -github.com/hashicorp/consul v0.0.0-20180807174550-3e6313bebbf0/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce h1:prjrVgOk2Yg6w+PflHoszQNLTUh4kaByUcEWM/9uin4= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/consul v1.4.0 h1:PQTW4xCuAExEiSbhrsFsikzbW5gVBoi74BjUvYFyKHw= +github.com/hashicorp/consul v1.4.0/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de h1:XDCSythtg8aWSRSO29uwhgh7b127fWr+m5SemqjSUL8= github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de/go.mod h1:xIwEieBHERyEvaeKF/TcHh1Hu+lxPM+n2vT1+g9I4m4= -github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-getter v1.2.0 h1:E05bVPilzyh2yXgT6srn7WEkfMZaH+LuX9tDJw/4kaE= github.com/hashicorp/go-getter v1.2.0/go.mod h1:/O1k/AizTN0QmfEKknCYGvICeyKUDqCYA8vvWtGWDeQ= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f h1:Yv9YzBlAETjy6AOX9eLBZ3nshNVRREgerT/3nvxlGho= -github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa h1:0nA8i+6Rwqaq9xlpmVxxTwk6rxiEhX+E6Wh4vPNHiS8= -github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa/go.mod h1:6ij3Z20p+OhOkCSrA0gImAWoHYQRGbnlcuk6XYTiaRw= -github.com/hashicorp/go-memdb v0.0.0-20181108192425-032f93b25bec h1:A1nDk9UOKWPTQh5YcCnbwNbqj23e5pggf4HxGBulhr8= -github.com/hashicorp/go-memdb v0.0.0-20181108192425-032f93b25bec/go.mod h1:kbfItVoBJwCfKXDXN4YoAXjxcFVZ7MRrJzyTX6H4giE= -github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c h1:BTAbnbegUIMB6xmQCwWE8yRzbA4XSpnZY5hvRJC188I= -github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20150916205742-d30f09973e19 h1:gb61U/o4ZJ6TRYvZqJUKYidIhJOEAvNyVMesryROxAY= -github.com/hashicorp/go-multierror v0.0.0-20150916205742-d30f09973e19/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-oracle-terraform v0.0.0-20181016190316-007121241b79 h1:RKu7yAXZTaQsxj1K9GDsh+QVw0+Wu1SWHxtbFN0n+hE= github.com/hashicorp/go-oracle-terraform v0.0.0-20181016190316-007121241b79/go.mod h1:09jT3Y/OIsjTjQ2+3bkVNPDKqWcGIYYvjB2BEKVUdvc= -github.com/hashicorp/go-plugin v0.0.0-20181030172320-54b6ff97d818 h1:wA1XRGBHMdpio0gcKUtnmkwSIlCAG1qzpsr+iPyi3Y8= -github.com/hashicorp/go-plugin v0.0.0-20181030172320-54b6ff97d818/go.mod h1:Ft7ju2vWzhO0ETMKUVo12XmXmII6eSUS4rsPTkY/siA= -github.com/hashicorp/go-retryablehttp v0.0.0-20180718195005-e651d75abec6 h1:qCv4319q2q7XKn0MQbi8p37hsJ+9Xo8e6yojA73JVxk= -github.com/hashicorp/go-retryablehttp v0.0.0-20180718195005-e651d75abec6/go.mod h1:fXcdFsQoipQa7mwORhKad5jmDCeSy/RCGzWA08PO0lM= +github.com/hashicorp/go-retryablehttp v0.5.2 h1:AoISa4P4IsW0/m4T6St8Yw38gTl5GtBAgfkhYh1xAz4= +github.com/hashicorp/go-retryablehttp v0.5.2/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 h1:VBj0QYQ0u2MCJzBfeYXGexnAl17GsH1yidnoxCqqD9E= github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90/go.mod h1:o4zcYY1e0GEZI6eSEr+43QDYmuGglw1qSO6qdHUHCgg= -github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= -github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 h1:7YOlAIO2YWnJZkQp7B5eFykaIY7C9JndqAFQyVV5BhM= -github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-uuid v0.0.0-20160329185618-73d19cdc2bf0 h1:YnYV/qHLtjZmhFnWaSsNqVAUhxCuPKRe5wDGpOKYL/U= -github.com/hashicorp/go-uuid v0.0.0-20160329185618-73d19cdc2bf0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PFRGzg0= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47 h1:UnszMmmmm5vLwWzDjTFVIkfhvWF1NdrmChl8L2NUDCw= -github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce h1:xdsDDbiBDQTKASoGEZ+pEmF1OnWuu8AQ9I8iNbHNeno= -github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= -github.com/hashicorp/memberlist v0.1.0 h1:qSsCiC0WYD39lbSitKNt40e30uorm2Ss/d4JGU1hzH8= -github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= -github.com/hashicorp/serf v0.0.0-20180530155958-984a73625de3 h1:NUr1hG6WO9sI1x8ofSimmpqfJ+rEHiHP/PLEA33rcfQ= -github.com/hashicorp/serf v0.0.0-20180530155958-984a73625de3/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= -github.com/hashicorp/vault v0.0.0-20180724215049-b9adaf9c6959 h1:PyVs2CB7Hxgl1kU0tWAVpagLK3N+MC0eeyKmG+L5VPI= -github.com/hashicorp/vault v0.0.0-20180724215049-b9adaf9c6959/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= -github.com/hashicorp/vault-plugin-secrets-kv v0.0.0-20181106190520-2236f141171e h1:2Hwd2Yi0/qjAC6ujOu6WBVXAak9Snuw0LTYdZkqIdKM= -github.com/hashicorp/vault-plugin-secrets-kv v0.0.0-20181106190520-2236f141171e/go.mod h1:VJHHT2SC1tAPrfENQeBhLlb5FbZoKZM+oC/ROmEftz0= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/vault v1.1.0 h1:v79NUgO5xCZnXVzUkIqFOXtP8YhpnHAi1fk3eo9cuOE= +github.com/hashicorp/vault v1.1.0/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hetznercloud/hcloud-go v1.12.0 h1:ugZO8a8ADekqSWi7xWlcs6pxr4QE0tw5VnyjXcL5n28= github.com/hetznercloud/hcloud-go v1.12.0/go.mod h1:g5pff0YNAZywQaivY/CmhUYFVp7oP0nu3MiODC2W4Hw= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hyperonecom/h1-client-go v0.0.0-20190122232013-cf38e8387775 h1:MIteIoIQ5nFoOmwEHPDsqng8d0dtKj3lCnQCwGvtxXc= github.com/hyperonecom/h1-client-go v0.0.0-20190122232013-cf38e8387775/go.mod h1:R9rU87RxxmcD3DkspW9JqGBXiJyg5MA+WNCtJrBtnXs= -github.com/jefferai/jsonx v0.0.0-20160721235117-9cc31c3135ee h1:AQ/QmCk6x8ECPpf2pkPtA4lyncEEBbs8VFnVXPYKhIs= -github.com/jefferai/jsonx v0.0.0-20160721235117-9cc31c3135ee/go.mod h1:N0t2vlmpe8nyZB5ouIbJQPDSR+mH6oe7xHB9VZHSUzM= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= @@ -248,8 +178,6 @@ github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpR github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 h1:PJPDf8OUfOK1bb/NeTKd4f1QXZItOX389VN3B6qC8ro= github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= -github.com/keybase/go-crypto v0.0.0-20181127160227-255a5089e85a h1:X/UFlwD2/UV0RCy+8ITi4DmxJwk83YUH7bXwkJIHHMo= -github.com/keybase/go-crypto v0.0.0-20181127160227-255a5089e85a/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v0.0.0-20160131094358-f86d2e6d8a77 h1:rJnR80lkojFgjdg/oQPhbZoY8t8uM51XMz8DrJrjabk= github.com/klauspost/compress v0.0.0-20160131094358-f86d2e6d8a77/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -259,6 +187,8 @@ github.com/klauspost/crc32 v0.0.0-20160114101742-999f3125931f h1:UD9YLTi2aBhdOOT github.com/klauspost/crc32 v0.0.0-20160114101742-999f3125931f/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v0.0.0-20151221113845-47f36e165cec h1:PYqF3Tiz2W2Ag0ezyDhAobWDWlrFv7U+qct4spLeDBM= github.com/klauspost/pgzip v0.0.0-20151221113845-47f36e165cec/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.0.0-20131111012553-2788f0dbd169 h1:YUrU1/jxRqnt0PSrKj1Uj/wEjk/fjnE80QFfi2Zlj7Q= github.com/kr/fs v0.0.0-20131111012553-2788f0dbd169/go.mod h1:glhvuHOU9Hy7/8PwwdtnarXqLagOX0b/TbZx2zLMqEg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= @@ -269,46 +199,39 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c h1:N7uWGS2fTwH/4BwxbHiJZNAFTSJ5yPU0emHsQWvkxEY= github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/masterzen/azure-sdk-for-go v0.0.0-20161014135628-ee4f0065d00c h1:FMUOnVGy8nWk1cvlMCAoftRItQGMxI0vzJ3dQjeZTCE= github.com/masterzen/azure-sdk-for-go v0.0.0-20161014135628-ee4f0065d00c/go.mod h1:mf8fjOu33zCqxUjuiU3I8S1lJMyEAlH+0F2+M5xl3hE= -github.com/masterzen/simplexml v0.0.0-20140219194429-95ba30457eb1 h1:cLEbk5d4t8CDqmQtCMc2lk91cflxOrj31k9LTIabPoA= -github.com/masterzen/simplexml v0.0.0-20140219194429-95ba30457eb1/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= +github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 h1:2ZKn+w/BJeL43sCxI2jhPLRv73oVVOjEKZjKkflyqxg= +github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= github.com/masterzen/winrm v0.0.0-20180224160350-7e40f93ae939 h1:cRFHA33ER97Xy5jmjS519OXCS/yE3AT3zdbQAg0Z53g= github.com/masterzen/winrm v0.0.0-20180224160350-7e40f93ae939/go.mod h1:CfZSN7zwz5gJiFhZJz49Uzk7mEBHIceWmbFmYx7Hf7E= github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-tty v0.0.0-20190402035014-76a2065f1a95 h1:zyW7ieMaS0tXk1KgXxFgQ+HAMmxYpwe7MiAzE4C/rkE= -github.com/mattn/go-tty v0.0.0-20190402035014-76a2065f1a95/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/mattn/go-tty v0.0.0-20190407112021-83fae09cc007 h1:xjZxmVDmDZoEsl2gV0qD0pyBH+wXmJIZd27wsNFphJk= +github.com/mattn/go-tty v0.0.0-20190407112021-83fae09cc007/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.1 h1:DVkblRdiScEnEr0LR9nTnEQqHYycjkXW9bOjd+2EL2o= github.com/miekg/dns v1.1.1/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v0.0.0-20170908181043-65fcae5817c8 h1:ZPmOsqSxGDUqFp0ErYpJDIfaBRBGvQv0qDPr37kZBrk= -github.com/mitchellh/cli v0.0.0-20170908181043-65fcae5817c8/go.mod h1:oGumspjLm2kTyiT1QMGpFqRlmxnKHfCvhZEVnx+5UeE= -github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-fs v0.0.0-20180402234041-7b48fa161ea7 h1:PXPMDtfqV+rZJshQHOiwUFqlqErXaAcuWy+/ZmyRfNc= github.com/mitchellh/go-fs v0.0.0-20180402234041-7b48fa161ea7/go.mod h1:g7SZj7ABpStq3tM4zqHiVEG5un/DZ1+qJJKO7qx1EvU= -github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed h1:FI2NIv6fpef6BQl2u3IZX/Cj20tfypRF4yd+uaHOMtI= github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= -github.com/mitchellh/iochan v0.0.0-20150529224432-87b45ffd0e95 h1:aHWVygBsLb+Kls/35B3tevL1hvDxZ0UklPA0BmhqTEk= -github.com/mitchellh/iochan v0.0.0-20150529224432-87b45ffd0e95/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/iochan v1.0.1-0.20190408094311-e9f5309a3061 h1:BSEloc+wp5WA/fu0jw5HBWOfoKLdvpqi38ZP22eNemg= github.com/mitchellh/iochan v1.0.1-0.20190408094311-e9f5309a3061/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v0.0.0-20180111000720-b4575eea38cc h1:5T6hzGUO5OrL6MdYXYoLQtRWJDDgjdlOVBn9mIqGY1g= github.com/mitchellh/mapstructure v0.0.0-20180111000720-b4575eea38cc/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/panicwrap v0.0.0-20170106182340-fce601fe5557 h1:w1QuuAA2km2Hax+EPamrq5ZRBeaNv2vsjvgB4an0zoU= @@ -327,8 +250,6 @@ github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJE github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20180105111133-96aac992fc8b h1:LGItPaClbzopugAomw5VFKnG3h1dUr9QW5KOU+m8gu0= github.com/olekukonko/tablewriter v0.0.0-20180105111133-96aac992fc8b/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -336,57 +257,36 @@ github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/oracle/oci-go-sdk v1.8.0 h1:4SO45bKV0I3/Mn1os3ANDZmV0eSE5z5CLdSUIkxtyzs= github.com/oracle/oci-go-sdk v1.8.0/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= -github.com/ory/dockertest v3.3.2+incompatible h1:uO+NcwH6GuFof/Uz8yzjNi1g0sGT5SLAJbdBvD8bUYc= -github.com/ory/dockertest v3.3.2+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/packer-community/winrmcp v0.0.0-20180921204643-0fd363d6159a h1:A3QMuteviunoaY/8ex+RKFqwhcZJ/Cf3fCW3IwL2wx4= github.com/packer-community/winrmcp v0.0.0-20180921204643-0fd363d6159a/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pierrec/lz4 v0.0.0-20160112163551-383c0d87b5dd h1:0EXhZlgCFcAZjhD6f6yqIINBBBym9seHr6AkvAWUgN8= -github.com/pierrec/lz4 v0.0.0-20160112163551-383c0d87b5dd/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/xxHash v0.0.0-20160112165351-5a004441f897 h1:jp3jc/PyyTrTKjJJ6rWnhTbmo7tGgBFyG9AL5FIrO1I= -github.com/pierrec/xxHash v0.0.0-20160112165351-5a004441f897/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= -github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e h1:+RHxT/gm0O3UF7nLJbdNzAmULvCFt4XfXHWzh3XI/zs= -github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v0.0.0-20160118190721-e84cc8c755ca h1:k8gsErq3rkcbAyCnpOycQsbw88NjCHk7L3KfBZKhQDQ= github.com/pkg/sftp v0.0.0-20160118190721-e84cc8c755ca/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v0.0.0-20170908125245-88e59760adad h1:jTlrcNQXxCpT8NU0MG1aiUkfAiTlm+W6KPScysqjvdA= -github.com/posener/complete v0.0.0-20170908125245-88e59760adad/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/profitbricks/profitbricks-sdk-go v4.0.2+incompatible h1:ZoVHH6voxW9Onzo6z2yLtocVoN6mBocyDoqoyAMHokE= github.com/profitbricks/profitbricks-sdk-go v4.0.2+incompatible/go.mod h1:T3/WrziK7fYH3C8ilAFAHe99R452/IzIG3YYkqaOFeQ= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 h1:PnBWHBf+6L0jOqq0gIVUe6Yk0/QMZ640k6NvkxcBf+8= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nLJdBg+pBmGgkJlSaKC2KaQmTCk1XDtE= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/renstrom/fuzzysearch v0.0.0-20160331204855-2d205ac6ec17 h1:4qPms2txLWMLXKzqlnYSulKRS4cS9aYgPtAEpUelQok= github.com/renstrom/fuzzysearch v0.0.0-20160331204855-2d205ac6ec17/go.mod h1:SAEjPB4voP88qmWJXI7mA5m15uNlEnuHLx4Eu2mPGpQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/rwtodd/Go.Sed v0.0.0-20170507045331-d6d5d585814e h1:lN+IKs+Jb9uwDOMO4VJZzH9vOjjist0THR5s9akp+Ss= github.com/rwtodd/Go.Sed v0.0.0-20170507045331-d6d5d585814e/go.mod h1:8AEUvGVi2uQ5b24BIhcr0GCcpd/RNAFWaN2CJFrWIIQ= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 h1:7YvPJVmEeFHR1Tj9sZEYsmarJEQfMVYpd/Vyy/A8dqE= github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/satori/go.uuid v0.0.0-20170321230731-5bf94b69c6b6 h1:7PFDlUz5/yGp8w21PuZGgEfN7ZF7OXvgAIDjwih82Gs= -github.com/satori/go.uuid v0.0.0-20170321230731-5bf94b69c6b6/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scaleway/scaleway-cli v0.0.0-20180921094345-7b12c9699d70 h1:DaqC32ZwOuO4ctgg9qAdKnlQxwFPkKmCOEqwSNwYy7c= github.com/scaleway/scaleway-cli v0.0.0-20180921094345-7b12c9699d70/go.mod h1:XjlXWPd6VONhsRSEuzGkV8mzRpH7ou1cdLV7IKJk96s= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= @@ -414,23 +314,24 @@ github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1l github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/sirupsen/logrus v0.0.0-20180315010703-90150a8ed11b h1:m1cItYkpJSJ3ZKPEV/XKbZTcCaJHY1qF+R9GisLZ4kw= -github.com/sirupsen/logrus v0.0.0-20180315010703-90150a8ed11b/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c h1:Ho+uVpkel/udgjbwB5Lktg9BtvJSh2DT0Hi6LPSyI2w= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tencentcloud/tencentcloud-sdk-go v0.0.0-20181220135002-f1744d40d346 h1:a014AaXz7AISMePv8xKRffUZZkr5z2XmSDf41gRV3+A= github.com/tencentcloud/tencentcloud-sdk-go v0.0.0-20181220135002-f1744d40d346/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4= -github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9 h1:/Bsw4C+DEdqPjt8vAqaC9LAqpAQnaCQQqmolqq3S1T4= -github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9/go.mod h1:RHkNRtSLfOK7qBTHaeSX1D6BNpI3qw7NTxsmNr4RvN8= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v0.0.0-20151218193438-646ae4a518c1 h1:U6ufy3mLDgg9RYupntOvAF7xCmNNquyKaYaaVHo1Nnk= github.com/ugorji/go v0.0.0-20151218193438-646ae4a518c1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok= @@ -443,14 +344,19 @@ go.opencensus.io v0.18.0 h1:Mk5rgZcggtbvtAun5aJzAtjKKN/t0R3jJPlWILlv938= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16 h1:y6ce7gCWtnH+m3dCjzQ1PCuwl28DDIc3VNnvY29DlIA= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3 h1:KYQXGkl6vs02hK7pK4eIbw0NpNPedieTSTEiJ//bwGs= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 h1:mKdxBk7AujPs8kU4m80U72y/zjbZ3UcXC7dClwKbUI0= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -458,21 +364,26 @@ golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsq golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd h1:HuTn7WObtcDo9uEEU7rEqL0jYthdXAmZ6PP+meazmaU= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 h1:uESlIz09WIHT2I+pasSXcpLYqYK8wHcdCetU3VuMBJE= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5 h1:x6r4Jo0KNzOOzYd8lbcRsqjuqEASK6ob3auvWYM4/8U= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 h1:0oC8rFnE+74kEmuHZ46F6KHsMr5Gx2gUQPuNz28iQZM= golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181218192612-074acd46bca6 h1:MXtOG7w2ND9qNCUZSDBGll/SpVIq7ftozR9I8/JGBHY= +golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= @@ -487,13 +398,11 @@ google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+ google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0 h1:K6z2u68e86TPdSdefXdzvXgR1zEMa+459vBSfWYAZkI= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -504,36 +413,25 @@ google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmE google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0 h1:TRJYBgMclJvGYn2rIMjj+h9KtMt5r1Ij7ODVRIZkwhk= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM= -gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27 h1:kJdccidYzt3CaHD1crCFTS1hxyhSi059NhOFUf03YFo= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/h2non/gock.v1 v1.0.12 h1:o3JJqe+h7R9Ay6LtMeFrKz1WnokrJDrNpDQs9KGqVn8= gopkg.in/h2non/gock.v1 v1.0.12/go.mod h1:KHI4Z1sxDW6P4N3DfTWSEza07YpkQP7KJBfglRMEjKY= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/jarcoal/httpmock.v1 v1.0.0-20181117152235-275e9df93516 h1:H6trpavCIuipdInWrab8l34Mf+GGVfphniHostMdMaQ= gopkg.in/jarcoal/httpmock.v1 v1.0.0-20181117152235-275e9df93516/go.mod h1:d3R+NllX3X5e0zlG1Rful3uLvsGC/Q3OHut5464DEQw= -gopkg.in/ldap.v2 v2.5.1 h1:wiu0okdNfjlBzg6UWvd1Hn8Y+Ux17/u/4nlk4CQr6tU= -gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce h1:xcEWjVhvbDy+nHP67nPDDpbYrY+ILlfndk4bRioVHaU= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/vmihailenco/msgpack.v2 v2.9.1 h1:kb0VV7NuIojvRfzwslQeP3yArBqJHW9tOl4t38VS1jM= -gopkg.in/vmihailenco/msgpack.v2 v2.9.1/go.mod h1:/3Dn1Npt9+MYyLpYYXjInO/5jvMLamn+AEGwNEOatn8= gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/1and1/oneandone-cloudserver-sdk-go/.gitignore b/vendor/github.com/1and1/oneandone-cloudserver-sdk-go/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/vendor/github.com/1and1/oneandone-cloudserver-sdk-go/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/Azure/go-ansiterm/README.md b/vendor/github.com/Azure/go-ansiterm/README.md deleted file mode 100644 index 261c041e7..000000000 --- a/vendor/github.com/Azure/go-ansiterm/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# go-ansiterm - -This is a cross platform Ansi Terminal Emulation library. It reads a stream of Ansi characters and produces the appropriate function calls. The results of the function calls are platform dependent. - -For example the parser might receive "ESC, [, A" as a stream of three characters. This is the code for Cursor Up (http://www.vt100.net/docs/vt510-rm/CUU). The parser then calls the cursor up function (CUU()) on an event handler. The event handler determines what platform specific work must be done to cause the cursor to move up one position. - -The parser (parser.go) is a partial implementation of this state machine (http://vt100.net/emu/vt500_parser.png). There are also two event handler implementations, one for tests (test_event_handler.go) to validate that the expected events are being produced and called, the other is a Windows implementation (winterm/win_event_handler.go). - -See parser_test.go for examples exercising the state machine and generating appropriate function calls. - ------ -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/vendor/github.com/Azure/go-ansiterm/constants.go b/vendor/github.com/Azure/go-ansiterm/constants.go deleted file mode 100644 index 96504a33b..000000000 --- a/vendor/github.com/Azure/go-ansiterm/constants.go +++ /dev/null @@ -1,188 +0,0 @@ -package ansiterm - -const LogEnv = "DEBUG_TERMINAL" - -// ANSI constants -// References: -// -- http://www.ecma-international.org/publications/standards/Ecma-048.htm -// -- http://man7.org/linux/man-pages/man4/console_codes.4.html -// -- http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html -// -- http://en.wikipedia.org/wiki/ANSI_escape_code -// -- http://vt100.net/emu/dec_ansi_parser -// -- http://vt100.net/emu/vt500_parser.svg -// -- http://invisible-island.net/xterm/ctlseqs/ctlseqs.html -// -- http://www.inwap.com/pdp10/ansicode.txt -const ( - // ECMA-48 Set Graphics Rendition - // Note: - // -- Constants leading with an underscore (e.g., _ANSI_xxx) are unsupported or reserved - // -- Fonts could possibly be supported via SetCurrentConsoleFontEx - // -- Windows does not expose the per-window cursor (i.e., caret) blink times - ANSI_SGR_RESET = 0 - ANSI_SGR_BOLD = 1 - ANSI_SGR_DIM = 2 - _ANSI_SGR_ITALIC = 3 - ANSI_SGR_UNDERLINE = 4 - _ANSI_SGR_BLINKSLOW = 5 - _ANSI_SGR_BLINKFAST = 6 - ANSI_SGR_REVERSE = 7 - _ANSI_SGR_INVISIBLE = 8 - _ANSI_SGR_LINETHROUGH = 9 - _ANSI_SGR_FONT_00 = 10 - _ANSI_SGR_FONT_01 = 11 - _ANSI_SGR_FONT_02 = 12 - _ANSI_SGR_FONT_03 = 13 - _ANSI_SGR_FONT_04 = 14 - _ANSI_SGR_FONT_05 = 15 - _ANSI_SGR_FONT_06 = 16 - _ANSI_SGR_FONT_07 = 17 - _ANSI_SGR_FONT_08 = 18 - _ANSI_SGR_FONT_09 = 19 - _ANSI_SGR_FONT_10 = 20 - _ANSI_SGR_DOUBLEUNDERLINE = 21 - ANSI_SGR_BOLD_DIM_OFF = 22 - _ANSI_SGR_ITALIC_OFF = 23 - ANSI_SGR_UNDERLINE_OFF = 24 - _ANSI_SGR_BLINK_OFF = 25 - _ANSI_SGR_RESERVED_00 = 26 - ANSI_SGR_REVERSE_OFF = 27 - _ANSI_SGR_INVISIBLE_OFF = 28 - _ANSI_SGR_LINETHROUGH_OFF = 29 - ANSI_SGR_FOREGROUND_BLACK = 30 - ANSI_SGR_FOREGROUND_RED = 31 - ANSI_SGR_FOREGROUND_GREEN = 32 - ANSI_SGR_FOREGROUND_YELLOW = 33 - ANSI_SGR_FOREGROUND_BLUE = 34 - ANSI_SGR_FOREGROUND_MAGENTA = 35 - ANSI_SGR_FOREGROUND_CYAN = 36 - ANSI_SGR_FOREGROUND_WHITE = 37 - _ANSI_SGR_RESERVED_01 = 38 - ANSI_SGR_FOREGROUND_DEFAULT = 39 - ANSI_SGR_BACKGROUND_BLACK = 40 - ANSI_SGR_BACKGROUND_RED = 41 - ANSI_SGR_BACKGROUND_GREEN = 42 - ANSI_SGR_BACKGROUND_YELLOW = 43 - ANSI_SGR_BACKGROUND_BLUE = 44 - ANSI_SGR_BACKGROUND_MAGENTA = 45 - ANSI_SGR_BACKGROUND_CYAN = 46 - ANSI_SGR_BACKGROUND_WHITE = 47 - _ANSI_SGR_RESERVED_02 = 48 - ANSI_SGR_BACKGROUND_DEFAULT = 49 - // 50 - 65: Unsupported - - ANSI_MAX_CMD_LENGTH = 4096 - - MAX_INPUT_EVENTS = 128 - DEFAULT_WIDTH = 80 - DEFAULT_HEIGHT = 24 - - ANSI_BEL = 0x07 - ANSI_BACKSPACE = 0x08 - ANSI_TAB = 0x09 - ANSI_LINE_FEED = 0x0A - ANSI_VERTICAL_TAB = 0x0B - ANSI_FORM_FEED = 0x0C - ANSI_CARRIAGE_RETURN = 0x0D - ANSI_ESCAPE_PRIMARY = 0x1B - ANSI_ESCAPE_SECONDARY = 0x5B - ANSI_OSC_STRING_ENTRY = 0x5D - ANSI_COMMAND_FIRST = 0x40 - ANSI_COMMAND_LAST = 0x7E - DCS_ENTRY = 0x90 - CSI_ENTRY = 0x9B - OSC_STRING = 0x9D - ANSI_PARAMETER_SEP = ";" - ANSI_CMD_G0 = '(' - ANSI_CMD_G1 = ')' - ANSI_CMD_G2 = '*' - ANSI_CMD_G3 = '+' - ANSI_CMD_DECPNM = '>' - ANSI_CMD_DECPAM = '=' - ANSI_CMD_OSC = ']' - ANSI_CMD_STR_TERM = '\\' - - KEY_CONTROL_PARAM_2 = ";2" - KEY_CONTROL_PARAM_3 = ";3" - KEY_CONTROL_PARAM_4 = ";4" - KEY_CONTROL_PARAM_5 = ";5" - KEY_CONTROL_PARAM_6 = ";6" - KEY_CONTROL_PARAM_7 = ";7" - KEY_CONTROL_PARAM_8 = ";8" - KEY_ESC_CSI = "\x1B[" - KEY_ESC_N = "\x1BN" - KEY_ESC_O = "\x1BO" - - FILL_CHARACTER = ' ' -) - -func getByteRange(start byte, end byte) []byte { - bytes := make([]byte, 0, 32) - for i := start; i <= end; i++ { - bytes = append(bytes, byte(i)) - } - - return bytes -} - -var toGroundBytes = getToGroundBytes() -var executors = getExecuteBytes() - -// SPACE 20+A0 hex Always and everywhere a blank space -// Intermediate 20-2F hex !"#$%&'()*+,-./ -var intermeds = getByteRange(0x20, 0x2F) - -// Parameters 30-3F hex 0123456789:;<=>? -// CSI Parameters 30-39, 3B hex 0123456789; -var csiParams = getByteRange(0x30, 0x3F) - -var csiCollectables = append(getByteRange(0x30, 0x39), getByteRange(0x3B, 0x3F)...) - -// Uppercase 40-5F hex @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ -var upperCase = getByteRange(0x40, 0x5F) - -// Lowercase 60-7E hex `abcdefghijlkmnopqrstuvwxyz{|}~ -var lowerCase = getByteRange(0x60, 0x7E) - -// Alphabetics 40-7E hex (all of upper and lower case) -var alphabetics = append(upperCase, lowerCase...) - -var printables = getByteRange(0x20, 0x7F) - -var escapeIntermediateToGroundBytes = getByteRange(0x30, 0x7E) -var escapeToGroundBytes = getEscapeToGroundBytes() - -// See http://www.vt100.net/emu/vt500_parser.png for description of the complex -// byte ranges below - -func getEscapeToGroundBytes() []byte { - escapeToGroundBytes := getByteRange(0x30, 0x4F) - escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x51, 0x57)...) - escapeToGroundBytes = append(escapeToGroundBytes, 0x59) - escapeToGroundBytes = append(escapeToGroundBytes, 0x5A) - escapeToGroundBytes = append(escapeToGroundBytes, 0x5C) - escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x60, 0x7E)...) - return escapeToGroundBytes -} - -func getExecuteBytes() []byte { - executeBytes := getByteRange(0x00, 0x17) - executeBytes = append(executeBytes, 0x19) - executeBytes = append(executeBytes, getByteRange(0x1C, 0x1F)...) - return executeBytes -} - -func getToGroundBytes() []byte { - groundBytes := []byte{0x18} - groundBytes = append(groundBytes, 0x1A) - groundBytes = append(groundBytes, getByteRange(0x80, 0x8F)...) - groundBytes = append(groundBytes, getByteRange(0x91, 0x97)...) - groundBytes = append(groundBytes, 0x99) - groundBytes = append(groundBytes, 0x9A) - groundBytes = append(groundBytes, 0x9C) - return groundBytes -} - -// Delete 7F hex Always and everywhere ignored -// C1 Control 80-9F hex 32 additional control characters -// G1 Displayable A1-FE hex 94 additional displayable characters -// Special A0+FF hex Same as SPACE and DELETE diff --git a/vendor/github.com/Azure/go-ansiterm/context.go b/vendor/github.com/Azure/go-ansiterm/context.go deleted file mode 100644 index 8d66e777c..000000000 --- a/vendor/github.com/Azure/go-ansiterm/context.go +++ /dev/null @@ -1,7 +0,0 @@ -package ansiterm - -type ansiContext struct { - currentChar byte - paramBuffer []byte - interBuffer []byte -} diff --git a/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go b/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go deleted file mode 100644 index bcbe00d0c..000000000 --- a/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go +++ /dev/null @@ -1,49 +0,0 @@ -package ansiterm - -type csiEntryState struct { - baseState -} - -func (csiState csiEntryState) Handle(b byte) (s state, e error) { - csiState.parser.logf("CsiEntry::Handle %#x", b) - - nextState, err := csiState.baseState.Handle(b) - if nextState != nil || err != nil { - return nextState, err - } - - switch { - case sliceContains(alphabetics, b): - return csiState.parser.ground, nil - case sliceContains(csiCollectables, b): - return csiState.parser.csiParam, nil - case sliceContains(executors, b): - return csiState, csiState.parser.execute() - } - - return csiState, nil -} - -func (csiState csiEntryState) Transition(s state) error { - csiState.parser.logf("CsiEntry::Transition %s --> %s", csiState.Name(), s.Name()) - csiState.baseState.Transition(s) - - switch s { - case csiState.parser.ground: - return csiState.parser.csiDispatch() - case csiState.parser.csiParam: - switch { - case sliceContains(csiParams, csiState.parser.context.currentChar): - csiState.parser.collectParam() - case sliceContains(intermeds, csiState.parser.context.currentChar): - csiState.parser.collectInter() - } - } - - return nil -} - -func (csiState csiEntryState) Enter() error { - csiState.parser.clear() - return nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/csi_param_state.go b/vendor/github.com/Azure/go-ansiterm/csi_param_state.go deleted file mode 100644 index 7ed5e01c3..000000000 --- a/vendor/github.com/Azure/go-ansiterm/csi_param_state.go +++ /dev/null @@ -1,38 +0,0 @@ -package ansiterm - -type csiParamState struct { - baseState -} - -func (csiState csiParamState) Handle(b byte) (s state, e error) { - csiState.parser.logf("CsiParam::Handle %#x", b) - - nextState, err := csiState.baseState.Handle(b) - if nextState != nil || err != nil { - return nextState, err - } - - switch { - case sliceContains(alphabetics, b): - return csiState.parser.ground, nil - case sliceContains(csiCollectables, b): - csiState.parser.collectParam() - return csiState, nil - case sliceContains(executors, b): - return csiState, csiState.parser.execute() - } - - return csiState, nil -} - -func (csiState csiParamState) Transition(s state) error { - csiState.parser.logf("CsiParam::Transition %s --> %s", csiState.Name(), s.Name()) - csiState.baseState.Transition(s) - - switch s { - case csiState.parser.ground: - return csiState.parser.csiDispatch() - } - - return nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go b/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go deleted file mode 100644 index 1c719db9e..000000000 --- a/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go +++ /dev/null @@ -1,36 +0,0 @@ -package ansiterm - -type escapeIntermediateState struct { - baseState -} - -func (escState escapeIntermediateState) Handle(b byte) (s state, e error) { - escState.parser.logf("escapeIntermediateState::Handle %#x", b) - nextState, err := escState.baseState.Handle(b) - if nextState != nil || err != nil { - return nextState, err - } - - switch { - case sliceContains(intermeds, b): - return escState, escState.parser.collectInter() - case sliceContains(executors, b): - return escState, escState.parser.execute() - case sliceContains(escapeIntermediateToGroundBytes, b): - return escState.parser.ground, nil - } - - return escState, nil -} - -func (escState escapeIntermediateState) Transition(s state) error { - escState.parser.logf("escapeIntermediateState::Transition %s --> %s", escState.Name(), s.Name()) - escState.baseState.Transition(s) - - switch s { - case escState.parser.ground: - return escState.parser.escDispatch() - } - - return nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/escape_state.go b/vendor/github.com/Azure/go-ansiterm/escape_state.go deleted file mode 100644 index 6390abd23..000000000 --- a/vendor/github.com/Azure/go-ansiterm/escape_state.go +++ /dev/null @@ -1,47 +0,0 @@ -package ansiterm - -type escapeState struct { - baseState -} - -func (escState escapeState) Handle(b byte) (s state, e error) { - escState.parser.logf("escapeState::Handle %#x", b) - nextState, err := escState.baseState.Handle(b) - if nextState != nil || err != nil { - return nextState, err - } - - switch { - case b == ANSI_ESCAPE_SECONDARY: - return escState.parser.csiEntry, nil - case b == ANSI_OSC_STRING_ENTRY: - return escState.parser.oscString, nil - case sliceContains(executors, b): - return escState, escState.parser.execute() - case sliceContains(escapeToGroundBytes, b): - return escState.parser.ground, nil - case sliceContains(intermeds, b): - return escState.parser.escapeIntermediate, nil - } - - return escState, nil -} - -func (escState escapeState) Transition(s state) error { - escState.parser.logf("Escape::Transition %s --> %s", escState.Name(), s.Name()) - escState.baseState.Transition(s) - - switch s { - case escState.parser.ground: - return escState.parser.escDispatch() - case escState.parser.escapeIntermediate: - return escState.parser.collectInter() - } - - return nil -} - -func (escState escapeState) Enter() error { - escState.parser.clear() - return nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/event_handler.go b/vendor/github.com/Azure/go-ansiterm/event_handler.go deleted file mode 100644 index 98087b38c..000000000 --- a/vendor/github.com/Azure/go-ansiterm/event_handler.go +++ /dev/null @@ -1,90 +0,0 @@ -package ansiterm - -type AnsiEventHandler interface { - // Print - Print(b byte) error - - // Execute C0 commands - Execute(b byte) error - - // CUrsor Up - CUU(int) error - - // CUrsor Down - CUD(int) error - - // CUrsor Forward - CUF(int) error - - // CUrsor Backward - CUB(int) error - - // Cursor to Next Line - CNL(int) error - - // Cursor to Previous Line - CPL(int) error - - // Cursor Horizontal position Absolute - CHA(int) error - - // Vertical line Position Absolute - VPA(int) error - - // CUrsor Position - CUP(int, int) error - - // Horizontal and Vertical Position (depends on PUM) - HVP(int, int) error - - // Text Cursor Enable Mode - DECTCEM(bool) error - - // Origin Mode - DECOM(bool) error - - // 132 Column Mode - DECCOLM(bool) error - - // Erase in Display - ED(int) error - - // Erase in Line - EL(int) error - - // Insert Line - IL(int) error - - // Delete Line - DL(int) error - - // Insert Character - ICH(int) error - - // Delete Character - DCH(int) error - - // Set Graphics Rendition - SGR([]int) error - - // Pan Down - SU(int) error - - // Pan Up - SD(int) error - - // Device Attributes - DA([]string) error - - // Set Top and Bottom Margins - DECSTBM(int, int) error - - // Index - IND() error - - // Reverse Index - RI() error - - // Flush updates from previous commands - Flush() error -} diff --git a/vendor/github.com/Azure/go-ansiterm/ground_state.go b/vendor/github.com/Azure/go-ansiterm/ground_state.go deleted file mode 100644 index 52451e946..000000000 --- a/vendor/github.com/Azure/go-ansiterm/ground_state.go +++ /dev/null @@ -1,24 +0,0 @@ -package ansiterm - -type groundState struct { - baseState -} - -func (gs groundState) Handle(b byte) (s state, e error) { - gs.parser.context.currentChar = b - - nextState, err := gs.baseState.Handle(b) - if nextState != nil || err != nil { - return nextState, err - } - - switch { - case sliceContains(printables, b): - return gs, gs.parser.print() - - case sliceContains(executors, b): - return gs, gs.parser.execute() - } - - return gs, nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/osc_string_state.go b/vendor/github.com/Azure/go-ansiterm/osc_string_state.go deleted file mode 100644 index 593b10ab6..000000000 --- a/vendor/github.com/Azure/go-ansiterm/osc_string_state.go +++ /dev/null @@ -1,31 +0,0 @@ -package ansiterm - -type oscStringState struct { - baseState -} - -func (oscState oscStringState) Handle(b byte) (s state, e error) { - oscState.parser.logf("OscString::Handle %#x", b) - nextState, err := oscState.baseState.Handle(b) - if nextState != nil || err != nil { - return nextState, err - } - - switch { - case isOscStringTerminator(b): - return oscState.parser.ground, nil - } - - return oscState, nil -} - -// See below for OSC string terminators for linux -// http://man7.org/linux/man-pages/man4/console_codes.4.html -func isOscStringTerminator(b byte) bool { - - if b == ANSI_BEL || b == 0x5C { - return true - } - - return false -} diff --git a/vendor/github.com/Azure/go-ansiterm/parser.go b/vendor/github.com/Azure/go-ansiterm/parser.go deleted file mode 100644 index 03cec7ada..000000000 --- a/vendor/github.com/Azure/go-ansiterm/parser.go +++ /dev/null @@ -1,151 +0,0 @@ -package ansiterm - -import ( - "errors" - "log" - "os" -) - -type AnsiParser struct { - currState state - eventHandler AnsiEventHandler - context *ansiContext - csiEntry state - csiParam state - dcsEntry state - escape state - escapeIntermediate state - error state - ground state - oscString state - stateMap []state - - logf func(string, ...interface{}) -} - -type Option func(*AnsiParser) - -func WithLogf(f func(string, ...interface{})) Option { - return func(ap *AnsiParser) { - ap.logf = f - } -} - -func CreateParser(initialState string, evtHandler AnsiEventHandler, opts ...Option) *AnsiParser { - ap := &AnsiParser{ - eventHandler: evtHandler, - context: &ansiContext{}, - } - for _, o := range opts { - o(ap) - } - - if isDebugEnv := os.Getenv(LogEnv); isDebugEnv == "1" { - logFile, _ := os.Create("ansiParser.log") - logger := log.New(logFile, "", log.LstdFlags) - if ap.logf != nil { - l := ap.logf - ap.logf = func(s string, v ...interface{}) { - l(s, v...) - logger.Printf(s, v...) - } - } else { - ap.logf = logger.Printf - } - } - - if ap.logf == nil { - ap.logf = func(string, ...interface{}) {} - } - - ap.csiEntry = csiEntryState{baseState{name: "CsiEntry", parser: ap}} - ap.csiParam = csiParamState{baseState{name: "CsiParam", parser: ap}} - ap.dcsEntry = dcsEntryState{baseState{name: "DcsEntry", parser: ap}} - ap.escape = escapeState{baseState{name: "Escape", parser: ap}} - ap.escapeIntermediate = escapeIntermediateState{baseState{name: "EscapeIntermediate", parser: ap}} - ap.error = errorState{baseState{name: "Error", parser: ap}} - ap.ground = groundState{baseState{name: "Ground", parser: ap}} - ap.oscString = oscStringState{baseState{name: "OscString", parser: ap}} - - ap.stateMap = []state{ - ap.csiEntry, - ap.csiParam, - ap.dcsEntry, - ap.escape, - ap.escapeIntermediate, - ap.error, - ap.ground, - ap.oscString, - } - - ap.currState = getState(initialState, ap.stateMap) - - ap.logf("CreateParser: parser %p", ap) - return ap -} - -func getState(name string, states []state) state { - for _, el := range states { - if el.Name() == name { - return el - } - } - - return nil -} - -func (ap *AnsiParser) Parse(bytes []byte) (int, error) { - for i, b := range bytes { - if err := ap.handle(b); err != nil { - return i, err - } - } - - return len(bytes), ap.eventHandler.Flush() -} - -func (ap *AnsiParser) handle(b byte) error { - ap.context.currentChar = b - newState, err := ap.currState.Handle(b) - if err != nil { - return err - } - - if newState == nil { - ap.logf("WARNING: newState is nil") - return errors.New("New state of 'nil' is invalid.") - } - - if newState != ap.currState { - if err := ap.changeState(newState); err != nil { - return err - } - } - - return nil -} - -func (ap *AnsiParser) changeState(newState state) error { - ap.logf("ChangeState %s --> %s", ap.currState.Name(), newState.Name()) - - // Exit old state - if err := ap.currState.Exit(); err != nil { - ap.logf("Exit state '%s' failed with : '%v'", ap.currState.Name(), err) - return err - } - - // Perform transition action - if err := ap.currState.Transition(newState); err != nil { - ap.logf("Transition from '%s' to '%s' failed with: '%v'", ap.currState.Name(), newState.Name, err) - return err - } - - // Enter new state - if err := newState.Enter(); err != nil { - ap.logf("Enter state '%s' failed with: '%v'", newState.Name(), err) - return err - } - - ap.currState = newState - return nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go b/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go deleted file mode 100644 index de0a1f9cd..000000000 --- a/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go +++ /dev/null @@ -1,99 +0,0 @@ -package ansiterm - -import ( - "strconv" -) - -func parseParams(bytes []byte) ([]string, error) { - paramBuff := make([]byte, 0, 0) - params := []string{} - - for _, v := range bytes { - if v == ';' { - if len(paramBuff) > 0 { - // Completed parameter, append it to the list - s := string(paramBuff) - params = append(params, s) - paramBuff = make([]byte, 0, 0) - } - } else { - paramBuff = append(paramBuff, v) - } - } - - // Last parameter may not be terminated with ';' - if len(paramBuff) > 0 { - s := string(paramBuff) - params = append(params, s) - } - - return params, nil -} - -func parseCmd(context ansiContext) (string, error) { - return string(context.currentChar), nil -} - -func getInt(params []string, dflt int) int { - i := getInts(params, 1, dflt)[0] - return i -} - -func getInts(params []string, minCount int, dflt int) []int { - ints := []int{} - - for _, v := range params { - i, _ := strconv.Atoi(v) - // Zero is mapped to the default value in VT100. - if i == 0 { - i = dflt - } - ints = append(ints, i) - } - - if len(ints) < minCount { - remaining := minCount - len(ints) - for i := 0; i < remaining; i++ { - ints = append(ints, dflt) - } - } - - return ints -} - -func (ap *AnsiParser) modeDispatch(param string, set bool) error { - switch param { - case "?3": - return ap.eventHandler.DECCOLM(set) - case "?6": - return ap.eventHandler.DECOM(set) - case "?25": - return ap.eventHandler.DECTCEM(set) - } - return nil -} - -func (ap *AnsiParser) hDispatch(params []string) error { - if len(params) == 1 { - return ap.modeDispatch(params[0], true) - } - - return nil -} - -func (ap *AnsiParser) lDispatch(params []string) error { - if len(params) == 1 { - return ap.modeDispatch(params[0], false) - } - - return nil -} - -func getEraseParam(params []string) int { - param := getInt(params, 0) - if param < 0 || 3 < param { - param = 0 - } - - return param -} diff --git a/vendor/github.com/Azure/go-ansiterm/parser_actions.go b/vendor/github.com/Azure/go-ansiterm/parser_actions.go deleted file mode 100644 index 0bb5e51e9..000000000 --- a/vendor/github.com/Azure/go-ansiterm/parser_actions.go +++ /dev/null @@ -1,119 +0,0 @@ -package ansiterm - -func (ap *AnsiParser) collectParam() error { - currChar := ap.context.currentChar - ap.logf("collectParam %#x", currChar) - ap.context.paramBuffer = append(ap.context.paramBuffer, currChar) - return nil -} - -func (ap *AnsiParser) collectInter() error { - currChar := ap.context.currentChar - ap.logf("collectInter %#x", currChar) - ap.context.paramBuffer = append(ap.context.interBuffer, currChar) - return nil -} - -func (ap *AnsiParser) escDispatch() error { - cmd, _ := parseCmd(*ap.context) - intermeds := ap.context.interBuffer - ap.logf("escDispatch currentChar: %#x", ap.context.currentChar) - ap.logf("escDispatch: %v(%v)", cmd, intermeds) - - switch cmd { - case "D": // IND - return ap.eventHandler.IND() - case "E": // NEL, equivalent to CRLF - err := ap.eventHandler.Execute(ANSI_CARRIAGE_RETURN) - if err == nil { - err = ap.eventHandler.Execute(ANSI_LINE_FEED) - } - return err - case "M": // RI - return ap.eventHandler.RI() - } - - return nil -} - -func (ap *AnsiParser) csiDispatch() error { - cmd, _ := parseCmd(*ap.context) - params, _ := parseParams(ap.context.paramBuffer) - ap.logf("Parsed params: %v with length: %d", params, len(params)) - - ap.logf("csiDispatch: %v(%v)", cmd, params) - - switch cmd { - case "@": - return ap.eventHandler.ICH(getInt(params, 1)) - case "A": - return ap.eventHandler.CUU(getInt(params, 1)) - case "B": - return ap.eventHandler.CUD(getInt(params, 1)) - case "C": - return ap.eventHandler.CUF(getInt(params, 1)) - case "D": - return ap.eventHandler.CUB(getInt(params, 1)) - case "E": - return ap.eventHandler.CNL(getInt(params, 1)) - case "F": - return ap.eventHandler.CPL(getInt(params, 1)) - case "G": - return ap.eventHandler.CHA(getInt(params, 1)) - case "H": - ints := getInts(params, 2, 1) - x, y := ints[0], ints[1] - return ap.eventHandler.CUP(x, y) - case "J": - param := getEraseParam(params) - return ap.eventHandler.ED(param) - case "K": - param := getEraseParam(params) - return ap.eventHandler.EL(param) - case "L": - return ap.eventHandler.IL(getInt(params, 1)) - case "M": - return ap.eventHandler.DL(getInt(params, 1)) - case "P": - return ap.eventHandler.DCH(getInt(params, 1)) - case "S": - return ap.eventHandler.SU(getInt(params, 1)) - case "T": - return ap.eventHandler.SD(getInt(params, 1)) - case "c": - return ap.eventHandler.DA(params) - case "d": - return ap.eventHandler.VPA(getInt(params, 1)) - case "f": - ints := getInts(params, 2, 1) - x, y := ints[0], ints[1] - return ap.eventHandler.HVP(x, y) - case "h": - return ap.hDispatch(params) - case "l": - return ap.lDispatch(params) - case "m": - return ap.eventHandler.SGR(getInts(params, 1, 0)) - case "r": - ints := getInts(params, 2, 1) - top, bottom := ints[0], ints[1] - return ap.eventHandler.DECSTBM(top, bottom) - default: - ap.logf("ERROR: Unsupported CSI command: '%s', with full context: %v", cmd, ap.context) - return nil - } - -} - -func (ap *AnsiParser) print() error { - return ap.eventHandler.Print(ap.context.currentChar) -} - -func (ap *AnsiParser) clear() error { - ap.context = &ansiContext{} - return nil -} - -func (ap *AnsiParser) execute() error { - return ap.eventHandler.Execute(ap.context.currentChar) -} diff --git a/vendor/github.com/Azure/go-ansiterm/states.go b/vendor/github.com/Azure/go-ansiterm/states.go deleted file mode 100644 index f2ea1fcd1..000000000 --- a/vendor/github.com/Azure/go-ansiterm/states.go +++ /dev/null @@ -1,71 +0,0 @@ -package ansiterm - -type stateID int - -type state interface { - Enter() error - Exit() error - Handle(byte) (state, error) - Name() string - Transition(state) error -} - -type baseState struct { - name string - parser *AnsiParser -} - -func (base baseState) Enter() error { - return nil -} - -func (base baseState) Exit() error { - return nil -} - -func (base baseState) Handle(b byte) (s state, e error) { - - switch { - case b == CSI_ENTRY: - return base.parser.csiEntry, nil - case b == DCS_ENTRY: - return base.parser.dcsEntry, nil - case b == ANSI_ESCAPE_PRIMARY: - return base.parser.escape, nil - case b == OSC_STRING: - return base.parser.oscString, nil - case sliceContains(toGroundBytes, b): - return base.parser.ground, nil - } - - return nil, nil -} - -func (base baseState) Name() string { - return base.name -} - -func (base baseState) Transition(s state) error { - if s == base.parser.ground { - execBytes := []byte{0x18} - execBytes = append(execBytes, 0x1A) - execBytes = append(execBytes, getByteRange(0x80, 0x8F)...) - execBytes = append(execBytes, getByteRange(0x91, 0x97)...) - execBytes = append(execBytes, 0x99) - execBytes = append(execBytes, 0x9A) - - if sliceContains(execBytes, base.parser.context.currentChar) { - return base.parser.execute() - } - } - - return nil -} - -type dcsEntryState struct { - baseState -} - -type errorState struct { - baseState -} diff --git a/vendor/github.com/Azure/go-ansiterm/utilities.go b/vendor/github.com/Azure/go-ansiterm/utilities.go deleted file mode 100644 index 392114493..000000000 --- a/vendor/github.com/Azure/go-ansiterm/utilities.go +++ /dev/null @@ -1,21 +0,0 @@ -package ansiterm - -import ( - "strconv" -) - -func sliceContains(bytes []byte, b byte) bool { - for _, v := range bytes { - if v == b { - return true - } - } - - return false -} - -func convertBytesToInteger(bytes []byte) int { - s := string(bytes) - i, _ := strconv.Atoi(s) - return i -} diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go b/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go deleted file mode 100644 index a67327972..000000000 --- a/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go +++ /dev/null @@ -1,182 +0,0 @@ -// +build windows - -package winterm - -import ( - "fmt" - "os" - "strconv" - "strings" - "syscall" - - "github.com/Azure/go-ansiterm" -) - -// Windows keyboard constants -// See https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx. -const ( - VK_PRIOR = 0x21 // PAGE UP key - VK_NEXT = 0x22 // PAGE DOWN key - VK_END = 0x23 // END key - VK_HOME = 0x24 // HOME key - VK_LEFT = 0x25 // LEFT ARROW key - VK_UP = 0x26 // UP ARROW key - VK_RIGHT = 0x27 // RIGHT ARROW key - VK_DOWN = 0x28 // DOWN ARROW key - VK_SELECT = 0x29 // SELECT key - VK_PRINT = 0x2A // PRINT key - VK_EXECUTE = 0x2B // EXECUTE key - VK_SNAPSHOT = 0x2C // PRINT SCREEN key - VK_INSERT = 0x2D // INS key - VK_DELETE = 0x2E // DEL key - VK_HELP = 0x2F // HELP key - VK_F1 = 0x70 // F1 key - VK_F2 = 0x71 // F2 key - VK_F3 = 0x72 // F3 key - VK_F4 = 0x73 // F4 key - VK_F5 = 0x74 // F5 key - VK_F6 = 0x75 // F6 key - VK_F7 = 0x76 // F7 key - VK_F8 = 0x77 // F8 key - VK_F9 = 0x78 // F9 key - VK_F10 = 0x79 // F10 key - VK_F11 = 0x7A // F11 key - VK_F12 = 0x7B // F12 key - - RIGHT_ALT_PRESSED = 0x0001 - LEFT_ALT_PRESSED = 0x0002 - RIGHT_CTRL_PRESSED = 0x0004 - LEFT_CTRL_PRESSED = 0x0008 - SHIFT_PRESSED = 0x0010 - NUMLOCK_ON = 0x0020 - SCROLLLOCK_ON = 0x0040 - CAPSLOCK_ON = 0x0080 - ENHANCED_KEY = 0x0100 -) - -type ansiCommand struct { - CommandBytes []byte - Command string - Parameters []string - IsSpecial bool -} - -func newAnsiCommand(command []byte) *ansiCommand { - - if isCharacterSelectionCmdChar(command[1]) { - // Is Character Set Selection commands - return &ansiCommand{ - CommandBytes: command, - Command: string(command), - IsSpecial: true, - } - } - - // last char is command character - lastCharIndex := len(command) - 1 - - ac := &ansiCommand{ - CommandBytes: command, - Command: string(command[lastCharIndex]), - IsSpecial: false, - } - - // more than a single escape - if lastCharIndex != 0 { - start := 1 - // skip if double char escape sequence - if command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_ESCAPE_SECONDARY { - start++ - } - // convert this to GetNextParam method - ac.Parameters = strings.Split(string(command[start:lastCharIndex]), ansiterm.ANSI_PARAMETER_SEP) - } - - return ac -} - -func (ac *ansiCommand) paramAsSHORT(index int, defaultValue int16) int16 { - if index < 0 || index >= len(ac.Parameters) { - return defaultValue - } - - param, err := strconv.ParseInt(ac.Parameters[index], 10, 16) - if err != nil { - return defaultValue - } - - return int16(param) -} - -func (ac *ansiCommand) String() string { - return fmt.Sprintf("0x%v \"%v\" (\"%v\")", - bytesToHex(ac.CommandBytes), - ac.Command, - strings.Join(ac.Parameters, "\",\"")) -} - -// isAnsiCommandChar returns true if the passed byte falls within the range of ANSI commands. -// See http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html. -func isAnsiCommandChar(b byte) bool { - switch { - case ansiterm.ANSI_COMMAND_FIRST <= b && b <= ansiterm.ANSI_COMMAND_LAST && b != ansiterm.ANSI_ESCAPE_SECONDARY: - return true - case b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_OSC || b == ansiterm.ANSI_CMD_DECPAM || b == ansiterm.ANSI_CMD_DECPNM: - // non-CSI escape sequence terminator - return true - case b == ansiterm.ANSI_CMD_STR_TERM || b == ansiterm.ANSI_BEL: - // String escape sequence terminator - return true - } - return false -} - -func isXtermOscSequence(command []byte, current byte) bool { - return (len(command) >= 2 && command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_CMD_OSC && current != ansiterm.ANSI_BEL) -} - -func isCharacterSelectionCmdChar(b byte) bool { - return (b == ansiterm.ANSI_CMD_G0 || b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_G2 || b == ansiterm.ANSI_CMD_G3) -} - -// bytesToHex converts a slice of bytes to a human-readable string. -func bytesToHex(b []byte) string { - hex := make([]string, len(b)) - for i, ch := range b { - hex[i] = fmt.Sprintf("%X", ch) - } - return strings.Join(hex, "") -} - -// ensureInRange adjusts the passed value, if necessary, to ensure it is within -// the passed min / max range. -func ensureInRange(n int16, min int16, max int16) int16 { - if n < min { - return min - } else if n > max { - return max - } else { - return n - } -} - -func GetStdFile(nFile int) (*os.File, uintptr) { - var file *os.File - switch nFile { - case syscall.STD_INPUT_HANDLE: - file = os.Stdin - case syscall.STD_OUTPUT_HANDLE: - file = os.Stdout - case syscall.STD_ERROR_HANDLE: - file = os.Stderr - default: - panic(fmt.Errorf("Invalid standard handle identifier: %v", nFile)) - } - - fd, err := syscall.GetStdHandle(nFile) - if err != nil { - panic(fmt.Errorf("Invalid standard handle identifier: %v -- %v", nFile, err)) - } - - return file, uintptr(fd) -} diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/api.go b/vendor/github.com/Azure/go-ansiterm/winterm/api.go deleted file mode 100644 index 6055e33b9..000000000 --- a/vendor/github.com/Azure/go-ansiterm/winterm/api.go +++ /dev/null @@ -1,327 +0,0 @@ -// +build windows - -package winterm - -import ( - "fmt" - "syscall" - "unsafe" -) - -//=========================================================================================================== -// IMPORTANT NOTE: -// -// The methods below make extensive use of the "unsafe" package to obtain the required pointers. -// Beginning in Go 1.3, the garbage collector may release local variables (e.g., incoming arguments, stack -// variables) the pointers reference *before* the API completes. -// -// As a result, in those cases, the code must hint that the variables remain in active by invoking the -// dummy method "use" (see below). Newer versions of Go are planned to change the mechanism to no longer -// require unsafe pointers. -// -// If you add or modify methods, ENSURE protection of local variables through the "use" builtin to inform -// the garbage collector the variables remain in use if: -// -// -- The value is not a pointer (e.g., int32, struct) -// -- The value is not referenced by the method after passing the pointer to Windows -// -// See http://golang.org/doc/go1.3. -//=========================================================================================================== - -var ( - kernel32DLL = syscall.NewLazyDLL("kernel32.dll") - - getConsoleCursorInfoProc = kernel32DLL.NewProc("GetConsoleCursorInfo") - setConsoleCursorInfoProc = kernel32DLL.NewProc("SetConsoleCursorInfo") - setConsoleCursorPositionProc = kernel32DLL.NewProc("SetConsoleCursorPosition") - setConsoleModeProc = kernel32DLL.NewProc("SetConsoleMode") - getConsoleScreenBufferInfoProc = kernel32DLL.NewProc("GetConsoleScreenBufferInfo") - setConsoleScreenBufferSizeProc = kernel32DLL.NewProc("SetConsoleScreenBufferSize") - scrollConsoleScreenBufferProc = kernel32DLL.NewProc("ScrollConsoleScreenBufferA") - setConsoleTextAttributeProc = kernel32DLL.NewProc("SetConsoleTextAttribute") - setConsoleWindowInfoProc = kernel32DLL.NewProc("SetConsoleWindowInfo") - writeConsoleOutputProc = kernel32DLL.NewProc("WriteConsoleOutputW") - readConsoleInputProc = kernel32DLL.NewProc("ReadConsoleInputW") - waitForSingleObjectProc = kernel32DLL.NewProc("WaitForSingleObject") -) - -// Windows Console constants -const ( - // Console modes - // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx. - ENABLE_PROCESSED_INPUT = 0x0001 - ENABLE_LINE_INPUT = 0x0002 - ENABLE_ECHO_INPUT = 0x0004 - ENABLE_WINDOW_INPUT = 0x0008 - ENABLE_MOUSE_INPUT = 0x0010 - ENABLE_INSERT_MODE = 0x0020 - ENABLE_QUICK_EDIT_MODE = 0x0040 - ENABLE_EXTENDED_FLAGS = 0x0080 - ENABLE_AUTO_POSITION = 0x0100 - ENABLE_VIRTUAL_TERMINAL_INPUT = 0x0200 - - ENABLE_PROCESSED_OUTPUT = 0x0001 - ENABLE_WRAP_AT_EOL_OUTPUT = 0x0002 - ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004 - DISABLE_NEWLINE_AUTO_RETURN = 0x0008 - ENABLE_LVB_GRID_WORLDWIDE = 0x0010 - - // Character attributes - // Note: - // -- The attributes are combined to produce various colors (e.g., Blue + Green will create Cyan). - // Clearing all foreground or background colors results in black; setting all creates white. - // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682088(v=vs.85).aspx#_win32_character_attributes. - FOREGROUND_BLUE uint16 = 0x0001 - FOREGROUND_GREEN uint16 = 0x0002 - FOREGROUND_RED uint16 = 0x0004 - FOREGROUND_INTENSITY uint16 = 0x0008 - FOREGROUND_MASK uint16 = 0x000F - - BACKGROUND_BLUE uint16 = 0x0010 - BACKGROUND_GREEN uint16 = 0x0020 - BACKGROUND_RED uint16 = 0x0040 - BACKGROUND_INTENSITY uint16 = 0x0080 - BACKGROUND_MASK uint16 = 0x00F0 - - COMMON_LVB_MASK uint16 = 0xFF00 - COMMON_LVB_REVERSE_VIDEO uint16 = 0x4000 - COMMON_LVB_UNDERSCORE uint16 = 0x8000 - - // Input event types - // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx. - KEY_EVENT = 0x0001 - MOUSE_EVENT = 0x0002 - WINDOW_BUFFER_SIZE_EVENT = 0x0004 - MENU_EVENT = 0x0008 - FOCUS_EVENT = 0x0010 - - // WaitForSingleObject return codes - WAIT_ABANDONED = 0x00000080 - WAIT_FAILED = 0xFFFFFFFF - WAIT_SIGNALED = 0x0000000 - WAIT_TIMEOUT = 0x00000102 - - // WaitForSingleObject wait duration - WAIT_INFINITE = 0xFFFFFFFF - WAIT_ONE_SECOND = 1000 - WAIT_HALF_SECOND = 500 - WAIT_QUARTER_SECOND = 250 -) - -// Windows API Console types -// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682101(v=vs.85).aspx for Console specific types (e.g., COORD) -// -- See https://msdn.microsoft.com/en-us/library/aa296569(v=vs.60).aspx for comments on alignment -type ( - CHAR_INFO struct { - UnicodeChar uint16 - Attributes uint16 - } - - CONSOLE_CURSOR_INFO struct { - Size uint32 - Visible int32 - } - - CONSOLE_SCREEN_BUFFER_INFO struct { - Size COORD - CursorPosition COORD - Attributes uint16 - Window SMALL_RECT - MaximumWindowSize COORD - } - - COORD struct { - X int16 - Y int16 - } - - SMALL_RECT struct { - Left int16 - Top int16 - Right int16 - Bottom int16 - } - - // INPUT_RECORD is a C/C++ union of which KEY_EVENT_RECORD is one case, it is also the largest - // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx. - INPUT_RECORD struct { - EventType uint16 - KeyEvent KEY_EVENT_RECORD - } - - KEY_EVENT_RECORD struct { - KeyDown int32 - RepeatCount uint16 - VirtualKeyCode uint16 - VirtualScanCode uint16 - UnicodeChar uint16 - ControlKeyState uint32 - } - - WINDOW_BUFFER_SIZE struct { - Size COORD - } -) - -// boolToBOOL converts a Go bool into a Windows int32. -func boolToBOOL(f bool) int32 { - if f { - return int32(1) - } else { - return int32(0) - } -} - -// GetConsoleCursorInfo retrieves information about the size and visiblity of the console cursor. -// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683163(v=vs.85).aspx. -func GetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error { - r1, r2, err := getConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0) - return checkError(r1, r2, err) -} - -// SetConsoleCursorInfo sets the size and visiblity of the console cursor. -// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686019(v=vs.85).aspx. -func SetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error { - r1, r2, err := setConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0) - return checkError(r1, r2, err) -} - -// SetConsoleCursorPosition location of the console cursor. -// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686025(v=vs.85).aspx. -func SetConsoleCursorPosition(handle uintptr, coord COORD) error { - r1, r2, err := setConsoleCursorPositionProc.Call(handle, coordToPointer(coord)) - use(coord) - return checkError(r1, r2, err) -} - -// GetConsoleMode gets the console mode for given file descriptor -// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx. -func GetConsoleMode(handle uintptr) (mode uint32, err error) { - err = syscall.GetConsoleMode(syscall.Handle(handle), &mode) - return mode, err -} - -// SetConsoleMode sets the console mode for given file descriptor -// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx. -func SetConsoleMode(handle uintptr, mode uint32) error { - r1, r2, err := setConsoleModeProc.Call(handle, uintptr(mode), 0) - use(mode) - return checkError(r1, r2, err) -} - -// GetConsoleScreenBufferInfo retrieves information about the specified console screen buffer. -// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683171(v=vs.85).aspx. -func GetConsoleScreenBufferInfo(handle uintptr) (*CONSOLE_SCREEN_BUFFER_INFO, error) { - info := CONSOLE_SCREEN_BUFFER_INFO{} - err := checkError(getConsoleScreenBufferInfoProc.Call(handle, uintptr(unsafe.Pointer(&info)), 0)) - if err != nil { - return nil, err - } - return &info, nil -} - -func ScrollConsoleScreenBuffer(handle uintptr, scrollRect SMALL_RECT, clipRect SMALL_RECT, destOrigin COORD, char CHAR_INFO) error { - r1, r2, err := scrollConsoleScreenBufferProc.Call(handle, uintptr(unsafe.Pointer(&scrollRect)), uintptr(unsafe.Pointer(&clipRect)), coordToPointer(destOrigin), uintptr(unsafe.Pointer(&char))) - use(scrollRect) - use(clipRect) - use(destOrigin) - use(char) - return checkError(r1, r2, err) -} - -// SetConsoleScreenBufferSize sets the size of the console screen buffer. -// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686044(v=vs.85).aspx. -func SetConsoleScreenBufferSize(handle uintptr, coord COORD) error { - r1, r2, err := setConsoleScreenBufferSizeProc.Call(handle, coordToPointer(coord)) - use(coord) - return checkError(r1, r2, err) -} - -// SetConsoleTextAttribute sets the attributes of characters written to the -// console screen buffer by the WriteFile or WriteConsole function. -// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047(v=vs.85).aspx. -func SetConsoleTextAttribute(handle uintptr, attribute uint16) error { - r1, r2, err := setConsoleTextAttributeProc.Call(handle, uintptr(attribute), 0) - use(attribute) - return checkError(r1, r2, err) -} - -// SetConsoleWindowInfo sets the size and position of the console screen buffer's window. -// Note that the size and location must be within and no larger than the backing console screen buffer. -// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686125(v=vs.85).aspx. -func SetConsoleWindowInfo(handle uintptr, isAbsolute bool, rect SMALL_RECT) error { - r1, r2, err := setConsoleWindowInfoProc.Call(handle, uintptr(boolToBOOL(isAbsolute)), uintptr(unsafe.Pointer(&rect))) - use(isAbsolute) - use(rect) - return checkError(r1, r2, err) -} - -// WriteConsoleOutput writes the CHAR_INFOs from the provided buffer to the active console buffer. -// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687404(v=vs.85).aspx. -func WriteConsoleOutput(handle uintptr, buffer []CHAR_INFO, bufferSize COORD, bufferCoord COORD, writeRegion *SMALL_RECT) error { - r1, r2, err := writeConsoleOutputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), coordToPointer(bufferSize), coordToPointer(bufferCoord), uintptr(unsafe.Pointer(writeRegion))) - use(buffer) - use(bufferSize) - use(bufferCoord) - return checkError(r1, r2, err) -} - -// ReadConsoleInput reads (and removes) data from the console input buffer. -// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684961(v=vs.85).aspx. -func ReadConsoleInput(handle uintptr, buffer []INPUT_RECORD, count *uint32) error { - r1, r2, err := readConsoleInputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), uintptr(len(buffer)), uintptr(unsafe.Pointer(count))) - use(buffer) - return checkError(r1, r2, err) -} - -// WaitForSingleObject waits for the passed handle to be signaled. -// It returns true if the handle was signaled; false otherwise. -// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032(v=vs.85).aspx. -func WaitForSingleObject(handle uintptr, msWait uint32) (bool, error) { - r1, _, err := waitForSingleObjectProc.Call(handle, uintptr(uint32(msWait))) - switch r1 { - case WAIT_ABANDONED, WAIT_TIMEOUT: - return false, nil - case WAIT_SIGNALED: - return true, nil - } - use(msWait) - return false, err -} - -// String helpers -func (info CONSOLE_SCREEN_BUFFER_INFO) String() string { - return fmt.Sprintf("Size(%v) Cursor(%v) Window(%v) Max(%v)", info.Size, info.CursorPosition, info.Window, info.MaximumWindowSize) -} - -func (coord COORD) String() string { - return fmt.Sprintf("%v,%v", coord.X, coord.Y) -} - -func (rect SMALL_RECT) String() string { - return fmt.Sprintf("(%v,%v),(%v,%v)", rect.Left, rect.Top, rect.Right, rect.Bottom) -} - -// checkError evaluates the results of a Windows API call and returns the error if it failed. -func checkError(r1, r2 uintptr, err error) error { - // Windows APIs return non-zero to indicate success - if r1 != 0 { - return nil - } - - // Return the error if provided, otherwise default to EINVAL - if err != nil { - return err - } - return syscall.EINVAL -} - -// coordToPointer converts a COORD into a uintptr (by fooling the type system). -func coordToPointer(c COORD) uintptr { - // Note: This code assumes the two SHORTs are correctly laid out; the "cast" to uint32 is just to get a pointer to pass. - return uintptr(*((*uint32)(unsafe.Pointer(&c)))) -} - -// use is a no-op, but the compiler cannot see that it is. -// Calling use(p) ensures that p is kept live until that point. -func use(p interface{}) {} diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go b/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go deleted file mode 100644 index cbec8f728..000000000 --- a/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go +++ /dev/null @@ -1,100 +0,0 @@ -// +build windows - -package winterm - -import "github.com/Azure/go-ansiterm" - -const ( - FOREGROUND_COLOR_MASK = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE - BACKGROUND_COLOR_MASK = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE -) - -// collectAnsiIntoWindowsAttributes modifies the passed Windows text mode flags to reflect the -// request represented by the passed ANSI mode. -func collectAnsiIntoWindowsAttributes(windowsMode uint16, inverted bool, baseMode uint16, ansiMode int16) (uint16, bool) { - switch ansiMode { - - // Mode styles - case ansiterm.ANSI_SGR_BOLD: - windowsMode = windowsMode | FOREGROUND_INTENSITY - - case ansiterm.ANSI_SGR_DIM, ansiterm.ANSI_SGR_BOLD_DIM_OFF: - windowsMode &^= FOREGROUND_INTENSITY - - case ansiterm.ANSI_SGR_UNDERLINE: - windowsMode = windowsMode | COMMON_LVB_UNDERSCORE - - case ansiterm.ANSI_SGR_REVERSE: - inverted = true - - case ansiterm.ANSI_SGR_REVERSE_OFF: - inverted = false - - case ansiterm.ANSI_SGR_UNDERLINE_OFF: - windowsMode &^= COMMON_LVB_UNDERSCORE - - // Foreground colors - case ansiterm.ANSI_SGR_FOREGROUND_DEFAULT: - windowsMode = (windowsMode &^ FOREGROUND_MASK) | (baseMode & FOREGROUND_MASK) - - case ansiterm.ANSI_SGR_FOREGROUND_BLACK: - windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) - - case ansiterm.ANSI_SGR_FOREGROUND_RED: - windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED - - case ansiterm.ANSI_SGR_FOREGROUND_GREEN: - windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN - - case ansiterm.ANSI_SGR_FOREGROUND_YELLOW: - windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN - - case ansiterm.ANSI_SGR_FOREGROUND_BLUE: - windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_BLUE - - case ansiterm.ANSI_SGR_FOREGROUND_MAGENTA: - windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_BLUE - - case ansiterm.ANSI_SGR_FOREGROUND_CYAN: - windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN | FOREGROUND_BLUE - - case ansiterm.ANSI_SGR_FOREGROUND_WHITE: - windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE - - // Background colors - case ansiterm.ANSI_SGR_BACKGROUND_DEFAULT: - // Black with no intensity - windowsMode = (windowsMode &^ BACKGROUND_MASK) | (baseMode & BACKGROUND_MASK) - - case ansiterm.ANSI_SGR_BACKGROUND_BLACK: - windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) - - case ansiterm.ANSI_SGR_BACKGROUND_RED: - windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED - - case ansiterm.ANSI_SGR_BACKGROUND_GREEN: - windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN - - case ansiterm.ANSI_SGR_BACKGROUND_YELLOW: - windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN - - case ansiterm.ANSI_SGR_BACKGROUND_BLUE: - windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_BLUE - - case ansiterm.ANSI_SGR_BACKGROUND_MAGENTA: - windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_BLUE - - case ansiterm.ANSI_SGR_BACKGROUND_CYAN: - windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN | BACKGROUND_BLUE - - case ansiterm.ANSI_SGR_BACKGROUND_WHITE: - windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE - } - - return windowsMode, inverted -} - -// invertAttributes inverts the foreground and background colors of a Windows attributes value -func invertAttributes(windowsMode uint16) uint16 { - return (COMMON_LVB_MASK & windowsMode) | ((FOREGROUND_MASK & windowsMode) << 4) | ((BACKGROUND_MASK & windowsMode) >> 4) -} diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go deleted file mode 100644 index 3ee06ea72..000000000 --- a/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go +++ /dev/null @@ -1,101 +0,0 @@ -// +build windows - -package winterm - -const ( - horizontal = iota - vertical -) - -func (h *windowsAnsiEventHandler) getCursorWindow(info *CONSOLE_SCREEN_BUFFER_INFO) SMALL_RECT { - if h.originMode { - sr := h.effectiveSr(info.Window) - return SMALL_RECT{ - Top: sr.top, - Bottom: sr.bottom, - Left: 0, - Right: info.Size.X - 1, - } - } else { - return SMALL_RECT{ - Top: info.Window.Top, - Bottom: info.Window.Bottom, - Left: 0, - Right: info.Size.X - 1, - } - } -} - -// setCursorPosition sets the cursor to the specified position, bounded to the screen size -func (h *windowsAnsiEventHandler) setCursorPosition(position COORD, window SMALL_RECT) error { - position.X = ensureInRange(position.X, window.Left, window.Right) - position.Y = ensureInRange(position.Y, window.Top, window.Bottom) - err := SetConsoleCursorPosition(h.fd, position) - if err != nil { - return err - } - h.logf("Cursor position set: (%d, %d)", position.X, position.Y) - return err -} - -func (h *windowsAnsiEventHandler) moveCursorVertical(param int) error { - return h.moveCursor(vertical, param) -} - -func (h *windowsAnsiEventHandler) moveCursorHorizontal(param int) error { - return h.moveCursor(horizontal, param) -} - -func (h *windowsAnsiEventHandler) moveCursor(moveMode int, param int) error { - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - position := info.CursorPosition - switch moveMode { - case horizontal: - position.X += int16(param) - case vertical: - position.Y += int16(param) - } - - if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { - return err - } - - return nil -} - -func (h *windowsAnsiEventHandler) moveCursorLine(param int) error { - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - position := info.CursorPosition - position.X = 0 - position.Y += int16(param) - - if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { - return err - } - - return nil -} - -func (h *windowsAnsiEventHandler) moveCursorColumn(param int) error { - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - position := info.CursorPosition - position.X = int16(param) - 1 - - if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { - return err - } - - return nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go deleted file mode 100644 index 244b5fa25..000000000 --- a/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go +++ /dev/null @@ -1,84 +0,0 @@ -// +build windows - -package winterm - -import "github.com/Azure/go-ansiterm" - -func (h *windowsAnsiEventHandler) clearRange(attributes uint16, fromCoord COORD, toCoord COORD) error { - // Ignore an invalid (negative area) request - if toCoord.Y < fromCoord.Y { - return nil - } - - var err error - - var coordStart = COORD{} - var coordEnd = COORD{} - - xCurrent, yCurrent := fromCoord.X, fromCoord.Y - xEnd, yEnd := toCoord.X, toCoord.Y - - // Clear any partial initial line - if xCurrent > 0 { - coordStart.X, coordStart.Y = xCurrent, yCurrent - coordEnd.X, coordEnd.Y = xEnd, yCurrent - - err = h.clearRect(attributes, coordStart, coordEnd) - if err != nil { - return err - } - - xCurrent = 0 - yCurrent += 1 - } - - // Clear intervening rectangular section - if yCurrent < yEnd { - coordStart.X, coordStart.Y = xCurrent, yCurrent - coordEnd.X, coordEnd.Y = xEnd, yEnd-1 - - err = h.clearRect(attributes, coordStart, coordEnd) - if err != nil { - return err - } - - xCurrent = 0 - yCurrent = yEnd - } - - // Clear remaining partial ending line - coordStart.X, coordStart.Y = xCurrent, yCurrent - coordEnd.X, coordEnd.Y = xEnd, yEnd - - err = h.clearRect(attributes, coordStart, coordEnd) - if err != nil { - return err - } - - return nil -} - -func (h *windowsAnsiEventHandler) clearRect(attributes uint16, fromCoord COORD, toCoord COORD) error { - region := SMALL_RECT{Top: fromCoord.Y, Left: fromCoord.X, Bottom: toCoord.Y, Right: toCoord.X} - width := toCoord.X - fromCoord.X + 1 - height := toCoord.Y - fromCoord.Y + 1 - size := uint32(width) * uint32(height) - - if size <= 0 { - return nil - } - - buffer := make([]CHAR_INFO, size) - - char := CHAR_INFO{ansiterm.FILL_CHARACTER, attributes} - for i := 0; i < int(size); i++ { - buffer[i] = char - } - - err := WriteConsoleOutput(h.fd, buffer, COORD{X: width, Y: height}, COORD{X: 0, Y: 0}, ®ion) - if err != nil { - return err - } - - return nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go b/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go deleted file mode 100644 index 2d27fa1d0..000000000 --- a/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go +++ /dev/null @@ -1,118 +0,0 @@ -// +build windows - -package winterm - -// effectiveSr gets the current effective scroll region in buffer coordinates -func (h *windowsAnsiEventHandler) effectiveSr(window SMALL_RECT) scrollRegion { - top := addInRange(window.Top, h.sr.top, window.Top, window.Bottom) - bottom := addInRange(window.Top, h.sr.bottom, window.Top, window.Bottom) - if top >= bottom { - top = window.Top - bottom = window.Bottom - } - return scrollRegion{top: top, bottom: bottom} -} - -func (h *windowsAnsiEventHandler) scrollUp(param int) error { - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - sr := h.effectiveSr(info.Window) - return h.scroll(param, sr, info) -} - -func (h *windowsAnsiEventHandler) scrollDown(param int) error { - return h.scrollUp(-param) -} - -func (h *windowsAnsiEventHandler) deleteLines(param int) error { - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - start := info.CursorPosition.Y - sr := h.effectiveSr(info.Window) - // Lines cannot be inserted or deleted outside the scrolling region. - if start >= sr.top && start <= sr.bottom { - sr.top = start - return h.scroll(param, sr, info) - } else { - return nil - } -} - -func (h *windowsAnsiEventHandler) insertLines(param int) error { - return h.deleteLines(-param) -} - -// scroll scrolls the provided scroll region by param lines. The scroll region is in buffer coordinates. -func (h *windowsAnsiEventHandler) scroll(param int, sr scrollRegion, info *CONSOLE_SCREEN_BUFFER_INFO) error { - h.logf("scroll: scrollTop: %d, scrollBottom: %d", sr.top, sr.bottom) - h.logf("scroll: windowTop: %d, windowBottom: %d", info.Window.Top, info.Window.Bottom) - - // Copy from and clip to the scroll region (full buffer width) - scrollRect := SMALL_RECT{ - Top: sr.top, - Bottom: sr.bottom, - Left: 0, - Right: info.Size.X - 1, - } - - // Origin to which area should be copied - destOrigin := COORD{ - X: 0, - Y: sr.top - int16(param), - } - - char := CHAR_INFO{ - UnicodeChar: ' ', - Attributes: h.attributes, - } - - if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil { - return err - } - return nil -} - -func (h *windowsAnsiEventHandler) deleteCharacters(param int) error { - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - return h.scrollLine(param, info.CursorPosition, info) -} - -func (h *windowsAnsiEventHandler) insertCharacters(param int) error { - return h.deleteCharacters(-param) -} - -// scrollLine scrolls a line horizontally starting at the provided position by a number of columns. -func (h *windowsAnsiEventHandler) scrollLine(columns int, position COORD, info *CONSOLE_SCREEN_BUFFER_INFO) error { - // Copy from and clip to the scroll region (full buffer width) - scrollRect := SMALL_RECT{ - Top: position.Y, - Bottom: position.Y, - Left: position.X, - Right: info.Size.X - 1, - } - - // Origin to which area should be copied - destOrigin := COORD{ - X: position.X - int16(columns), - Y: position.Y, - } - - char := CHAR_INFO{ - UnicodeChar: ' ', - Attributes: h.attributes, - } - - if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go b/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go deleted file mode 100644 index afa7635d7..000000000 --- a/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build windows - -package winterm - -// AddInRange increments a value by the passed quantity while ensuring the values -// always remain within the supplied min / max range. -func addInRange(n int16, increment int16, min int16, max int16) int16 { - return ensureInRange(n+increment, min, max) -} diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go deleted file mode 100644 index 2d40fb75a..000000000 --- a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go +++ /dev/null @@ -1,743 +0,0 @@ -// +build windows - -package winterm - -import ( - "bytes" - "log" - "os" - "strconv" - - "github.com/Azure/go-ansiterm" -) - -type windowsAnsiEventHandler struct { - fd uintptr - file *os.File - infoReset *CONSOLE_SCREEN_BUFFER_INFO - sr scrollRegion - buffer bytes.Buffer - attributes uint16 - inverted bool - wrapNext bool - drewMarginByte bool - originMode bool - marginByte byte - curInfo *CONSOLE_SCREEN_BUFFER_INFO - curPos COORD - logf func(string, ...interface{}) -} - -type Option func(*windowsAnsiEventHandler) - -func WithLogf(f func(string, ...interface{})) Option { - return func(w *windowsAnsiEventHandler) { - w.logf = f - } -} - -func CreateWinEventHandler(fd uintptr, file *os.File, opts ...Option) ansiterm.AnsiEventHandler { - infoReset, err := GetConsoleScreenBufferInfo(fd) - if err != nil { - return nil - } - - h := &windowsAnsiEventHandler{ - fd: fd, - file: file, - infoReset: infoReset, - attributes: infoReset.Attributes, - } - for _, o := range opts { - o(h) - } - - if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" { - logFile, _ := os.Create("winEventHandler.log") - logger := log.New(logFile, "", log.LstdFlags) - if h.logf != nil { - l := h.logf - h.logf = func(s string, v ...interface{}) { - l(s, v...) - logger.Printf(s, v...) - } - } else { - h.logf = logger.Printf - } - } - - if h.logf == nil { - h.logf = func(string, ...interface{}) {} - } - - return h -} - -type scrollRegion struct { - top int16 - bottom int16 -} - -// simulateLF simulates a LF or CR+LF by scrolling if necessary to handle the -// current cursor position and scroll region settings, in which case it returns -// true. If no special handling is necessary, then it does nothing and returns -// false. -// -// In the false case, the caller should ensure that a carriage return -// and line feed are inserted or that the text is otherwise wrapped. -func (h *windowsAnsiEventHandler) simulateLF(includeCR bool) (bool, error) { - if h.wrapNext { - if err := h.Flush(); err != nil { - return false, err - } - h.clearWrap() - } - pos, info, err := h.getCurrentInfo() - if err != nil { - return false, err - } - sr := h.effectiveSr(info.Window) - if pos.Y == sr.bottom { - // Scrolling is necessary. Let Windows automatically scroll if the scrolling region - // is the full window. - if sr.top == info.Window.Top && sr.bottom == info.Window.Bottom { - if includeCR { - pos.X = 0 - h.updatePos(pos) - } - return false, nil - } - - // A custom scroll region is active. Scroll the window manually to simulate - // the LF. - if err := h.Flush(); err != nil { - return false, err - } - h.logf("Simulating LF inside scroll region") - if err := h.scrollUp(1); err != nil { - return false, err - } - if includeCR { - pos.X = 0 - if err := SetConsoleCursorPosition(h.fd, pos); err != nil { - return false, err - } - } - return true, nil - - } else if pos.Y < info.Window.Bottom { - // Let Windows handle the LF. - pos.Y++ - if includeCR { - pos.X = 0 - } - h.updatePos(pos) - return false, nil - } else { - // The cursor is at the bottom of the screen but outside the scroll - // region. Skip the LF. - h.logf("Simulating LF outside scroll region") - if includeCR { - if err := h.Flush(); err != nil { - return false, err - } - pos.X = 0 - if err := SetConsoleCursorPosition(h.fd, pos); err != nil { - return false, err - } - } - return true, nil - } -} - -// executeLF executes a LF without a CR. -func (h *windowsAnsiEventHandler) executeLF() error { - handled, err := h.simulateLF(false) - if err != nil { - return err - } - if !handled { - // Windows LF will reset the cursor column position. Write the LF - // and restore the cursor position. - pos, _, err := h.getCurrentInfo() - if err != nil { - return err - } - h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED) - if pos.X != 0 { - if err := h.Flush(); err != nil { - return err - } - h.logf("Resetting cursor position for LF without CR") - if err := SetConsoleCursorPosition(h.fd, pos); err != nil { - return err - } - } - } - return nil -} - -func (h *windowsAnsiEventHandler) Print(b byte) error { - if h.wrapNext { - h.buffer.WriteByte(h.marginByte) - h.clearWrap() - if _, err := h.simulateLF(true); err != nil { - return err - } - } - pos, info, err := h.getCurrentInfo() - if err != nil { - return err - } - if pos.X == info.Size.X-1 { - h.wrapNext = true - h.marginByte = b - } else { - pos.X++ - h.updatePos(pos) - h.buffer.WriteByte(b) - } - return nil -} - -func (h *windowsAnsiEventHandler) Execute(b byte) error { - switch b { - case ansiterm.ANSI_TAB: - h.logf("Execute(TAB)") - // Move to the next tab stop, but preserve auto-wrap if already set. - if !h.wrapNext { - pos, info, err := h.getCurrentInfo() - if err != nil { - return err - } - pos.X = (pos.X + 8) - pos.X%8 - if pos.X >= info.Size.X { - pos.X = info.Size.X - 1 - } - if err := h.Flush(); err != nil { - return err - } - if err := SetConsoleCursorPosition(h.fd, pos); err != nil { - return err - } - } - return nil - - case ansiterm.ANSI_BEL: - h.buffer.WriteByte(ansiterm.ANSI_BEL) - return nil - - case ansiterm.ANSI_BACKSPACE: - if h.wrapNext { - if err := h.Flush(); err != nil { - return err - } - h.clearWrap() - } - pos, _, err := h.getCurrentInfo() - if err != nil { - return err - } - if pos.X > 0 { - pos.X-- - h.updatePos(pos) - h.buffer.WriteByte(ansiterm.ANSI_BACKSPACE) - } - return nil - - case ansiterm.ANSI_VERTICAL_TAB, ansiterm.ANSI_FORM_FEED: - // Treat as true LF. - return h.executeLF() - - case ansiterm.ANSI_LINE_FEED: - // Simulate a CR and LF for now since there is no way in go-ansiterm - // to tell if the LF should include CR (and more things break when it's - // missing than when it's incorrectly added). - handled, err := h.simulateLF(true) - if handled || err != nil { - return err - } - return h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED) - - case ansiterm.ANSI_CARRIAGE_RETURN: - if h.wrapNext { - if err := h.Flush(); err != nil { - return err - } - h.clearWrap() - } - pos, _, err := h.getCurrentInfo() - if err != nil { - return err - } - if pos.X != 0 { - pos.X = 0 - h.updatePos(pos) - h.buffer.WriteByte(ansiterm.ANSI_CARRIAGE_RETURN) - } - return nil - - default: - return nil - } -} - -func (h *windowsAnsiEventHandler) CUU(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("CUU: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - return h.moveCursorVertical(-param) -} - -func (h *windowsAnsiEventHandler) CUD(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("CUD: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - return h.moveCursorVertical(param) -} - -func (h *windowsAnsiEventHandler) CUF(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("CUF: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - return h.moveCursorHorizontal(param) -} - -func (h *windowsAnsiEventHandler) CUB(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("CUB: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - return h.moveCursorHorizontal(-param) -} - -func (h *windowsAnsiEventHandler) CNL(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("CNL: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - return h.moveCursorLine(param) -} - -func (h *windowsAnsiEventHandler) CPL(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("CPL: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - return h.moveCursorLine(-param) -} - -func (h *windowsAnsiEventHandler) CHA(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("CHA: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - return h.moveCursorColumn(param) -} - -func (h *windowsAnsiEventHandler) VPA(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("VPA: [[%d]]", param) - h.clearWrap() - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - window := h.getCursorWindow(info) - position := info.CursorPosition - position.Y = window.Top + int16(param) - 1 - return h.setCursorPosition(position, window) -} - -func (h *windowsAnsiEventHandler) CUP(row int, col int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("CUP: [[%d %d]]", row, col) - h.clearWrap() - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - window := h.getCursorWindow(info) - position := COORD{window.Left + int16(col) - 1, window.Top + int16(row) - 1} - return h.setCursorPosition(position, window) -} - -func (h *windowsAnsiEventHandler) HVP(row int, col int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("HVP: [[%d %d]]", row, col) - h.clearWrap() - return h.CUP(row, col) -} - -func (h *windowsAnsiEventHandler) DECTCEM(visible bool) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("DECTCEM: [%v]", []string{strconv.FormatBool(visible)}) - h.clearWrap() - return nil -} - -func (h *windowsAnsiEventHandler) DECOM(enable bool) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("DECOM: [%v]", []string{strconv.FormatBool(enable)}) - h.clearWrap() - h.originMode = enable - return h.CUP(1, 1) -} - -func (h *windowsAnsiEventHandler) DECCOLM(use132 bool) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("DECCOLM: [%v]", []string{strconv.FormatBool(use132)}) - h.clearWrap() - if err := h.ED(2); err != nil { - return err - } - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - targetWidth := int16(80) - if use132 { - targetWidth = 132 - } - if info.Size.X < targetWidth { - if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil { - h.logf("set buffer failed: %v", err) - return err - } - } - window := info.Window - window.Left = 0 - window.Right = targetWidth - 1 - if err := SetConsoleWindowInfo(h.fd, true, window); err != nil { - h.logf("set window failed: %v", err) - return err - } - if info.Size.X > targetWidth { - if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil { - h.logf("set buffer failed: %v", err) - return err - } - } - return SetConsoleCursorPosition(h.fd, COORD{0, 0}) -} - -func (h *windowsAnsiEventHandler) ED(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("ED: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - - // [J -- Erases from the cursor to the end of the screen, including the cursor position. - // [1J -- Erases from the beginning of the screen to the cursor, including the cursor position. - // [2J -- Erases the complete display. The cursor does not move. - // Notes: - // -- Clearing the entire buffer, versus just the Window, works best for Windows Consoles - - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - var start COORD - var end COORD - - switch param { - case 0: - start = info.CursorPosition - end = COORD{info.Size.X - 1, info.Size.Y - 1} - - case 1: - start = COORD{0, 0} - end = info.CursorPosition - - case 2: - start = COORD{0, 0} - end = COORD{info.Size.X - 1, info.Size.Y - 1} - } - - err = h.clearRange(h.attributes, start, end) - if err != nil { - return err - } - - // If the whole buffer was cleared, move the window to the top while preserving - // the window-relative cursor position. - if param == 2 { - pos := info.CursorPosition - window := info.Window - pos.Y -= window.Top - window.Bottom -= window.Top - window.Top = 0 - if err := SetConsoleCursorPosition(h.fd, pos); err != nil { - return err - } - if err := SetConsoleWindowInfo(h.fd, true, window); err != nil { - return err - } - } - - return nil -} - -func (h *windowsAnsiEventHandler) EL(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("EL: [%v]", strconv.Itoa(param)) - h.clearWrap() - - // [K -- Erases from the cursor to the end of the line, including the cursor position. - // [1K -- Erases from the beginning of the line to the cursor, including the cursor position. - // [2K -- Erases the complete line. - - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - var start COORD - var end COORD - - switch param { - case 0: - start = info.CursorPosition - end = COORD{info.Size.X, info.CursorPosition.Y} - - case 1: - start = COORD{0, info.CursorPosition.Y} - end = info.CursorPosition - - case 2: - start = COORD{0, info.CursorPosition.Y} - end = COORD{info.Size.X, info.CursorPosition.Y} - } - - err = h.clearRange(h.attributes, start, end) - if err != nil { - return err - } - - return nil -} - -func (h *windowsAnsiEventHandler) IL(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("IL: [%v]", strconv.Itoa(param)) - h.clearWrap() - return h.insertLines(param) -} - -func (h *windowsAnsiEventHandler) DL(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("DL: [%v]", strconv.Itoa(param)) - h.clearWrap() - return h.deleteLines(param) -} - -func (h *windowsAnsiEventHandler) ICH(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("ICH: [%v]", strconv.Itoa(param)) - h.clearWrap() - return h.insertCharacters(param) -} - -func (h *windowsAnsiEventHandler) DCH(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("DCH: [%v]", strconv.Itoa(param)) - h.clearWrap() - return h.deleteCharacters(param) -} - -func (h *windowsAnsiEventHandler) SGR(params []int) error { - if err := h.Flush(); err != nil { - return err - } - strings := []string{} - for _, v := range params { - strings = append(strings, strconv.Itoa(v)) - } - - h.logf("SGR: [%v]", strings) - - if len(params) <= 0 { - h.attributes = h.infoReset.Attributes - h.inverted = false - } else { - for _, attr := range params { - - if attr == ansiterm.ANSI_SGR_RESET { - h.attributes = h.infoReset.Attributes - h.inverted = false - continue - } - - h.attributes, h.inverted = collectAnsiIntoWindowsAttributes(h.attributes, h.inverted, h.infoReset.Attributes, int16(attr)) - } - } - - attributes := h.attributes - if h.inverted { - attributes = invertAttributes(attributes) - } - err := SetConsoleTextAttribute(h.fd, attributes) - if err != nil { - return err - } - - return nil -} - -func (h *windowsAnsiEventHandler) SU(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("SU: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - return h.scrollUp(param) -} - -func (h *windowsAnsiEventHandler) SD(param int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("SD: [%v]", []string{strconv.Itoa(param)}) - h.clearWrap() - return h.scrollDown(param) -} - -func (h *windowsAnsiEventHandler) DA(params []string) error { - h.logf("DA: [%v]", params) - // DA cannot be implemented because it must send data on the VT100 input stream, - // which is not available to go-ansiterm. - return nil -} - -func (h *windowsAnsiEventHandler) DECSTBM(top int, bottom int) error { - if err := h.Flush(); err != nil { - return err - } - h.logf("DECSTBM: [%d, %d]", top, bottom) - - // Windows is 0 indexed, Linux is 1 indexed - h.sr.top = int16(top - 1) - h.sr.bottom = int16(bottom - 1) - - // This command also moves the cursor to the origin. - h.clearWrap() - return h.CUP(1, 1) -} - -func (h *windowsAnsiEventHandler) RI() error { - if err := h.Flush(); err != nil { - return err - } - h.logf("RI: []") - h.clearWrap() - - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - sr := h.effectiveSr(info.Window) - if info.CursorPosition.Y == sr.top { - return h.scrollDown(1) - } - - return h.moveCursorVertical(-1) -} - -func (h *windowsAnsiEventHandler) IND() error { - h.logf("IND: []") - return h.executeLF() -} - -func (h *windowsAnsiEventHandler) Flush() error { - h.curInfo = nil - if h.buffer.Len() > 0 { - h.logf("Flush: [%s]", h.buffer.Bytes()) - if _, err := h.buffer.WriteTo(h.file); err != nil { - return err - } - } - - if h.wrapNext && !h.drewMarginByte { - h.logf("Flush: drawing margin byte '%c'", h.marginByte) - - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return err - } - - charInfo := []CHAR_INFO{{UnicodeChar: uint16(h.marginByte), Attributes: info.Attributes}} - size := COORD{1, 1} - position := COORD{0, 0} - region := SMALL_RECT{Left: info.CursorPosition.X, Top: info.CursorPosition.Y, Right: info.CursorPosition.X, Bottom: info.CursorPosition.Y} - if err := WriteConsoleOutput(h.fd, charInfo, size, position, ®ion); err != nil { - return err - } - h.drewMarginByte = true - } - return nil -} - -// cacheConsoleInfo ensures that the current console screen information has been queried -// since the last call to Flush(). It must be called before accessing h.curInfo or h.curPos. -func (h *windowsAnsiEventHandler) getCurrentInfo() (COORD, *CONSOLE_SCREEN_BUFFER_INFO, error) { - if h.curInfo == nil { - info, err := GetConsoleScreenBufferInfo(h.fd) - if err != nil { - return COORD{}, nil, err - } - h.curInfo = info - h.curPos = info.CursorPosition - } - return h.curPos, h.curInfo, nil -} - -func (h *windowsAnsiEventHandler) updatePos(pos COORD) { - if h.curInfo == nil { - panic("failed to call getCurrentInfo before calling updatePos") - } - h.curPos = pos -} - -// clearWrap clears the state where the cursor is in the margin -// waiting for the next character before wrapping the line. This must -// be done before most operations that act on the cursor. -func (h *windowsAnsiEventHandler) clearWrap() { - h.wrapNext = false - h.drewMarginByte = false -} diff --git a/vendor/github.com/Azure/go-ntlmssp/.travis.yml b/vendor/github.com/Azure/go-ntlmssp/.travis.yml new file mode 100644 index 000000000..7951372c7 --- /dev/null +++ b/vendor/github.com/Azure/go-ntlmssp/.travis.yml @@ -0,0 +1,17 @@ +sudo: false + +language: go + +before_script: + - go get -u github.com/golang/lint/golint + +go: + - 1.10.x + - master + +script: + - test -z "$(gofmt -s -l . | tee /dev/stderr)" + - test -z "$(golint ./... | tee /dev/stderr)" + - go vet ./... + - go build -v ./... + - go test -v ./... diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/.travis.yml b/vendor/github.com/ChrisTrenkamp/goxpath/.travis.yml new file mode 100644 index 000000000..53c84e840 --- /dev/null +++ b/vendor/github.com/ChrisTrenkamp/goxpath/.travis.yml @@ -0,0 +1,16 @@ +language: go + +go: + - 1.6 + +before_install: + - go get -u github.com/ChrisTrenkamp/goxpath + - go get -u github.com/ChrisTrenkamp/goxpath/cmd/goxpath + - go get -u github.com/wadey/gocovmerge + +script: + - go list -f '{{if gt (len .TestGoFiles) 0}}"go test -covermode count -coverprofile {{.Name}}.coverprofile -coverpkg ./... {{.ImportPath}}"{{end}}' ./... | xargs -I {} bash -c {} + - gocovmerge `ls *.coverprofile` > coverage.txt + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/coverage.sh b/vendor/github.com/ChrisTrenkamp/goxpath/coverage.sh old mode 100755 new mode 100644 diff --git a/vendor/github.com/Telmate/proxmox-api-go/proxmox/client.go b/vendor/github.com/Telmate/proxmox-api-go/proxmox/client.go deleted file mode 100644 index 7b97b9505..000000000 --- a/vendor/github.com/Telmate/proxmox-api-go/proxmox/client.go +++ /dev/null @@ -1,597 +0,0 @@ -package proxmox - -// inspired by https://github.com/Telmate/vagrant-proxmox/blob/master/lib/vagrant-proxmox/proxmox/connection.rb - -import ( - "crypto/tls" - "encoding/json" - "errors" - "fmt" - "io" - "io/ioutil" - "net" - "net/http" - "regexp" - "strconv" - "strings" - "time" -) - -// TaskTimeout - default async task call timeout in seconds -const TaskTimeout = 300 - -// TaskStatusCheckInterval - time between async checks in seconds -const TaskStatusCheckInterval = 2 - -const exitStatusSuccess = "OK" - -// Client - URL, user and password to specifc Proxmox node -type Client struct { - session *Session - ApiUrl string - Username string - Password string -} - -// VmRef - virtual machine ref parts -// map[type:qemu node:proxmox1-xx id:qemu/132 diskread:5.57424738e+08 disk:0 netin:5.9297450593e+10 mem:3.3235968e+09 uptime:1.4567097e+07 vmid:132 template:0 maxcpu:2 netout:6.053310416e+09 maxdisk:3.4359738368e+10 maxmem:8.592031744e+09 diskwrite:1.49663619584e+12 status:running cpu:0.00386980694947209 name:appt-app1-dev.xxx.xx] -type VmRef struct { - vmId int - node string - vmType string -} - -func (vmr *VmRef) SetNode(node string) { - vmr.node = node - return -} - -func (vmr *VmRef) SetVmType(vmType string) { - vmr.vmType = vmType - return -} - -func (vmr *VmRef) VmId() int { - return vmr.vmId -} - -func (vmr *VmRef) Node() string { - return vmr.node -} - -func NewVmRef(vmId int) (vmr *VmRef) { - vmr = &VmRef{vmId: vmId, node: "", vmType: ""} - return -} - -func NewClient(apiUrl string, hclient *http.Client, tls *tls.Config) (client *Client, err error) { - var sess *Session - sess, err = NewSession(apiUrl, hclient, tls) - if err == nil { - client = &Client{session: sess, ApiUrl: apiUrl} - } - return client, err -} - -func (c *Client) Login(username string, password string) (err error) { - c.Username = username - c.Password = password - return c.session.Login(username, password) -} - -func (c *Client) GetJsonRetryable(url string, data *map[string]interface{}, tries int) error { - var statErr error - for ii := 0; ii < tries; ii++ { - _, statErr = c.session.GetJSON(url, nil, nil, data) - if statErr == nil { - return nil - } - // if statErr != io.ErrUnexpectedEOF { // don't give up on ErrUnexpectedEOF - // return statErr - // } - time.Sleep(5 * time.Second) - } - return statErr -} - -func (c *Client) GetNodeList() (list map[string]interface{}, err error) { - err = c.GetJsonRetryable("/nodes", &list, 3) - return -} - -func (c *Client) GetVmList() (list map[string]interface{}, err error) { - err = c.GetJsonRetryable("/cluster/resources?type=vm", &list, 3) - return -} - -func (c *Client) CheckVmRef(vmr *VmRef) (err error) { - if vmr.node == "" || vmr.vmType == "" { - _, err = c.GetVmInfo(vmr) - } - return -} - -func (c *Client) GetVmInfo(vmr *VmRef) (vmInfo map[string]interface{}, err error) { - resp, err := c.GetVmList() - vms := resp["data"].([]interface{}) - for vmii := range vms { - vm := vms[vmii].(map[string]interface{}) - if int(vm["vmid"].(float64)) == vmr.vmId { - vmInfo = vm - vmr.node = vmInfo["node"].(string) - vmr.vmType = vmInfo["type"].(string) - return - } - } - return nil, errors.New(fmt.Sprintf("Vm '%d' not found", vmr.vmId)) -} - -func (c *Client) GetVmRefByName(vmName string) (vmr *VmRef, err error) { - resp, err := c.GetVmList() - vms := resp["data"].([]interface{}) - for vmii := range vms { - vm := vms[vmii].(map[string]interface{}) - if vm["name"] != nil && vm["name"].(string) == vmName { - vmr = NewVmRef(int(vm["vmid"].(float64))) - vmr.node = vm["node"].(string) - vmr.vmType = vm["type"].(string) - return - } - } - return nil, errors.New(fmt.Sprintf("Vm '%s' not found", vmName)) -} - -func (c *Client) GetVmState(vmr *VmRef) (vmState map[string]interface{}, err error) { - err = c.CheckVmRef(vmr) - if err != nil { - return nil, err - } - var data map[string]interface{} - url := fmt.Sprintf("/nodes/%s/%s/%d/status/current", vmr.node, vmr.vmType, vmr.vmId) - err = c.GetJsonRetryable(url, &data, 3) - if err != nil { - return nil, err - } - if data["data"] == nil { - return nil, errors.New("Vm STATE not readable") - } - vmState = data["data"].(map[string]interface{}) - return -} - -func (c *Client) GetVmConfig(vmr *VmRef) (vmConfig map[string]interface{}, err error) { - err = c.CheckVmRef(vmr) - if err != nil { - return nil, err - } - var data map[string]interface{} - url := fmt.Sprintf("/nodes/%s/%s/%d/config", vmr.node, vmr.vmType, vmr.vmId) - err = c.GetJsonRetryable(url, &data, 3) - if err != nil { - return nil, err - } - if data["data"] == nil { - return nil, errors.New("Vm CONFIG not readable") - } - vmConfig = data["data"].(map[string]interface{}) - return -} - -func (c *Client) GetVmSpiceProxy(vmr *VmRef) (vmSpiceProxy map[string]interface{}, err error) { - err = c.CheckVmRef(vmr) - if err != nil { - return nil, err - } - var data map[string]interface{} - url := fmt.Sprintf("/nodes/%s/%s/%d/spiceproxy", vmr.node, vmr.vmType, vmr.vmId) - _, err = c.session.PostJSON(url, nil, nil, nil, &data) - if err != nil { - return nil, err - } - if data["data"] == nil { - return nil, errors.New("Vm SpiceProxy not readable") - } - vmSpiceProxy = data["data"].(map[string]interface{}) - return -} - -type AgentNetworkInterface struct { - MACAddress string - IPAddresses []net.IP - Name string - Statistics map[string]int64 -} - -func (a *AgentNetworkInterface) UnmarshalJSON(b []byte) error { - var intermediate struct { - HardwareAddress string `json:"hardware-address"` - IPAddresses []struct { - IPAddress string `json:"ip-address"` - IPAddressType string `json:"ip-address-type"` - Prefix int `json:"prefix"` - } `json:"ip-addresses"` - Name string `json:"name"` - Statistics map[string]int64 `json:"statistics"` - } - err := json.Unmarshal(b, &intermediate) - if err != nil { - return err - } - - a.IPAddresses = make([]net.IP, len(intermediate.IPAddresses)) - for idx, ip := range intermediate.IPAddresses { - a.IPAddresses[idx] = net.ParseIP(ip.IPAddress) - if a.IPAddresses[idx] == nil { - return fmt.Errorf("Could not parse %s as IP", ip.IPAddress) - } - } - a.MACAddress = intermediate.HardwareAddress - a.Name = intermediate.Name - a.Statistics = intermediate.Statistics - return nil -} - -func (c *Client) GetVmAgentNetworkInterfaces(vmr *VmRef) ([]AgentNetworkInterface, error) { - var ifs []AgentNetworkInterface - err := c.doAgentGet(vmr, "network-get-interfaces", &ifs) - return ifs, err -} - -func (c *Client) doAgentGet(vmr *VmRef, command string, output interface{}) error { - err := c.CheckVmRef(vmr) - if err != nil { - return err - } - - url := fmt.Sprintf("/nodes/%s/%s/%d/agent/%s", vmr.node, vmr.vmType, vmr.vmId, command) - resp, err := c.session.Get(url, nil, nil) - if err != nil { - return err - } - - return TypedResponse(resp, output) -} - -func (c *Client) CreateTemplate(vmr *VmRef) error { - err := c.CheckVmRef(vmr) - if err != nil { - return err - } - - url := fmt.Sprintf("/nodes/%s/%s/%d/template", vmr.node, vmr.vmType, vmr.vmId) - _, err = c.session.Post(url, nil, nil, nil) - if err != nil { - return err - } - - return nil -} - -func (c *Client) MonitorCmd(vmr *VmRef, command string) (monitorRes map[string]interface{}, err error) { - err = c.CheckVmRef(vmr) - if err != nil { - return nil, err - } - reqbody := ParamsToBody(map[string]interface{}{"command": command}) - url := fmt.Sprintf("/nodes/%s/%s/%d/monitor", vmr.node, vmr.vmType, vmr.vmId) - resp, err := c.session.Post(url, nil, nil, &reqbody) - monitorRes, err = ResponseJSON(resp) - return -} - -// WaitForCompletion - poll the API for task completion -func (c *Client) WaitForCompletion(taskResponse map[string]interface{}) (waitExitStatus string, err error) { - if taskResponse["errors"] != nil { - errJSON, _ := json.MarshalIndent(taskResponse["errors"], "", " ") - return string(errJSON), errors.New("Error reponse") - } - if taskResponse["data"] == nil { - return "", nil - } - waited := 0 - taskUpid := taskResponse["data"].(string) - for waited < TaskTimeout { - exitStatus, statErr := c.GetTaskExitstatus(taskUpid) - if statErr != nil { - if statErr != io.ErrUnexpectedEOF { // don't give up on ErrUnexpectedEOF - return "", statErr - } - } - if exitStatus != nil { - waitExitStatus = exitStatus.(string) - return - } - time.Sleep(TaskStatusCheckInterval * time.Second) - waited = waited + TaskStatusCheckInterval - } - return "", errors.New("Wait timeout for:" + taskUpid) -} - -var rxTaskNode = regexp.MustCompile("UPID:(.*?):") - -func (c *Client) GetTaskExitstatus(taskUpid string) (exitStatus interface{}, err error) { - node := rxTaskNode.FindStringSubmatch(taskUpid)[1] - url := fmt.Sprintf("/nodes/%s/tasks/%s/status", node, taskUpid) - var data map[string]interface{} - _, err = c.session.GetJSON(url, nil, nil, &data) - if err == nil { - exitStatus = data["data"].(map[string]interface{})["exitstatus"] - } - if exitStatus != nil && exitStatus != exitStatusSuccess { - err = errors.New(exitStatus.(string)) - } - return -} - -func (c *Client) StatusChangeVm(vmr *VmRef, setStatus string) (exitStatus string, err error) { - err = c.CheckVmRef(vmr) - if err != nil { - return "", err - } - - url := fmt.Sprintf("/nodes/%s/%s/%d/status/%s", vmr.node, vmr.vmType, vmr.vmId, setStatus) - var taskResponse map[string]interface{} - for i := 0; i < 3; i++ { - _, err = c.session.PostJSON(url, nil, nil, nil, &taskResponse) - exitStatus, err = c.WaitForCompletion(taskResponse) - if exitStatus == "" { - time.Sleep(TaskStatusCheckInterval * time.Second) - } else { - return - } - } - return -} - -func (c *Client) StartVm(vmr *VmRef) (exitStatus string, err error) { - return c.StatusChangeVm(vmr, "start") -} - -func (c *Client) StopVm(vmr *VmRef) (exitStatus string, err error) { - return c.StatusChangeVm(vmr, "stop") -} - -func (c *Client) ShutdownVm(vmr *VmRef) (exitStatus string, err error) { - return c.StatusChangeVm(vmr, "shutdown") -} - -func (c *Client) ResetVm(vmr *VmRef) (exitStatus string, err error) { - return c.StatusChangeVm(vmr, "reset") -} - -func (c *Client) SuspendVm(vmr *VmRef) (exitStatus string, err error) { - return c.StatusChangeVm(vmr, "suspend") -} - -func (c *Client) ResumeVm(vmr *VmRef) (exitStatus string, err error) { - return c.StatusChangeVm(vmr, "resume") -} - -func (c *Client) DeleteVm(vmr *VmRef) (exitStatus string, err error) { - err = c.CheckVmRef(vmr) - if err != nil { - return "", err - } - url := fmt.Sprintf("/nodes/%s/%s/%d", vmr.node, vmr.vmType, vmr.vmId) - var taskResponse map[string]interface{} - _, err = c.session.RequestJSON("DELETE", url, nil, nil, nil, &taskResponse) - exitStatus, err = c.WaitForCompletion(taskResponse) - return -} - -func (c *Client) CreateQemuVm(node string, vmParams map[string]interface{}) (exitStatus string, err error) { - // Create VM disks first to ensure disks names. - createdDisks, createdDisksErr := c.createVMDisks(node, vmParams) - if createdDisksErr != nil { - return "", createdDisksErr - } - - // Then create the VM itself. - reqbody := ParamsToBody(vmParams) - url := fmt.Sprintf("/nodes/%s/qemu", node) - var resp *http.Response - resp, err = c.session.Post(url, nil, nil, &reqbody) - defer resp.Body.Close() - if err != nil { - b, _ := ioutil.ReadAll(resp.Body) - exitStatus = string(b) - return - } - - taskResponse, err := ResponseJSON(resp) - if err != nil { - return - } - exitStatus, err = c.WaitForCompletion(taskResponse) - // Delete VM disks if the VM didn't create. - if exitStatus != "OK" { - deleteDisksErr := c.DeleteVMDisks(node, createdDisks) - if deleteDisksErr != nil { - return "", deleteDisksErr - } - } - - return -} - -func (c *Client) CloneQemuVm(vmr *VmRef, vmParams map[string]interface{}) (exitStatus string, err error) { - reqbody := ParamsToBody(vmParams) - url := fmt.Sprintf("/nodes/%s/qemu/%d/clone", vmr.node, vmr.vmId) - resp, err := c.session.Post(url, nil, nil, &reqbody) - if err == nil { - taskResponse, err := ResponseJSON(resp) - if err != nil { - return "", err - } - exitStatus, err = c.WaitForCompletion(taskResponse) - } - return -} - -func (c *Client) RollbackQemuVm(vmr *VmRef, snapshot string) (exitStatus string, err error) { - err = c.CheckVmRef(vmr) - if err != nil { - return "", err - } - url := fmt.Sprintf("/nodes/%s/%s/%d/snapshot/%s/rollback", vmr.node, vmr.vmType, vmr.vmId, snapshot) - var taskResponse map[string]interface{} - _, err = c.session.PostJSON(url, nil, nil, nil, &taskResponse) - exitStatus, err = c.WaitForCompletion(taskResponse) - return -} - -// SetVmConfig - send config options -func (c *Client) SetVmConfig(vmr *VmRef, vmParams map[string]interface{}) (exitStatus interface{}, err error) { - reqbody := ParamsToBody(vmParams) - url := fmt.Sprintf("/nodes/%s/%s/%d/config", vmr.node, vmr.vmType, vmr.vmId) - resp, err := c.session.Post(url, nil, nil, &reqbody) - if err == nil { - taskResponse, err := ResponseJSON(resp) - if err != nil { - return nil, err - } - exitStatus, err = c.WaitForCompletion(taskResponse) - } - return -} - -func (c *Client) ResizeQemuDisk(vmr *VmRef, disk string, moreSizeGB int) (exitStatus interface{}, err error) { - // PUT - //disk:virtio0 - //size:+2G - if disk == "" { - disk = "virtio0" - } - size := fmt.Sprintf("+%dG", moreSizeGB) - reqbody := ParamsToBody(map[string]interface{}{"disk": disk, "size": size}) - url := fmt.Sprintf("/nodes/%s/%s/%d/resize", vmr.node, vmr.vmType, vmr.vmId) - resp, err := c.session.Put(url, nil, nil, &reqbody) - if err == nil { - taskResponse, err := ResponseJSON(resp) - if err != nil { - return nil, err - } - exitStatus, err = c.WaitForCompletion(taskResponse) - } - return -} - -// GetNextID - Get next free VMID -func (c *Client) GetNextID(currentID int) (nextID int, err error) { - var data map[string]interface{} - var url string - if currentID >= 100 { - url = fmt.Sprintf("/cluster/nextid?vmid=%d", currentID) - } else { - url = "/cluster/nextid" - } - _, err = c.session.GetJSON(url, nil, nil, &data) - if err == nil { - if data["errors"] != nil { - if currentID >= 100 { - return c.GetNextID(currentID + 1) - } else { - return -1, errors.New("error using /cluster/nextid") - } - } - nextID, err = strconv.Atoi(data["data"].(string)) - } - return -} - -// CreateVMDisk - Create single disk for VM on host node. -func (c *Client) CreateVMDisk( - nodeName string, - storageName string, - fullDiskName string, - diskParams map[string]interface{}, -) error { - - reqbody := ParamsToBody(diskParams) - url := fmt.Sprintf("/nodes/%s/storage/%s/content", nodeName, storageName) - resp, err := c.session.Post(url, nil, nil, &reqbody) - if err == nil { - taskResponse, err := ResponseJSON(resp) - if err != nil { - return err - } - if diskName, containsData := taskResponse["data"]; !containsData || diskName != fullDiskName { - return errors.New(fmt.Sprintf("Cannot create VM disk %s", fullDiskName)) - } - } else { - return err - } - - return nil -} - -// createVMDisks - Make disks parameters and create all VM disks on host node. -func (c *Client) createVMDisks( - node string, - vmParams map[string]interface{}, -) (disks []string, err error) { - var createdDisks []string - vmID := vmParams["vmid"].(int) - for deviceName, deviceConf := range vmParams { - rxStorageModels := `(ide|sata|scsi|virtio)\d+` - if matched, _ := regexp.MatchString(rxStorageModels, deviceName); matched { - deviceConfMap := ParseConf(deviceConf.(string), ",", "=") - // This if condition to differentiate between `disk` and `cdrom`. - if media, containsFile := deviceConfMap["media"]; containsFile && media == "disk" { - fullDiskName := deviceConfMap["file"].(string) - storageName, volumeName := getStorageAndVolumeName(fullDiskName, ":") - diskParams := map[string]interface{}{ - "vmid": vmID, - "filename": volumeName, - "size": deviceConfMap["size"], - } - err := c.CreateVMDisk(node, storageName, fullDiskName, diskParams) - if err != nil { - return createdDisks, err - } else { - createdDisks = append(createdDisks, fullDiskName) - } - } - } - } - - return createdDisks, nil -} - -// DeleteVMDisks - Delete VM disks from host node. -// By default the VM disks are deteled when the VM is deleted, -// so mainly this is used to delete the disks in case VM creation didn't complete. -func (c *Client) DeleteVMDisks( - node string, - disks []string, -) error { - for _, fullDiskName := range disks { - storageName, volumeName := getStorageAndVolumeName(fullDiskName, ":") - url := fmt.Sprintf("/nodes/%s/storage/%s/content/%s", node, storageName, volumeName) - _, err := c.session.Post(url, nil, nil, nil) - if err != nil { - return err - } - } - - return nil -} - -// getStorageAndVolumeName - Extract disk storage and disk volume, since disk name is saved -// in Proxmox with its storage. -func getStorageAndVolumeName( - fullDiskName string, - separator string, -) (storageName string, diskName string) { - storageAndVolumeName := strings.Split(fullDiskName, separator) - storageName, volumeName := storageAndVolumeName[0], storageAndVolumeName[1] - - // when disk type is dir, volumeName is `file=local:100/vm-100-disk-0.raw` - re := regexp.MustCompile(`\d+/(?P\S+.\S+)`) - match := re.FindStringSubmatch(volumeName) - if len(match) == 2 { - volumeName = match[1] - } - - return storageName, volumeName -} diff --git a/vendor/github.com/Telmate/proxmox-api-go/proxmox/config_qemu.go b/vendor/github.com/Telmate/proxmox-api-go/proxmox/config_qemu.go deleted file mode 100644 index 7c0ffd897..000000000 --- a/vendor/github.com/Telmate/proxmox-api-go/proxmox/config_qemu.go +++ /dev/null @@ -1,706 +0,0 @@ -package proxmox - -import ( - "encoding/json" - "errors" - "fmt" - "io" - "log" - "math/rand" - "net" - "net/url" - "regexp" - "strconv" - "strings" - "time" -) - -type ( - QemuDevices map[int]map[string]interface{} - QemuDevice map[string]interface{} - QemuDeviceParam []string -) - -// ConfigQemu - Proxmox API QEMU options -type ConfigQemu struct { - Name string `json:"name"` - Description string `json:"desc"` - Onboot bool `json:"onboot"` - Agent string `json:"agent"` - Memory int `json:"memory"` - QemuOs string `json:"os"` - QemuCores int `json:"cores"` - QemuSockets int `json:"sockets"` - QemuIso string `json:"iso"` - FullClone *int `json:"fullclone"` - QemuDisks QemuDevices `json:"disk"` - QemuNetworks QemuDevices `json:"network"` - - // Deprecated single disk. - DiskSize float64 `json:"diskGB"` - Storage string `json:"storage"` - StorageType string `json:"storageType"` // virtio|scsi (cloud-init defaults to scsi) - - // Deprecated single nic. - QemuNicModel string `json:"nic"` - QemuBrige string `json:"bridge"` - QemuVlanTag int `json:"vlan"` - QemuMacAddr string `json:"mac"` - - // cloud-init options - CIuser string `json:"ciuser"` - CIpassword string `json:"cipassword"` - - Searchdomain string `json:"searchdomain"` - Nameserver string `json:"nameserver"` - Sshkeys string `json:"sshkeys"` - - // arrays are hard, support 2 interfaces for now - Ipconfig0 string `json:"ipconfig0"` - Ipconfig1 string `json:"ipconfig1"` -} - -// CreateVm - Tell Proxmox API to make the VM -func (config ConfigQemu) CreateVm(vmr *VmRef, client *Client) (err error) { - if config.HasCloudInit() { - return errors.New("Cloud-init parameters only supported on clones or updates") - } - vmr.SetVmType("qemu") - - params := map[string]interface{}{ - "vmid": vmr.vmId, - "name": config.Name, - "onboot": config.Onboot, - "agent": config.Agent, - "ide2": config.QemuIso + ",media=cdrom", - "ostype": config.QemuOs, - "sockets": config.QemuSockets, - "cores": config.QemuCores, - "cpu": "host", - "memory": config.Memory, - "description": config.Description, - } - - // Create disks config. - config.CreateQemuDisksParams(vmr.vmId, params, false) - - // Create networks config. - config.CreateQemuNetworksParams(vmr.vmId, params) - - exitStatus, err := client.CreateQemuVm(vmr.node, params) - if err != nil { - return fmt.Errorf("Error creating VM: %v, error status: %s (params: %v)", err, exitStatus, params) - } - return -} - -// HasCloudInit - are there cloud-init options? -func (config ConfigQemu) HasCloudInit() bool { - return config.CIuser != "" || - config.CIpassword != "" || - config.Searchdomain != "" || - config.Nameserver != "" || - config.Sshkeys != "" || - config.Ipconfig0 != "" || - config.Ipconfig1 != "" -} - -/* - -CloneVm -Example: Request - -nodes/proxmox1-xx/qemu/1012/clone - -newid:145 -name:tf-clone1 -target:proxmox1-xx -full:1 -storage:xxx - -*/ -func (config ConfigQemu) CloneVm(sourceVmr *VmRef, vmr *VmRef, client *Client) (err error) { - vmr.SetVmType("qemu") - fullclone := "1" - if config.FullClone != nil { - fullclone = strconv.Itoa(*config.FullClone) - } - storage := config.Storage - if disk0Storage, ok := config.QemuDisks[0]["storage"].(string); ok && len(disk0Storage) > 0 { - storage = disk0Storage - } - params := map[string]interface{}{ - "newid": vmr.vmId, - "target": vmr.node, - "name": config.Name, - "storage": storage, - "full": fullclone, - } - _, err = client.CloneQemuVm(sourceVmr, params) - if err != nil { - return - } - return config.UpdateConfig(vmr, client) -} - -func (config ConfigQemu) UpdateConfig(vmr *VmRef, client *Client) (err error) { - configParams := map[string]interface{}{ - "name": config.Name, - "description": config.Description, - "onboot": config.Onboot, - "agent": config.Agent, - "sockets": config.QemuSockets, - "cores": config.QemuCores, - "memory": config.Memory, - } - - // Create disks config. - config.CreateQemuDisksParams(vmr.vmId, configParams, true) - - // Create networks config. - config.CreateQemuNetworksParams(vmr.vmId, configParams) - - // cloud-init options - if config.CIuser != "" { - configParams["ciuser"] = config.CIuser - } - if config.CIpassword != "" { - configParams["cipassword"] = config.CIpassword - } - if config.Searchdomain != "" { - configParams["searchdomain"] = config.Searchdomain - } - if config.Nameserver != "" { - configParams["nameserver"] = config.Nameserver - } - if config.Sshkeys != "" { - sshkeyEnc := url.PathEscape(config.Sshkeys + "\n") - sshkeyEnc = strings.Replace(sshkeyEnc, "+", "%2B", -1) - sshkeyEnc = strings.Replace(sshkeyEnc, "@", "%40", -1) - sshkeyEnc = strings.Replace(sshkeyEnc, "=", "%3D", -1) - configParams["sshkeys"] = sshkeyEnc - } - if config.Ipconfig0 != "" { - configParams["ipconfig0"] = config.Ipconfig0 - } - if config.Ipconfig1 != "" { - configParams["ipconfig1"] = config.Ipconfig1 - } - _, err = client.SetVmConfig(vmr, configParams) - return err -} - -func NewConfigQemuFromJson(io io.Reader) (config *ConfigQemu, err error) { - config = &ConfigQemu{QemuVlanTag: -1} - err = json.NewDecoder(io).Decode(config) - if err != nil { - log.Fatal(err) - return nil, err - } - log.Println(config) - return -} - -var ( - rxIso = regexp.MustCompile(`(.*?),media`) - rxDeviceID = regexp.MustCompile(`\d+`) - rxDiskName = regexp.MustCompile(`(virtio|scsi)\d+`) - rxDiskType = regexp.MustCompile(`\D+`) - rxNicName = regexp.MustCompile(`net\d+`) -) - -func NewConfigQemuFromApi(vmr *VmRef, client *Client) (config *ConfigQemu, err error) { - var vmConfig map[string]interface{} - for ii := 0; ii < 3; ii++ { - vmConfig, err = client.GetVmConfig(vmr) - if err != nil { - log.Fatal(err) - return nil, err - } - // this can happen: - // {"data":{"lock":"clone","digest":"eb54fb9d9f120ba0c3bdf694f73b10002c375c38","description":" qmclone temporary file\n"}}) - if vmConfig["lock"] == nil { - break - } else { - time.Sleep(8 * time.Second) - } - } - - if vmConfig["lock"] != nil { - return nil, errors.New("vm locked, could not obtain config") - } - - // vmConfig Sample: map[ cpu:host - // net0:virtio=62:DF:XX:XX:XX:XX,bridge=vmbr0 - // ide2:local:iso/xxx-xx.iso,media=cdrom memory:2048 - // smbios1:uuid=8b3bf833-aad8-4545-xxx-xxxxxxx digest:aa6ce5xxxxx1b9ce33e4aaeff564d4 sockets:1 - // name:terraform-ubuntu1404-template bootdisk:virtio0 - // virtio0:ProxmoxxxxISCSI:vm-1014-disk-2,size=4G - // description:Base image - // cores:2 ostype:l26 - - name := "" - if _, isSet := vmConfig["name"]; isSet { - name = vmConfig["name"].(string) - } - description := "" - if _, isSet := vmConfig["description"]; isSet { - description = vmConfig["description"].(string) - } - onboot := true - if _, isSet := vmConfig["onboot"]; isSet { - onboot = Itob(int(vmConfig["onboot"].(float64))) - } - agent := "1" - if _, isSet := vmConfig["agent"]; isSet { - agent = vmConfig["agent"].(string) - } - ostype := "other" - if _, isSet := vmConfig["ostype"]; isSet { - ostype = vmConfig["ostype"].(string) - } - memory := 0.0 - if _, isSet := vmConfig["memory"]; isSet { - memory = vmConfig["memory"].(float64) - } - cores := 1.0 - if _, isSet := vmConfig["cores"]; isSet { - cores = vmConfig["cores"].(float64) - } - sockets := 1.0 - if _, isSet := vmConfig["sockets"]; isSet { - sockets = vmConfig["sockets"].(float64) - } - config = &ConfigQemu{ - Name: name, - Description: strings.TrimSpace(description), - Onboot: onboot, - Agent: agent, - QemuOs: ostype, - Memory: int(memory), - QemuCores: int(cores), - QemuSockets: int(sockets), - QemuVlanTag: -1, - QemuDisks: QemuDevices{}, - QemuNetworks: QemuDevices{}, - } - - if vmConfig["ide2"] != nil { - isoMatch := rxIso.FindStringSubmatch(vmConfig["ide2"].(string)) - config.QemuIso = isoMatch[1] - } - - if _, isSet := vmConfig["ciuser"]; isSet { - config.CIuser = vmConfig["ciuser"].(string) - } - if _, isSet := vmConfig["cipassword"]; isSet { - config.CIpassword = vmConfig["cipassword"].(string) - } - if _, isSet := vmConfig["searchdomain"]; isSet { - config.Searchdomain = vmConfig["searchdomain"].(string) - } - if _, isSet := vmConfig["sshkeys"]; isSet { - config.Sshkeys, _ = url.PathUnescape(vmConfig["sshkeys"].(string)) - } - if _, isSet := vmConfig["ipconfig0"]; isSet { - config.Ipconfig0 = vmConfig["ipconfig0"].(string) - } - if _, isSet := vmConfig["ipconfig1"]; isSet { - config.Ipconfig1 = vmConfig["ipconfig1"].(string) - } - - // Add disks. - diskNames := []string{} - - for k, _ := range vmConfig { - if diskName := rxDiskName.FindStringSubmatch(k); len(diskName) > 0 { - diskNames = append(diskNames, diskName[0]) - } - } - - for _, diskName := range diskNames { - diskConfStr := vmConfig[diskName] - diskConfList := strings.Split(diskConfStr.(string), ",") - - // - id := rxDeviceID.FindStringSubmatch(diskName) - diskID, _ := strconv.Atoi(id[0]) - diskType := rxDiskType.FindStringSubmatch(diskName)[0] - storageName, fileName := ParseSubConf(diskConfList[0], ":") - - // - diskConfMap := QemuDevice{ - "type": diskType, - "storage": storageName, - "file": fileName, - } - - // Add rest of device config. - diskConfMap.readDeviceConfig(diskConfList[1:]) - - // And device config to disks map. - if len(diskConfMap) > 0 { - config.QemuDisks[diskID] = diskConfMap - } - } - - // Add networks. - nicNameRe := regexp.MustCompile(`net\d+`) - nicNames := []string{} - - for k, _ := range vmConfig { - if nicName := nicNameRe.FindStringSubmatch(k); len(nicName) > 0 { - nicNames = append(nicNames, nicName[0]) - } - } - - for _, nicName := range nicNames { - nicConfStr := vmConfig[nicName] - nicConfList := strings.Split(nicConfStr.(string), ",") - - // - id := rxDeviceID.FindStringSubmatch(nicName) - nicID, _ := strconv.Atoi(id[0]) - model, macaddr := ParseSubConf(nicConfList[0], "=") - - // Add model and MAC address. - nicConfMap := QemuDevice{ - "model": model, - "macaddr": macaddr, - } - - // Add rest of device config. - nicConfMap.readDeviceConfig(nicConfList[1:]) - - // And device config to networks. - if len(nicConfMap) > 0 { - config.QemuNetworks[nicID] = nicConfMap - } - } - - return -} - -// Useful waiting for ISO install to complete -func WaitForShutdown(vmr *VmRef, client *Client) (err error) { - for ii := 0; ii < 100; ii++ { - vmState, err := client.GetVmState(vmr) - if err != nil { - log.Print("Wait error:") - log.Println(err) - } else if vmState["status"] == "stopped" { - return nil - } - time.Sleep(5 * time.Second) - } - return errors.New("Not shutdown within wait time") -} - -// This is because proxmox create/config API won't let us make usernet devices -func SshForwardUsernet(vmr *VmRef, client *Client) (sshPort string, err error) { - vmState, err := client.GetVmState(vmr) - if err != nil { - return "", err - } - if vmState["status"] == "stopped" { - return "", errors.New("VM must be running first") - } - sshPort = strconv.Itoa(vmr.VmId() + 22000) - _, err = client.MonitorCmd(vmr, "netdev_add user,id=net1,hostfwd=tcp::"+sshPort+"-:22") - if err != nil { - return "", err - } - _, err = client.MonitorCmd(vmr, "device_add virtio-net-pci,id=net1,netdev=net1,addr=0x13") - if err != nil { - return "", err - } - return -} - -// device_del net1 -// netdev_del net1 -func RemoveSshForwardUsernet(vmr *VmRef, client *Client) (err error) { - vmState, err := client.GetVmState(vmr) - if err != nil { - return err - } - if vmState["status"] == "stopped" { - return errors.New("VM must be running first") - } - _, err = client.MonitorCmd(vmr, "device_del net1") - if err != nil { - return err - } - _, err = client.MonitorCmd(vmr, "netdev_del net1") - if err != nil { - return err - } - return nil -} - -func MaxVmId(client *Client) (max int, err error) { - resp, err := client.GetVmList() - vms := resp["data"].([]interface{}) - max = 0 - for vmii := range vms { - vm := vms[vmii].(map[string]interface{}) - vmid := int(vm["vmid"].(float64)) - if vmid > max { - max = vmid - } - } - return -} - -func SendKeysString(vmr *VmRef, client *Client, keys string) (err error) { - vmState, err := client.GetVmState(vmr) - if err != nil { - return err - } - if vmState["status"] == "stopped" { - return errors.New("VM must be running first") - } - for _, r := range keys { - c := string(r) - lower := strings.ToLower(c) - if c != lower { - c = "shift-" + lower - } else { - switch c { - case "!": - c = "shift-1" - case "@": - c = "shift-2" - case "#": - c = "shift-3" - case "$": - c = "shift-4" - case "%%": - c = "shift-5" - case "^": - c = "shift-6" - case "&": - c = "shift-7" - case "*": - c = "shift-8" - case "(": - c = "shift-9" - case ")": - c = "shift-0" - case "_": - c = "shift-minus" - case "+": - c = "shift-equal" - case " ": - c = "spc" - case "/": - c = "slash" - case "\\": - c = "backslash" - case ",": - c = "comma" - case "-": - c = "minus" - case "=": - c = "equal" - case ".": - c = "dot" - case "?": - c = "shift-slash" - } - } - _, err = client.MonitorCmd(vmr, "sendkey "+c) - if err != nil { - return err - } - time.Sleep(100) - } - return nil -} - -// Create parameters for each Nic device. -func (c ConfigQemu) CreateQemuNetworksParams(vmID int, params map[string]interface{}) error { - - // For backward compatibility. - if len(c.QemuNetworks) == 0 && len(c.QemuNicModel) > 0 { - deprecatedStyleMap := QemuDevice{ - "model": c.QemuNicModel, - "bridge": c.QemuBrige, - "macaddr": c.QemuMacAddr, - } - - if c.QemuVlanTag > 0 { - deprecatedStyleMap["tag"] = strconv.Itoa(c.QemuVlanTag) - } - - c.QemuNetworks[0] = deprecatedStyleMap - } - - // For new style with multi net device. - for nicID, nicConfMap := range c.QemuNetworks { - - nicConfParam := QemuDeviceParam{} - - // Set Nic name. - qemuNicName := "net" + strconv.Itoa(nicID) - - // Set Mac address. - if nicConfMap["macaddr"] == nil || nicConfMap["macaddr"].(string) == "" { - // Generate Mac based on VmID and NicID so it will be the same always. - macaddr := make(net.HardwareAddr, 6) - rand.Seed(time.Now().UnixNano()) - rand.Read(macaddr) - macaddr[0] = (macaddr[0] | 2) & 0xfe // fix from github issue #18 - macAddrUppr := strings.ToUpper(fmt.Sprintf("%v", macaddr)) - // use model=mac format for older proxmox compatability - macAddr := fmt.Sprintf("%v=%v", nicConfMap["model"], macAddrUppr) - - // Add Mac to source map so it will be returned. (useful for some use case like Terraform) - nicConfMap["macaddr"] = macAddrUppr - // and also add it to the parameters which will be sent to Proxmox API. - nicConfParam = append(nicConfParam, macAddr) - } else { - macAddr := fmt.Sprintf("%v=%v", nicConfMap["model"], nicConfMap["macaddr"].(string)) - nicConfParam = append(nicConfParam, macAddr) - } - - // Set bridge if not nat. - if nicConfMap["bridge"].(string) != "nat" { - bridge := fmt.Sprintf("bridge=%v", nicConfMap["bridge"]) - nicConfParam = append(nicConfParam, bridge) - } - - // Keys that are not used as real/direct conf. - ignoredKeys := []string{"id", "bridge", "macaddr", "model"} - - // Rest of config. - nicConfParam = nicConfParam.createDeviceParam(nicConfMap, ignoredKeys) - - // Add nic to Qemu prams. - params[qemuNicName] = strings.Join(nicConfParam, ",") - } - - return nil -} - -// Create parameters for each disk. -func (c ConfigQemu) CreateQemuDisksParams( - vmID int, - params map[string]interface{}, - cloned bool, -) error { - - // For backward compatibility. - if len(c.QemuDisks) == 0 && len(c.Storage) > 0 { - - dType := c.StorageType - if dType == "" { - if c.HasCloudInit() { - dType = "scsi" - } else { - dType = "virtio" - } - } - deprecatedStyleMap := QemuDevice{ - "type": dType, - "storage": c.Storage, - "size": c.DiskSize, - "storage_type": "lvm", // default old style - "cache": "none", // default old value - } - - c.QemuDisks[0] = deprecatedStyleMap - } - - // For new style with multi disk device. - for diskID, diskConfMap := range c.QemuDisks { - - // skip the first disk for clones (may not always be right, but a template probably has at least 1 disk) - if diskID == 0 && cloned { - continue - } - diskConfParam := QemuDeviceParam{ - "media=disk", - } - - // Device name. - deviceType := diskConfMap["type"].(string) - qemuDiskName := deviceType + strconv.Itoa(diskID) - - // Set disk storage. - // Disk size. - diskSizeGB := fmt.Sprintf("size=%v", diskConfMap["size"]) - diskConfParam = append(diskConfParam, diskSizeGB) - - // Disk name. - var diskFile string - // Currently ZFS local, LVM, and Directory are considered. - // Other formats are not verified, but could be added if they're needed. - rxStorageTypes := `(zfspool|lvm)` - storageType := diskConfMap["storage_type"].(string) - if matched, _ := regexp.MatchString(rxStorageTypes, storageType); matched { - diskFile = fmt.Sprintf("file=%v:vm-%v-disk-%v", diskConfMap["storage"], vmID, diskID) - } else { - diskFile = fmt.Sprintf("file=%v:%v/vm-%v-disk-%v.%v", diskConfMap["storage"], vmID, vmID, diskID, diskConfMap["format"]) - } - diskConfParam = append(diskConfParam, diskFile) - - // Set cache if not none (default). - if diskConfMap["cache"].(string) != "none" { - diskCache := fmt.Sprintf("cache=%v", diskConfMap["cache"]) - diskConfParam = append(diskConfParam, diskCache) - } - - // Keys that are not used as real/direct conf. - ignoredKeys := []string{"id", "type", "storage", "storage_type", "size", "cache"} - - // Rest of config. - diskConfParam = diskConfParam.createDeviceParam(diskConfMap, ignoredKeys) - - // Add back to Qemu prams. - params[qemuDiskName] = strings.Join(diskConfParam, ",") - } - - return nil -} - -// Create the parameters for each device that will be sent to Proxmox API. -func (p QemuDeviceParam) createDeviceParam( - deviceConfMap QemuDevice, - ignoredKeys []string, -) QemuDeviceParam { - - for key, value := range deviceConfMap { - if ignored := inArray(ignoredKeys, key); !ignored { - var confValue interface{} - if bValue, ok := value.(bool); ok && bValue { - confValue = "1" - } else if sValue, ok := value.(string); ok && len(sValue) > 0 { - confValue = sValue - } else if iValue, ok := value.(int); ok && iValue > 0 { - confValue = iValue - } - if confValue != nil { - deviceConf := fmt.Sprintf("%v=%v", key, confValue) - p = append(p, deviceConf) - } - } - } - - return p -} - -// readDeviceConfig - get standard sub-conf strings where `key=value` and update conf map. -func (confMap QemuDevice) readDeviceConfig(confList []string) error { - // Add device config. - for _, conf := range confList { - key, value := ParseSubConf(conf, "=") - confMap[key] = value - } - return nil -} - -func (c ConfigQemu) String() string { - jsConf, _ := json.Marshal(c) - return string(jsConf) -} diff --git a/vendor/github.com/Telmate/proxmox-api-go/proxmox/session.go b/vendor/github.com/Telmate/proxmox-api-go/proxmox/session.go deleted file mode 100644 index 72f72eb6a..000000000 --- a/vendor/github.com/Telmate/proxmox-api-go/proxmox/session.go +++ /dev/null @@ -1,319 +0,0 @@ -package proxmox - -// inspired by https://github.com/openstack/golang-client/blob/master/openstack/session.go - -import ( - "bytes" - "crypto/tls" - "encoding/json" - "errors" - "fmt" - "io" - "io/ioutil" - "log" - "net/http" - "net/http/httputil" - "net/url" -) - -var Debug = new(bool) - -type Response struct { - Resp *http.Response - Body []byte -} - -type Session struct { - httpClient *http.Client - ApiUrl string - AuthTicket string - CsrfToken string - Headers http.Header -} - -func NewSession(apiUrl string, hclient *http.Client, tls *tls.Config) (session *Session, err error) { - if hclient == nil { - // Only build a transport if we're also building the client - tr := &http.Transport{ - TLSClientConfig: tls, - DisableCompression: true, - } - hclient = &http.Client{Transport: tr} - } - session = &Session{ - httpClient: hclient, - ApiUrl: apiUrl, - AuthTicket: "", - CsrfToken: "", - Headers: http.Header{}, - } - return session, nil -} - -func ParamsToBody(params map[string]interface{}) (body []byte) { - vals := url.Values{} - for k, intrV := range params { - var v string - switch intrV.(type) { - // Convert true/false bool to 1/0 string where Proxmox API can understand it. - case bool: - if intrV.(bool) { - v = "1" - } else { - v = "0" - } - default: - v = fmt.Sprintf("%v", intrV) - } - vals.Set(k, v) - } - body = bytes.NewBufferString(vals.Encode()).Bytes() - return -} - -func decodeResponse(resp *http.Response, v interface{}) error { - if resp.Body == nil { - return nil - } - rbody, err := ioutil.ReadAll(resp.Body) - if err != nil { - return fmt.Errorf("error reading response body: %s", err) - } - if err = json.Unmarshal(rbody, &v); err != nil { - return err - } - return nil -} - -func ResponseJSON(resp *http.Response) (jbody map[string]interface{}, err error) { - err = decodeResponse(resp, &jbody) - return jbody, err -} - -func TypedResponse(resp *http.Response, v interface{}) error { - var intermediate struct { - Data struct { - Result json.RawMessage `json:"result"` - } `json:"data"` - } - err := decodeResponse(resp, &intermediate) - if err != nil { - return fmt.Errorf("error reading response envelope: %v", err) - } - if err = json.Unmarshal(intermediate.Data.Result, v); err != nil { - return fmt.Errorf("error unmarshalling result %v", err) - } - return nil -} - -func (s *Session) Login(username string, password string) (err error) { - reqbody := ParamsToBody(map[string]interface{}{"username": username, "password": password}) - olddebug := *Debug - *Debug = false // don't share passwords in debug log - resp, err := s.Post("/access/ticket", nil, nil, &reqbody) - *Debug = olddebug - if err != nil { - return err - } - if resp == nil { - return errors.New("Login error reading response") - } - dr, _ := httputil.DumpResponse(resp, true) - jbody, err := ResponseJSON(resp) - if err != nil { - return err - } - if jbody == nil || jbody["data"] == nil { - return fmt.Errorf("Invalid login response:\n-----\n%s\n-----", dr) - } - dat := jbody["data"].(map[string]interface{}) - s.AuthTicket = dat["ticket"].(string) - s.CsrfToken = dat["CSRFPreventionToken"].(string) - return nil -} - -func (s *Session) NewRequest(method, url string, headers *http.Header, body io.Reader) (req *http.Request, err error) { - req, err = http.NewRequest(method, url, body) - if err != nil { - return nil, err - } - if headers != nil { - req.Header = *headers - } - if s.AuthTicket != "" { - req.Header.Add("Cookie", "PVEAuthCookie="+s.AuthTicket) - req.Header.Add("CSRFPreventionToken", s.CsrfToken) - } - return -} - -func (s *Session) Do(req *http.Request) (*http.Response, error) { - // Add session headers - for k := range s.Headers { - req.Header.Set(k, s.Headers.Get(k)) - } - - if *Debug { - d, _ := httputil.DumpRequestOut(req, true) - log.Printf(">>>>>>>>>> REQUEST:\n", string(d)) - } - - resp, err := s.httpClient.Do(req) - - if err != nil { - return nil, err - } - - if *Debug { - dr, _ := httputil.DumpResponse(resp, true) - log.Printf("<<<<<<<<<< RESULT:\n", string(dr)) - } - - if resp.StatusCode < 200 || resp.StatusCode > 299 { - return resp, errors.New(resp.Status) - } - - return resp, nil -} - -// Perform a simple get to an endpoint -func (s *Session) Request( - method string, - url string, - params *url.Values, - headers *http.Header, - body *[]byte, -) (resp *http.Response, err error) { - // add params to url here - url = s.ApiUrl + url - if params != nil { - url = url + "?" + params.Encode() - } - - // Get the body if one is present - var buf io.Reader - if body != nil { - buf = bytes.NewReader(*body) - } - - req, err := s.NewRequest(method, url, headers, buf) - if err != nil { - return nil, err - } - - req.Header.Set("Accept", "application/json") - - return s.Do(req) -} - -// Perform a simple get to an endpoint and unmarshall returned JSON -func (s *Session) RequestJSON( - method string, - url string, - params *url.Values, - headers *http.Header, - body interface{}, - responseContainer interface{}, -) (resp *http.Response, err error) { - var bodyjson []byte - if body != nil { - bodyjson, err = json.Marshal(body) - if err != nil { - return nil, err - } - } - - // if headers == nil { - // headers = &http.Header{} - // headers.Add("Content-Type", "application/json") - // } - - resp, err = s.Request(method, url, params, headers, &bodyjson) - if err != nil { - return resp, err - } - - // err = util.CheckHTTPResponseStatusCode(resp) - // if err != nil { - // return nil, err - // } - - rbody, err := ioutil.ReadAll(resp.Body) - if err != nil { - return resp, errors.New("error reading response body") - } - if err = json.Unmarshal(rbody, &responseContainer); err != nil { - return resp, err - } - - return resp, nil -} - -func (s *Session) Delete( - url string, - params *url.Values, - headers *http.Header, -) (resp *http.Response, err error) { - return s.Request("DELETE", url, params, headers, nil) -} - -func (s *Session) Get( - url string, - params *url.Values, - headers *http.Header, -) (resp *http.Response, err error) { - return s.Request("GET", url, params, headers, nil) -} - -func (s *Session) GetJSON( - url string, - params *url.Values, - headers *http.Header, - responseContainer interface{}, -) (resp *http.Response, err error) { - return s.RequestJSON("GET", url, params, headers, nil, responseContainer) -} - -func (s *Session) Head( - url string, - params *url.Values, - headers *http.Header, -) (resp *http.Response, err error) { - return s.Request("HEAD", url, params, headers, nil) -} - -func (s *Session) Post( - url string, - params *url.Values, - headers *http.Header, - body *[]byte, -) (resp *http.Response, err error) { - if headers == nil { - headers = &http.Header{} - headers.Add("Content-Type", "application/x-www-form-urlencoded") - } - return s.Request("POST", url, params, headers, body) -} - -func (s *Session) PostJSON( - url string, - params *url.Values, - headers *http.Header, - body interface{}, - responseContainer interface{}, -) (resp *http.Response, err error) { - return s.RequestJSON("POST", url, params, headers, body, responseContainer) -} - -func (s *Session) Put( - url string, - params *url.Values, - headers *http.Header, - body *[]byte, -) (resp *http.Response, err error) { - if headers == nil { - headers = &http.Header{} - headers.Add("Content-Type", "application/x-www-form-urlencoded") - } - return s.Request("PUT", url, params, headers, body) -} diff --git a/vendor/github.com/antchfx/xpath/.gitignore b/vendor/github.com/antchfx/xpath/.gitignore new file mode 100644 index 000000000..4d5d27b1d --- /dev/null +++ b/vendor/github.com/antchfx/xpath/.gitignore @@ -0,0 +1,32 @@ +# vscode +.vscode +debug +*.test + +./build + +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof \ No newline at end of file diff --git a/vendor/github.com/antchfx/xpath/.travis.yml b/vendor/github.com/antchfx/xpath/.travis.yml new file mode 100644 index 000000000..126848c8e --- /dev/null +++ b/vendor/github.com/antchfx/xpath/.travis.yml @@ -0,0 +1,12 @@ +language: go + +go: + - 1.6 + - 1.7 + - 1.8 + +install: + - go get github.com/mattn/goveralls + +script: + - $HOME/gopath/bin/goveralls -service=travis-ci \ No newline at end of file diff --git a/vendor/github.com/approvals/go-approval-tests/.gitignore b/vendor/github.com/approvals/go-approval-tests/.gitignore new file mode 100644 index 000000000..116a34613 --- /dev/null +++ b/vendor/github.com/approvals/go-approval-tests/.gitignore @@ -0,0 +1,25 @@ +*.received.* +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/approvals/go-approval-tests/.travis.yml b/vendor/github.com/approvals/go-approval-tests/.travis.yml new file mode 100644 index 000000000..2f2aa09d7 --- /dev/null +++ b/vendor/github.com/approvals/go-approval-tests/.travis.yml @@ -0,0 +1,16 @@ +sudo: false + +language: go + +go: + - 1.6 + +install: + - go get -u github.com/golang/lint/golint + +script: + - test -z "$(go fmt -s -l -w ./... | tee /dev/stderr)" + - golint -set_exit_status ./... + - go vet ./... + - go build -v ./... + - go test -v ./... \ No newline at end of file diff --git a/vendor/github.com/armon/go-metrics/.gitignore b/vendor/github.com/armon/go-metrics/.gitignore new file mode 100644 index 000000000..8c03ec112 --- /dev/null +++ b/vendor/github.com/armon/go-metrics/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe + +/metrics.out diff --git a/vendor/github.com/armon/go-radix/.gitignore b/vendor/github.com/armon/go-radix/.gitignore new file mode 100644 index 000000000..00268614f --- /dev/null +++ b/vendor/github.com/armon/go-radix/.gitignore @@ -0,0 +1,22 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe diff --git a/vendor/github.com/armon/go-radix/.travis.yml b/vendor/github.com/armon/go-radix/.travis.yml new file mode 100644 index 000000000..1a0bbea6c --- /dev/null +++ b/vendor/github.com/armon/go-radix/.travis.yml @@ -0,0 +1,3 @@ +language: go +go: + - tip diff --git a/vendor/github.com/armon/go-radix/go.mod b/vendor/github.com/armon/go-radix/go.mod new file mode 100644 index 000000000..4336aa29e --- /dev/null +++ b/vendor/github.com/armon/go-radix/go.mod @@ -0,0 +1 @@ +module github.com/armon/go-radix diff --git a/vendor/github.com/armon/go-radix/radix.go b/vendor/github.com/armon/go-radix/radix.go index d2914c13b..e2bb22eb9 100644 --- a/vendor/github.com/armon/go-radix/radix.go +++ b/vendor/github.com/armon/go-radix/radix.go @@ -44,13 +44,13 @@ func (n *node) addEdge(e edge) { n.edges.Sort() } -func (n *node) replaceEdge(e edge) { +func (n *node) updateEdge(label byte, node *node) { num := len(n.edges) idx := sort.Search(num, func(i int) bool { - return n.edges[i].label >= e.label + return n.edges[i].label >= label }) - if idx < num && n.edges[idx].label == e.label { - n.edges[idx].node = e.node + if idx < num && n.edges[idx].label == label { + n.edges[idx].node = node return } panic("replacing missing edge") @@ -198,10 +198,7 @@ func (t *Tree) Insert(s string, v interface{}) (interface{}, bool) { child := &node{ prefix: search[:commonPrefix], } - parent.replaceEdge(edge{ - label: search[0], - node: child, - }) + parent.updateEdge(search[0], child) // Restore the existing node child.addEdge(edge{ @@ -292,6 +289,53 @@ DELETE: return leaf.val, true } +// DeletePrefix is used to delete the subtree under a prefix +// Returns how many nodes were deleted +// Use this to delete large subtrees efficiently +func (t *Tree) DeletePrefix(s string) int { + return t.deletePrefix(nil, t.root, s) +} + +// delete does a recursive deletion +func (t *Tree) deletePrefix(parent, n *node, prefix string) int { + // Check for key exhaustion + if len(prefix) == 0 { + // Remove the leaf node + subTreeSize := 0 + //recursively walk from all edges of the node to be deleted + recursiveWalk(n, func(s string, v interface{}) bool { + subTreeSize++ + return false + }) + if n.isLeaf() { + n.leaf = nil + } + n.edges = nil // deletes the entire subtree + + // Check if we should merge the parent's other child + if parent != nil && parent != t.root && len(parent.edges) == 1 && !parent.isLeaf() { + parent.mergeChild() + } + t.size -= subTreeSize + return subTreeSize + } + + // Look for an edge + label := prefix[0] + child := n.getEdge(label) + if child == nil || (!strings.HasPrefix(child.prefix, prefix) && !strings.HasPrefix(prefix, child.prefix)) { + return 0 + } + + // Consume the search prefix + if len(child.prefix) > len(prefix) { + prefix = prefix[len(prefix):] + } else { + prefix = prefix[len(child.prefix):] + } + return t.deletePrefix(n, child, prefix) +} + func (n *node) mergeChild() { e := n.edges[0] child := e.node diff --git a/vendor/github.com/Azure/go-ansiterm/LICENSE b/vendor/github.com/bgentry/go-netrc/LICENSE similarity index 87% rename from vendor/github.com/Azure/go-ansiterm/LICENSE rename to vendor/github.com/bgentry/go-netrc/LICENSE index e3d9a64d1..aade9a58b 100644 --- a/vendor/github.com/Azure/go-ansiterm/LICENSE +++ b/vendor/github.com/bgentry/go-netrc/LICENSE @@ -1,6 +1,5 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation +Original version Copyright © 2010 Fazlul Shahriar . Newer +portions Copyright © 2014 Blake Gentry . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/github.com/bgentry/speakeasy/.gitignore b/vendor/github.com/bgentry/speakeasy/.gitignore new file mode 100644 index 000000000..9e1311461 --- /dev/null +++ b/vendor/github.com/bgentry/speakeasy/.gitignore @@ -0,0 +1,2 @@ +example/example +example/example.exe diff --git a/vendor/github.com/bgentry/speakeasy/LICENSE b/vendor/github.com/bgentry/speakeasy/LICENSE new file mode 100644 index 000000000..37d60fc35 --- /dev/null +++ b/vendor/github.com/bgentry/speakeasy/LICENSE @@ -0,0 +1,24 @@ +MIT License + +Copyright (c) 2017 Blake Gentry + +This license applies to the non-Windows portions of this library. The Windows +portion maintains its own Apache 2.0 license. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/bgentry/speakeasy/example/main.go b/vendor/github.com/bgentry/speakeasy/example/main.go deleted file mode 100644 index d71153a16..000000000 --- a/vendor/github.com/bgentry/speakeasy/example/main.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/bgentry/speakeasy" -) - -func main() { - password, err := speakeasy.Ask("Please enter a password: ") - if err != nil { - fmt.Println(err) - os.Exit(1) - } - fmt.Printf("Password result: %q\n", password) - fmt.Printf("Password len: %d\n", len(password)) -} diff --git a/vendor/github.com/bgentry/speakeasy/speakeasy.go b/vendor/github.com/bgentry/speakeasy/speakeasy.go index d16233a1a..71c1dd1b9 100644 --- a/vendor/github.com/bgentry/speakeasy/speakeasy.go +++ b/vendor/github.com/bgentry/speakeasy/speakeasy.go @@ -14,16 +14,18 @@ func Ask(prompt string) (password string, err error) { return FAsk(os.Stdout, prompt) } -// Same as the Ask function, except it is possible to specify the file to write -// the prompt to. -func FAsk(file *os.File, prompt string) (password string, err error) { - if prompt != "" { - fmt.Fprint(file, prompt) // Display the prompt. +// FAsk is the same as Ask, except it is possible to specify the file to write +// the prompt to. If 'nil' is passed as the writer, no prompt will be written. +func FAsk(wr io.Writer, prompt string) (password string, err error) { + if wr != nil && prompt != "" { + fmt.Fprint(wr, prompt) // Display the prompt. } password, err = getPassword() // Carriage return after the user input. - fmt.Fprintln(file, "") + if wr != nil { + fmt.Fprintln(wr, "") + } return } diff --git a/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go b/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go index dca74bd99..d99fda191 100644 --- a/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go +++ b/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go @@ -4,7 +4,7 @@ // Original code is based on code by RogerV in the golang-nuts thread: // https://groups.google.com/group/golang-nuts/browse_thread/thread/40cc41e9d9fc9247 -// +build darwin freebsd linux netbsd openbsd solaris +// +build darwin dragonfly freebsd linux netbsd openbsd solaris package speakeasy diff --git a/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go b/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go index fc4177c44..c2093a809 100644 --- a/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go +++ b/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go @@ -3,7 +3,6 @@ package speakeasy import ( - "os" "syscall" ) @@ -12,18 +11,17 @@ import ( const ENABLE_ECHO_INPUT = 0x0004 func getPassword() (password string, err error) { - hStdin := syscall.Handle(os.Stdin.Fd()) var oldMode uint32 - err = syscall.GetConsoleMode(hStdin, &oldMode) + err = syscall.GetConsoleMode(syscall.Stdin, &oldMode) if err != nil { return } var newMode uint32 = (oldMode &^ ENABLE_ECHO_INPUT) - err = setConsoleMode(hStdin, newMode) - defer setConsoleMode(hStdin, oldMode) + err = setConsoleMode(syscall.Stdin, newMode) + defer setConsoleMode(syscall.Stdin, oldMode) if err != nil { return } diff --git a/vendor/github.com/creack/goselect/.gitignore b/vendor/github.com/creack/goselect/.gitignore new file mode 100644 index 000000000..6f4dacea8 --- /dev/null +++ b/vendor/github.com/creack/goselect/.gitignore @@ -0,0 +1,29 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +go-select* +goselect* +example-* +example/example diff --git a/vendor/github.com/creack/goselect/test_crosscompile.sh b/vendor/github.com/creack/goselect/test_crosscompile.sh old mode 100755 new mode 100644 diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE index c83641619..bc52e96f2 100644 --- a/vendor/github.com/davecgh/go-spew/LICENSE +++ b/vendor/github.com/davecgh/go-spew/LICENSE @@ -2,7 +2,7 @@ ISC License Copyright (c) 2012-2016 Dave Collins -Permission to use, copy, modify, and distribute this software for any +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go index 8a4a6589a..792994785 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -16,7 +16,9 @@ // when the code is not running on Google App Engine, compiled by GopherJS, and // "-tags safe" is not added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. -// +build !js,!appengine,!safe,!disableunsafe +// Go versions prior to 1.4 are disabled because they use a different layout +// for interfaces which make the implementation of unsafeReflectValue more complex. +// +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew @@ -34,80 +36,49 @@ const ( ptrSize = unsafe.Sizeof((*byte)(nil)) ) -var ( - // offsetPtr, offsetScalar, and offsetFlag are the offsets for the - // internal reflect.Value fields. These values are valid before golang - // commit ecccf07e7f9d which changed the format. The are also valid - // after commit 82f48826c6c7 which changed the format again to mirror - // the original format. Code in the init function updates these offsets - // as necessary. - offsetPtr = uintptr(ptrSize) - offsetScalar = uintptr(0) - offsetFlag = uintptr(ptrSize * 2) +type flag uintptr - // flagKindWidth and flagKindShift indicate various bits that the - // reflect package uses internally to track kind information. - // - // flagRO indicates whether or not the value field of a reflect.Value is - // read-only. - // - // flagIndir indicates whether the value field of a reflect.Value is - // the actual data or a pointer to the data. - // - // These values are valid before golang commit 90a7c3c86944 which - // changed their positions. Code in the init function updates these - // flags as necessary. - flagKindWidth = uintptr(5) - flagKindShift = uintptr(flagKindWidth - 1) - flagRO = uintptr(1 << 0) - flagIndir = uintptr(1 << 1) +var ( + // flagRO indicates whether the value field of a reflect.Value + // is read-only. + flagRO flag + + // flagAddr indicates whether the address of the reflect.Value's + // value may be taken. + flagAddr flag ) -func init() { - // Older versions of reflect.Value stored small integers directly in the - // ptr field (which is named val in the older versions). Versions - // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named - // scalar for this purpose which unfortunately came before the flag - // field, so the offset of the flag field is different for those - // versions. - // - // This code constructs a new reflect.Value from a known small integer - // and checks if the size of the reflect.Value struct indicates it has - // the scalar field. When it does, the offsets are updated accordingly. - vv := reflect.ValueOf(0xf00) - if unsafe.Sizeof(vv) == (ptrSize * 4) { - offsetScalar = ptrSize * 2 - offsetFlag = ptrSize * 3 - } +// flagKindMask holds the bits that make up the kind +// part of the flags field. In all the supported versions, +// it is in the lower 5 bits. +const flagKindMask = flag(0x1f) - // Commit 90a7c3c86944 changed the flag positions such that the low - // order bits are the kind. This code extracts the kind from the flags - // field and ensures it's the correct type. When it's not, the flag - // order has been changed to the newer format, so the flags are updated - // accordingly. - upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag) - upfv := *(*uintptr)(upf) - flagKindMask := uintptr((1<>flagKindShift != uintptr(reflect.Int) { - flagKindShift = 0 - flagRO = 1 << 5 - flagIndir = 1 << 6 +// Different versions of Go have used different +// bit layouts for the flags type. This table +// records the known combinations. +var okFlags = []struct { + ro, addr flag +}{{ + // From Go 1.4 to 1.5 + ro: 1 << 5, + addr: 1 << 7, +}, { + // Up to Go tip. + ro: 1<<5 | 1<<6, + addr: 1 << 8, +}} - // Commit adf9b30e5594 modified the flags to separate the - // flagRO flag into two bits which specifies whether or not the - // field is embedded. This causes flagIndir to move over a bit - // and means that flagRO is the combination of either of the - // original flagRO bit and the new bit. - // - // This code detects the change by extracting what used to be - // the indirect bit to ensure it's set. When it's not, the flag - // order has been changed to the newer format, so the flags are - // updated accordingly. - if upfv&flagIndir == 0 { - flagRO = 3 << 5 - flagIndir = 1 << 7 - } +var flagValOffset = func() uintptr { + field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") + if !ok { + panic("reflect.Value has no flag field") } + return field.Offset +}() + +// flagField returns a pointer to the flag field of a reflect.Value. +func flagField(v *reflect.Value) *flag { + return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset)) } // unsafeReflectValue converts the passed reflect.Value into a one that bypasses @@ -119,34 +90,56 @@ func init() { // This allows us to check for implementations of the Stringer and error // interfaces to be used for pretty printing ordinarily unaddressable and // inaccessible values such as unexported struct fields. -func unsafeReflectValue(v reflect.Value) (rv reflect.Value) { - indirects := 1 - vt := v.Type() - upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr) - rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag)) - if rvf&flagIndir != 0 { - vt = reflect.PtrTo(v.Type()) - indirects++ - } else if offsetScalar != 0 { - // The value is in the scalar field when it's not one of the - // reference types. - switch vt.Kind() { - case reflect.Uintptr: - case reflect.Chan: - case reflect.Func: - case reflect.Map: - case reflect.Ptr: - case reflect.UnsafePointer: - default: - upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + - offsetScalar) +func unsafeReflectValue(v reflect.Value) reflect.Value { + if !v.IsValid() || (v.CanInterface() && v.CanAddr()) { + return v + } + flagFieldPtr := flagField(&v) + *flagFieldPtr &^= flagRO + *flagFieldPtr |= flagAddr + return v +} + +// Sanity checks against future reflect package changes +// to the type or semantics of the Value.flag field. +func init() { + field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") + if !ok { + panic("reflect.Value has no flag field") + } + if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() { + panic("reflect.Value flag field has changed kind") + } + type t0 int + var t struct { + A t0 + // t0 will have flagEmbedRO set. + t0 + // a will have flagStickyRO set + a t0 + } + vA := reflect.ValueOf(t).FieldByName("A") + va := reflect.ValueOf(t).FieldByName("a") + vt0 := reflect.ValueOf(t).FieldByName("t0") + + // Infer flagRO from the difference between the flags + // for the (otherwise identical) fields in t. + flagPublic := *flagField(&vA) + flagWithRO := *flagField(&va) | *flagField(&vt0) + flagRO = flagPublic ^ flagWithRO + + // Infer flagAddr from the difference between a value + // taken from a pointer and not. + vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A") + flagNoPtr := *flagField(&vA) + flagPtr := *flagField(&vPtrA) + flagAddr = flagNoPtr ^ flagPtr + + // Check that the inferred flags tally with one of the known versions. + for _, f := range okFlags { + if flagRO == f.ro && flagAddr == f.addr { + return } } - - pv := reflect.NewAt(vt, upv) - rv = pv - for i := 0; i < indirects; i++ { - rv = rv.Elem() - } - return rv + panic("reflect.Value read-only flag has changed semantics") } diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go new file mode 100644 index 000000000..205c28d68 --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -0,0 +1,38 @@ +// Copyright (c) 2015-2016 Dave Collins +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +// NOTE: Due to the following build constraints, this file will only be compiled +// when the code is running on Google App Engine, compiled by GopherJS, or +// "-tags safe" is added to the go build command line. The "disableunsafe" +// tag is deprecated and thus should not be used. +// +build js appengine safe disableunsafe !go1.4 + +package spew + +import "reflect" + +const ( + // UnsafeDisabled is a build-time constant which specifies whether or + // not access to the unsafe package is available. + UnsafeDisabled = true +) + +// unsafeReflectValue typically converts the passed reflect.Value into a one +// that bypasses the typical safety restrictions preventing access to +// unaddressable and unexported data. However, doing this relies on access to +// the unsafe package. This is a stub version which simply returns the passed +// reflect.Value when the unsafe package is not available. +func unsafeReflectValue(v reflect.Value) reflect.Value { + return v +} diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go index 7c519ff47..1be8ce945 100644 --- a/vendor/github.com/davecgh/go-spew/spew/common.go +++ b/vendor/github.com/davecgh/go-spew/spew/common.go @@ -180,7 +180,7 @@ func printComplex(w io.Writer, c complex128, floatPrecision int) { w.Write(closeParenBytes) } -// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x' +// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x' // prefix to Writer w. func printHexPtr(w io.Writer, p uintptr) { // Null pointer. diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go index df1d582a7..f78d89fc1 100644 --- a/vendor/github.com/davecgh/go-spew/spew/dump.go +++ b/vendor/github.com/davecgh/go-spew/spew/dump.go @@ -35,16 +35,16 @@ var ( // cCharRE is a regular expression that matches a cgo char. // It is used to detect character arrays to hexdump them. - cCharRE = regexp.MustCompile("^.*\\._Ctype_char$") + cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`) // cUnsignedCharRE is a regular expression that matches a cgo unsigned // char. It is used to detect unsigned character arrays to hexdump // them. - cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$") + cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`) // cUint8tCharRE is a regular expression that matches a cgo uint8_t. // It is used to detect uint8_t arrays to hexdump them. - cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$") + cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`) ) // dumpState contains information about the state of a dump operation. @@ -143,10 +143,10 @@ func (d *dumpState) dumpPtr(v reflect.Value) { // Display dereferenced value. d.w.Write(openParenBytes) switch { - case nilFound == true: + case nilFound: d.w.Write(nilAngleBytes) - case cycleFound == true: + case cycleFound: d.w.Write(circularBytes) default: diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go index c49875bac..b04edb7d7 100644 --- a/vendor/github.com/davecgh/go-spew/spew/format.go +++ b/vendor/github.com/davecgh/go-spew/spew/format.go @@ -182,10 +182,10 @@ func (f *formatState) formatPtr(v reflect.Value) { // Display dereferenced value. switch { - case nilFound == true: + case nilFound: f.fs.Write(nilAngleBytes) - case cycleFound == true: + case cycleFound: f.fs.Write(circularShortBytes) default: diff --git a/vendor/github.com/denverdino/aliyungo/common/client.go b/vendor/github.com/denverdino/aliyungo/common/client.go index 436b239b2..6c00d1c19 100644 --- a/vendor/github.com/denverdino/aliyungo/common/client.go +++ b/vendor/github.com/denverdino/aliyungo/common/client.go @@ -69,7 +69,6 @@ func (client *Client) NewInit(endpoint, version, accessKeyId, accessKeySecret, s client.Init(endpoint, version, accessKeyId, accessKeySecret) client.serviceCode = serviceCode client.regionID = regionID - client.setEndpointByLocation(regionID, serviceCode, accessKeyId, accessKeySecret, client.securityToken) } // Intialize client object when all properties are ready @@ -86,7 +85,6 @@ func (client *Client) InitClient() *Client { TLSHandshakeTimeout: time.Duration(handshakeTimeout) * time.Second} client.httpClient = &http.Client{Transport: t} } - client.setEndpointByLocation(client.regionID, client.serviceCode, client.AccessKeyId, client.AccessKeySecret, client.securityToken) return client } @@ -95,9 +93,17 @@ func (client *Client) NewInitForAssumeRole(endpoint, version, accessKeyId, acces client.securityToken = securityToken } +//getLocationEndpoint +func (client *Client) getEndpointByLocation() string { + locationClient := NewLocationClient(client.AccessKeyId, client.AccessKeySecret, client.securityToken) + locationClient.SetDebug(true) + return locationClient.DescribeOpenAPIEndpoint(client.regionID, client.serviceCode) +} + //NewClient using location service func (client *Client) setEndpointByLocation(region Region, serviceCode, accessKeyId, accessKeySecret, securityToken string) { locationClient := NewLocationClient(accessKeyId, accessKeySecret, securityToken) + locationClient.SetDebug(true) ep := locationClient.DescribeOpenAPIEndpoint(region, serviceCode) if ep == "" { ep = loadEndpointFromFile(region, serviceCode) @@ -251,12 +257,34 @@ func (client *Client) SetSecurityToken(securityToken string) { client.securityToken = securityToken } +func (client *Client) initEndpoint() error { + // if set any value to "CUSTOMIZED_ENDPOINT" could skip location service. + // example: export CUSTOMIZED_ENDPOINT=true + if os.Getenv("CUSTOMIZED_ENDPOINT") != "" { + return nil + } + + if client.serviceCode != "" && client.regionID != "" { + endpoint := client.getEndpointByLocation() + if endpoint == "" { + return GetCustomError("InvalidEndpoint", "endpoint is empty,pls check") + } + client.endpoint = endpoint + } + return nil +} + // Invoke sends the raw HTTP request for ECS services func (client *Client) Invoke(action string, args interface{}, response interface{}) error { if err := client.ensureProperties(); err != nil { return err } + //init endpoint + if err := client.initEndpoint(); err != nil { + return err + } + request := Request{} request.init(client.version, action, client.AccessKeyId, client.securityToken, client.regionID) @@ -330,6 +358,11 @@ func (client *Client) InvokeByFlattenMethod(action string, args interface{}, res return err } + //init endpoint + if err := client.initEndpoint(); err != nil { + return err + } + request := Request{} request.init(client.version, action, client.AccessKeyId, client.securityToken, client.regionID) @@ -406,6 +439,11 @@ func (client *Client) InvokeByAnyMethod(method, action, path string, args interf return err } + //init endpoint + if err := client.initEndpoint(); err != nil { + return err + } + request := Request{} request.init(client.version, action, client.AccessKeyId, client.securityToken, client.regionID) data := util.ConvertToQueryValues(request) @@ -500,3 +538,13 @@ func GetClientErrorFromString(str string) error { func GetClientError(err error) error { return GetClientErrorFromString(err.Error()) } + +func GetCustomError(code, message string) error { + return &Error{ + ErrorResponse: ErrorResponse{ + Code: code, + Message: message, + }, + StatusCode: 400, + } +} diff --git a/vendor/github.com/denverdino/aliyungo/common/endpoint.go b/vendor/github.com/denverdino/aliyungo/common/endpoint.go index 786606cf3..757f7a784 100644 --- a/vendor/github.com/denverdino/aliyungo/common/endpoint.go +++ b/vendor/github.com/denverdino/aliyungo/common/endpoint.go @@ -4,8 +4,10 @@ import ( "encoding/xml" "fmt" "io/ioutil" + "log" "os" "strings" + "time" ) const ( @@ -50,6 +52,12 @@ var ( "rds": "https://rds.eu-central-1.aliyuncs.com", "vpc": "https://vpc.eu-central-1.aliyuncs.com", }, + EUWest1: { + "ecs": "https://ecs.eu-west-1.aliyuncs.com", + "slb": "https://slb.eu-west-1.aliyuncs.com", + "rds": "https://rds.eu-west-1.aliyuncs.com", + "vpc": "https://vpc.eu-west-1.aliyuncs.com", + }, Zhangjiakou: { "ecs": "https://ecs.cn-zhangjiakou.aliyuncs.com", "slb": "https://slb.cn-zhangjiakou.aliyuncs.com", @@ -140,7 +148,6 @@ func (client *LocationClient) DescribeOpenAPIEndpoint(region Region, serviceCode if endpoint := getProductRegionEndpoint(region, serviceCode); endpoint != "" { return endpoint } - defaultProtocols := HTTP_PROTOCOL args := &DescribeEndpointsArgs{ @@ -149,8 +156,18 @@ func (client *LocationClient) DescribeOpenAPIEndpoint(region Region, serviceCode Type: "openAPI", } - endpoint, err := client.DescribeEndpoints(args) - if err != nil || len(endpoint.Endpoints.Endpoint) <= 0 { + var endpoint *DescribeEndpointsResponse + var err error + for index := 0; index < 5; index++ { + endpoint, err = client.DescribeEndpoints(args) + if err == nil && endpoint != nil && len(endpoint.Endpoints.Endpoint) > 0 { + break + } + time.Sleep(500 * time.Millisecond) + } + + if err != nil || endpoint == nil || len(endpoint.Endpoints.Endpoint) <= 0 { + log.Printf("aliyungo: can not get endpoint from service, use default. endpoint=[%v], error=[%v]\n", endpoint, err) return "" } @@ -163,7 +180,7 @@ func (client *LocationClient) DescribeOpenAPIEndpoint(region Region, serviceCode ep := fmt.Sprintf("%s://%s", defaultProtocols, endpoint.Endpoints.Endpoint[0].Endpoint) - //setProductRegionEndpoint(region, serviceCode, ep) + setProductRegionEndpoint(region, serviceCode, ep) return ep } diff --git a/vendor/github.com/denverdino/aliyungo/common/endpoints.xml b/vendor/github.com/denverdino/aliyungo/common/endpoints.xml index 21f3a0b2e..26ea765b2 100644 --- a/vendor/github.com/denverdino/aliyungo/common/endpoints.xml +++ b/vendor/github.com/denverdino/aliyungo/common/endpoints.xml @@ -1336,6 +1336,17 @@ Slbslb.eu-central-1.aliyuncs.com + + eu-west-1 + + Rdsrds.eu-west-1.aliyuncs.com + Ecsecs.eu-west-1.aliyuncs.com + Vpcvpc.eu-west-1.aliyuncs.com + Kmskms.eu-west-1.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.eu-west-1.aliyuncs.com + + cn-zhangjiakou diff --git a/vendor/github.com/denverdino/aliyungo/common/regions.go b/vendor/github.com/denverdino/aliyungo/common/regions.go index 38b14dd86..e6bc728fe 100644 --- a/vendor/github.com/denverdino/aliyungo/common/regions.go +++ b/vendor/github.com/denverdino/aliyungo/common/regions.go @@ -28,6 +28,7 @@ const ( MEEast1 = Region("me-east-1") EUCentral1 = Region("eu-central-1") + EUWest1 = Region("eu-west-1") ShenZhenFinance = Region("cn-shenzhen-finance-1") ShanghaiFinance = Region("cn-shanghai-finance-1") @@ -39,6 +40,16 @@ var ValidRegions = []Region{ APNorthEast1, APSouthEast1, APSouthEast2, APSouthEast3, APSouthEast5, APSouth1, MEEast1, - EUCentral1, + EUCentral1, EUWest1, ShenZhenFinance, ShanghaiFinance, } + +// IsValidRegion checks if r is an Ali supported region. +func IsValidRegion(r string) bool { + for _, v := range ValidRegions { + if r == string(v) { + return true + } + } + return false +} diff --git a/vendor/github.com/denverdino/aliyungo/ecs/client.go b/vendor/github.com/denverdino/aliyungo/ecs/client.go index 117483c35..7ae1fb52e 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/client.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/client.go @@ -113,3 +113,12 @@ func NewVPCClientWithEndpointAndSecurityToken(endpoint string, accessKeyId strin InitClient() return client } + +// --------------------------------------- +// NewVPCClientWithRegion creates a new instance of VPC client automatically get endpoint +// --------------------------------------- +func NewVPCClientWithRegion(endpoint string, accessKeyId string, accessKeySecret string, regionID common.Region) *Client { + client := &Client{} + client.NewInit(endpoint, VPCAPIVersion, accessKeyId, accessKeySecret, VPCServiceCode, regionID) + return client +} diff --git a/vendor/github.com/denverdino/aliyungo/ecs/disks.go b/vendor/github.com/denverdino/aliyungo/ecs/disks.go index 6b898c60d..ae2c40872 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/disks.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/disks.go @@ -59,7 +59,7 @@ type DescribeDisksArgs struct { Category DiskCategory //enum for all(default) | cloud | ephemeral Status DiskStatus //enum for In_use | Available | Attaching | Detaching | Creating | ReIniting | All(default) SnapshotId string - Name string + DiskName string Portable *bool //optional DeleteWithInstance *bool //optional DeleteAutoSnapshot *bool //optional @@ -78,6 +78,7 @@ type DiskItemType struct { DiskName string Description string Type DiskType + Encrypted bool Category DiskCategory Size int ImageId string @@ -242,7 +243,7 @@ func (client *Client) DetachDisk(instanceId string, diskId string) error { } type ResizeDiskArgs struct { - DiskId string + DiskId string NewSize int } @@ -255,15 +256,14 @@ type ResizeDiskResponse struct { // You can read doc at https://help.aliyun.com/document_detail/25522.html func (client *Client) ResizeDisk(diskId string, sizeGB int) error { args := ResizeDiskArgs{ - DiskId:diskId, - NewSize:sizeGB, + DiskId: diskId, + NewSize: sizeGB, } response := ResizeDiskResponse{} err := client.Invoke("ResizeDisk", &args, &response) return err } - type ResetDiskArgs struct { DiskId string SnapshotId string @@ -273,7 +273,6 @@ type ResetDiskResponse struct { common.Response } - // ResetDisk resets disk to original status // // You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&resetdisk diff --git a/vendor/github.com/denverdino/aliyungo/ecs/eni.go b/vendor/github.com/denverdino/aliyungo/ecs/eni.go new file mode 100644 index 000000000..698d4fa70 --- /dev/null +++ b/vendor/github.com/denverdino/aliyungo/ecs/eni.go @@ -0,0 +1,183 @@ +package ecs + +import ( + "fmt" + "time" + + "github.com/denverdino/aliyungo/common" +) + +type CreateNetworkInterfaceArgs struct { + RegionId common.Region + VSwitchId string + PrimaryIpAddress string // optional + SecurityGroupId string + NetworkInterfaceName string // optional + Description string // optional + ClientToken string // optional +} + +type CreateNetworkInterfaceResponse struct { + common.Response + NetworkInterfaceId string +} +type DeleteNetworkInterfaceArgs struct { + RegionId common.Region + NetworkInterfaceId string +} + +type DeleteNetworkInterfaceResponse struct { + common.Response +} + +type DescribeNetworkInterfacesArgs struct { + RegionId common.Region + VSwitchId string + PrimaryIpAddress string + SecurityGroupId string + NetworkInterfaceName string + Type string + InstanceId string + NetworkInterfaceId []string `query:"list"` + PageNumber int + PageSize int +} +type NetworkInterfaceType struct { + NetworkInterfaceId string + NetworkInterfaceName string + PrimaryIpAddress string + MacAddress string + Status string + PrivateIpAddress string +} + +type DescribeNetworkInterfacesResponse struct { + common.Response + NetworkInterfaceSets struct { + NetworkInterfaceSet []NetworkInterfaceType + } + TotalCount int + PageNumber int + PageSize int +} +type AttachNetworkInterfaceArgs struct { + RegionId common.Region + NetworkInterfaceId string + InstanceId string +} + +type AttachNetworkInterfaceResponse common.Response + +type DetachNetworkInterfaceArgs AttachNetworkInterfaceArgs + +type DetachNetworkInterfaceResponse common.Response + +type ModifyNetworkInterfaceAttributeArgs struct { + RegionId common.Region + NetworkInterfaceId string + SecurityGroupId []string + NetworkInterfaceName string + Description string +} +type ModifyNetworkInterfaceAttributeResponse common.Response + +type UnassignPrivateIpAddressesArgs struct { + RegionId common.Region + NetworkInterfaceId string + PrivateIpAddress []string `query:"list"` +} + +type UnassignPrivateIpAddressesResponse common.Response + +type AssignPrivateIpAddressesArgs struct { + RegionId common.Region + NetworkInterfaceId string + PrivateIpAddress []string `query:"list"` // optional + SecondaryPrivateIpAddressCount int // optional +} + +type AssignPrivateIpAddressesResponse common.Response + +func (client *Client) CreateNetworkInterface(args *CreateNetworkInterfaceArgs) (resp *CreateNetworkInterfaceResponse, err error) { + resp = &CreateNetworkInterfaceResponse{} + err = client.Invoke("CreateNetworkInterface", args, resp) + return resp, err +} + +func (client *Client) DeleteNetworkInterface(args *DeleteNetworkInterfaceArgs) (resp *DeleteNetworkInterfaceResponse, err error) { + resp = &DeleteNetworkInterfaceResponse{} + err = client.Invoke("DeleteNetworkInterface", args, resp) + return resp, err +} + +func (client *Client) DescribeNetworkInterfaces(args *DescribeNetworkInterfacesArgs) (resp *DescribeNetworkInterfacesResponse, err error) { + resp = &DescribeNetworkInterfacesResponse{} + err = client.Invoke("DescribeNetworkInterfaces", args, resp) + return resp, err +} + +func (client *Client) AttachNetworkInterface(args *AttachNetworkInterfaceArgs) error { + resp := &AttachNetworkInterfaceResponse{} + err := client.Invoke("AttachNetworkInterface", args, resp) + return err +} + +func (client *Client) DetachNetworkInterface(args *DetachNetworkInterfaceArgs) (resp *DetachNetworkInterfaceResponse, err error) { + resp = &DetachNetworkInterfaceResponse{} + err = client.Invoke("DetachNetworkInterface", args, resp) + return resp, err +} + +func (client *Client) ModifyNetworkInterfaceAttribute(args *ModifyNetworkInterfaceAttributeArgs) (resp *ModifyNetworkInterfaceAttributeResponse, err error) { + resp = &ModifyNetworkInterfaceAttributeResponse{} + err = client.Invoke("ModifyNetworkInterfaceAttribute", args, resp) + return resp, err +} + +func (client *Client) UnassignPrivateIpAddresses(args *UnassignPrivateIpAddressesArgs) (resp *UnassignPrivateIpAddressesResponse, err error) { + resp = &UnassignPrivateIpAddressesResponse{} + err = client.Invoke("UnassignPrivateIpAddresses", args, resp) + return resp, err +} + +func (client *Client) AssignPrivateIpAddresses(args *AssignPrivateIpAddressesArgs) (resp *AssignPrivateIpAddressesResponse, err error) { + resp = &AssignPrivateIpAddressesResponse{} + err = client.Invoke("AssignPrivateIpAddresses", args, resp) + return resp, err +} + +// Default timeout value for WaitForInstance method +const NetworkInterfacesDefaultTimeout = 120 + +// WaitForInstance waits for instance to given status +func (client *Client) WaitForNetworkInterface(regionId common.Region, eniID string, status string, timeout int) error { + if timeout <= 0 { + timeout = NetworkInterfacesDefaultTimeout + } + for { + + eniIds := []string{eniID} + + describeNetworkInterfacesArgs := DescribeNetworkInterfacesArgs{ + RegionId: regionId, + NetworkInterfaceId: eniIds, + } + + nisResponse, err := client.DescribeNetworkInterfaces(&describeNetworkInterfacesArgs) + if err != nil { + return fmt.Errorf("Failed to describe network interface %v: %v", eniID, err) + } + + if len(nisResponse.NetworkInterfaceSets.NetworkInterfaceSet) > 0 && nisResponse.NetworkInterfaceSets.NetworkInterfaceSet[0].Status == status { + break + } + + timeout = timeout - DefaultWaitForInterval + if timeout <= 0 { + return fmt.Errorf("Timeout for waiting available status for network interfaces") + } + time.Sleep(DefaultWaitForInterval * time.Second) + + } + return nil +} diff --git a/vendor/github.com/denverdino/aliyungo/ecs/images.go b/vendor/github.com/denverdino/aliyungo/ecs/images.go index 54fe86def..e50297adc 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/images.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/images.go @@ -37,6 +37,13 @@ const ( ImageUsageNone = ImageUsage("none") ) +type ImageFormatType string + +const ( + RAW = ImageFormatType("RAW") + VHD = ImageFormatType("VHD") +) + // DescribeImagesArgs repsents arguments to describe images type DescribeImagesArgs struct { RegionId common.Region @@ -63,8 +70,10 @@ type DescribeImagesResponse struct { type DiskDeviceMapping struct { SnapshotId string //Why Size Field is string-type. - Size string - Device string + Size string + // Now the key Size change to DiskImageSize + DiskImageSize string + Device string //For import images Format string OSSBucket string @@ -151,6 +160,7 @@ func (client *Client) CreateImage(args *CreateImageArgs) (imageId string, err er type DeleteImageArgs struct { RegionId common.Region ImageId string + Force bool } type DeleteImageResponse struct { @@ -170,6 +180,20 @@ func (client *Client) DeleteImage(regionId common.Region, imageId string) error return client.Invoke("DeleteImage", &args, &response) } +// DeleteImage deletes Image +// +// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/image&deleteimage +func (client *Client) DeleteImageWithForce(regionId common.Region, imageId string, force bool) error { + args := DeleteImageArgs{ + RegionId: regionId, + ImageId: imageId, + Force: force, + } + + response := &DeleteImageResponse{} + return client.Invoke("DeleteImage", &args, &response) +} + // ModifyImageSharePermission repsents arguments to share image type ModifyImageSharePermissionArgs struct { RegionId common.Region diff --git a/vendor/github.com/denverdino/aliyungo/ecs/instance_types.go b/vendor/github.com/denverdino/aliyungo/ecs/instance_types.go index a133806f1..d26b5666a 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/instance_types.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/instance_types.go @@ -9,10 +9,19 @@ type DescribeInstanceTypesArgs struct { // // You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&instancetypeitemtype type InstanceTypeItemType struct { - InstanceTypeId string - CpuCoreCount int - MemorySize float64 - InstanceTypeFamily string + InstanceTypeId string + CpuCoreCount int + MemorySize float64 + InstanceTypeFamily string + GPUAmount int + GPUSpec string + InitialCredit int + BaselineCredit int + EniQuantity int + EniPrivateIpAddressQuantity int + LocalStorageCapacity int + LocalStorageAmount int + LocalStorageCategory string } type DescribeInstanceTypesResponse struct { diff --git a/vendor/github.com/denverdino/aliyungo/ecs/instances.go b/vendor/github.com/denverdino/aliyungo/ecs/instances.go index a08ac1244..dd424f96b 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/instances.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/instances.go @@ -245,7 +245,7 @@ type InstanceAttributesType struct { SerialNumber string Status InstanceStatus OperationLocks OperationLocksType - SecurityGroupIds struct { + SecurityGroupIds struct { SecurityGroupId []string } PublicIpAddress IpAddressSetType @@ -260,7 +260,7 @@ type InstanceAttributesType struct { IoOptimized StringOrBool InstanceChargeType common.InstanceChargeType ExpiredTime util.ISO6801Time - Tags struct { + Tags struct { Tag []TagItemType } SpotStrategy SpotStrategyType @@ -440,6 +440,28 @@ func (client *Client) DescribeInstancesWithRaw(args *DescribeInstancesArgs) (res return response, nil } +type ModifyInstanceAutoReleaseTimeArgs struct { + InstanceId string + AutoReleaseTime string +} + +type ModifyInstanceAutoReleaseTimeResponse struct { + common.Response +} + +// 对给定的实例设定自动释放时间。 +// +// You can read doc at https://help.aliyun.com/document_detail/47576.html +func (client *Client) ModifyInstanceAutoReleaseTime(instanceId, time string) error { + args := ModifyInstanceAutoReleaseTimeArgs{ + InstanceId: instanceId, + AutoReleaseTime: time, + } + response := ModifyInstanceAutoReleaseTimeResponse{} + err := client.Invoke("ModifyInstanceAutoReleaseTime", &args, &response) + return err +} + type DeleteInstanceArgs struct { InstanceId string } @@ -512,34 +534,43 @@ var ( IoOptimizedOptimized = IoOptimized("optimized") ) +type SecurityEnhancementStrategy string + +var ( + InactiveSecurityEnhancementStrategy = SecurityEnhancementStrategy("Active") + DeactiveSecurityEnhancementStrategy = SecurityEnhancementStrategy("Deactive") +) + type CreateInstanceArgs struct { - RegionId common.Region - ZoneId string - ImageId string - InstanceType string - SecurityGroupId string - InstanceName string - Description string - InternetChargeType common.InternetChargeType - InternetMaxBandwidthIn int - InternetMaxBandwidthOut int - HostName string - Password string - IoOptimized IoOptimized - SystemDisk SystemDiskType - DataDisk []DataDiskType - VSwitchId string - PrivateIpAddress string - ClientToken string - InstanceChargeType common.InstanceChargeType - Period int - UserData string - AutoRenew bool - AutoRenewPeriod int - SpotStrategy SpotStrategyType - SpotPriceLimit float64 - KeyPairName string - RamRoleName string + RegionId common.Region + ZoneId string + ImageId string + InstanceType string + SecurityGroupId string + InstanceName string + Description string + InternetChargeType common.InternetChargeType + InternetMaxBandwidthIn int + InternetMaxBandwidthOut int + HostName string + Password string + IoOptimized IoOptimized + SystemDisk SystemDiskType + DataDisk []DataDiskType + VSwitchId string + PrivateIpAddress string + ClientToken string + InstanceChargeType common.InstanceChargeType + Period int + PeriodUnit common.TimeType + UserData string + AutoRenew bool + AutoRenewPeriod int + SpotStrategy SpotStrategyType + SpotPriceLimit float64 + KeyPairName string + RamRoleName string + SecurityEnhancementStrategy SecurityEnhancementStrategy } type CreateInstanceResponse struct { @@ -682,3 +713,120 @@ func (client *Client) DescribeInstanceRamRole(args *AttachInstancesArgs) (resp * } return response, nil } + +type ModifyInstanceSpecArgs struct { + InstanceId string + InstanceType string + InternetMaxBandwidthOut *int + InternetMaxBandwidthIn *int + ClientToken string +} + +type ModifyInstanceSpecResponse struct { + common.Response +} + +//ModifyInstanceSpec modify instance specification +// +// Notice: 1. An instance that was successfully modified once cannot be modified again within 5 minutes. +// 2. The API only can be used Pay-As-You-Go (PostPaid) instance +// +// You can read doc at https://www.alibabacloud.com/help/doc-detail/57633.htm +func (client *Client) ModifyInstanceSpec(args *ModifyInstanceSpecArgs) error { + response := ModifyInstanceSpecResponse{} + return client.Invoke("ModifyInstanceSpec", args, &response) +} + +type ModifyInstanceVpcAttributeArgs struct { + InstanceId string + VSwitchId string + PrivateIpAddress string +} + +type ModifyInstanceVpcAttributeResponse struct { + common.Response +} + +//ModifyInstanceVpcAttribute modify instance vswitchID and private ip address +// +// You can read doc at https://www.alibabacloud.com/help/doc-detail/25504.htm +func (client *Client) ModifyInstanceVpcAttribute(args *ModifyInstanceVpcAttributeArgs) error { + response := ModifyInstanceVpcAttributeResponse{} + return client.Invoke("ModifyInstanceVpcAttribute", args, &response) +} + +type ModifyInstanceChargeTypeArgs struct { + InstanceIds string + RegionId common.Region + Period int + PeriodUnit common.TimeType + IncludeDataDisks bool + DryRun bool + AutoPay bool + ClientToken string +} + +type ModifyInstanceChargeTypeResponse struct { + common.Response + Order string +} + +//ModifyInstanceChargeType modify instance charge type +// +// You can read doc at https://www.alibabacloud.com/help/doc-detail/25504.htm +func (client *Client) ModifyInstanceChargeType(args *ModifyInstanceChargeTypeArgs) (*ModifyInstanceChargeTypeResponse, error) { + response := &ModifyInstanceChargeTypeResponse{} + if err := client.Invoke("ModifyInstanceChargeType", args, response); err != nil { + return response, err + } + return response, nil +} + +type RenewalStatus string + +const ( + RenewAutoRenewal = RenewalStatus("AutoRenewal") + RenewNormal = RenewalStatus("Normal") + RenewNotRenewal = RenewalStatus("NotRenewal") +) + +type ModifyInstanceAutoRenewAttributeArgs struct { + InstanceId string + RegionId common.Region + Duration int + AutoRenew bool + RenewalStatus RenewalStatus +} + +// You can read doc at https://www.alibabacloud.com/help/doc-detail/52843.htm +func (client *Client) ModifyInstanceAutoRenewAttribute(args *ModifyInstanceAutoRenewAttributeArgs) error { + response := &common.Response{} + return client.Invoke("ModifyInstanceAutoRenewAttribute", args, response) +} + +type DescribeInstanceAutoRenewAttributeArgs struct { + InstanceId string + RegionId common.Region +} + +type InstanceRenewAttribute struct { + InstanceId string + Duration int + AutoRenewEnabled bool + PeriodUnit string + RenewalStatus RenewalStatus +} + +type DescribeInstanceAutoRenewAttributeResponse struct { + common.Response + InstanceRenewAttributes struct { + InstanceRenewAttribute []InstanceRenewAttribute + } +} + +// You can read doc at https://www.alibabacloud.com/help/doc-detail/52844.htm +func (client *Client) DescribeInstanceAutoRenewAttribute(args *DescribeInstanceAutoRenewAttributeArgs) (*DescribeInstanceAutoRenewAttributeResponse, error) { + response := &DescribeInstanceAutoRenewAttributeResponse{} + err := client.Invoke("DescribeInstanceAutoRenewAttribute", args, response) + return response, err +} diff --git a/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go b/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go index 10e00638e..d104cf885 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go @@ -28,6 +28,16 @@ type SnatTableIdType struct { SnatTableId []string } +type IpListsType struct { + IpList []IpListItem +} + +type IpListItem struct { + IpAddress string + AllocationId string + UsingStatus string +} + type BandwidthPackageIdType struct { BandwidthPackageId []string } @@ -57,6 +67,7 @@ type NatGatewaySetType struct { BandwidthPackageIds BandwidthPackageIdType ForwardTableIds ForwardTableIdType SnatTableIds SnatTableIdType + IpLists IpListsType InstanceChargeType string Name string NatGatewayId string @@ -147,7 +158,8 @@ func (client *Client) DeleteNatGateway(args *DeleteNatGatewayArgs) error { } type DescribeBandwidthPackagesArgs struct { - RegionId common.Region + RegionId common.Region + common.Pagination BandwidthPackageId string NatGatewayId string } @@ -170,12 +182,13 @@ type DescribeBandwidthPackageType struct { type DescribeBandwidthPackagesResponse struct { common.Response + common.PaginationResult BandwidthPackages struct { BandwidthPackage []DescribeBandwidthPackageType } } -func (client *Client) DescribeBandwidthPackages(args *DescribeBandwidthPackagesArgs) ([]DescribeBandwidthPackageType, error) { +func (client *Client) DescribeBandwidthPackages(args *DescribeBandwidthPackagesArgs) (*DescribeBandwidthPackagesResponse, error) { response := &DescribeBandwidthPackagesResponse{} err := client.Invoke("DescribeBandwidthPackages", args, response) @@ -183,7 +196,7 @@ func (client *Client) DescribeBandwidthPackages(args *DescribeBandwidthPackagesA return nil, err } - return response.BandwidthPackages.BandwidthPackage, err + return response, err } type DeleteBandwidthPackageArgs struct { diff --git a/vendor/github.com/denverdino/aliyungo/ecs/networks.go b/vendor/github.com/denverdino/aliyungo/ecs/networks.go index 4c4cd7150..eb6b0edaf 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/networks.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/networks.go @@ -36,8 +36,9 @@ func (client *Client) AllocatePublicIpAddress(instanceId string) (ipAddress stri type ModifyInstanceNetworkSpec struct { InstanceId string - InternetMaxBandwidthOut int - InternetMaxBandwidthIn int + InternetMaxBandwidthOut *int + InternetMaxBandwidthIn *int + NetworkChargeType common.InternetChargeType } type ModifyInstanceNetworkSpecResponse struct { @@ -57,6 +58,7 @@ type AllocateEipAddressArgs struct { RegionId common.Region Bandwidth int InternetChargeType common.InternetChargeType + ISP string ClientToken string } @@ -81,9 +83,19 @@ func (client *Client) AllocateEipAddress(args *AllocateEipAddressArgs) (EipAddre return response.EipAddress, response.AllocationId, nil } +type EipInstanceType string + +const ( + EcsInstance = "EcsInstance" + SlbInstance = "SlbInstance" + Nat = "Nat" + HaVip = "HaVip" +) + type AssociateEipAddressArgs struct { AllocationId string InstanceId string + InstanceType EipInstanceType } type AssociateEipAddressResponse struct { @@ -102,6 +114,11 @@ func (client *Client) AssociateEipAddress(allocationId string, instanceId string return client.Invoke("AssociateEipAddress", &args, &response) } +func (client *Client) NewAssociateEipAddress(args *AssociateEipAddressArgs) error { + response := ModifyInstanceNetworkSpecResponse{} + return client.Invoke("AssociateEipAddress", args, &response) +} + // Status of disks type EipStatus string @@ -112,11 +129,22 @@ const ( EipStatusAvailable = EipStatus("Available") ) +type AssociatedInstanceType string + +const ( + AssociatedInstanceTypeEcsInstance = AssociatedInstanceType("EcsInstance") + AssociatedInstanceTypeSlbInstance = AssociatedInstanceType("SlbInstance") + AssociatedInstanceTypeNat = AssociatedInstanceType("Nat") + AssociatedInstanceTypeHaVip = AssociatedInstanceType("HaVip") +) + type DescribeEipAddressesArgs struct { - RegionId common.Region - Status EipStatus //enum Associating | Unassociating | InUse | Available - EipAddress string - AllocationId string + RegionId common.Region + Status EipStatus //enum Associating | Unassociating | InUse | Available + EipAddress string + AllocationId string + AssociatedInstanceType AssociatedInstanceType //enum EcsInstance | SlbInstance | Nat | HaVip + AssociatedInstanceId string //绑定的资源的Id。 这是一个过滤器性质的参数,若不指定,则表示不适用该条件对结果进行过滤。 如果要使用该过滤器,必须同时使用AssociatedInstanceType。若InstanceType为EcsInstance,则此处填写ECS实例Id。若InstanceType为SlbInstance,则此处填写VPC类型的私网SLB 的实例ID。若InstanceType为Nat,则此处填写NAT 的实例ID。。若InstanceType为HaVip,则此处填写HaVipId。 common.Pagination } @@ -128,6 +156,7 @@ type EipAddressSetType struct { AllocationId string Status EipStatus InstanceId string + InstanceType string Bandwidth string // Why string InternetChargeType common.InternetChargeType OperationLocks OperationLocksType diff --git a/vendor/github.com/denverdino/aliyungo/ecs/route_tables.go b/vendor/github.com/denverdino/aliyungo/ecs/route_tables.go index f8531a20b..15d7c7b7d 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/route_tables.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/route_tables.go @@ -100,8 +100,8 @@ func (client *Client) DescribeRouteTablesWithRaw(args *DescribeRouteTablesArgs) type NextHopType string const ( - NextHopIntance = NextHopType("Instance") //Default - NextHopTunnel = NextHopType("Tunnel") + NextHopIntance = NextHopType("Instance") //Default + NextHopTunnel = NextHopType("Tunnel") NextHopTunnelRouterInterface = NextHopType("RouterInterface") ) diff --git a/vendor/github.com/denverdino/aliyungo/ecs/router_interface.go b/vendor/github.com/denverdino/aliyungo/ecs/router_interface.go index 62af67860..188bac89a 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/router_interface.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/router_interface.go @@ -1,6 +1,8 @@ package ecs import ( + "time" + "github.com/denverdino/aliyungo/common" ) @@ -19,6 +21,8 @@ const ( Idl = InterfaceStatus("Idl") Active = InterfaceStatus("Active") Inactive = InterfaceStatus("Inactive") + // 'Idle' means the router interface is not connected. 'Idl' may be a incorrect status. + Idle = InterfaceStatus("Idle") InitiatingSide = Role("InitiatingSide") AcceptingSide = Role("AcceptingSide") @@ -77,7 +81,7 @@ type Filter struct { type DescribeRouterInterfacesArgs struct { RegionId common.Region common.Pagination - Filter []Filter + Filter []Filter } type RouterInterfaceItemType struct { @@ -225,3 +229,29 @@ func (client *Client) DeleteRouterInterface(args *OperateRouterInterfaceArgs) (r } return response, nil } + +// WaitForRouterInterface waits for router interface to given status +func (client *Client) WaitForRouterInterfaceAsyn(regionId common.Region, interfaceId string, status InterfaceStatus, timeout int) error { + if timeout <= 0 { + timeout = InstanceDefaultTimeout + } + for { + interfaces, err := client.DescribeRouterInterfaces(&DescribeRouterInterfacesArgs{ + RegionId: regionId, + Filter: []Filter{Filter{Key: "RouterInterfaceId", Value: []string{interfaceId}}}, + }) + if err != nil { + return err + } else if interfaces != nil && InterfaceStatus(interfaces.RouterInterfaceSet.RouterInterfaceType[0].Status) == status { + //TODO + break + } + timeout = timeout - DefaultWaitForInterval + if timeout <= 0 { + return common.GetClientErrorFromString("Timeout") + } + time.Sleep(DefaultWaitForInterval * time.Second) + + } + return nil +} diff --git a/vendor/github.com/denverdino/aliyungo/ecs/security_groups.go b/vendor/github.com/denverdino/aliyungo/ecs/security_groups.go index 54af3a798..dbe854349 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/security_groups.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/security_groups.go @@ -6,10 +6,15 @@ import ( ) type NicType string +type Direction string const ( NicTypeInternet = NicType("internet") NicTypeIntranet = NicType("intranet") + + DirectionIngress = Direction("ingress") + DirectionEgress = Direction("egress") + DirectionAll = Direction("all") ) type IpProtocol string @@ -29,11 +34,18 @@ const ( PermissionPolicyDrop = PermissionPolicy("drop") ) +type GroupInnerAccessPolicy string + +const ( + GroupInnerAccept = GroupInnerAccessPolicy("Accept") + GroupInnerDrop = GroupInnerAccessPolicy("Drop") +) + type DescribeSecurityGroupAttributeArgs struct { SecurityGroupId string RegionId common.Region - NicType NicType //enum for internet (default) |intranet - Direction string // enum ingress egress + NicType NicType //enum for internet (default) |intranet + Direction Direction // enum ingress egress } // @@ -64,7 +76,8 @@ type DescribeSecurityGroupAttributeResponse struct { Permissions struct { Permission []PermissionType } - VpcId string + VpcId string + InnerAccessPolicy GroupInnerAccessPolicy } // @@ -197,6 +210,21 @@ func (client *Client) ModifySecurityGroupAttribute(args *ModifySecurityGroupAttr return err } +type ModifySecurityGroupPolicyArgs struct { + RegionId common.Region + SecurityGroupId string + InnerAccessPolicy GroupInnerAccessPolicy +} + +// ModifySecurityGroupPolicy modifies inner access policy of security group +// +// You can read doc at https://www.alibabacloud.com/help/doc-detail/57315.htm +func (client *Client) ModifySecurityGroupPolicy(args *ModifySecurityGroupPolicyArgs) error { + response := common.Response{} + err := client.Invoke("ModifySecurityGroupPolicy", args, &response) + return err +} + type AuthorizeSecurityGroupArgs struct { SecurityGroupId string RegionId common.Region diff --git a/vendor/github.com/denverdino/aliyungo/ecs/snapshots.go b/vendor/github.com/denverdino/aliyungo/ecs/snapshots.go index f3c1b09c5..0b7cbe87b 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/snapshots.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/snapshots.go @@ -26,6 +26,8 @@ type SnapshotType struct { SourceDiskSize int SourceDiskType string //enum for System | Data ProductCode string + Status string + Usage string CreationTime util.ISO6801Time } diff --git a/vendor/github.com/denverdino/aliyungo/ecs/snat_entry.go b/vendor/github.com/denverdino/aliyungo/ecs/snat_entry.go index d9806d769..c2e20df85 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/snat_entry.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/snat_entry.go @@ -78,7 +78,7 @@ func (client *Client) DescribeSnatTableEntries(args *DescribeSnatTableEntriesArg return response.SnatTableEntries.SnatTableEntry, &response.PaginationResult, nil } -func (client *Client) DescribeSnatTableEntriesWithRaw(args *DescribeSnatTableEntriesArgs) ( response *DescribeSnatTableEntriesResponse, err error) { +func (client *Client) DescribeSnatTableEntriesWithRaw(args *DescribeSnatTableEntriesArgs) (response *DescribeSnatTableEntriesResponse, err error) { args.Validate() response = &DescribeSnatTableEntriesResponse{} diff --git a/vendor/github.com/denverdino/aliyungo/ecs/ssh_key_pair.go b/vendor/github.com/denverdino/aliyungo/ecs/ssh_key_pair.go index 76f1a3803..9a0ad2e57 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/ssh_key_pair.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/ssh_key_pair.go @@ -19,7 +19,7 @@ type CreateKeyPairResponse struct { // CreateKeyPair creates keypair // // You can read doc at https://help.aliyun.com/document_detail/51771.html?spm=5176.doc51775.6.910.cedjfr -func (client *Client) CreateKeyPair(args *CreateKeyPairArgs) (resp *CreateKeyPairResponse,err error) { +func (client *Client) CreateKeyPair(args *CreateKeyPairArgs) (resp *CreateKeyPairResponse, err error) { response := CreateKeyPairResponse{} err = client.Invoke("CreateKeyPair", args, &response) if err != nil { @@ -43,7 +43,7 @@ type ImportKeyPairResponse struct { // ImportKeyPair import keypair // // You can read doc at https://help.aliyun.com/document_detail/51774.html?spm=5176.doc51771.6.911.BicQq2 -func (client *Client) ImportKeyPair(args *ImportKeyPairArgs) (resp *ImportKeyPairResponse,err error) { +func (client *Client) ImportKeyPair(args *ImportKeyPairArgs) (resp *ImportKeyPairResponse, err error) { response := ImportKeyPairResponse{} err = client.Invoke("ImportKeyPair", args, &response) if err != nil { @@ -69,14 +69,14 @@ type DescribeKeyPairsResponse struct { common.PaginationResult RegionId common.Region KeyPairs struct { - KeyPair []KeyPairItemType + KeyPair []KeyPairItemType } } // DescribeKeyPairs describe keypairs // // You can read doc at https://help.aliyun.com/document_detail/51773.html?spm=5176.doc51774.6.912.lyE0iX -func (client *Client) DescribeKeyPairs(args *DescribeKeyPairsArgs) (KeyPairs []KeyPairItemType, pagination *common.PaginationResult, err error) { +func (client *Client) DescribeKeyPairs(args *DescribeKeyPairsArgs) (KeyPairs []KeyPairItemType, pagination *common.PaginationResult, err error) { response, err := client.DescribeKeyPairsWithRaw(args) if err != nil { return nil, nil, err @@ -149,5 +149,3 @@ func (client *Client) DeleteKeyPairs(args *DeleteKeyPairsArgs) (err error) { } return nil } - - diff --git a/vendor/github.com/denverdino/aliyungo/ecs/vpcs.go b/vendor/github.com/denverdino/aliyungo/ecs/vpcs.go index d66fe1027..2b4a2444b 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/vpcs.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/vpcs.go @@ -81,6 +81,9 @@ type VpcSetType struct { Description string IsDefault bool CreationTime util.ISO6801Time + RouterTableIds struct{ + RouterTableIds []string + } } type DescribeVpcsResponse struct { diff --git a/vendor/github.com/denverdino/aliyungo/ecs/zones.go b/vendor/github.com/denverdino/aliyungo/ecs/zones.go index 61ecb0759..919e363a8 100644 --- a/vendor/github.com/denverdino/aliyungo/ecs/zones.go +++ b/vendor/github.com/denverdino/aliyungo/ecs/zones.go @@ -1,6 +1,8 @@ package ecs -import "github.com/denverdino/aliyungo/common" +import ( + "github.com/denverdino/aliyungo/common" +) type ResourceType string @@ -15,19 +17,20 @@ const ( type SupportedResourceType string const ( - SupportedInstanceType = SupportedResourceType("supportedInstanceType") - SupportedInstanceTypeFamily = SupportedResourceType("supportedInstanceTypeFamily") - SupportedInstanceGeneration = SupportedResourceType("supportedInstanceGeneration") - SupportedSystemDiskCategory = SupportedResourceType("supportedSystemDiskCategory") - SupportedDataDiskCategory = SupportedResourceType("supportedDataDiskCategory") - SupportedNetworkCategory = SupportedResourceType("supportedNetworkCategory") - + SupportedInstanceType = SupportedResourceType("supportedInstanceType") + SupportedInstanceTypeFamily = SupportedResourceType("supportedInstanceTypeFamily") + SupportedInstanceGeneration = SupportedResourceType("supportedInstanceGeneration") + SupportedSystemDiskCategory = SupportedResourceType("supportedSystemDiskCategory") + SupportedDataDiskCategory = SupportedResourceType("supportedDataDiskCategory") + SupportedNetworkCategory = SupportedResourceType("supportedNetworkCategory") ) + // // You can read doc at https://help.aliyun.com/document_detail/25670.html?spm=5176.doc25640.2.1.J24zQt type ResourcesInfoType struct { ResourcesInfo []AvailableResourcesType } + // Because the sub-item of AvailableResourcesType starts with supported and golang struct cann't refer them, this uses map to parse ResourcesInfo type AvailableResourcesType struct { IoOptimized bool @@ -64,7 +67,7 @@ type AvailableInstanceTypesType struct { type ZoneType struct { ZoneId string LocalName string - AvailableResources ResourcesInfoType + AvailableResources ResourcesInfoType AvailableInstanceTypes AvailableInstanceTypesType AvailableResourceCreation AvailableResourceCreationType AvailableDiskCategories AvailableDiskCategoriesType @@ -101,3 +104,55 @@ func (client *Client) DescribeZonesWithRaw(regionId common.Region) (response *De return nil, err } + +type DescribeAvailableResourceArgs struct { + RegionId string + DestinationResource string + ZoneId string + InstanceChargeType string + SpotStrategy string + IoOptimized string + InstanceType string + SystemDiskCategory string + DataDiskCategory string + NetworkCategory string +} + +type DescribeAvailableResourceResponse struct { + common.Response + AvailableZones struct { + AvailableZone []AvailableZoneType + } +} + +type AvailableZoneType struct { + RegionId string + ZoneId string + Status string + AvailableResources struct { + AvailableResource []NewAvailableResourcesType + } +} + +type NewAvailableResourcesType struct { + Type string + SupportedResources struct { + SupportedResource []SupportedResourcesType + } +} + +type SupportedResourcesType struct { + Value string + Status string + Min string + Max string + Unit string +} + +// https://www.alibabacloud.com/help/doc-detail/66186.htm +func (client *Client) DescribeAvailableResource(args *DescribeAvailableResourceArgs) (response *DescribeAvailableResourceResponse, err error) { + + response = &DescribeAvailableResourceResponse{} + err = client.Invoke("DescribeAvailableResource", args, response) + return response, err +} diff --git a/vendor/github.com/denverdino/aliyungo/ram/api.go b/vendor/github.com/denverdino/aliyungo/ram/api.go index d8f50296e..be9d40044 100644 --- a/vendor/github.com/denverdino/aliyungo/ram/api.go +++ b/vendor/github.com/denverdino/aliyungo/ram/api.go @@ -81,4 +81,7 @@ type RamClientInterface interface { ClearAccountAlias() (RamCommonResponse, error) SetPasswordPolicy(passwordPolicy PasswordPolicyRequest) (PasswordPolicyResponse, error) GetPasswordPolicy() (PasswordPolicyResponse, error) + + // Common Client Methods + SetUserAgent(userAgent string) } diff --git a/vendor/github.com/denverdino/aliyungo/ram/group.go b/vendor/github.com/denverdino/aliyungo/ram/group.go index 491e6931d..ba38e9193 100644 --- a/vendor/github.com/denverdino/aliyungo/ram/group.go +++ b/vendor/github.com/denverdino/aliyungo/ram/group.go @@ -33,7 +33,7 @@ type GroupListResponse struct { RamCommonResponse IsTruncated bool Marker string - Groups struct { + Groups struct { Group []Group } } diff --git a/vendor/github.com/denverdino/aliyungo/ram/policy.go b/vendor/github.com/denverdino/aliyungo/ram/policy.go index 0acfd71a7..c1e6de173 100644 --- a/vendor/github.com/denverdino/aliyungo/ram/policy.go +++ b/vendor/github.com/denverdino/aliyungo/ram/policy.go @@ -37,7 +37,7 @@ type PolicyQueryResponse struct { RamCommonResponse IsTruncated bool Marker string - Policies struct { + Policies struct { Policy []Policy } } diff --git a/vendor/github.com/denverdino/aliyungo/slb/certificates.go b/vendor/github.com/denverdino/aliyungo/slb/certificates.go deleted file mode 100644 index 5cbc4ac09..000000000 --- a/vendor/github.com/denverdino/aliyungo/slb/certificates.go +++ /dev/null @@ -1,108 +0,0 @@ -package slb - -import "github.com/denverdino/aliyungo/common" - -type UploadServerCertificateArgs struct { - RegionId common.Region - ServerCertificate string - ServerCertificateName string - PrivateKey string -} - -type UploadServerCertificateResponse struct { - common.Response - ServerCertificateId string - ServerCertificateName string - Fingerprint string -} - -// UploadServerCertificate Upload server certificate -// -// You can read doc at http://docs.aliyun.com/#pub/slb/api-reference/api-servercertificate&UploadServerCertificate -func (client *Client) UploadServerCertificate(args *UploadServerCertificateArgs) (response *UploadServerCertificateResponse, err error) { - response = &UploadServerCertificateResponse{} - err = client.Invoke("UploadServerCertificate", args, response) - if err != nil { - return nil, err - } - return response, err -} - -type DeleteServerCertificateArgs struct { - RegionId common.Region - ServerCertificateId string -} - -type DeleteServerCertificateResponse struct { - common.Response -} - -// DeleteServerCertificate Delete server certificate -// -// You can read doc at http://docs.aliyun.com/#pub/slb/api-reference/api-servercertificate&DeleteServerCertificate -func (client *Client) DeleteServerCertificate(regionId common.Region, serverCertificateId string) (err error) { - args := &DeleteServerCertificateArgs{ - RegionId: regionId, - ServerCertificateId: serverCertificateId, - } - response := &DeleteServerCertificateResponse{} - return client.Invoke("DeleteServerCertificate", args, response) -} - -type SetServerCertificateNameArgs struct { - RegionId common.Region - ServerCertificateId string - ServerCertificateName string -} - -type SetServerCertificateNameResponse struct { - common.Response -} - -// SetServerCertificateName Set name of server certificate -// -// You can read doc at http://docs.aliyun.com/#pub/slb/api-reference/api-servercertificate&SetServerCertificateName -func (client *Client) SetServerCertificateName(regionId common.Region, serverCertificateId string, name string) (err error) { - args := &SetServerCertificateNameArgs{ - RegionId: regionId, - ServerCertificateId: serverCertificateId, - ServerCertificateName: name, - } - response := &SetServerCertificateNameResponse{} - return client.Invoke("SetServerCertificateName", args, response) -} - -type DescribeServerCertificatesArgs struct { - RegionId common.Region - ServerCertificateId string -} - -type ServerCertificateType struct { - RegionId common.Region - ServerCertificateId string - ServerCertificateName string - Fingerprint string -} - -type DescribeServerCertificatesResponse struct { - common.Response - ServerCertificates struct { - ServerCertificate []ServerCertificateType - } -} - -// DescribeServerCertificates Describe server certificates -// -// You can read doc at http://docs.aliyun.com/#pub/slb/api-reference/api-servercertificate&DescribeServerCertificates -func (client *Client) DescribeServerCertificatesArgs(regionId common.Region, serverCertificateId string) (serverCertificates []ServerCertificateType, err error) { - args := &DescribeServerCertificatesArgs{ - RegionId: regionId, - ServerCertificateId: serverCertificateId, - } - response := &DescribeServerCertificatesResponse{} - err = client.Invoke("DescribeServerCertificates", args, response) - if err != nil { - return nil, err - } - return response.ServerCertificates.ServerCertificate, err -} diff --git a/vendor/github.com/denverdino/aliyungo/slb/client.go b/vendor/github.com/denverdino/aliyungo/slb/client.go deleted file mode 100644 index 0f9b705e4..000000000 --- a/vendor/github.com/denverdino/aliyungo/slb/client.go +++ /dev/null @@ -1,49 +0,0 @@ -package slb - -import ( - "os" - - "github.com/denverdino/aliyungo/common" -) - -type Client struct { - common.Client -} - -const ( - // SLBDefaultEndpoint is the default API endpoint of SLB services - SLBDefaultEndpoint = "https://slb.aliyuncs.com" - SLBAPIVersion = "2014-05-15" - - SLBServiceCode = "slb" -) - -// NewClient creates a new instance of ECS client -func NewClient(accessKeyId, accessKeySecret string) *Client { - endpoint := os.Getenv("SLB_ENDPOINT") - if endpoint == "" { - endpoint = SLBDefaultEndpoint - } - return NewClientWithEndpoint(endpoint, accessKeyId, accessKeySecret) -} - -func NewClientWithEndpoint(endpoint string, accessKeyId, accessKeySecret string) *Client { - client := &Client{} - client.Init(endpoint, SLBAPIVersion, accessKeyId, accessKeySecret) - return client -} - -func NewSLBClient(accessKeyId, accessKeySecret string, regionID common.Region) *Client { - endpoint := os.Getenv("SLB_ENDPOINT") - if endpoint == "" { - endpoint = SLBDefaultEndpoint - } - - return NewClientWithRegion(endpoint, accessKeyId, accessKeySecret, regionID) -} - -func NewClientWithRegion(endpoint string, accessKeyId, accessKeySecret string, regionID common.Region) *Client { - client := &Client{} - client.NewInit(endpoint, SLBAPIVersion, accessKeyId, accessKeySecret, SLBServiceCode, regionID) - return client -} diff --git a/vendor/github.com/denverdino/aliyungo/slb/listeners.go b/vendor/github.com/denverdino/aliyungo/slb/listeners.go deleted file mode 100644 index 4861abc1f..000000000 --- a/vendor/github.com/denverdino/aliyungo/slb/listeners.go +++ /dev/null @@ -1,536 +0,0 @@ -package slb - -import ( - "fmt" - "strings" - "time" - - "github.com/denverdino/aliyungo/common" -) - -type ListenerStatus string - -const ( - Starting = ListenerStatus("starting") - Running = ListenerStatus("running") - Configuring = ListenerStatus("configuring") - Stopping = ListenerStatus("stopping") - Stopped = ListenerStatus("stopped") -) - -type SchedulerType string - -const ( - WRRScheduler = SchedulerType("wrr") - WLCScheduler = SchedulerType("wlc") -) - -type FlagType string - -const ( - OnFlag = FlagType("on") - OffFlag = FlagType("off") -) - -type StickySessionType string - -const ( - InsertStickySessionType = StickySessionType("insert") - ServerStickySessionType = StickySessionType("server") -) - -const BackendServerPort = -520 - -type HealthCheckHttpCodeType string - -const ( - HTTP_2XX = HealthCheckHttpCodeType("http_2xx") - HTTP_3XX = HealthCheckHttpCodeType("http_3xx") - HTTP_4XX = HealthCheckHttpCodeType("http_4xx") - HTTP_5XX = HealthCheckHttpCodeType("http_5xx") -) - -func EncodeHealthCheckHttpCodeType(healthCheckHttpCodes []HealthCheckHttpCodeType) (HealthCheckHttpCodeType, error) { - code := "" - - if nil == healthCheckHttpCodes || len(healthCheckHttpCodes) < 1 { - return "", fmt.Errorf("Invalid size of healthCheckHttpCodes") - } - - for _, healthCheckHttpCode := range healthCheckHttpCodes { - if strings.EqualFold(string(HTTP_2XX), string(healthCheckHttpCode)) || - strings.EqualFold(string(HTTP_3XX), string(healthCheckHttpCode)) || - strings.EqualFold(string(HTTP_4XX), string(healthCheckHttpCode)) || - strings.EqualFold(string(HTTP_5XX), string(healthCheckHttpCode)) { - if "" == code { - code = string(healthCheckHttpCode) - } else { - if strings.Contains(code, string(healthCheckHttpCode)) { - return "", fmt.Errorf("Duplicates healthCheckHttpCode(%v in %v)", healthCheckHttpCode, healthCheckHttpCodes) - } - code += code + "," + string(healthCheckHttpCode) - } - } else { - return "", fmt.Errorf("Invalid healthCheckHttpCode(%v in %v)", healthCheckHttpCode, healthCheckHttpCodes) - } - } - return HealthCheckHttpCodeType(code), nil -} - -type CommonLoadBalancerListenerResponse struct { - common.Response -} - -type HTTPListenerType struct { - LoadBalancerId string - ListenerPort int - BackendServerPort int - Bandwidth int - Scheduler SchedulerType - StickySession FlagType - StickySessionType StickySessionType - CookieTimeout int - Cookie string - HealthCheck FlagType - HealthCheckDomain string - HealthCheckURI string - HealthCheckConnectPort int - HealthyThreshold int - UnhealthyThreshold int - HealthCheckTimeout int - HealthCheckInterval int - HealthCheckHttpCode HealthCheckHttpCodeType - VServerGroup FlagType - VServerGroupId string - Gzip FlagType -} -type CreateLoadBalancerHTTPListenerArgs HTTPListenerType - -// CreateLoadBalancerHTTPListener create HTTP listener on loadbalancer -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&CreateLoadBalancerHTTPListener -func (client *Client) CreateLoadBalancerHTTPListener(args *CreateLoadBalancerHTTPListenerArgs) (err error) { - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("CreateLoadBalancerHTTPListener", args, response) - return err -} - -type HTTPSListenerType struct { - HTTPListenerType - ServerCertificateId string -} - -type CreateLoadBalancerHTTPSListenerArgs HTTPSListenerType - -// CreateLoadBalancerHTTPSListener create HTTPS listener on loadbalancer -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&CreateLoadBalancerHTTPSListener -func (client *Client) CreateLoadBalancerHTTPSListener(args *CreateLoadBalancerHTTPSListenerArgs) (err error) { - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("CreateLoadBalancerHTTPSListener", args, response) - return err -} - -type HealthCheckType string - -const ( - TCPHealthCheckType = HealthCheckType("tcp") - HTTPHealthCheckType = HealthCheckType("http") -) - -type TCPListenerType struct { - LoadBalancerId string - ListenerPort int - BackendServerPort int - Bandwidth int - Scheduler SchedulerType - PersistenceTimeout int - HealthCheck FlagType - HealthCheckType HealthCheckType - HealthCheckDomain string - HealthCheckURI string - HealthCheckConnectPort int - HealthyThreshold int - UnhealthyThreshold int - HealthCheckConnectTimeout int - HealthCheckInterval int - HealthCheckHttpCode HealthCheckHttpCodeType - VServerGroup FlagType - VServerGroupId string -} - -type CreateLoadBalancerTCPListenerArgs TCPListenerType - -// CreateLoadBalancerTCPListener create TCP listener on loadbalancer -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&CreateLoadBalancerTCPListener -func (client *Client) CreateLoadBalancerTCPListener(args *CreateLoadBalancerTCPListenerArgs) (err error) { - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("CreateLoadBalancerTCPListener", args, response) - return err -} - -type UDPListenerType struct { - LoadBalancerId string - ListenerPort int - BackendServerPort int - Bandwidth int - Scheduler SchedulerType - PersistenceTimeout int - HealthCheck FlagType - HealthCheckConnectPort int - HealthyThreshold int - UnhealthyThreshold int - HealthCheckConnectTimeout int - HealthCheckInterval int - VServerGroup FlagType - VServerGroupId string -} -type CreateLoadBalancerUDPListenerArgs UDPListenerType - -// CreateLoadBalancerUDPListener create UDP listener on loadbalancer -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&CreateLoadBalancerUDPListener -func (client *Client) CreateLoadBalancerUDPListener(args *CreateLoadBalancerUDPListenerArgs) (err error) { - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("CreateLoadBalancerUDPListener", args, response) - return err -} - -type CommonLoadBalancerListenerArgs struct { - LoadBalancerId string - ListenerPort int -} - -// DeleteLoadBalancerListener Delete listener -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&DeleteLoadBalancerListener -func (client *Client) DeleteLoadBalancerListener(loadBalancerId string, port int) (err error) { - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("DeleteLoadBalancerListener", args, response) - return err -} - -// StartLoadBalancerListener Start listener -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&StartLoadBalancerListener -func (client *Client) StartLoadBalancerListener(loadBalancerId string, port int) (err error) { - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("StartLoadBalancerListener", args, response) - return err -} - -// StopLoadBalancerListener Stop listener -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&StopLoadBalancerListener -func (client *Client) StopLoadBalancerListener(loadBalancerId string, port int) (err error) { - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("StopLoadBalancerListener", args, response) - return err -} - -type AccessControlStatus string - -const ( - OpenWhileList = AccessControlStatus("open_white_list") - Close = AccessControlStatus("close") -) - -type SetListenerAccessControlStatusArgs struct { - LoadBalancerId string - ListenerPort int - AccessControlStatus AccessControlStatus -} - -// SetListenerAccessControlStatus Set listener access control status -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&SetListenerAccessControlStatus -func (client *Client) SetListenerAccessControlStatus(loadBalancerId string, port int, status AccessControlStatus) (err error) { - args := &SetListenerAccessControlStatusArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - AccessControlStatus: status, - } - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("SetListenerAccessControlStatus", args, response) - return err -} - -type CommonListenerWhiteListItemArgs struct { - LoadBalancerId string - ListenerPort int - SourceItems string -} - -// AddListenerWhiteListItem Add listener white-list item -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&AddListenerWhiteListItem -func (client *Client) AddListenerWhiteListItem(loadBalancerId string, port int, sourceItems string) (err error) { - args := &CommonListenerWhiteListItemArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - SourceItems: sourceItems, - } - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("AddListenerWhiteListItem", args, response) - return err -} - -// RemoveListenerWhiteListItem Remove listener white-list item -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&RemoveListenerWhiteListItem -func (client *Client) RemoveListenerWhiteListItem(loadBalancerId string, port int, sourceItems string) (err error) { - args := &CommonListenerWhiteListItemArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - SourceItems: sourceItems, - } - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("RemoveListenerWhiteListItem", args, response) - return err -} - -type SetLoadBalancerHTTPListenerAttributeArgs CreateLoadBalancerHTTPListenerArgs - -// SetLoadBalancerHTTPListenerAttribute Set HTTP listener attribute -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&SetLoadBalancerHTTPListenerAttribute -func (client *Client) SetLoadBalancerHTTPListenerAttribute(args *SetLoadBalancerHTTPListenerAttributeArgs) (err error) { - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("SetLoadBalancerHTTPListenerAttribute", args, response) - return err -} - -type SetLoadBalancerHTTPSListenerAttributeArgs CreateLoadBalancerHTTPSListenerArgs - -// SetLoadBalancerHTTPSListenerAttribute Set HTTPS listener attribute -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&SetLoadBalancerHTTPSListenerAttribute -func (client *Client) SetLoadBalancerHTTPSListenerAttribute(args *SetLoadBalancerHTTPSListenerAttributeArgs) (err error) { - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("SetLoadBalancerHTTPSListenerAttribute", args, response) - return err -} - -type SetLoadBalancerTCPListenerAttributeArgs CreateLoadBalancerTCPListenerArgs - -// SetLoadBalancerTCPListenerAttribute Set TCP listener attribute -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&SetLoadBalancerTCPListenerAttribute -func (client *Client) SetLoadBalancerTCPListenerAttribute(args *SetLoadBalancerTCPListenerAttributeArgs) (err error) { - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("SetLoadBalancerTCPListenerAttribute", args, response) - return err -} - -type SetLoadBalancerUDPListenerAttributeArgs CreateLoadBalancerUDPListenerArgs - -// SetLoadBalancerUDPListenerAttribute Set UDP listener attribute -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&SetLoadBalancerUDPListenerAttribute -func (client *Client) SetLoadBalancerUDPListenerAttribute(args *SetLoadBalancerUDPListenerAttributeArgs) (err error) { - response := &CommonLoadBalancerListenerResponse{} - err = client.Invoke("SetLoadBalancerUDPListenerAttribute", args, response) - return err -} - -type DescribeLoadBalancerListenerAttributeResponse struct { - common.Response - Status ListenerStatus -} - -type DescribeLoadBalancerHTTPListenerAttributeResponse struct { - DescribeLoadBalancerListenerAttributeResponse - HTTPListenerType -} - -// DescribeLoadBalancerHTTPListenerAttribute Describe HTTP listener attribute -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&DescribeLoadBalancerHTTPListenerAttribute -func (client *Client) DescribeLoadBalancerHTTPListenerAttribute(loadBalancerId string, port int) (response *DescribeLoadBalancerHTTPListenerAttributeResponse, err error) { - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - response = &DescribeLoadBalancerHTTPListenerAttributeResponse{} - err = client.Invoke("DescribeLoadBalancerHTTPListenerAttribute", args, response) - if err != nil { - return nil, err - } - return response, err -} - -type DescribeLoadBalancerHTTPSListenerAttributeResponse struct { - DescribeLoadBalancerListenerAttributeResponse - HTTPSListenerType -} - -// DescribeLoadBalancerHTTPSListenerAttribute Describe HTTPS listener attribute -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&DescribeLoadBalancerHTTPSListenerAttribute -func (client *Client) DescribeLoadBalancerHTTPSListenerAttribute(loadBalancerId string, port int) (response *DescribeLoadBalancerHTTPSListenerAttributeResponse, err error) { - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - response = &DescribeLoadBalancerHTTPSListenerAttributeResponse{} - err = client.Invoke("DescribeLoadBalancerHTTPSListenerAttribute", args, response) - if err != nil { - return nil, err - } - return response, err -} - -type DescribeLoadBalancerTCPListenerAttributeResponse struct { - DescribeLoadBalancerListenerAttributeResponse - TCPListenerType -} - -// DescribeLoadBalancerTCPListenerAttribute Describe TCP listener attribute -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&DescribeLoadBalancerTCPListenerAttribute -func (client *Client) DescribeLoadBalancerTCPListenerAttribute(loadBalancerId string, port int) (response *DescribeLoadBalancerTCPListenerAttributeResponse, err error) { - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - response = &DescribeLoadBalancerTCPListenerAttributeResponse{} - err = client.Invoke("DescribeLoadBalancerTCPListenerAttribute", args, response) - if err != nil { - return nil, err - } - return response, err -} - -type DescribeLoadBalancerUDPListenerAttributeResponse struct { - DescribeLoadBalancerListenerAttributeResponse - UDPListenerType -} - -// DescribeLoadBalancerUDPListenerAttribute Describe UDP listener attribute -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&DescribeLoadBalancerUDPListenerAttribute -func (client *Client) DescribeLoadBalancerUDPListenerAttribute(loadBalancerId string, port int) (response *DescribeLoadBalancerUDPListenerAttributeResponse, err error) { - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - response = &DescribeLoadBalancerUDPListenerAttributeResponse{} - err = client.Invoke("DescribeLoadBalancerUDPListenerAttribute", args, response) - if err != nil { - return nil, err - } - return response, err -} - -type ListenerType string - -const ( - UDP = ListenerType("UDP") - TCP = ListenerType("TCP") - HTTP = ListenerType("HTTP") - HTTPS = ListenerType("HTTPS") -) - -const DefaultWaitForInterval = 5 //5 seconds -const DefaultTimeout = 60 //60 seconds - -// WaitForListener waits for listener to given status -func (client *Client) WaitForListener(loadBalancerId string, port int, listenerType ListenerType) (status ListenerStatus, err error) { - timeout := DefaultTimeout - - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - - method := fmt.Sprintf("DescribeLoadBalancer%sListenerAttribute", listenerType) - response := &DescribeLoadBalancerListenerAttributeResponse{} - - for { - timeout = timeout - DefaultWaitForInterval - if timeout <= 0 { - return response.Status, common.GetClientErrorFromString("Timeout") - } - time.Sleep(DefaultWaitForInterval * time.Second) - //Sleep first to ensure the previous request is sent - err = client.Invoke(method, args, response) - if err != nil { - return "", err - } - if response.Status == Running || response.Status == Stopped { - break - } - } - return response.Status, nil -} - -// WaitForListener waits for listener to given status -func (client *Client) WaitForListenerAsyn(loadBalancerId string, port int, listenerType ListenerType, status ListenerStatus, timeout int) error { - if timeout <= 0 { - timeout = DefaultTimeout - } - - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - - method := fmt.Sprintf("DescribeLoadBalancer%sListenerAttribute", listenerType) - response := &DescribeLoadBalancerListenerAttributeResponse{} - - for { - err := client.Invoke(method, args, response) - e, _ := err.(*common.Error) - if e != nil { - if e.StatusCode == 404 || e.Code == "InvalidLoadBalancerId.NotFound" { - continue - } - return err - } else if response != nil && response.Status == status { - //TODO - break - } - timeout = timeout - DefaultWaitForInterval - if timeout <= 0 { - return common.GetClientErrorFromString("Timeout") - } - time.Sleep(DefaultWaitForInterval * time.Second) - - } - return nil -} - -type DescribeListenerAccessControlAttributeResponse struct { - common.Response - AccessControlStatus AccessControlStatus - SourceItems string -} - -// DescribeListenerAccessControlAttribute Describe listener access control attribute -// -// You can read doc at https://docs.aliyun.com/#/pub/slb/api-reference/api-related-listener&DescribeListenerAccessControlAttribute -func (client *Client) DescribeListenerAccessControlAttribute(loadBalancerId string, port int) (response *DescribeListenerAccessControlAttributeResponse, err error) { - args := &CommonLoadBalancerListenerArgs{ - LoadBalancerId: loadBalancerId, - ListenerPort: port, - } - response = &DescribeListenerAccessControlAttributeResponse{} - err = client.Invoke("DescribeListenerAccessControlAttribute", args, response) - if err != nil { - return nil, err - } - return response, err -} diff --git a/vendor/github.com/denverdino/aliyungo/slb/loadbalancers.go b/vendor/github.com/denverdino/aliyungo/slb/loadbalancers.go deleted file mode 100644 index d090570ce..000000000 --- a/vendor/github.com/denverdino/aliyungo/slb/loadbalancers.go +++ /dev/null @@ -1,238 +0,0 @@ -package slb - -import ( - "github.com/denverdino/aliyungo/common" - "github.com/denverdino/aliyungo/util" -) - -type AddressType string - -const ( - InternetAddressType = AddressType("internet") - IntranetAddressType = AddressType("intranet") -) - -type InternetChargeType string - -const ( - PayByBandwidth = InternetChargeType("paybybandwidth") - PayByTraffic = InternetChargeType("paybytraffic") -) - -type CreateLoadBalancerArgs struct { - RegionId common.Region - LoadBalancerName string - AddressType AddressType - VSwitchId string - InternetChargeType InternetChargeType - Bandwidth int - ClientToken string -} - -type CreateLoadBalancerResponse struct { - common.Response - LoadBalancerId string - Address string - NetworkType string - VpcId string - VSwitchId string - LoadBalancerName string -} - -// CreateLoadBalancer create loadbalancer -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-loadbalancer&CreateLoadBalancer -func (client *Client) CreateLoadBalancer(args *CreateLoadBalancerArgs) (response *CreateLoadBalancerResponse, err error) { - response = &CreateLoadBalancerResponse{} - err = client.Invoke("CreateLoadBalancer", args, response) - if err != nil { - return nil, err - } - return response, err -} - -type DeleteLoadBalancerArgs struct { - LoadBalancerId string -} - -type DeleteLoadBalancerResponse struct { - common.Response -} - -// DeleteLoadBalancer delete loadbalancer -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-loadbalancer&DeleteLoadBalancer -func (client *Client) DeleteLoadBalancer(loadBalancerId string) (err error) { - args := &DeleteLoadBalancerArgs{ - LoadBalancerId: loadBalancerId, - } - response := &DeleteLoadBalancerResponse{} - err = client.Invoke("DeleteLoadBalancer", args, response) - return err -} - -type ModifyLoadBalancerInternetSpecArgs struct { - LoadBalancerId string - InternetChargeType InternetChargeType - Bandwidth int -} - -type ModifyLoadBalancerInternetSpecResponse struct { - common.Response -} - -// ModifyLoadBalancerInternetSpec Modify loadbalancer internet spec -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-loadbalancer&ModifyLoadBalancerInternetSpec - -func (client *Client) ModifyLoadBalancerInternetSpec(args *ModifyLoadBalancerInternetSpecArgs) (err error) { - response := &ModifyLoadBalancerInternetSpecResponse{} - err = client.Invoke("ModifyLoadBalancerInternetSpec", args, response) - return err -} - -type Status string - -const InactiveStatus = Status("inactive") -const ActiveStatus = Status("active") -const LockedStatus = Status("locked") - -type SetLoadBalancerStatusArgs struct { - LoadBalancerId string - LoadBalancerStatus Status -} - -type SetLoadBalancerStatusResponse struct { - common.Response -} - -// SetLoadBalancerStatus Set loadbalancer status -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-loadbalancer&SetLoadBalancerStatus - -func (client *Client) SetLoadBalancerStatus(loadBalancerId string, status Status) (err error) { - args := &SetLoadBalancerStatusArgs{ - LoadBalancerId: loadBalancerId, - LoadBalancerStatus: status, - } - response := &SetLoadBalancerStatusResponse{} - err = client.Invoke("SetLoadBalancerStatus", args, response) - return err -} - -type SetLoadBalancerNameArgs struct { - LoadBalancerId string - LoadBalancerName string -} - -type SetLoadBalancerNameResponse struct { - common.Response -} - -// SetLoadBalancerName Set loadbalancer name -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-loadbalancer&SetLoadBalancerName - -func (client *Client) SetLoadBalancerName(loadBalancerId string, name string) (err error) { - args := &SetLoadBalancerNameArgs{ - LoadBalancerId: loadBalancerId, - LoadBalancerName: name, - } - response := &SetLoadBalancerNameResponse{} - err = client.Invoke("SetLoadBalancerName", args, response) - return err -} - -type DescribeLoadBalancersArgs struct { - RegionId common.Region - LoadBalancerId string - LoadBalancerName string - AddressType AddressType - NetworkType string - VpcId string - VSwitchId string - Address string - InternetChargeType InternetChargeType - ServerId string -} - -type ListenerPortAndProtocolType struct { - ListenerPort int - ListenerProtocol string -} - -type BackendServerType struct { - ServerId string - Weight int -} - -type LoadBalancerType struct { - LoadBalancerId string - LoadBalancerName string - LoadBalancerStatus string - Address string - RegionId common.Region - RegionIdAlias string - AddressType AddressType - VSwitchId string - VpcId string - NetworkType string - Bandwidth int - InternetChargeType InternetChargeType - CreateTime string //Why not ISO 6801 - CreateTimeStamp util.ISO6801Time - ListenerPorts struct { - ListenerPort []int - } - ListenerPortsAndProtocol struct { - ListenerPortAndProtocol []ListenerPortAndProtocolType - } - BackendServers struct { - BackendServer []BackendServerType - } -} - -type DescribeLoadBalancersResponse struct { - common.Response - LoadBalancers struct { - LoadBalancer []LoadBalancerType - } -} - -// DescribeLoadBalancers Describe loadbalancers -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-loadbalancer&DescribeLoadBalancers - -func (client *Client) DescribeLoadBalancers(args *DescribeLoadBalancersArgs) (loadBalancers []LoadBalancerType, err error) { - response := &DescribeLoadBalancersResponse{} - err = client.Invoke("DescribeLoadBalancers", args, response) - if err != nil { - return nil, err - } - return response.LoadBalancers.LoadBalancer, err -} - -type DescribeLoadBalancerAttributeArgs struct { - LoadBalancerId string -} - -type DescribeLoadBalancerAttributeResponse struct { - common.Response - LoadBalancerType -} - -// DescribeLoadBalancerAttribute Describe loadbalancer attribute -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-loadbalancer&DescribeLoadBalancerAttribute - -func (client *Client) DescribeLoadBalancerAttribute(loadBalancerId string) (loadBalancer *LoadBalancerType, err error) { - args := &DescribeLoadBalancersArgs{ - LoadBalancerId: loadBalancerId, - } - response := &DescribeLoadBalancerAttributeResponse{} - err = client.Invoke("DescribeLoadBalancerAttribute", args, response) - if err != nil { - return nil, err - } - return &response.LoadBalancerType, err -} diff --git a/vendor/github.com/denverdino/aliyungo/slb/regions.go b/vendor/github.com/denverdino/aliyungo/slb/regions.go deleted file mode 100644 index 870ffefe7..000000000 --- a/vendor/github.com/denverdino/aliyungo/slb/regions.go +++ /dev/null @@ -1,34 +0,0 @@ -package slb - -import "github.com/denverdino/aliyungo/common" - -type DescribeRegionsArgs struct { -} - -// -// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype®iontype -type RegionType struct { - RegionId common.Region - LocalName string -} - -type DescribeRegionsResponse struct { - common.Response - Regions struct { - Region []RegionType - } -} - -// DescribeRegions describes regions -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-loadbalancer&DescribeRegions -func (client *Client) DescribeRegions() (regions []RegionType, err error) { - response := DescribeRegionsResponse{} - - err = client.Invoke("DescribeRegions", &DescribeRegionsArgs{}, &response) - - if err != nil { - return []RegionType{}, err - } - return response.Regions.Region, nil -} diff --git a/vendor/github.com/denverdino/aliyungo/slb/rules.go b/vendor/github.com/denverdino/aliyungo/slb/rules.go deleted file mode 100644 index 94eb402b6..000000000 --- a/vendor/github.com/denverdino/aliyungo/slb/rules.go +++ /dev/null @@ -1,126 +0,0 @@ -package slb - -import "github.com/denverdino/aliyungo/common" - -type CreateRulesResponse struct { - common.Response -} - -type CreateRulesArgs struct { - RegionId common.Region - LoadBalancerId string - ListenerPort int - RuleList string -} - -type Rule struct { - RuleId string - RuleName string - Domain string - Url string `json:",omitempty"` - VServerGroupId string -} - -// Create forward rules -// -// You can read doc at https://help.aliyun.com/document_detail/35226.html?spm=5176.doc35226.6.671.625Omh -func (client *Client) CreateRules(args *CreateRulesArgs) error { - response := CreateRulesResponse{} - err := client.Invoke("CreateRules", args, &response) - if err != nil { - return err - } - return err -} - -type DeleteRulesArgs struct { - RegionId common.Region - RuleIds string -} - -type DeleteRulesResponse struct { - common.Response -} - -// Delete forward rules -// -// You can read doc at https://help.aliyun.com/document_detail/35227.html?spm=5176.doc35226.6.672.6iNBtR -func (client *Client) DeleteRules(args *DeleteRulesArgs) error { - response := DeleteRulesResponse{} - err := client.Invoke("DeleteRules", args, &response) - if err != nil { - return err - } - return err -} - -type SetRuleArgs struct { - RegionId common.Region - RuleId string - VServerGroupId string -} - -type SetRuleResponse struct { - common.Response -} - -// Modify forward rules -// -// You can read doc at https://help.aliyun.com/document_detail/35228.html?spm=5176.doc35227.6.673.rq40a9 -func (client *Client) SetRule(args *SetRuleArgs) error { - response := SetRuleResponse{} - err := client.Invoke("SetRule", args, &response) - if err != nil { - return err - } - return err -} - -type DescribeRuleAttributeArgs struct { - RegionId common.Region - RuleId string -} - -type DescribeRuleAttributeResponse struct { - common.Response - LoadBalancerId string - ListenerPort int - Rule -} - -// Describe rule -// -// You can read doc at https://help.aliyun.com/document_detail/35229.html?spm=5176.doc35226.6.674.DRJeKJ -func (client *Client) DescribeRuleAttribute(args *DescribeRuleAttributeArgs) (*DescribeRuleAttributeResponse, error) { - response := &DescribeRuleAttributeResponse{} - err := client.Invoke("DescribeRuleAttribute", args, response) - if err != nil { - return nil, err - } - return response, nil -} - -type DescribeRulesArgs struct { - RegionId common.Region - LoadBalancerId string - ListenerPort int -} - -type DescribeRulesResponse struct { - common.Response - Rules struct { - Rule []Rule - } -} - -// Describe rule -// -// You can read doc at https://help.aliyun.com/document_detail/35229.html?spm=5176.doc35226.6.674.DRJeKJ -func (client *Client) DescribeRules(args *DescribeRulesArgs) (*DescribeRulesResponse, error) { - response := &DescribeRulesResponse{} - err := client.Invoke("DescribeRules", args, response) - if err != nil { - return nil, err - } - return response, nil -} diff --git a/vendor/github.com/denverdino/aliyungo/slb/servers.go b/vendor/github.com/denverdino/aliyungo/slb/servers.go deleted file mode 100644 index 18be45891..000000000 --- a/vendor/github.com/denverdino/aliyungo/slb/servers.go +++ /dev/null @@ -1,120 +0,0 @@ -package slb - -import ( - "encoding/json" - - "github.com/denverdino/aliyungo/common" -) - -type AddBackendServersArgs struct { - LoadBalancerId string - BackendServers string -} - -type SetBackendServersArgs AddBackendServersArgs - -type AddBackendServersResponse struct { - common.Response - LoadBalancerId string - BackendServers struct { - BackendServer []BackendServerType - } -} - -type SetBackendServersResponse AddBackendServersResponse - -// SetBackendServers set weight of backend servers - -func (client *Client) SetBackendServers(loadBalancerId string, backendServers []BackendServerType) (result []BackendServerType, err error) { - bytes, _ := json.Marshal(backendServers) - - args := &SetBackendServersArgs{ - LoadBalancerId: loadBalancerId, - BackendServers: string(bytes), - } - response := &SetBackendServersResponse{} - - err = client.Invoke("SetBackendServers", args, response) - if err != nil { - return nil, err - } - return response.BackendServers.BackendServer, err -} - -// AddBackendServers Add backend servers -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-backendserver&AddBackendServers -func (client *Client) AddBackendServers(loadBalancerId string, backendServers []BackendServerType) (result []BackendServerType, err error) { - - bytes, _ := json.Marshal(backendServers) - - args := &AddBackendServersArgs{ - LoadBalancerId: loadBalancerId, - BackendServers: string(bytes), - } - response := &AddBackendServersResponse{} - - err = client.Invoke("AddBackendServers", args, response) - if err != nil { - return nil, err - } - return response.BackendServers.BackendServer, err -} - -type RemoveBackendServersArgs struct { - LoadBalancerId string - BackendServers []string -} - -type RemoveBackendServersResponse struct { - common.Response - LoadBalancerId string - BackendServers struct { - BackendServer []BackendServerType - } -} - -// RemoveBackendServers Remove backend servers -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-backendserver&RemoveBackendServers -func (client *Client) RemoveBackendServers(loadBalancerId string, backendServers []string) (result []BackendServerType, err error) { - args := &RemoveBackendServersArgs{ - LoadBalancerId: loadBalancerId, - BackendServers: backendServers, - } - response := &RemoveBackendServersResponse{} - err = client.Invoke("RemoveBackendServers", args, response) - if err != nil { - return nil, err - } - return response.BackendServers.BackendServer, err -} - -type HealthStatusType struct { - ServerId string - ServerHealthStatus string -} - -type DescribeHealthStatusArgs struct { - LoadBalancerId string - ListenerPort int -} - -type DescribeHealthStatusResponse struct { - common.Response - BackendServers struct { - BackendServer []HealthStatusType - } -} - -// DescribeHealthStatus Describe health status -// -// You can read doc at http://docs.aliyun.com/#/pub/slb/api-reference/api-related-backendserver&DescribeHealthStatus -func (client *Client) DescribeHealthStatus(args *DescribeHealthStatusArgs) (response *DescribeHealthStatusResponse, err error) { - response = &DescribeHealthStatusResponse{} - err = client.Invoke("DescribeHealthStatus", args, response) - if err != nil { - return nil, err - } - return response, err -} diff --git a/vendor/github.com/denverdino/aliyungo/slb/tags.go b/vendor/github.com/denverdino/aliyungo/slb/tags.go deleted file mode 100644 index 4128559d4..000000000 --- a/vendor/github.com/denverdino/aliyungo/slb/tags.go +++ /dev/null @@ -1,85 +0,0 @@ -package slb - -import "github.com/denverdino/aliyungo/common" - -type TagItem struct { - TagKey string - TagValue string -} - -type AddTagsArgs struct { - RegionId common.Region - LoadBalancerID string - Tags string -} - -type AddTagsResponse struct { - common.Response -} - -// AddTags Add tags to resource -// -// You can read doc at https://help.aliyun.com/document_detail/42871.html -func (client *Client) AddTags(args *AddTagsArgs) error { - response := AddTagsResponse{} - err := client.Invoke("AddTags", args, &response) - if err != nil { - return err - } - return err -} - -type RemoveTagsArgs struct { - RegionId common.Region - LoadBalancerID string - Tags string -} - -type RemoveTagsResponse struct { - common.Response -} - -// RemoveTags remove tags to resource -// -// You can read doc at https://help.aliyun.com/document_detail/42872.html -func (client *Client) RemoveTags(args *RemoveTagsArgs) error { - response := RemoveTagsResponse{} - err := client.Invoke("RemoveTags", args, &response) - if err != nil { - return err - } - return err -} - -type TagItemType struct { - TagItem - InstanceCount int -} - -type DescribeTagsArgs struct { - RegionId common.Region - LoadBalancerID string - Tags string - common.Pagination -} - -type DescribeTagsResponse struct { - common.Response - common.PaginationResult - TagSets struct { - TagSet []TagItemType - } -} - -// DescribeResourceByTags describe resource by tags -// -// You can read doc at https://help.aliyun.com/document_detail/42873.html?spm=5176.doc42872.6.267.CP1iWu -func (client *Client) DescribeTags(args *DescribeTagsArgs) (tags []TagItemType, pagination *common.PaginationResult, err error) { - args.Validate() - response := DescribeTagsResponse{} - err = client.Invoke("DescribeTags", args, &response) - if err != nil { - return nil, nil, err - } - return response.TagSets.TagSet, &response.PaginationResult, nil -} diff --git a/vendor/github.com/denverdino/aliyungo/slb/vserver_group.go b/vendor/github.com/denverdino/aliyungo/slb/vserver_group.go deleted file mode 100644 index 1fa83d09b..000000000 --- a/vendor/github.com/denverdino/aliyungo/slb/vserver_group.go +++ /dev/null @@ -1,159 +0,0 @@ -package slb - -import ( - "github.com/denverdino/aliyungo/common" -) - -type VBackendServerType struct { - ServerId string - Weight int - Port int -} - -type VServerGroup struct { - VServerGroupName string - VServerGroupId string -} - -type VBackendServers struct { - BackendServer []VBackendServerType -} - -type CreateVServerGroupArgs struct { - LoadBalancerId string - RegionId common.Region - VServerGroupName string - VServerGroupId string - BackendServers string -} - -type SetVServerGroupAttributeArgs struct { - LoadBalancerId string - RegionId common.Region - VServerGroupName string - VServerGroupId string - BackendServers string -} - -type AddVServerGroupBackendServersArgs CreateVServerGroupArgs -type RemoveVServerGroupBackendServersArgs CreateVServerGroupArgs -type ModifyVServerGroupBackendServersArgs struct { - VServerGroupId string - RegionId common.Region - OldBackendServers string - NewBackendServers string -} - -type DeleteVServerGroupArgs struct { - VServerGroupId string - RegionId common.Region -} - -type DescribeVServerGroupsArgs struct { - LoadBalancerId string - RegionId common.Region -} - -type DescribeVServerGroupAttributeArgs struct { - VServerGroupId string - RegionId common.Region -} - -type CreateVServerGroupResponse struct { - common.Response - VServerGroupId string - VServerGroupName string - BackendServers VBackendServers -} - -type SetVServerGroupAttributeResponse struct { - common.Response - VServerGroupId string - VServerGroupName string - BackendServers VBackendServers -} - -type AddVServerGroupBackendServersResponse CreateVServerGroupResponse -type RemoveVServerGroupBackendServersResponse CreateVServerGroupResponse -type ModifyVServerGroupBackendServersResponse CreateVServerGroupResponse -type DeleteVServerGroupResponse struct{ common.Response } -type DescribeVServerGroupsResponse struct { - common.Response - VServerGroups struct { - VServerGroup []VServerGroup - } -} -type DescribeVServerGroupAttributeResponse CreateVServerGroupResponse - - -func (client *Client) CreateVServerGroup(args *CreateVServerGroupArgs) (response *CreateVServerGroupResponse, err error) { - response = &CreateVServerGroupResponse{} - err = client.Invoke("CreateVServerGroup", args, response) - if err != nil { - return nil, err - } - return response, err -} - -func (client *Client) SetVServerGroupAttribute(args *SetVServerGroupAttributeArgs) (response *SetVServerGroupAttributeResponse, err error) { - response = &SetVServerGroupAttributeResponse{} - err = client.Invoke("SetVServerGroupAttribute", args, response) - if err != nil { - return nil, err - } - return response, err -} - -func (client *Client) AddVServerGroupBackendServers(args *AddVServerGroupBackendServersArgs) (response *AddVServerGroupBackendServersResponse, err error) { - response = &AddVServerGroupBackendServersResponse{} - err = client.Invoke("AddVServerGroupBackendServers", args, response) - if err != nil { - return nil, err - } - return response, err -} - -func (client *Client) RemoveVServerGroupBackendServers(args *RemoveVServerGroupBackendServersArgs) (response *RemoveVServerGroupBackendServersResponse, err error) { - response = &RemoveVServerGroupBackendServersResponse{} - err = client.Invoke("RemoveVServerGroupBackendServers", args, response) - if err != nil { - return nil, err - } - return response, err -} - -func (client *Client) ModifyVServerGroupBackendServers(args *ModifyVServerGroupBackendServersArgs) (response *ModifyVServerGroupBackendServersResponse, err error) { - response = &ModifyVServerGroupBackendServersResponse{} - err = client.Invoke("ModifyVServerGroupBackendServers", args, response) - if err != nil { - return nil, err - } - return response, err -} - -func (client *Client) DeleteVServerGroup(args *DeleteVServerGroupArgs) (response *DeleteVServerGroupResponse, err error) { - response = &DeleteVServerGroupResponse{} - err = client.Invoke("DeleteVServerGroup", args, response) - if err != nil { - return nil, err - } - return response, err -} - -func (client *Client) DescribeVServerGroups(args *DescribeVServerGroupsArgs) (response *DescribeVServerGroupsResponse, err error) { - response = &DescribeVServerGroupsResponse{} - err = client.Invoke("DescribeVServerGroups", args, response) - if err != nil { - return nil, err - } - return response, err -} - -func (client *Client) DescribeVServerGroupAttribute(args *DescribeVServerGroupAttributeArgs) (response *DescribeVServerGroupAttributeResponse, err error) { - response = &DescribeVServerGroupAttributeResponse{} - err = client.Invoke("DescribeVServerGroupAttribute", args, response) - if err != nil { - return nil, err - } - return response, err -} diff --git a/vendor/github.com/denverdino/aliyungo/util/encoding.go b/vendor/github.com/denverdino/aliyungo/util/encoding.go index 99a508f5b..ec1a5b137 100644 --- a/vendor/github.com/denverdino/aliyungo/util/encoding.go +++ b/vendor/github.com/denverdino/aliyungo/util/encoding.go @@ -62,6 +62,8 @@ func setQueryValues(i interface{}, values *url.Values, prefix string) { fieldName := elemType.Field(i).Name anonymous := elemType.Field(i).Anonymous + tag := elemType.Field(i).Tag.Get("query") + argName := elemType.Field(i).Tag.Get("ArgName") field := elem.Field(i) // TODO Use Tag for validation // tag := typ.Field(i).Tag.Get("tagname") @@ -116,15 +118,26 @@ func setQueryValues(i interface{}, values *url.Values, prefix string) { case reflect.String: l := field.Len() if l > 0 { - strArray := make([]string, l) - for i := 0; i < l; i++ { - strArray[i] = field.Index(i).String() - } - bytes, err := json.Marshal(strArray) - if err == nil { - value = string(bytes) + if tag == "list" { + name := argName + if argName == "" { + name = fieldName + } + for i := 0; i < l; i++ { + valueName := fmt.Sprintf("%s.%d", name, (i + 1)) + values.Set(valueName, field.Index(i).String()) + } } else { - log.Printf("Failed to convert JSON: %v", err) + strArray := make([]string, l) + for i := 0; i < l; i++ { + strArray[i] = field.Index(i).String() + } + bytes, err := json.Marshal(strArray) + if err == nil { + value = string(bytes) + } else { + log.Printf("Failed to convert JSON: %v", err) + } } } default: @@ -162,8 +175,8 @@ func setQueryValues(i interface{}, values *url.Values, prefix string) { } } if value != "" { - name := elemType.Field(i).Tag.Get("ArgName") - if name == "" { + name := argName + if argName == "" { name = fieldName } if prefix != "" { diff --git a/vendor/github.com/denverdino/aliyungo/util/signature.go b/vendor/github.com/denverdino/aliyungo/util/signature.go index a00b27c19..1be6d39c7 100644 --- a/vendor/github.com/denverdino/aliyungo/util/signature.go +++ b/vendor/github.com/denverdino/aliyungo/util/signature.go @@ -35,6 +35,5 @@ func CreateSignatureForRequest(method string, values *url.Values, accessKeySecre canonicalizedQueryString := percentReplace(values.Encode()) stringToSign := method + "&%2F&" + url.QueryEscape(canonicalizedQueryString) - return CreateSignature(stringToSign, accessKeySecret) } diff --git a/vendor/github.com/denverdino/aliyungo/util/util.go b/vendor/github.com/denverdino/aliyungo/util/util.go index dd68214e3..15a990da1 100644 --- a/vendor/github.com/denverdino/aliyungo/util/util.go +++ b/vendor/github.com/denverdino/aliyungo/util/util.go @@ -4,6 +4,8 @@ import ( "bytes" srand "crypto/rand" "encoding/binary" + "encoding/json" + "fmt" "math/rand" "net/http" "net/url" @@ -64,6 +66,34 @@ func Encode(v url.Values) string { return buf.String() } +// Like Encode, but key and value are not escaped +func EncodeWithoutEscape(v url.Values) string { + if v == nil { + return "" + } + var buf bytes.Buffer + keys := make([]string, 0, len(v)) + for k := range v { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + vs := v[k] + prefix := k + for _, v := range vs { + if buf.Len() > 0 { + buf.WriteByte('&') + } + buf.WriteString(prefix) + if v != "" { + buf.WriteString("=") + buf.WriteString(v) + } + } + } + return buf.String() +} + func GetGMTime() string { return time.Now().UTC().Format(http.TimeFormat) } @@ -145,3 +175,11 @@ func GenerateRandomECSPassword() string { return string(s) } + +func PrettyJson(object interface{}) string { + b, err := json.MarshalIndent(object, "", " ") + if err != nil { + fmt.Printf("ERROR: PrettyJson, %v\n %s\n", err, b) + } + return string(b) +} diff --git a/vendor/github.com/dgrijalva/jwt-go/.gitignore b/vendor/github.com/dgrijalva/jwt-go/.gitignore new file mode 100644 index 000000000..80bed650e --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +bin + + diff --git a/vendor/github.com/dgrijalva/jwt-go/.travis.yml b/vendor/github.com/dgrijalva/jwt-go/.travis.yml new file mode 100644 index 000000000..1027f56cd --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/.travis.yml @@ -0,0 +1,13 @@ +language: go + +script: + - go vet ./... + - go test -v ./... + +go: + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - 1.7 + - tip diff --git a/vendor/github.com/digitalocean/godo/.gitignore b/vendor/github.com/digitalocean/godo/.gitignore new file mode 100644 index 000000000..48b8bf907 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/.gitignore @@ -0,0 +1 @@ +vendor/ diff --git a/vendor/github.com/digitalocean/godo/.travis.yml b/vendor/github.com/digitalocean/godo/.travis.yml new file mode 100644 index 000000000..5bbdb40f0 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/.travis.yml @@ -0,0 +1,8 @@ +language: go + +go: + - 1.7 + - 1.8 + - 1.9 + - "1.10" + - tip diff --git a/vendor/github.com/digitalocean/godo/CHANGELOG.md b/vendor/github.com/digitalocean/godo/CHANGELOG.md index e01582aff..ee8de2947 100644 --- a/vendor/github.com/digitalocean/godo/CHANGELOG.md +++ b/vendor/github.com/digitalocean/godo/CHANGELOG.md @@ -1,5 +1,53 @@ # Change Log +## [v1.11.1] - 2019-04-04 + +- #222 Fix Create Database Pools json fields - @sunny-b + +## [v1.11.0] - 2019-04-03 + +- #220 roll out vpc functionality - @jheimann + +## [v1.10.1] - 2019-03-27 + +- #219 Fix Database Pools json field - @sunny-b + +## [v1.10.0] - 2019-03-20 + +- #215 Add support for Databases - @mikejholly + +## [v1.9.0] - 2019-03-18 + +- #214 add support for enable_proxy_protocol. - @mregmi + +## [v1.8.0] - 2019-03-13 + +- #210 Expose tags on storage volume create/list/get. - @jcodybaker + +## [v1.7.5] - 2019-03-04 + +- #207 Add support for custom subdomains for Spaces CDN [beta] - @xornivore + +## [v1.7.4] - 2019-02-08 + +- #202 Allow tagging volumes - @mchitten + +## [v1.7.3] - 2018-12-18 + +- #196 Expose tag support for creating Load Balancers. + +## [v1.7.2] - 2018-12-04 + +- #192 Exposes more options for Kubernetes clusters. + +## [v1.7.1] - 2018-11-27 + +- #190 Expose constants for the state of Kubernetes clusters. + +## [v1.7.0] - 2018-11-13 + +- #188 Kubernetes support [beta] - @aybabtme + ## [v1.6.0] - 2018-10-16 - #185 Projects support [beta] - @mchitten diff --git a/vendor/github.com/digitalocean/godo/CONTRIBUTING.md b/vendor/github.com/digitalocean/godo/CONTRIBUTING.md index 7e16f89db..daad280a5 100644 --- a/vendor/github.com/digitalocean/godo/CONTRIBUTING.md +++ b/vendor/github.com/digitalocean/godo/CONTRIBUTING.md @@ -22,3 +22,27 @@ When working on code in this repository, tests can be run via: ```sh go test . ``` + +## Versioning + +Godo follows [semver](https://www.semver.org) versioning semantics. New functionality should be accompanied by increment to the minor version number. The current strategy is to release often. Any code which is complete, tested, reviewed, and merged to master is worthy of release. + +## Releasing + +Releasing a new version of godo is currently a manual process. + +1. Update the `CHANGELOG.md` with your changes. If a version header for the next (unreleased) version does not exist, create one. Include one bullet point for each piece of new functionality in the release, including the pull request ID, description, and author(s). + +``` +## [v1.8.0] - 2019-03-13 + +- #210 Expose tags on storage volume create/list/get. - @jcodybaker +- #123 Update test dependencies - @digitalocean +``` + +2. Update the `libraryVersion` number in `godo.go`. +3. Make a pull request with these changes. This PR should be separate from the PR containing the godo changes. +4. Once the pull request has been merged, visit [https://github.com/digitalocean/godo/releases](https://github.com/digitalocean/godo/release) and click `Draft a new release`. +5. Update the `Tag version` and `Release title` field with the new godo version. Be sure the version has a `v` prefixed in both places. Ex `v1.8.0`. +6. Copy the changelog bullet points to the description field. +7. Publish the release. \ No newline at end of file diff --git a/vendor/github.com/digitalocean/godo/cdn.go b/vendor/github.com/digitalocean/godo/cdn.go index 217d90e52..2e8f475aa 100644 --- a/vendor/github.com/digitalocean/godo/cdn.go +++ b/vendor/github.com/digitalocean/godo/cdn.go @@ -14,7 +14,8 @@ type CDNService interface { List(context.Context, *ListOptions) ([]CDN, *Response, error) Get(context.Context, string) (*CDN, *Response, error) Create(context.Context, *CDNCreateRequest) (*CDN, *Response, error) - UpdateTTL(context.Context, string, *CDNUpdateRequest) (*CDN, *Response, error) + UpdateTTL(context.Context, string, *CDNUpdateTTLRequest) (*CDN, *Response, error) + UpdateCustomDomain(context.Context, string, *CDNUpdateCustomDomainRequest) (*CDN, *Response, error) FlushCache(context.Context, string, *CDNFlushCacheRequest) (*Response, error) Delete(context.Context, string) (*Response, error) } @@ -29,11 +30,13 @@ var _ CDNService = &CDNServiceOp{} // CDN represents a DigitalOcean CDN type CDN struct { - ID string `json:"id"` - Origin string `json:"origin"` - Endpoint string `json:"endpoint"` - CreatedAt time.Time `json:"created_at"` - TTL uint32 `json:"ttl"` + ID string `json:"id"` + Origin string `json:"origin"` + Endpoint string `json:"endpoint"` + CreatedAt time.Time `json:"created_at"` + TTL uint32 `json:"ttl"` + CertificateID string `json:"certificate_id,omitempty"` + CustomDomain string `json:"custom_domain,omitempty"` } // CDNRoot represents a response from the DigitalOcean API @@ -48,15 +51,23 @@ type cdnsRoot struct { // CDNCreateRequest represents a request to create a CDN. type CDNCreateRequest struct { - Origin string `json:"origin"` - TTL uint32 `json:"ttl"` + Origin string `json:"origin"` + TTL uint32 `json:"ttl"` + CustomDomain string `json:"custom_domain,omitempty"` + CertificateID string `json:"certificate_id,omitempty"` } -// CDNUpdateRequest represents a request to update the ttl of a CDN. -type CDNUpdateRequest struct { +// CDNUpdateTTLRequest represents a request to update the ttl of a CDN. +type CDNUpdateTTLRequest struct { TTL uint32 `json:"ttl"` } +// CDNUpdateCustomDomainRequest represents a request to update the custom domain of a CDN. +type CDNUpdateCustomDomainRequest struct { + CustomDomain string `json:"custom_domain"` + CertificateID string `json:"certificate_id"` +} + // CDNFlushCacheRequest represents a request to flush cache of a CDN. type CDNFlushCacheRequest struct { Files []string `json:"files"` @@ -128,8 +139,17 @@ func (c CDNServiceOp) Create(ctx context.Context, createRequest *CDNCreateReques return root.Endpoint, resp, err } -// UpdateTTL updates the ttl of individual CDN -func (c CDNServiceOp) UpdateTTL(ctx context.Context, id string, updateRequest *CDNUpdateRequest) (*CDN, *Response, error) { +// UpdateTTL updates the ttl of an individual CDN +func (c CDNServiceOp) UpdateTTL(ctx context.Context, id string, updateRequest *CDNUpdateTTLRequest) (*CDN, *Response, error) { + return c.update(ctx, id, updateRequest) +} + +// UpdateCustomDomain sets or removes the custom domain of an individual CDN +func (c CDNServiceOp) UpdateCustomDomain(ctx context.Context, id string, updateRequest *CDNUpdateCustomDomainRequest) (*CDN, *Response, error) { + return c.update(ctx, id, updateRequest) +} + +func (c CDNServiceOp) update(ctx context.Context, id string, updateRequest interface{}) (*CDN, *Response, error) { if updateRequest == nil { return nil, nil, NewArgError("updateRequest", "cannot be nil") } @@ -137,7 +157,6 @@ func (c CDNServiceOp) UpdateTTL(ctx context.Context, id string, updateRequest *C if len(id) == 0 { return nil, nil, NewArgError("id", "cannot be an empty string") } - path := fmt.Sprintf("%s/%s", cdnBasePath, id) req, err := c.client.NewRequest(ctx, http.MethodPut, path, updateRequest) diff --git a/vendor/github.com/digitalocean/godo/databases.go b/vendor/github.com/digitalocean/godo/databases.go new file mode 100644 index 000000000..7dc8a5338 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/databases.go @@ -0,0 +1,618 @@ +package godo + +import ( + "context" + "fmt" + "net/http" + "time" +) + +const ( + databaseBasePath = "/v2/databases" + databaseSinglePath = databaseBasePath + "/%s" + databaseResizePath = databaseBasePath + "/%s/resize" + databaseMigratePath = databaseBasePath + "/%s/migrate" + databaseMaintenancePath = databaseBasePath + "/%s/maintenance" + databaseBackupsPath = databaseBasePath + "/%s/backups" + databaseUsersPath = databaseBasePath + "/%s/users" + databaseUserPath = databaseBasePath + "/%s/users/%s" + databaseDBPath = databaseBasePath + "/%s/dbs/%s" + databaseDBsPath = databaseBasePath + "/%s/dbs" + databasePoolPath = databaseBasePath + "/%s/pools/%s" + databasePoolsPath = databaseBasePath + "/%s/pools" + databaseReplicaPath = databaseBasePath + "/%s/replicas/%s" + databaseReplicasPath = databaseBasePath + "/%s/replicas" +) + +// DatabasesService is an interface for interfacing with the databases endpoints +// of the DigitalOcean API. +// See: https://developers.digitalocean.com/documentation/v2#databases +type DatabasesService interface { + List(context.Context, *ListOptions) ([]Database, *Response, error) + Get(context.Context, string) (*Database, *Response, error) + Create(context.Context, *DatabaseCreateRequest) (*Database, *Response, error) + Delete(context.Context, string) (*Response, error) + Resize(context.Context, string, *DatabaseResizeRequest) (*Response, error) + Migrate(context.Context, string, *DatabaseMigrateRequest) (*Response, error) + UpdateMaintenance(context.Context, string, *DatabaseUpdateMaintenanceRequest) (*Response, error) + ListBackups(context.Context, string, *ListOptions) ([]DatabaseBackup, *Response, error) + GetUser(context.Context, string, string) (*DatabaseUser, *Response, error) + ListUsers(context.Context, string, *ListOptions) ([]DatabaseUser, *Response, error) + CreateUser(context.Context, string, *DatabaseCreateUserRequest) (*DatabaseUser, *Response, error) + DeleteUser(context.Context, string, string) (*Response, error) + ListDBs(context.Context, string, *ListOptions) ([]DatabaseDB, *Response, error) + CreateDB(context.Context, string, *DatabaseCreateDBRequest) (*DatabaseDB, *Response, error) + GetDB(context.Context, string, string) (*DatabaseDB, *Response, error) + DeleteDB(context.Context, string, string) (*Response, error) + ListPools(context.Context, string, *ListOptions) ([]DatabasePool, *Response, error) + CreatePool(context.Context, string, *DatabaseCreatePoolRequest) (*DatabasePool, *Response, error) + GetPool(context.Context, string, string) (*DatabasePool, *Response, error) + DeletePool(context.Context, string, string) (*Response, error) + GetReplica(context.Context, string, string) (*DatabaseReplica, *Response, error) + ListReplicas(context.Context, string, *ListOptions) ([]DatabaseReplica, *Response, error) + CreateReplica(context.Context, string, *DatabaseCreateReplicaRequest) (*DatabaseReplica, *Response, error) + DeleteReplica(context.Context, string, string) (*Response, error) +} + +// DatabasesServiceOp handles communication with the Databases related methods +// of the DigitalOcean API. +type DatabasesServiceOp struct { + client *Client +} + +var _ DatabasesService = &DatabasesServiceOp{} + +// Database represents a DigitalOcean managed database product. These managed databases +// are usually comprised of a cluster of database nodes, a primary and 0 or more replicas. +// The EngineSlug is a string which indicates the type of database service. Some examples are +// "pg", "mysql" or "redis". A Database also includes connection information and other +// properties of the service like region, size and current status. +type Database struct { + ID string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + EngineSlug string `json:"engine,omitempty"` + VersionSlug string `json:"version,omitempty"` + Connection *DatabaseConnection `json:"connection,omitempty"` + Users []DatabaseUser `json:"users,omitempty"` + NumNodes int `json:"num_nodes,omitempty"` + SizeSlug string `json:"size,omitempty"` + DBNames []string `json:"db_names,omitempty"` + RegionSlug string `json:"region,omitempty"` + Status string `json:"status,omitempty"` + MaintenanceWindow *DatabaseMaintenanceWindow `json:"maintenance_window,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` +} + +// DatabaseConnection represents a database connection +type DatabaseConnection struct { + URI string `json:"uri,omitempty"` + Database string `json:"database,omitempty"` + Host string `json:"host,omitempty"` + Port int `json:"port,omitempty"` + User string `json:"user,omitempty"` + Password string `json:"password,omitempty"` + SSL bool `json:"ssl,omitempty"` +} + +// DatabaseUser represents a user in the database +type DatabaseUser struct { + Name string `json:"name,omitempty"` + Role string `json:"role,omitempty"` + Password string `json:"password,omitempty"` +} + +// DatabaseMaintenanceWindow represents the maintenance_window of a database +// cluster +type DatabaseMaintenanceWindow struct { + Day string `json:"day,omitempty"` + Hour string `json:"hour,omitempty"` + Pending bool `json:"pending,omitempty"` + Description []string `json:"description,omitempty"` +} + +// DatabaseBackup represents a database backup. +type DatabaseBackup struct { + CreatedAt time.Time `json:"created_at,omitempty"` + SizeGigabytes float64 `json:"size_gigabytes,omitempty"` +} + +// DatabaseCreateRequest represents a request to create a database cluster +type DatabaseCreateRequest struct { + Name string `json:"name,omitempty"` + EngineSlug string `json:"engine,omitempty"` + Version string `json:"version,omitempty"` + SizeSlug string `json:"size,omitempty"` + Region string `json:"region,omitempty"` + NumNodes int `json:"num_nodes,omitempty"` +} + +// DatabaseResizeRequest can be used to initiate a database resize operation. +type DatabaseResizeRequest struct { + SizeSlug string `json:"size,omitempty"` + NumNodes int `json:"num_nodes,omitempty"` +} + +// DatabaseMigrateRequest can be used to initiate a database migrate operation. +type DatabaseMigrateRequest struct { + Region string `json:"region,omitempty"` +} + +// DatabaseUpdateMaintenanceRequest can be used to update the database's maintenance window. +type DatabaseUpdateMaintenanceRequest struct { + Day string `json:"day,omitempty"` + Hour string `json:"hour,omitempty"` +} + +// DatabaseDB represents an engine-specific database created within a database cluster. For SQL +// databases like PostgreSQL or MySQL, a "DB" refers to a database created on the RDBMS. For instance, +// a PostgreSQL database server can contain many database schemas, each with it's own settings, access +// permissions and data. ListDBs will return all databases present on the server. +type DatabaseDB struct { + Name string `json:"name"` +} + +// DatabaseReplica represents a read-only replica of a particular database +type DatabaseReplica struct { + Name string `json:"name"` + Connection *DatabaseConnection `json:"connection"` + Region string `json:"region"` + Status string `json:"status"` + CreatedAt time.Time `json:"created_at"` +} + +// DatabasePool represents a database connection pool +type DatabasePool struct { + User string `json:"user"` + Name string `json:"name"` + Size int `json:"size"` + Database string `json:"db"` + Mode string `json:"mode"` + Connection *DatabaseConnection `json:"connection"` +} + +// DatabaseCreatePoolRequest is used to create a new database connection pool +type DatabaseCreatePoolRequest struct { + User string `json:"user"` + Name string `json:"name"` + Size int `json:"size"` + Database string `json:"db"` + Mode string `json:"mode"` +} + +// DatabaseCreateUserRequest is used to create a new database user +type DatabaseCreateUserRequest struct { + Name string `json:"name"` +} + +// DatabaseCreateDBRequest is used to create a new engine-specific database within the cluster +type DatabaseCreateDBRequest struct { + Name string `json:"name"` +} + +// DatabaseCreateReplicaRequest is used to create a new read-only replica +type DatabaseCreateReplicaRequest struct { + Name string `json:"name"` + Region string `json:"region"` + Size string `json:"size"` +} + +type databaseUserRoot struct { + User *DatabaseUser `json:"user"` +} + +type databaseUsersRoot struct { + Users []DatabaseUser `json:"users"` +} + +type databaseDBRoot struct { + DB *DatabaseDB `json:"db"` +} + +type databaseDBsRoot struct { + DBs []DatabaseDB `json:"dbs"` +} + +type databasesRoot struct { + Databases []Database `json:"databases"` +} + +type databaseRoot struct { + Database *Database `json:"database"` +} + +type databaseBackupsRoot struct { + Backups []DatabaseBackup `json:"backups"` +} + +type databasePoolRoot struct { + Pool *DatabasePool `json:"pool"` +} + +type databasePoolsRoot struct { + Pools []DatabasePool `json:"pools"` +} + +type databaseReplicaRoot struct { + Replica *DatabaseReplica `json:"replica"` +} + +type databaseReplicasRoot struct { + Replicas []DatabaseReplica `json:"replicas"` +} + +// List returns a list of the Databases visible with the caller's API token +func (svc *DatabasesServiceOp) List(ctx context.Context, opts *ListOptions) ([]Database, *Response, error) { + path := databaseBasePath + path, err := addOptions(path, opts) + if err != nil { + return nil, nil, err + } + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databasesRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Databases, resp, nil +} + +// Get retrieves the details of a database cluster +func (svc *DatabasesServiceOp) Get(ctx context.Context, databaseID string) (*Database, *Response, error) { + path := fmt.Sprintf(databaseSinglePath, databaseID) + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databaseRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Database, resp, nil +} + +// Create creates a database cluster +func (svc *DatabasesServiceOp) Create(ctx context.Context, create *DatabaseCreateRequest) (*Database, *Response, error) { + path := databaseBasePath + req, err := svc.client.NewRequest(ctx, http.MethodPost, path, create) + if err != nil { + return nil, nil, err + } + root := new(databaseRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Database, resp, nil +} + +// Delete deletes a database cluster. There is no way to recover a cluster once +// it has been destroyed. +func (svc *DatabasesServiceOp) Delete(ctx context.Context, databaseID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", databaseBasePath, databaseID) + req, err := svc.client.NewRequest(ctx, http.MethodDelete, path, nil) + if err != nil { + return nil, err + } + resp, err := svc.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} + +// Resize resizes a database cluster by number of nodes or size +func (svc *DatabasesServiceOp) Resize(ctx context.Context, databaseID string, resize *DatabaseResizeRequest) (*Response, error) { + path := fmt.Sprintf(databaseResizePath, databaseID) + req, err := svc.client.NewRequest(ctx, http.MethodPut, path, resize) + if err != nil { + return nil, err + } + resp, err := svc.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} + +// Migrate migrates a database cluster to a new region +func (svc *DatabasesServiceOp) Migrate(ctx context.Context, databaseID string, migrate *DatabaseMigrateRequest) (*Response, error) { + path := fmt.Sprintf(databaseMigratePath, databaseID) + req, err := svc.client.NewRequest(ctx, http.MethodPut, path, migrate) + if err != nil { + return nil, err + } + resp, err := svc.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} + +// UpdateMaintenance updates the maintenance window on a cluster +func (svc *DatabasesServiceOp) UpdateMaintenance(ctx context.Context, databaseID string, maintenance *DatabaseUpdateMaintenanceRequest) (*Response, error) { + path := fmt.Sprintf(databaseMaintenancePath, databaseID) + req, err := svc.client.NewRequest(ctx, http.MethodPut, path, maintenance) + if err != nil { + return nil, err + } + resp, err := svc.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} + +// ListBackups returns a list of the current backups of a database +func (svc *DatabasesServiceOp) ListBackups(ctx context.Context, databaseID string, opts *ListOptions) ([]DatabaseBackup, *Response, error) { + path := fmt.Sprintf(databaseBackupsPath, databaseID) + path, err := addOptions(path, opts) + if err != nil { + return nil, nil, err + } + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databaseBackupsRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Backups, resp, nil +} + +// GetUser returns the database user identified by userID +func (svc *DatabasesServiceOp) GetUser(ctx context.Context, databaseID, userID string) (*DatabaseUser, *Response, error) { + path := fmt.Sprintf(databaseUserPath, databaseID, userID) + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databaseUserRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.User, resp, nil +} + +// ListUsers returns all database users for the database +func (svc *DatabasesServiceOp) ListUsers(ctx context.Context, databaseID string, opts *ListOptions) ([]DatabaseUser, *Response, error) { + path := fmt.Sprintf(databaseUsersPath, databaseID) + path, err := addOptions(path, opts) + if err != nil { + return nil, nil, err + } + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databaseUsersRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Users, resp, nil +} + +// CreateUser will create a new database user +func (svc *DatabasesServiceOp) CreateUser(ctx context.Context, databaseID string, createUser *DatabaseCreateUserRequest) (*DatabaseUser, *Response, error) { + path := fmt.Sprintf(databaseUsersPath, databaseID) + req, err := svc.client.NewRequest(ctx, http.MethodPost, path, createUser) + if err != nil { + return nil, nil, err + } + root := new(databaseUserRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.User, resp, nil +} + +// DeleteUser will delete an existing database user +func (svc *DatabasesServiceOp) DeleteUser(ctx context.Context, databaseID, userID string) (*Response, error) { + path := fmt.Sprintf(databaseUserPath, databaseID, userID) + req, err := svc.client.NewRequest(ctx, http.MethodDelete, path, nil) + if err != nil { + return nil, err + } + resp, err := svc.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} + +// ListDBs returns all databases for a given database cluster +func (svc *DatabasesServiceOp) ListDBs(ctx context.Context, databaseID string, opts *ListOptions) ([]DatabaseDB, *Response, error) { + path := fmt.Sprintf(databaseDBsPath, databaseID) + path, err := addOptions(path, opts) + if err != nil { + return nil, nil, err + } + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databaseDBsRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.DBs, resp, nil +} + +// GetDB returns a single database by name +func (svc *DatabasesServiceOp) GetDB(ctx context.Context, databaseID, name string) (*DatabaseDB, *Response, error) { + path := fmt.Sprintf(databaseDBPath, databaseID, name) + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databaseDBRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.DB, resp, nil +} + +// CreateDB will create a new database +func (svc *DatabasesServiceOp) CreateDB(ctx context.Context, databaseID string, createDB *DatabaseCreateDBRequest) (*DatabaseDB, *Response, error) { + path := fmt.Sprintf(databaseDBsPath, databaseID) + req, err := svc.client.NewRequest(ctx, http.MethodPost, path, createDB) + if err != nil { + return nil, nil, err + } + root := new(databaseDBRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.DB, resp, nil +} + +// DeleteDB will delete an existing database +func (svc *DatabasesServiceOp) DeleteDB(ctx context.Context, databaseID, name string) (*Response, error) { + path := fmt.Sprintf(databaseDBPath, databaseID, name) + req, err := svc.client.NewRequest(ctx, http.MethodDelete, path, nil) + if err != nil { + return nil, err + } + resp, err := svc.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} + +// ListPools returns all connection pools for a given database cluster +func (svc *DatabasesServiceOp) ListPools(ctx context.Context, databaseID string, opts *ListOptions) ([]DatabasePool, *Response, error) { + path := fmt.Sprintf(databasePoolsPath, databaseID) + path, err := addOptions(path, opts) + if err != nil { + return nil, nil, err + } + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databasePoolsRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Pools, resp, nil +} + +// GetPool returns a single database connection pool by name +func (svc *DatabasesServiceOp) GetPool(ctx context.Context, databaseID, name string) (*DatabasePool, *Response, error) { + path := fmt.Sprintf(databasePoolPath, databaseID, name) + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databasePoolRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Pool, resp, nil +} + +// CreatePool will create a new database connection pool +func (svc *DatabasesServiceOp) CreatePool(ctx context.Context, databaseID string, createPool *DatabaseCreatePoolRequest) (*DatabasePool, *Response, error) { + path := fmt.Sprintf(databasePoolsPath, databaseID) + req, err := svc.client.NewRequest(ctx, http.MethodPost, path, createPool) + if err != nil { + return nil, nil, err + } + root := new(databasePoolRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Pool, resp, nil +} + +// DeletePool will delete an existing database connection pool +func (svc *DatabasesServiceOp) DeletePool(ctx context.Context, databaseID, name string) (*Response, error) { + path := fmt.Sprintf(databasePoolPath, databaseID, name) + req, err := svc.client.NewRequest(ctx, http.MethodDelete, path, nil) + if err != nil { + return nil, err + } + resp, err := svc.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} + +// GetReplica returns a single database replica +func (svc *DatabasesServiceOp) GetReplica(ctx context.Context, databaseID, name string) (*DatabaseReplica, *Response, error) { + path := fmt.Sprintf(databaseReplicaPath, databaseID, name) + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databaseReplicaRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Replica, resp, nil +} + +// ListReplicas returns all read-only replicas for a given database cluster +func (svc *DatabasesServiceOp) ListReplicas(ctx context.Context, databaseID string, opts *ListOptions) ([]DatabaseReplica, *Response, error) { + path := fmt.Sprintf(databaseReplicasPath, databaseID) + path, err := addOptions(path, opts) + if err != nil { + return nil, nil, err + } + req, err := svc.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + root := new(databaseReplicasRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Replicas, resp, nil +} + +// CreateReplica will create a new database connection pool +func (svc *DatabasesServiceOp) CreateReplica(ctx context.Context, databaseID string, createReplica *DatabaseCreateReplicaRequest) (*DatabaseReplica, *Response, error) { + path := fmt.Sprintf(databaseReplicasPath, databaseID) + req, err := svc.client.NewRequest(ctx, http.MethodPost, path, createReplica) + if err != nil { + return nil, nil, err + } + root := new(databaseReplicaRoot) + resp, err := svc.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + return root.Replica, resp, nil +} + +// DeleteReplica will delete an existing database replica +func (svc *DatabasesServiceOp) DeleteReplica(ctx context.Context, databaseID, name string) (*Response, error) { + path := fmt.Sprintf(databaseReplicaPath, databaseID, name) + req, err := svc.client.NewRequest(ctx, http.MethodDelete, path, nil) + if err != nil { + return nil, err + } + resp, err := svc.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + return resp, nil +} diff --git a/vendor/github.com/digitalocean/godo/doc.go b/vendor/github.com/digitalocean/godo/doc.go index e660f794a..e22f69333 100644 --- a/vendor/github.com/digitalocean/godo/doc.go +++ b/vendor/github.com/digitalocean/godo/doc.go @@ -1,2 +1,11 @@ // Package godo is the DigtalOcean API v2 client for Go +// +// Databases +// +// The Databases service provides access to the DigitalOcean managed database +// suite of products. Customers can create new database clusters, migrate them +// between regions, create replicas and interact with their configurations. +// Each database service is refered to as a Database. A SQL database service +// can have multiple databases residing in the system. To help make these +// entities distinct from Databases in godo, we refer to them here as DatabaseDBs. package godo diff --git a/vendor/github.com/digitalocean/godo/domains.go b/vendor/github.com/digitalocean/godo/domains.go index de266512e..1014e9b95 100644 --- a/vendor/github.com/digitalocean/godo/domains.go +++ b/vendor/github.com/digitalocean/godo/domains.go @@ -294,18 +294,18 @@ func (s *DomainsServiceOp) EditRecord(ctx context.Context, path := fmt.Sprintf("%s/%s/records/%d", domainsBasePath, domain, id) - req, err := s.client.NewRequest(ctx, "PUT", path, editRequest) + req, err := s.client.NewRequest(ctx, http.MethodPut, path, editRequest) if err != nil { return nil, nil, err } - d := new(DomainRecord) - resp, err := s.client.Do(ctx, req, d) + root := new(domainRecordRoot) + resp, err := s.client.Do(ctx, req, root) if err != nil { return nil, resp, err } - return d, resp, err + return root.DomainRecord, resp, err } // CreateRecord creates a record using a DomainRecordEditRequest diff --git a/vendor/github.com/digitalocean/godo/droplets.go b/vendor/github.com/digitalocean/godo/droplets.go index ab508f1c0..06d4debf3 100644 --- a/vendor/github.com/digitalocean/godo/droplets.go +++ b/vendor/github.com/digitalocean/godo/droplets.go @@ -60,6 +60,7 @@ type Droplet struct { Kernel *Kernel `json:"kernel,omitempty"` Tags []string `json:"tags,omitempty"` VolumeIDs []string `json:"volume_ids"` + VPCUUID string `json:"vpc_uuid,omitempty"` } // PublicIPv4 returns the public IPv4 address for the Droplet. @@ -222,6 +223,7 @@ type DropletCreateRequest struct { UserData string `json:"user_data,omitempty"` Volumes []DropletCreateVolume `json:"volumes,omitempty"` Tags []string `json:"tags"` + VPCUUID string `json:"vpc_uuid,omitempty"` } // DropletMultiCreateRequest is a request to create multiple Droplets. @@ -237,6 +239,7 @@ type DropletMultiCreateRequest struct { Monitoring bool `json:"monitoring"` UserData string `json:"user_data,omitempty"` Tags []string `json:"tags"` + VPCUUID string `json:"vpc_uuid,omitempty"` } func (d DropletCreateRequest) String() string { diff --git a/vendor/github.com/digitalocean/godo/godo.go b/vendor/github.com/digitalocean/godo/godo.go index ab4f0884d..e6c3ac483 100644 --- a/vendor/github.com/digitalocean/godo/godo.go +++ b/vendor/github.com/digitalocean/godo/godo.go @@ -14,11 +14,10 @@ import ( "time" "github.com/google/go-querystring/query" - headerLink "github.com/tent/http-link-go" ) const ( - libraryVersion = "1.6.0" + libraryVersion = "1.11.1" defaultBaseURL = "https://api.digitalocean.com/" userAgent = "godo/" + libraryVersion mediaType = "application/json" @@ -66,6 +65,8 @@ type Client struct { Firewalls FirewallsService Projects ProjectsService Kubernetes KubernetesService + Databases DatabasesService + VPCs VPCsService // Optional function called after every successful request made to the DO APIs onRequestCompleted RequestCompletionCallback @@ -180,6 +181,8 @@ func NewClient(httpClient *http.Client) *Client { c.StorageActions = &StorageActionsServiceOp{client: c} c.Tags = &TagsServiceOp{client: c} c.Kubernetes = &KubernetesServiceOp{client: c} + c.Databases = &DatabasesServiceOp{client: c} + c.VPCs = &VPCsServiceOp{client: c} return c } @@ -263,25 +266,6 @@ func newResponse(r *http.Response) *Response { return &response } -func (r *Response) links() (map[string]headerLink.Link, error) { - if linkText, ok := r.Response.Header["Link"]; ok { - links, err := headerLink.Parse(linkText[0]) - - if err != nil { - return nil, err - } - - linkMap := map[string]headerLink.Link{} - for _, link := range links { - linkMap[link.Rel] = link - } - - return linkMap, nil - } - - return map[string]headerLink.Link{}, nil -} - // populateRate parses the rate related headers and populates the response Rate. func (r *Response) populateRate() { if limit := r.Header.Get(headerRateLimit); limit != "" { diff --git a/vendor/github.com/digitalocean/godo/kubernetes.go b/vendor/github.com/digitalocean/godo/kubernetes.go index e5769de0e..e42dfe563 100644 --- a/vendor/github.com/digitalocean/godo/kubernetes.go +++ b/vendor/github.com/digitalocean/godo/kubernetes.go @@ -3,8 +3,10 @@ package godo import ( "bytes" "context" + "encoding" "fmt" "net/http" + "strings" "time" ) @@ -14,7 +16,7 @@ const ( kubernetesOptionsPath = kubernetesBasePath + "/options" ) -// KubernetesService is an interface for interfacing with the kubernetes endpoints +// KubernetesService is an interface for interfacing with the Kubernetes endpoints // of the DigitalOcean API. // See: https://developers.digitalocean.com/documentation/v2#kubernetes type KubernetesService interface { @@ -48,6 +50,7 @@ type KubernetesClusterCreateRequest struct { RegionSlug string `json:"region,omitempty"` VersionSlug string `json:"version,omitempty"` Tags []string `json:"tags,omitempty"` + VPCUUID string `json:"vpc_uuid,omitempty"` NodePools []*KubernetesNodePoolCreateRequest `json:"node_pools,omitempty"` } @@ -92,6 +95,7 @@ type KubernetesCluster struct { IPv4 string `json:"ipv4,omitempty"` Endpoint string `json:"endpoint,omitempty"` Tags []string `json:"tags,omitempty"` + VPCUUID string `json:"vpc_uuid,omitempty"` NodePools []*KubernetesNodePool `json:"node_pools,omitempty"` @@ -100,10 +104,46 @@ type KubernetesCluster struct { UpdatedAt time.Time `json:"updated_at,omitempty"` } +// Possible states for a cluster. +const ( + KubernetesClusterStatusProvisioning = KubernetesClusterStatusState("provisioning") + KubernetesClusterStatusRunning = KubernetesClusterStatusState("running") + KubernetesClusterStatusDegraded = KubernetesClusterStatusState("degraded") + KubernetesClusterStatusError = KubernetesClusterStatusState("error") + KubernetesClusterStatusDeleted = KubernetesClusterStatusState("deleted") + KubernetesClusterStatusInvalid = KubernetesClusterStatusState("invalid") +) + +// KubernetesClusterStatusState represents states for a cluster. +type KubernetesClusterStatusState string + +var _ encoding.TextUnmarshaler = (*KubernetesClusterStatusState)(nil) + +// UnmarshalText unmarshals the state. +func (s *KubernetesClusterStatusState) UnmarshalText(text []byte) error { + switch KubernetesClusterStatusState(strings.ToLower(string(text))) { + case KubernetesClusterStatusProvisioning: + *s = KubernetesClusterStatusProvisioning + case KubernetesClusterStatusRunning: + *s = KubernetesClusterStatusRunning + case KubernetesClusterStatusDegraded: + *s = KubernetesClusterStatusDegraded + case KubernetesClusterStatusError: + *s = KubernetesClusterStatusError + case KubernetesClusterStatusDeleted: + *s = KubernetesClusterStatusDeleted + case "", KubernetesClusterStatusInvalid: + *s = KubernetesClusterStatusInvalid + default: + return fmt.Errorf("unknown cluster state %q", string(text)) + } + return nil +} + // KubernetesClusterStatus describes the status of a cluster. type KubernetesClusterStatus struct { - State string `json:"state,omitempty"` - Message string `json:"message,omitempty"` + State KubernetesClusterStatusState `json:"state,omitempty"` + Message string `json:"message,omitempty"` } // KubernetesNodePool represents a node pool in a Kubernetes cluster. @@ -135,7 +175,9 @@ type KubernetesNodeStatus struct { // KubernetesOptions represents options available for creating Kubernetes clusters. type KubernetesOptions struct { - Versions []*KubernetesVersion `json:"versions,omitempty"` + Versions []*KubernetesVersion `json:"versions,omitempty"` + Regions []*KubernetesRegion `json:"regions,omitempty"` + Sizes []*KubernetesNodeSize `json:"sizes,omitempty"` } // KubernetesVersion is a DigitalOcean Kubernetes release. @@ -144,6 +186,18 @@ type KubernetesVersion struct { KubernetesVersion string `json:"kubernetes_version,omitempty"` } +// KubernetesNodeSize is a node sizes supported for Kubernetes clusters. +type KubernetesNodeSize struct { + Name string `json:"name"` + Slug string `json:"slug"` +} + +// KubernetesRegion is a region usable by Kubernetes clusters. +type KubernetesRegion struct { + Name string `json:"name"` + Slug string `json:"slug"` +} + type kubernetesClustersRoot struct { Clusters []*KubernetesCluster `json:"kubernetes_clusters,omitempty"` Links *Links `json:"links,omitempty"` diff --git a/vendor/github.com/digitalocean/godo/load_balancers.go b/vendor/github.com/digitalocean/godo/load_balancers.go index 1472fff0b..c565e2294 100644 --- a/vendor/github.com/digitalocean/godo/load_balancers.go +++ b/vendor/github.com/digitalocean/godo/load_balancers.go @@ -26,6 +26,7 @@ type LoadBalancersService interface { } // LoadBalancer represents a DigitalOcean load balancer configuration. +// Tags can only be provided upon the creation of a Load Balancer. type LoadBalancer struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` @@ -39,7 +40,10 @@ type LoadBalancer struct { Region *Region `json:"region,omitempty"` DropletIDs []int `json:"droplet_ids,omitempty"` Tag string `json:"tag,omitempty"` + Tags []string `json:"tags,omitempty"` RedirectHttpToHttps bool `json:"redirect_http_to_https,omitempty"` + EnableProxyProtocol bool `json:"enable_proxy_protocol,omitempty"` + VPCUUID string `json:"vpc_uuid,omitempty"` } // String creates a human-readable description of a LoadBalancer. @@ -61,8 +65,11 @@ func (l LoadBalancer) AsRequest() *LoadBalancerRequest { DropletIDs: append([]int(nil), l.DropletIDs...), Tag: l.Tag, RedirectHttpToHttps: l.RedirectHttpToHttps, + EnableProxyProtocol: l.EnableProxyProtocol, HealthCheck: l.HealthCheck, + VPCUUID: l.VPCUUID, } + if l.HealthCheck != nil { r.HealthCheck = &HealthCheck{} *r.HealthCheck = *l.HealthCheck @@ -130,7 +137,10 @@ type LoadBalancerRequest struct { StickySessions *StickySessions `json:"sticky_sessions,omitempty"` DropletIDs []int `json:"droplet_ids,omitempty"` Tag string `json:"tag,omitempty"` + Tags []string `json:"tags,omitempty"` RedirectHttpToHttps bool `json:"redirect_http_to_https,omitempty"` + EnableProxyProtocol bool `json:"enable_proxy_protocol,omitempty"` + VPCUUID string `json:"vpc_uuid,omitempty"` } // String creates a human-readable description of a LoadBalancerRequest. diff --git a/vendor/github.com/digitalocean/godo/projects.go b/vendor/github.com/digitalocean/godo/projects.go index 52291a1e0..f78308cfe 100644 --- a/vendor/github.com/digitalocean/godo/projects.go +++ b/vendor/github.com/digitalocean/godo/projects.go @@ -258,11 +258,11 @@ func (p *ProjectsServiceOp) AssignResources(ctx context.Context, projectID strin } for i, resource := range resources { - switch resource.(type) { + switch resource := resource.(type) { case ResourceWithURN: - ar.Resources[i] = resource.(ResourceWithURN).URN() + ar.Resources[i] = resource.URN() case string: - ar.Resources[i] = resource.(string) + ar.Resources[i] = resource default: return nil, nil, fmt.Errorf("%T must either be a string or have a valid URN method", resource) } diff --git a/vendor/github.com/digitalocean/godo/storage.go b/vendor/github.com/digitalocean/godo/storage.go index a79332a79..88fd8a401 100644 --- a/vendor/github.com/digitalocean/godo/storage.go +++ b/vendor/github.com/digitalocean/godo/storage.go @@ -53,6 +53,7 @@ type Volume struct { CreatedAt time.Time `json:"created_at"` FilesystemType string `json:"filesystem_type"` FilesystemLabel string `json:"filesystem_label"` + Tags []string `json:"tags"` } func (f Volume) String() string { @@ -76,13 +77,14 @@ type storageVolumeRoot struct { // VolumeCreateRequest represents a request to create a block store // volume. type VolumeCreateRequest struct { - Region string `json:"region"` - Name string `json:"name"` - Description string `json:"description"` - SizeGigaBytes int64 `json:"size_gigabytes"` - SnapshotID string `json:"snapshot_id"` - FilesystemType string `json:"filesystem_type"` - FilesystemLabel string `json:"filesystem_label"` + Region string `json:"region"` + Name string `json:"name"` + Description string `json:"description"` + SizeGigaBytes int64 `json:"size_gigabytes"` + SnapshotID string `json:"snapshot_id"` + FilesystemType string `json:"filesystem_type"` + FilesystemLabel string `json:"filesystem_label"` + Tags []string `json:"tags"` } // ListVolumes lists all storage volumes. diff --git a/vendor/github.com/digitalocean/godo/tags.go b/vendor/github.com/digitalocean/godo/tags.go index 6a9c4dae3..295a2e977 100644 --- a/vendor/github.com/digitalocean/godo/tags.go +++ b/vendor/github.com/digitalocean/godo/tags.go @@ -37,6 +37,10 @@ const ( DropletResourceType ResourceType = "droplet" //ImageResourceType holds the string representing our ResourceType of Image. ImageResourceType ResourceType = "image" + //VolumeResourceType holds the string representing our ResourceType of Volume. + VolumeResourceType ResourceType = "volume" + //LoadBalancerResourceType holds the string representing our ResourceType of LoadBalancer. + LoadBalancerResourceType ResourceType = "load_balancer" ) // Resource represent a single resource for associating/disassociating with tags @@ -51,6 +55,7 @@ type TaggedResources struct { LastTaggedURI string `json:"last_tagged_uri,omitempty"` Droplets *TaggedDropletsResources `json:"droplets,omitempty"` Images *TaggedImagesResources `json:"images"` + Volumes *TaggedVolumesResources `json:"volumes"` } // TaggedDropletsResources represent the droplet resources a tag is attached to @@ -60,12 +65,18 @@ type TaggedDropletsResources struct { LastTaggedURI string `json:"last_tagged_uri,omitempty"` } -// TaggedImagesResources represent the image resources a tag is attached to -type TaggedImagesResources struct { +// TaggedResourcesData represent the generic resources a tag is attached to +type TaggedResourcesData struct { Count int `json:"count,float64,omitempty"` LastTaggedURI string `json:"last_tagged_uri,omitempty"` } +// TaggedImagesResources represent the image resources a tag is attached to +type TaggedImagesResources TaggedResourcesData + +// TaggedVolumesResources represent the volume resources a tag is attached to +type TaggedVolumesResources TaggedResourcesData + // Tag represent DigitalOcean tag type Tag struct { Name string `json:"name,omitempty"` diff --git a/vendor/github.com/digitalocean/godo/vpcs.go b/vendor/github.com/digitalocean/godo/vpcs.go new file mode 100644 index 000000000..24752d373 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/vpcs.go @@ -0,0 +1,183 @@ +package godo + +import ( + "context" + "net/http" + "time" +) + +const vpcsBasePath = "/v2/vpcs" + +// VPCsService is an interface for managing Virtual Private Cloud configurations with the +// DigitalOcean API. +// See: https://developers.digitalocean.com/documentation/v2#vpcs +type VPCsService interface { + Create(context.Context, *VPCCreateRequest) (*VPC, *Response, error) + Get(context.Context, string) (*VPC, *Response, error) + List(context.Context, *ListOptions) ([]*VPC, *Response, error) + Update(context.Context, string, *VPCUpdateRequest) (*VPC, *Response, error) + Set(context.Context, string, ...VPCSetField) (*VPC, *Response, error) + Delete(context.Context, string) (*Response, error) +} + +var _ VPCsService = &VPCsServiceOp{} + +// VPCsServiceOp interfaces with VPC endpoints in the DigitalOcean API. +type VPCsServiceOp struct { + client *Client +} + +// VPCCreateRequest represents a request to create a Virtual Private Cloud. +type VPCCreateRequest struct { + Name string `json:"name,omitempty"` + RegionSlug string `json:"region,omitempty"` +} + +// VPCUpdateRequest represents a request to update a Virtual Private Cloud. +type VPCUpdateRequest struct { + Name string `json:"name,omitempty"` +} + +// VPCSetField allows one to set individual fields within a VPC configuration. +type VPCSetField interface { + vpcSetField(map[string]interface{}) +} + +// VPCSetName is used when one want to set the `name` field of a VPC. +// Ex.: VPCs.Set(..., VPCSetName("new-name")) +type VPCSetName string + +// VPC represents a DigitalOcean Virtual Private Cloud configuration. +type VPC struct { + ID string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + RegionSlug string `json:"region,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` + Default bool `json:"default,omitempty"` +} + +type vpcRoot struct { + VPC *VPC `json:"vpc"` +} + +type vpcsRoot struct { + VPCs []*VPC `json:"vpcs"` + Links *Links `json:"links"` +} + +// Get returns the details of a Virtual Private Cloud. +func (v *VPCsServiceOp) Get(ctx context.Context, id string) (*VPC, *Response, error) { + path := vpcsBasePath + "/" + id + req, err := v.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + + root := new(vpcRoot) + resp, err := v.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + + return root.VPC, resp, nil +} + +// Create creates a new Virtual Private Cloud. +func (v *VPCsServiceOp) Create(ctx context.Context, create *VPCCreateRequest) (*VPC, *Response, error) { + path := vpcsBasePath + req, err := v.client.NewRequest(ctx, http.MethodPost, path, create) + if err != nil { + return nil, nil, err + } + + root := new(vpcRoot) + resp, err := v.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + + return root.VPC, resp, nil +} + +// List returns a list of the caller's VPCs, with optional pagination. +func (v *VPCsServiceOp) List(ctx context.Context, opt *ListOptions) ([]*VPC, *Response, error) { + path, err := addOptions(vpcsBasePath, opt) + if err != nil { + return nil, nil, err + } + req, err := v.client.NewRequest(ctx, http.MethodGet, path, nil) + if err != nil { + return nil, nil, err + } + + root := new(vpcsRoot) + resp, err := v.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + if l := root.Links; l != nil { + resp.Links = l + } + + return root.VPCs, resp, nil +} + +// Update updates a Virtual Private Cloud's properties. +func (v *VPCsServiceOp) Update(ctx context.Context, id string, update *VPCUpdateRequest) (*VPC, *Response, error) { + path := vpcsBasePath + "/" + id + req, err := v.client.NewRequest(ctx, http.MethodPut, path, update) + if err != nil { + return nil, nil, err + } + + root := new(vpcRoot) + resp, err := v.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + + return root.VPC, resp, nil +} + +func (n VPCSetName) vpcSetField(in map[string]interface{}) { + in["name"] = n +} + +// Set updates specific properties of a Virtual Private Cloud. +func (v *VPCsServiceOp) Set(ctx context.Context, id string, fields ...VPCSetField) (*VPC, *Response, error) { + path := vpcsBasePath + "/" + id + update := make(map[string]interface{}, len(fields)) + for _, field := range fields { + field.vpcSetField(update) + } + + req, err := v.client.NewRequest(ctx, http.MethodPatch, path, update) + if err != nil { + return nil, nil, err + } + + root := new(vpcRoot) + resp, err := v.client.Do(ctx, req, root) + if err != nil { + return nil, resp, err + } + + return root.VPC, resp, nil +} + +// Delete deletes a Virtual Private Cloud. There is no way to recover a VPC once it has been +// destroyed. +func (v *VPCsServiceOp) Delete(ctx context.Context, id string) (*Response, error) { + path := vpcsBasePath + "/" + id + req, err := v.client.NewRequest(ctx, http.MethodDelete, path, nil) + if err != nil { + return nil, err + } + + resp, err := v.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + + return resp, nil +} diff --git a/vendor/github.com/docker/docker/AUTHORS b/vendor/github.com/docker/docker/AUTHORS new file mode 100644 index 000000000..c5dafd722 --- /dev/null +++ b/vendor/github.com/docker/docker/AUTHORS @@ -0,0 +1,1952 @@ +# This file lists all individuals having contributed content to the repository. +# For how it is generated, see `hack/generate-authors.sh`. + +Aanand Prasad +Aaron Davidson +Aaron Feng +Aaron Huslage +Aaron L. Xu +Aaron Lehmann +Aaron Welch +Aaron.L.Xu +Abel Muiño +Abhijeet Kasurde +Abhinandan Prativadi +Abhinav Ajgaonkar +Abhishek Chanda +Abhishek Sharma +Abin Shahab +Adam Avilla +Adam Eijdenberg +Adam Kunk +Adam Miller +Adam Mills +Adam Pointer +Adam Singer +Adam Walz +Addam Hardy +Aditi Rajagopal +Aditya +Adnan Khan +Adolfo Ochagavía +Adria Casas +Adrian Moisey +Adrian Mouat +Adrian Oprea +Adrien Folie +Adrien Gallouët +Ahmed Kamal +Ahmet Alp Balkan +Aidan Feldman +Aidan Hobson Sayers +AJ Bowen +Ajey Charantimath +ajneu +Akash Gupta +Akihiro Matsushima +Akihiro Suda +Akim Demaille +Akira Koyasu +Akshay Karle +Al Tobey +alambike +Alan Scherger +Alan Thompson +Albert Callarisa +Albert Zhang +Aleksa Sarai +Aleksandrs Fadins +Alena Prokharchyk +Alessandro Boch +Alessio Biancalana +Alex Chan +Alex Chen +Alex Coventry +Alex Crawford +Alex Ellis +Alex Gaynor +Alex Olshansky +Alex Samorukov +Alex Warhawk +Alexander Artemenko +Alexander Boyd +Alexander Larsson +Alexander Midlash +Alexander Morozov +Alexander Shopov +Alexandre Beslic +Alexandre Garnier +Alexandre González +Alexandru Sfirlogea +Alexey Guskov +Alexey Kotlyarov +Alexey Shamrin +Alexis THOMAS +Alfred Landrum +Ali Dehghani +Alicia Lauerman +Alihan Demir +Allen Madsen +Allen Sun +almoehi +Alvaro Saurin +Alvin Deng +Alvin Richards +amangoel +Amen Belayneh +Amir Goldstein +Amit Bakshi +Amit Krishnan +Amit Shukla +Amy Lindburg +Anand Patil +AnandkumarPatel +Anatoly Borodin +Anchal Agrawal +Anders Janmyr +Andre Dublin <81dublin@gmail.com> +Andre Granovsky +Andrea Luzzardi +Andrea Turli +Andreas Elvers +Andreas Köhler +Andreas Savvides +Andreas Tiefenthaler +Andrei Gherzan +Andrew C. Bodine +Andrew Clay Shafer +Andrew Duckworth +Andrew France +Andrew Gerrand +Andrew Guenther +Andrew He +Andrew Hsu +Andrew Kuklewicz +Andrew Macgregor +Andrew Macpherson +Andrew Martin +Andrew McDonnell +Andrew Munsell +Andrew Pennebaker +Andrew Po +Andrew Weiss +Andrew Williams +Andrews Medina +Andrey Petrov +Andrey Stolbovsky +André Martins +andy +Andy Chambers +andy diller +Andy Goldstein +Andy Kipp +Andy Rothfusz +Andy Smith +Andy Wilson +Anes Hasicic +Anil Belur +Anil Madhavapeddy +Ankush Agarwal +Anonmily +Anran Qiao +Anshul Pundir +Anthon van der Neut +Anthony Baire +Anthony Bishopric +Anthony Dahanne +Anthony Sottile +Anton Löfgren +Anton Nikitin +Anton Polonskiy +Anton Tiurin +Antonio Murdaca +Antonis Kalipetis +Antony Messerli +Anuj Bahuguna +Anusha Ragunathan +apocas +Arash Deshmeh +ArikaChen +Arnaud Lefebvre +Arnaud Porterie +Arthur Barr +Arthur Gautier +Artur Meyster +Arun Gupta +Asad Saeeduddin +Asbjørn Enge +averagehuman +Avi Das +Avi Miller +Avi Vaid +ayoshitake +Azat Khuyiyakhmetov +Bardia Keyoumarsi +Barnaby Gray +Barry Allard +Bartłomiej Piotrowski +Bastiaan Bakker +bdevloed +Ben Bonnefoy +Ben Firshman +Ben Golub +Ben Hall +Ben Sargent +Ben Severson +Ben Toews +Ben Wiklund +Benjamin Atkin +Benjamin Boudreau +Benoit Chesneau +Bernerd Schaefer +Bernhard M. Wiedemann +Bert Goethals +Bharath Thiruveedula +Bhiraj Butala +Bhumika Bayani +Bilal Amarni +Bill Wang +Bin Liu +Bingshen Wang +Blake Geno +Boaz Shuster +bobby abbott +Boris Pruessmann +Boshi Lian +Bouke Haarsma +Boyd Hemphill +boynux +Bradley Cicenas +Bradley Wright +Brandon Liu +Brandon Philips +Brandon Rhodes +Brendan Dixon +Brent Salisbury +Brett Higgins +Brett Kochendorfer +Brett Randall +Brian (bex) Exelbierd +Brian Bland +Brian DeHamer +Brian Dorsey +Brian Flad +Brian Goff +Brian McCallister +Brian Olsen +Brian Schwind +Brian Shumate +Brian Torres-Gil +Brian Trump +Brice Jaglin +Briehan Lombaard +Bruno Bigras +Bruno Binet +Bruno Gazzera +Bruno Renié +Bruno Tavares +Bryan Bess +Bryan Boreham +Bryan Matsuo +Bryan Murphy +Burke Libbey +Byung Kang +Caleb Spare +Calen Pennington +Cameron Boehmer +Cameron Spear +Campbell Allen +Candid Dauth +Cao Weiwei +Carl Henrik Lunde +Carl Loa Odin +Carl X. Su +Carlo Mion +Carlos Alexandro Becker +Carlos Sanchez +Carol Fager-Higgins +Cary +Casey Bisson +Ce Gao +Cedric Davies +Cezar Sa Espinola +Chad Swenson +Chance Zibolski +Chander Govindarajan +Chanhun Jeong +Chao Wang +Charles Chan +Charles Hooper +Charles Law +Charles Lindsay +Charles Merriam +Charles Sarrazin +Charles Smith +Charlie Drage +Charlie Lewis +Chase Bolt +ChaYoung You +Chen Chao +Chen Chuanliang +Chen Hanxiao +Chen Min +Chen Mingjie +Chen Qiu +Cheng-mean Liu +Chetan Birajdar +Chewey +Chia-liang Kao +chli +Cholerae Hu +Chris Alfonso +Chris Armstrong +Chris Dias +Chris Dituri +Chris Fordham +Chris Gavin +Chris Gibson +Chris Khoo +Chris McKinnel +Chris McKinnel +Chris Seto +Chris Snow +Chris St. Pierre +Chris Stivers +Chris Swan +Chris Wahl +Chris Weyl +Christian Berendt +Christian Brauner +Christian Böhme +Christian Persson +Christian Rotzoll +Christian Simon +Christian Stefanescu +Christophe Mehay +Christophe Troestler +Christophe Vidal +Christopher Biscardi +Christopher Crone +Christopher Currie +Christopher Jones +Christopher Latham +Christopher Rigor +Christy Perez +Chun Chen +Ciro S. Costa +Clayton Coleman +Clinton Kitson +Coenraad Loubser +Colin Dunklau +Colin Hebert +Colin Rice +Colin Walters +Collin Guarino +Colm Hally +companycy +Corbin Coleman +Corey Farrell +Cory Forsyth +cressie176 +CrimsonGlory +Cristian Staretu +cristiano balducci +Cruceru Calin-Cristian +CUI Wei +Cyprian Gracz +Cyril F +Daan van Berkel +Daehyeok Mun +Dafydd Crosby +dalanlan +Damian Smyth +Damien Nadé +Damien Nozay +Damjan Georgievski +Dan Anolik +Dan Buch +Dan Cotora +Dan Feldman +Dan Griffin +Dan Hirsch +Dan Keder +Dan Levy +Dan McPherson +Dan Stine +Dan Williams +Dani Louca +Daniel Antlinger +Daniel Dao +Daniel Exner +Daniel Farrell +Daniel Garcia +Daniel Gasienica +Daniel Grunwell +Daniel Hiltgen +Daniel J Walsh +Daniel Menet +Daniel Mizyrycki +Daniel Nephin +Daniel Norberg +Daniel Nordberg +Daniel Robinson +Daniel S +Daniel Von Fange +Daniel Watkins +Daniel X Moore +Daniel YC Lin +Daniel Zhang +Danny Berger +Danny Yates +Danyal Khaliq +Darren Coxall +Darren Shepherd +Darren Stahl +Dattatraya Kumbhar +Davanum Srinivas +Dave Barboza +Dave Goodchild +Dave Henderson +Dave MacDonald +Dave Tucker +David Anderson +David Calavera +David Corking +David Cramer +David Currie +David Davis +David Dooling +David Gageot +David Gebler +David Glasser +David Lawrence +David Lechner +David M. Karr +David Mackey +David Mat +David Mcanulty +David McKay +David Pelaez +David R. Jenni +David Röthlisberger +David Sheets +David Sissitka +David Trott +David Williamson +David Xia +David Young +Davide Ceretti +Dawn Chen +dbdd +dcylabs +Deborah Gertrude Digges +deed02392 +Deng Guangxing +Deni Bertovic +Denis Defreyne +Denis Gladkikh +Denis Ollier +Dennis Chen +Dennis Chen +Dennis Docter +Derek +Derek +Derek Ch +Derek McGowan +Deric Crago +Deshi Xiao +devmeyster +Devvyn Murphy +Dharmit Shah +Dhawal Yogesh Bhanushali +Diego Romero +Diego Siqueira +Dieter Reuter +Dillon Dixon +Dima Stopel +Dimitri John Ledkov +Dimitris Rozakis +Dimitry Andric +Dinesh Subhraveti +Ding Fei +Diogo Monica +DiuDiugirl +Djibril Koné +dkumor +Dmitri Logvinenko +Dmitri Shuralyov +Dmitry Demeshchuk +Dmitry Gusev +Dmitry Kononenko +Dmitry Shyshkin +Dmitry Smirnov +Dmitry V. Krivenok +Dmitry Vorobev +Dolph Mathews +Dominik Dingel +Dominik Finkbeiner +Dominik Honnef +Don Kirkby +Don Kjer +Don Spaulding +Donald Huang +Dong Chen +Donovan Jones +Doron Podoleanu +Doug Davis +Doug MacEachern +Doug Tangren +Douglas Curtis +Dr Nic Williams +dragon788 +Dražen Lučanin +Drew Erny +Drew Hubl +Dustin Sallings +Ed Costello +Edmund Wagner +Eiichi Tsukata +Eike Herzbach +Eivin Giske Skaaren +Eivind Uggedal +Elan Ruusamäe +Elena Morozova +Eli Uriegas +Elias Faxö +Elias Probst +Elijah Zupancic +eluck +Elvir Kuric +Emil Davtyan +Emil Hernvall +Emily Maier +Emily Rose +Emir Ozer +Enguerran +Eohyung Lee +epeterso +Eric Barch +Eric Curtin +Eric G. Noriega +Eric Hanchrow +Eric Lee +Eric Myhre +Eric Paris +Eric Rafaloff +Eric Rosenberg +Eric Sage +Eric Soderstrom +Eric Yang +Eric-Olivier Lamey +Erica Windisch +Erik Bray +Erik Dubbelboer +Erik Hollensbe +Erik Inge Bolsø +Erik Kristensen +Erik St. Martin +Erik Weathers +Erno Hopearuoho +Erwin van der Koogh +Euan Kemp +Eugen Krizo +Eugene Yakubovich +Evan Allrich +Evan Carmi +Evan Hazlett +Evan Krall +Evan Phoenix +Evan Wies +Evelyn Xu +Everett Toews +Evgeny Shmarnev +Evgeny Vereshchagin +Ewa Czechowska +Eystein Måløy Stenberg +ezbercih +Ezra Silvera +Fabian Lauer +Fabiano Rosas +Fabio Falci +Fabio Kung +Fabio Rapposelli +Fabio Rehm +Fabrizio Regini +Fabrizio Soppelsa +Faiz Khan +falmp +Fangyuan Gao <21551127@zju.edu.cn> +Fareed Dudhia +Fathi Boudra +Federico Gimenez +Felipe Oliveira +Felix Abecassis +Felix Geisendörfer +Felix Hupfeld +Felix Rabe +Felix Ruess +Felix Schindler +Feng Yan +Fengtu Wang +Ferenc Szabo +Fernando +Fero Volar +Ferran Rodenas +Filipe Brandenburger +Filipe Oliveira +Flavio Castelli +Flavio Crisciani +Florian +Florian Klein +Florian Maier +Florian Noeding +Florian Weingarten +Florin Asavoaie +Florin Patan +fonglh +Foysal Iqbal +Francesc Campoy +Francis Chuang +Francisco Carriedo +Francisco Souza +Frank Groeneveld +Frank Herrmann +Frank Macreery +Frank Rosquin +Fred Lifton +Frederick F. Kautz IV +Frederik Loeffert +Frederik Nordahl Jul Sabroe +Freek Kalter +Frieder Bluemle +Félix Baylac-Jacqué +Félix Cantournet +Gabe Rosenhouse +Gabor Nagy +Gabriel Linder +Gabriel Monroy +Gabriel Nicolas Avellaneda +Gaetan de Villele +Galen Sampson +Gang Qiao +Gareth Rushgrove +Garrett Barboza +Gary Schaetz +Gaurav +gautam, prasanna +Gaël PORTAY +Genki Takiuchi +GennadySpb +Geoffrey Bachelet +George Kontridze +George MacRorie +George Xie +Georgi Hristozov +Gereon Frey +German DZ +Gert van Valkenhoef +Gerwim Feiken +Ghislain Bourgeois +Giampaolo Mancini +Gianluca Borello +Gildas Cuisinier +gissehel +Giuseppe Mazzotta +Gleb Fotengauer-Malinovskiy +Gleb M Borisov +Glyn Normington +GoBella +Goffert van Gool +Gopikannan Venugopalsamy +Gosuke Miyashita +Gou Rao +Govinda Fichtner +Grant Reaber +Graydon Hoare +Greg Fausak +Greg Pflaum +Greg Stephens +Greg Thornton +Grzegorz Jaśkiewicz +Guilhem Lettron +Guilherme Salgado +Guillaume Dufour +Guillaume J. Charmes +guoxiuyan +Gurjeet Singh +Guruprasad +Gustav Sinder +gwx296173 +Günter Zöchbauer +Hakan Özler +Hans Kristian Flaatten +Hans Rødtang +Hao Shu Wei +Hao Zhang <21521210@zju.edu.cn> +Harald Albers +Harley Laue +Harold Cooper +Harry Zhang +Harshal Patil +Harshal Patil +He Simei +He Xiaoxi +He Xin +heartlock <21521209@zju.edu.cn> +Hector Castro +Helen Xie +Henning Sprang +Hobofan +Hollie Teal +Hong Xu +Hongbin Lu +hsinko <21551195@zju.edu.cn> +Hu Keping +Hu Tao +Huanzhong Zhang +Huayi Zhang +Hugo Duncan +Hugo Marisco <0x6875676f@gmail.com> +Hunter Blanks +huqun +Huu Nguyen +hyeongkyu.lee +Hyzhou Zhy +Iago López Galeiras +Ian Babrou +Ian Bishop +Ian Bull +Ian Calvert +Ian Campbell +Ian Lee +Ian Main +Ian Philpot +Ian Truslove +Iavael +Icaro Seara +Ignacio Capurro +Igor Dolzhikov +Igor Karpovich +Iliana Weller +Ilkka Laukkanen +Ilya Dmitrichenko +Ilya Gusev +Ilya Khlopotov +imre Fitos +inglesp +Ingo Gottwald +Isaac Dupree +Isabel Jimenez +Isao Jonas +Ivan Babrou +Ivan Fraixedes +Ivan Grcic +Ivan Markin +J Bruni +J. Nunn +Jack Danger Canty +Jack Laxson +Jacob Atzen +Jacob Edelman +Jacob Tomlinson +Jacob Vallejo +Jacob Wen +Jaivish Kothari +Jake Champlin +Jake Moshenko +Jake Sanders +jakedt +James Allen +James Carey +James Carr +James DeFelice +James Harrison Fisher +James Kyburz +James Kyle +James Lal +James Mills +James Nesbitt +James Nugent +James Turnbull +Jamie Hannaford +Jamshid Afshar +Jan Keromnes +Jan Koprowski +Jan Pazdziora +Jan Toebes +Jan-Gerd Tenberge +Jan-Jaap Driessen +Jana Radhakrishnan +Jannick Fahlbusch +Januar Wayong +Jared Biel +Jared Hocutt +Jaroslaw Zabiello +jaseg +Jasmine Hegman +Jason Divock +Jason Giedymin +Jason Green +Jason Hall +Jason Heiss +Jason Livesay +Jason McVetta +Jason Plum +Jason Shepherd +Jason Smith +Jason Sommer +Jason Stangroome +jaxgeller +Jay +Jay +Jay Kamat +Jean-Baptiste Barth +Jean-Baptiste Dalido +Jean-Christophe Berthon +Jean-Paul Calderone +Jean-Pierre Huynh +Jean-Tiare Le Bigot +Jeeva S. Chelladhurai +Jeff Anderson +Jeff Johnston +Jeff Lindsay +Jeff Mickey +Jeff Minard +Jeff Nickoloff +Jeff Silberman +Jeff Welch +Jeffrey Bolle +Jeffrey Morgan +Jeffrey van Gogh +Jenny Gebske +Jeremy Chambers +Jeremy Grosser +Jeremy Price +Jeremy Qian +Jeremy Unruh +Jeremy Yallop +Jeroen Franse +Jeroen Jacobs +Jesse Dearing +Jesse Dubay +Jessica Frazelle +Jezeniel Zapanta +Jhon Honce +Ji.Zhilong +Jian Zhang +Jie Luo +Jihyun Hwang +Jilles Oldenbeuving +Jim Alateras +Jim Galasyn +Jim Minter +Jim Perrin +Jimmy Cuadra +Jimmy Puckett +Jimmy Song +jimmyxian +Jinsoo Park +Jiri Popelka +Jiuyue Ma +Jiří Župka +jjy +jmzwcn +Joao Fernandes +Joe Beda +Joe Doliner +Joe Ferguson +Joe Gordon +Joe Shaw +Joe Van Dyk +Joel Friedly +Joel Handwell +Joel Hansson +Joel Wurtz +Joey Geiger +Joey Geiger +Joey Gibson +Joffrey F +Johan Euphrosine +Johan Rydberg +Johanan Lieberman +Johannes 'fish' Ziemke +John Costa +John Feminella +John Gardiner Myers +John Gossman +John Harris +John Howard (VM) +John Laswell +John Maguire +John Mulhausen +John OBrien III +John Starks +John Stephens +John Tims +John V. Martinez +John Warwick +John Willis +Jon Johnson +Jon Surrell +Jon Wedaman +Jonas Pfenniger +Jonathan A. Sternberg +Jonathan Boulle +Jonathan Camp +Jonathan Dowland +Jonathan Lebon +Jonathan Lomas +Jonathan McCrohan +Jonathan Mueller +Jonathan Pares +Jonathan Rudenberg +Jonathan Stoppani +Jonh Wendell +Joni Sar +Joost Cassee +Jordan Arentsen +Jordan Jennings +Jordan Sissel +Jorge Marin +Jorit Kleine-Möllhoff +Jose Diaz-Gonzalez +Joseph Anthony Pasquale Holsten +Joseph Hager +Joseph Kern +Joseph Rothrock +Josh +Josh Bodah +Josh Bonczkowski +Josh Chorlton +Josh Eveleth +Josh Hawn +Josh Horwitz +Josh Poimboeuf +Josh Soref +Josh Wilson +Josiah Kiehl +José Tomás Albornoz +Joyce Jang +JP +Julian Taylor +Julien Barbier +Julien Bisconti +Julien Bordellier +Julien Dubois +Julien Kassar +Julien Maitrehenry +Julien Pervillé +Julio Montes +Jun-Ru Chang +Jussi Nummelin +Justas Brazauskas +Justin Cormack +Justin Force +Justin Menga +Justin Plock +Justin Simonelis +Justin Terry +Justyn Temme +Jyrki Puttonen +Jérôme Petazzoni +Jörg Thalheim +K. Heller +Kai Blin +Kai Qiang Wu (Kennan) +Kamil Domański +Kamjar Gerami +Kanstantsin Shautsou +Kara Alexandra +Karan Lyons +Kareem Khazem +kargakis +Karl Grzeszczak +Karol Duleba +Karthik Nayak +Kate Heddleston +Katie McLaughlin +Kato Kazuyoshi +Katrina Owen +Kawsar Saiyeed +Kay Yan +kayrus +Ke Li +Ke Xu +Kei Ohmura +Keith Hudgins +Keli Hu +Ken Cochrane +Ken Herner +Ken ICHIKAWA +Kenfe-Mickaël Laventure +Kenjiro Nakayama +Kent Johnson +Kevin "qwazerty" Houdebert +Kevin Burke +Kevin Clark +Kevin Feyrer +Kevin J. Lynagh +Kevin Jing Qiu +Kevin Kern +Kevin Menard +Kevin Meredith +Kevin P. Kucharczyk +Kevin Richardson +Kevin Shi +Kevin Wallace +Kevin Yap +Keyvan Fatehi +kies +Kim BKC Carlbacker +Kim Eik +Kimbro Staken +Kir Kolyshkin +Kiran Gangadharan +Kirill SIbirev +knappe +Kohei Tsuruta +Koichi Shiraishi +Konrad Kleine +Konstantin Gribov +Konstantin L +Konstantin Pelykh +Krasi Georgiev +Krasimir Georgiev +Kris-Mikael Krister +Kristian Haugene +Kristina Zabunova +krrg +Kun Zhang +Kunal Kushwaha +Kyle Conroy +Kyle Linden +kyu +Lachlan Coote +Lai Jiangshan +Lajos Papp +Lakshan Perera +Lalatendu Mohanty +Lance Chen +Lance Kinley +Lars Butler +Lars Kellogg-Stedman +Lars R. Damerow +Lars-Magnus Skog +Laszlo Meszaros +Laura Frank +Laurent Erignoux +Laurie Voss +Leandro Siqueira +Lee Chao <932819864@qq.com> +Lee, Meng-Han +leeplay +Lei Jitang +Len Weincier +Lennie +Leo Gallucci +Leszek Kowalski +Levi Blackstone +Levi Gross +Lewis Daly +Lewis Marshall +Lewis Peckover +Li Yi +Liam Macgillavry +Liana Lo +Liang Mingqiang +Liang-Chi Hsieh +Liao Qingwei +Lily Guo +limsy +Lin Lu +LingFaKe +Linus Heckemann +Liran Tal +Liron Levin +Liu Bo +Liu Hua +liwenqi +lixiaobing10051267 +Liz Zhang +LIZAO LI +Lizzie Dixon <_@lizzie.io> +Lloyd Dewolf +Lokesh Mandvekar +longliqiang88 <394564827@qq.com> +Lorenz Leutgeb +Lorenzo Fontana +Louis Opter +Luca Favatella +Luca Marturana +Luca Orlandi +Luca-Bogdan Grigorescu +Lucas Chan +Lucas Chi +Lucas Molas +Luciano Mores +Luis Martínez de Bartolomé Izquierdo +Luiz Svoboda +Lukas Waslowski +lukaspustina +Lukasz Zajaczkowski +Luke Marsden +Lyn +Lynda O'Leary +Lénaïc Huard +Ma Müller +Ma Shimiao +Mabin +Madhan Raj Mookkandy +Madhav Puri +Madhu Venugopal +Mageee +Mahesh Tiyyagura +malnick +Malte Janduda +Manfred Touron +Manfred Zabarauskas +Manjunath A Kumatagi +Mansi Nahar +Manuel Meurer +Manuel Woelker +mapk0y +Marc Abramowitz +Marc Kuo +Marc Tamsky +Marcel Edmund Franke +Marcelo Horacio Fortino +Marcelo Salazar +Marco Hennings +Marcus Cobden +Marcus Farkas +Marcus Linke +Marcus Martins +Marcus Ramberg +Marek Goldmann +Marian Marinov +Marianna Tessel +Mario Loriedo +Marius Gundersen +Marius Sturm +Marius Voila +Mark Allen +Mark McGranaghan +Mark McKinstry +Mark Milstein +Mark Oates +Mark Parker +Mark West +Markan Patel +Marko Mikulicic +Marko Tibold +Markus Fix +Markus Kortlang +Martijn Dwars +Martijn van Oosterhout +Martin Honermeyer +Martin Kelly +Martin Mosegaard Amdisen +Martin Redmond +Mary Anthony +Masahito Zembutsu +Masayuki Morita +Mason Malone +Mateusz Sulima +Mathias Monnerville +Mathieu Le Marec - Pasquet +Mathieu Parent +Matt Apperson +Matt Bachmann +Matt Bentley +Matt Haggard +Matt Hoyle +Matt McCormick +Matt Moore +Matt Richardson +Matt Rickard +Matt Robenolt +Matt Schurenko +Matt Williams +Matthew Heon +Matthew Lapworth +Matthew Mayer +Matthew Mosesohn +Matthew Mueller +Matthew Riley +Matthias Klumpp +Matthias Kühnle +Matthias Rampke +Matthieu Hauglustaine +Mauricio Garavaglia +mauriyouth +Max Shytikov +Maxim Fedchyshyn +Maxim Ivanov +Maxim Kulkin +Maxim Treskin +Maxime Petazzoni +Meaglith Ma +meejah +Megan Kostick +Mehul Kar +Mei ChunTao +Mengdi Gao +Mert Yazıcıoğlu +mgniu +Micah Zoltu +Michael A. Smith +Michael Bridgen +Michael Brown +Michael Chiang +Michael Crosby +Michael Currie +Michael Friis +Michael Gorsuch +Michael Grauer +Michael Holzheu +Michael Hudson-Doyle +Michael Huettermann +Michael Irwin +Michael Käufl +Michael Neale +Michael Prokop +Michael Scharf +Michael Spetsiotis +Michael Stapelberg +Michael Steinert +Michael Thies +Michael West +Michal Fojtik +Michal Gebauer +Michal Jemala +Michal Minář +Michal Wieczorek +Michaël Pailloncy +Michał Czeraszkiewicz +Michiel@unhosted +Mickaël FORTUNATO +Miguel Angel Fernández +Miguel Morales +Mihai Borobocea +Mihuleacc Sergiu +Mike Brown +Mike Casas +Mike Chelen +Mike Danese +Mike Dillon +Mike Dougherty +Mike Estes +Mike Gaffney +Mike Goelzer +Mike Leone +Mike MacCana +Mike Naberezny +Mike Snitzer +mikelinjie <294893458@qq.com> +Mikhail Sobolev +Miklos Szegedi +Milind Chawre +Miloslav Trmač +mingqing +Mingzhen Feng +Misty Stanley-Jones +Mitch Capper +Mizuki Urushida +mlarcher +Mohammad Banikazemi +Mohammed Aaqib Ansari +Mohit Soni +Moorthy RS +Morgan Bauer +Morgante Pell +Morgy93 +Morten Siebuhr +Morton Fox +Moysés Borges +mrfly +Mrunal Patel +Muayyad Alsadi +Mustafa Akın +Muthukumar R +Máximo Cuadros +Médi-Rémi Hashim +Nace Oroz +Nahum Shalman +Nakul Pathak +Nalin Dahyabhai +Nan Monnand Deng +Naoki Orii +Natalie Parker +Natanael Copa +Nate Brennand +Nate Eagleson +Nate Jones +Nathan Hsieh +Nathan Kleyn +Nathan LeClaire +Nathan McCauley +Nathan Williams +Naveed Jamil +Neal McBurnett +Neil Horman +Neil Peterson +Nelson Chen +Neyazul Haque +Nghia Tran +Niall O'Higgins +Nicholas E. Rabenau +Nick DeCoursin +Nick Irvine +Nick Parker +Nick Payne +Nick Russo +Nick Stenning +Nick Stinemates +NickrenREN +Nicola Kabar +Nicolas Borboën +Nicolas De Loof +Nicolas Dudebout +Nicolas Goy +Nicolas Kaiser +Nicolas Sterchele +Nicolás Hock Isaza +Nigel Poulton +Nik Nyby +Nikhil Chawla +NikolaMandic +Nikolas Garofil +Nikolay Milovanov +Nirmal Mehta +Nishant Totla +NIWA Hideyuki +Noah Meyerhans +Noah Treuhaft +noducks +Nolan Darilek +nponeccop +Nuutti Kotivuori +nzwsch +O.S. Tezer +objectified +odk- +Oguz Bilgic +Oh Jinkyun +Ohad Schneider +ohmystack +Ole Reifschneider +Oliver Neal +Olivier Gambier +Olle Jonsson +Oriol Francès +Oskar Niburski +Otto Kekäläinen +Ouyang Liduo +Ovidio Mallo +Panagiotis Moustafellos +Paolo G. Giarrusso +Pascal +Pascal Borreli +Pascal Hartig +Patrick Böänziger +Patrick Devine +Patrick Hemmer +Patrick Stapleton +pattichen +Paul +paul +Paul Annesley +Paul Bellamy +Paul Bowsher +Paul Furtado +Paul Hammond +Paul Jimenez +Paul Kehrer +Paul Lietar +Paul Liljenberg +Paul Morie +Paul Nasrat +Paul Weaver +Paulo Ribeiro +Pavel Lobashov +Pavel Pletenev +Pavel Pospisil +Pavel Sutyrin +Pavel Tikhomirov +Pavlos Ratis +Pavol Vargovcik +Pawel Konczalski +Peeyush Gupta +Peggy Li +Pei Su +Peng Tao +Penghan Wang +Per Weijnitz +perhapszzy@sina.com +Peter Bourgon +Peter Braden +Peter Bücker +Peter Choi +Peter Dave Hello +Peter Edge +Peter Ericson +Peter Esbensen +Peter Jaffe +Peter Malmgren +Peter Salvatore +Peter Volpe +Peter Waller +Petr Švihlík +Phil +Phil Estes +Phil Spitler +Philip Alexander Etling +Philip Monroe +Philipp Gillé +Philipp Wahala +Philipp Weissensteiner +Phillip Alexander +phineas +pidster +Piergiuliano Bossi +Pierre +Pierre Carrier +Pierre Dal-Pra +Pierre Wacrenier +Pierre-Alain RIVIERE +Piotr Bogdan +pixelistik +Porjo +Poul Kjeldager Sørensen +Pradeep Chhetri +Pradip Dhara +Prasanna Gautam +Pratik Karki +Prayag Verma +Przemek Hejman +Pure White +pysqz +Qiang Huang +Qinglan Peng +qudongfang +Quentin Brossard +Quentin Perez +Quentin Tayssier +r0n22 +Rafal Jeczalik +Rafe Colton +Raghavendra K T +Raghuram Devarakonda +Raja Sami +Rajat Pandit +Rajdeep Dua +Ralf Sippl +Ralle +Ralph Bean +Ramkumar Ramachandra +Ramon Brooker +Ramon van Alteren +Ray Tsang +ReadmeCritic +Recursive Madman +Reficul +Regan McCooey +Remi Rampin +Remy Suen +Renato Riccieri Santos Zannon +Renaud Gaubert +Rhys Hiltner +Ri Xu +Ricardo N Feliciano +Rich Moyse +Rich Seymour +Richard +Richard Burnison +Richard Harvey +Richard Mathie +Richard Metzler +Richard Scothern +Richo Healey +Rick Bradley +Rick van de Loo +Rick Wieman +Rik Nijessen +Riku Voipio +Riley Guerin +Ritesh H Shukla +Riyaz Faizullabhoy +Rob Vesse +Robert Bachmann +Robert Bittle +Robert Obryk +Robert Schneider +Robert Stern +Robert Terhaar +Robert Wallis +Roberto G. Hashioka +Roberto Muñoz Fernández +Robin Naundorf +Robin Schneider +Robin Speekenbrink +robpc +Rodolfo Carvalho +Rodrigo Vaz +Roel Van Nyen +Roger Peppe +Rohit Jnagal +Rohit Kadam +Rojin George +Roland Huß +Roland Kammerer +Roland Moriz +Roma Sokolov +Roman Dudin +Roman Strashkin +Ron Smits +Ron Williams +root +root +root +root +Rory Hunter +Rory McCune +Ross Boucher +Rovanion Luckey +Royce Remer +Rozhnov Alexandr +Rudolph Gottesheim +Rui Lopes +Runshen Zhu +Ryan Abrams +Ryan Anderson +Ryan Aslett +Ryan Belgrave +Ryan Detzel +Ryan Fowler +Ryan Liu +Ryan McLaughlin +Ryan O'Donnell +Ryan Seto +Ryan Simmen +Ryan Stelly +Ryan Thomas +Ryan Trauntvein +Ryan Wallner +Ryan Zhang +ryancooper7 +RyanDeng +Rémy Greinhofer +s. rannou +s00318865 +Sabin Basyal +Sachin Joshi +Sagar Hani +Sainath Grandhi +Sakeven Jiang +Sally O'Malley +Sam Abed +Sam Alba +Sam Bailey +Sam J Sharpe +Sam Neirinck +Sam Reis +Sam Rijs +Sambuddha Basu +Sami Wagiaalla +Samuel Andaya +Samuel Dion-Girardeau +Samuel Karp +Samuel PHAN +Sandeep Bansal +Sankar சங்கர் +Sanket Saurav +Santhosh Manohar +sapphiredev +Sargun Dhillon +Sascha Andres +Satnam Singh +Satoshi Amemiya +Satoshi Tagomori +Scott Bessler +Scott Collier +Scott Johnston +Scott Stamp +Scott Walls +sdreyesg +Sean Christopherson +Sean Cronin +Sean Lee +Sean McIntyre +Sean OMeara +Sean P. Kane +Sean Rodman +Sebastiaan van Steenis +Sebastiaan van Stijn +Senthil Kumar Selvaraj +Senthil Kumaran +SeongJae Park +Seongyeol Lim +Serge Hallyn +Sergey Alekseev +Sergey Evstifeev +Sergii Kabashniuk +Serhat Gülçiçek +Sevki Hasirci +Shane Canon +Shane da Silva +Shaun Kaasten +shaunol +Shawn Landden +Shawn Siefkas +shawnhe +Shayne Wang +Shekhar Gulati +Sheng Yang +Shengbo Song +Shev Yan +Shih-Yuan Lee +Shijiang Wei +Shijun Qin +Shishir Mahajan +Shoubhik Bose +Shourya Sarcar +shuai-z +Shukui Yang +Shuwei Hao +Sian Lerk Lau +Sidhartha Mani +sidharthamani +Silas Sewell +Silvan Jegen +Simei He +Simon Eskildsen +Simon Ferquel +Simon Leinen +Simon Menke +Simon Taranto +Simon Vikstrom +Sindhu S +Sjoerd Langkemper +Solganik Alexander +Solomon Hykes +Song Gao +Soshi Katsuta +Soulou +Spencer Brown +Spencer Smith +Sridatta Thatipamala +Sridhar Ratnakumar +Srini Brahmaroutu +Srinivasan Srivatsan +Stanislav Bondarenko +Steeve Morin +Stefan Berger +Stefan J. Wernli +Stefan Praszalowicz +Stefan S. +Stefan Scherer +Stefan Staudenmeyer +Stefan Weil +Stephan Spindler +Stephen Crosby +Stephen Day +Stephen Drake +Stephen Rust +Steve Desmond +Steve Dougherty +Steve Durrheimer +Steve Francia +Steve Koch +Steven Burgess +Steven Erenst +Steven Hartland +Steven Iveson +Steven Merrill +Steven Richards +Steven Taylor +Subhajit Ghosh +Sujith Haridasan +Sun Gengze <690388648@qq.com> +Sun Jianbo +Sunny Gogoi +Suryakumar Sudar +Sven Dowideit +Swapnil Daingade +Sylvain Baubeau +Sylvain Bellemare +Sébastien +Sébastien HOUZÉ +Sébastien Luttringer +Sébastien Stormacq +Tabakhase +Tadej Janež +TAGOMORI Satoshi +tang0th +Tangi Colin +Tatsuki Sugiura +Tatsushi Inagaki +Taylor Jones +tbonza +Ted M. Young +Tehmasp Chaudhri +Tejesh Mehta +terryding77 <550147740@qq.com> +tgic +Thatcher Peskens +theadactyl +Thell 'Bo' Fowler +Thermionix +Thijs Terlouw +Thomas Bikeev +Thomas Frössman +Thomas Gazagnaire +Thomas Grainger +Thomas Hansen +Thomas Leonard +Thomas Léveil +Thomas Orozco +Thomas Riccardi +Thomas Schroeter +Thomas Sjögren +Thomas Swift +Thomas Tanaka +Thomas Texier +Ti Zhou +Tianon Gravi +Tianyi Wang +Tibor Vass +Tiffany Jernigan +Tiffany Low +Tim Bart +Tim Bosse +Tim Dettrick +Tim Düsterhus +Tim Hockin +Tim Potter +Tim Ruffles +Tim Smith +Tim Terhorst +Tim Wang +Tim Waugh +Tim Wraight +Tim Zju <21651152@zju.edu.cn> +timfeirg +Timothy Hobbs +tjwebb123 +tobe +Tobias Bieniek +Tobias Bradtke +Tobias Gesellchen +Tobias Klauser +Tobias Munk +Tobias Schmidt +Tobias Schwab +Todd Crane +Todd Lunter +Todd Whiteman +Toli Kuznets +Tom Barlow +Tom Booth +Tom Denham +Tom Fotherby +Tom Howe +Tom Hulihan +Tom Maaswinkel +Tom Sweeney +Tom Wilkie +Tom X. Tobin +Tomas Tomecek +Tomasz Kopczynski +Tomasz Lipinski +Tomasz Nurkiewicz +Tommaso Visconti +Tomáš Hrčka +Tonny Xu +Tony Abboud +Tony Daws +Tony Miller +toogley +Torstein Husebø +Tõnis Tiigi +tpng +tracylihui <793912329@qq.com> +Trapier Marshall +Travis Cline +Travis Thieman +Trent Ogren +Trevor +Trevor Pounds +Trevor Sullivan +Trishna Guha +Tristan Carel +Troy Denton +Tycho Andersen +Tyler Brock +Tzu-Jung Lee +uhayate +Ulysse Carion +Umesh Yadav +Utz Bacher +vagrant +Vaidas Jablonskis +vanderliang +Veres Lajos +Victor Algaze +Victor Coisne +Victor Costan +Victor I. Wood +Victor Lyuboslavsky +Victor Marmol +Victor Palma +Victor Vieux +Victoria Bialas +Vijaya Kumar K +Viktor Stanchev +Viktor Vojnovski +VinayRaghavanKS +Vincent Batts +Vincent Bernat +Vincent Demeester +Vincent Giersch +Vincent Mayers +Vincent Woo +Vinod Kulkarni +Vishal Doshi +Vishnu Kannan +Vitaly Ostrosablin +Vitor Monteiro +Vivek Agarwal +Vivek Dasgupta +Vivek Goyal +Vladimir Bulyga +Vladimir Kirillov +Vladimir Pouzanov +Vladimir Rutsky +Vladimir Varankin +VladimirAus +Vlastimil Zeman +Vojtech Vitek (V-Teq) +waitingkuo +Walter Leibbrandt +Walter Stanish +Wang Chao +Wang Guoliang +Wang Jie +Wang Long +Wang Ping +Wang Xing +Wang Yuexiao +Ward Vandewege +WarheadsSE +Wayne Chang +Wayne Song +Weerasak Chongnguluam +Wei Wu +Wei-Ting Kuo +weiyan +Weiyang Zhu +Wen Cheng Ma +Wendel Fleming +Wenjun Tang +Wenkai Yin +Wentao Zhang +Wenxuan Zhao +Wenyu You <21551128@zju.edu.cn> +Wenzhi Liang +Wes Morgan +Wewang Xiaorenfine +Will Dietz +Will Rouesnel +Will Weaver +willhf +William Delanoue +William Henry +William Hubbs +William Martin +William Riancho +William Thurston +WiseTrem +Wolfgang Powisch +Wonjun Kim +xamyzhao +Xianglin Gao +Xianlu Bird +XiaoBing Jiang +Xiaoxu Chen +Xiaoyu Zhang +xiekeyang +Xinbo Weng +Xinzi Zhou +Xiuming Chen +Xuecong Liao +xuzhaokui +Yahya +YAMADA Tsuyoshi +Yamasaki Masahide +Yan Feng +Yang Bai +Yang Pengfei +yangchenliang +Yanqiang Miao +Yao Zaiyong +Yassine Tijani +Yasunori Mahata +Yazhong Liu +Yestin Sun +Yi EungJun +Yibai Zhang +Yihang Ho +Ying Li +Yohei Ueda +Yong Tang +Yongzhi Pan +Yosef Fertel +You-Sheng Yang (楊有勝) +Youcef YEKHLEF +Yu Changchun +Yu Chengxia +Yu Peng +Yu-Ju Hong +Yuan Sun +Yuanhong Peng +Yuhao Fang +Yunxiang Huang +Yurii Rashkovskii +Yves Junqueira +Zac Dover +Zach Borboa +Zachary Jaffee +Zain Memon +Zaiste! +Zane DeGraffenried +Zefan Li +Zen Lin(Zhinan Lin) +Zhang Kun +Zhang Wei +Zhang Wentao +ZhangHang +zhangxianwei +Zhenan Ye <21551168@zju.edu.cn> +zhenghenghuo +Zhenkun Bi +Zhou Hao +Zhu Guihua +Zhu Kunjia +Zhuoyun Wei +Zilin Du +zimbatm +Ziming Dong +ZJUshuaizhou <21551191@zju.edu.cn> +zmarouf +Zoltan Tombol +Zou Yu +zqh +Zuhayr Elahi +Zunayed Ali +Álex González +Álvaro Lázaro +Átila Camurça Alves +尹吉峰 +徐俊杰 +搏通 +黄艳红00139573 diff --git a/vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go b/vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go index d732a4795..d1da8539b 100644 --- a/vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go +++ b/vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go @@ -1,9 +1,8 @@ -package namesgenerator +package namesgenerator // import "github.com/docker/docker/pkg/namesgenerator" import ( "fmt" - - "github.com/docker/docker/pkg/random" + "math/rand" ) var ( @@ -193,6 +192,15 @@ var ( // Subrahmanyan Chandrasekhar - Astrophysicist known for his mathematical theory on different stages and evolution in structures of the stars. He has won nobel prize for physics - https://en.wikipedia.org/wiki/Subrahmanyan_Chandrasekhar "chandrasekhar", + //Sergey Alexeyevich Chaplygin (Russian: Серге́й Алексе́евич Чаплы́гин; April 5, 1869 – October 8, 1942) was a Russian and Soviet physicist, mathematician, and mechanical engineer. He is known for mathematical formulas such as Chaplygin's equation and for a hypothetical substance in cosmology called Chaplygin gas, named after him. https://en.wikipedia.org/wiki/Sergey_Chaplygin + "chaplygin", + + // Asima Chatterjee was an indian organic chemist noted for her research on vinca alkaloids, development of drugs for treatment of epilepsy and malaria - https://en.wikipedia.org/wiki/Asima_Chatterjee + "chatterjee", + + // Pafnuty Chebyshev - Russian mathematitian. He is known fo his works on probability, statistics, mechanics, analytical geometry and number theory https://en.wikipedia.org/wiki/Pafnuty_Chebyshev + "chebyshev", + //Claude Shannon - The father of information theory and founder of digital circuit design theory. (https://en.wikipedia.org/wiki/Claude_Shannon) "shannon", @@ -240,6 +248,9 @@ var ( // Gertrude Elion - American biochemist, pharmacologist and the 1988 recipient of the Nobel Prize in Medicine - https://en.wikipedia.org/wiki/Gertrude_Elion "elion", + // Alexandra Asanovna Elbakyan (Russian: Алекса́ндра Аса́новна Элбакя́н) is a Kazakhstani graduate student, computer programmer, internet pirate in hiding, and the creator of the site Sci-Hub. Nature has listed her in 2016 in the top ten people that mattered in science, and Ars Technica has compared her to Aaron Swartz. - https://en.wikipedia.org/wiki/Alexandra_Elbakyan + "elbakyan", + // Douglas Engelbart gave the mother of all demos: https://en.wikipedia.org/wiki/Douglas_Engelbart "engelbart", @@ -339,9 +350,15 @@ var ( // A. P. J. Abdul Kalam - is an Indian scientist aka Missile Man of India for his work on the development of ballistic missile and launch vehicle technology - https://en.wikipedia.org/wiki/A._P._J._Abdul_Kalam "kalam", + // Sergey Petrovich Kapitsa (Russian: Серге́й Петро́вич Капи́ца; 14 February 1928 – 14 August 2012) was a Russian physicist and demographer. He was best known as host of the popular and long-running Russian scientific TV show, Evident, but Incredible. His father was the Nobel laureate Soviet-era physicist Pyotr Kapitsa, and his brother was the geographer and Antarctic explorer Andrey Kapitsa. - https://en.wikipedia.org/wiki/Sergey_Kapitsa + "kapitsa", + // Susan Kare, created the icons and many of the interface elements for the original Apple Macintosh in the 1980s, and was an original employee of NeXT, working as the Creative Director. https://en.wikipedia.org/wiki/Susan_Kare "kare", + // Mstislav Keldysh - a Soviet scientist in the field of mathematics and mechanics, academician of the USSR Academy of Sciences (1946), President of the USSR Academy of Sciences (1961–1975), three times Hero of Socialist Labor (1956, 1961, 1971), fellow of the Royal Society of Edinburgh (1968). https://en.wikipedia.org/wiki/Mstislav_Keldysh + "keldysh", + // Mary Kenneth Keller, Sister Mary Kenneth Keller became the first American woman to earn a PhD in Computer Science in 1965. https://en.wikipedia.org/wiki/Mary_Kenneth_Keller "keller", @@ -411,6 +428,9 @@ var ( // Kay McNulty - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Kathleen_Antonelli "mcnulty", + // Dmitri Mendeleev - a chemist and inventor. He formulated the Periodic Law, created a farsighted version of the periodic table of elements, and used it to correct the properties of some already discovered elements and also to predict the properties of eight elements yet to be discovered. https://en.wikipedia.org/wiki/Dmitri_Mendeleev + "mendeleev", + // Lise Meitner - Austrian/Swedish physicist who was involved in the discovery of nuclear fission. The element meitnerium is named after her - https://en.wikipedia.org/wiki/Lise_Meitner "meitner", @@ -477,6 +497,9 @@ var ( // Laura Poitras is a director and producer whose work, made possible by open source crypto tools, advances the causes of truth and freedom of information by reporting disclosures by whistleblowers such as Edward Snowden. https://en.wikipedia.org/wiki/Laura_Poitras "poitras", + // Tat’yana Avenirovna Proskuriakova (Russian: Татья́на Авени́ровна Проскуряко́ва) (January 23 [O.S. January 10] 1909 – August 30, 1985) was a Russian-American Mayanist scholar and archaeologist who contributed significantly to the deciphering of Maya hieroglyphs, the writing system of the pre-Columbian Maya civilization of Mesoamerica. https://en.wikipedia.org/wiki/Tatiana_Proskouriakoff + "proskuriakova", + // Claudius Ptolemy - a Greco-Egyptian writer of Alexandria, known as a mathematician, astronomer, geographer, astrologer, and poet of a single epigram in the Greek Anthology - https://en.wikipedia.org/wiki/Ptolemy "ptolemy", @@ -528,6 +551,9 @@ var ( // Richard Matthew Stallman - the founder of the Free Software movement, the GNU project, the Free Software Foundation, and the League for Programming Freedom. He also invented the concept of copyleft to protect the ideals of this movement, and enshrined this concept in the widely-used GPL (General Public License) for software. https://en.wikiquote.org/wiki/Richard_Stallman "stallman", + // Lina Solomonovna Stern (or Shtern; Russian: Лина Соломоновна Штерн; 26 August 1878 – 7 March 1968) was a Soviet biochemist, physiologist and humanist whose medical discoveries saved thousands of lives at the fronts of World War II. She is best known for her pioneering work on blood–brain barrier, which she described as hemato-encephalic barrier in 1921. https://en.wikipedia.org/wiki/Lina_Stern + "shtern", + // Michael Stonebraker is a database research pioneer and architect of Ingres, Postgres, VoltDB and SciDB. Winner of 2014 ACM Turing Award. https://en.wikipedia.org/wiki/Michael_Stonebraker "stonebraker", @@ -540,6 +566,9 @@ var ( // Bertha Swirles was a theoretical physicist who made a number of contributions to early quantum theory. https://en.wikipedia.org/wiki/Bertha_Swirles "swirles", + // Valentina Tereshkova is a russian engineer, cosmonaut and politician. She was the first woman flying to space in 1963. In 2013, at the age of 76, she offered to go on a one-way mission to mars. https://en.wikipedia.org/wiki/Valentina_Tereshkova + "tereshkova", + // Nikola Tesla invented the AC electric system and every gadget ever used by a James Bond villain. https://en.wikipedia.org/wiki/Nikola_Tesla "tesla", @@ -555,12 +584,18 @@ var ( // Varahamihira - Ancient Indian mathematician who discovered trigonometric formulae during 505-587 CE - https://en.wikipedia.org/wiki/Var%C4%81hamihira#Contributions "varahamihira", + // Dorothy Vaughan was a NASA mathematician and computer programmer on the SCOUT launch vehicle program that put America's first satellites into space - https://en.wikipedia.org/wiki/Dorothy_Vaughan + "vaughan", + // Sir Mokshagundam Visvesvaraya - is a notable Indian engineer. He is a recipient of the Indian Republic's highest honour, the Bharat Ratna, in 1955. On his birthday, 15 September is celebrated as Engineer's Day in India in his memory - https://en.wikipedia.org/wiki/Visvesvaraya "visvesvaraya", // Christiane Nüsslein-Volhard - German biologist, won Nobel Prize in Physiology or Medicine in 1995 for research on the genetic control of embryonic development. https://en.wikipedia.org/wiki/Christiane_N%C3%BCsslein-Volhard "volhard", + // Cédric Villani - French mathematician, won Fields Medal, Fermat Prize and Poincaré Price for his work in differential geometry and statistical mechanics. https://en.wikipedia.org/wiki/C%C3%A9dric_Villani + "villani", + // Marlyn Wescoff - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Marlyn_Meltzer "wescoff", @@ -587,6 +622,9 @@ var ( // Ada Yonath - an Israeli crystallographer, the first woman from the Middle East to win a Nobel prize in the sciences. https://en.wikipedia.org/wiki/Ada_Yonath "yonath", + + // Nikolay Yegorovich Zhukovsky (Russian: Никола́й Его́рович Жуко́вский, January 17 1847 – March 17, 1921) was a Russian scientist, mathematician and engineer, and a founding father of modern aero- and hydrodynamics. Whereas contemporary scientists scoffed at the idea of human flight, Zhukovsky was the first to undertake the study of airflow. He is often called the Father of Russian Aviation. https://en.wikipedia.org/wiki/Nikolay_Yegorovich_Zhukovsky + "zhukovsky", } ) @@ -594,15 +632,14 @@ var ( // formatted as "adjective_surname". For example 'focused_turing'. If retry is non-zero, a random // integer between 0 and 10 will be added to the end of the name, e.g `focused_turing3` func GetRandomName(retry int) string { - rnd := random.Rand begin: - name := fmt.Sprintf("%s_%s", left[rnd.Intn(len(left))], right[rnd.Intn(len(right))]) + name := fmt.Sprintf("%s_%s", left[rand.Intn(len(left))], right[rand.Intn(len(right))]) if name == "boring_wozniak" /* Steve Wozniak is not boring */ { goto begin } if retry > 0 { - name = fmt.Sprintf("%s%d", name, rnd.Intn(10)) + name = fmt.Sprintf("%s%d", name, rand.Intn(10)) } return name } diff --git a/vendor/github.com/docker/docker/pkg/random/random.go b/vendor/github.com/docker/docker/pkg/random/random.go deleted file mode 100644 index 70de4d130..000000000 --- a/vendor/github.com/docker/docker/pkg/random/random.go +++ /dev/null @@ -1,71 +0,0 @@ -package random - -import ( - cryptorand "crypto/rand" - "io" - "math" - "math/big" - "math/rand" - "sync" - "time" -) - -// Rand is a global *rand.Rand instance, which initialized with NewSource() source. -var Rand = rand.New(NewSource()) - -// Reader is a global, shared instance of a pseudorandom bytes generator. -// It doesn't consume entropy. -var Reader io.Reader = &reader{rnd: Rand} - -// copypaste from standard math/rand -type lockedSource struct { - lk sync.Mutex - src rand.Source -} - -func (r *lockedSource) Int63() (n int64) { - r.lk.Lock() - n = r.src.Int63() - r.lk.Unlock() - return -} - -func (r *lockedSource) Seed(seed int64) { - r.lk.Lock() - r.src.Seed(seed) - r.lk.Unlock() -} - -// NewSource returns math/rand.Source safe for concurrent use and initialized -// with current unix-nano timestamp -func NewSource() rand.Source { - var seed int64 - if cryptoseed, err := cryptorand.Int(cryptorand.Reader, big.NewInt(math.MaxInt64)); err != nil { - // This should not happen, but worst-case fallback to time-based seed. - seed = time.Now().UnixNano() - } else { - seed = cryptoseed.Int64() - } - return &lockedSource{ - src: rand.NewSource(seed), - } -} - -type reader struct { - rnd *rand.Rand -} - -func (r *reader) Read(b []byte) (int, error) { - i := 0 - for { - val := r.rnd.Int63() - for val > 0 { - b[i] = byte(val) - i++ - if i == len(b) { - return i, nil - } - val >>= 8 - } - } -} diff --git a/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go b/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go deleted file mode 100644 index 1d7c452cc..000000000 --- a/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go +++ /dev/null @@ -1,263 +0,0 @@ -// +build windows - -package windowsconsole // import "github.com/docker/docker/pkg/term/windows" - -import ( - "bytes" - "errors" - "fmt" - "io" - "os" - "strings" - "unsafe" - - ansiterm "github.com/Azure/go-ansiterm" - "github.com/Azure/go-ansiterm/winterm" -) - -const ( - escapeSequence = ansiterm.KEY_ESC_CSI -) - -// ansiReader wraps a standard input file (e.g., os.Stdin) providing ANSI sequence translation. -type ansiReader struct { - file *os.File - fd uintptr - buffer []byte - cbBuffer int - command []byte -} - -// NewAnsiReader returns an io.ReadCloser that provides VT100 terminal emulation on top of a -// Windows console input handle. -func NewAnsiReader(nFile int) io.ReadCloser { - initLogger() - file, fd := winterm.GetStdFile(nFile) - return &ansiReader{ - file: file, - fd: fd, - command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH), - buffer: make([]byte, 0), - } -} - -// Close closes the wrapped file. -func (ar *ansiReader) Close() (err error) { - return ar.file.Close() -} - -// Fd returns the file descriptor of the wrapped file. -func (ar *ansiReader) Fd() uintptr { - return ar.fd -} - -// Read reads up to len(p) bytes of translated input events into p. -func (ar *ansiReader) Read(p []byte) (int, error) { - if len(p) == 0 { - return 0, nil - } - - // Previously read bytes exist, read as much as we can and return - if len(ar.buffer) > 0 { - logger.Debugf("Reading previously cached bytes") - - originalLength := len(ar.buffer) - copiedLength := copy(p, ar.buffer) - - if copiedLength == originalLength { - ar.buffer = make([]byte, 0, len(p)) - } else { - ar.buffer = ar.buffer[copiedLength:] - } - - logger.Debugf("Read from cache p[%d]: % x", copiedLength, p) - return copiedLength, nil - } - - // Read and translate key events - events, err := readInputEvents(ar.fd, len(p)) - if err != nil { - return 0, err - } else if len(events) == 0 { - logger.Debug("No input events detected") - return 0, nil - } - - keyBytes := translateKeyEvents(events, []byte(escapeSequence)) - - // Save excess bytes and right-size keyBytes - if len(keyBytes) > len(p) { - logger.Debugf("Received %d keyBytes, only room for %d bytes", len(keyBytes), len(p)) - ar.buffer = keyBytes[len(p):] - keyBytes = keyBytes[:len(p)] - } else if len(keyBytes) == 0 { - logger.Debug("No key bytes returned from the translator") - return 0, nil - } - - copiedLength := copy(p, keyBytes) - if copiedLength != len(keyBytes) { - return 0, errors.New("unexpected copy length encountered") - } - - logger.Debugf("Read p[%d]: % x", copiedLength, p) - logger.Debugf("Read keyBytes[%d]: % x", copiedLength, keyBytes) - return copiedLength, nil -} - -// readInputEvents polls until at least one event is available. -func readInputEvents(fd uintptr, maxBytes int) ([]winterm.INPUT_RECORD, error) { - // Determine the maximum number of records to retrieve - // -- Cast around the type system to obtain the size of a single INPUT_RECORD. - // unsafe.Sizeof requires an expression vs. a type-reference; the casting - // tricks the type system into believing it has such an expression. - recordSize := int(unsafe.Sizeof(*((*winterm.INPUT_RECORD)(unsafe.Pointer(&maxBytes))))) - countRecords := maxBytes / recordSize - if countRecords > ansiterm.MAX_INPUT_EVENTS { - countRecords = ansiterm.MAX_INPUT_EVENTS - } else if countRecords == 0 { - countRecords = 1 - } - logger.Debugf("[windows] readInputEvents: Reading %v records (buffer size %v, record size %v)", countRecords, maxBytes, recordSize) - - // Wait for and read input events - events := make([]winterm.INPUT_RECORD, countRecords) - nEvents := uint32(0) - eventsExist, err := winterm.WaitForSingleObject(fd, winterm.WAIT_INFINITE) - if err != nil { - return nil, err - } - - if eventsExist { - err = winterm.ReadConsoleInput(fd, events, &nEvents) - if err != nil { - return nil, err - } - } - - // Return a slice restricted to the number of returned records - logger.Debugf("[windows] readInputEvents: Read %v events", nEvents) - return events[:nEvents], nil -} - -// KeyEvent Translation Helpers - -var arrowKeyMapPrefix = map[uint16]string{ - winterm.VK_UP: "%s%sA", - winterm.VK_DOWN: "%s%sB", - winterm.VK_RIGHT: "%s%sC", - winterm.VK_LEFT: "%s%sD", -} - -var keyMapPrefix = map[uint16]string{ - winterm.VK_UP: "\x1B[%sA", - winterm.VK_DOWN: "\x1B[%sB", - winterm.VK_RIGHT: "\x1B[%sC", - winterm.VK_LEFT: "\x1B[%sD", - winterm.VK_HOME: "\x1B[1%s~", // showkey shows ^[[1 - winterm.VK_END: "\x1B[4%s~", // showkey shows ^[[4 - winterm.VK_INSERT: "\x1B[2%s~", - winterm.VK_DELETE: "\x1B[3%s~", - winterm.VK_PRIOR: "\x1B[5%s~", - winterm.VK_NEXT: "\x1B[6%s~", - winterm.VK_F1: "", - winterm.VK_F2: "", - winterm.VK_F3: "\x1B[13%s~", - winterm.VK_F4: "\x1B[14%s~", - winterm.VK_F5: "\x1B[15%s~", - winterm.VK_F6: "\x1B[17%s~", - winterm.VK_F7: "\x1B[18%s~", - winterm.VK_F8: "\x1B[19%s~", - winterm.VK_F9: "\x1B[20%s~", - winterm.VK_F10: "\x1B[21%s~", - winterm.VK_F11: "\x1B[23%s~", - winterm.VK_F12: "\x1B[24%s~", -} - -// translateKeyEvents converts the input events into the appropriate ANSI string. -func translateKeyEvents(events []winterm.INPUT_RECORD, escapeSequence []byte) []byte { - var buffer bytes.Buffer - for _, event := range events { - if event.EventType == winterm.KEY_EVENT && event.KeyEvent.KeyDown != 0 { - buffer.WriteString(keyToString(&event.KeyEvent, escapeSequence)) - } - } - - return buffer.Bytes() -} - -// keyToString maps the given input event record to the corresponding string. -func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) string { - if keyEvent.UnicodeChar == 0 { - return formatVirtualKey(keyEvent.VirtualKeyCode, keyEvent.ControlKeyState, escapeSequence) - } - - _, alt, control := getControlKeys(keyEvent.ControlKeyState) - if control { - // TODO(azlinux): Implement following control sequences - // -D Signals the end of input from the keyboard; also exits current shell. - // -H Deletes the first character to the left of the cursor. Also called the ERASE key. - // -Q Restarts printing after it has been stopped with -s. - // -S Suspends printing on the screen (does not stop the program). - // -U Deletes all characters on the current line. Also called the KILL key. - // -E Quits current command and creates a core - - } - - // +Key generates ESC N Key - if !control && alt { - return ansiterm.KEY_ESC_N + strings.ToLower(string(keyEvent.UnicodeChar)) - } - - return string(keyEvent.UnicodeChar) -} - -// formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string. -func formatVirtualKey(key uint16, controlState uint32, escapeSequence []byte) string { - shift, alt, control := getControlKeys(controlState) - modifier := getControlKeysModifier(shift, alt, control) - - if format, ok := arrowKeyMapPrefix[key]; ok { - return fmt.Sprintf(format, escapeSequence, modifier) - } - - if format, ok := keyMapPrefix[key]; ok { - return fmt.Sprintf(format, modifier) - } - - return "" -} - -// getControlKeys extracts the shift, alt, and ctrl key states. -func getControlKeys(controlState uint32) (shift, alt, control bool) { - shift = 0 != (controlState & winterm.SHIFT_PRESSED) - alt = 0 != (controlState & (winterm.LEFT_ALT_PRESSED | winterm.RIGHT_ALT_PRESSED)) - control = 0 != (controlState & (winterm.LEFT_CTRL_PRESSED | winterm.RIGHT_CTRL_PRESSED)) - return shift, alt, control -} - -// getControlKeysModifier returns the ANSI modifier for the given combination of control keys. -func getControlKeysModifier(shift, alt, control bool) string { - if shift && alt && control { - return ansiterm.KEY_CONTROL_PARAM_8 - } - if alt && control { - return ansiterm.KEY_CONTROL_PARAM_7 - } - if shift && control { - return ansiterm.KEY_CONTROL_PARAM_6 - } - if control { - return ansiterm.KEY_CONTROL_PARAM_5 - } - if shift && alt { - return ansiterm.KEY_CONTROL_PARAM_4 - } - if alt { - return ansiterm.KEY_CONTROL_PARAM_3 - } - if shift { - return ansiterm.KEY_CONTROL_PARAM_2 - } - return "" -} diff --git a/vendor/github.com/docker/docker/pkg/term/windows/ansi_writer.go b/vendor/github.com/docker/docker/pkg/term/windows/ansi_writer.go deleted file mode 100644 index 7799a03fc..000000000 --- a/vendor/github.com/docker/docker/pkg/term/windows/ansi_writer.go +++ /dev/null @@ -1,64 +0,0 @@ -// +build windows - -package windowsconsole // import "github.com/docker/docker/pkg/term/windows" - -import ( - "io" - "os" - - ansiterm "github.com/Azure/go-ansiterm" - "github.com/Azure/go-ansiterm/winterm" -) - -// ansiWriter wraps a standard output file (e.g., os.Stdout) providing ANSI sequence translation. -type ansiWriter struct { - file *os.File - fd uintptr - infoReset *winterm.CONSOLE_SCREEN_BUFFER_INFO - command []byte - escapeSequence []byte - inAnsiSequence bool - parser *ansiterm.AnsiParser -} - -// NewAnsiWriter returns an io.Writer that provides VT100 terminal emulation on top of a -// Windows console output handle. -func NewAnsiWriter(nFile int) io.Writer { - initLogger() - file, fd := winterm.GetStdFile(nFile) - info, err := winterm.GetConsoleScreenBufferInfo(fd) - if err != nil { - return nil - } - - parser := ansiterm.CreateParser("Ground", winterm.CreateWinEventHandler(fd, file)) - logger.Infof("newAnsiWriter: parser %p", parser) - - aw := &ansiWriter{ - file: file, - fd: fd, - infoReset: info, - command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH), - escapeSequence: []byte(ansiterm.KEY_ESC_CSI), - parser: parser, - } - - logger.Infof("newAnsiWriter: aw.parser %p", aw.parser) - logger.Infof("newAnsiWriter: %v", aw) - return aw -} - -func (aw *ansiWriter) Fd() uintptr { - return aw.fd -} - -// Write writes len(p) bytes from p to the underlying data stream. -func (aw *ansiWriter) Write(p []byte) (total int, err error) { - if len(p) == 0 { - return 0, nil - } - - logger.Infof("Write: % x", p) - logger.Infof("Write: %s", string(p)) - return aw.parser.Parse(p) -} diff --git a/vendor/github.com/docker/docker/pkg/term/windows/console.go b/vendor/github.com/docker/docker/pkg/term/windows/console.go deleted file mode 100644 index 527401975..000000000 --- a/vendor/github.com/docker/docker/pkg/term/windows/console.go +++ /dev/null @@ -1,35 +0,0 @@ -// +build windows - -package windowsconsole // import "github.com/docker/docker/pkg/term/windows" - -import ( - "os" - - "github.com/Azure/go-ansiterm/winterm" -) - -// GetHandleInfo returns file descriptor and bool indicating whether the file is a console. -func GetHandleInfo(in interface{}) (uintptr, bool) { - switch t := in.(type) { - case *ansiReader: - return t.Fd(), true - case *ansiWriter: - return t.Fd(), true - } - - var inFd uintptr - var isTerminal bool - - if file, ok := in.(*os.File); ok { - inFd = file.Fd() - isTerminal = IsConsole(inFd) - } - return inFd, isTerminal -} - -// IsConsole returns true if the given file descriptor is a Windows Console. -// The code assumes that GetConsoleMode will return an error for file descriptors that are not a console. -func IsConsole(fd uintptr) bool { - _, e := winterm.GetConsoleMode(fd) - return e == nil -} diff --git a/vendor/github.com/docker/docker/pkg/term/windows/windows.go b/vendor/github.com/docker/docker/pkg/term/windows/windows.go deleted file mode 100644 index 1f8965969..000000000 --- a/vendor/github.com/docker/docker/pkg/term/windows/windows.go +++ /dev/null @@ -1,33 +0,0 @@ -// These files implement ANSI-aware input and output streams for use by the Docker Windows client. -// When asked for the set of standard streams (e.g., stdin, stdout, stderr), the code will create -// and return pseudo-streams that convert ANSI sequences to / from Windows Console API calls. - -package windowsconsole // import "github.com/docker/docker/pkg/term/windows" - -import ( - "io/ioutil" - "os" - "sync" - - ansiterm "github.com/Azure/go-ansiterm" - "github.com/sirupsen/logrus" -) - -var logger *logrus.Logger -var initOnce sync.Once - -func initLogger() { - initOnce.Do(func() { - logFile := ioutil.Discard - - if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" { - logFile, _ = os.Create("ansiReaderWriter.log") - } - - logger = &logrus.Logger{ - Out: logFile, - Formatter: new(logrus.TextFormatter), - Level: logrus.DebugLevel, - } - }) -} diff --git a/vendor/github.com/dustin/go-humanize/.travis.yml b/vendor/github.com/dustin/go-humanize/.travis.yml new file mode 100644 index 000000000..ba95cdd15 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/.travis.yml @@ -0,0 +1,21 @@ +sudo: false +language: go +go: + - 1.3.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - master +matrix: + allow_failures: + - go: master + fast_finish: true +install: + - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d -s .) + - go tool vet . + - go test -v -race ./... diff --git a/vendor/github.com/dustin/go-humanize/README.markdown b/vendor/github.com/dustin/go-humanize/README.markdown index f69d3c870..91b4ae564 100644 --- a/vendor/github.com/dustin/go-humanize/README.markdown +++ b/vendor/github.com/dustin/go-humanize/README.markdown @@ -88,5 +88,37 @@ Example: humanize.SI(0.00000000223, "M") // 2.23 nM ``` +## English-specific functions + +The following functions are in the `humanize/english` subpackage. + +### Plurals + +Simple English pluralization + +```go +english.PluralWord(1, "object", "") // object +english.PluralWord(42, "object", "") // objects +english.PluralWord(2, "bus", "") // buses +english.PluralWord(99, "locus", "loci") // loci + +english.Plural(1, "object", "") // 1 object +english.Plural(42, "object", "") // 42 objects +english.Plural(2, "bus", "") // 2 buses +english.Plural(99, "locus", "loci") // 99 loci +``` + +### Word series + +Format comma-separated words lists with conjuctions: + +```go +english.WordSeries([]string{"foo"}, "and") // foo +english.WordSeries([]string{"foo", "bar"}, "and") // foo and bar +english.WordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar and baz + +english.OxfordWordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar, and baz +``` + [odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion [sinotation]: http://en.wikipedia.org/wiki/Metric_prefix diff --git a/vendor/github.com/dustin/go-humanize/comma.go b/vendor/github.com/dustin/go-humanize/comma.go index eb285cb95..520ae3e57 100644 --- a/vendor/github.com/dustin/go-humanize/comma.go +++ b/vendor/github.com/dustin/go-humanize/comma.go @@ -15,7 +15,7 @@ import ( func Comma(v int64) string { sign := "" - // minin64 can't be negated to a usable value, so it has to be special cased. + // Min int64 can't be negated to a usable value, so it has to be special cased. if v == math.MinInt64 { return "-9,223,372,036,854,775,808" } @@ -76,6 +76,14 @@ func Commaf(v float64) string { return buf.String() } +// CommafWithDigits works like the Commaf but limits the resulting +// string to the given number of decimal places. +// +// e.g. CommafWithDigits(834142.32, 1) -> 834,142.3 +func CommafWithDigits(f float64, decimals int) string { + return stripTrailingDigits(Commaf(f), decimals) +} + // BigComma produces a string form of the given big.Int in base 10 // with commas after every three orders of magnitude. func BigComma(b *big.Int) string { diff --git a/vendor/github.com/dustin/go-humanize/ftoa.go b/vendor/github.com/dustin/go-humanize/ftoa.go index c76190b10..1c62b640d 100644 --- a/vendor/github.com/dustin/go-humanize/ftoa.go +++ b/vendor/github.com/dustin/go-humanize/ftoa.go @@ -1,6 +1,9 @@ package humanize -import "strconv" +import ( + "strconv" + "strings" +) func stripTrailingZeros(s string) string { offset := len(s) - 1 @@ -17,7 +20,27 @@ func stripTrailingZeros(s string) string { return s[:offset+1] } +func stripTrailingDigits(s string, digits int) string { + if i := strings.Index(s, "."); i >= 0 { + if digits <= 0 { + return s[:i] + } + i++ + if i+digits >= len(s) { + return s + } + return s[:i+digits] + } + return s +} + // Ftoa converts a float to a string with no trailing zeros. func Ftoa(num float64) string { return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64)) } + +// FtoaWithDigits converts a float to a string but limits the resulting string +// to the given number of decimal places, and no trailing zeros. +func FtoaWithDigits(num float64, digits int) string { + return stripTrailingZeros(stripTrailingDigits(strconv.FormatFloat(num, 'f', 6, 64), digits)) +} diff --git a/vendor/github.com/dustin/go-humanize/si.go b/vendor/github.com/dustin/go-humanize/si.go index b24e48169..ae659e0e4 100644 --- a/vendor/github.com/dustin/go-humanize/si.go +++ b/vendor/github.com/dustin/go-humanize/si.go @@ -93,6 +93,16 @@ func SI(input float64, unit string) string { return Ftoa(value) + " " + prefix + unit } +// SIWithDigits works like SI but limits the resulting string to the +// given number of decimal places. +// +// e.g. SIWithDigits(1000000, 0, "B") -> 1 MB +// e.g. SIWithDigits(2.2345e-12, 2, "F") -> 2.23 pF +func SIWithDigits(input float64, decimals int, unit string) string { + value, prefix := ComputeSI(input) + return FtoaWithDigits(value, decimals) + " " + prefix + unit +} + var errInvalid = errors.New("invalid input") // ParseSI parses an SI string back into the number and unit. diff --git a/vendor/github.com/dustin/go-humanize/times.go b/vendor/github.com/dustin/go-humanize/times.go index b311f11c8..dd3fbf5ef 100644 --- a/vendor/github.com/dustin/go-humanize/times.go +++ b/vendor/github.com/dustin/go-humanize/times.go @@ -91,7 +91,7 @@ func CustomRelTime(a, b time.Time, albl, blbl string, magnitudes []RelTimeMagnit } n := sort.Search(len(magnitudes), func(i int) bool { - return magnitudes[i].D >= diff + return magnitudes[i].D > diff }) if n >= len(magnitudes) { diff --git a/vendor/github.com/dylanmei/winrmtest/.gitignore b/vendor/github.com/dylanmei/winrmtest/.gitignore new file mode 100644 index 000000000..2d4daa405 --- /dev/null +++ b/vendor/github.com/dylanmei/winrmtest/.gitignore @@ -0,0 +1 @@ +.idea* diff --git a/vendor/github.com/fatih/color/.travis.yml b/vendor/github.com/fatih/color/.travis.yml new file mode 100644 index 000000000..95f8a1ff5 --- /dev/null +++ b/vendor/github.com/fatih/color/.travis.yml @@ -0,0 +1,5 @@ +language: go +go: + - 1.8.x + - tip + diff --git a/vendor/github.com/fatih/color/Gopkg.lock b/vendor/github.com/fatih/color/Gopkg.lock new file mode 100644 index 000000000..7d879e9ca --- /dev/null +++ b/vendor/github.com/fatih/color/Gopkg.lock @@ -0,0 +1,27 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/mattn/go-colorable" + packages = ["."] + revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" + version = "v0.0.9" + +[[projects]] + name = "github.com/mattn/go-isatty" + packages = ["."] + revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39" + version = "v0.0.3" + +[[projects]] + branch = "master" + name = "golang.org/x/sys" + packages = ["unix"] + revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "e8a50671c3cb93ea935bf210b1cd20702876b9d9226129be581ef646d1565cdc" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/fatih/color/Gopkg.toml b/vendor/github.com/fatih/color/Gopkg.toml new file mode 100644 index 000000000..ff1617f71 --- /dev/null +++ b/vendor/github.com/fatih/color/Gopkg.toml @@ -0,0 +1,30 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + + +[[constraint]] + name = "github.com/mattn/go-colorable" + version = "0.0.9" + +[[constraint]] + name = "github.com/mattn/go-isatty" + version = "0.0.3" diff --git a/vendor/github.com/fatih/color/LICENSE.md b/vendor/github.com/fatih/color/LICENSE.md new file mode 100644 index 000000000..25fdaf639 --- /dev/null +++ b/vendor/github.com/fatih/color/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Fatih Arslan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/fatih/color/README.md b/vendor/github.com/fatih/color/README.md new file mode 100644 index 000000000..3fc954460 --- /dev/null +++ b/vendor/github.com/fatih/color/README.md @@ -0,0 +1,179 @@ +# Color [![GoDoc](https://godoc.org/github.com/fatih/color?status.svg)](https://godoc.org/github.com/fatih/color) [![Build Status](https://img.shields.io/travis/fatih/color.svg?style=flat-square)](https://travis-ci.org/fatih/color) + + + +Color lets you use colorized outputs in terms of [ANSI Escape +Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) in Go (Golang). It +has support for Windows too! The API can be used in several ways, pick one that +suits you. + + +![Color](https://i.imgur.com/c1JI0lA.png) + + +## Install + +```bash +go get github.com/fatih/color +``` + +Note that the `vendor` folder is here for stability. Remove the folder if you +already have the dependencies in your GOPATH. + +## Examples + +### Standard colors + +```go +// Print with default helper functions +color.Cyan("Prints text in cyan.") + +// A newline will be appended automatically +color.Blue("Prints %s in blue.", "text") + +// These are using the default foreground colors +color.Red("We have red") +color.Magenta("And many others ..") + +``` + +### Mix and reuse colors + +```go +// Create a new color object +c := color.New(color.FgCyan).Add(color.Underline) +c.Println("Prints cyan text with an underline.") + +// Or just add them to New() +d := color.New(color.FgCyan, color.Bold) +d.Printf("This prints bold cyan %s\n", "too!.") + +// Mix up foreground and background colors, create new mixes! +red := color.New(color.FgRed) + +boldRed := red.Add(color.Bold) +boldRed.Println("This will print text in bold red.") + +whiteBackground := red.Add(color.BgWhite) +whiteBackground.Println("Red text with white background.") +``` + +### Use your own output (io.Writer) + +```go +// Use your own io.Writer output +color.New(color.FgBlue).Fprintln(myWriter, "blue color!") + +blue := color.New(color.FgBlue) +blue.Fprint(writer, "This will print text in blue.") +``` + +### Custom print functions (PrintFunc) + +```go +// Create a custom print function for convenience +red := color.New(color.FgRed).PrintfFunc() +red("Warning") +red("Error: %s", err) + +// Mix up multiple attributes +notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() +notice("Don't forget this...") +``` + +### Custom fprint functions (FprintFunc) + +```go +blue := color.New(FgBlue).FprintfFunc() +blue(myWriter, "important notice: %s", stars) + +// Mix up with multiple attributes +success := color.New(color.Bold, color.FgGreen).FprintlnFunc() +success(myWriter, "Don't forget this...") +``` + +### Insert into noncolor strings (SprintFunc) + +```go +// Create SprintXxx functions to mix strings with other non-colorized strings: +yellow := color.New(color.FgYellow).SprintFunc() +red := color.New(color.FgRed).SprintFunc() +fmt.Printf("This is a %s and this is %s.\n", yellow("warning"), red("error")) + +info := color.New(color.FgWhite, color.BgGreen).SprintFunc() +fmt.Printf("This %s rocks!\n", info("package")) + +// Use helper functions +fmt.Println("This", color.RedString("warning"), "should be not neglected.") +fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.") + +// Windows supported too! Just don't forget to change the output to color.Output +fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) +``` + +### Plug into existing code + +```go +// Use handy standard colors +color.Set(color.FgYellow) + +fmt.Println("Existing text will now be in yellow") +fmt.Printf("This one %s\n", "too") + +color.Unset() // Don't forget to unset + +// You can mix up parameters +color.Set(color.FgMagenta, color.Bold) +defer color.Unset() // Use it in your function + +fmt.Println("All text will now be bold magenta.") +``` + +### Disable/Enable color + +There might be a case where you want to explicitly disable/enable color output. the +`go-isatty` package will automatically disable color output for non-tty output streams +(for example if the output were piped directly to `less`) + +`Color` has support to disable/enable colors both globally and for single color +definitions. For example suppose you have a CLI app and a `--no-color` bool flag. You +can easily disable the color output with: + +```go + +var flagNoColor = flag.Bool("no-color", false, "Disable color output") + +if *flagNoColor { + color.NoColor = true // disables colorized output +} +``` + +It also has support for single color definitions (local). You can +disable/enable color output on the fly: + +```go +c := color.New(color.FgCyan) +c.Println("Prints cyan text") + +c.DisableColor() +c.Println("This is printed without any color") + +c.EnableColor() +c.Println("This prints again cyan...") +``` + +## Todo + +* Save/Return previous values +* Evaluate fmt.Formatter interface + + +## Credits + + * [Fatih Arslan](https://github.com/fatih) + * Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable) + +## License + +The MIT License (MIT) - see [`LICENSE.md`](https://github.com/fatih/color/blob/master/LICENSE.md) for more details + diff --git a/vendor/github.com/fatih/color/color.go b/vendor/github.com/fatih/color/color.go new file mode 100644 index 000000000..91c8e9f06 --- /dev/null +++ b/vendor/github.com/fatih/color/color.go @@ -0,0 +1,603 @@ +package color + +import ( + "fmt" + "io" + "os" + "strconv" + "strings" + "sync" + + "github.com/mattn/go-colorable" + "github.com/mattn/go-isatty" +) + +var ( + // NoColor defines if the output is colorized or not. It's dynamically set to + // false or true based on the stdout's file descriptor referring to a terminal + // or not. This is a global option and affects all colors. For more control + // over each color block use the methods DisableColor() individually. + NoColor = os.Getenv("TERM") == "dumb" || + (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) + + // Output defines the standard output of the print functions. By default + // os.Stdout is used. + Output = colorable.NewColorableStdout() + + // Error defines a color supporting writer for os.Stderr. + Error = colorable.NewColorableStderr() + + // colorsCache is used to reduce the count of created Color objects and + // allows to reuse already created objects with required Attribute. + colorsCache = make(map[Attribute]*Color) + colorsCacheMu sync.Mutex // protects colorsCache +) + +// Color defines a custom color object which is defined by SGR parameters. +type Color struct { + params []Attribute + noColor *bool +} + +// Attribute defines a single SGR Code +type Attribute int + +const escape = "\x1b" + +// Base attributes +const ( + Reset Attribute = iota + Bold + Faint + Italic + Underline + BlinkSlow + BlinkRapid + ReverseVideo + Concealed + CrossedOut +) + +// Foreground text colors +const ( + FgBlack Attribute = iota + 30 + FgRed + FgGreen + FgYellow + FgBlue + FgMagenta + FgCyan + FgWhite +) + +// Foreground Hi-Intensity text colors +const ( + FgHiBlack Attribute = iota + 90 + FgHiRed + FgHiGreen + FgHiYellow + FgHiBlue + FgHiMagenta + FgHiCyan + FgHiWhite +) + +// Background text colors +const ( + BgBlack Attribute = iota + 40 + BgRed + BgGreen + BgYellow + BgBlue + BgMagenta + BgCyan + BgWhite +) + +// Background Hi-Intensity text colors +const ( + BgHiBlack Attribute = iota + 100 + BgHiRed + BgHiGreen + BgHiYellow + BgHiBlue + BgHiMagenta + BgHiCyan + BgHiWhite +) + +// New returns a newly created color object. +func New(value ...Attribute) *Color { + c := &Color{params: make([]Attribute, 0)} + c.Add(value...) + return c +} + +// Set sets the given parameters immediately. It will change the color of +// output with the given SGR parameters until color.Unset() is called. +func Set(p ...Attribute) *Color { + c := New(p...) + c.Set() + return c +} + +// Unset resets all escape attributes and clears the output. Usually should +// be called after Set(). +func Unset() { + if NoColor { + return + } + + fmt.Fprintf(Output, "%s[%dm", escape, Reset) +} + +// Set sets the SGR sequence. +func (c *Color) Set() *Color { + if c.isNoColorSet() { + return c + } + + fmt.Fprintf(Output, c.format()) + return c +} + +func (c *Color) unset() { + if c.isNoColorSet() { + return + } + + Unset() +} + +func (c *Color) setWriter(w io.Writer) *Color { + if c.isNoColorSet() { + return c + } + + fmt.Fprintf(w, c.format()) + return c +} + +func (c *Color) unsetWriter(w io.Writer) { + if c.isNoColorSet() { + return + } + + if NoColor { + return + } + + fmt.Fprintf(w, "%s[%dm", escape, Reset) +} + +// Add is used to chain SGR parameters. Use as many as parameters to combine +// and create custom color objects. Example: Add(color.FgRed, color.Underline). +func (c *Color) Add(value ...Attribute) *Color { + c.params = append(c.params, value...) + return c +} + +func (c *Color) prepend(value Attribute) { + c.params = append(c.params, 0) + copy(c.params[1:], c.params[0:]) + c.params[0] = value +} + +// Fprint formats using the default formats for its operands and writes to w. +// Spaces are added between operands when neither is a string. +// It returns the number of bytes written and any write error encountered. +// On Windows, users should wrap w with colorable.NewColorable() if w is of +// type *os.File. +func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) { + c.setWriter(w) + defer c.unsetWriter(w) + + return fmt.Fprint(w, a...) +} + +// Print formats using the default formats for its operands and writes to +// standard output. Spaces are added between operands when neither is a +// string. It returns the number of bytes written and any write error +// encountered. This is the standard fmt.Print() method wrapped with the given +// color. +func (c *Color) Print(a ...interface{}) (n int, err error) { + c.Set() + defer c.unset() + + return fmt.Fprint(Output, a...) +} + +// Fprintf formats according to a format specifier and writes to w. +// It returns the number of bytes written and any write error encountered. +// On Windows, users should wrap w with colorable.NewColorable() if w is of +// type *os.File. +func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { + c.setWriter(w) + defer c.unsetWriter(w) + + return fmt.Fprintf(w, format, a...) +} + +// Printf formats according to a format specifier and writes to standard output. +// It returns the number of bytes written and any write error encountered. +// This is the standard fmt.Printf() method wrapped with the given color. +func (c *Color) Printf(format string, a ...interface{}) (n int, err error) { + c.Set() + defer c.unset() + + return fmt.Fprintf(Output, format, a...) +} + +// Fprintln formats using the default formats for its operands and writes to w. +// Spaces are always added between operands and a newline is appended. +// On Windows, users should wrap w with colorable.NewColorable() if w is of +// type *os.File. +func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { + c.setWriter(w) + defer c.unsetWriter(w) + + return fmt.Fprintln(w, a...) +} + +// Println formats using the default formats for its operands and writes to +// standard output. Spaces are always added between operands and a newline is +// appended. It returns the number of bytes written and any write error +// encountered. This is the standard fmt.Print() method wrapped with the given +// color. +func (c *Color) Println(a ...interface{}) (n int, err error) { + c.Set() + defer c.unset() + + return fmt.Fprintln(Output, a...) +} + +// Sprint is just like Print, but returns a string instead of printing it. +func (c *Color) Sprint(a ...interface{}) string { + return c.wrap(fmt.Sprint(a...)) +} + +// Sprintln is just like Println, but returns a string instead of printing it. +func (c *Color) Sprintln(a ...interface{}) string { + return c.wrap(fmt.Sprintln(a...)) +} + +// Sprintf is just like Printf, but returns a string instead of printing it. +func (c *Color) Sprintf(format string, a ...interface{}) string { + return c.wrap(fmt.Sprintf(format, a...)) +} + +// FprintFunc returns a new function that prints the passed arguments as +// colorized with color.Fprint(). +func (c *Color) FprintFunc() func(w io.Writer, a ...interface{}) { + return func(w io.Writer, a ...interface{}) { + c.Fprint(w, a...) + } +} + +// PrintFunc returns a new function that prints the passed arguments as +// colorized with color.Print(). +func (c *Color) PrintFunc() func(a ...interface{}) { + return func(a ...interface{}) { + c.Print(a...) + } +} + +// FprintfFunc returns a new function that prints the passed arguments as +// colorized with color.Fprintf(). +func (c *Color) FprintfFunc() func(w io.Writer, format string, a ...interface{}) { + return func(w io.Writer, format string, a ...interface{}) { + c.Fprintf(w, format, a...) + } +} + +// PrintfFunc returns a new function that prints the passed arguments as +// colorized with color.Printf(). +func (c *Color) PrintfFunc() func(format string, a ...interface{}) { + return func(format string, a ...interface{}) { + c.Printf(format, a...) + } +} + +// FprintlnFunc returns a new function that prints the passed arguments as +// colorized with color.Fprintln(). +func (c *Color) FprintlnFunc() func(w io.Writer, a ...interface{}) { + return func(w io.Writer, a ...interface{}) { + c.Fprintln(w, a...) + } +} + +// PrintlnFunc returns a new function that prints the passed arguments as +// colorized with color.Println(). +func (c *Color) PrintlnFunc() func(a ...interface{}) { + return func(a ...interface{}) { + c.Println(a...) + } +} + +// SprintFunc returns a new function that returns colorized strings for the +// given arguments with fmt.Sprint(). Useful to put into or mix into other +// string. Windows users should use this in conjunction with color.Output, example: +// +// put := New(FgYellow).SprintFunc() +// fmt.Fprintf(color.Output, "This is a %s", put("warning")) +func (c *Color) SprintFunc() func(a ...interface{}) string { + return func(a ...interface{}) string { + return c.wrap(fmt.Sprint(a...)) + } +} + +// SprintfFunc returns a new function that returns colorized strings for the +// given arguments with fmt.Sprintf(). Useful to put into or mix into other +// string. Windows users should use this in conjunction with color.Output. +func (c *Color) SprintfFunc() func(format string, a ...interface{}) string { + return func(format string, a ...interface{}) string { + return c.wrap(fmt.Sprintf(format, a...)) + } +} + +// SprintlnFunc returns a new function that returns colorized strings for the +// given arguments with fmt.Sprintln(). Useful to put into or mix into other +// string. Windows users should use this in conjunction with color.Output. +func (c *Color) SprintlnFunc() func(a ...interface{}) string { + return func(a ...interface{}) string { + return c.wrap(fmt.Sprintln(a...)) + } +} + +// sequence returns a formatted SGR sequence to be plugged into a "\x1b[...m" +// an example output might be: "1;36" -> bold cyan +func (c *Color) sequence() string { + format := make([]string, len(c.params)) + for i, v := range c.params { + format[i] = strconv.Itoa(int(v)) + } + + return strings.Join(format, ";") +} + +// wrap wraps the s string with the colors attributes. The string is ready to +// be printed. +func (c *Color) wrap(s string) string { + if c.isNoColorSet() { + return s + } + + return c.format() + s + c.unformat() +} + +func (c *Color) format() string { + return fmt.Sprintf("%s[%sm", escape, c.sequence()) +} + +func (c *Color) unformat() string { + return fmt.Sprintf("%s[%dm", escape, Reset) +} + +// DisableColor disables the color output. Useful to not change any existing +// code and still being able to output. Can be used for flags like +// "--no-color". To enable back use EnableColor() method. +func (c *Color) DisableColor() { + c.noColor = boolPtr(true) +} + +// EnableColor enables the color output. Use it in conjunction with +// DisableColor(). Otherwise this method has no side effects. +func (c *Color) EnableColor() { + c.noColor = boolPtr(false) +} + +func (c *Color) isNoColorSet() bool { + // check first if we have user setted action + if c.noColor != nil { + return *c.noColor + } + + // if not return the global option, which is disabled by default + return NoColor +} + +// Equals returns a boolean value indicating whether two colors are equal. +func (c *Color) Equals(c2 *Color) bool { + if len(c.params) != len(c2.params) { + return false + } + + for _, attr := range c.params { + if !c2.attrExists(attr) { + return false + } + } + + return true +} + +func (c *Color) attrExists(a Attribute) bool { + for _, attr := range c.params { + if attr == a { + return true + } + } + + return false +} + +func boolPtr(v bool) *bool { + return &v +} + +func getCachedColor(p Attribute) *Color { + colorsCacheMu.Lock() + defer colorsCacheMu.Unlock() + + c, ok := colorsCache[p] + if !ok { + c = New(p) + colorsCache[p] = c + } + + return c +} + +func colorPrint(format string, p Attribute, a ...interface{}) { + c := getCachedColor(p) + + if !strings.HasSuffix(format, "\n") { + format += "\n" + } + + if len(a) == 0 { + c.Print(format) + } else { + c.Printf(format, a...) + } +} + +func colorString(format string, p Attribute, a ...interface{}) string { + c := getCachedColor(p) + + if len(a) == 0 { + return c.SprintFunc()(format) + } + + return c.SprintfFunc()(format, a...) +} + +// Black is a convenient helper function to print with black foreground. A +// newline is appended to format by default. +func Black(format string, a ...interface{}) { colorPrint(format, FgBlack, a...) } + +// Red is a convenient helper function to print with red foreground. A +// newline is appended to format by default. +func Red(format string, a ...interface{}) { colorPrint(format, FgRed, a...) } + +// Green is a convenient helper function to print with green foreground. A +// newline is appended to format by default. +func Green(format string, a ...interface{}) { colorPrint(format, FgGreen, a...) } + +// Yellow is a convenient helper function to print with yellow foreground. +// A newline is appended to format by default. +func Yellow(format string, a ...interface{}) { colorPrint(format, FgYellow, a...) } + +// Blue is a convenient helper function to print with blue foreground. A +// newline is appended to format by default. +func Blue(format string, a ...interface{}) { colorPrint(format, FgBlue, a...) } + +// Magenta is a convenient helper function to print with magenta foreground. +// A newline is appended to format by default. +func Magenta(format string, a ...interface{}) { colorPrint(format, FgMagenta, a...) } + +// Cyan is a convenient helper function to print with cyan foreground. A +// newline is appended to format by default. +func Cyan(format string, a ...interface{}) { colorPrint(format, FgCyan, a...) } + +// White is a convenient helper function to print with white foreground. A +// newline is appended to format by default. +func White(format string, a ...interface{}) { colorPrint(format, FgWhite, a...) } + +// BlackString is a convenient helper function to return a string with black +// foreground. +func BlackString(format string, a ...interface{}) string { return colorString(format, FgBlack, a...) } + +// RedString is a convenient helper function to return a string with red +// foreground. +func RedString(format string, a ...interface{}) string { return colorString(format, FgRed, a...) } + +// GreenString is a convenient helper function to return a string with green +// foreground. +func GreenString(format string, a ...interface{}) string { return colorString(format, FgGreen, a...) } + +// YellowString is a convenient helper function to return a string with yellow +// foreground. +func YellowString(format string, a ...interface{}) string { return colorString(format, FgYellow, a...) } + +// BlueString is a convenient helper function to return a string with blue +// foreground. +func BlueString(format string, a ...interface{}) string { return colorString(format, FgBlue, a...) } + +// MagentaString is a convenient helper function to return a string with magenta +// foreground. +func MagentaString(format string, a ...interface{}) string { + return colorString(format, FgMagenta, a...) +} + +// CyanString is a convenient helper function to return a string with cyan +// foreground. +func CyanString(format string, a ...interface{}) string { return colorString(format, FgCyan, a...) } + +// WhiteString is a convenient helper function to return a string with white +// foreground. +func WhiteString(format string, a ...interface{}) string { return colorString(format, FgWhite, a...) } + +// HiBlack is a convenient helper function to print with hi-intensity black foreground. A +// newline is appended to format by default. +func HiBlack(format string, a ...interface{}) { colorPrint(format, FgHiBlack, a...) } + +// HiRed is a convenient helper function to print with hi-intensity red foreground. A +// newline is appended to format by default. +func HiRed(format string, a ...interface{}) { colorPrint(format, FgHiRed, a...) } + +// HiGreen is a convenient helper function to print with hi-intensity green foreground. A +// newline is appended to format by default. +func HiGreen(format string, a ...interface{}) { colorPrint(format, FgHiGreen, a...) } + +// HiYellow is a convenient helper function to print with hi-intensity yellow foreground. +// A newline is appended to format by default. +func HiYellow(format string, a ...interface{}) { colorPrint(format, FgHiYellow, a...) } + +// HiBlue is a convenient helper function to print with hi-intensity blue foreground. A +// newline is appended to format by default. +func HiBlue(format string, a ...interface{}) { colorPrint(format, FgHiBlue, a...) } + +// HiMagenta is a convenient helper function to print with hi-intensity magenta foreground. +// A newline is appended to format by default. +func HiMagenta(format string, a ...interface{}) { colorPrint(format, FgHiMagenta, a...) } + +// HiCyan is a convenient helper function to print with hi-intensity cyan foreground. A +// newline is appended to format by default. +func HiCyan(format string, a ...interface{}) { colorPrint(format, FgHiCyan, a...) } + +// HiWhite is a convenient helper function to print with hi-intensity white foreground. A +// newline is appended to format by default. +func HiWhite(format string, a ...interface{}) { colorPrint(format, FgHiWhite, a...) } + +// HiBlackString is a convenient helper function to return a string with hi-intensity black +// foreground. +func HiBlackString(format string, a ...interface{}) string { + return colorString(format, FgHiBlack, a...) +} + +// HiRedString is a convenient helper function to return a string with hi-intensity red +// foreground. +func HiRedString(format string, a ...interface{}) string { return colorString(format, FgHiRed, a...) } + +// HiGreenString is a convenient helper function to return a string with hi-intensity green +// foreground. +func HiGreenString(format string, a ...interface{}) string { + return colorString(format, FgHiGreen, a...) +} + +// HiYellowString is a convenient helper function to return a string with hi-intensity yellow +// foreground. +func HiYellowString(format string, a ...interface{}) string { + return colorString(format, FgHiYellow, a...) +} + +// HiBlueString is a convenient helper function to return a string with hi-intensity blue +// foreground. +func HiBlueString(format string, a ...interface{}) string { return colorString(format, FgHiBlue, a...) } + +// HiMagentaString is a convenient helper function to return a string with hi-intensity magenta +// foreground. +func HiMagentaString(format string, a ...interface{}) string { + return colorString(format, FgHiMagenta, a...) +} + +// HiCyanString is a convenient helper function to return a string with hi-intensity cyan +// foreground. +func HiCyanString(format string, a ...interface{}) string { return colorString(format, FgHiCyan, a...) } + +// HiWhiteString is a convenient helper function to return a string with hi-intensity white +// foreground. +func HiWhiteString(format string, a ...interface{}) string { + return colorString(format, FgHiWhite, a...) +} diff --git a/vendor/github.com/fatih/color/doc.go b/vendor/github.com/fatih/color/doc.go new file mode 100644 index 000000000..cf1e96500 --- /dev/null +++ b/vendor/github.com/fatih/color/doc.go @@ -0,0 +1,133 @@ +/* +Package color is an ANSI color package to output colorized or SGR defined +output to the standard output. The API can be used in several way, pick one +that suits you. + +Use simple and default helper functions with predefined foreground colors: + + color.Cyan("Prints text in cyan.") + + // a newline will be appended automatically + color.Blue("Prints %s in blue.", "text") + + // More default foreground colors.. + color.Red("We have red") + color.Yellow("Yellow color too!") + color.Magenta("And many others ..") + + // Hi-intensity colors + color.HiGreen("Bright green color.") + color.HiBlack("Bright black means gray..") + color.HiWhite("Shiny white color!") + +However there are times where custom color mixes are required. Below are some +examples to create custom color objects and use the print functions of each +separate color object. + + // Create a new color object + c := color.New(color.FgCyan).Add(color.Underline) + c.Println("Prints cyan text with an underline.") + + // Or just add them to New() + d := color.New(color.FgCyan, color.Bold) + d.Printf("This prints bold cyan %s\n", "too!.") + + + // Mix up foreground and background colors, create new mixes! + red := color.New(color.FgRed) + + boldRed := red.Add(color.Bold) + boldRed.Println("This will print text in bold red.") + + whiteBackground := red.Add(color.BgWhite) + whiteBackground.Println("Red text with White background.") + + // Use your own io.Writer output + color.New(color.FgBlue).Fprintln(myWriter, "blue color!") + + blue := color.New(color.FgBlue) + blue.Fprint(myWriter, "This will print text in blue.") + +You can create PrintXxx functions to simplify even more: + + // Create a custom print function for convenient + red := color.New(color.FgRed).PrintfFunc() + red("warning") + red("error: %s", err) + + // Mix up multiple attributes + notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() + notice("don't forget this...") + +You can also FprintXxx functions to pass your own io.Writer: + + blue := color.New(FgBlue).FprintfFunc() + blue(myWriter, "important notice: %s", stars) + + // Mix up with multiple attributes + success := color.New(color.Bold, color.FgGreen).FprintlnFunc() + success(myWriter, don't forget this...") + + +Or create SprintXxx functions to mix strings with other non-colorized strings: + + yellow := New(FgYellow).SprintFunc() + red := New(FgRed).SprintFunc() + + fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error")) + + info := New(FgWhite, BgGreen).SprintFunc() + fmt.Printf("this %s rocks!\n", info("package")) + +Windows support is enabled by default. All Print functions work as intended. +However only for color.SprintXXX functions, user should use fmt.FprintXXX and +set the output to color.Output: + + fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) + + info := New(FgWhite, BgGreen).SprintFunc() + fmt.Fprintf(color.Output, "this %s rocks!\n", info("package")) + +Using with existing code is possible. Just use the Set() method to set the +standard output to the given parameters. That way a rewrite of an existing +code is not required. + + // Use handy standard colors. + color.Set(color.FgYellow) + + fmt.Println("Existing text will be now in Yellow") + fmt.Printf("This one %s\n", "too") + + color.Unset() // don't forget to unset + + // You can mix up parameters + color.Set(color.FgMagenta, color.Bold) + defer color.Unset() // use it in your function + + fmt.Println("All text will be now bold magenta.") + +There might be a case where you want to disable color output (for example to +pipe the standard output of your app to somewhere else). `Color` has support to +disable colors both globally and for single color definition. For example +suppose you have a CLI app and a `--no-color` bool flag. You can easily disable +the color output with: + + var flagNoColor = flag.Bool("no-color", false, "Disable color output") + + if *flagNoColor { + color.NoColor = true // disables colorized output + } + +It also has support for single color definitions (local). You can +disable/enable color output on the fly: + + c := color.New(color.FgCyan) + c.Println("Prints cyan text") + + c.DisableColor() + c.Println("This is printed without any color") + + c.EnableColor() + c.Println("This prints again cyan...") +*/ +package color diff --git a/vendor/github.com/go-ini/ini/.gitignore b/vendor/github.com/go-ini/ini/.gitignore new file mode 100644 index 000000000..c5203bf6e --- /dev/null +++ b/vendor/github.com/go-ini/ini/.gitignore @@ -0,0 +1,5 @@ +testdata/conf_out.ini +ini.sublime-project +ini.sublime-workspace +testdata/conf_reflect.ini +.idea diff --git a/vendor/github.com/go-ini/ini/.travis.yml b/vendor/github.com/go-ini/ini/.travis.yml new file mode 100644 index 000000000..65c872bad --- /dev/null +++ b/vendor/github.com/go-ini/ini/.travis.yml @@ -0,0 +1,17 @@ +sudo: false +language: go +go: + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - master + +script: + - go get golang.org/x/tools/cmd/cover + - go get github.com/smartystreets/goconvey + - go test -v -cover -race + +notifications: + email: + - u@gogs.io diff --git a/vendor/github.com/go-ini/ini/Makefile b/vendor/github.com/go-ini/ini/Makefile new file mode 100644 index 000000000..ac034e525 --- /dev/null +++ b/vendor/github.com/go-ini/ini/Makefile @@ -0,0 +1,12 @@ +.PHONY: build test bench vet + +build: vet bench + +test: + go test -v -cover -race + +bench: + go test -v -cover -race -test.bench=. -test.benchmem + +vet: + go vet diff --git a/vendor/github.com/go-ini/ini/README.md b/vendor/github.com/go-ini/ini/README.md index c52f63a47..85947422d 100644 --- a/vendor/github.com/go-ini/ini/README.md +++ b/vendor/github.com/go-ini/ini/README.md @@ -1,4 +1,4 @@ -ini [![Build Status](https://drone.io/github.com/go-ini/ini/status.png)](https://drone.io/github.com/go-ini/ini/latest) [![](http://gocover.io/_badge/github.com/go-ini/ini)](http://gocover.io/github.com/go-ini/ini) +INI [![Build Status](https://travis-ci.org/go-ini/ini.svg?branch=master)](https://travis-ci.org/go-ini/ini) [![Sourcegraph](https://sourcegraph.com/github.com/go-ini/ini/-/badge.svg)](https://sourcegraph.com/github.com/go-ini/ini?badge) === ![](https://avatars0.githubusercontent.com/u/10216035?v=3&s=200) @@ -9,7 +9,7 @@ Package ini provides INI file read and write functionality in Go. ## Feature -- Load multiple data sources(`[]byte` or file) with overwrites. +- Load multiple data sources(`[]byte`, file and `io.ReadCloser`) with overwrites. - Read with recursion values. - Read with parent-child sections. - Read with auto-increment key names. @@ -30,20 +30,24 @@ To use with latest changes: go get github.com/go-ini/ini +Please add `-u` flag to update in the future. + ### Testing If you want to test on your machine, please apply `-t` flag: go get -t gopkg.in/ini.v1 +Please add `-u` flag to update in the future. + ## Getting Started ### Loading from data sources -A **Data Source** is either raw data in type `[]byte` or a file name with type `string` and you can load **as many as** data sources you want. Passing other types will simply return an error. +A **Data Source** is either raw data in type `[]byte`, a file name with type `string` or `io.ReadCloser`. You can load **as many data sources as you want**. Passing other types will simply return an error. ```go -cfg, err := ini.Load([]byte("raw data"), "filename") +cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data")))) ``` Or start with an empty object: @@ -52,12 +56,72 @@ Or start with an empty object: cfg := ini.Empty() ``` -When you cannot decide how many data sources to load at the beginning, you still able to **Append()** them later. +When you cannot decide how many data sources to load at the beginning, you will still be able to **Append()** them later. ```go err := cfg.Append("other file", []byte("other raw data")) ``` +If you have a list of files with possibilities that some of them may not available at the time, and you don't know exactly which ones, you can use `LooseLoad` to ignore nonexistent files without returning error. + +```go +cfg, err := ini.LooseLoad("filename", "filename_404") +``` + +The cool thing is, whenever the file is available to load while you're calling `Reload` method, it will be counted as usual. + +#### Ignore cases of key name + +When you do not care about cases of section and key names, you can use `InsensitiveLoad` to force all names to be lowercased while parsing. + +```go +cfg, err := ini.InsensitiveLoad("filename") +//... + +// sec1 and sec2 are the exactly same section object +sec1, err := cfg.GetSection("Section") +sec2, err := cfg.GetSection("SecTIOn") + +// key1 and key2 are the exactly same key object +key1, err := cfg.GetKey("Key") +key2, err := cfg.GetKey("KeY") +``` + +#### MySQL-like boolean key + +MySQL's configuration allows a key without value as follows: + +```ini +[mysqld] +... +skip-host-cache +skip-name-resolve +``` + +By default, this is considered as missing value. But if you know you're going to deal with those cases, you can assign advanced load options: + +```go +cfg, err := LoadSources(LoadOptions{AllowBooleanKeys: true}, "my.cnf")) +``` + +The value of those keys are always `true`, and when you save to a file, it will keep in the same foramt as you read. + +To generate such keys in your program, you could use `NewBooleanKey`: + +```go +key, err := sec.NewBooleanKey("skip-host-cache") +``` + +#### Comment + +Take care that following format will be treated as comment: + +1. Line begins with `#` or `;` +2. Words after `#` or `;` +3. Words after section name (i.e words after `[some section name]`) + +If you want to save a value with `#` or `;`, please quote them with ``` ` ``` or ``` """ ```. + ### Working with sections To get a section, you would need to: @@ -75,7 +139,7 @@ section, err := cfg.GetSection("") When you're pretty sure the section exists, following code could make your life easier: ```go -section := cfg.Section("") +section := cfg.Section("section name") ``` What happens when the section somehow does not exist? Don't panic, it automatically creates and returns a new section to you. @@ -129,7 +193,7 @@ names := cfg.Section("").KeyStrings() To get a clone hash of keys and corresponding values: ```go -hash := cfg.GetSection("").KeysHash() +hash := cfg.Section("").KeysHash() ``` ### Working with values @@ -242,6 +306,16 @@ cfg.Section("advance").Key("two_lines").String() // how about continuation lines cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4 ``` +Well, I hate continuation lines, how do I disable that? + +```go +cfg, err := ini.LoadSources(ini.LoadOptions{ + IgnoreContinuation: true, +}, "filename") +``` + +Holy crap! + Note that single quotes around values will be stripped: ```ini @@ -280,9 +354,13 @@ vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), min vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339 ``` -To auto-split value into slice: +##### Auto-split values into a slice + +To use zero value of type for invalid inputs: ```go +// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] +// Input: how, 2.2, are, you -> [0.0 2.2 0.0 0.0] vals = cfg.Section("").Key("STRINGS").Strings(",") vals = cfg.Section("").Key("FLOAT64S").Float64s(",") vals = cfg.Section("").Key("INTS").Ints(",") @@ -292,6 +370,32 @@ vals = cfg.Section("").Key("UINT64S").Uint64s(",") vals = cfg.Section("").Key("TIMES").Times(",") ``` +To exclude invalid values out of result slice: + +```go +// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] +// Input: how, 2.2, are, you -> [2.2] +vals = cfg.Section("").Key("FLOAT64S").ValidFloat64s(",") +vals = cfg.Section("").Key("INTS").ValidInts(",") +vals = cfg.Section("").Key("INT64S").ValidInt64s(",") +vals = cfg.Section("").Key("UINTS").ValidUints(",") +vals = cfg.Section("").Key("UINT64S").ValidUint64s(",") +vals = cfg.Section("").Key("TIMES").ValidTimes(",") +``` + +Or to return nothing but error when have invalid inputs: + +```go +// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] +// Input: how, 2.2, are, you -> error +vals = cfg.Section("").Key("FLOAT64S").StrictFloat64s(",") +vals = cfg.Section("").Key("INTS").StrictInts(",") +vals = cfg.Section("").Key("INT64S").StrictInt64s(",") +vals = cfg.Section("").Key("UINTS").StrictUints(",") +vals = cfg.Section("").Key("UINT64S").StrictUint64s(",") +vals = cfg.Section("").Key("TIMES").StrictTimes(",") +``` + ### Save your configuration Finally, it's time to save your configuration to somewhere. @@ -312,6 +416,12 @@ cfg.WriteTo(writer) cfg.WriteToIndent(writer, "\t") ``` +By default, spaces are used to align "=" sign between key and values, to disable that: + +```go +ini.PrettyFormat = false +``` + ## Advanced Usage ### Recursive Values @@ -353,6 +463,27 @@ CLONE_URL = https://%(IMPORT_PATH)s cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1 ``` +#### Retrieve parent keys available to a child section + +```go +cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"] +``` + +### Unparseable Sections + +Sometimes, you have sections that do not contain key-value pairs but raw content, to handle such case, you can use `LoadOptions.UnparsableSections`: + +```go +cfg, err := LoadSources(LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS] +<1> This slide has the fuel listed in the wrong units `)) + +body := cfg.Section("COMMENTS").Body() + +/* --- start --- +<1> This slide has the fuel listed in the wrong units +------ end --- */ +``` + ### Auto-increment Key Names If key name is `-` in data source, then it would be seen as special syntax for auto-increment key name start from 1, and every section is independent on counter. @@ -437,8 +568,8 @@ Why not? ```go type Embeded struct { Dates []time.Time `delim:"|"` - Places []string - None []int + Places []string `ini:"places,omitempty"` + None []int `ini:",omitempty"` } type Author struct { @@ -473,8 +604,7 @@ GPA = 2.8 [Embeded] Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00 -Places = HangZhou,Boston -None = +places = HangZhou,Boston ``` #### Name Mapper @@ -508,6 +638,26 @@ func main() { Same rules of name mapper apply to `ini.ReflectFromWithMapper` function. +#### Value Mapper + +To expand values (e.g. from environment variables), you can use the `ValueMapper` to transform values: + +```go +type Env struct { + Foo string `ini:"foo"` +} + +func main() { + cfg, err := ini.Load([]byte("[env]\nfoo = ${MY_VAR}\n") + cfg.ValueMapper = os.ExpandEnv + // ... + env := &Env{} + err = cfg.Section("env").MapTo(env) +} +``` + +This would set the value of `env.Foo` to the value of the environment variable `MY_VAR`. + #### Other Notes On Map/Reflect Any embedded struct is treated as a section by default, and there is no automatic parent-child relations in map/reflect feature: diff --git a/vendor/github.com/go-ini/ini/README_ZH.md b/vendor/github.com/go-ini/ini/README_ZH.md index ce6d8eb45..163432db9 100644 --- a/vendor/github.com/go-ini/ini/README_ZH.md +++ b/vendor/github.com/go-ini/ini/README_ZH.md @@ -2,7 +2,7 @@ ## 功能特性 -- 支持覆盖加载多个数据源(`[]byte` 或文件) +- 支持覆盖加载多个数据源(`[]byte`、文件和 `io.ReadCloser`) - 支持递归读取键值 - 支持读取父子分区 - 支持读取自增键名 @@ -23,20 +23,24 @@ go get github.com/go-ini/ini +如需更新请添加 `-u` 选项。 + ### 测试安装 如果您想要在自己的机器上运行测试,请使用 `-t` 标记: go get -t gopkg.in/ini.v1 +如需更新请添加 `-u` 选项。 + ## 开始使用 ### 从数据源加载 -一个 **数据源** 可以是 `[]byte` 类型的原始数据,或 `string` 类型的文件路径。您可以加载 **任意多个** 数据源。如果您传递其它类型的数据源,则会直接返回错误。 +一个 **数据源** 可以是 `[]byte` 类型的原始数据,`string` 类型的文件路径或 `io.ReadCloser`。您可以加载 **任意多个** 数据源。如果您传递其它类型的数据源,则会直接返回错误。 ```go -cfg, err := ini.Load([]byte("raw data"), "filename") +cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data")))) ``` 或者从一个空白的文件开始: @@ -51,6 +55,66 @@ cfg := ini.Empty() err := cfg.Append("other file", []byte("other raw data")) ``` +当您想要加载一系列文件,但是不能够确定其中哪些文件是不存在的,可以通过调用函数 `LooseLoad` 来忽略它们(`Load` 会因为文件不存在而返回错误): + +```go +cfg, err := ini.LooseLoad("filename", "filename_404") +``` + +更牛逼的是,当那些之前不存在的文件在重新调用 `Reload` 方法的时候突然出现了,那么它们会被正常加载。 + +#### 忽略键名的大小写 + +有时候分区和键的名称大小写混合非常烦人,这个时候就可以通过 `InsensitiveLoad` 将所有分区和键名在读取里强制转换为小写: + +```go +cfg, err := ini.InsensitiveLoad("filename") +//... + +// sec1 和 sec2 指向同一个分区对象 +sec1, err := cfg.GetSection("Section") +sec2, err := cfg.GetSection("SecTIOn") + +// key1 和 key2 指向同一个键对象 +key1, err := cfg.GetKey("Key") +key2, err := cfg.GetKey("KeY") +``` + +#### 类似 MySQL 配置中的布尔值键 + +MySQL 的配置文件中会出现没有具体值的布尔类型的键: + +```ini +[mysqld] +... +skip-host-cache +skip-name-resolve +``` + +默认情况下这被认为是缺失值而无法完成解析,但可以通过高级的加载选项对它们进行处理: + +```go +cfg, err := LoadSources(LoadOptions{AllowBooleanKeys: true}, "my.cnf")) +``` + +这些键的值永远为 `true`,且在保存到文件时也只会输出键名。 + +如果您想要通过程序来生成此类键,则可以使用 `NewBooleanKey`: + +```go +key, err := sec.NewBooleanKey("skip-host-cache") +``` + +#### 关于注释 + +下述几种情况的内容将被视为注释: + +1. 所有以 `#` 或 `;` 开头的行 +2. 所有在 `#` 或 `;` 之后的内容 +3. 分区标签后的文字 (即 `[分区名]` 之后的内容) + +如果你希望使用包含 `#` 或 `;` 的值,请使用 ``` ` ``` 或 ``` """ ``` 进行包覆。 + ### 操作分区(Section) 获取指定分区: @@ -68,7 +132,7 @@ section, err := cfg.GetSection("") 当您非常确定某个分区是存在的,可以使用以下简便方法: ```go -section := cfg.Section("") +section := cfg.Section("section name") ``` 如果不小心判断错了,要获取的分区其实是不存在的,那会发生什么呢?没事的,它会自动创建并返回一个对应的分区对象给您。 @@ -122,7 +186,7 @@ names := cfg.Section("").KeyStrings() 获取分区下的所有键值对的克隆: ```go -hash := cfg.GetSection("").KeysHash() +hash := cfg.Section("").KeysHash() ``` ### 操作键值(Value) @@ -235,6 +299,16 @@ cfg.Section("advance").Key("two_lines").String() // how about continuation lines cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4 ``` +可是我有时候觉得两行连在一起特别没劲,怎么才能不自动连接两行呢? + +```go +cfg, err := ini.LoadSources(ini.LoadOptions{ + IgnoreContinuation: true, +}, "filename") +``` + +哇靠给力啊! + 需要注意的是,值两侧的单引号会被自动剔除: ```ini @@ -273,9 +347,13 @@ vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), min vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339 ``` -自动分割键值为切片(slice): +##### 自动分割键值到切片(slice) + +当存在无效输入时,使用零值代替: ```go +// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] +// Input: how, 2.2, are, you -> [0.0 2.2 0.0 0.0] vals = cfg.Section("").Key("STRINGS").Strings(",") vals = cfg.Section("").Key("FLOAT64S").Float64s(",") vals = cfg.Section("").Key("INTS").Ints(",") @@ -285,6 +363,32 @@ vals = cfg.Section("").Key("UINT64S").Uint64s(",") vals = cfg.Section("").Key("TIMES").Times(",") ``` +从结果切片中剔除无效输入: + +```go +// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] +// Input: how, 2.2, are, you -> [2.2] +vals = cfg.Section("").Key("FLOAT64S").ValidFloat64s(",") +vals = cfg.Section("").Key("INTS").ValidInts(",") +vals = cfg.Section("").Key("INT64S").ValidInt64s(",") +vals = cfg.Section("").Key("UINTS").ValidUints(",") +vals = cfg.Section("").Key("UINT64S").ValidUint64s(",") +vals = cfg.Section("").Key("TIMES").ValidTimes(",") +``` + +当存在无效输入时,直接返回错误: + +```go +// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] +// Input: how, 2.2, are, you -> error +vals = cfg.Section("").Key("FLOAT64S").StrictFloat64s(",") +vals = cfg.Section("").Key("INTS").StrictInts(",") +vals = cfg.Section("").Key("INT64S").StrictInt64s(",") +vals = cfg.Section("").Key("UINTS").StrictUints(",") +vals = cfg.Section("").Key("UINT64S").StrictUint64s(",") +vals = cfg.Section("").Key("TIMES").StrictTimes(",") +``` + ### 保存配置 终于到了这个时刻,是时候保存一下配置了。 @@ -305,9 +409,15 @@ cfg.WriteTo(writer) cfg.WriteToIndent(writer, "\t") ``` -### 高级用法 +默认情况下,空格将被用于对齐键值之间的等号以美化输出结果,以下代码可以禁用该功能: -#### 递归读取键值 +```go +ini.PrettyFormat = false +``` + +## 高级用法 + +### 递归读取键值 在获取所有键值的过程中,特殊语法 `%()s` 会被应用,其中 `` 可以是相同分区或者默认分区下的键名。字符串 `%()s` 会被相应的键值所替代,如果指定的键不存在,则会用空字符串替代。您可以最多使用 99 层的递归嵌套。 @@ -327,7 +437,7 @@ cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini ``` -#### 读取父子分区 +### 读取父子分区 您可以在分区名称中使用 `.` 来表示两个或多个分区之间的父子关系。如果某个键在子分区中不存在,则会去它的父分区中再次寻找,直到没有父分区为止。 @@ -346,7 +456,28 @@ CLONE_URL = https://%(IMPORT_PATH)s cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1 ``` -#### 读取自增键名 +#### 获取上级父分区下的所有键名 + +```go +cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"] +``` + +### 无法解析的分区 + +如果遇到一些比较特殊的分区,它们不包含常见的键值对,而是没有固定格式的纯文本,则可以使用 `LoadOptions.UnparsableSections` 进行处理: + +```go +cfg, err := LoadSources(LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS] +<1> This slide has the fuel listed in the wrong units `)) + +body := cfg.Section("COMMENTS").Body() + +/* --- start --- +<1> This slide has the fuel listed in the wrong units +------ end --- */ +``` + +### 读取自增键名 如果数据源中的键名为 `-`,则认为该键使用了自增键名的特殊语法。计数器从 1 开始,并且分区之间是相互独立的。 @@ -428,8 +559,8 @@ p := &Person{ ```go type Embeded struct { Dates []time.Time `delim:"|"` - Places []string - None []int + Places []string `ini:"places,omitempty"` + None []int `ini:",omitempty"` } type Author struct { @@ -464,8 +595,7 @@ GPA = 2.8 [Embeded] Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00 -Places = HangZhou,Boston -None = +places = HangZhou,Boston ``` #### 名称映射器(Name Mapper) @@ -499,6 +629,26 @@ func main() { 使用函数 `ini.ReflectFromWithMapper` 时也可应用相同的规则。 +#### 值映射器(Value Mapper) + +值映射器允许使用一个自定义函数自动展开值的具体内容,例如:运行时获取环境变量: + +```go +type Env struct { + Foo string `ini:"foo"` +} + +func main() { + cfg, err := ini.Load([]byte("[env]\nfoo = ${MY_VAR}\n") + cfg.ValueMapper = os.ExpandEnv + // ... + env := &Env{} + err = cfg.Section("env").MapTo(env) +} +``` + +本例中,`env.Foo` 将会是运行时所获取到环境变量 `MY_VAR` 的值。 + #### 映射/反射的其它说明 任何嵌入的结构都会被默认认作一个不同的分区,并且不会自动产生所谓的父子分区关联: diff --git a/vendor/github.com/go-ini/ini/error.go b/vendor/github.com/go-ini/ini/error.go new file mode 100644 index 000000000..80afe7431 --- /dev/null +++ b/vendor/github.com/go-ini/ini/error.go @@ -0,0 +1,32 @@ +// Copyright 2016 Unknwon +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +package ini + +import ( + "fmt" +) + +type ErrDelimiterNotFound struct { + Line string +} + +func IsErrDelimiterNotFound(err error) bool { + _, ok := err.(ErrDelimiterNotFound) + return ok +} + +func (err ErrDelimiterNotFound) Error() string { + return fmt.Sprintf("key-value delimiter not found: %s", err.Line) +} diff --git a/vendor/github.com/go-ini/ini/ini.go b/vendor/github.com/go-ini/ini/ini.go index 1a27f0680..68d73aa75 100644 --- a/vendor/github.com/go-ini/ini/ini.go +++ b/vendor/github.com/go-ini/ini/ini.go @@ -20,6 +20,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "os" "regexp" "runtime" @@ -30,25 +31,35 @@ import ( ) const ( + // Name for default section. You can use this constant or the string literal. + // In most of cases, an empty string is all you need to access the section. DEFAULT_SECTION = "DEFAULT" + // Maximum allowed depth when recursively substituing variable names. _DEPTH_VALUES = 99 - - _VERSION = "1.8.6" + _VERSION = "1.25.4" ) +// Version returns current package version literal. func Version() string { return _VERSION } var ( + // Delimiter to determine or compose a new line. + // This variable will be changed to "\r\n" automatically on Windows + // at package init time. LineBreak = "\n" // Variable regexp pattern: %(variable)s varPattern = regexp.MustCompile(`%\(([^\)]+)\)s`) - // Write spaces around "=" to look better. + // Indicate whether to align "=" sign with spaces to produce pretty output + // or reduce all possible spaces for compact format. PrettyFormat = true + + // Explicitly write DEFAULT section header + DefaultHeader = false ) func init() { @@ -66,11 +77,12 @@ func inSlice(str string, s []string) bool { return false } -// dataSource is a interface that returns file content. +// dataSource is an interface that returns object which can be read and closed. type dataSource interface { ReadCloser() (io.ReadCloser, error) } +// sourceFile represents an object that contains content on the local file system. type sourceFile struct { name string } @@ -91,629 +103,24 @@ func (rc *bytesReadCloser) Close() error { return nil } +// sourceData represents an object that contains content in memory. type sourceData struct { data []byte } func (s *sourceData) ReadCloser() (io.ReadCloser, error) { - return &bytesReadCloser{bytes.NewReader(s.data)}, nil + return ioutil.NopCloser(bytes.NewReader(s.data)), nil } -// ____ __. -// | |/ _|____ ___.__. -// | <_/ __ < | | -// | | \ ___/\___ | -// |____|__ \___ > ____| -// \/ \/\/ - -// Key represents a key under a section. -type Key struct { - s *Section - Comment string - name string - value string - isAutoIncr bool +// sourceReadCloser represents an input stream with Close method. +type sourceReadCloser struct { + reader io.ReadCloser } -// Name returns name of key. -func (k *Key) Name() string { - return k.name +func (s *sourceReadCloser) ReadCloser() (io.ReadCloser, error) { + return s.reader, nil } -// Value returns raw value of key for performance purpose. -func (k *Key) Value() string { - return k.value -} - -// String returns string representation of value. -func (k *Key) String() string { - val := k.value - if strings.Index(val, "%") == -1 { - return val - } - - for i := 0; i < _DEPTH_VALUES; i++ { - vr := varPattern.FindString(val) - if len(vr) == 0 { - break - } - - // Take off leading '%(' and trailing ')s'. - noption := strings.TrimLeft(vr, "%(") - noption = strings.TrimRight(noption, ")s") - - // Search in the same section. - nk, err := k.s.GetKey(noption) - if err != nil { - // Search again in default section. - nk, _ = k.s.f.Section("").GetKey(noption) - } - - // Substitute by new value and take off leading '%(' and trailing ')s'. - val = strings.Replace(val, vr, nk.value, -1) - } - return val -} - -// Validate accepts a validate function which can -// return modifed result as key value. -func (k *Key) Validate(fn func(string) string) string { - return fn(k.String()) -} - -// parseBool returns the boolean value represented by the string. -// -// It accepts 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On, -// 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off. -// Any other value returns an error. -func parseBool(str string) (value bool, err error) { - switch str { - case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "y", "ON", "on", "On": - return true, nil - case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "n", "OFF", "off", "Off": - return false, nil - } - return false, fmt.Errorf("parsing \"%s\": invalid syntax", str) -} - -// Bool returns bool type value. -func (k *Key) Bool() (bool, error) { - return parseBool(k.String()) -} - -// Float64 returns float64 type value. -func (k *Key) Float64() (float64, error) { - return strconv.ParseFloat(k.String(), 64) -} - -// Int returns int type value. -func (k *Key) Int() (int, error) { - return strconv.Atoi(k.String()) -} - -// Int64 returns int64 type value. -func (k *Key) Int64() (int64, error) { - return strconv.ParseInt(k.String(), 10, 64) -} - -// Uint returns uint type valued. -func (k *Key) Uint() (uint, error) { - u, e := strconv.ParseUint(k.String(), 10, 64) - return uint(u), e -} - -// Uint64 returns uint64 type value. -func (k *Key) Uint64() (uint64, error) { - return strconv.ParseUint(k.String(), 10, 64) -} - -// Duration returns time.Duration type value. -func (k *Key) Duration() (time.Duration, error) { - return time.ParseDuration(k.String()) -} - -// TimeFormat parses with given format and returns time.Time type value. -func (k *Key) TimeFormat(format string) (time.Time, error) { - return time.Parse(format, k.String()) -} - -// Time parses with RFC3339 format and returns time.Time type value. -func (k *Key) Time() (time.Time, error) { - return k.TimeFormat(time.RFC3339) -} - -// MustString returns default value if key value is empty. -func (k *Key) MustString(defaultVal string) string { - val := k.String() - if len(val) == 0 { - return defaultVal - } - return val -} - -// MustBool always returns value without error, -// it returns false if error occurs. -func (k *Key) MustBool(defaultVal ...bool) bool { - val, err := k.Bool() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustFloat64 always returns value without error, -// it returns 0.0 if error occurs. -func (k *Key) MustFloat64(defaultVal ...float64) float64 { - val, err := k.Float64() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustInt always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt(defaultVal ...int) int { - val, err := k.Int() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustInt64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt64(defaultVal ...int64) int64 { - val, err := k.Int64() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustUint always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint(defaultVal ...uint) uint { - val, err := k.Uint() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustUint64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint64(defaultVal ...uint64) uint64 { - val, err := k.Uint64() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustDuration always returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustDuration(defaultVal ...time.Duration) time.Duration { - val, err := k.Duration() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustTimeFormat always parses with given format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTimeFormat(format string, defaultVal ...time.Time) time.Time { - val, err := k.TimeFormat(format) - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustTime always parses with RFC3339 format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTime(defaultVal ...time.Time) time.Time { - return k.MustTimeFormat(time.RFC3339, defaultVal...) -} - -// In always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) In(defaultVal string, candidates []string) string { - val := k.String() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InFloat64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InFloat64(defaultVal float64, candidates []float64) float64 { - val := k.MustFloat64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt(defaultVal int, candidates []int) int { - val := k.MustInt() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt64(defaultVal int64, candidates []int64) int64 { - val := k.MustInt64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint(defaultVal uint, candidates []uint) uint { - val := k.MustUint() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint64(defaultVal uint64, candidates []uint64) uint64 { - val := k.MustUint64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTimeFormat always parses with given format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTimeFormat(format string, defaultVal time.Time, candidates []time.Time) time.Time { - val := k.MustTimeFormat(format) - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTime always parses with RFC3339 format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTime(defaultVal time.Time, candidates []time.Time) time.Time { - return k.InTimeFormat(time.RFC3339, defaultVal, candidates) -} - -// RangeFloat64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeFloat64(defaultVal, min, max float64) float64 { - val := k.MustFloat64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt(defaultVal, min, max int) int { - val := k.MustInt() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt64(defaultVal, min, max int64) int64 { - val := k.MustInt64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeTimeFormat checks if value with given format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTimeFormat(format string, defaultVal, min, max time.Time) time.Time { - val := k.MustTimeFormat(format) - if val.Unix() < min.Unix() || val.Unix() > max.Unix() { - return defaultVal - } - return val -} - -// RangeTime checks if value with RFC3339 format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTime(defaultVal, min, max time.Time) time.Time { - return k.RangeTimeFormat(time.RFC3339, defaultVal, min, max) -} - -// Strings returns list of string divided by given delimiter. -func (k *Key) Strings(delim string) []string { - str := k.String() - if len(str) == 0 { - return []string{} - } - - vals := strings.Split(str, delim) - for i := range vals { - vals[i] = strings.TrimSpace(vals[i]) - } - return vals -} - -// Float64s returns list of float64 divided by given delimiter. -func (k *Key) Float64s(delim string) []float64 { - strs := k.Strings(delim) - vals := make([]float64, len(strs)) - for i := range strs { - vals[i], _ = strconv.ParseFloat(strs[i], 64) - } - return vals -} - -// Ints returns list of int divided by given delimiter. -func (k *Key) Ints(delim string) []int { - strs := k.Strings(delim) - vals := make([]int, len(strs)) - for i := range strs { - vals[i], _ = strconv.Atoi(strs[i]) - } - return vals -} - -// Int64s returns list of int64 divided by given delimiter. -func (k *Key) Int64s(delim string) []int64 { - strs := k.Strings(delim) - vals := make([]int64, len(strs)) - for i := range strs { - vals[i], _ = strconv.ParseInt(strs[i], 10, 64) - } - return vals -} - -// Uints returns list of uint divided by given delimiter. -func (k *Key) Uints(delim string) []uint { - strs := k.Strings(delim) - vals := make([]uint, len(strs)) - for i := range strs { - u, _ := strconv.ParseUint(strs[i], 10, 0) - vals[i] = uint(u) - } - return vals -} - -// Uint64s returns list of uint64 divided by given delimiter. -func (k *Key) Uint64s(delim string) []uint64 { - strs := k.Strings(delim) - vals := make([]uint64, len(strs)) - for i := range strs { - vals[i], _ = strconv.ParseUint(strs[i], 10, 64) - } - return vals -} - -// TimesFormat parses with given format and returns list of time.Time divided by given delimiter. -func (k *Key) TimesFormat(format, delim string) []time.Time { - strs := k.Strings(delim) - vals := make([]time.Time, len(strs)) - for i := range strs { - vals[i], _ = time.Parse(format, strs[i]) - } - return vals -} - -// Times parses with RFC3339 format and returns list of time.Time divided by given delimiter. -func (k *Key) Times(delim string) []time.Time { - return k.TimesFormat(time.RFC3339, delim) -} - -// SetValue changes key value. -func (k *Key) SetValue(v string) { - if k.s.f.BlockMode { - k.s.f.lock.Lock() - defer k.s.f.lock.Unlock() - } - - k.value = v - k.s.keysHash[k.name] = v -} - -// _________ __ .__ -// / _____/ ____ _____/ |_|__| ____ ____ -// \_____ \_/ __ \_/ ___\ __\ |/ _ \ / \ -// / \ ___/\ \___| | | ( <_> ) | \ -// /_______ /\___ >\___ >__| |__|\____/|___| / -// \/ \/ \/ \/ - -// Section represents a config section. -type Section struct { - f *File - Comment string - name string - keys map[string]*Key - keyList []string - keysHash map[string]string -} - -func newSection(f *File, name string) *Section { - return &Section{f, "", name, make(map[string]*Key), make([]string, 0, 10), make(map[string]string)} -} - -// Name returns name of Section. -func (s *Section) Name() string { - return s.name -} - -// NewKey creates a new key to given section. -func (s *Section) NewKey(name, val string) (*Key, error) { - if len(name) == 0 { - return nil, errors.New("error creating new key: empty key name") - } - - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - if inSlice(name, s.keyList) { - s.keys[name].value = val - return s.keys[name], nil - } - - s.keyList = append(s.keyList, name) - s.keys[name] = &Key{s, "", name, val, false} - s.keysHash[name] = val - return s.keys[name], nil -} - -// GetKey returns key in section by given name. -func (s *Section) GetKey(name string) (*Key, error) { - // FIXME: change to section level lock? - if s.f.BlockMode { - s.f.lock.RLock() - } - key := s.keys[name] - if s.f.BlockMode { - s.f.lock.RUnlock() - } - - if key == nil { - // Check if it is a child-section. - sname := s.name - for { - if i := strings.LastIndex(sname, "."); i > -1 { - sname = sname[:i] - sec, err := s.f.GetSection(sname) - if err != nil { - continue - } - return sec.GetKey(name) - } else { - break - } - } - return nil, fmt.Errorf("error when getting key of section '%s': key '%s' not exists", s.name, name) - } - return key, nil -} - -// HasKey returns true if section contains a key with given name. -func (s *Section) HasKey(name string) bool { - key, _ := s.GetKey(name) - return key != nil -} - -// Haskey is a backwards-compatible name for HasKey. -func (s *Section) Haskey(name string) bool { - return s.HasKey(name) -} - -// HasValue returns true if section contains given raw value. -func (s *Section) HasValue(value string) bool { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - for _, k := range s.keys { - if value == k.value { - return true - } - } - return false -} - -// Key assumes named Key exists in section and returns a zero-value when not. -func (s *Section) Key(name string) *Key { - key, err := s.GetKey(name) - if err != nil { - // It's OK here because the only possible error is empty key name, - // but if it's empty, this piece of code won't be executed. - key, _ = s.NewKey(name, "") - return key - } - return key -} - -// Keys returns list of keys of section. -func (s *Section) Keys() []*Key { - keys := make([]*Key, len(s.keyList)) - for i := range s.keyList { - keys[i] = s.Key(s.keyList[i]) - } - return keys -} - -// KeyStrings returns list of key names of section. -func (s *Section) KeyStrings() []string { - list := make([]string, len(s.keyList)) - copy(list, s.keyList) - return list -} - -// KeysHash returns keys hash consisting of names and values. -func (s *Section) KeysHash() map[string]string { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - hash := map[string]string{} - for key, value := range s.keysHash { - hash[key] = value - } - return hash -} - -// DeleteKey deletes a key from section. -func (s *Section) DeleteKey(name string) { - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - for i, k := range s.keyList { - if k == name { - s.keyList = append(s.keyList[:i], s.keyList[i+1:]...) - delete(s.keys, name) - return - } - } -} - -// ___________.__.__ -// \_ _____/|__| | ____ -// | __) | | | _/ __ \ -// | \ | | |_\ ___/ -// \___ / |__|____/\___ > -// \/ \/ - // File represents a combination of a or more INI file(s) in memory. type File struct { // Should make things safe, but sometimes doesn't matter. @@ -729,16 +136,20 @@ type File struct { // To keep data in order. sectionList []string + options LoadOptions + NameMapper + ValueMapper } // newFile initializes File object with given data sources. -func newFile(dataSources []dataSource) *File { +func newFile(dataSources []dataSource, opts LoadOptions) *File { return &File{ BlockMode: true, dataSources: dataSources, sections: make(map[string]*Section), sectionList: make([]string, 0, 10), + options: opts, } } @@ -748,14 +159,31 @@ func parseDataSource(source interface{}) (dataSource, error) { return sourceFile{s}, nil case []byte: return &sourceData{s}, nil + case io.ReadCloser: + return &sourceReadCloser{s}, nil default: return nil, fmt.Errorf("error parsing data source: unknown type '%s'", s) } } -// Load loads and parses from INI data sources. -// Arguments can be mixed of file name with string type, or raw data in []byte. -func Load(source interface{}, others ...interface{}) (_ *File, err error) { +type LoadOptions struct { + // Loose indicates whether the parser should ignore nonexistent files or return error. + Loose bool + // Insensitive indicates whether the parser forces all section and key names to lowercase. + Insensitive bool + // IgnoreContinuation indicates whether to ignore continuation lines while parsing. + IgnoreContinuation bool + // AllowBooleanKeys indicates whether to allow boolean type keys or treat as value is missing. + // This type of keys are mostly used in my.cnf. + AllowBooleanKeys bool + // AllowShadows indicates whether to keep track of keys with same name under same section. + AllowShadows bool + // Some INI formats allow group blocks that store a block of raw content that doesn't otherwise + // conform to key/value pairs. Specify the names of those blocks here. + UnparseableSections []string +} + +func LoadSources(opts LoadOptions, source interface{}, others ...interface{}) (_ *File, err error) { sources := make([]dataSource, len(others)+1) sources[0], err = parseDataSource(source) if err != nil { @@ -767,13 +195,38 @@ func Load(source interface{}, others ...interface{}) (_ *File, err error) { return nil, err } } - f := newFile(sources) + f := newFile(sources, opts) if err = f.Reload(); err != nil { return nil, err } return f, nil } +// Load loads and parses from INI data sources. +// Arguments can be mixed of file name with string type, or raw data in []byte. +// It will return error if list contains nonexistent files. +func Load(source interface{}, others ...interface{}) (*File, error) { + return LoadSources(LoadOptions{}, source, others...) +} + +// LooseLoad has exactly same functionality as Load function +// except it ignores nonexistent files instead of returning error. +func LooseLoad(source interface{}, others ...interface{}) (*File, error) { + return LoadSources(LoadOptions{Loose: true}, source, others...) +} + +// InsensitiveLoad has exactly same functionality as Load function +// except it forces all section and key names to be lowercased. +func InsensitiveLoad(source interface{}, others ...interface{}) (*File, error) { + return LoadSources(LoadOptions{Insensitive: true}, source, others...) +} + +// InsensitiveLoad has exactly same functionality as Load function +// except it allows have shadow keys. +func ShadowLoad(source interface{}, others ...interface{}) (*File, error) { + return LoadSources(LoadOptions{AllowShadows: true}, source, others...) +} + // Empty returns an empty file object. func Empty() *File { // Ignore error here, we sure our data is good. @@ -785,6 +238,8 @@ func Empty() *File { func (f *File) NewSection(name string) (*Section, error) { if len(name) == 0 { return nil, errors.New("error creating new section: empty section name") + } else if f.options.Insensitive && name != DEFAULT_SECTION { + name = strings.ToLower(name) } if f.BlockMode { @@ -801,6 +256,18 @@ func (f *File) NewSection(name string) (*Section, error) { return f.sections[name], nil } +// NewRawSection creates a new section with an unparseable body. +func (f *File) NewRawSection(name, body string) (*Section, error) { + section, err := f.NewSection(name) + if err != nil { + return nil, err + } + + section.isRawSection = true + section.rawBody = body + return section, nil +} + // NewSections creates a list of sections. func (f *File) NewSections(names ...string) (err error) { for _, name := range names { @@ -815,6 +282,8 @@ func (f *File) NewSections(names ...string) (err error) { func (f *File) GetSection(name string) (*Section, error) { if len(name) == 0 { name = DEFAULT_SECTION + } else if f.options.Insensitive { + name = strings.ToLower(name) } if f.BlockMode { @@ -824,7 +293,7 @@ func (f *File) GetSection(name string) (*Section, error) { sec := f.sections[name] if sec == nil { - return nil, fmt.Errorf("error when getting section: section '%s' not exists", name) + return nil, fmt.Errorf("section '%s' does not exist", name) } return sec, nil } @@ -891,6 +360,11 @@ func (f *File) reload(s dataSource) error { func (f *File) Reload() (err error) { for _, s := range f.dataSources { if err = f.reload(s); err != nil { + // In loose mode, we create an empty default section for nonexistent files. + if os.IsNotExist(err) && f.options.Loose { + f.parse(bytes.NewBuffer(nil)) + continue + } return err } } @@ -914,7 +388,9 @@ func (f *File) Append(source interface{}, others ...interface{}) error { return f.Reload() } -// WriteToIndent writes file content into io.Writer with given value indention. +// WriteToIndent writes content into io.Writer with given indention. +// If PrettyFormat has been set to be true, +// it will align "=" sign with spaces under each section. func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { equalSign := "=" if PrettyFormat { @@ -934,17 +410,46 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { } } - if i > 0 { + if i > 0 || DefaultHeader { if _, err = buf.WriteString("[" + sname + "]" + LineBreak); err != nil { return 0, err } } else { - // Write nothing if default section is empty. + // Write nothing if default section is empty if len(sec.keyList) == 0 { continue } } + if sec.isRawSection { + if _, err = buf.WriteString(sec.rawBody); err != nil { + return 0, err + } + continue + } + + // Count and generate alignment length and buffer spaces using the + // longest key. Keys may be modifed if they contain certain characters so + // we need to take that into account in our calculation. + alignLength := 0 + if PrettyFormat { + for _, kname := range sec.keyList { + keyLength := len(kname) + // First case will surround key by ` and second by """ + if strings.ContainsAny(kname, "\"=:") { + keyLength += 2 + } else if strings.Contains(kname, "`") { + keyLength += 6 + } + + if keyLength > alignLength { + alignLength = keyLength + } + } + } + alignSpaces := bytes.Repeat([]byte(" "), alignLength) + + KEY_LIST: for _, kname := range sec.keyList { key := sec.Key(kname) if len(key.Comment) > 0 { @@ -964,7 +469,7 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { } switch { - case key.isAutoIncr: + case key.isAutoIncrement: kname = "-" case strings.ContainsAny(kname, "\"=:"): kname = "`" + kname + "`" @@ -972,19 +477,36 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { kname = `"""` + kname + `"""` } - val := key.value - // In case key value contains "\n", "`", "\"", "#" or ";". - if strings.ContainsAny(val, "\n`") { - val = `"""` + val + `"""` - } else if strings.ContainsAny(val, "#;") { - val = "`" + val + "`" - } - if _, err = buf.WriteString(kname + equalSign + val + LineBreak); err != nil { - return 0, err + for _, val := range key.ValueWithShadows() { + if _, err = buf.WriteString(kname); err != nil { + return 0, err + } + + if key.isBooleanType { + if kname != sec.keyList[len(sec.keyList)-1] { + buf.WriteString(LineBreak) + } + continue KEY_LIST + } + + // Write out alignment spaces before "=" sign + if PrettyFormat { + buf.Write(alignSpaces[:alignLength-len(kname)]) + } + + // In case key value contains "\n", "`", "\"", "#" or ";" + if strings.ContainsAny(val, "\n`") { + val = `"""` + val + `"""` + } else if strings.ContainsAny(val, "#;") { + val = "`" + val + "`" + } + if _, err = buf.WriteString(equalSign + val + LineBreak); err != nil { + return 0, err + } } } - // Put a line between sections. + // Put a line between sections if _, err = buf.WriteString(LineBreak); err != nil { return 0, err } diff --git a/vendor/github.com/go-ini/ini/key.go b/vendor/github.com/go-ini/ini/key.go new file mode 100644 index 000000000..852696f4c --- /dev/null +++ b/vendor/github.com/go-ini/ini/key.go @@ -0,0 +1,703 @@ +// Copyright 2014 Unknwon +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +package ini + +import ( + "errors" + "fmt" + "strconv" + "strings" + "time" +) + +// Key represents a key under a section. +type Key struct { + s *Section + name string + value string + isAutoIncrement bool + isBooleanType bool + + isShadow bool + shadows []*Key + + Comment string +} + +// newKey simply return a key object with given values. +func newKey(s *Section, name, val string) *Key { + return &Key{ + s: s, + name: name, + value: val, + } +} + +func (k *Key) addShadow(val string) error { + if k.isShadow { + return errors.New("cannot add shadow to another shadow key") + } else if k.isAutoIncrement || k.isBooleanType { + return errors.New("cannot add shadow to auto-increment or boolean key") + } + + shadow := newKey(k.s, k.name, val) + shadow.isShadow = true + k.shadows = append(k.shadows, shadow) + return nil +} + +// AddShadow adds a new shadow key to itself. +func (k *Key) AddShadow(val string) error { + if !k.s.f.options.AllowShadows { + return errors.New("shadow key is not allowed") + } + return k.addShadow(val) +} + +// ValueMapper represents a mapping function for values, e.g. os.ExpandEnv +type ValueMapper func(string) string + +// Name returns name of key. +func (k *Key) Name() string { + return k.name +} + +// Value returns raw value of key for performance purpose. +func (k *Key) Value() string { + return k.value +} + +// ValueWithShadows returns raw values of key and its shadows if any. +func (k *Key) ValueWithShadows() []string { + if len(k.shadows) == 0 { + return []string{k.value} + } + vals := make([]string, len(k.shadows)+1) + vals[0] = k.value + for i := range k.shadows { + vals[i+1] = k.shadows[i].value + } + return vals +} + +// transformValue takes a raw value and transforms to its final string. +func (k *Key) transformValue(val string) string { + if k.s.f.ValueMapper != nil { + val = k.s.f.ValueMapper(val) + } + + // Fail-fast if no indicate char found for recursive value + if !strings.Contains(val, "%") { + return val + } + for i := 0; i < _DEPTH_VALUES; i++ { + vr := varPattern.FindString(val) + if len(vr) == 0 { + break + } + + // Take off leading '%(' and trailing ')s'. + noption := strings.TrimLeft(vr, "%(") + noption = strings.TrimRight(noption, ")s") + + // Search in the same section. + nk, err := k.s.GetKey(noption) + if err != nil { + // Search again in default section. + nk, _ = k.s.f.Section("").GetKey(noption) + } + + // Substitute by new value and take off leading '%(' and trailing ')s'. + val = strings.Replace(val, vr, nk.value, -1) + } + return val +} + +// String returns string representation of value. +func (k *Key) String() string { + return k.transformValue(k.value) +} + +// Validate accepts a validate function which can +// return modifed result as key value. +func (k *Key) Validate(fn func(string) string) string { + return fn(k.String()) +} + +// parseBool returns the boolean value represented by the string. +// +// It accepts 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On, +// 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off. +// Any other value returns an error. +func parseBool(str string) (value bool, err error) { + switch str { + case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "y", "ON", "on", "On": + return true, nil + case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "n", "OFF", "off", "Off": + return false, nil + } + return false, fmt.Errorf("parsing \"%s\": invalid syntax", str) +} + +// Bool returns bool type value. +func (k *Key) Bool() (bool, error) { + return parseBool(k.String()) +} + +// Float64 returns float64 type value. +func (k *Key) Float64() (float64, error) { + return strconv.ParseFloat(k.String(), 64) +} + +// Int returns int type value. +func (k *Key) Int() (int, error) { + return strconv.Atoi(k.String()) +} + +// Int64 returns int64 type value. +func (k *Key) Int64() (int64, error) { + return strconv.ParseInt(k.String(), 10, 64) +} + +// Uint returns uint type valued. +func (k *Key) Uint() (uint, error) { + u, e := strconv.ParseUint(k.String(), 10, 64) + return uint(u), e +} + +// Uint64 returns uint64 type value. +func (k *Key) Uint64() (uint64, error) { + return strconv.ParseUint(k.String(), 10, 64) +} + +// Duration returns time.Duration type value. +func (k *Key) Duration() (time.Duration, error) { + return time.ParseDuration(k.String()) +} + +// TimeFormat parses with given format and returns time.Time type value. +func (k *Key) TimeFormat(format string) (time.Time, error) { + return time.Parse(format, k.String()) +} + +// Time parses with RFC3339 format and returns time.Time type value. +func (k *Key) Time() (time.Time, error) { + return k.TimeFormat(time.RFC3339) +} + +// MustString returns default value if key value is empty. +func (k *Key) MustString(defaultVal string) string { + val := k.String() + if len(val) == 0 { + k.value = defaultVal + return defaultVal + } + return val +} + +// MustBool always returns value without error, +// it returns false if error occurs. +func (k *Key) MustBool(defaultVal ...bool) bool { + val, err := k.Bool() + if len(defaultVal) > 0 && err != nil { + k.value = strconv.FormatBool(defaultVal[0]) + return defaultVal[0] + } + return val +} + +// MustFloat64 always returns value without error, +// it returns 0.0 if error occurs. +func (k *Key) MustFloat64(defaultVal ...float64) float64 { + val, err := k.Float64() + if len(defaultVal) > 0 && err != nil { + k.value = strconv.FormatFloat(defaultVal[0], 'f', -1, 64) + return defaultVal[0] + } + return val +} + +// MustInt always returns value without error, +// it returns 0 if error occurs. +func (k *Key) MustInt(defaultVal ...int) int { + val, err := k.Int() + if len(defaultVal) > 0 && err != nil { + k.value = strconv.FormatInt(int64(defaultVal[0]), 10) + return defaultVal[0] + } + return val +} + +// MustInt64 always returns value without error, +// it returns 0 if error occurs. +func (k *Key) MustInt64(defaultVal ...int64) int64 { + val, err := k.Int64() + if len(defaultVal) > 0 && err != nil { + k.value = strconv.FormatInt(defaultVal[0], 10) + return defaultVal[0] + } + return val +} + +// MustUint always returns value without error, +// it returns 0 if error occurs. +func (k *Key) MustUint(defaultVal ...uint) uint { + val, err := k.Uint() + if len(defaultVal) > 0 && err != nil { + k.value = strconv.FormatUint(uint64(defaultVal[0]), 10) + return defaultVal[0] + } + return val +} + +// MustUint64 always returns value without error, +// it returns 0 if error occurs. +func (k *Key) MustUint64(defaultVal ...uint64) uint64 { + val, err := k.Uint64() + if len(defaultVal) > 0 && err != nil { + k.value = strconv.FormatUint(defaultVal[0], 10) + return defaultVal[0] + } + return val +} + +// MustDuration always returns value without error, +// it returns zero value if error occurs. +func (k *Key) MustDuration(defaultVal ...time.Duration) time.Duration { + val, err := k.Duration() + if len(defaultVal) > 0 && err != nil { + k.value = defaultVal[0].String() + return defaultVal[0] + } + return val +} + +// MustTimeFormat always parses with given format and returns value without error, +// it returns zero value if error occurs. +func (k *Key) MustTimeFormat(format string, defaultVal ...time.Time) time.Time { + val, err := k.TimeFormat(format) + if len(defaultVal) > 0 && err != nil { + k.value = defaultVal[0].Format(format) + return defaultVal[0] + } + return val +} + +// MustTime always parses with RFC3339 format and returns value without error, +// it returns zero value if error occurs. +func (k *Key) MustTime(defaultVal ...time.Time) time.Time { + return k.MustTimeFormat(time.RFC3339, defaultVal...) +} + +// In always returns value without error, +// it returns default value if error occurs or doesn't fit into candidates. +func (k *Key) In(defaultVal string, candidates []string) string { + val := k.String() + for _, cand := range candidates { + if val == cand { + return val + } + } + return defaultVal +} + +// InFloat64 always returns value without error, +// it returns default value if error occurs or doesn't fit into candidates. +func (k *Key) InFloat64(defaultVal float64, candidates []float64) float64 { + val := k.MustFloat64() + for _, cand := range candidates { + if val == cand { + return val + } + } + return defaultVal +} + +// InInt always returns value without error, +// it returns default value if error occurs or doesn't fit into candidates. +func (k *Key) InInt(defaultVal int, candidates []int) int { + val := k.MustInt() + for _, cand := range candidates { + if val == cand { + return val + } + } + return defaultVal +} + +// InInt64 always returns value without error, +// it returns default value if error occurs or doesn't fit into candidates. +func (k *Key) InInt64(defaultVal int64, candidates []int64) int64 { + val := k.MustInt64() + for _, cand := range candidates { + if val == cand { + return val + } + } + return defaultVal +} + +// InUint always returns value without error, +// it returns default value if error occurs or doesn't fit into candidates. +func (k *Key) InUint(defaultVal uint, candidates []uint) uint { + val := k.MustUint() + for _, cand := range candidates { + if val == cand { + return val + } + } + return defaultVal +} + +// InUint64 always returns value without error, +// it returns default value if error occurs or doesn't fit into candidates. +func (k *Key) InUint64(defaultVal uint64, candidates []uint64) uint64 { + val := k.MustUint64() + for _, cand := range candidates { + if val == cand { + return val + } + } + return defaultVal +} + +// InTimeFormat always parses with given format and returns value without error, +// it returns default value if error occurs or doesn't fit into candidates. +func (k *Key) InTimeFormat(format string, defaultVal time.Time, candidates []time.Time) time.Time { + val := k.MustTimeFormat(format) + for _, cand := range candidates { + if val == cand { + return val + } + } + return defaultVal +} + +// InTime always parses with RFC3339 format and returns value without error, +// it returns default value if error occurs or doesn't fit into candidates. +func (k *Key) InTime(defaultVal time.Time, candidates []time.Time) time.Time { + return k.InTimeFormat(time.RFC3339, defaultVal, candidates) +} + +// RangeFloat64 checks if value is in given range inclusively, +// and returns default value if it's not. +func (k *Key) RangeFloat64(defaultVal, min, max float64) float64 { + val := k.MustFloat64() + if val < min || val > max { + return defaultVal + } + return val +} + +// RangeInt checks if value is in given range inclusively, +// and returns default value if it's not. +func (k *Key) RangeInt(defaultVal, min, max int) int { + val := k.MustInt() + if val < min || val > max { + return defaultVal + } + return val +} + +// RangeInt64 checks if value is in given range inclusively, +// and returns default value if it's not. +func (k *Key) RangeInt64(defaultVal, min, max int64) int64 { + val := k.MustInt64() + if val < min || val > max { + return defaultVal + } + return val +} + +// RangeTimeFormat checks if value with given format is in given range inclusively, +// and returns default value if it's not. +func (k *Key) RangeTimeFormat(format string, defaultVal, min, max time.Time) time.Time { + val := k.MustTimeFormat(format) + if val.Unix() < min.Unix() || val.Unix() > max.Unix() { + return defaultVal + } + return val +} + +// RangeTime checks if value with RFC3339 format is in given range inclusively, +// and returns default value if it's not. +func (k *Key) RangeTime(defaultVal, min, max time.Time) time.Time { + return k.RangeTimeFormat(time.RFC3339, defaultVal, min, max) +} + +// Strings returns list of string divided by given delimiter. +func (k *Key) Strings(delim string) []string { + str := k.String() + if len(str) == 0 { + return []string{} + } + + vals := strings.Split(str, delim) + for i := range vals { + // vals[i] = k.transformValue(strings.TrimSpace(vals[i])) + vals[i] = strings.TrimSpace(vals[i]) + } + return vals +} + +// StringsWithShadows returns list of string divided by given delimiter. +// Shadows will also be appended if any. +func (k *Key) StringsWithShadows(delim string) []string { + vals := k.ValueWithShadows() + results := make([]string, 0, len(vals)*2) + for i := range vals { + if len(vals) == 0 { + continue + } + + results = append(results, strings.Split(vals[i], delim)...) + } + + for i := range results { + results[i] = k.transformValue(strings.TrimSpace(results[i])) + } + return results +} + +// Float64s returns list of float64 divided by given delimiter. Any invalid input will be treated as zero value. +func (k *Key) Float64s(delim string) []float64 { + vals, _ := k.getFloat64s(delim, true, false) + return vals +} + +// Ints returns list of int divided by given delimiter. Any invalid input will be treated as zero value. +func (k *Key) Ints(delim string) []int { + vals, _ := k.parseInts(k.Strings(delim), true, false) + return vals +} + +// Int64s returns list of int64 divided by given delimiter. Any invalid input will be treated as zero value. +func (k *Key) Int64s(delim string) []int64 { + vals, _ := k.parseInt64s(k.Strings(delim), true, false) + return vals +} + +// Uints returns list of uint divided by given delimiter. Any invalid input will be treated as zero value. +func (k *Key) Uints(delim string) []uint { + vals, _ := k.getUints(delim, true, false) + return vals +} + +// Uint64s returns list of uint64 divided by given delimiter. Any invalid input will be treated as zero value. +func (k *Key) Uint64s(delim string) []uint64 { + vals, _ := k.getUint64s(delim, true, false) + return vals +} + +// TimesFormat parses with given format and returns list of time.Time divided by given delimiter. +// Any invalid input will be treated as zero value (0001-01-01 00:00:00 +0000 UTC). +func (k *Key) TimesFormat(format, delim string) []time.Time { + vals, _ := k.getTimesFormat(format, delim, true, false) + return vals +} + +// Times parses with RFC3339 format and returns list of time.Time divided by given delimiter. +// Any invalid input will be treated as zero value (0001-01-01 00:00:00 +0000 UTC). +func (k *Key) Times(delim string) []time.Time { + return k.TimesFormat(time.RFC3339, delim) +} + +// ValidFloat64s returns list of float64 divided by given delimiter. If some value is not float, then +// it will not be included to result list. +func (k *Key) ValidFloat64s(delim string) []float64 { + vals, _ := k.getFloat64s(delim, false, false) + return vals +} + +// ValidInts returns list of int divided by given delimiter. If some value is not integer, then it will +// not be included to result list. +func (k *Key) ValidInts(delim string) []int { + vals, _ := k.parseInts(k.Strings(delim), false, false) + return vals +} + +// ValidInt64s returns list of int64 divided by given delimiter. If some value is not 64-bit integer, +// then it will not be included to result list. +func (k *Key) ValidInt64s(delim string) []int64 { + vals, _ := k.parseInt64s(k.Strings(delim), false, false) + return vals +} + +// ValidUints returns list of uint divided by given delimiter. If some value is not unsigned integer, +// then it will not be included to result list. +func (k *Key) ValidUints(delim string) []uint { + vals, _ := k.getUints(delim, false, false) + return vals +} + +// ValidUint64s returns list of uint64 divided by given delimiter. If some value is not 64-bit unsigned +// integer, then it will not be included to result list. +func (k *Key) ValidUint64s(delim string) []uint64 { + vals, _ := k.getUint64s(delim, false, false) + return vals +} + +// ValidTimesFormat parses with given format and returns list of time.Time divided by given delimiter. +func (k *Key) ValidTimesFormat(format, delim string) []time.Time { + vals, _ := k.getTimesFormat(format, delim, false, false) + return vals +} + +// ValidTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter. +func (k *Key) ValidTimes(delim string) []time.Time { + return k.ValidTimesFormat(time.RFC3339, delim) +} + +// StrictFloat64s returns list of float64 divided by given delimiter or error on first invalid input. +func (k *Key) StrictFloat64s(delim string) ([]float64, error) { + return k.getFloat64s(delim, false, true) +} + +// StrictInts returns list of int divided by given delimiter or error on first invalid input. +func (k *Key) StrictInts(delim string) ([]int, error) { + return k.parseInts(k.Strings(delim), false, true) +} + +// StrictInt64s returns list of int64 divided by given delimiter or error on first invalid input. +func (k *Key) StrictInt64s(delim string) ([]int64, error) { + return k.parseInt64s(k.Strings(delim), false, true) +} + +// StrictUints returns list of uint divided by given delimiter or error on first invalid input. +func (k *Key) StrictUints(delim string) ([]uint, error) { + return k.getUints(delim, false, true) +} + +// StrictUint64s returns list of uint64 divided by given delimiter or error on first invalid input. +func (k *Key) StrictUint64s(delim string) ([]uint64, error) { + return k.getUint64s(delim, false, true) +} + +// StrictTimesFormat parses with given format and returns list of time.Time divided by given delimiter +// or error on first invalid input. +func (k *Key) StrictTimesFormat(format, delim string) ([]time.Time, error) { + return k.getTimesFormat(format, delim, false, true) +} + +// StrictTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter +// or error on first invalid input. +func (k *Key) StrictTimes(delim string) ([]time.Time, error) { + return k.StrictTimesFormat(time.RFC3339, delim) +} + +// getFloat64s returns list of float64 divided by given delimiter. +func (k *Key) getFloat64s(delim string, addInvalid, returnOnInvalid bool) ([]float64, error) { + strs := k.Strings(delim) + vals := make([]float64, 0, len(strs)) + for _, str := range strs { + val, err := strconv.ParseFloat(str, 64) + if err != nil && returnOnInvalid { + return nil, err + } + if err == nil || addInvalid { + vals = append(vals, val) + } + } + return vals, nil +} + +// parseInts transforms strings to ints. +func (k *Key) parseInts(strs []string, addInvalid, returnOnInvalid bool) ([]int, error) { + vals := make([]int, 0, len(strs)) + for _, str := range strs { + val, err := strconv.Atoi(str) + if err != nil && returnOnInvalid { + return nil, err + } + if err == nil || addInvalid { + vals = append(vals, val) + } + } + return vals, nil +} + +// parseInt64s transforms strings to int64s. +func (k *Key) parseInt64s(strs []string, addInvalid, returnOnInvalid bool) ([]int64, error) { + vals := make([]int64, 0, len(strs)) + for _, str := range strs { + val, err := strconv.ParseInt(str, 10, 64) + if err != nil && returnOnInvalid { + return nil, err + } + if err == nil || addInvalid { + vals = append(vals, val) + } + } + return vals, nil +} + +// getUints returns list of uint divided by given delimiter. +func (k *Key) getUints(delim string, addInvalid, returnOnInvalid bool) ([]uint, error) { + strs := k.Strings(delim) + vals := make([]uint, 0, len(strs)) + for _, str := range strs { + val, err := strconv.ParseUint(str, 10, 0) + if err != nil && returnOnInvalid { + return nil, err + } + if err == nil || addInvalid { + vals = append(vals, uint(val)) + } + } + return vals, nil +} + +// getUint64s returns list of uint64 divided by given delimiter. +func (k *Key) getUint64s(delim string, addInvalid, returnOnInvalid bool) ([]uint64, error) { + strs := k.Strings(delim) + vals := make([]uint64, 0, len(strs)) + for _, str := range strs { + val, err := strconv.ParseUint(str, 10, 64) + if err != nil && returnOnInvalid { + return nil, err + } + if err == nil || addInvalid { + vals = append(vals, val) + } + } + return vals, nil +} + +// getTimesFormat parses with given format and returns list of time.Time divided by given delimiter. +func (k *Key) getTimesFormat(format, delim string, addInvalid, returnOnInvalid bool) ([]time.Time, error) { + strs := k.Strings(delim) + vals := make([]time.Time, 0, len(strs)) + for _, str := range strs { + val, err := time.Parse(format, str) + if err != nil && returnOnInvalid { + return nil, err + } + if err == nil || addInvalid { + vals = append(vals, val) + } + } + return vals, nil +} + +// SetValue changes key value. +func (k *Key) SetValue(v string) { + if k.s.f.BlockMode { + k.s.f.lock.Lock() + defer k.s.f.lock.Unlock() + } + + k.value = v + k.s.keysHash[k.name] = v +} diff --git a/vendor/github.com/go-ini/ini/parser.go b/vendor/github.com/go-ini/ini/parser.go index 1c1bf91f0..673ef80ca 100644 --- a/vendor/github.com/go-ini/ini/parser.go +++ b/vendor/github.com/go-ini/ini/parser.go @@ -48,16 +48,31 @@ func newParser(r io.Reader) *parser { } } -// BOM handles header of BOM-UTF8 format. +// BOM handles header of UTF-8, UTF-16 LE and UTF-16 BE's BOM format. // http://en.wikipedia.org/wiki/Byte_order_mark#Representations_of_byte_order_marks_by_encoding func (p *parser) BOM() error { - mask, err := p.buf.Peek(3) + mask, err := p.buf.Peek(2) if err != nil && err != io.EOF { return err - } else if len(mask) < 3 { + } else if len(mask) < 2 { return nil - } else if mask[0] == 239 && mask[1] == 187 && mask[2] == 191 { + } + + switch { + case mask[0] == 254 && mask[1] == 255: + fallthrough + case mask[0] == 255 && mask[1] == 254: p.buf.Read(mask) + case mask[0] == 239 && mask[1] == 187: + mask, err := p.buf.Peek(3) + if err != nil && err != io.EOF { + return err + } else if len(mask) < 3 { + return nil + } + if mask[2] == 191 { + p.buf.Read(mask) + } } return nil } @@ -111,7 +126,7 @@ func readKeyName(in []byte) (string, int, error) { // Find key-value delimiter i := strings.IndexAny(line[pos+startIdx:], "=:") if i < 0 { - return "", -1, fmt.Errorf("key-value delimiter not found: %s", line) + return "", -1, ErrDelimiterNotFound{line} } endIdx = pos + i return strings.TrimSpace(line[startIdx:pos]), endIdx + startIdx + 1, nil @@ -119,7 +134,7 @@ func readKeyName(in []byte) (string, int, error) { endIdx = strings.IndexAny(line, "=:") if endIdx < 0 { - return "", -1, fmt.Errorf("key-value delimiter not found: %s", line) + return "", -1, ErrDelimiterNotFound{line} } return strings.TrimSpace(line[0:endIdx]), endIdx + 1, nil } @@ -178,7 +193,7 @@ func hasSurroundedQuote(in string, quote byte) bool { strings.IndexByte(in[1:], quote) == len(in)-2 } -func (p *parser) readValue(in []byte) (string, error) { +func (p *parser) readValue(in []byte, ignoreContinuation bool) (string, error) { line := strings.TrimLeftFunc(string(in), unicode.IsSpace) if len(line) == 0 { return "", nil @@ -205,8 +220,8 @@ func (p *parser) readValue(in []byte) (string, error) { // Won't be able to reach here if value only contains whitespace. line = strings.TrimSpace(line) - // Check continuation lines - if line[len(line)-1] == '\\' { + // Check continuation lines when desired. + if !ignoreContinuation && line[len(line)-1] == '\\' { return p.readContinuationLines(line[:len(line)-1]) } @@ -235,6 +250,7 @@ func (f *File) parse(reader io.Reader) (err error) { section, _ := f.NewSection(DEFAULT_SECTION) var line []byte + var inUnparseableSection bool for !p.isEOF { line, err = p.readUntil('\n') if err != nil { @@ -258,12 +274,14 @@ func (f *File) parse(reader io.Reader) (err error) { // Section if line[0] == '[' { // Read to the next ']' (TODO: support quoted strings) - closeIdx := bytes.IndexByte(line, ']') + // TODO(unknwon): use LastIndexByte when stop supporting Go1.4 + closeIdx := bytes.LastIndex(line, []byte("]")) if closeIdx == -1 { return fmt.Errorf("unclosed section: %s", line) } - section, err = f.NewSection(string(line[1:closeIdx])) + name := string(line[1:closeIdx]) + section, err = f.NewSection(name) if err != nil { return err } @@ -278,11 +296,40 @@ func (f *File) parse(reader io.Reader) (err error) { // Reset aotu-counter and comments p.comment.Reset() p.count = 1 + + inUnparseableSection = false + for i := range f.options.UnparseableSections { + if f.options.UnparseableSections[i] == name || + (f.options.Insensitive && strings.ToLower(f.options.UnparseableSections[i]) == strings.ToLower(name)) { + inUnparseableSection = true + continue + } + } + continue + } + + if inUnparseableSection { + section.isRawSection = true + section.rawBody += string(line) continue } kname, offset, err := readKeyName(line) if err != nil { + // Treat as boolean key when desired, and whole line is key name. + if IsErrDelimiterNotFound(err) && f.options.AllowBooleanKeys { + kname, err := p.readValue(line, f.options.IgnoreContinuation) + if err != nil { + return err + } + key, err := section.NewBooleanKey(kname) + if err != nil { + return err + } + key.Comment = strings.TrimSpace(p.comment.String()) + p.comment.Reset() + continue + } return err } @@ -294,17 +341,16 @@ func (f *File) parse(reader io.Reader) (err error) { p.count++ } - key, err := section.NewKey(kname, "") + value, err := p.readValue(line[offset:], f.options.IgnoreContinuation) if err != nil { return err } - key.isAutoIncr = isAutoIncr - value, err := p.readValue(line[offset:]) + key, err := section.NewKey(kname, value) if err != nil { return err } - key.SetValue(value) + key.isAutoIncrement = isAutoIncr key.Comment = strings.TrimSpace(p.comment.String()) p.comment.Reset() } diff --git a/vendor/github.com/go-ini/ini/section.go b/vendor/github.com/go-ini/ini/section.go new file mode 100644 index 000000000..c9fa27e9c --- /dev/null +++ b/vendor/github.com/go-ini/ini/section.go @@ -0,0 +1,234 @@ +// Copyright 2014 Unknwon +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +package ini + +import ( + "errors" + "fmt" + "strings" +) + +// Section represents a config section. +type Section struct { + f *File + Comment string + name string + keys map[string]*Key + keyList []string + keysHash map[string]string + + isRawSection bool + rawBody string +} + +func newSection(f *File, name string) *Section { + return &Section{ + f: f, + name: name, + keys: make(map[string]*Key), + keyList: make([]string, 0, 10), + keysHash: make(map[string]string), + } +} + +// Name returns name of Section. +func (s *Section) Name() string { + return s.name +} + +// Body returns rawBody of Section if the section was marked as unparseable. +// It still follows the other rules of the INI format surrounding leading/trailing whitespace. +func (s *Section) Body() string { + return strings.TrimSpace(s.rawBody) +} + +// NewKey creates a new key to given section. +func (s *Section) NewKey(name, val string) (*Key, error) { + if len(name) == 0 { + return nil, errors.New("error creating new key: empty key name") + } else if s.f.options.Insensitive { + name = strings.ToLower(name) + } + + if s.f.BlockMode { + s.f.lock.Lock() + defer s.f.lock.Unlock() + } + + if inSlice(name, s.keyList) { + if s.f.options.AllowShadows { + if err := s.keys[name].addShadow(val); err != nil { + return nil, err + } + } else { + s.keys[name].value = val + } + return s.keys[name], nil + } + + s.keyList = append(s.keyList, name) + s.keys[name] = newKey(s, name, val) + s.keysHash[name] = val + return s.keys[name], nil +} + +// NewBooleanKey creates a new boolean type key to given section. +func (s *Section) NewBooleanKey(name string) (*Key, error) { + key, err := s.NewKey(name, "true") + if err != nil { + return nil, err + } + + key.isBooleanType = true + return key, nil +} + +// GetKey returns key in section by given name. +func (s *Section) GetKey(name string) (*Key, error) { + // FIXME: change to section level lock? + if s.f.BlockMode { + s.f.lock.RLock() + } + if s.f.options.Insensitive { + name = strings.ToLower(name) + } + key := s.keys[name] + if s.f.BlockMode { + s.f.lock.RUnlock() + } + + if key == nil { + // Check if it is a child-section. + sname := s.name + for { + if i := strings.LastIndex(sname, "."); i > -1 { + sname = sname[:i] + sec, err := s.f.GetSection(sname) + if err != nil { + continue + } + return sec.GetKey(name) + } else { + break + } + } + return nil, fmt.Errorf("error when getting key of section '%s': key '%s' not exists", s.name, name) + } + return key, nil +} + +// HasKey returns true if section contains a key with given name. +func (s *Section) HasKey(name string) bool { + key, _ := s.GetKey(name) + return key != nil +} + +// Haskey is a backwards-compatible name for HasKey. +func (s *Section) Haskey(name string) bool { + return s.HasKey(name) +} + +// HasValue returns true if section contains given raw value. +func (s *Section) HasValue(value string) bool { + if s.f.BlockMode { + s.f.lock.RLock() + defer s.f.lock.RUnlock() + } + + for _, k := range s.keys { + if value == k.value { + return true + } + } + return false +} + +// Key assumes named Key exists in section and returns a zero-value when not. +func (s *Section) Key(name string) *Key { + key, err := s.GetKey(name) + if err != nil { + // It's OK here because the only possible error is empty key name, + // but if it's empty, this piece of code won't be executed. + key, _ = s.NewKey(name, "") + return key + } + return key +} + +// Keys returns list of keys of section. +func (s *Section) Keys() []*Key { + keys := make([]*Key, len(s.keyList)) + for i := range s.keyList { + keys[i] = s.Key(s.keyList[i]) + } + return keys +} + +// ParentKeys returns list of keys of parent section. +func (s *Section) ParentKeys() []*Key { + var parentKeys []*Key + sname := s.name + for { + if i := strings.LastIndex(sname, "."); i > -1 { + sname = sname[:i] + sec, err := s.f.GetSection(sname) + if err != nil { + continue + } + parentKeys = append(parentKeys, sec.Keys()...) + } else { + break + } + + } + return parentKeys +} + +// KeyStrings returns list of key names of section. +func (s *Section) KeyStrings() []string { + list := make([]string, len(s.keyList)) + copy(list, s.keyList) + return list +} + +// KeysHash returns keys hash consisting of names and values. +func (s *Section) KeysHash() map[string]string { + if s.f.BlockMode { + s.f.lock.RLock() + defer s.f.lock.RUnlock() + } + + hash := map[string]string{} + for key, value := range s.keysHash { + hash[key] = value + } + return hash +} + +// DeleteKey deletes a key from section. +func (s *Section) DeleteKey(name string) { + if s.f.BlockMode { + s.f.lock.Lock() + defer s.f.lock.Unlock() + } + + for i, k := range s.keyList { + if k == name { + s.keyList = append(s.keyList[:i], s.keyList[i+1:]...) + delete(s.keys, name) + return + } + } +} diff --git a/vendor/github.com/go-ini/ini/struct.go b/vendor/github.com/go-ini/ini/struct.go index 3fb92c396..509c682fa 100644 --- a/vendor/github.com/go-ini/ini/struct.go +++ b/vendor/github.com/go-ini/ini/struct.go @@ -19,6 +19,7 @@ import ( "errors" "fmt" "reflect" + "strings" "time" "unicode" ) @@ -76,10 +77,69 @@ func parseDelim(actual string) string { var reflectTime = reflect.TypeOf(time.Now()).Kind() +// setSliceWithProperType sets proper values to slice based on its type. +func setSliceWithProperType(key *Key, field reflect.Value, delim string, allowShadow bool) error { + var strs []string + if allowShadow { + strs = key.StringsWithShadows(delim) + } else { + strs = key.Strings(delim) + } + + numVals := len(strs) + if numVals == 0 { + return nil + } + + var vals interface{} + + sliceOf := field.Type().Elem().Kind() + switch sliceOf { + case reflect.String: + vals = strs + case reflect.Int: + vals, _ = key.parseInts(strs, true, false) + case reflect.Int64: + vals, _ = key.parseInt64s(strs, true, false) + case reflect.Uint: + vals = key.Uints(delim) + case reflect.Uint64: + vals = key.Uint64s(delim) + case reflect.Float64: + vals = key.Float64s(delim) + case reflectTime: + vals = key.Times(delim) + default: + return fmt.Errorf("unsupported type '[]%s'", sliceOf) + } + + slice := reflect.MakeSlice(field.Type(), numVals, numVals) + for i := 0; i < numVals; i++ { + switch sliceOf { + case reflect.String: + slice.Index(i).Set(reflect.ValueOf(vals.([]string)[i])) + case reflect.Int: + slice.Index(i).Set(reflect.ValueOf(vals.([]int)[i])) + case reflect.Int64: + slice.Index(i).Set(reflect.ValueOf(vals.([]int64)[i])) + case reflect.Uint: + slice.Index(i).Set(reflect.ValueOf(vals.([]uint)[i])) + case reflect.Uint64: + slice.Index(i).Set(reflect.ValueOf(vals.([]uint64)[i])) + case reflect.Float64: + slice.Index(i).Set(reflect.ValueOf(vals.([]float64)[i])) + case reflectTime: + slice.Index(i).Set(reflect.ValueOf(vals.([]time.Time)[i])) + } + } + field.Set(slice) + return nil +} + // setWithProperType sets proper value to field based on its type, // but it does not return error for failing parsing, // because we want to use default value that is already assigned to strcut. -func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string) error { +func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string, allowShadow bool) error { switch t.Kind() { case reflect.String: if len(key.String()) == 0 { @@ -108,7 +168,8 @@ func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim stri // byte is an alias for uint8, so supporting uint8 breaks support for byte case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: durationVal, err := key.Duration() - if err == nil { + // Skip zero value + if err == nil && int(durationVal) > 0 { field.Set(reflect.ValueOf(durationVal)) return nil } @@ -119,7 +180,7 @@ func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim stri } field.SetUint(uintVal) - case reflect.Float64: + case reflect.Float32, reflect.Float64: floatVal, err := key.Float64() if err != nil { return nil @@ -132,35 +193,25 @@ func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim stri } field.Set(reflect.ValueOf(timeVal)) case reflect.Slice: - vals := key.Strings(delim) - numVals := len(vals) - if numVals == 0 { - return nil - } - - sliceOf := field.Type().Elem().Kind() - - var times []time.Time - if sliceOf == reflectTime { - times = key.Times(delim) - } - - slice := reflect.MakeSlice(field.Type(), numVals, numVals) - for i := 0; i < numVals; i++ { - switch sliceOf { - case reflectTime: - slice.Index(i).Set(reflect.ValueOf(times[i])) - default: - slice.Index(i).Set(reflect.ValueOf(vals[i])) - } - } - field.Set(slice) + return setSliceWithProperType(key, field, delim, allowShadow) default: return fmt.Errorf("unsupported type '%s'", t) } return nil } +func parseTagOptions(tag string) (rawName string, omitEmpty bool, allowShadow bool) { + opts := strings.SplitN(tag, ",", 3) + rawName = opts[0] + if len(opts) > 1 { + omitEmpty = opts[1] == "omitempty" + } + if len(opts) > 2 { + allowShadow = opts[2] == "allowshadow" + } + return rawName, omitEmpty, allowShadow +} + func (s *Section) mapTo(val reflect.Value) error { if val.Kind() == reflect.Ptr { val = val.Elem() @@ -176,7 +227,8 @@ func (s *Section) mapTo(val reflect.Value) error { continue } - fieldName := s.parseFieldName(tpField.Name, tag) + rawName, _, allowShadow := parseTagOptions(tag) + fieldName := s.parseFieldName(tpField.Name, rawName) if len(fieldName) == 0 || !field.CanSet() { continue } @@ -197,7 +249,8 @@ func (s *Section) mapTo(val reflect.Value) error { } if key, err := s.GetKey(fieldName); err == nil { - if err = setWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil { + delim := parseDelim(tpField.Tag.Get("delim")) + if err = setWithProperType(tpField.Type, key, field, delim, allowShadow); err != nil { return fmt.Errorf("error mapping field(%s): %v", fieldName, err) } } @@ -239,40 +292,81 @@ func MapTo(v, source interface{}, others ...interface{}) error { return MapToWithMapper(v, nil, source, others...) } -// reflectWithProperType does the opposite thing with setWithProperType. +// reflectSliceWithProperType does the opposite thing as setSliceWithProperType. +func reflectSliceWithProperType(key *Key, field reflect.Value, delim string) error { + slice := field.Slice(0, field.Len()) + if field.Len() == 0 { + return nil + } + + var buf bytes.Buffer + sliceOf := field.Type().Elem().Kind() + for i := 0; i < field.Len(); i++ { + switch sliceOf { + case reflect.String: + buf.WriteString(slice.Index(i).String()) + case reflect.Int, reflect.Int64: + buf.WriteString(fmt.Sprint(slice.Index(i).Int())) + case reflect.Uint, reflect.Uint64: + buf.WriteString(fmt.Sprint(slice.Index(i).Uint())) + case reflect.Float64: + buf.WriteString(fmt.Sprint(slice.Index(i).Float())) + case reflectTime: + buf.WriteString(slice.Index(i).Interface().(time.Time).Format(time.RFC3339)) + default: + return fmt.Errorf("unsupported type '[]%s'", sliceOf) + } + buf.WriteString(delim) + } + key.SetValue(buf.String()[:buf.Len()-1]) + return nil +} + +// reflectWithProperType does the opposite thing as setWithProperType. func reflectWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string) error { switch t.Kind() { case reflect.String: key.SetValue(field.String()) - case reflect.Bool, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float64, - reflectTime: - key.SetValue(fmt.Sprint(field)) + case reflect.Bool: + key.SetValue(fmt.Sprint(field.Bool())) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + key.SetValue(fmt.Sprint(field.Int())) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + key.SetValue(fmt.Sprint(field.Uint())) + case reflect.Float32, reflect.Float64: + key.SetValue(fmt.Sprint(field.Float())) + case reflectTime: + key.SetValue(fmt.Sprint(field.Interface().(time.Time).Format(time.RFC3339))) case reflect.Slice: - vals := field.Slice(0, field.Len()) - if field.Len() == 0 { - return nil - } - - var buf bytes.Buffer - isTime := fmt.Sprint(field.Type()) == "[]time.Time" - for i := 0; i < field.Len(); i++ { - if isTime { - buf.WriteString(vals.Index(i).Interface().(time.Time).Format(time.RFC3339)) - } else { - buf.WriteString(fmt.Sprint(vals.Index(i))) - } - buf.WriteString(delim) - } - key.SetValue(buf.String()[:buf.Len()-1]) + return reflectSliceWithProperType(key, field, delim) default: return fmt.Errorf("unsupported type '%s'", t) } return nil } +// CR: copied from encoding/json/encode.go with modifications of time.Time support. +// TODO: add more test coverage. +func isEmptyValue(v reflect.Value) bool { + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflectTime: + return v.Interface().(time.Time).IsZero() + case reflect.Interface, reflect.Ptr: + return v.IsNil() + } + return false +} + func (s *Section) reflectFrom(val reflect.Value) error { if val.Kind() == reflect.Ptr { val = val.Elem() @@ -288,13 +382,18 @@ func (s *Section) reflectFrom(val reflect.Value) error { continue } - fieldName := s.parseFieldName(tpField.Name, tag) + opts := strings.SplitN(tag, ",", 2) + if len(opts) == 2 && opts[1] == "omitempty" && isEmptyValue(field) { + continue + } + + fieldName := s.parseFieldName(tpField.Name, opts[0]) if len(fieldName) == 0 || !field.CanSet() { continue } if (tpField.Type.Kind() == reflect.Ptr && tpField.Anonymous) || - (tpField.Type.Kind() == reflect.Struct) { + (tpField.Type.Kind() == reflect.Struct && tpField.Type.Name() != "Time") { // Note: The only error here is section doesn't exist. sec, err := s.f.GetSection(fieldName) if err != nil { @@ -302,7 +401,7 @@ func (s *Section) reflectFrom(val reflect.Value) error { sec, _ = s.f.NewSection(fieldName) } if err = sec.reflectFrom(field); err != nil { - return fmt.Errorf("error reflecting field(%s): %v", fieldName, err) + return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) } continue } @@ -313,7 +412,7 @@ func (s *Section) reflectFrom(val reflect.Value) error { key, _ = s.NewKey(fieldName, "") } if err = reflectWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil { - return fmt.Errorf("error reflecting field(%s): %v", fieldName, err) + return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) } } diff --git a/vendor/github.com/gofrs/flock/README.md b/vendor/github.com/gofrs/flock/README.md index 42d580f71..7375e72ee 100644 --- a/vendor/github.com/gofrs/flock/README.md +++ b/vendor/github.com/gofrs/flock/README.md @@ -2,6 +2,7 @@ [![TravisCI Build Status](https://img.shields.io/travis/gofrs/flock/master.svg?style=flat)](https://travis-ci.org/gofrs/flock) [![GoDoc](https://img.shields.io/badge/godoc-go--flock-blue.svg?style=flat)](https://godoc.org/github.com/gofrs/flock) [![License](https://img.shields.io/badge/license-BSD_3--Clause-brightgreen.svg?style=flat)](https://github.com/gofrs/flock/blob/master/LICENSE) +[![Go Report Card](https://goreportcard.com/badge/github.com/gofrs/flock)](https://goreportcard.com/report/github.com/gofrs/flock) `flock` implements a thread-safe sync.Locker interface for file locking. It also includes a non-blocking TryLock() function to allow locking without blocking execution. diff --git a/vendor/github.com/gofrs/flock/flock.go b/vendor/github.com/gofrs/flock/flock.go index 5783a4985..8f109b8a9 100644 --- a/vendor/github.com/gofrs/flock/flock.go +++ b/vendor/github.com/gofrs/flock/flock.go @@ -2,7 +2,7 @@ // Use of this source code is governed by the BSD 3-Clause // license that can be found in the LICENSE file. -// Package flock implements a thread-safe sync.Locker interface for file locking. +// Package flock implements a thread-safe interface for file locking. // It also includes a non-blocking TryLock() function to allow locking // without blocking execution. // @@ -13,7 +13,7 @@ // guaranteed to be the same on each platform. For example, some UNIX-like // operating systems will transparently convert a shared lock to an exclusive // lock. If you Unlock() the flock from a location where you believe that you -// have the shared lock, you may accidently drop the exclusive lock. +// have the shared lock, you may accidentally drop the exclusive lock. package flock import ( @@ -86,17 +86,17 @@ func (f *Flock) String() string { // conditions is met: TryLock succeeds, TryLock fails with error, or Context // Done channel is closed. func (f *Flock) TryLockContext(ctx context.Context, retryDelay time.Duration) (bool, error) { - return tryCtx(f.TryLock, ctx, retryDelay) + return tryCtx(ctx, f.TryLock, retryDelay) } // TryRLockContext repeatedly tries to take a shared lock until one of the // conditions is met: TryRLock succeeds, TryRLock fails with error, or Context // Done channel is closed. func (f *Flock) TryRLockContext(ctx context.Context, retryDelay time.Duration) (bool, error) { - return tryCtx(f.TryRLock, ctx, retryDelay) + return tryCtx(ctx, f.TryRLock, retryDelay) } -func tryCtx(fn func() (bool, error), ctx context.Context, retryDelay time.Duration) (bool, error) { +func tryCtx(ctx context.Context, fn func() (bool, error), retryDelay time.Duration) (bool, error) { if ctx.Err() != nil { return false, ctx.Err() } diff --git a/vendor/github.com/golang/snappy/.gitignore b/vendor/github.com/golang/snappy/.gitignore new file mode 100644 index 000000000..042091d9b --- /dev/null +++ b/vendor/github.com/golang/snappy/.gitignore @@ -0,0 +1,16 @@ +cmd/snappytool/snappytool +testdata/bench + +# These explicitly listed benchmark data files are for an obsolete version of +# snappy_test.go. +testdata/alice29.txt +testdata/asyoulik.txt +testdata/fireworks.jpeg +testdata/geo.protodata +testdata/html +testdata/html_x_4 +testdata/kppkn.gtb +testdata/lcet10.txt +testdata/paper-100k.pdf +testdata/plrabn12.txt +testdata/urls.10K diff --git a/vendor/github.com/google/go-cmp/cmp/compare.go b/vendor/github.com/google/go-cmp/cmp/compare.go index b56d63447..7e215f220 100644 --- a/vendor/github.com/google/go-cmp/cmp/compare.go +++ b/vendor/github.com/google/go-cmp/cmp/compare.go @@ -29,7 +29,6 @@ package cmp import ( "fmt" "reflect" - "strings" "github.com/google/go-cmp/cmp/internal/diff" "github.com/google/go-cmp/cmp/internal/function" @@ -113,10 +112,6 @@ type state struct { curPath Path // The current path in the value tree reporter reporter // Optional reporter used for difference formatting - // recChecker checks for infinite cycles applying the same set of - // transformers upon the output of itself. - recChecker recChecker - // dynChecker triggers pseudo-random checks for option correctness. // It is safe for statelessCompare to mutate this value. dynChecker dynChecker @@ -186,7 +181,6 @@ func (s *state) statelessCompare(vx, vy reflect.Value) diff.Result { func (s *state) compareAny(vx, vy reflect.Value) { // TODO: Support cyclic data structures. - s.recChecker.Check(s.curPath) // Rule 0: Differing types are never equal. if !vx.IsValid() || !vy.IsValid() { @@ -386,9 +380,8 @@ func detectRaces(c chan<- reflect.Value, f reflect.Value, vs ...reflect.Value) { // assuming that T is assignable to R. // Otherwise, it returns the input value as is. func sanitizeValue(v reflect.Value, t reflect.Type) reflect.Value { - // TODO(dsnet): Workaround for reflect bug (https://golang.org/issue/22143). - // The upstream fix landed in Go1.10, so we can remove this when drop support - // for Go1.9 and below. + // TODO(dsnet): Remove this hacky workaround. + // See https://golang.org/issue/22143 if v.Kind() == reflect.Interface && v.IsNil() && v.Type() != t { return reflect.New(t).Elem() } @@ -524,45 +517,6 @@ func (s *state) report(eq bool, vx, vy reflect.Value) { } } -// recChecker tracks the state needed to periodically perform checks that -// user provided transformers are not stuck in an infinitely recursive cycle. -type recChecker struct{ next int } - -// Check scans the Path for any recursive transformers and panics when any -// recursive transformers are detected. Note that the presence of a -// recursive Transformer does not necessarily imply an infinite cycle. -// As such, this check only activates after some minimal number of path steps. -func (rc *recChecker) Check(p Path) { - const minLen = 1 << 16 - if rc.next == 0 { - rc.next = minLen - } - if len(p) < rc.next { - return - } - rc.next <<= 1 - - // Check whether the same transformer has appeared at least twice. - var ss []string - m := map[Option]int{} - for _, ps := range p { - if t, ok := ps.(Transform); ok { - t := t.Option() - if m[t] == 1 { // Transformer was used exactly once before - tf := t.(*transformer).fnc.Type() - ss = append(ss, fmt.Sprintf("%v: %v => %v", t, tf.In(0), tf.Out(0))) - } - m[t]++ - } - } - if len(ss) > 0 { - const warning = "recursive set of Transformers detected" - const help = "consider using cmpopts.AcyclicTransformer" - set := strings.Join(ss, "\n\t") - panic(fmt.Sprintf("%s:\n\t%s\n%s", warning, set, help)) - } -} - // dynChecker tracks the state needed to periodically perform checks that // user provided functions are symmetric and deterministic. // The zero value is safe for immediate use. diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/format.go b/vendor/github.com/google/go-cmp/cmp/internal/value/format.go index bafb2d121..657e50877 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/format.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/format.go @@ -26,7 +26,7 @@ func Format(v reflect.Value, conf FormatConfig) string { conf.printType = true conf.followPointers = true conf.realPointers = true - return formatAny(v, conf, visited{}) + return formatAny(v, conf, nil) } type FormatConfig struct { @@ -37,7 +37,7 @@ type FormatConfig struct { realPointers bool // Should we print the real address of pointers? } -func formatAny(v reflect.Value, conf FormatConfig, m visited) string { +func formatAny(v reflect.Value, conf FormatConfig, visited map[uintptr]bool) string { // TODO: Should this be a multi-line printout in certain situations? if !v.IsValid() { @@ -79,10 +79,11 @@ func formatAny(v reflect.Value, conf FormatConfig, m visited) string { } return "" } - if m.Visit(v) || !conf.followPointers { + if visited[v.Pointer()] || !conf.followPointers { return formatPointer(v, conf) } - return "&" + formatAny(v.Elem(), conf, m) + visited = insertPointer(visited, v.Pointer()) + return "&" + formatAny(v.Elem(), conf, visited) case reflect.Interface: if v.IsNil() { if conf.printType { @@ -90,7 +91,7 @@ func formatAny(v reflect.Value, conf FormatConfig, m visited) string { } return "" } - return formatAny(v.Elem(), conf, m) + return formatAny(v.Elem(), conf, visited) case reflect.Slice: if v.IsNil() { if conf.printType { @@ -98,23 +99,18 @@ func formatAny(v reflect.Value, conf FormatConfig, m visited) string { } return "" } + if visited[v.Pointer()] { + return formatPointer(v, conf) + } + visited = insertPointer(visited, v.Pointer()) fallthrough case reflect.Array: var ss []string subConf := conf subConf.printType = v.Type().Elem().Kind() == reflect.Interface for i := 0; i < v.Len(); i++ { - vi := v.Index(i) - if vi.CanAddr() { // Check for recursive elements - p := vi.Addr() - if m.Visit(p) { - subConf := conf - subConf.printType = true - ss = append(ss, "*"+formatPointer(p, subConf)) - continue - } - } - ss = append(ss, formatAny(vi, subConf, m)) + s := formatAny(v.Index(i), subConf, visited) + ss = append(ss, s) } s := fmt.Sprintf("{%s}", strings.Join(ss, ", ")) if conf.printType { @@ -128,9 +124,10 @@ func formatAny(v reflect.Value, conf FormatConfig, m visited) string { } return "" } - if m.Visit(v) { + if visited[v.Pointer()] { return formatPointer(v, conf) } + visited = insertPointer(visited, v.Pointer()) var ss []string keyConf, valConf := conf, conf @@ -138,8 +135,8 @@ func formatAny(v reflect.Value, conf FormatConfig, m visited) string { keyConf.followPointers = false valConf.printType = v.Type().Elem().Kind() == reflect.Interface for _, k := range SortKeys(v.MapKeys()) { - sk := formatAny(k, keyConf, m) - sv := formatAny(v.MapIndex(k), valConf, m) + sk := formatAny(k, keyConf, visited) + sv := formatAny(v.MapIndex(k), valConf, visited) ss = append(ss, fmt.Sprintf("%s: %s", sk, sv)) } s := fmt.Sprintf("{%s}", strings.Join(ss, ", ")) @@ -158,7 +155,7 @@ func formatAny(v reflect.Value, conf FormatConfig, m visited) string { } name := v.Type().Field(i).Name subConf.UseStringer = conf.UseStringer - s := formatAny(vv, subConf, m) + s := formatAny(vv, subConf, visited) ss = append(ss, fmt.Sprintf("%s: %s", name, s)) } s := fmt.Sprintf("{%s}", strings.Join(ss, ", ")) @@ -232,6 +229,15 @@ func formatHex(u uint64) string { return fmt.Sprintf(f, u) } +// insertPointer insert p into m, allocating m if necessary. +func insertPointer(m map[uintptr]bool, p uintptr) map[uintptr]bool { + if m == nil { + m = make(map[uintptr]bool) + } + m[p] = true + return m +} + // isZero reports whether v is the zero value. // This does not rely on Interface and so can be used on unexported fields. func isZero(v reflect.Value) bool { @@ -269,12 +275,3 @@ func isZero(v reflect.Value) bool { } return false } - -type visited map[Pointer]bool - -func (m visited) Visit(v reflect.Value) bool { - p := PointerOf(v) - visited := m[p] - m[p] = true - return visited -} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go deleted file mode 100644 index 0a01c4796..000000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2018, The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. - -// +build purego - -package value - -import "reflect" - -// Pointer is an opaque typed pointer and is guaranteed to be comparable. -type Pointer struct { - p uintptr - t reflect.Type -} - -// PointerOf returns a Pointer from v, which must be a -// reflect.Ptr, reflect.Slice, or reflect.Map. -func PointerOf(v reflect.Value) Pointer { - // NOTE: Storing a pointer as an uintptr is technically incorrect as it - // assumes that the GC implementation does not use a moving collector. - return Pointer{v.Pointer(), v.Type()} -} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go deleted file mode 100644 index da134ae2a..000000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2018, The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. - -// +build !purego - -package value - -import ( - "reflect" - "unsafe" -) - -// Pointer is an opaque typed pointer and is guaranteed to be comparable. -type Pointer struct { - p unsafe.Pointer - t reflect.Type -} - -// PointerOf returns a Pointer from v, which must be a -// reflect.Ptr, reflect.Slice, or reflect.Map. -func PointerOf(v reflect.Value) Pointer { - // The proper representation of a pointer is unsafe.Pointer, - // which is necessary if the GC ever uses a moving collector. - return Pointer{unsafe.Pointer(v.Pointer()), v.Type()} -} diff --git a/vendor/github.com/google/go-cmp/cmp/options.go b/vendor/github.com/google/go-cmp/cmp/options.go index cc3a4b9e7..91d4b066e 100644 --- a/vendor/github.com/google/go-cmp/cmp/options.go +++ b/vendor/github.com/google/go-cmp/cmp/options.go @@ -220,9 +220,6 @@ func (invalid) apply(s *state, _, _ reflect.Value) { // input and output types are the same), an implicit filter is added such that // a transformer is applicable only if that exact transformer is not already // in the tail of the Path since the last non-Transform step. -// For situations where the implicit filter is still insufficient, -// consider using cmpopts.AcyclicTransformer, which adds a filter -// to prevent the transformer from being recursively applied upon itself. // // The name is a user provided label that is used as the Transform.Name in the // transformation PathStep. If empty, an arbitrary name is used. diff --git a/vendor/github.com/google/go-cmp/cmp/unsafe_panic.go b/vendor/github.com/google/go-cmp/cmp/unsafe_panic.go new file mode 100644 index 000000000..d1518eb3a --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/unsafe_panic.go @@ -0,0 +1,15 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +// +build purego appengine js + +package cmp + +import "reflect" + +const supportAllowUnexported = false + +func unsafeRetrieveField(reflect.Value, reflect.StructField) reflect.Value { + panic("unsafeRetrieveField is not implemented") +} diff --git a/vendor/github.com/google/go-querystring/query/encode.go b/vendor/github.com/google/go-querystring/query/encode.go index 90dcabb80..37080b19b 100644 --- a/vendor/github.com/google/go-querystring/query/encode.go +++ b/vendor/github.com/google/go-querystring/query/encode.go @@ -88,8 +88,11 @@ type Encoder interface { // same name. Including the "comma" option signals that the field should be // encoded as a single comma-delimited value. Including the "space" option // similarly encodes the value as a single space-delimited string. Including -// the "brackets" option signals that the multiple URL values should have "[]" -// appended to the value name. +// the "semicolon" option will encode the value as a semicolon-delimited string. +// Including the "brackets" option signals that the multiple URL values should +// have "[]" appended to the value name. "numbered" will append a number to +// the end of each incidence of the value name, example: +// name0=value0&name1=value1, etc. // // Anonymous struct fields are usually encoded as if their inner exported // fields were fields in the outer struct, subject to the standard Go @@ -138,7 +141,7 @@ func reflectValue(values url.Values, val reflect.Value, scope string) error { typ := val.Type() for i := 0; i < typ.NumField(); i++ { sf := typ.Field(i) - if sf.PkgPath != "" { // unexported + if sf.PkgPath != "" && !sf.Anonymous { // unexported continue } @@ -184,6 +187,8 @@ func reflectValue(values url.Values, val reflect.Value, scope string) error { del = ',' } else if opts.Contains("space") { del = ' ' + } else if opts.Contains("semicolon") { + del = ';' } else if opts.Contains("brackets") { name = name + "[]" } @@ -202,17 +207,16 @@ func reflectValue(values url.Values, val reflect.Value, scope string) error { values.Add(name, s.String()) } else { for i := 0; i < sv.Len(); i++ { - values.Add(name, valueString(sv.Index(i), opts)) + k := name + if opts.Contains("numbered") { + k = fmt.Sprintf("%s%d", name, i) + } + values.Add(k, valueString(sv.Index(i), opts)) } } continue } - if sv.Type() == timeType { - values.Add(name, valueString(sv, opts)) - continue - } - for sv.Kind() == reflect.Ptr { if sv.IsNil() { break @@ -220,6 +224,11 @@ func reflectValue(values url.Values, val reflect.Value, scope string) error { sv = sv.Elem() } + if sv.Type() == timeType { + values.Add(name, valueString(sv, opts)) + continue + } + if sv.Kind() == reflect.Struct { reflectValue(values, sv, name) continue diff --git a/vendor/github.com/google/uuid/.travis.yml b/vendor/github.com/google/uuid/.travis.yml new file mode 100644 index 000000000..d8156a60b --- /dev/null +++ b/vendor/github.com/google/uuid/.travis.yml @@ -0,0 +1,9 @@ +language: go + +go: + - 1.4.3 + - 1.5.3 + - tip + +script: + - go test -v ./... diff --git a/vendor/github.com/google/uuid/README.md b/vendor/github.com/google/uuid/README.md index 21205eaeb..9d92c11f1 100644 --- a/vendor/github.com/google/uuid/README.md +++ b/vendor/github.com/google/uuid/README.md @@ -1,7 +1,3 @@ -**This package is currently in development and the API may not be stable.** - -The API will become stable with v1. - # uuid ![build status](https://travis-ci.org/google/uuid.svg?branch=master) The uuid package generates and inspects UUIDs based on [RFC 4122](http://tools.ietf.org/html/rfc4122) diff --git a/vendor/github.com/google/uuid/marshal.go b/vendor/github.com/google/uuid/marshal.go index 84bbc5880..7f9e0c6c0 100644 --- a/vendor/github.com/google/uuid/marshal.go +++ b/vendor/github.com/google/uuid/marshal.go @@ -15,8 +15,6 @@ func (uuid UUID) MarshalText() ([]byte, error) { // UnmarshalText implements encoding.TextUnmarshaler. func (uuid *UUID) UnmarshalText(data []byte) error { - // See comment in ParseBytes why we do this. - // id, err := ParseBytes(data) id, err := ParseBytes(data) if err == nil { *uuid = id diff --git a/vendor/github.com/google/uuid/node.go b/vendor/github.com/google/uuid/node.go index 384f07d02..3e4e90dc4 100644 --- a/vendor/github.com/google/uuid/node.go +++ b/vendor/github.com/google/uuid/node.go @@ -37,7 +37,6 @@ func SetNodeInterface(name string) bool { } func setNodeInterface(name string) bool { - iname, addr := getHardwareInterface(name) // null implementation for js if iname != "" && addr != nil { ifname = iname diff --git a/vendor/github.com/gophercloud/gophercloud/.gitignore b/vendor/github.com/gophercloud/gophercloud/.gitignore new file mode 100644 index 000000000..dd91ed205 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/.gitignore @@ -0,0 +1,3 @@ +**/*.swp +.idea +.vscode diff --git a/vendor/github.com/gophercloud/gophercloud/.travis.yml b/vendor/github.com/gophercloud/gophercloud/.travis.yml new file mode 100644 index 000000000..02728f496 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/.travis.yml @@ -0,0 +1,21 @@ +language: go +sudo: false +install: +- go get golang.org/x/crypto/ssh +- go get -v -tags 'fixtures acceptance' ./... +- go get github.com/wadey/gocovmerge +- go get github.com/mattn/goveralls +- go get golang.org/x/tools/cmd/goimports +go: +- "1.10" +- "tip" +env: + global: + - secure: "xSQsAG5wlL9emjbCdxzz/hYQsSpJ/bABO1kkbwMSISVcJ3Nk0u4ywF+LS4bgeOnwPfmFvNTOqVDu3RwEvMeWXSI76t1piCPcObutb2faKLVD/hLoAS76gYX+Z8yGWGHrSB7Do5vTPj1ERe2UljdrnsSeOXzoDwFxYRaZLX4bBOB4AyoGvRniil5QXPATiA1tsWX1VMicj8a4F8X+xeESzjt1Q5Iy31e7vkptu71bhvXCaoo5QhYwT+pLR9dN0S1b7Ro0KVvkRefmr1lUOSYd2e74h6Lc34tC1h3uYZCS4h47t7v5cOXvMNxinEj2C51RvbjvZI1RLVdkuAEJD1Iz4+Ote46nXbZ//6XRZMZz/YxQ13l7ux1PFjgEB6HAapmF5Xd8PRsgeTU9LRJxpiTJ3P5QJ3leS1va8qnziM5kYipj/Rn+V8g2ad/rgkRox9LSiR9VYZD2Pe45YCb1mTKSl2aIJnV7nkOqsShY5LNB4JZSg7xIffA+9YVDktw8dJlATjZqt7WvJJ49g6A61mIUV4C15q2JPGKTkZzDiG81NtmS7hFa7k0yaE2ELgYocbcuyUcAahhxntYTC0i23nJmEHVNiZmBO3u7EgpWe4KGVfumU+lt12tIn5b3dZRBBUk3QakKKozSK1QPHGpk/AZGrhu7H6l8to6IICKWtDcyMPQ=" +before_script: +- go vet ./... +script: +- ./script/coverage +- ./script/format +after_success: +- $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=cover.out diff --git a/vendor/github.com/gophercloud/gophercloud/.zuul.yaml b/vendor/github.com/gophercloud/gophercloud/.zuul.yaml new file mode 100644 index 000000000..92fd9d482 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/.zuul.yaml @@ -0,0 +1,86 @@ +- job: + name: gophercloud-unittest + parent: golang-test + description: | + Run gophercloud unit test + run: .zuul/playbooks/gophercloud-unittest/run.yaml + nodeset: ubuntu-xenial-ut + +- job: + name: gophercloud-acceptance-test + parent: golang-test + description: | + Run gophercloud acceptance test on master branch + run: .zuul/playbooks/gophercloud-acceptance-test/run.yaml + +- job: + name: gophercloud-acceptance-test-queens + parent: gophercloud-acceptance-test + description: | + Run gophercloud acceptance test on queens branch + vars: + global_env: + OS_BRANCH: stable/queens + +- job: + name: gophercloud-acceptance-test-pike + parent: gophercloud-acceptance-test + description: | + Run gophercloud acceptance test on pike branch + vars: + global_env: + OS_BRANCH: stable/pike + +- job: + name: gophercloud-acceptance-test-ocata + parent: gophercloud-acceptance-test + description: | + Run gophercloud acceptance test on ocata branch + vars: + global_env: + OS_BRANCH: stable/ocata + +- job: + name: gophercloud-acceptance-test-newton + parent: gophercloud-acceptance-test + description: | + Run gophercloud acceptance test on newton branch + vars: + global_env: + OS_BRANCH: stable/newton + +- job: + name: gophercloud-acceptance-test-mitaka + parent: gophercloud-acceptance-test + description: | + Run gophercloud acceptance test on mitaka branch + vars: + global_env: + OS_BRANCH: stable/mitaka + nodeset: ubuntu-trusty + +- project: + name: gophercloud/gophercloud + check: + jobs: + - gophercloud-unittest + - gophercloud-acceptance-test + recheck-mitaka: + jobs: + - gophercloud-acceptance-test-mitaka + recheck-newton: + jobs: + - gophercloud-acceptance-test-newton + recheck-ocata: + jobs: + - gophercloud-acceptance-test-ocata + recheck-pike: + jobs: + - gophercloud-acceptance-test-pike + recheck-queens: + jobs: + - gophercloud-acceptance-test-queens + periodic: + jobs: + - gophercloud-unittest + - gophercloud-acceptance-test diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/auth_env.go b/vendor/github.com/gophercloud/gophercloud/openstack/auth_env.go index 994b5550c..33c9aec44 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/auth_env.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/auth_env.go @@ -38,6 +38,9 @@ func AuthOptionsFromEnv() (gophercloud.AuthOptions, error) { tenantName := os.Getenv("OS_TENANT_NAME") domainID := os.Getenv("OS_DOMAIN_ID") domainName := os.Getenv("OS_DOMAIN_NAME") + applicationCredentialID := os.Getenv("OS_APPLICATION_CREDENTIAL_ID") + applicationCredentialName := os.Getenv("OS_APPLICATION_CREDENTIAL_NAME") + applicationCredentialSecret := os.Getenv("OS_APPLICATION_CREDENTIAL_SECRET") // If OS_PROJECT_ID is set, overwrite tenantID with the value. if v := os.Getenv("OS_PROJECT_ID"); v != "" { @@ -63,22 +66,32 @@ func AuthOptionsFromEnv() (gophercloud.AuthOptions, error) { return nilOptions, err } - if password == "" { + if password == "" && applicationCredentialID == "" && applicationCredentialName == "" { err := gophercloud.ErrMissingEnvironmentVariable{ EnvironmentVariable: "OS_PASSWORD", } return nilOptions, err } + if (applicationCredentialID != "" || applicationCredentialName != "") && applicationCredentialSecret == "" { + err := gophercloud.ErrMissingEnvironmentVariable{ + EnvironmentVariable: "OS_APPLICATION_CREDENTIAL_SECRET", + } + return nilOptions, err + } + ao := gophercloud.AuthOptions{ - IdentityEndpoint: authURL, - UserID: userID, - Username: username, - Password: password, - TenantID: tenantID, - TenantName: tenantName, - DomainID: domainID, - DomainName: domainName, + IdentityEndpoint: authURL, + UserID: userID, + Username: username, + Password: password, + TenantID: tenantID, + TenantName: tenantName, + DomainID: domainID, + DomainName: domainName, + ApplicationCredentialID: applicationCredentialID, + ApplicationCredentialName: applicationCredentialName, + ApplicationCredentialSecret: applicationCredentialSecret, } return ao, nil diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes/requests.go index 43727409d..b7977cbc8 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes/requests.go @@ -174,7 +174,12 @@ func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder func IDFromName(client *gophercloud.ServiceClient, name string) (string, error) { count := 0 id := "" - pages, err := List(client, nil).AllPages() + + listOpts := ListOpts{ + Name: name, + } + + pages, err := List(client, listOpts).AllPages() if err != nil { return "", err } diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/client.go b/vendor/github.com/gophercloud/gophercloud/openstack/client.go index e554b7bc3..6d93af5b4 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/client.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/client.go @@ -406,3 +406,22 @@ func NewMessagingV2(client *gophercloud.ProviderClient, clientID string, eo goph func NewContainerV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { return initClientOpts(client, eo, "container") } + +// NewKeyManagerV1 creates a ServiceClient that may be used with the v1 key +// manager service. +func NewKeyManagerV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { + sc, err := initClientOpts(client, eo, "key-manager") + sc.ResourceBase = sc.Endpoint + "v1/" + return sc, err +} + +// NewContainerInfraV1 creates a ServiceClient that may be used with the v1 container infra management +// package. +func NewContainerInfraV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { + return initClientOpts(client, eo, "container-infra") +} + +// NewWorkflowV2 creates a ServiceClient that may be used with the v2 workflow management package. +func NewWorkflowV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { + return initClientOpts(client, eo, "workflowv2") +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/doc.go deleted file mode 100644 index 4a168f4b2..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/doc.go +++ /dev/null @@ -1,15 +0,0 @@ -// Package extensions provides information and interaction with the different extensions available -// for an OpenStack service. -// -// The purpose of OpenStack API extensions is to: -// -// - Introduce new features in the API without requiring a version change. -// - Introduce vendor-specific niche functionality. -// - Act as a proving ground for experimental functionalities that might be included in a future -// version of the API. -// -// Extensions usually have tags that prevent conflicts with other extensions that define attributes -// or resources with the same names, and with core resources and attributes. -// Because an extension might not be supported by all plug-ins, its availability varies with deployments -// and the specific plug-in. -package extensions diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/errors.go b/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/errors.go deleted file mode 100755 index aeec0fa75..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/errors.go +++ /dev/null @@ -1 +0,0 @@ -package extensions diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/requests.go deleted file mode 100755 index 46b7d60cd..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/requests.go +++ /dev/null @@ -1,20 +0,0 @@ -package extensions - -import ( - "github.com/gophercloud/gophercloud" - "github.com/gophercloud/gophercloud/pagination" -) - -// Get retrieves information for a specific extension using its alias. -func Get(c *gophercloud.ServiceClient, alias string) (r GetResult) { - _, r.Err = c.Get(ExtensionURL(c, alias), &r.Body, nil) - return -} - -// List returns a Pager which allows you to iterate over the full collection of extensions. -// It does not accept query parameters. -func List(c *gophercloud.ServiceClient) pagination.Pager { - return pagination.NewPager(c, ListExtensionURL(c), func(r pagination.PageResult) pagination.Page { - return ExtensionPage{pagination.SinglePageBase(r)} - }) -} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/results.go deleted file mode 100755 index d5f865091..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/results.go +++ /dev/null @@ -1,53 +0,0 @@ -package extensions - -import ( - "github.com/gophercloud/gophercloud" - "github.com/gophercloud/gophercloud/pagination" -) - -// GetResult temporarily stores the result of a Get call. -// Use its Extract() method to interpret it as an Extension. -type GetResult struct { - gophercloud.Result -} - -// Extract interprets a GetResult as an Extension. -func (r GetResult) Extract() (*Extension, error) { - var s struct { - Extension *Extension `json:"extension"` - } - err := r.ExtractInto(&s) - return s.Extension, err -} - -// Extension is a struct that represents an OpenStack extension. -type Extension struct { - Updated string `json:"updated"` - Name string `json:"name"` - Links []interface{} `json:"links"` - Namespace string `json:"namespace"` - Alias string `json:"alias"` - Description string `json:"description"` -} - -// ExtensionPage is the page returned by a pager when traversing over a collection of extensions. -type ExtensionPage struct { - pagination.SinglePageBase -} - -// IsEmpty checks whether an ExtensionPage struct is empty. -func (r ExtensionPage) IsEmpty() (bool, error) { - is, err := ExtractExtensions(r) - return len(is) == 0, err -} - -// ExtractExtensions accepts a Page struct, specifically an ExtensionPage struct, and extracts the -// elements into a slice of Extension structs. -// In other words, a generic collection is mapped into a relevant slice. -func ExtractExtensions(r pagination.Page) ([]Extension, error) { - var s struct { - Extensions []Extension `json:"extensions"` - } - err := (r.(ExtensionPage)).ExtractInto(&s) - return s.Extensions, err -} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/urls.go deleted file mode 100644 index eaf38b2d1..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/common/extensions/urls.go +++ /dev/null @@ -1,13 +0,0 @@ -package extensions - -import "github.com/gophercloud/gophercloud" - -// ExtensionURL generates the URL for an extension resource by name. -func ExtensionURL(c *gophercloud.ServiceClient, name string) string { - return c.ServiceURL("extensions", name) -} - -// ListExtensionURL generates the URL for the extensions resource collection. -func ListExtensionURL(c *gophercloud.ServiceClient) string { - return c.ServiceURL("extensions") -} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces/requests.go index 18dade837..874f7a61e 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces/requests.go @@ -28,7 +28,6 @@ type CreateOptsBuilder interface { // CreateOpts specifies parameters of a new interface attachment. type CreateOpts struct { - // PortID is the ID of the port for which you want to create an interface. // The NetworkID and PortID parameters are mutually exclusive. // If you do not specify the PortID parameter, the OpenStack Networking API @@ -43,6 +42,7 @@ type CreateOpts struct { // Slice of FixedIPs. If you request a specific FixedIP address without a // NetworkID, the request returns a Bad Request (400) response code. + // Note: this uses the FixedIP struct, but only the IPAddress field can be used. FixedIPs []FixedIP `json:"fixed_ips,omitempty"` } diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces/results.go index a16fa14f7..7d15e1ecb 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces/results.go @@ -37,8 +37,10 @@ type DeleteResult struct { } // FixedIP represents a Fixed IP Address. +// This struct is also used when creating an attachment, +// but it is not possible to specify a SubnetID. type FixedIP struct { - SubnetID string `json:"subnet_id"` + SubnetID string `json:"subnet_id,omitempty"` IPAddress string `json:"ip_address"` } diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/bootfromvolume/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/bootfromvolume/requests.go index 9dae14c7a..30c617011 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/bootfromvolume/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/bootfromvolume/requests.go @@ -67,6 +67,14 @@ type BlockDevice struct { // VolumeSize is the size of the volume to create (in gigabytes). This can be // omitted for existing volumes. VolumeSize int `json:"volume_size,omitempty"` + + // DeviceType specifies the device type of the block devices. + // Examples of this are disk, cdrom, floppy, lun, etc. + DeviceType string `json:"device_type,omitempty"` + + // DiskBus is the bus type of the block devices. + // Examples of this are ide, usb, virtio, scsi, etc. + DiskBus string `json:"disk_bus,omitempty"` } // CreateOptsExt is a structure that extends the server `CreateOpts` structure diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/delegate.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/delegate.go deleted file mode 100644 index 00e7c3bec..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/delegate.go +++ /dev/null @@ -1,23 +0,0 @@ -package extensions - -import ( - "github.com/gophercloud/gophercloud" - common "github.com/gophercloud/gophercloud/openstack/common/extensions" - "github.com/gophercloud/gophercloud/pagination" -) - -// ExtractExtensions interprets a Page as a slice of Extensions. -func ExtractExtensions(page pagination.Page) ([]common.Extension, error) { - return common.ExtractExtensions(page) -} - -// Get retrieves information for a specific extension using its alias. -func Get(c *gophercloud.ServiceClient, alias string) common.GetResult { - return common.Get(c, alias) -} - -// List returns a Pager which allows you to iterate over the full collection of extensions. -// It does not accept query parameters. -func List(c *gophercloud.ServiceClient) pagination.Pager { - return common.List(c) -} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/doc.go deleted file mode 100644 index 2b447da1d..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package extensions provides information and interaction with the -// different extensions available for the OpenStack Compute service. -package extensions diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/doc.go deleted file mode 100644 index f5dbdbf8b..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/doc.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Package floatingips provides the ability to manage floating ips through the -Nova API. - -This API has been deprecated and will be removed from a future release of the -Nova API service. - -For environements that support this extension, this package can be used -regardless of if either Neutron or nova-network is used as the cloud's network -service. - -Example to List Floating IPs - - allPages, err := floatingips.List(computeClient).AllPages() - if err != nil { - panic(err) - } - - allFloatingIPs, err := floatingips.ExtractFloatingIPs(allPages) - if err != nil { - panic(err) - } - - for _, fip := range allFloatingIPs { - fmt.Printf("%+v\n", fip) - } - -Example to Create a Floating IP - - createOpts := floatingips.CreateOpts{ - Pool: "nova", - } - - fip, err := floatingips.Create(computeClient, createOpts).Extract() - if err != nil { - panic(err) - } - -Example to Delete a Floating IP - - err := floatingips.Delete(computeClient, "floatingip-id").ExtractErr() - if err != nil { - panic(err) - } - -Example to Associate a Floating IP With a Server - - associateOpts := floatingips.AssociateOpts{ - FloatingIP: "10.10.10.2", - } - - err := floatingips.AssociateInstance(computeClient, "server-id", associateOpts).ExtractErr() - if err != nil { - panic(err) - } - -Example to Disassociate a Floating IP From a Server - - disassociateOpts := floatingips.DisassociateOpts{ - FloatingIP: "10.10.10.2", - } - - err := floatingips.DisassociateInstance(computeClient, "server-id", disassociateOpts).ExtractErr() - if err != nil { - panic(err) - } -*/ -package floatingips diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/requests.go deleted file mode 100644 index a922639de..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/requests.go +++ /dev/null @@ -1,114 +0,0 @@ -package floatingips - -import ( - "github.com/gophercloud/gophercloud" - "github.com/gophercloud/gophercloud/pagination" -) - -// List returns a Pager that allows you to iterate over a collection of FloatingIPs. -func List(client *gophercloud.ServiceClient) pagination.Pager { - return pagination.NewPager(client, listURL(client), func(r pagination.PageResult) pagination.Page { - return FloatingIPPage{pagination.SinglePageBase(r)} - }) -} - -// CreateOptsBuilder allows extensions to add additional parameters to the -// Create request. -type CreateOptsBuilder interface { - ToFloatingIPCreateMap() (map[string]interface{}, error) -} - -// CreateOpts specifies a Floating IP allocation request. -type CreateOpts struct { - // Pool is the pool of Floating IPs to allocate one from. - Pool string `json:"pool" required:"true"` -} - -// ToFloatingIPCreateMap constructs a request body from CreateOpts. -func (opts CreateOpts) ToFloatingIPCreateMap() (map[string]interface{}, error) { - return gophercloud.BuildRequestBody(opts, "") -} - -// Create requests the creation of a new Floating IP. -func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) { - b, err := opts.ToFloatingIPCreateMap() - if err != nil { - r.Err = err - return - } - _, r.Err = client.Post(createURL(client), b, &r.Body, &gophercloud.RequestOpts{ - OkCodes: []int{200}, - }) - return -} - -// Get returns data about a previously created Floating IP. -func Get(client *gophercloud.ServiceClient, id string) (r GetResult) { - _, r.Err = client.Get(getURL(client, id), &r.Body, nil) - return -} - -// Delete requests the deletion of a previous allocated Floating IP. -func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult) { - _, r.Err = client.Delete(deleteURL(client, id), nil) - return -} - -// AssociateOptsBuilder allows extensions to add additional parameters to the -// Associate request. -type AssociateOptsBuilder interface { - ToFloatingIPAssociateMap() (map[string]interface{}, error) -} - -// AssociateOpts specifies the required information to associate a Floating IP with an instance -type AssociateOpts struct { - // FloatingIP is the Floating IP to associate with an instance. - FloatingIP string `json:"address" required:"true"` - - // FixedIP is an optional fixed IP address of the server. - FixedIP string `json:"fixed_address,omitempty"` -} - -// ToFloatingIPAssociateMap constructs a request body from AssociateOpts. -func (opts AssociateOpts) ToFloatingIPAssociateMap() (map[string]interface{}, error) { - return gophercloud.BuildRequestBody(opts, "addFloatingIp") -} - -// AssociateInstance pairs an allocated Floating IP with a server. -func AssociateInstance(client *gophercloud.ServiceClient, serverID string, opts AssociateOptsBuilder) (r AssociateResult) { - b, err := opts.ToFloatingIPAssociateMap() - if err != nil { - r.Err = err - return - } - _, r.Err = client.Post(associateURL(client, serverID), b, nil, nil) - return -} - -// DisassociateOptsBuilder allows extensions to add additional parameters to -// the Disassociate request. -type DisassociateOptsBuilder interface { - ToFloatingIPDisassociateMap() (map[string]interface{}, error) -} - -// DisassociateOpts specifies the required information to disassociate a -// Floating IP with a server. -type DisassociateOpts struct { - FloatingIP string `json:"address" required:"true"` -} - -// ToFloatingIPDisassociateMap constructs a request body from DisassociateOpts. -func (opts DisassociateOpts) ToFloatingIPDisassociateMap() (map[string]interface{}, error) { - return gophercloud.BuildRequestBody(opts, "removeFloatingIp") -} - -// DisassociateInstance decouples an allocated Floating IP from an instance -func DisassociateInstance(client *gophercloud.ServiceClient, serverID string, opts DisassociateOptsBuilder) (r DisassociateResult) { - b, err := opts.ToFloatingIPDisassociateMap() - if err != nil { - r.Err = err - return - } - _, r.Err = client.Post(disassociateURL(client, serverID), b, nil, nil) - return -} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/results.go deleted file mode 100644 index da4e9da0e..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/results.go +++ /dev/null @@ -1,115 +0,0 @@ -package floatingips - -import ( - "encoding/json" - "strconv" - - "github.com/gophercloud/gophercloud" - "github.com/gophercloud/gophercloud/pagination" -) - -// A FloatingIP is an IP that can be associated with a server. -type FloatingIP struct { - // ID is a unique ID of the Floating IP - ID string `json:"-"` - - // FixedIP is a specific IP on the server to pair the Floating IP with. - FixedIP string `json:"fixed_ip,omitempty"` - - // InstanceID is the ID of the server that is using the Floating IP. - InstanceID string `json:"instance_id"` - - // IP is the actual Floating IP. - IP string `json:"ip"` - - // Pool is the pool of Floating IPs that this Floating IP belongs to. - Pool string `json:"pool"` -} - -func (r *FloatingIP) UnmarshalJSON(b []byte) error { - type tmp FloatingIP - var s struct { - tmp - ID interface{} `json:"id"` - } - err := json.Unmarshal(b, &s) - if err != nil { - return err - } - - *r = FloatingIP(s.tmp) - - switch t := s.ID.(type) { - case float64: - r.ID = strconv.FormatFloat(t, 'f', -1, 64) - case string: - r.ID = t - } - - return err -} - -// FloatingIPPage stores a single page of FloatingIPs from a List call. -type FloatingIPPage struct { - pagination.SinglePageBase -} - -// IsEmpty determines whether or not a FloatingIPsPage is empty. -func (page FloatingIPPage) IsEmpty() (bool, error) { - va, err := ExtractFloatingIPs(page) - return len(va) == 0, err -} - -// ExtractFloatingIPs interprets a page of results as a slice of FloatingIPs. -func ExtractFloatingIPs(r pagination.Page) ([]FloatingIP, error) { - var s struct { - FloatingIPs []FloatingIP `json:"floating_ips"` - } - err := (r.(FloatingIPPage)).ExtractInto(&s) - return s.FloatingIPs, err -} - -// FloatingIPResult is the raw result from a FloatingIP request. -type FloatingIPResult struct { - gophercloud.Result -} - -// Extract is a method that attempts to interpret any FloatingIP resource -// response as a FloatingIP struct. -func (r FloatingIPResult) Extract() (*FloatingIP, error) { - var s struct { - FloatingIP *FloatingIP `json:"floating_ip"` - } - err := r.ExtractInto(&s) - return s.FloatingIP, err -} - -// CreateResult is the response from a Create operation. Call its Extract method -// to interpret it as a FloatingIP. -type CreateResult struct { - FloatingIPResult -} - -// GetResult is the response from a Get operation. Call its Extract method to -// interpret it as a FloatingIP. -type GetResult struct { - FloatingIPResult -} - -// DeleteResult is the response from a Delete operation. Call its ExtractErr -// method to determine if the call succeeded or failed. -type DeleteResult struct { - gophercloud.ErrResult -} - -// AssociateResult is the response from a Delete operation. Call its ExtractErr -// method to determine if the call succeeded or failed. -type AssociateResult struct { - gophercloud.ErrResult -} - -// DisassociateResult is the response from a Delete operation. Call its -// ExtractErr method to determine if the call succeeded or failed. -type DisassociateResult struct { - gophercloud.ErrResult -} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/urls.go deleted file mode 100644 index 4768e5a89..000000000 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/urls.go +++ /dev/null @@ -1,37 +0,0 @@ -package floatingips - -import "github.com/gophercloud/gophercloud" - -const resourcePath = "os-floating-ips" - -func resourceURL(c *gophercloud.ServiceClient) string { - return c.ServiceURL(resourcePath) -} - -func listURL(c *gophercloud.ServiceClient) string { - return resourceURL(c) -} - -func createURL(c *gophercloud.ServiceClient) string { - return resourceURL(c) -} - -func getURL(c *gophercloud.ServiceClient, id string) string { - return c.ServiceURL(resourcePath, id) -} - -func deleteURL(c *gophercloud.ServiceClient, id string) string { - return getURL(c, id) -} - -func serverURL(c *gophercloud.ServiceClient, serverID string) string { - return c.ServiceURL("servers/" + serverID + "/action") -} - -func associateURL(c *gophercloud.ServiceClient, serverID string) string { - return serverURL(c, serverID) -} - -func disassociateURL(c *gophercloud.ServiceClient, serverID string) string { - return serverURL(c, serverID) -} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go index 4b406df95..539019e90 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go @@ -52,6 +52,14 @@ type ListOpts struct { MinDisk int `q:"minDisk"` MinRAM int `q:"minRam"` + // SortDir allows to select sort direction. + // It can be "asc" or "desc" (default). + SortDir string `q:"sort_dir"` + + // SortKey allows to sort by one of the flavors attributes. + // Default is flavorid. + SortKey string `q:"sort_key"` + // Marker and Limit control paging. // Marker instructs List where to start listing from. Marker string `q:"marker"` diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go index 525cddaea..92fe1b180 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go @@ -59,7 +59,7 @@ type Flavor struct { RxTxFactor float64 `json:"rxtx_factor"` // Swap is the amount of swap space, measured in MB. - Swap int `json:"swap"` + Swap int `json:"-"` // VCPUs indicates how many (virtual) CPUs are available for this flavor. VCPUs int `json:"vcpus"` diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go index 626eb63e9..a6530f8d6 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go @@ -383,7 +383,7 @@ type RebootOpts struct { } // ToServerRebootMap builds a body for the reboot request. -func (opts *RebootOpts) ToServerRebootMap() (map[string]interface{}, error) { +func (opts RebootOpts) ToServerRebootMap() (map[string]interface{}, error) { return gophercloud.BuildRequestBody(opts, "reboot") } @@ -545,39 +545,6 @@ func RevertResize(client *gophercloud.ServiceClient, id string) (r ActionResult) return } -// RescueOptsBuilder is an interface that allows extensions to override the -// default structure of a Rescue request. -type RescueOptsBuilder interface { - ToServerRescueMap() (map[string]interface{}, error) -} - -// RescueOpts represents the configuration options used to control a Rescue -// option. -type RescueOpts struct { - // AdminPass is the desired administrative password for the instance in - // RESCUE mode. If it's left blank, the server will generate a password. - AdminPass string `json:"adminPass,omitempty"` -} - -// ToServerRescueMap formats a RescueOpts as a map that can be used as a JSON -// request body for the Rescue request. -func (opts RescueOpts) ToServerRescueMap() (map[string]interface{}, error) { - return gophercloud.BuildRequestBody(opts, "rescue") -} - -// Rescue instructs the provider to place the server into RESCUE mode. -func Rescue(client *gophercloud.ServiceClient, id string, opts RescueOptsBuilder) (r RescueResult) { - b, err := opts.ToServerRescueMap() - if err != nil { - r.Err = err - return - } - _, r.Err = client.Post(actionURL(client, id), b, &r.Body, &gophercloud.RequestOpts{ - OkCodes: []int{200}, - }) - return -} - // ResetMetadataOptsBuilder allows extensions to add additional parameters to // the Reset request. type ResetMetadataOptsBuilder interface { @@ -756,7 +723,12 @@ func CreateImage(client *gophercloud.ServiceClient, id string, opts CreateImageO func IDFromName(client *gophercloud.ServiceClient, name string) (string, error) { count := 0 id := "" - allPages, err := List(client, nil).AllPages() + + listOpts := ListOpts{ + Name: name, + } + + allPages, err := List(client, listOpts).AllPages() if err != nil { return "", err } @@ -789,3 +761,34 @@ func GetPassword(client *gophercloud.ServiceClient, serverId string) (r GetPassw _, r.Err = client.Get(passwordURL(client, serverId), &r.Body, nil) return } + +// ShowConsoleOutputOptsBuilder is the interface types must satisfy in order to be +// used as ShowConsoleOutput options +type ShowConsoleOutputOptsBuilder interface { + ToServerShowConsoleOutputMap() (map[string]interface{}, error) +} + +// ShowConsoleOutputOpts satisfies the ShowConsoleOutputOptsBuilder +type ShowConsoleOutputOpts struct { + // The number of lines to fetch from the end of console log. + // All lines will be returned if this is not specified. + Length int `json:"length,omitempty"` +} + +// ToServerShowConsoleOutputMap formats a ShowConsoleOutputOpts structure into a request body. +func (opts ShowConsoleOutputOpts) ToServerShowConsoleOutputMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "os-getConsoleOutput") +} + +// ShowConsoleOutput makes a request against the nova API to get console log from the server +func ShowConsoleOutput(client *gophercloud.ServiceClient, id string, opts ShowConsoleOutputOptsBuilder) (r ShowConsoleOutputResult) { + b, err := opts.ToServerShowConsoleOutputMap() + if err != nil { + r.Err = err + return + } + _, r.Err = client.Post(actionURL(client, id), b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{200}, + }) + return +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go index c6c1ff43f..f973d1ea0 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go @@ -68,18 +68,27 @@ type ActionResult struct { gophercloud.ErrResult } -// RescueResult is the response from a Rescue operation. Call its ExtractErr -// method to determine if the call succeeded or failed. -type RescueResult struct { - ActionResult -} - // CreateImageResult is the response from a CreateImage operation. Call its // ExtractImageID method to retrieve the ID of the newly created image. type CreateImageResult struct { gophercloud.Result } +// ShowConsoleOutputResult represents the result of console output from a server +type ShowConsoleOutputResult struct { + gophercloud.Result +} + +// Extract will return the console output from a ShowConsoleOutput request. +func (r ShowConsoleOutputResult) Extract() (string, error) { + var s struct { + Output string `json:"output"` + } + + err := r.ExtractInto(&s) + return s.Output, err +} + // GetPasswordResult represent the result of a get os-server-password operation. // Call its ExtractPassword method to retrieve the password. type GetPasswordResult struct { @@ -134,15 +143,6 @@ func (r CreateImageResult) ExtractImageID() (string, error) { return imageID, nil } -// Extract interprets any RescueResult as an AdminPass, if possible. -func (r RescueResult) Extract() (string, error) { - var s struct { - AdminPass string `json:"adminPass"` - } - err := r.ExtractInto(&s) - return s.AdminPass, err -} - // Server represents a server/instance in the OpenStack cloud. type Server struct { // ID uniquely identifies this server amongst all other servers, diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go index 6e99a793c..2d20fa6f4 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go @@ -52,19 +52,28 @@ type AuthOptions struct { // authentication token ID. TokenID string `json:"-"` + // Authentication through Application Credentials requires supplying name, project and secret + // For project we can use TenantID + ApplicationCredentialID string `json:"-"` + ApplicationCredentialName string `json:"-"` + ApplicationCredentialSecret string `json:"-"` + Scope Scope `json:"-"` } // ToTokenV3CreateMap builds a request body from AuthOptions. func (opts *AuthOptions) ToTokenV3CreateMap(scope map[string]interface{}) (map[string]interface{}, error) { gophercloudAuthOpts := gophercloud.AuthOptions{ - Username: opts.Username, - UserID: opts.UserID, - Password: opts.Password, - DomainID: opts.DomainID, - DomainName: opts.DomainName, - AllowReauth: opts.AllowReauth, - TokenID: opts.TokenID, + Username: opts.Username, + UserID: opts.UserID, + Password: opts.Password, + DomainID: opts.DomainID, + DomainName: opts.DomainName, + AllowReauth: opts.AllowReauth, + TokenID: opts.TokenID, + ApplicationCredentialID: opts.ApplicationCredentialID, + ApplicationCredentialName: opts.ApplicationCredentialName, + ApplicationCredentialSecret: opts.ApplicationCredentialSecret, } return gophercloudAuthOpts.ToTokenV3CreateMap(scope) diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/requests.go index 88cd4d265..16290d395 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/requests.go @@ -129,7 +129,12 @@ func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager { url += query } return pagination.NewPager(c, url, func(r pagination.PageResult) pagination.Page { - return ImagePage{pagination.LinkedPageBase{PageResult: r}} + imagePage := ImagePage{ + serviceURL: c.ServiceURL(), + LinkedPageBase: pagination.LinkedPageBase{PageResult: r}, + } + + return imagePage }) } @@ -266,11 +271,11 @@ type UpdateVisibility struct { } // ToImagePatchMap assembles a request body based on UpdateVisibility. -func (u UpdateVisibility) ToImagePatchMap() map[string]interface{} { +func (r UpdateVisibility) ToImagePatchMap() map[string]interface{} { return map[string]interface{}{ "op": "replace", "path": "/visibility", - "value": u.Visibility, + "value": r.Visibility, } } @@ -294,11 +299,11 @@ type ReplaceImageChecksum struct { } // ReplaceImageChecksum assembles a request body based on ReplaceImageChecksum. -func (rc ReplaceImageChecksum) ToImagePatchMap() map[string]interface{} { +func (r ReplaceImageChecksum) ToImagePatchMap() map[string]interface{} { return map[string]interface{}{ "op": "replace", "path": "/checksum", - "value": rc.Checksum, + "value": r.Checksum, } } @@ -315,3 +320,33 @@ func (r ReplaceImageTags) ToImagePatchMap() map[string]interface{} { "value": r.NewTags, } } + +// UpdateOp represents a valid update operation. +type UpdateOp string + +const ( + AddOp UpdateOp = "add" + ReplaceOp UpdateOp = "replace" + RemoveOp UpdateOp = "remove" +) + +// UpdateImageProperty represents an update property request. +type UpdateImageProperty struct { + Op UpdateOp + Name string + Value string +} + +// ToImagePatchMap assembles a request body based on UpdateImageProperty. +func (r UpdateImageProperty) ToImagePatchMap() map[string]interface{} { + updateMap := map[string]interface{}{ + "op": r.Op, + "path": fmt.Sprintf("/%s", r.Name), + } + + if r.Value != "" { + updateMap["value"] = r.Value + } + + return updateMap +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/results.go index e25606884..676181e1f 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/results.go @@ -57,7 +57,7 @@ type Image struct { Checksum string `json:"checksum"` // SizeBytes is the size of the data that's associated with the image. - SizeBytes int64 `json:"size"` + SizeBytes int64 `json:"-"` // Metadata is a set of metadata associated with the image. // Image metadata allow for meaningfully define the image properties @@ -67,7 +67,7 @@ type Image struct { // Properties is a set of key-value pairs, if any, that are associated with // the image. - Properties map[string]interface{} `json:"-"` + Properties map[string]interface{} // CreatedAt is the date when the image has been created. CreatedAt time.Time `json:"created_at"` @@ -119,6 +119,7 @@ func (r *Image) UnmarshalJSON(b []byte) error { } if resultMap, ok := result.(map[string]interface{}); ok { delete(resultMap, "self") + delete(resultMap, "size") r.Properties = internal.RemainingKeys(Image{}, resultMap) } @@ -162,6 +163,7 @@ type DeleteResult struct { // ImagePage represents the results of a List request. type ImagePage struct { + serviceURL string pagination.LinkedPageBase } @@ -186,7 +188,7 @@ func (r ImagePage) NextPageURL() (string, error) { return "", nil } - return nextPageURL(r.URL.String(), s.Next) + return nextPageURL(r.serviceURL, s.Next) } // ExtractImages interprets the results of a single page from a List() call, diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/urls.go index bf7cea1ef..1780c3c6c 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/urls.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/urls.go @@ -2,8 +2,10 @@ package images import ( "net/url" + "strings" "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/openstack/utils" ) // `listURL` is a pure function. `listURL(c)` is a URL for which a GET @@ -38,14 +40,26 @@ func deleteURL(c *gophercloud.ServiceClient, imageID string) string { } // builds next page full url based on current url -func nextPageURL(currentURL string, next string) (string, error) { - base, err := url.Parse(currentURL) +func nextPageURL(serviceURL, requestedNext string) (string, error) { + base, err := utils.BaseEndpoint(serviceURL) if err != nil { return "", err } - rel, err := url.Parse(next) + + requestedNextURL, err := url.Parse(requestedNext) if err != nil { return "", err } - return base.ResolveReference(rel).String(), nil + + base = gophercloud.NormalizeURL(base) + nextPath := base + strings.TrimPrefix(requestedNextURL.Path, "/") + + nextURL, err := url.Parse(nextPath) + if err != nil { + return "", err + } + + nextURL.RawQuery = requestedNextURL.RawQuery + + return nextURL.String(), nil } diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/networks/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/networks/requests.go index bc4460a06..1fbf62092 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/networks/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/networks/requests.go @@ -140,7 +140,12 @@ func Delete(c *gophercloud.ServiceClient, networkID string) (r DeleteResult) { func IDFromName(client *gophercloud.ServiceClient, name string) (string, error) { count := 0 id := "" - pages, err := List(client, nil).AllPages() + + listOpts := ListOpts{ + Name: name, + } + + pages, err := List(client, listOpts).AllPages() if err != nil { return "", err } diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/utils/base_endpoint.go b/vendor/github.com/gophercloud/gophercloud/openstack/utils/base_endpoint.go index d6f9e34ea..40080f7af 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/utils/base_endpoint.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/utils/base_endpoint.go @@ -9,21 +9,20 @@ import ( // BaseEndpoint will return a URL without the /vX.Y // portion of the URL. func BaseEndpoint(endpoint string) (string, error) { - var base string - u, err := url.Parse(endpoint) if err != nil { - return base, err + return "", err } u.RawQuery, u.Fragment = "", "" + path := u.Path versionRe := regexp.MustCompile("v[0-9.]+/?") - if version := versionRe.FindString(u.Path); version != "" { - base = strings.Replace(u.String(), version, "", -1) - } else { - base = u.String() + + if version := versionRe.FindString(path); version != "" { + versionIndex := strings.Index(path, version) + u.Path = path[:versionIndex] } - return base, nil + return u.String(), nil } diff --git a/vendor/github.com/gophercloud/gophercloud/pagination/pager.go b/vendor/github.com/gophercloud/gophercloud/pagination/pager.go index 7c65926b7..42c0b2dbe 100644 --- a/vendor/github.com/gophercloud/gophercloud/pagination/pager.go +++ b/vendor/github.com/gophercloud/gophercloud/pagination/pager.go @@ -41,6 +41,8 @@ type Pager struct { createPage func(r PageResult) Page + firstPage Page + Err error // Headers supplies additional HTTP headers to populate on each paged request. @@ -89,9 +91,18 @@ func (p Pager) EachPage(handler func(Page) (bool, error)) error { } currentURL := p.initialURL for { - currentPage, err := p.fetchNextPage(currentURL) - if err != nil { - return err + var currentPage Page + + // if first page has already been fetched, no need to fetch it again + if p.firstPage != nil { + currentPage = p.firstPage + p.firstPage = nil + } else { + var err error + currentPage, err = p.fetchNextPage(currentURL) + if err != nil { + return err + } } empty, err := currentPage.IsEmpty() @@ -128,23 +139,26 @@ func (p Pager) AllPages() (Page, error) { // body will contain the final concatenated Page body. var body reflect.Value - // Grab a test page to ascertain the page body type. - testPage, err := p.fetchNextPage(p.initialURL) + // Grab a first page to ascertain the page body type. + firstPage, err := p.fetchNextPage(p.initialURL) if err != nil { return nil, err } // Store the page type so we can use reflection to create a new mega-page of // that type. - pageType := reflect.TypeOf(testPage) + pageType := reflect.TypeOf(firstPage) - // if it's a single page, just return the testPage (first page) + // if it's a single page, just return the firstPage (first page) if _, found := pageType.FieldByName("SinglePageBase"); found { - return testPage, nil + return firstPage, nil } + // store the first page to avoid getting it twice + p.firstPage = firstPage + // Switch on the page body type. Recognized types are `map[string]interface{}`, // `[]byte`, and `[]interface{}`. - switch pb := testPage.GetBody().(type) { + switch pb := firstPage.GetBody().(type) { case map[string]interface{}: // key is the map key for the page body if the body type is `map[string]interface{}`. var key string diff --git a/vendor/github.com/gorilla/websocket/.gitignore b/vendor/github.com/gorilla/websocket/.gitignore new file mode 100644 index 000000000..ac710204f --- /dev/null +++ b/vendor/github.com/gorilla/websocket/.gitignore @@ -0,0 +1,25 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe + +.idea/ +*.iml \ No newline at end of file diff --git a/vendor/github.com/gorilla/websocket/.travis.yml b/vendor/github.com/gorilla/websocket/.travis.yml new file mode 100644 index 000000000..3d8d29cf3 --- /dev/null +++ b/vendor/github.com/gorilla/websocket/.travis.yml @@ -0,0 +1,19 @@ +language: go +sudo: false + +matrix: + include: + - go: 1.4 + - go: 1.5 + - go: 1.6 + - go: 1.7 + - go: 1.8 + - go: tip + allow_failures: + - go: tip + +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d .) + - go vet $(go list ./... | grep -v /vendor/) + - go test -v -race ./... diff --git a/vendor/github.com/gorilla/websocket/mask_safe.go b/vendor/github.com/gorilla/websocket/mask_safe.go new file mode 100644 index 000000000..2aac060e5 --- /dev/null +++ b/vendor/github.com/gorilla/websocket/mask_safe.go @@ -0,0 +1,15 @@ +// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of +// this source code is governed by a BSD-style license that can be found in the +// LICENSE file. + +// +build appengine + +package websocket + +func maskBytes(key [4]byte, pos int, b []byte) int { + for i := range b { + b[i] ^= key[pos&3] + pos++ + } + return pos & 3 +} diff --git a/vendor/github.com/hashicorp/consul/api/acl.go b/vendor/github.com/hashicorp/consul/api/acl.go index 8ec9aa585..53a052363 100644 --- a/vendor/github.com/hashicorp/consul/api/acl.go +++ b/vendor/github.com/hashicorp/consul/api/acl.go @@ -1,6 +1,9 @@ package api import ( + "fmt" + "io" + "io/ioutil" "time" ) @@ -12,7 +15,42 @@ const ( ACLManagementType = "management" ) -// ACLEntry is used to represent an ACL entry +type ACLTokenPolicyLink struct { + ID string + Name string +} + +// ACLToken represents an ACL Token +type ACLToken struct { + CreateIndex uint64 + ModifyIndex uint64 + AccessorID string + SecretID string + Description string + Policies []*ACLTokenPolicyLink + Local bool + CreateTime time.Time `json:",omitempty"` + Hash []byte `json:",omitempty"` + + // DEPRECATED (ACL-Legacy-Compat) + // Rules will only be present for legacy tokens returned via the new APIs + Rules string `json:",omitempty"` +} + +type ACLTokenListEntry struct { + CreateIndex uint64 + ModifyIndex uint64 + AccessorID string + Description string + Policies []*ACLTokenPolicyLink + Local bool + CreateTime time.Time + Hash []byte + Legacy bool +} + +// ACLEntry is used to represent a legacy ACL token +// The legacy tokens are deprecated. type ACLEntry struct { CreateIndex uint64 ModifyIndex uint64 @@ -24,12 +62,36 @@ type ACLEntry struct { // ACLReplicationStatus is used to represent the status of ACL replication. type ACLReplicationStatus struct { - Enabled bool - Running bool - SourceDatacenter string - ReplicatedIndex uint64 - LastSuccess time.Time - LastError time.Time + Enabled bool + Running bool + SourceDatacenter string + ReplicationType string + ReplicatedIndex uint64 + ReplicatedTokenIndex uint64 + LastSuccess time.Time + LastError time.Time +} + +// ACLPolicy represents an ACL Policy. +type ACLPolicy struct { + ID string + Name string + Description string + Rules string + Datacenters []string + Hash []byte + CreateIndex uint64 + ModifyIndex uint64 +} + +type ACLPolicyListEntry struct { + ID string + Name string + Description string + Datacenters []string + Hash []byte + CreateIndex uint64 + ModifyIndex uint64 } // ACL can be used to query the ACL endpoints @@ -44,23 +106,25 @@ func (c *Client) ACL() *ACL { // Bootstrap is used to perform a one-time ACL bootstrap operation on a cluster // to get the first management token. -func (a *ACL) Bootstrap() (string, *WriteMeta, error) { +func (a *ACL) Bootstrap() (*ACLToken, *WriteMeta, error) { r := a.c.newRequest("PUT", "/v1/acl/bootstrap") rtt, resp, err := requireOK(a.c.doRequest(r)) if err != nil { - return "", nil, err + return nil, nil, err } defer resp.Body.Close() wm := &WriteMeta{RequestTime: rtt} - var out struct{ ID string } + var out ACLToken if err := decodeBody(resp, &out); err != nil { - return "", nil, err + return nil, nil, err } - return out.ID, wm, nil + return &out, wm, nil } // Create is used to generate a new token with the given parameters +// +// Deprecated: Use TokenCreate instead. func (a *ACL) Create(acl *ACLEntry, q *WriteOptions) (string, *WriteMeta, error) { r := a.c.newRequest("PUT", "/v1/acl/create") r.setWriteOptions(q) @@ -80,6 +144,8 @@ func (a *ACL) Create(acl *ACLEntry, q *WriteOptions) (string, *WriteMeta, error) } // Update is used to update the rules of an existing token +// +// Deprecated: Use TokenUpdate instead. func (a *ACL) Update(acl *ACLEntry, q *WriteOptions) (*WriteMeta, error) { r := a.c.newRequest("PUT", "/v1/acl/update") r.setWriteOptions(q) @@ -95,6 +161,8 @@ func (a *ACL) Update(acl *ACLEntry, q *WriteOptions) (*WriteMeta, error) { } // Destroy is used to destroy a given ACL token ID +// +// Deprecated: Use TokenDelete instead. func (a *ACL) Destroy(id string, q *WriteOptions) (*WriteMeta, error) { r := a.c.newRequest("PUT", "/v1/acl/destroy/"+id) r.setWriteOptions(q) @@ -109,6 +177,8 @@ func (a *ACL) Destroy(id string, q *WriteOptions) (*WriteMeta, error) { } // Clone is used to return a new token cloned from an existing one +// +// Deprecated: Use TokenClone instead. func (a *ACL) Clone(id string, q *WriteOptions) (string, *WriteMeta, error) { r := a.c.newRequest("PUT", "/v1/acl/clone/"+id) r.setWriteOptions(q) @@ -127,6 +197,8 @@ func (a *ACL) Clone(id string, q *WriteOptions) (string, *WriteMeta, error) { } // Info is used to query for information about an ACL token +// +// Deprecated: Use TokenRead instead. func (a *ACL) Info(id string, q *QueryOptions) (*ACLEntry, *QueryMeta, error) { r := a.c.newRequest("GET", "/v1/acl/info/"+id) r.setQueryOptions(q) @@ -151,6 +223,8 @@ func (a *ACL) Info(id string, q *QueryOptions) (*ACLEntry, *QueryMeta, error) { } // List is used to get all the ACL tokens +// +// Deprecated: Use TokenList instead. func (a *ACL) List(q *QueryOptions) ([]*ACLEntry, *QueryMeta, error) { r := a.c.newRequest("GET", "/v1/acl/list") r.setQueryOptions(q) @@ -191,3 +265,324 @@ func (a *ACL) Replication(q *QueryOptions) (*ACLReplicationStatus, *QueryMeta, e } return entries, qm, nil } + +// TokenCreate creates a new ACL token. It requires that the AccessorID and SecretID fields +// of the ACLToken structure to be empty as these will be filled in by Consul. +func (a *ACL) TokenCreate(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) { + if token.AccessorID != "" { + return nil, nil, fmt.Errorf("Cannot specify an AccessorID in Token Creation") + } + + if token.SecretID != "" { + return nil, nil, fmt.Errorf("Cannot specify a SecretID in Token Creation") + } + + r := a.c.newRequest("PUT", "/v1/acl/token") + r.setWriteOptions(q) + r.obj = token + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + wm := &WriteMeta{RequestTime: rtt} + var out ACLToken + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return &out, wm, nil +} + +// TokenUpdate updates a token in place without modifying its AccessorID or SecretID. A valid +// AccessorID must be set in the ACLToken structure passed to this function but the SecretID may +// be omitted and will be filled in by Consul with its existing value. +func (a *ACL) TokenUpdate(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) { + if token.AccessorID == "" { + return nil, nil, fmt.Errorf("Must specify an AccessorID for Token Updating") + } + r := a.c.newRequest("PUT", "/v1/acl/token/"+token.AccessorID) + r.setWriteOptions(q) + r.obj = token + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + wm := &WriteMeta{RequestTime: rtt} + var out ACLToken + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return &out, wm, nil +} + +// TokenClone will create a new token with the same policies and locality as the original +// token but will have its own auto-generated AccessorID and SecretID as well having the +// description passed to this function. The tokenID parameter must be a valid Accessor ID +// of an existing token. +func (a *ACL) TokenClone(tokenID string, description string, q *WriteOptions) (*ACLToken, *WriteMeta, error) { + if tokenID == "" { + return nil, nil, fmt.Errorf("Must specify a tokenID for Token Cloning") + } + + r := a.c.newRequest("PUT", "/v1/acl/token/"+tokenID+"/clone") + r.setWriteOptions(q) + r.obj = struct{ Description string }{description} + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + wm := &WriteMeta{RequestTime: rtt} + var out ACLToken + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return &out, wm, nil +} + +// TokenDelete removes a single ACL token. The tokenID parameter must be a valid +// Accessor ID of an existing token. +func (a *ACL) TokenDelete(tokenID string, q *WriteOptions) (*WriteMeta, error) { + r := a.c.newRequest("DELETE", "/v1/acl/token/"+tokenID) + r.setWriteOptions(q) + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, err + } + resp.Body.Close() + + wm := &WriteMeta{RequestTime: rtt} + return wm, nil +} + +// TokenRead retrieves the full token details. The tokenID parameter must be a valid +// Accessor ID of an existing token. +func (a *ACL) TokenRead(tokenID string, q *QueryOptions) (*ACLToken, *QueryMeta, error) { + r := a.c.newRequest("GET", "/v1/acl/token/"+tokenID) + r.setQueryOptions(q) + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + var out ACLToken + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return &out, qm, nil +} + +// TokenReadSelf retrieves the full token details of the token currently +// assigned to the API Client. In this manner its possible to read a token +// by its Secret ID. +func (a *ACL) TokenReadSelf(q *QueryOptions) (*ACLToken, *QueryMeta, error) { + r := a.c.newRequest("GET", "/v1/acl/token/self") + r.setQueryOptions(q) + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + var out ACLToken + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return &out, qm, nil +} + +// TokenList lists all tokens. The listing does not contain any SecretIDs as those +// may only be retrieved by a call to TokenRead. +func (a *ACL) TokenList(q *QueryOptions) ([]*ACLTokenListEntry, *QueryMeta, error) { + r := a.c.newRequest("GET", "/v1/acl/tokens") + r.setQueryOptions(q) + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + var entries []*ACLTokenListEntry + if err := decodeBody(resp, &entries); err != nil { + return nil, nil, err + } + return entries, qm, nil +} + +// PolicyCreate will create a new policy. It is not allowed for the policy parameters +// ID field to be set as this will be generated by Consul while processing the request. +func (a *ACL) PolicyCreate(policy *ACLPolicy, q *WriteOptions) (*ACLPolicy, *WriteMeta, error) { + if policy.ID != "" { + return nil, nil, fmt.Errorf("Cannot specify an ID in Policy Creation") + } + + r := a.c.newRequest("PUT", "/v1/acl/policy") + r.setWriteOptions(q) + r.obj = policy + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + wm := &WriteMeta{RequestTime: rtt} + var out ACLPolicy + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return &out, wm, nil +} + +// PolicyUpdate updates a policy. The ID field of the policy parameter must be set to an +// existing policy ID +func (a *ACL) PolicyUpdate(policy *ACLPolicy, q *WriteOptions) (*ACLPolicy, *WriteMeta, error) { + if policy.ID == "" { + return nil, nil, fmt.Errorf("Must specify an ID in Policy Creation") + } + + r := a.c.newRequest("PUT", "/v1/acl/policy/"+policy.ID) + r.setWriteOptions(q) + r.obj = policy + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + wm := &WriteMeta{RequestTime: rtt} + var out ACLPolicy + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return &out, wm, nil +} + +// PolicyDelete deletes a policy given its ID. +func (a *ACL) PolicyDelete(policyID string, q *WriteOptions) (*WriteMeta, error) { + r := a.c.newRequest("DELETE", "/v1/acl/policy/"+policyID) + r.setWriteOptions(q) + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, err + } + resp.Body.Close() + + wm := &WriteMeta{RequestTime: rtt} + return wm, nil +} + +// PolicyRead retrieves the policy details including the rule set. +func (a *ACL) PolicyRead(policyID string, q *QueryOptions) (*ACLPolicy, *QueryMeta, error) { + r := a.c.newRequest("GET", "/v1/acl/policy/"+policyID) + r.setQueryOptions(q) + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + var out ACLPolicy + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return &out, qm, nil +} + +// PolicyList retrieves a listing of all policies. The listing does not include the +// rules for any policy as those should be retrieved by subsequent calls to PolicyRead. +func (a *ACL) PolicyList(q *QueryOptions) ([]*ACLPolicyListEntry, *QueryMeta, error) { + r := a.c.newRequest("GET", "/v1/acl/policies") + r.setQueryOptions(q) + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + var entries []*ACLPolicyListEntry + if err := decodeBody(resp, &entries); err != nil { + return nil, nil, err + } + return entries, qm, nil +} + +// RulesTranslate translates the legacy rule syntax into the current syntax. +// +// Deprecated: Support for the legacy syntax translation will be removed +// when legacy ACL support is removed. +func (a *ACL) RulesTranslate(rules io.Reader) (string, error) { + r := a.c.newRequest("POST", "/v1/acl/rules/translate") + r.body = rules + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return "", err + } + defer resp.Body.Close() + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + ruleBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", fmt.Errorf("Failed to read translated rule body: %v", err) + } + + return string(ruleBytes), nil +} + +// RulesTranslateToken translates the rules associated with the legacy syntax +// into the current syntax and returns the results. +// +// Deprecated: Support for the legacy syntax translation will be removed +// when legacy ACL support is removed. +func (a *ACL) RulesTranslateToken(tokenID string) (string, error) { + r := a.c.newRequest("GET", "/v1/acl/rules/translate/"+tokenID) + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return "", err + } + defer resp.Body.Close() + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + ruleBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", fmt.Errorf("Failed to read translated rule body: %v", err) + } + + return string(ruleBytes), nil +} diff --git a/vendor/github.com/hashicorp/consul/api/agent.go b/vendor/github.com/hashicorp/consul/api/agent.go index 8cb81fc84..8e5ffde30 100644 --- a/vendor/github.com/hashicorp/consul/api/agent.go +++ b/vendor/github.com/hashicorp/consul/api/agent.go @@ -38,6 +38,18 @@ const ( ProxyExecModeScript ProxyExecMode = "script" ) +// UpstreamDestType is the type of upstream discovery mechanism. +type UpstreamDestType string + +const ( + // UpstreamDestTypeService discovers instances via healthy service lookup. + UpstreamDestTypeService UpstreamDestType = "service" + + // UpstreamDestTypePreparedQuery discovers instances via prepared query + // execution. + UpstreamDestTypePreparedQuery UpstreamDestType = "prepared_query" +) + // AgentCheck represents a check known to the agent type AgentCheck struct { Node string @@ -51,34 +63,57 @@ type AgentCheck struct { Definition HealthCheckDefinition } +// AgentWeights represent optional weights for a service +type AgentWeights struct { + Passing int + Warning int +} + // AgentService represents a service known to the agent type AgentService struct { - Kind ServiceKind + Kind ServiceKind `json:",omitempty"` ID string Service string Tags []string Meta map[string]string Port int Address string + Weights AgentWeights EnableTagOverride bool - CreateIndex uint64 - ModifyIndex uint64 - ProxyDestination string - Connect *AgentServiceConnect + CreateIndex uint64 `json:",omitempty"` + ModifyIndex uint64 `json:",omitempty"` + ContentHash string `json:",omitempty"` + // DEPRECATED (ProxyDestination) - remove this field + ProxyDestination string `json:",omitempty"` + Proxy *AgentServiceConnectProxyConfig `json:",omitempty"` + Connect *AgentServiceConnect `json:",omitempty"` } // AgentServiceConnect represents the Connect configuration of a service. type AgentServiceConnect struct { - Native bool - Proxy *AgentServiceConnectProxy + Native bool `json:",omitempty"` + Proxy *AgentServiceConnectProxy `json:",omitempty"` + SidecarService *AgentServiceRegistration `json:",omitempty"` } // AgentServiceConnectProxy represents the Connect Proxy configuration of a // service. type AgentServiceConnectProxy struct { - ExecMode ProxyExecMode - Command []string - Config map[string]interface{} + ExecMode ProxyExecMode `json:",omitempty"` + Command []string `json:",omitempty"` + Config map[string]interface{} `json:",omitempty"` + Upstreams []Upstream `json:",omitempty"` +} + +// AgentServiceConnectProxyConfig is the proxy configuration in a connect-proxy +// ServiceDefinition or response. +type AgentServiceConnectProxyConfig struct { + DestinationServiceName string + DestinationServiceID string `json:",omitempty"` + LocalServiceAddress string `json:",omitempty"` + LocalServicePort int `json:",omitempty"` + Config map[string]interface{} `json:",omitempty"` + Upstreams []Upstream } // AgentMember represents a cluster member known to the agent @@ -119,10 +154,13 @@ type AgentServiceRegistration struct { Address string `json:",omitempty"` EnableTagOverride bool `json:",omitempty"` Meta map[string]string `json:",omitempty"` + Weights *AgentWeights `json:",omitempty"` Check *AgentServiceCheck Checks AgentServiceChecks - ProxyDestination string `json:",omitempty"` - Connect *AgentServiceConnect `json:",omitempty"` + // DEPRECATED (ProxyDestination) - remove this field + ProxyDestination string `json:",omitempty"` + Proxy *AgentServiceConnectProxyConfig `json:",omitempty"` + Connect *AgentServiceConnect `json:",omitempty"` } // AgentCheckRegistration is used to register a new check @@ -153,6 +191,8 @@ type AgentServiceCheck struct { TLSSkipVerify bool `json:",omitempty"` GRPC string `json:",omitempty"` GRPCUseTLS bool `json:",omitempty"` + AliasNode string `json:",omitempty"` + AliasService string `json:",omitempty"` // In Consul 0.7 and later, checks that are associated with a service // may also contain this optional DeregisterCriticalServiceAfter field, @@ -225,9 +265,23 @@ type ConnectProxyConfig struct { TargetServiceID string TargetServiceName string ContentHash string - ExecMode ProxyExecMode - Command []string - Config map[string]interface{} + // DEPRECATED(managed-proxies) - this struct is re-used for sidecar configs + // but they don't need ExecMode or Command + ExecMode ProxyExecMode `json:",omitempty"` + Command []string `json:",omitempty"` + Config map[string]interface{} + Upstreams []Upstream +} + +// Upstream is the response structure for a proxy upstream configuration. +type Upstream struct { + DestinationType UpstreamDestType `json:",omitempty"` + DestinationNamespace string `json:",omitempty"` + DestinationName string + Datacenter string `json:",omitempty"` + LocalBindAddress string `json:",omitempty"` + LocalBindPort int `json:",omitempty"` + Config map[string]interface{} `json:",omitempty"` } // Agent can be used to query the Agent endpoints @@ -260,6 +314,24 @@ func (a *Agent) Self() (map[string]map[string]interface{}, error) { return out, nil } +// Host is used to retrieve information about the host the +// agent is running on such as CPU, memory, and disk. Requires +// a operator:read ACL token. +func (a *Agent) Host() (map[string]interface{}, error) { + r := a.c.newRequest("GET", "/v1/agent/host") + _, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + var out map[string]interface{} + if err := decodeBody(resp, &out); err != nil { + return nil, err + } + return out, nil +} + // Metrics is used to query the agent we are speaking to for // its current internal metric data func (a *Agent) Metrics() (*MetricsInfo, error) { @@ -335,6 +407,33 @@ func (a *Agent) Services() (map[string]*AgentService, error) { return out, nil } +// Service returns a locally registered service instance and allows for +// hash-based blocking. +// +// Note that this uses an unconventional blocking mechanism since it's +// agent-local state. That means there is no persistent raft index so we block +// based on object hash instead. +func (a *Agent) Service(serviceID string, q *QueryOptions) (*AgentService, *QueryMeta, error) { + r := a.c.newRequest("GET", "/v1/agent/service/"+serviceID) + r.setQueryOptions(q) + rtt, resp, err := requireOK(a.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + var out *AgentService + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return out, qm, nil +} + // Members returns the known gossip members. The WAN // flag can be used to query a server for WAN members. func (a *Agent) Members(wan bool) ([]*AgentMember, error) { diff --git a/vendor/github.com/hashicorp/consul/api/api.go b/vendor/github.com/hashicorp/consul/api/api.go index 649238302..cf8bad27f 100644 --- a/vendor/github.com/hashicorp/consul/api/api.go +++ b/vendor/github.com/hashicorp/consul/api/api.go @@ -61,6 +61,12 @@ const ( // HTTPSSLVerifyEnvName defines an environment variable name which sets // whether or not to disable certificate checking. HTTPSSLVerifyEnvName = "CONSUL_HTTP_SSL_VERIFY" + + // GRPCAddrEnvName defines an environment variable name which sets the gRPC + // address for consul connect envoy. Note this isn't actually used by the api + // client in this package but is defined here for consistency with all the + // other ENV names we use. + GRPCAddrEnvName = "CONSUL_GRPC_ADDR" ) // QueryOptions are used to parameterize a query @@ -78,6 +84,27 @@ type QueryOptions struct { // read. RequireConsistent bool + // UseCache requests that the agent cache results locally. See + // https://www.consul.io/api/index.html#agent-caching for more details on the + // semantics. + UseCache bool + + // MaxAge limits how old a cached value will be returned if UseCache is true. + // If there is a cached response that is older than the MaxAge, it is treated + // as a cache miss and a new fetch invoked. If the fetch fails, the error is + // returned. Clients that wish to allow for stale results on error can set + // StaleIfError to a longer duration to change this behaviour. It is ignored + // if the endpoint supports background refresh caching. See + // https://www.consul.io/api/index.html#agent-caching for more details. + MaxAge time.Duration + + // StaleIfError specifies how stale the client will accept a cached response + // if the servers are unavailable to fetch a fresh one. Only makes sense when + // UseCache is true and MaxAge is set to a lower, non-zero value. It is + // ignored if the endpoint supports background refresh caching. See + // https://www.consul.io/api/index.html#agent-caching for more details. + StaleIfError time.Duration + // WaitIndex is used to enable a blocking query. Waits // until the timeout or the next index is reached WaitIndex uint64 @@ -196,6 +223,13 @@ type QueryMeta struct { // Is address translation enabled for HTTP responses on this agent AddressTranslationEnabled bool + + // CacheHit is true if the result was served from agent-local cache. + CacheHit bool + + // CacheAge is set if request was ?cached and indicates how stale the cached + // response is. + CacheAge time.Duration } // WriteMeta is used to return meta data about a write @@ -276,7 +310,7 @@ type TLSConfig struct { // DefaultConfig returns a default configuration for the client. By default this // will pool and reuse idle connections to Consul. If you have a long-lived // client object, this is the desired behavior and should make the most efficient -// use of the connections to Consul. If you don't reuse a client object , which +// use of the connections to Consul. If you don't reuse a client object, which // is not recommended, then you may notice idle connections building up over // time. To avoid this, use the DefaultNonPooledConfig() instead. func DefaultConfig() *Config { @@ -591,6 +625,20 @@ func (r *request) setQueryOptions(q *QueryOptions) { if q.Connect { r.params.Set("connect", "true") } + if q.UseCache && !q.RequireConsistent { + r.params.Set("cached", "") + + cc := []string{} + if q.MaxAge > 0 { + cc = append(cc, fmt.Sprintf("max-age=%.0f", q.MaxAge.Seconds())) + } + if q.StaleIfError > 0 { + cc = append(cc, fmt.Sprintf("stale-if-error=%.0f", q.StaleIfError.Seconds())) + } + if len(cc) > 0 { + r.header.Set("Cache-Control", strings.Join(cc, ", ")) + } + } r.ctx = q.ctx } @@ -802,6 +850,18 @@ func parseQueryMeta(resp *http.Response, q *QueryMeta) error { q.AddressTranslationEnabled = false } + // Parse Cache info + if cacheStr := header.Get("X-Cache"); cacheStr != "" { + q.CacheHit = strings.EqualFold(cacheStr, "HIT") + } + if ageStr := header.Get("Age"); ageStr != "" { + age, err := strconv.ParseUint(ageStr, 10, 64) + if err != nil { + return fmt.Errorf("Failed to parse Age Header: %v", err) + } + q.CacheAge = time.Duration(age) * time.Second + } + return nil } diff --git a/vendor/github.com/hashicorp/consul/api/catalog.go b/vendor/github.com/hashicorp/consul/api/catalog.go index 1a6bbc3b3..c175c3fff 100644 --- a/vendor/github.com/hashicorp/consul/api/catalog.go +++ b/vendor/github.com/hashicorp/consul/api/catalog.go @@ -1,5 +1,10 @@ package api +type Weights struct { + Passing int + Warning int +} + type Node struct { ID string Node string @@ -24,9 +29,14 @@ type CatalogService struct { ServiceTags []string ServiceMeta map[string]string ServicePort int + ServiceWeights Weights ServiceEnableTagOverride bool - CreateIndex uint64 - ModifyIndex uint64 + // DEPRECATED (ProxyDestination) - remove the next comment! + // We forgot to ever add ServiceProxyDestination here so no need to deprecate! + ServiceProxy *AgentServiceConnectProxyConfig + CreateIndex uint64 + Checks HealthChecks + ModifyIndex uint64 } type CatalogNode struct { @@ -43,6 +53,7 @@ type CatalogRegistration struct { Datacenter string Service *AgentService Check *AgentCheck + Checks HealthChecks SkipNodeUpdate bool } @@ -156,23 +167,43 @@ func (c *Catalog) Services(q *QueryOptions) (map[string][]string, *QueryMeta, er // Service is used to query catalog entries for a given service func (c *Catalog) Service(service, tag string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) { - return c.service(service, tag, q, false) + var tags []string + if tag != "" { + tags = []string{tag} + } + return c.service(service, tags, q, false) +} + +// Supports multiple tags for filtering +func (c *Catalog) ServiceMultipleTags(service string, tags []string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) { + return c.service(service, tags, q, false) } // Connect is used to query catalog entries for a given Connect-enabled service func (c *Catalog) Connect(service, tag string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) { - return c.service(service, tag, q, true) + var tags []string + if tag != "" { + tags = []string{tag} + } + return c.service(service, tags, q, true) } -func (c *Catalog) service(service, tag string, q *QueryOptions, connect bool) ([]*CatalogService, *QueryMeta, error) { +// Supports multiple tags for filtering +func (c *Catalog) ConnectMultipleTags(service string, tags []string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) { + return c.service(service, tags, q, true) +} + +func (c *Catalog) service(service string, tags []string, q *QueryOptions, connect bool) ([]*CatalogService, *QueryMeta, error) { path := "/v1/catalog/service/" + service if connect { path = "/v1/catalog/connect/" + service } r := c.c.newRequest("GET", path) r.setQueryOptions(q) - if tag != "" { - r.params.Set("tag", tag) + if len(tags) > 0 { + for _, tag := range tags { + r.params.Add("tag", tag) + } } rtt, resp, err := requireOK(c.c.doRequest(r)) if err != nil { diff --git a/vendor/github.com/hashicorp/consul/api/debug.go b/vendor/github.com/hashicorp/consul/api/debug.go new file mode 100644 index 000000000..238046853 --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/debug.go @@ -0,0 +1,106 @@ +package api + +import ( + "fmt" + "io/ioutil" + "strconv" +) + +// Debug can be used to query the /debug/pprof endpoints to gather +// profiling information about the target agent.Debug +// +// The agent must have enable_debug set to true for profiling to be enabled +// and for these endpoints to function. +type Debug struct { + c *Client +} + +// Debug returns a handle that exposes the internal debug endpoints. +func (c *Client) Debug() *Debug { + return &Debug{c} +} + +// Heap returns a pprof heap dump +func (d *Debug) Heap() ([]byte, error) { + r := d.c.newRequest("GET", "/debug/pprof/heap") + _, resp, err := d.c.doRequest(r) + if err != nil { + return nil, fmt.Errorf("error making request: %s", err) + } + defer resp.Body.Close() + + // We return a raw response because we're just passing through a response + // from the pprof handlers + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("error decoding body: %s", err) + } + + return body, nil +} + +// Profile returns a pprof CPU profile for the specified number of seconds +func (d *Debug) Profile(seconds int) ([]byte, error) { + r := d.c.newRequest("GET", "/debug/pprof/profile") + + // Capture a profile for the specified number of seconds + r.params.Set("seconds", strconv.Itoa(seconds)) + + _, resp, err := d.c.doRequest(r) + if err != nil { + return nil, fmt.Errorf("error making request: %s", err) + } + defer resp.Body.Close() + + // We return a raw response because we're just passing through a response + // from the pprof handlers + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("error decoding body: %s", err) + } + + return body, nil +} + +// Trace returns an execution trace +func (d *Debug) Trace(seconds int) ([]byte, error) { + r := d.c.newRequest("GET", "/debug/pprof/trace") + + // Capture a trace for the specified number of seconds + r.params.Set("seconds", strconv.Itoa(seconds)) + + _, resp, err := d.c.doRequest(r) + if err != nil { + return nil, fmt.Errorf("error making request: %s", err) + } + defer resp.Body.Close() + + // We return a raw response because we're just passing through a response + // from the pprof handlers + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("error decoding body: %s", err) + } + + return body, nil +} + +// Goroutine returns a pprof goroutine profile +func (d *Debug) Goroutine() ([]byte, error) { + r := d.c.newRequest("GET", "/debug/pprof/goroutine") + + _, resp, err := d.c.doRequest(r) + if err != nil { + return nil, fmt.Errorf("error making request: %s", err) + } + defer resp.Body.Close() + + // We return a raw response because we're just passing through a response + // from the pprof handlers + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("error decoding body: %s", err) + } + + return body, nil +} diff --git a/vendor/github.com/hashicorp/consul/api/health.go b/vendor/github.com/hashicorp/consul/api/health.go index 1835da559..eae6a01a8 100644 --- a/vendor/github.com/hashicorp/consul/api/health.go +++ b/vendor/github.com/hashicorp/consul/api/health.go @@ -159,7 +159,15 @@ func (h *Health) Checks(service string, q *QueryOptions) (HealthChecks, *QueryMe // for a given service. It can optionally do server-side filtering on a tag // or nodes with passing health checks only. func (h *Health) Service(service, tag string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) { - return h.service(service, tag, passingOnly, q, false) + var tags []string + if tag != "" { + tags = []string{tag} + } + return h.service(service, tags, passingOnly, q, false) +} + +func (h *Health) ServiceMultipleTags(service string, tags []string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) { + return h.service(service, tags, passingOnly, q, false) } // Connect is equivalent to Service except that it will only return services @@ -168,18 +176,28 @@ func (h *Health) Service(service, tag string, passingOnly bool, q *QueryOptions) // passingOnly is true only instances where both the service and any proxy are // healthy will be returned. func (h *Health) Connect(service, tag string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) { - return h.service(service, tag, passingOnly, q, true) + var tags []string + if tag != "" { + tags = []string{tag} + } + return h.service(service, tags, passingOnly, q, true) } -func (h *Health) service(service, tag string, passingOnly bool, q *QueryOptions, connect bool) ([]*ServiceEntry, *QueryMeta, error) { +func (h *Health) ConnectMultipleTags(service string, tags []string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) { + return h.service(service, tags, passingOnly, q, true) +} + +func (h *Health) service(service string, tags []string, passingOnly bool, q *QueryOptions, connect bool) ([]*ServiceEntry, *QueryMeta, error) { path := "/v1/health/service/" + service if connect { path = "/v1/health/connect/" + service } r := h.c.newRequest("GET", path) r.setQueryOptions(q) - if tag != "" { - r.params.Set("tag", tag) + if len(tags) > 0 { + for _, tag := range tags { + r.params.Add("tag", tag) + } } if passingOnly { r.params.Set(HealthPassing, "1") diff --git a/vendor/github.com/hashicorp/consul/api/operator_area.go b/vendor/github.com/hashicorp/consul/api/operator_area.go index a630b694c..5cf7e4973 100644 --- a/vendor/github.com/hashicorp/consul/api/operator_area.go +++ b/vendor/github.com/hashicorp/consul/api/operator_area.go @@ -1,9 +1,10 @@ +package api + // The /v1/operator/area endpoints are available only in Consul Enterprise and // interact with its network area subsystem. Network areas are used to link // together Consul servers in different Consul datacenters. With network areas, // Consul datacenters can be linked together in ways other than a fully-connected // mesh, as is required for Consul's WAN. -package api import ( "net" diff --git a/vendor/github.com/hashicorp/errwrap/README.md b/vendor/github.com/hashicorp/errwrap/README.md index 1c95f5978..444df08f8 100644 --- a/vendor/github.com/hashicorp/errwrap/README.md +++ b/vendor/github.com/hashicorp/errwrap/README.md @@ -48,7 +48,7 @@ func main() { // We can use the Contains helpers to check if an error contains // another error. It is safe to do this with a nil error, or with // an error that doesn't even use the errwrap package. - if errwrap.Contains(err, ErrNotExist) { + if errwrap.Contains(err, "does not exist") { // Do something } if errwrap.ContainsType(err, new(os.PathError)) { diff --git a/vendor/github.com/hashicorp/errwrap/go.mod b/vendor/github.com/hashicorp/errwrap/go.mod new file mode 100644 index 000000000..c9b84022c --- /dev/null +++ b/vendor/github.com/hashicorp/errwrap/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/errwrap diff --git a/vendor/github.com/hashicorp/go-immutable-radix/go.mod b/vendor/github.com/hashicorp/go-immutable-radix/go.mod new file mode 100644 index 000000000..27e7b7c95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-immutable-radix/go.mod @@ -0,0 +1,6 @@ +module github.com/hashicorp/go-immutable-radix + +require ( + github.com/hashicorp/go-uuid v1.0.0 + github.com/hashicorp/golang-lru v0.5.0 +) diff --git a/vendor/github.com/hashicorp/go-immutable-radix/go.sum b/vendor/github.com/hashicorp/go-immutable-radix/go.sum new file mode 100644 index 000000000..7de5dfc50 --- /dev/null +++ b/vendor/github.com/hashicorp/go-immutable-radix/go.sum @@ -0,0 +1,4 @@ +github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= diff --git a/vendor/github.com/hashicorp/go-multierror/.travis.yml b/vendor/github.com/hashicorp/go-multierror/.travis.yml new file mode 100644 index 000000000..304a83595 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/.travis.yml @@ -0,0 +1,12 @@ +sudo: false + +language: go + +go: + - 1.x + +branches: + only: + - master + +script: make test testrace diff --git a/vendor/github.com/hashicorp/go-multierror/Makefile b/vendor/github.com/hashicorp/go-multierror/Makefile new file mode 100644 index 000000000..b97cd6ed0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/Makefile @@ -0,0 +1,31 @@ +TEST?=./... + +default: test + +# test runs the test suite and vets the code. +test: generate + @echo "==> Running tests..." + @go list $(TEST) \ + | grep -v "/vendor/" \ + | xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS} + +# testrace runs the race checker +testrace: generate + @echo "==> Running tests (race)..." + @go list $(TEST) \ + | grep -v "/vendor/" \ + | xargs -n1 go test -timeout=60s -race ${TESTARGS} + +# updatedeps installs all the dependencies needed to run and build. +updatedeps: + @sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'" + +# generate runs `go generate` to build the dynamically generated source files. +generate: + @echo "==> Generating..." + @find . -type f -name '.DS_Store' -delete + @go list ./... \ + | grep -v "/vendor/" \ + | xargs -n1 go generate + +.PHONY: default test testrace updatedeps generate diff --git a/vendor/github.com/hashicorp/go-multierror/README.md b/vendor/github.com/hashicorp/go-multierror/README.md index e81be50e0..ead5830f7 100644 --- a/vendor/github.com/hashicorp/go-multierror/README.md +++ b/vendor/github.com/hashicorp/go-multierror/README.md @@ -1,5 +1,11 @@ # go-multierror +[![Build Status](http://img.shields.io/travis/hashicorp/go-multierror.svg?style=flat-square)][travis] +[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] + +[travis]: https://travis-ci.org/hashicorp/go-multierror +[godocs]: https://godoc.org/github.com/hashicorp/go-multierror + `go-multierror` is a package for Go that provides a mechanism for representing a list of `error` values as a single `error`. diff --git a/vendor/github.com/hashicorp/go-multierror/append.go b/vendor/github.com/hashicorp/go-multierror/append.go index 00afa9b35..775b6e753 100644 --- a/vendor/github.com/hashicorp/go-multierror/append.go +++ b/vendor/github.com/hashicorp/go-multierror/append.go @@ -18,9 +18,13 @@ func Append(err error, errs ...error) *Error { for _, e := range errs { switch e := e.(type) { case *Error: - err.Errors = append(err.Errors, e.Errors...) + if e != nil { + err.Errors = append(err.Errors, e.Errors...) + } default: - err.Errors = append(err.Errors, e) + if e != nil { + err.Errors = append(err.Errors, e) + } } } diff --git a/vendor/github.com/hashicorp/go-multierror/format.go b/vendor/github.com/hashicorp/go-multierror/format.go index bb65a12e7..47f13c49a 100644 --- a/vendor/github.com/hashicorp/go-multierror/format.go +++ b/vendor/github.com/hashicorp/go-multierror/format.go @@ -12,12 +12,16 @@ type ErrorFormatFunc func([]error) string // ListFormatFunc is a basic formatter that outputs the number of errors // that occurred along with a bullet point list of the errors. func ListFormatFunc(es []error) string { + if len(es) == 1 { + return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0]) + } + points := make([]string, len(es)) for i, err := range es { points[i] = fmt.Sprintf("* %s", err) } return fmt.Sprintf( - "%d error(s) occurred:\n\n%s", - len(es), strings.Join(points, "\n")) + "%d errors occurred:\n\t%s\n\n", + len(es), strings.Join(points, "\n\t")) } diff --git a/vendor/github.com/hashicorp/go-multierror/go.mod b/vendor/github.com/hashicorp/go-multierror/go.mod new file mode 100644 index 000000000..2534331d5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/go.mod @@ -0,0 +1,3 @@ +module github.com/hashicorp/go-multierror + +require github.com/hashicorp/errwrap v1.0.0 diff --git a/vendor/github.com/hashicorp/go-multierror/go.sum b/vendor/github.com/hashicorp/go-multierror/go.sum new file mode 100644 index 000000000..85b1f8ff3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/go.sum @@ -0,0 +1,4 @@ +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce h1:prjrVgOk2Yg6w+PflHoszQNLTUh4kaByUcEWM/9uin4= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= diff --git a/vendor/github.com/hashicorp/go-multierror/multierror.go b/vendor/github.com/hashicorp/go-multierror/multierror.go index 2ea082732..89b1422d1 100644 --- a/vendor/github.com/hashicorp/go-multierror/multierror.go +++ b/vendor/github.com/hashicorp/go-multierror/multierror.go @@ -40,11 +40,11 @@ func (e *Error) GoString() string { } // WrappedErrors returns the list of errors that this Error is wrapping. -// It is an implementatin of the errwrap.Wrapper interface so that +// It is an implementation of the errwrap.Wrapper interface so that // multierror.Error can be used with that library. // // This method is not safe to be called concurrently and is no different -// than accessing the Errors field directly. It is implementd only to +// than accessing the Errors field directly. It is implemented only to // satisfy the errwrap.Wrapper interface. func (e *Error) WrappedErrors() []error { return e.Errors diff --git a/vendor/github.com/hashicorp/go-multierror/sort.go b/vendor/github.com/hashicorp/go-multierror/sort.go new file mode 100644 index 000000000..fecb14e81 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/sort.go @@ -0,0 +1,16 @@ +package multierror + +// Len implements sort.Interface function for length +func (err Error) Len() int { + return len(err.Errors) +} + +// Swap implements sort.Interface function for swapping elements +func (err Error) Swap(i, j int) { + err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i] +} + +// Less implements sort.Interface function for determining order +func (err Error) Less(i, j int) bool { + return err.Errors[i].Error() < err.Errors[j].Error() +} diff --git a/vendor/github.com/hashicorp/go-retryablehttp/client.go b/vendor/github.com/hashicorp/go-retryablehttp/client.go index 21f45e5ed..15f1e8850 100644 --- a/vendor/github.com/hashicorp/go-retryablehttp/client.go +++ b/vendor/github.com/hashicorp/go-retryablehttp/client.go @@ -36,7 +36,7 @@ import ( "strings" "time" - "github.com/hashicorp/go-cleanhttp" + cleanhttp "github.com/hashicorp/go-cleanhttp" ) var ( @@ -81,6 +81,28 @@ func (r *Request) WithContext(ctx context.Context) *Request { return r } +// BodyBytes allows accessing the request body. It is an analogue to +// http.Request's Body variable, but it returns a copy of the underlying data +// rather than consuming it. +// +// This function is not thread-safe; do not call it at the same time as another +// call, or at the same time this request is being used with Client.Do. +func (r *Request) BodyBytes() ([]byte, error) { + if r.body == nil { + return nil, nil + } + body, err := r.body() + if err != nil { + return nil, err + } + buf := new(bytes.Buffer) + _, err = buf.ReadFrom(body) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} + // NewRequest creates a new wrapped request. func NewRequest(method, url string, rawBody interface{}) (*Request, error) { var err error @@ -183,18 +205,24 @@ func NewRequest(method, url string, rawBody interface{}) (*Request, error) { return &Request{body, httpReq}, nil } +// Logger interface allows to use other loggers than +// standard log.Logger. +type Logger interface { + Printf(string, ...interface{}) +} + // RequestLogHook allows a function to run before each retry. The HTTP // request which will be made, and the retry number (0 for the initial // request) are available to users. The internal logger is exposed to // consumers. -type RequestLogHook func(*log.Logger, *http.Request, int) +type RequestLogHook func(Logger, *http.Request, int) // ResponseLogHook is like RequestLogHook, but allows running a function // on each HTTP response. This function will be invoked at the end of // every HTTP request executed, regardless of whether a subsequent retry // needs to be performed or not. If the response body is read or closed // from this method, this will affect the response returned from Do(). -type ResponseLogHook func(*log.Logger, *http.Response) +type ResponseLogHook func(Logger, *http.Response) // CheckRetry specifies a policy for handling retries. It is called // following each request with the response and error values returned by @@ -221,7 +249,7 @@ type ErrorHandler func(resp *http.Response, err error, numTries int) (*http.Resp // like automatic retries to tolerate minor outages. type Client struct { HTTPClient *http.Client // Internal HTTP client. - Logger *log.Logger // Customer logger instance. + Logger Logger // Customer logger instance. RetryWaitMin time.Duration // Minimum time to wait RetryWaitMax time.Duration // Maximum time to wait diff --git a/vendor/github.com/hashicorp/go-retryablehttp/go.mod b/vendor/github.com/hashicorp/go-retryablehttp/go.mod new file mode 100644 index 000000000..d28c8c8eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-retryablehttp/go.mod @@ -0,0 +1,3 @@ +module github.com/hashicorp/go-retryablehttp + +require github.com/hashicorp/go-cleanhttp v0.5.0 diff --git a/vendor/github.com/hashicorp/go-retryablehttp/go.sum b/vendor/github.com/hashicorp/go-retryablehttp/go.sum new file mode 100644 index 000000000..3ed0fd98e --- /dev/null +++ b/vendor/github.com/hashicorp/go-retryablehttp/go.sum @@ -0,0 +1,2 @@ +github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= diff --git a/vendor/github.com/hashicorp/go-sockaddr/go.mod b/vendor/github.com/hashicorp/go-sockaddr/go.mod new file mode 100644 index 000000000..7c07b5bad --- /dev/null +++ b/vendor/github.com/hashicorp/go-sockaddr/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/go-sockaddr diff --git a/vendor/github.com/hashicorp/go-uuid/README.md b/vendor/github.com/hashicorp/go-uuid/README.md index 02565c8c4..fbde8b9ae 100644 --- a/vendor/github.com/hashicorp/go-uuid/README.md +++ b/vendor/github.com/hashicorp/go-uuid/README.md @@ -1,6 +1,6 @@ # uuid [![Build Status](https://travis-ci.org/hashicorp/go-uuid.svg?branch=master)](https://travis-ci.org/hashicorp/go-uuid) -Generates UUID-format strings using high quality, purely random bytes. It can also parse UUID-format strings into their component bytes. +Generates UUID-format strings using high quality, _purely random_ bytes. It is **not** intended to be RFC compliant, merely to use a well-understood string representation of a 128-bit value. It can also parse UUID-format strings into their component bytes. Documentation ============= diff --git a/vendor/github.com/hashicorp/go-uuid/go.mod b/vendor/github.com/hashicorp/go-uuid/go.mod new file mode 100644 index 000000000..dd57f9d21 --- /dev/null +++ b/vendor/github.com/hashicorp/go-uuid/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/go-uuid diff --git a/vendor/github.com/hashicorp/go-uuid/uuid.go b/vendor/github.com/hashicorp/go-uuid/uuid.go index ff9364c40..911227f61 100644 --- a/vendor/github.com/hashicorp/go-uuid/uuid.go +++ b/vendor/github.com/hashicorp/go-uuid/uuid.go @@ -15,9 +15,11 @@ func GenerateRandomBytes(size int) ([]byte, error) { return buf, nil } +const uuidLen = 16 + // GenerateUUID is used to generate a random UUID func GenerateUUID() (string, error) { - buf, err := GenerateRandomBytes(16) + buf, err := GenerateRandomBytes(uuidLen) if err != nil { return "", err } @@ -25,11 +27,11 @@ func GenerateUUID() (string, error) { } func FormatUUID(buf []byte) (string, error) { - if len(buf) != 16 { - return "", fmt.Errorf("wrong length byte slice (%d)", len(buf)) + if buflen := len(buf); buflen != uuidLen { + return "", fmt.Errorf("wrong length byte slice (%d)", buflen) } - return fmt.Sprintf("%08x-%04x-%04x-%04x-%12x", + return fmt.Sprintf("%x-%x-%x-%x-%x", buf[0:4], buf[4:6], buf[6:8], @@ -38,16 +40,14 @@ func FormatUUID(buf []byte) (string, error) { } func ParseUUID(uuid string) ([]byte, error) { - if len(uuid) != 36 { + if len(uuid) != 2 * uuidLen + 4 { return nil, fmt.Errorf("uuid string is wrong length") } - hyph := []byte("-") - - if uuid[8] != hyph[0] || - uuid[13] != hyph[0] || - uuid[18] != hyph[0] || - uuid[23] != hyph[0] { + if uuid[8] != '-' || + uuid[13] != '-' || + uuid[18] != '-' || + uuid[23] != '-' { return nil, fmt.Errorf("uuid is improperly formatted") } @@ -57,7 +57,7 @@ func ParseUUID(uuid string) ([]byte, error) { if err != nil { return nil, err } - if len(ret) != 16 { + if len(ret) != uuidLen { return nil, fmt.Errorf("decoded hex is the wrong length") } diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go index 744cac01c..74c707744 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -1,37 +1,36 @@ package simplelru - // LRUCache is the interface for simple LRU cache. type LRUCache interface { - // Adds a value to the cache, returns true if an eviction occurred and - // updates the "recently used"-ness of the key. - Add(key, value interface{}) bool + // Adds a value to the cache, returns true if an eviction occurred and + // updates the "recently used"-ness of the key. + Add(key, value interface{}) bool - // Returns key's value from the cache and - // updates the "recently used"-ness of the key. #value, isFound - Get(key interface{}) (value interface{}, ok bool) + // Returns key's value from the cache and + // updates the "recently used"-ness of the key. #value, isFound + Get(key interface{}) (value interface{}, ok bool) - // Check if a key exsists in cache without updating the recent-ness. - Contains(key interface{}) (ok bool) + // Check if a key exsists in cache without updating the recent-ness. + Contains(key interface{}) (ok bool) - // Returns key's value without updating the "recently used"-ness of the key. - Peek(key interface{}) (value interface{}, ok bool) + // Returns key's value without updating the "recently used"-ness of the key. + Peek(key interface{}) (value interface{}, ok bool) - // Removes a key from the cache. - Remove(key interface{}) bool + // Removes a key from the cache. + Remove(key interface{}) bool - // Removes the oldest entry from cache. - RemoveOldest() (interface{}, interface{}, bool) + // Removes the oldest entry from cache. + RemoveOldest() (interface{}, interface{}, bool) - // Returns the oldest entry from the cache. #key, value, isFound - GetOldest() (interface{}, interface{}, bool) + // Returns the oldest entry from the cache. #key, value, isFound + GetOldest() (interface{}, interface{}, bool) - // Returns a slice of the keys in the cache, from oldest to newest. - Keys() []interface{} + // Returns a slice of the keys in the cache, from oldest to newest. + Keys() []interface{} - // Returns the number of items in the cache. - Len() int + // Returns the number of items in the cache. + Len() int - // Clear all cache entries - Purge() + // Clear all cache entries + Purge() } diff --git a/vendor/github.com/hashicorp/hcl/go.mod b/vendor/github.com/hashicorp/hcl/go.mod new file mode 100644 index 000000000..4debbbe35 --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/go.mod @@ -0,0 +1,3 @@ +module github.com/hashicorp/hcl + +require github.com/davecgh/go-spew v1.1.1 diff --git a/vendor/github.com/hashicorp/hcl/go.sum b/vendor/github.com/hashicorp/hcl/go.sum new file mode 100644 index 000000000..b5e2922e8 --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/go.sum @@ -0,0 +1,2 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/vendor/github.com/hashicorp/vault/api/auth_token.go b/vendor/github.com/hashicorp/vault/api/auth_token.go index 4f74f61fe..ed594eee8 100644 --- a/vendor/github.com/hashicorp/vault/api/auth_token.go +++ b/vendor/github.com/hashicorp/vault/api/auth_token.go @@ -1,5 +1,7 @@ package api +import "context" + // TokenAuth is used to perform token backend operations on Vault type TokenAuth struct { c *Client @@ -16,7 +18,9 @@ func (c *TokenAuth) Create(opts *TokenCreateRequest) (*Secret, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -31,7 +35,9 @@ func (c *TokenAuth) CreateOrphan(opts *TokenCreateRequest) (*Secret, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -46,7 +52,9 @@ func (c *TokenAuth) CreateWithRole(opts *TokenCreateRequest, roleName string) (* return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -63,7 +71,9 @@ func (c *TokenAuth) Lookup(token string) (*Secret, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -79,7 +89,10 @@ func (c *TokenAuth) LookupAccessor(accessor string) (*Secret, error) { }); err != nil { return nil, err } - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -91,7 +104,9 @@ func (c *TokenAuth) LookupAccessor(accessor string) (*Secret, error) { func (c *TokenAuth) LookupSelf() (*Secret, error) { r := c.c.NewRequest("GET", "/v1/auth/token/lookup-self") - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -109,7 +124,9 @@ func (c *TokenAuth) Renew(token string, increment int) (*Secret, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -126,7 +143,9 @@ func (c *TokenAuth) RenewSelf(increment int) (*Secret, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -146,7 +165,9 @@ func (c *TokenAuth) RenewTokenAsSelf(token string, increment int) (*Secret, erro return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -164,7 +185,10 @@ func (c *TokenAuth) RevokeAccessor(accessor string) error { }); err != nil { return err } - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return err } @@ -183,7 +207,9 @@ func (c *TokenAuth) RevokeOrphan(token string) error { return err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return err } @@ -197,7 +223,10 @@ func (c *TokenAuth) RevokeOrphan(token string) error { // an effect. func (c *TokenAuth) RevokeSelf(token string) error { r := c.c.NewRequest("PUT", "/v1/auth/token/revoke-self") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return err } @@ -217,7 +246,9 @@ func (c *TokenAuth) RevokeTree(token string) error { return err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return err } @@ -240,4 +271,5 @@ type TokenCreateRequest struct { DisplayName string `json:"display_name"` NumUses int `json:"num_uses"` Renewable *bool `json:"renewable,omitempty"` + Type string `json:"type"` } diff --git a/vendor/github.com/hashicorp/vault/api/client.go b/vendor/github.com/hashicorp/vault/api/client.go index 8f0d3f86e..543ef0477 100644 --- a/vendor/github.com/hashicorp/vault/api/client.go +++ b/vendor/github.com/hashicorp/vault/api/client.go @@ -16,21 +16,24 @@ import ( "unicode" "github.com/hashicorp/errwrap" - "github.com/hashicorp/go-cleanhttp" + cleanhttp "github.com/hashicorp/go-cleanhttp" retryablehttp "github.com/hashicorp/go-retryablehttp" - "github.com/hashicorp/go-rootcerts" + rootcerts "github.com/hashicorp/go-rootcerts" + "github.com/hashicorp/vault/helper/consts" "github.com/hashicorp/vault/helper/parseutil" "golang.org/x/net/http2" "golang.org/x/time/rate" ) const EnvVaultAddress = "VAULT_ADDR" +const EnvVaultAgentAddr = "VAULT_AGENT_ADDR" const EnvVaultCACert = "VAULT_CACERT" const EnvVaultCAPath = "VAULT_CAPATH" const EnvVaultClientCert = "VAULT_CLIENT_CERT" const EnvVaultClientKey = "VAULT_CLIENT_KEY" const EnvVaultClientTimeout = "VAULT_CLIENT_TIMEOUT" -const EnvVaultInsecure = "VAULT_SKIP_VERIFY" +const EnvVaultSkipVerify = "VAULT_SKIP_VERIFY" +const EnvVaultNamespace = "VAULT_NAMESPACE" const EnvVaultTLSServerName = "VAULT_TLS_SERVER_NAME" const EnvVaultWrapTTL = "VAULT_WRAP_TTL" const EnvVaultMaxRetries = "VAULT_MAX_RETRIES" @@ -55,6 +58,10 @@ type Config struct { // HttpClient. Address string + // AgentAddress is the address of the local Vault agent. This should be a + // complete URL such as "http://vault.example.com". + AgentAddress string + // HttpClient is the HTTP client to use. Vault sets sane defaults for the // http.Client and its associated http.Transport created in DefaultConfig. // If you must modify Vault's defaults, it is suggested that you start with @@ -83,6 +90,14 @@ type Config struct { // then that limiter will be used. Note that an empty Limiter // is equivalent blocking all events. Limiter *rate.Limiter + + // OutputCurlString causes the actual request to return an error of type + // *OutputStringError. Type asserting the error message will allow + // fetching a cURL-compatible string for the operation. + // + // Note: It is not thread-safe to set this and make concurrent requests + // with the same client. Cloning a client will not clone this value. + OutputCurlString bool } // TLSConfig contains the parameters needed to configure TLS on the HTTP client @@ -120,7 +135,7 @@ type TLSConfig struct { func DefaultConfig() *Config { config := &Config{ Address: "https://127.0.0.1:8200", - HttpClient: cleanhttp.DefaultClient(), + HttpClient: cleanhttp.DefaultPooledClient(), } config.HttpClient.Timeout = time.Second * 60 @@ -214,6 +229,7 @@ func (c *Config) ConfigureTLS(t *TLSConfig) error { // there is an error, no configuration value is updated. func (c *Config) ReadEnvironment() error { var envAddress string + var envAgentAddress string var envCACert string var envCAPath string var envClientCert string @@ -228,6 +244,9 @@ func (c *Config) ReadEnvironment() error { if v := os.Getenv(EnvVaultAddress); v != "" { envAddress = v } + if v := os.Getenv(EnvVaultAgentAddr); v != "" { + envAgentAddress = v + } if v := os.Getenv(EnvVaultMaxRetries); v != "" { maxRetries, err := strconv.ParseUint(v, 10, 32) if err != nil { @@ -261,7 +280,7 @@ func (c *Config) ReadEnvironment() error { } envClientTimeout = clientTimeout } - if v := os.Getenv(EnvVaultInsecure); v != "" { + if v := os.Getenv(EnvVaultSkipVerify); v != "" { var err error envInsecure, err = strconv.ParseBool(v) if err != nil { @@ -295,6 +314,10 @@ func (c *Config) ReadEnvironment() error { c.Address = envAddress } + if envAgentAddress != "" { + c.AgentAddress = envAgentAddress + } + if envMaxRetries != nil { c.MaxRetries = int(*envMaxRetries) } @@ -357,11 +380,6 @@ func NewClient(c *Config) (*Client, error) { c.modifyLock.Lock() defer c.modifyLock.Unlock() - u, err := url.Parse(c.Address) - if err != nil { - return nil, err - } - if c.HttpClient == nil { c.HttpClient = def.HttpClient } @@ -369,6 +387,32 @@ func NewClient(c *Config) (*Client, error) { c.HttpClient.Transport = def.HttpClient.Transport } + address := c.Address + if c.AgentAddress != "" { + address = c.AgentAddress + } + + u, err := url.Parse(address) + if err != nil { + return nil, err + } + + if strings.HasPrefix(address, "unix://") { + socket := strings.TrimPrefix(address, "unix://") + transport := c.HttpClient.Transport.(*http.Transport) + transport.DialContext = func(context.Context, string, string) (net.Conn, error) { + return net.Dial("unix", socket) + } + + // Since the address points to a unix domain socket, the scheme in the + // *URL would be set to `unix`. The *URL in the client is expected to + // be pointing to the protocol used in the application layer and not to + // the transport layer. Hence, setting the fields accordingly. + u.Scheme = "http" + u.Host = socket + u.Path = "" + } + client := &Client{ addr: u, config: c, @@ -437,6 +481,24 @@ func (c *Client) SetClientTimeout(timeout time.Duration) { c.config.Timeout = timeout } +func (c *Client) OutputCurlString() bool { + c.modifyLock.RLock() + c.config.modifyLock.RLock() + defer c.config.modifyLock.RUnlock() + c.modifyLock.RUnlock() + + return c.config.OutputCurlString +} + +func (c *Client) SetOutputCurlString(curl bool) { + c.modifyLock.RLock() + c.config.modifyLock.Lock() + defer c.config.modifyLock.Unlock() + c.modifyLock.RUnlock() + + c.config.OutputCurlString = curl +} + // CurrentWrappingLookupFunc sets a lookup function that returns desired wrap TTLs // for a given operation and path func (c *Client) CurrentWrappingLookupFunc() WrappingLookupFunc { @@ -464,6 +526,19 @@ func (c *Client) SetMFACreds(creds []string) { c.mfaCreds = creds } +// SetNamespace sets the namespace supplied either via the environment +// variable or via the command line. +func (c *Client) SetNamespace(namespace string) { + c.modifyLock.Lock() + defer c.modifyLock.Unlock() + + if c.headers == nil { + c.headers = make(http.Header) + } + + c.headers.Set(consts.NamespaceHeaderName, namespace) +} + // Token returns the access token being used by this client. It will // return the empty string if there is no token set. func (c *Client) Token() string { @@ -490,6 +565,26 @@ func (c *Client) ClearToken() { c.token = "" } +// Headers gets the current set of headers used for requests. This returns a +// copy; to modify it make modifications locally and use SetHeaders. +func (c *Client) Headers() http.Header { + c.modifyLock.RLock() + defer c.modifyLock.RUnlock() + + if c.headers == nil { + return nil + } + + ret := make(http.Header) + for k, v := range c.headers { + for _, val := range v { + ret[k] = append(ret[k], val) + } + } + + return ret +} + // SetHeaders sets the headers to be used for future requests. func (c *Client) SetHeaders(headers http.Header) { c.modifyLock.Lock() @@ -512,6 +607,10 @@ func (c *Client) SetBackoff(backoff retryablehttp.Backoff) { // underlying http.Client is used; modifying the client from more than one // goroutine at once may not be safe, so modify the client as needed and then // clone. +// +// Also, only the client's config is currently copied; this means items not in +// the api.Config struct, such as policy override and wrapping function +// behavior, must currently then be set as desired on the new client. func (c *Client) Clone() (*Client, error) { c.modifyLock.RLock() c.config.modifyLock.RLock() @@ -608,6 +707,13 @@ func (c *Client) NewRequest(method, requestPath string) *Request { // a Vault server not configured with this client. This is an advanced operation // that generally won't need to be called externally. func (c *Client) RawRequest(r *Request) (*Response, error) { + return c.RawRequestWithContext(context.Background(), r) +} + +// RawRequestWithContext performs the raw request given. This request may be against +// a Vault server not configured with this client. This is an advanced operation +// that generally won't need to be called externally. +func (c *Client) RawRequestWithContext(ctx context.Context, r *Request) (*Response, error) { c.modifyLock.RLock() token := c.token @@ -617,12 +723,13 @@ func (c *Client) RawRequest(r *Request) (*Response, error) { backoff := c.config.Backoff httpClient := c.config.HttpClient timeout := c.config.Timeout + outputCurlString := c.config.OutputCurlString c.config.modifyLock.RUnlock() c.modifyLock.RUnlock() if limiter != nil { - limiter.Wait(context.Background()) + limiter.Wait(ctx) } // Sanity check the token before potentially erroring from the API @@ -643,14 +750,16 @@ START: return nil, fmt.Errorf("nil request created") } - // Set the timeout, if any - var cancelFunc context.CancelFunc - if timeout != 0 { - var ctx context.Context - ctx, cancelFunc = context.WithTimeout(context.Background(), timeout) - req.Request = req.Request.WithContext(ctx) + if outputCurlString { + LastOutputStringError = &OutputStringError{Request: req} + return nil, LastOutputStringError } + if timeout != 0 { + ctx, _ = context.WithTimeout(ctx, timeout) + } + req.Request = req.Request.WithContext(ctx) + if backoff == nil { backoff = retryablehttp.LinearJitterBackoff } @@ -667,9 +776,6 @@ START: var result *Response resp, err := client.Do(req) - if cancelFunc != nil { - cancelFunc() - } if resp != nil { result = &Response{Response: resp} } diff --git a/vendor/github.com/hashicorp/vault/api/help.go b/vendor/github.com/hashicorp/vault/api/help.go index b9ae100bc..472ca0395 100644 --- a/vendor/github.com/hashicorp/vault/api/help.go +++ b/vendor/github.com/hashicorp/vault/api/help.go @@ -1,6 +1,7 @@ package api import ( + "context" "fmt" ) @@ -8,7 +9,10 @@ import ( func (c *Client) Help(path string) (*Help, error) { r := c.NewRequest("GET", fmt.Sprintf("/v1/%s", path)) r.Params.Add("help", "1") - resp, err := c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } diff --git a/vendor/github.com/hashicorp/vault/api/logical.go b/vendor/github.com/hashicorp/vault/api/logical.go index 89fd6f170..d13daac6e 100644 --- a/vendor/github.com/hashicorp/vault/api/logical.go +++ b/vendor/github.com/hashicorp/vault/api/logical.go @@ -2,8 +2,10 @@ package api import ( "bytes" + "context" "fmt" "io" + "net/url" "os" "github.com/hashicorp/errwrap" @@ -45,8 +47,29 @@ func (c *Client) Logical() *Logical { } func (c *Logical) Read(path string) (*Secret, error) { + return c.ReadWithData(path, nil) +} + +func (c *Logical) ReadWithData(path string, data map[string][]string) (*Secret, error) { r := c.c.NewRequest("GET", "/v1/"+path) - resp, err := c.c.RawRequest(r) + + var values url.Values + for k, v := range data { + if values == nil { + values = make(url.Values) + } + for _, val := range v { + values.Add(k, val) + } + } + + if values != nil { + r.Params = values + } + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if resp != nil { defer resp.Body.Close() } @@ -77,7 +100,10 @@ func (c *Logical) List(path string) (*Secret, error) { // handle the wrapping lookup function r.Method = "GET" r.Params.Set("list", "true") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if resp != nil { defer resp.Body.Close() } @@ -108,7 +134,9 @@ func (c *Logical) Write(path string, data map[string]interface{}) (*Secret, erro return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if resp != nil { defer resp.Body.Close() } @@ -134,7 +162,10 @@ func (c *Logical) Write(path string, data map[string]interface{}) (*Secret, erro func (c *Logical) Delete(path string) (*Secret, error) { r := c.c.NewRequest("DELETE", "/v1/"+path) - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if resp != nil { defer resp.Body.Close() } @@ -175,7 +206,9 @@ func (c *Logical) Unwrap(wrappingToken string) (*Secret, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if resp != nil { defer resp.Body.Close() } diff --git a/vendor/github.com/hashicorp/vault/api/output_string.go b/vendor/github.com/hashicorp/vault/api/output_string.go new file mode 100644 index 000000000..b836b77a5 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/api/output_string.go @@ -0,0 +1,71 @@ +package api + +import ( + "fmt" + "strings" + + retryablehttp "github.com/hashicorp/go-retryablehttp" +) + +const ( + ErrOutputStringRequest = "output a string, please" +) + +var ( + LastOutputStringError *OutputStringError +) + +type OutputStringError struct { + *retryablehttp.Request + parsingError error + parsedCurlString string +} + +func (d *OutputStringError) Error() string { + if d.parsedCurlString == "" { + d.parseRequest() + if d.parsingError != nil { + return d.parsingError.Error() + } + } + + return ErrOutputStringRequest +} + +func (d *OutputStringError) parseRequest() { + body, err := d.Request.BodyBytes() + if err != nil { + d.parsingError = err + return + } + + // Build cURL string + d.parsedCurlString = "curl " + if d.Request.Method != "GET" { + d.parsedCurlString = fmt.Sprintf("%s-X %s ", d.parsedCurlString, d.Request.Method) + } + for k, v := range d.Request.Header { + for _, h := range v { + if strings.ToLower(k) == "x-vault-token" { + h = `$(vault print token)` + } + d.parsedCurlString = fmt.Sprintf("%s-H \"%s: %s\" ", d.parsedCurlString, k, h) + } + } + + if len(body) > 0 { + // We need to escape single quotes since that's what we're using to + // quote the body + escapedBody := strings.Replace(string(body), "'", "'\"'\"'", -1) + d.parsedCurlString = fmt.Sprintf("%s-d '%s' ", d.parsedCurlString, escapedBody) + } + + d.parsedCurlString = fmt.Sprintf("%s%s", d.parsedCurlString, d.Request.URL.String()) +} + +func (d *OutputStringError) CurlString() string { + if d.parsedCurlString == "" { + d.parseRequest() + } + return d.parsedCurlString +} diff --git a/vendor/github.com/hashicorp/vault/api/request.go b/vendor/github.com/hashicorp/vault/api/request.go index 5bcff8c6c..4efa2aa84 100644 --- a/vendor/github.com/hashicorp/vault/api/request.go +++ b/vendor/github.com/hashicorp/vault/api/request.go @@ -8,6 +8,8 @@ import ( "net/http" "net/url" + "github.com/hashicorp/vault/helper/consts" + retryablehttp "github.com/hashicorp/go-retryablehttp" ) @@ -124,7 +126,7 @@ func (r *Request) toRetryableHTTP() (*retryablehttp.Request, error) { } if len(r.ClientToken) != 0 { - req.Header.Set("X-Vault-Token", r.ClientToken) + req.Header.Set(consts.AuthHeaderName, r.ClientToken) } if len(r.WrapTTL) != 0 { diff --git a/vendor/github.com/hashicorp/vault/api/secret.go b/vendor/github.com/hashicorp/vault/api/secret.go index e25962604..c8a0ba3d9 100644 --- a/vendor/github.com/hashicorp/vault/api/secret.go +++ b/vendor/github.com/hashicorp/vault/api/secret.go @@ -292,6 +292,7 @@ type SecretAuth struct { TokenPolicies []string `json:"token_policies"` IdentityPolicies []string `json:"identity_policies"` Metadata map[string]string `json:"metadata"` + Orphan bool `json:"orphan"` LeaseDuration int `json:"lease_duration"` Renewable bool `json:"renewable"` diff --git a/vendor/github.com/hashicorp/vault/api/ssh.go b/vendor/github.com/hashicorp/vault/api/ssh.go index a17b0eb23..837eac4ff 100644 --- a/vendor/github.com/hashicorp/vault/api/ssh.go +++ b/vendor/github.com/hashicorp/vault/api/ssh.go @@ -1,6 +1,9 @@ package api -import "fmt" +import ( + "context" + "fmt" +) // SSH is used to return a client to invoke operations on SSH backend. type SSH struct { @@ -28,7 +31,9 @@ func (c *SSH) Credential(role string, data map[string]interface{}) (*Secret, err return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -45,7 +50,9 @@ func (c *SSH) SignKey(role string, data map[string]interface{}) (*Secret, error) return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } diff --git a/vendor/github.com/hashicorp/vault/api/ssh_agent.go b/vendor/github.com/hashicorp/vault/api/ssh_agent.go index 032fb436c..b8e82224c 100644 --- a/vendor/github.com/hashicorp/vault/api/ssh_agent.go +++ b/vendor/github.com/hashicorp/vault/api/ssh_agent.go @@ -1,6 +1,7 @@ package api import ( + "context" "crypto/tls" "crypto/x509" "fmt" @@ -8,9 +9,9 @@ import ( "os" "github.com/hashicorp/errwrap" - "github.com/hashicorp/go-cleanhttp" - "github.com/hashicorp/go-multierror" - "github.com/hashicorp/go-rootcerts" + cleanhttp "github.com/hashicorp/go-cleanhttp" + multierror "github.com/hashicorp/go-multierror" + rootcerts "github.com/hashicorp/go-rootcerts" "github.com/hashicorp/hcl" "github.com/hashicorp/hcl/hcl/ast" "github.com/hashicorp/vault/helper/hclutil" @@ -207,7 +208,9 @@ func (c *SSHHelper) Verify(otp string) (*SSHVerifyResponse, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } diff --git a/vendor/github.com/hashicorp/vault/api/sys_audit.go b/vendor/github.com/hashicorp/vault/api/sys_audit.go index 05cd756d4..2448c0367 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_audit.go +++ b/vendor/github.com/hashicorp/vault/api/sys_audit.go @@ -1,6 +1,8 @@ package api import ( + "context" + "errors" "fmt" "github.com/mitchellh/mapstructure" @@ -16,56 +18,58 @@ func (c *Sys) AuditHash(path string, input string) (string, error) { return "", err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return "", err } defer resp.Body.Close() - type d struct { - Hash string `json:"hash"` - } - - var result d - err = resp.DecodeJSON(&result) + secret, err := ParseSecret(resp.Body) if err != nil { return "", err } + if secret == nil || secret.Data == nil { + return "", errors.New("data from server response is empty") + } - return result.Hash, err + hash, ok := secret.Data["hash"] + if !ok { + return "", errors.New("hash not found in response data") + } + hashStr, ok := hash.(string) + if !ok { + return "", errors.New("could not parse hash in response data") + } + + return hashStr, nil } func (c *Sys) ListAudit() (map[string]*Audit, error) { r := c.c.NewRequest("GET", "/v1/sys/audit") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) + if err != nil { return nil, err } defer resp.Body.Close() - var result map[string]interface{} - err = resp.DecodeJSON(&result) + secret, err := ParseSecret(resp.Body) if err != nil { return nil, err } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } mounts := map[string]*Audit{} - for k, v := range result { - switch v.(type) { - case map[string]interface{}: - default: - continue - } - var res Audit - err = mapstructure.Decode(v, &res) - if err != nil { - return nil, err - } - // Not a mount, some other api.Secret data - if res.Type == "" { - continue - } - mounts[k] = &res + err = mapstructure.Decode(secret.Data, &mounts) + if err != nil { + return nil, err } return mounts, nil @@ -87,7 +91,10 @@ func (c *Sys) EnableAuditWithOptions(path string, options *EnableAuditOptions) e return err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) + if err != nil { return err } @@ -98,7 +105,11 @@ func (c *Sys) EnableAuditWithOptions(path string, options *EnableAuditOptions) e func (c *Sys) DisableAudit(path string) error { r := c.c.NewRequest("DELETE", fmt.Sprintf("/v1/sys/audit/%s", path)) - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) + if err == nil { defer resp.Body.Close() } @@ -110,16 +121,16 @@ func (c *Sys) DisableAudit(path string) error { // documentation. Please refer to that documentation for more details. type EnableAuditOptions struct { - Type string `json:"type"` - Description string `json:"description"` - Options map[string]string `json:"options"` - Local bool `json:"local"` + Type string `json:"type" mapstructure:"type"` + Description string `json:"description" mapstructure:"description"` + Options map[string]string `json:"options" mapstructure:"options"` + Local bool `json:"local" mapstructure:"local"` } type Audit struct { - Path string - Type string - Description string - Options map[string]string - Local bool + Type string `json:"type" mapstructure:"type"` + Description string `json:"description" mapstructure:"description"` + Options map[string]string `json:"options" mapstructure:"options"` + Local bool `json:"local" mapstructure:"local"` + Path string `json:"path" mapstructure:"path"` } diff --git a/vendor/github.com/hashicorp/vault/api/sys_auth.go b/vendor/github.com/hashicorp/vault/api/sys_auth.go index 0b1a319c7..e7a9c222d 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_auth.go +++ b/vendor/github.com/hashicorp/vault/api/sys_auth.go @@ -1,6 +1,8 @@ package api import ( + "context" + "errors" "fmt" "github.com/mitchellh/mapstructure" @@ -8,35 +10,27 @@ import ( func (c *Sys) ListAuth() (map[string]*AuthMount, error) { r := c.c.NewRequest("GET", "/v1/sys/auth") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() - var result map[string]interface{} - err = resp.DecodeJSON(&result) + secret, err := ParseSecret(resp.Body) if err != nil { return nil, err } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } mounts := map[string]*AuthMount{} - for k, v := range result { - switch v.(type) { - case map[string]interface{}: - default: - continue - } - var res AuthMount - err = mapstructure.Decode(v, &res) - if err != nil { - return nil, err - } - // Not a mount, some other api.Secret data - if res.Type == "" { - continue - } - mounts[k] = &res + err = mapstructure.Decode(secret.Data, &mounts) + if err != nil { + return nil, err } return mounts, nil @@ -56,7 +50,9 @@ func (c *Sys) EnableAuthWithOptions(path string, options *EnableAuthOptions) err return err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return err } @@ -67,53 +63,18 @@ func (c *Sys) EnableAuthWithOptions(path string, options *EnableAuthOptions) err func (c *Sys) DisableAuth(path string) error { r := c.c.NewRequest("DELETE", fmt.Sprintf("/v1/sys/auth/%s", path)) - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } return err } -// Structures for the requests/resposne are all down here. They aren't -// individually documented because the map almost directly to the raw HTTP API -// documentation. Please refer to that documentation for more details. - -type EnableAuthOptions struct { - Type string `json:"type"` - Description string `json:"description"` - Config AuthConfigInput `json:"config"` - Local bool `json:"local"` - PluginName string `json:"plugin_name,omitempty"` - SealWrap bool `json:"seal_wrap" mapstructure:"seal_wrap"` - Options map[string]string `json:"options" mapstructure:"options"` -} - -type AuthConfigInput struct { - DefaultLeaseTTL string `json:"default_lease_ttl" mapstructure:"default_lease_ttl"` - MaxLeaseTTL string `json:"max_lease_ttl" mapstructure:"max_lease_ttl"` - PluginName string `json:"plugin_name,omitempty" mapstructure:"plugin_name"` - AuditNonHMACRequestKeys []string `json:"audit_non_hmac_request_keys,omitempty" mapstructure:"audit_non_hmac_request_keys"` - AuditNonHMACResponseKeys []string `json:"audit_non_hmac_response_keys,omitempty" mapstructure:"audit_non_hmac_response_keys"` - ListingVisibility string `json:"listing_visibility,omitempty" mapstructure:"listing_visibility"` - PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" mapstructure:"passthrough_request_headers"` -} - -type AuthMount struct { - Type string `json:"type" mapstructure:"type"` - Description string `json:"description" mapstructure:"description"` - Accessor string `json:"accessor" mapstructure:"accessor"` - Config AuthConfigOutput `json:"config" mapstructure:"config"` - Local bool `json:"local" mapstructure:"local"` - SealWrap bool `json:"seal_wrap" mapstructure:"seal_wrap"` - Options map[string]string `json:"options" mapstructure:"options"` -} - -type AuthConfigOutput struct { - DefaultLeaseTTL int `json:"default_lease_ttl" mapstructure:"default_lease_ttl"` - MaxLeaseTTL int `json:"max_lease_ttl" mapstructure:"max_lease_ttl"` - PluginName string `json:"plugin_name,omitempty" mapstructure:"plugin_name"` - AuditNonHMACRequestKeys []string `json:"audit_non_hmac_request_keys,omitempty" mapstructure:"audit_non_hmac_request_keys"` - AuditNonHMACResponseKeys []string `json:"audit_non_hmac_response_keys,omitempty" mapstructure:"audit_non_hmac_response_keys"` - ListingVisibility string `json:"listing_visibility,omitempty" mapstructure:"listing_visibility"` - PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" mapstructure:"passthrough_request_headers"` -} +// Rather than duplicate, we can use modern Go's type aliasing +type EnableAuthOptions = MountInput +type AuthConfigInput = MountConfigInput +type AuthMount = MountOutput +type AuthConfigOutput = MountConfigOutput diff --git a/vendor/github.com/hashicorp/vault/api/sys_capabilities.go b/vendor/github.com/hashicorp/vault/api/sys_capabilities.go index cbb3a72d7..64b3951dd 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_capabilities.go +++ b/vendor/github.com/hashicorp/vault/api/sys_capabilities.go @@ -1,6 +1,12 @@ package api -import "fmt" +import ( + "context" + "errors" + "fmt" + + "github.com/mitchellh/mapstructure" +) func (c *Sys) CapabilitiesSelf(path string) ([]string, error) { return c.Capabilities(c.c.Token(), path) @@ -22,28 +28,37 @@ func (c *Sys) Capabilities(token, path string) ([]string, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() - var result map[string]interface{} - err = resp.DecodeJSON(&result) + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + + var res []string + err = mapstructure.Decode(secret.Data[path], &res) if err != nil { return nil, err } - if result["capabilities"] == nil { - return nil, nil + if len(res) == 0 { + _, ok := secret.Data["capabilities"] + if ok { + err = mapstructure.Decode(secret.Data["capabilities"], &res) + if err != nil { + return nil, err + } + } } - var capabilities []string - capabilitiesRaw, ok := result["capabilities"].([]interface{}) - if !ok { - return nil, fmt.Errorf("error interpreting returned capabilities") - } - for _, capability := range capabilitiesRaw { - capabilities = append(capabilities, capability.(string)) - } - return capabilities, nil + + return res, nil } diff --git a/vendor/github.com/hashicorp/vault/api/sys_config_cors.go b/vendor/github.com/hashicorp/vault/api/sys_config_cors.go index e7f2a5945..d153a47c3 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_config_cors.go +++ b/vendor/github.com/hashicorp/vault/api/sys_config_cors.go @@ -1,15 +1,37 @@ package api +import ( + "context" + "errors" + + "github.com/mitchellh/mapstructure" +) + func (c *Sys) CORSStatus() (*CORSResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/config/cors") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + var result CORSResponse - err = resp.DecodeJSON(&result) + err = mapstructure.Decode(secret.Data, &result) + if err != nil { + return nil, err + } + return &result, err } @@ -19,38 +41,65 @@ func (c *Sys) ConfigureCORS(req *CORSRequest) (*CORSResponse, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + var result CORSResponse - err = resp.DecodeJSON(&result) + err = mapstructure.Decode(secret.Data, &result) + if err != nil { + return nil, err + } + return &result, err } func (c *Sys) DisableCORS() (*CORSResponse, error) { r := c.c.NewRequest("DELETE", "/v1/sys/config/cors") - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() - var result CORSResponse - err = resp.DecodeJSON(&result) - return &result, err + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + var result CORSResponse + err = mapstructure.Decode(secret.Data, &result) + if err != nil { + return nil, err + } + + return &result, err } type CORSRequest struct { - AllowedOrigins string `json:"allowed_origins"` - Enabled bool `json:"enabled"` + AllowedOrigins string `json:"allowed_origins" mapstructure:"allowed_origins"` + Enabled bool `json:"enabled" mapstructure:"enabled"` } type CORSResponse struct { - AllowedOrigins string `json:"allowed_origins"` - Enabled bool `json:"enabled"` + AllowedOrigins string `json:"allowed_origins" mapstructure:"allowed_origins"` + Enabled bool `json:"enabled" mapstructure:"enabled"` } diff --git a/vendor/github.com/hashicorp/vault/api/sys_generate_root.go b/vendor/github.com/hashicorp/vault/api/sys_generate_root.go index adb5496d4..66f72dff6 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_generate_root.go +++ b/vendor/github.com/hashicorp/vault/api/sys_generate_root.go @@ -1,5 +1,7 @@ package api +import "context" + func (c *Sys) GenerateRootStatus() (*GenerateRootStatusResponse, error) { return c.generateRootStatusCommon("/v1/sys/generate-root/attempt") } @@ -10,7 +12,10 @@ func (c *Sys) GenerateDROperationTokenStatus() (*GenerateRootStatusResponse, err func (c *Sys) generateRootStatusCommon(path string) (*GenerateRootStatusResponse, error) { r := c.c.NewRequest("GET", path) - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -40,7 +45,9 @@ func (c *Sys) generateRootInitCommon(path, otp, pgpKey string) (*GenerateRootSta return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -61,7 +68,10 @@ func (c *Sys) GenerateDROperationTokenCancel() error { func (c *Sys) generateRootCancelCommon(path string) error { r := c.c.NewRequest("DELETE", path) - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -87,7 +97,9 @@ func (c *Sys) generateRootUpdateCommon(path, shard, nonce string) (*GenerateRoot return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -107,4 +119,6 @@ type GenerateRootStatusResponse struct { EncodedToken string `json:"encoded_token"` EncodedRootToken string `json:"encoded_root_token"` PGPFingerprint string `json:"pgp_fingerprint"` + OTP string `json:"otp"` + OTPLength int `json:"otp_length"` } diff --git a/vendor/github.com/hashicorp/vault/api/sys_health.go b/vendor/github.com/hashicorp/vault/api/sys_health.go index 82fd1f6f9..d5d779600 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_health.go +++ b/vendor/github.com/hashicorp/vault/api/sys_health.go @@ -1,5 +1,7 @@ package api +import "context" + func (c *Sys) Health() (*HealthResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/health") // If the code is 400 or above it will automatically turn into an error, @@ -9,7 +11,11 @@ func (c *Sys) Health() (*HealthResponse, error) { r.Params.Add("sealedcode", "299") r.Params.Add("standbycode", "299") r.Params.Add("drsecondarycode", "299") - resp, err := c.c.RawRequest(r) + r.Params.Add("performancestandbycode", "299") + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -24,10 +30,12 @@ type HealthResponse struct { Initialized bool `json:"initialized"` Sealed bool `json:"sealed"` Standby bool `json:"standby"` + PerformanceStandby bool `json:"performance_standby"` ReplicationPerformanceMode string `json:"replication_performance_mode"` ReplicationDRMode string `json:"replication_dr_mode"` ServerTimeUTC int64 `json:"server_time_utc"` Version string `json:"version"` ClusterName string `json:"cluster_name,omitempty"` ClusterID string `json:"cluster_id,omitempty"` + LastWAL uint64 `json:"last_wal,omitempty"` } diff --git a/vendor/github.com/hashicorp/vault/api/sys_init.go b/vendor/github.com/hashicorp/vault/api/sys_init.go index f824ab7dd..0e499c6e3 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_init.go +++ b/vendor/github.com/hashicorp/vault/api/sys_init.go @@ -1,8 +1,13 @@ package api +import "context" + func (c *Sys) InitStatus() (bool, error) { r := c.c.NewRequest("GET", "/v1/sys/init") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return false, err } @@ -19,7 +24,9 @@ func (c *Sys) Init(opts *InitRequest) (*InitResponse, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } diff --git a/vendor/github.com/hashicorp/vault/api/sys_leader.go b/vendor/github.com/hashicorp/vault/api/sys_leader.go index 4951c46e1..8846dcdfa 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_leader.go +++ b/vendor/github.com/hashicorp/vault/api/sys_leader.go @@ -1,8 +1,13 @@ package api +import "context" + func (c *Sys) Leader() (*LeaderResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/leader") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -14,8 +19,11 @@ func (c *Sys) Leader() (*LeaderResponse, error) { } type LeaderResponse struct { - HAEnabled bool `json:"ha_enabled"` - IsSelf bool `json:"is_self"` - LeaderAddress string `json:"leader_address"` - LeaderClusterAddress string `json:"leader_cluster_address"` + HAEnabled bool `json:"ha_enabled"` + IsSelf bool `json:"is_self"` + LeaderAddress string `json:"leader_address"` + LeaderClusterAddress string `json:"leader_cluster_address"` + PerfStandby bool `json:"performance_standby"` + PerfStandbyLastRemoteWAL uint64 `json:"performance_standby_last_remote_wal"` + LastWAL uint64 `json:"last_wal"` } diff --git a/vendor/github.com/hashicorp/vault/api/sys_leases.go b/vendor/github.com/hashicorp/vault/api/sys_leases.go index 3b65ff094..09c9642a9 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_leases.go +++ b/vendor/github.com/hashicorp/vault/api/sys_leases.go @@ -1,6 +1,9 @@ package api -import "errors" +import ( + "context" + "errors" +) func (c *Sys) Renew(id string, increment int) (*Secret, error) { r := c.c.NewRequest("PUT", "/v1/sys/leases/renew") @@ -13,7 +16,9 @@ func (c *Sys) Renew(id string, increment int) (*Secret, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -24,7 +29,10 @@ func (c *Sys) Renew(id string, increment int) (*Secret, error) { func (c *Sys) Revoke(id string) error { r := c.c.NewRequest("PUT", "/v1/sys/leases/revoke/"+id) - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -33,7 +41,10 @@ func (c *Sys) Revoke(id string) error { func (c *Sys) RevokePrefix(id string) error { r := c.c.NewRequest("PUT", "/v1/sys/leases/revoke-prefix/"+id) - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -42,7 +53,10 @@ func (c *Sys) RevokePrefix(id string) error { func (c *Sys) RevokeForce(id string) error { r := c.c.NewRequest("PUT", "/v1/sys/leases/revoke-force/"+id) - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -74,7 +88,9 @@ func (c *Sys) RevokeWithOptions(opts *RevokeOptions) error { } } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } diff --git a/vendor/github.com/hashicorp/vault/api/sys_mounts.go b/vendor/github.com/hashicorp/vault/api/sys_mounts.go index 1267f12ab..993a1b67b 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_mounts.go +++ b/vendor/github.com/hashicorp/vault/api/sys_mounts.go @@ -1,6 +1,8 @@ package api import ( + "context" + "errors" "fmt" "github.com/mitchellh/mapstructure" @@ -8,35 +10,27 @@ import ( func (c *Sys) ListMounts() (map[string]*MountOutput, error) { r := c.c.NewRequest("GET", "/v1/sys/mounts") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() - var result map[string]interface{} - err = resp.DecodeJSON(&result) + secret, err := ParseSecret(resp.Body) if err != nil { return nil, err } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } mounts := map[string]*MountOutput{} - for k, v := range result { - switch v.(type) { - case map[string]interface{}: - default: - continue - } - var res MountOutput - err = mapstructure.Decode(v, &res) - if err != nil { - return nil, err - } - // Not a mount, some other api.Secret data - if res.Type == "" { - continue - } - mounts[k] = &res + err = mapstructure.Decode(secret.Data, &mounts) + if err != nil { + return nil, err } return mounts, nil @@ -48,7 +42,9 @@ func (c *Sys) Mount(path string, mountInfo *MountInput) error { return err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return err } @@ -59,7 +55,10 @@ func (c *Sys) Mount(path string, mountInfo *MountInput) error { func (c *Sys) Unmount(path string) error { r := c.c.NewRequest("DELETE", fmt.Sprintf("/v1/sys/mounts/%s", path)) - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -77,7 +76,9 @@ func (c *Sys) Remount(from, to string) error { return err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -90,7 +91,9 @@ func (c *Sys) TuneMount(path string, config MountConfigInput) error { return err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -100,14 +103,24 @@ func (c *Sys) TuneMount(path string, config MountConfigInput) error { func (c *Sys) MountConfig(path string) (*MountConfigOutput, error) { r := c.c.NewRequest("GET", fmt.Sprintf("/v1/sys/mounts/%s/tune", path)) - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + var result MountConfigOutput - err = resp.DecodeJSON(&result) + err = mapstructure.Decode(secret.Data, &result) if err != nil { return nil, err } @@ -119,10 +132,13 @@ type MountInput struct { Type string `json:"type"` Description string `json:"description"` Config MountConfigInput `json:"config"` - Options map[string]string `json:"options"` Local bool `json:"local"` - PluginName string `json:"plugin_name,omitempty"` SealWrap bool `json:"seal_wrap" mapstructure:"seal_wrap"` + Options map[string]string `json:"options"` + + // Deprecated: Newer server responses should be returning this information in the + // Type field (json: "type") instead. + PluginName string `json:"plugin_name,omitempty"` } type MountConfigInput struct { @@ -131,11 +147,15 @@ type MountConfigInput struct { Description *string `json:"description,omitempty" mapstructure:"description"` MaxLeaseTTL string `json:"max_lease_ttl" mapstructure:"max_lease_ttl"` ForceNoCache bool `json:"force_no_cache" mapstructure:"force_no_cache"` - PluginName string `json:"plugin_name,omitempty" mapstructure:"plugin_name"` AuditNonHMACRequestKeys []string `json:"audit_non_hmac_request_keys,omitempty" mapstructure:"audit_non_hmac_request_keys"` AuditNonHMACResponseKeys []string `json:"audit_non_hmac_response_keys,omitempty" mapstructure:"audit_non_hmac_response_keys"` ListingVisibility string `json:"listing_visibility,omitempty" mapstructure:"listing_visibility"` PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" mapstructure:"passthrough_request_headers"` + AllowedResponseHeaders []string `json:"allowed_response_headers,omitempty" mapstructure:"allowed_response_headers"` + TokenType string `json:"token_type,omitempty" mapstructure:"token_type"` + + // Deprecated: This field will always be blank for newer server responses. + PluginName string `json:"plugin_name,omitempty" mapstructure:"plugin_name"` } type MountOutput struct { @@ -152,9 +172,13 @@ type MountConfigOutput struct { DefaultLeaseTTL int `json:"default_lease_ttl" mapstructure:"default_lease_ttl"` MaxLeaseTTL int `json:"max_lease_ttl" mapstructure:"max_lease_ttl"` ForceNoCache bool `json:"force_no_cache" mapstructure:"force_no_cache"` - PluginName string `json:"plugin_name,omitempty" mapstructure:"plugin_name"` AuditNonHMACRequestKeys []string `json:"audit_non_hmac_request_keys,omitempty" mapstructure:"audit_non_hmac_request_keys"` AuditNonHMACResponseKeys []string `json:"audit_non_hmac_response_keys,omitempty" mapstructure:"audit_non_hmac_response_keys"` ListingVisibility string `json:"listing_visibility,omitempty" mapstructure:"listing_visibility"` PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" mapstructure:"passthrough_request_headers"` + AllowedResponseHeaders []string `json:"allowed_response_headers,omitempty" mapstructure:"allowed_response_headers"` + TokenType string `json:"token_type,omitempty" mapstructure:"token_type"` + + // Deprecated: This field will always be blank for newer server responses. + PluginName string `json:"plugin_name,omitempty" mapstructure:"plugin_name"` } diff --git a/vendor/github.com/hashicorp/vault/api/sys_plugins.go b/vendor/github.com/hashicorp/vault/api/sys_plugins.go index c061b45bd..ebfcfbfc0 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_plugins.go +++ b/vendor/github.com/hashicorp/vault/api/sys_plugins.go @@ -1,45 +1,136 @@ package api import ( + "context" + "errors" "fmt" "net/http" + + "github.com/hashicorp/vault/helper/consts" + "github.com/mitchellh/mapstructure" ) // ListPluginsInput is used as input to the ListPlugins function. -type ListPluginsInput struct{} +type ListPluginsInput struct { + // Type of the plugin. Required. + Type consts.PluginType `json:"type"` +} // ListPluginsResponse is the response from the ListPlugins call. type ListPluginsResponse struct { + // PluginsByType is the list of plugins by type. + PluginsByType map[consts.PluginType][]string `json:"types"` + // Names is the list of names of the plugins. - Names []string + // + // Deprecated: Newer server responses should be returning PluginsByType (json: + // "types") instead. + Names []string `json:"names"` } // ListPlugins lists all plugins in the catalog and returns their names as a // list of strings. func (c *Sys) ListPlugins(i *ListPluginsInput) (*ListPluginsResponse, error) { - path := "/v1/sys/plugins/catalog" - req := c.c.NewRequest("LIST", path) - resp, err := c.c.RawRequest(req) - if err != nil { + path := "" + method := "" + if i.Type == consts.PluginTypeUnknown { + path = "/v1/sys/plugins/catalog" + method = "GET" + } else { + path = fmt.Sprintf("/v1/sys/plugins/catalog/%s", i.Type) + method = "LIST" + } + + req := c.c.NewRequest(method, path) + if method == "LIST" { + // Set this for broader compatibility, but we use LIST above to be able + // to handle the wrapping lookup function + req.Method = "GET" + req.Params.Set("list", "true") + } + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, req) + if err != nil && resp == nil { return nil, err } + if resp == nil { + return nil, nil + } defer resp.Body.Close() - var result struct { - Data struct { - Keys []string `json:"keys"` - } `json:"data"` - } - if err := resp.DecodeJSON(&result); err != nil { - return nil, err + // We received an Unsupported Operation response from Vault, indicating + // Vault of an older version that doesn't support the GET method yet; + // switch it to a LIST. + if resp.StatusCode == 405 { + req.Params.Set("list", "true") + resp, err := c.c.RawRequestWithContext(ctx, req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + var result struct { + Data struct { + Keys []string `json:"keys"` + } `json:"data"` + } + if err := resp.DecodeJSON(&result); err != nil { + return nil, err + } + return &ListPluginsResponse{Names: result.Data.Keys}, nil } - return &ListPluginsResponse{Names: result.Data.Keys}, nil + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + + result := &ListPluginsResponse{ + PluginsByType: make(map[consts.PluginType][]string), + } + if i.Type == consts.PluginTypeUnknown { + for pluginTypeStr, pluginsRaw := range secret.Data { + pluginType, err := consts.ParsePluginType(pluginTypeStr) + if err != nil { + return nil, err + } + + pluginsIfc, ok := pluginsRaw.([]interface{}) + if !ok { + return nil, fmt.Errorf("unable to parse plugins for %q type", pluginTypeStr) + } + + plugins := make([]string, len(pluginsIfc)) + for i, nameIfc := range pluginsIfc { + name, ok := nameIfc.(string) + if !ok { + + } + plugins[i] = name + } + result.PluginsByType[pluginType] = plugins + } + } else { + var respKeys []string + if err := mapstructure.Decode(secret.Data["keys"], &respKeys); err != nil { + return nil, err + } + result.PluginsByType[i.Type] = respKeys + } + + return result, nil } // GetPluginInput is used as input to the GetPlugin function. type GetPluginInput struct { Name string `json:"-"` + + // Type of the plugin. Required. + Type consts.PluginType `json:"type"` } // GetPluginResponse is the response from the GetPlugin call. @@ -51,23 +142,27 @@ type GetPluginResponse struct { SHA256 string `json:"sha256"` } +// GetPlugin retrieves information about the plugin. func (c *Sys) GetPlugin(i *GetPluginInput) (*GetPluginResponse, error) { - path := fmt.Sprintf("/v1/sys/plugins/catalog/%s", i.Name) + path := catalogPathByType(i.Type, i.Name) req := c.c.NewRequest(http.MethodGet, path) - resp, err := c.c.RawRequest(req) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, req) if err != nil { return nil, err } defer resp.Body.Close() var result struct { - Data GetPluginResponse + Data *GetPluginResponse } err = resp.DecodeJSON(&result) if err != nil { return nil, err } - return &result.Data, err + return result.Data, err } // RegisterPluginInput is used as input to the RegisterPlugin function. @@ -75,6 +170,9 @@ type RegisterPluginInput struct { // Name is the name of the plugin. Required. Name string `json:"-"` + // Type of the plugin. Required. + Type consts.PluginType `json:"type"` + // Args is the list of args to spawn the process with. Args []string `json:"args,omitempty"` @@ -87,13 +185,16 @@ type RegisterPluginInput struct { // RegisterPlugin registers the plugin with the given information. func (c *Sys) RegisterPlugin(i *RegisterPluginInput) error { - path := fmt.Sprintf("/v1/sys/plugins/catalog/%s", i.Name) + path := catalogPathByType(i.Type, i.Name) req := c.c.NewRequest(http.MethodPut, path) + if err := req.SetJSONBody(i); err != nil { return err } - resp, err := c.c.RawRequest(req) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, req) if err == nil { defer resp.Body.Close() } @@ -104,16 +205,34 @@ func (c *Sys) RegisterPlugin(i *RegisterPluginInput) error { type DeregisterPluginInput struct { // Name is the name of the plugin. Required. Name string `json:"-"` + + // Type of the plugin. Required. + Type consts.PluginType `json:"type"` } // DeregisterPlugin removes the plugin with the given name from the plugin // catalog. func (c *Sys) DeregisterPlugin(i *DeregisterPluginInput) error { - path := fmt.Sprintf("/v1/sys/plugins/catalog/%s", i.Name) + path := catalogPathByType(i.Type, i.Name) req := c.c.NewRequest(http.MethodDelete, path) - resp, err := c.c.RawRequest(req) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, req) if err == nil { defer resp.Body.Close() } return err } + +// catalogPathByType is a helper to construct the proper API path by plugin type +func catalogPathByType(pluginType consts.PluginType, name string) string { + path := fmt.Sprintf("/v1/sys/plugins/catalog/%s/%s", pluginType, name) + + // Backwards compat, if type is not provided then use old path + if pluginType == consts.PluginTypeUnknown { + path = fmt.Sprintf("/v1/sys/plugins/catalog/%s", name) + } + + return path +} diff --git a/vendor/github.com/hashicorp/vault/api/sys_policy.go b/vendor/github.com/hashicorp/vault/api/sys_policy.go index 9c9d9c08b..c0c239f96 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_policy.go +++ b/vendor/github.com/hashicorp/vault/api/sys_policy.go @@ -1,39 +1,51 @@ package api -import "fmt" +import ( + "context" + "errors" + "fmt" + + "github.com/mitchellh/mapstructure" +) func (c *Sys) ListPolicies() ([]string, error) { - r := c.c.NewRequest("GET", "/v1/sys/policy") - resp, err := c.c.RawRequest(r) + r := c.c.NewRequest("LIST", "/v1/sys/policies/acl") + // Set this for broader compatibility, but we use LIST above to be able to + // handle the wrapping lookup function + r.Method = "GET" + r.Params.Set("list", "true") + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() - var result map[string]interface{} - err = resp.DecodeJSON(&result) + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + + var result []string + err = mapstructure.Decode(secret.Data["keys"], &result) if err != nil { return nil, err } - var ok bool - if _, ok = result["policies"]; !ok { - return nil, fmt.Errorf("policies not found in response") - } - - listRaw := result["policies"].([]interface{}) - var policies []string - - for _, val := range listRaw { - policies = append(policies, val.(string)) - } - - return policies, err + return result, err } func (c *Sys) GetPolicy(name string) (string, error) { - r := c.c.NewRequest("GET", fmt.Sprintf("/v1/sys/policy/%s", name)) - resp, err := c.c.RawRequest(r) + r := c.c.NewRequest("GET", fmt.Sprintf("/v1/sys/policies/acl/%s", name)) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if resp != nil { defer resp.Body.Close() if resp.StatusCode == 404 { @@ -44,16 +56,15 @@ func (c *Sys) GetPolicy(name string) (string, error) { return "", err } - var result map[string]interface{} - err = resp.DecodeJSON(&result) + secret, err := ParseSecret(resp.Body) if err != nil { return "", err } - - if rulesRaw, ok := result["rules"]; ok { - return rulesRaw.(string), nil + if secret == nil || secret.Data == nil { + return "", errors.New("data from server response is empty") } - if policyRaw, ok := result["policy"]; ok { + + if policyRaw, ok := secret.Data["policy"]; ok { return policyRaw.(string), nil } @@ -62,15 +73,17 @@ func (c *Sys) GetPolicy(name string) (string, error) { func (c *Sys) PutPolicy(name, rules string) error { body := map[string]string{ - "rules": rules, + "policy": rules, } - r := c.c.NewRequest("PUT", fmt.Sprintf("/v1/sys/policy/%s", name)) + r := c.c.NewRequest("PUT", fmt.Sprintf("/v1/sys/policies/acl/%s", name)) if err := r.SetJSONBody(body); err != nil { return err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return err } @@ -80,8 +93,11 @@ func (c *Sys) PutPolicy(name, rules string) error { } func (c *Sys) DeletePolicy(name string) error { - r := c.c.NewRequest("DELETE", fmt.Sprintf("/v1/sys/policy/%s", name)) - resp, err := c.c.RawRequest(r) + r := c.c.NewRequest("DELETE", fmt.Sprintf("/v1/sys/policies/acl/%s", name)) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } diff --git a/vendor/github.com/hashicorp/vault/api/sys_rekey.go b/vendor/github.com/hashicorp/vault/api/sys_rekey.go index ddeac0166..55f1a703d 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_rekey.go +++ b/vendor/github.com/hashicorp/vault/api/sys_rekey.go @@ -1,8 +1,18 @@ package api +import ( + "context" + "errors" + + "github.com/mitchellh/mapstructure" +) + func (c *Sys) RekeyStatus() (*RekeyStatusResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/rekey/init") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -15,7 +25,10 @@ func (c *Sys) RekeyStatus() (*RekeyStatusResponse, error) { func (c *Sys) RekeyRecoveryKeyStatus() (*RekeyStatusResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/rekey-recovery-key/init") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -28,7 +41,10 @@ func (c *Sys) RekeyRecoveryKeyStatus() (*RekeyStatusResponse, error) { func (c *Sys) RekeyVerificationStatus() (*RekeyVerificationStatusResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/rekey/verify") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -41,7 +57,10 @@ func (c *Sys) RekeyVerificationStatus() (*RekeyVerificationStatusResponse, error func (c *Sys) RekeyRecoveryKeyVerificationStatus() (*RekeyVerificationStatusResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/rekey-recovery-key/verify") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -58,7 +77,9 @@ func (c *Sys) RekeyInit(config *RekeyInitRequest) (*RekeyStatusResponse, error) return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -75,7 +96,9 @@ func (c *Sys) RekeyRecoveryKeyInit(config *RekeyInitRequest) (*RekeyStatusRespon return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -88,7 +111,10 @@ func (c *Sys) RekeyRecoveryKeyInit(config *RekeyInitRequest) (*RekeyStatusRespon func (c *Sys) RekeyCancel() error { r := c.c.NewRequest("DELETE", "/v1/sys/rekey/init") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -97,7 +123,10 @@ func (c *Sys) RekeyCancel() error { func (c *Sys) RekeyRecoveryKeyCancel() error { r := c.c.NewRequest("DELETE", "/v1/sys/rekey-recovery-key/init") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -106,7 +135,10 @@ func (c *Sys) RekeyRecoveryKeyCancel() error { func (c *Sys) RekeyVerificationCancel() error { r := c.c.NewRequest("DELETE", "/v1/sys/rekey/verify") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -115,7 +147,10 @@ func (c *Sys) RekeyVerificationCancel() error { func (c *Sys) RekeyRecoveryKeyVerificationCancel() error { r := c.c.NewRequest("DELETE", "/v1/sys/rekey-recovery-key/verify") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -133,7 +168,9 @@ func (c *Sys) RekeyUpdate(shard, nonce string) (*RekeyUpdateResponse, error) { return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -155,7 +192,9 @@ func (c *Sys) RekeyRecoveryKeyUpdate(shard, nonce string) (*RekeyUpdateResponse, return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -168,33 +207,66 @@ func (c *Sys) RekeyRecoveryKeyUpdate(shard, nonce string) (*RekeyUpdateResponse, func (c *Sys) RekeyRetrieveBackup() (*RekeyRetrieveResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/rekey/backup") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + var result RekeyRetrieveResponse - err = resp.DecodeJSON(&result) + err = mapstructure.Decode(secret.Data, &result) + if err != nil { + return nil, err + } + return &result, err } func (c *Sys) RekeyRetrieveRecoveryBackup() (*RekeyRetrieveResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/rekey/recovery-backup") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + var result RekeyRetrieveResponse - err = resp.DecodeJSON(&result) + err = mapstructure.Decode(secret.Data, &result) + if err != nil { + return nil, err + } + return &result, err } func (c *Sys) RekeyDeleteBackup() error { r := c.c.NewRequest("DELETE", "/v1/sys/rekey/backup") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -204,7 +276,10 @@ func (c *Sys) RekeyDeleteBackup() error { func (c *Sys) RekeyDeleteRecoveryBackup() error { r := c.c.NewRequest("DELETE", "/v1/sys/rekey/recovery-backup") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -223,7 +298,9 @@ func (c *Sys) RekeyVerificationUpdate(shard, nonce string) (*RekeyVerificationUp return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -245,7 +322,9 @@ func (c *Sys) RekeyRecoveryKeyVerificationUpdate(shard, nonce string) (*RekeyVer return nil, err } - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -290,9 +369,9 @@ type RekeyUpdateResponse struct { } type RekeyRetrieveResponse struct { - Nonce string `json:"nonce"` - Keys map[string][]string `json:"keys"` - KeysB64 map[string][]string `json:"keys_base64"` + Nonce string `json:"nonce" mapstructure:"nonce"` + Keys map[string][]string `json:"keys" mapstructure:"keys"` + KeysB64 map[string][]string `json:"keys_base64" mapstructure:"keys_base64"` } type RekeyVerificationStatusResponse struct { diff --git a/vendor/github.com/hashicorp/vault/api/sys_rotate.go b/vendor/github.com/hashicorp/vault/api/sys_rotate.go index 8108dced8..c525feb00 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_rotate.go +++ b/vendor/github.com/hashicorp/vault/api/sys_rotate.go @@ -1,10 +1,18 @@ package api -import "time" +import ( + "context" + "encoding/json" + "errors" + "time" +) func (c *Sys) Rotate() error { r := c.c.NewRequest("POST", "/v1/sys/rotate") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -13,15 +21,54 @@ func (c *Sys) Rotate() error { func (c *Sys) KeyStatus() (*KeyStatus, error) { r := c.c.NewRequest("GET", "/v1/sys/key-status") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } defer resp.Body.Close() - result := new(KeyStatus) - err = resp.DecodeJSON(result) - return result, err + secret, err := ParseSecret(resp.Body) + if err != nil { + return nil, err + } + if secret == nil || secret.Data == nil { + return nil, errors.New("data from server response is empty") + } + + var result KeyStatus + + termRaw, ok := secret.Data["term"] + if !ok { + return nil, errors.New("term not found in response") + } + term, ok := termRaw.(json.Number) + if !ok { + return nil, errors.New("could not convert term to a number") + } + term64, err := term.Int64() + if err != nil { + return nil, err + } + result.Term = int(term64) + + installTimeRaw, ok := secret.Data["install_time"] + if !ok { + return nil, errors.New("install_time not found in response") + } + installTimeStr, ok := installTimeRaw.(string) + if !ok { + return nil, errors.New("could not convert install_time to a string") + } + installTime, err := time.Parse(time.RFC3339Nano, installTimeStr) + if err != nil { + return nil, err + } + result.InstallTime = installTime + + return &result, err } type KeyStatus struct { diff --git a/vendor/github.com/hashicorp/vault/api/sys_seal.go b/vendor/github.com/hashicorp/vault/api/sys_seal.go index 3d594baf9..301d3f26a 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_seal.go +++ b/vendor/github.com/hashicorp/vault/api/sys_seal.go @@ -1,5 +1,7 @@ package api +import "context" + func (c *Sys) SealStatus() (*SealStatusResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/seal-status") return sealStatusRequest(c, r) @@ -7,7 +9,10 @@ func (c *Sys) SealStatus() (*SealStatusResponse, error) { func (c *Sys) Seal() error { r := c.c.NewRequest("PUT", "/v1/sys/seal") - resp, err := c.c.RawRequest(r) + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err == nil { defer resp.Body.Close() } @@ -36,8 +41,19 @@ func (c *Sys) Unseal(shard string) (*SealStatusResponse, error) { return sealStatusRequest(c, r) } +func (c *Sys) UnsealWithOptions(opts *UnsealOpts) (*SealStatusResponse, error) { + r := c.c.NewRequest("PUT", "/v1/sys/unseal") + if err := r.SetJSONBody(opts); err != nil { + return nil, err + } + + return sealStatusRequest(c, r) +} + func sealStatusRequest(c *Sys, r *Request) (*SealStatusResponse, error) { - resp, err := c.c.RawRequest(r) + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) if err != nil { return nil, err } @@ -50,13 +66,21 @@ func sealStatusRequest(c *Sys, r *Request) (*SealStatusResponse, error) { type SealStatusResponse struct { Type string `json:"type"` + Initialized bool `json:"initialized"` Sealed bool `json:"sealed"` T int `json:"t"` N int `json:"n"` Progress int `json:"progress"` Nonce string `json:"nonce"` Version string `json:"version"` + Migration bool `json:"migration"` ClusterName string `json:"cluster_name,omitempty"` ClusterID string `json:"cluster_id,omitempty"` RecoverySeal bool `json:"recovery_seal"` } + +type UnsealOpts struct { + Key string `json:"key"` + Reset bool `json:"reset"` + Migrate bool `json:"migrate"` +} diff --git a/vendor/github.com/hashicorp/vault/api/sys_stepdown.go b/vendor/github.com/hashicorp/vault/api/sys_stepdown.go index 421e5f19f..55dc6fbcb 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_stepdown.go +++ b/vendor/github.com/hashicorp/vault/api/sys_stepdown.go @@ -1,10 +1,15 @@ package api +import "context" + func (c *Sys) StepDown() error { r := c.c.NewRequest("PUT", "/v1/sys/step-down") - resp, err := c.c.RawRequest(r) - if err == nil { - defer resp.Body.Close() + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) + if resp != nil && resp.Body != nil { + resp.Body.Close() } return err } diff --git a/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go b/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go index a7fb87bcf..356d4548f 100644 --- a/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go +++ b/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go @@ -9,6 +9,7 @@ import ( "github.com/golang/snappy" "github.com/hashicorp/errwrap" + "github.com/pierrec/lz4" ) const ( @@ -17,41 +18,39 @@ const ( // The value of this constant should not be a first character of any // valid JSON string. - // Byte value used as canary when using Gzip format + CompressionTypeGzip = "gzip" CompressionCanaryGzip byte = 'G' - // Byte value used as canary when using Lzw format - CompressionCanaryLzw byte = 'L' + CompressionTypeLZW = "lzw" + CompressionCanaryLZW byte = 'L' - // Byte value used as canary when using Snappy format + CompressionTypeSnappy = "snappy" CompressionCanarySnappy byte = 'S' - CompressionTypeLzw = "lzw" - - CompressionTypeGzip = "gzip" - - CompressionTypeSnappy = "snappy" + CompressionTypeLZ4 = "lz4" + CompressionCanaryLZ4 byte = '4' ) // SnappyReadCloser embeds the snappy reader which implements the io.Reader // interface. The decompress procedure in this utility expects an // io.ReadCloser. This type implements the io.Closer interface to retain the // generic way of decompression. -type SnappyReadCloser struct { - *snappy.Reader +type CompressUtilReadCloser struct { + io.Reader } // Close is a noop method implemented only to satisfy the io.Closer interface -func (s *SnappyReadCloser) Close() error { +func (c *CompressUtilReadCloser) Close() error { return nil } // CompressionConfig is used to select a compression type to be performed by // Compress and Decompress utilities. // Supported types are: -// * CompressionTypeLzw +// * CompressionTypeLZW // * CompressionTypeGzip // * CompressionTypeSnappy +// * CompressionTypeLZ4 // // When using CompressionTypeGzip, the compression levels can also be chosen: // * gzip.DefaultCompression @@ -82,10 +81,10 @@ func Compress(data []byte, config *CompressionConfig) ([]byte, error) { // Write the canary into the buffer and create writer to compress the // input data based on the configured type switch config.Type { - case CompressionTypeLzw: - buf.Write([]byte{CompressionCanaryLzw}) - + case CompressionTypeLZW: + buf.Write([]byte{CompressionCanaryLZW}) writer = lzw.NewWriter(&buf, lzw.LSB, 8) + case CompressionTypeGzip: buf.Write([]byte{CompressionCanaryGzip}) @@ -100,9 +99,15 @@ func Compress(data []byte, config *CompressionConfig) ([]byte, error) { config.GzipCompressionLevel = gzip.DefaultCompression } writer, err = gzip.NewWriterLevel(&buf, config.GzipCompressionLevel) + case CompressionTypeSnappy: buf.Write([]byte{CompressionCanarySnappy}) writer = snappy.NewBufferedWriter(&buf) + + case CompressionTypeLZ4: + buf.Write([]byte{CompressionCanaryLZ4}) + writer = lz4.NewWriter(&buf) + default: return nil, fmt.Errorf("unsupported compression type") } @@ -142,30 +147,40 @@ func Decompress(data []byte) ([]byte, bool, error) { return nil, false, fmt.Errorf("'data' being decompressed is empty") } - switch { + canary := data[0] + cData := data[1:] + + switch canary { // If the first byte matches the canary byte, remove the canary // byte and try to decompress the data that is after the canary. - case data[0] == CompressionCanaryGzip: + case CompressionCanaryGzip: if len(data) < 2 { return nil, false, fmt.Errorf("invalid 'data' after the canary") } - data = data[1:] - reader, err = gzip.NewReader(bytes.NewReader(data)) - case data[0] == CompressionCanaryLzw: - if len(data) < 2 { - return nil, false, fmt.Errorf("invalid 'data' after the canary") - } - data = data[1:] - reader = lzw.NewReader(bytes.NewReader(data), lzw.LSB, 8) + reader, err = gzip.NewReader(bytes.NewReader(cData)) - case data[0] == CompressionCanarySnappy: + case CompressionCanaryLZW: if len(data) < 2 { return nil, false, fmt.Errorf("invalid 'data' after the canary") } - data = data[1:] - reader = &SnappyReadCloser{ - Reader: snappy.NewReader(bytes.NewReader(data)), + reader = lzw.NewReader(bytes.NewReader(cData), lzw.LSB, 8) + + case CompressionCanarySnappy: + if len(data) < 2 { + return nil, false, fmt.Errorf("invalid 'data' after the canary") } + reader = &CompressUtilReadCloser{ + Reader: snappy.NewReader(bytes.NewReader(cData)), + } + + case CompressionCanaryLZ4: + if len(data) < 2 { + return nil, false, fmt.Errorf("invalid 'data' after the canary") + } + reader = &CompressUtilReadCloser{ + Reader: lz4.NewReader(bytes.NewReader(cData)), + } + default: // If the first byte doesn't match the canary byte, it means // that the content was not compressed at all. Indicate the diff --git a/vendor/github.com/hashicorp/vault/helper/consts/agent.go b/vendor/github.com/hashicorp/vault/helper/consts/agent.go new file mode 100644 index 000000000..b62962e37 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/helper/consts/agent.go @@ -0,0 +1,5 @@ +package consts + +// AgentPathCacheClear is the path that the agent will use as its cache-clear +// endpoint. +const AgentPathCacheClear = "/agent/v1/cache-clear" diff --git a/vendor/github.com/hashicorp/vault/helper/consts/consts.go b/vendor/github.com/hashicorp/vault/helper/consts/consts.go new file mode 100644 index 000000000..972a69f47 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/helper/consts/consts.go @@ -0,0 +1,14 @@ +package consts + +const ( + // ExpirationRestoreWorkerCount specifies the number of workers to use while + // restoring leases into the expiration manager + ExpirationRestoreWorkerCount = 64 + + // NamespaceHeaderName is the header set to specify which namespace the + // request is indented for. + NamespaceHeaderName = "X-Vault-Namespace" + + // AuthHeaderName is the name of the header containing the token. + AuthHeaderName = "X-Vault-Token" +) diff --git a/vendor/github.com/hashicorp/vault/helper/consts/error.go b/vendor/github.com/hashicorp/vault/helper/consts/error.go new file mode 100644 index 000000000..06977d5d5 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/helper/consts/error.go @@ -0,0 +1,16 @@ +package consts + +import "errors" + +var ( + // ErrSealed is returned if an operation is performed on a sealed barrier. + // No operation is expected to succeed before unsealing + ErrSealed = errors.New("Vault is sealed") + + // ErrStandby is returned if an operation is performed on a standby Vault. + // No operation is expected to succeed until active. + ErrStandby = errors.New("Vault is in standby mode") + + // Used when .. is used in a path + ErrPathContainsParentReferences = errors.New("path cannot contain parent references") +) diff --git a/vendor/github.com/hashicorp/vault/helper/consts/plugin_types.go b/vendor/github.com/hashicorp/vault/helper/consts/plugin_types.go new file mode 100644 index 000000000..e0a00e486 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/helper/consts/plugin_types.go @@ -0,0 +1,59 @@ +package consts + +import "fmt" + +var PluginTypes = []PluginType{ + PluginTypeUnknown, + PluginTypeCredential, + PluginTypeDatabase, + PluginTypeSecrets, +} + +type PluginType uint32 + +// This is a list of PluginTypes used by Vault. +// If we need to add any in the future, it would +// be best to add them to the _end_ of the list below +// because they resolve to incrementing numbers, +// which may be saved in state somewhere. Thus if +// the name for one of those numbers changed because +// a value were added to the middle, that could cause +// the wrong plugin types to be read from storage +// for a given underlying number. Example of the problem +// here: https://play.golang.org/p/YAaPw5ww3er +const ( + PluginTypeUnknown PluginType = iota + PluginTypeCredential + PluginTypeDatabase + PluginTypeSecrets +) + +func (p PluginType) String() string { + switch p { + case PluginTypeUnknown: + return "unknown" + case PluginTypeCredential: + return "auth" + case PluginTypeDatabase: + return "database" + case PluginTypeSecrets: + return "secret" + default: + return "unsupported" + } +} + +func ParsePluginType(pluginType string) (PluginType, error) { + switch pluginType { + case "unknown": + return PluginTypeUnknown, nil + case "auth": + return PluginTypeCredential, nil + case "database": + return PluginTypeDatabase, nil + case "secret": + return PluginTypeSecrets, nil + default: + return PluginTypeUnknown, fmt.Errorf("%q is not a supported plugin type", pluginType) + } +} diff --git a/vendor/github.com/hashicorp/vault/helper/consts/replication.go b/vendor/github.com/hashicorp/vault/helper/consts/replication.go new file mode 100644 index 000000000..f3cafe75f --- /dev/null +++ b/vendor/github.com/hashicorp/vault/helper/consts/replication.go @@ -0,0 +1,150 @@ +package consts + +import "time" + +const ( + //N.B. This needs to be excluded from replication despite the name; it's + //merely saying that this is cluster information for the replicated + //cluster. + CoreReplicatedClusterPrefix = "core/cluster/replicated/" + CoreReplicatedClusterPrefixDR = "core/cluster/replicated-dr/" + + CoreReplicatedClusterInfoPath = CoreReplicatedClusterPrefix + "info" + CoreReplicatedClusterSecondariesPrefix = CoreReplicatedClusterPrefix + "secondaries/" + CoreReplicatedClusterInfoPathDR = CoreReplicatedClusterPrefixDR + "info" + CoreReplicatedClusterSecondariesPrefixDR = CoreReplicatedClusterPrefixDR + "secondaries/" + + // This is an identifier for the current secondary in the replicated paths + // manager. It should contain a character that is not allowed in secondary + // ids to ensure it doesn't collide. + CurrentReplicatedSecondaryIdentifier = ".current" +) + +type ReplicationState uint32 + +var ReplicationStaleReadTimeout = 2 * time.Second + +const ( + _ ReplicationState = iota + OldReplicationPrimary + OldReplicationSecondary + OldReplicationBootstrapping + // Don't add anything here. Adding anything to this Old block would cause + // the rest of the values to change below. This was done originally to + // ensure no overlap between old and new values. + + ReplicationUnknown ReplicationState = 0 + ReplicationPerformancePrimary ReplicationState = 1 << iota // Note -- iota is 5 here! + ReplicationPerformanceSecondary + OldSplitReplicationBootstrapping + ReplicationDRPrimary + ReplicationDRSecondary + ReplicationPerformanceBootstrapping + ReplicationDRBootstrapping + ReplicationPerformanceDisabled + ReplicationDRDisabled + ReplicationPerformanceStandby +) + +// We verify no change to the above values are made +func init() { + + if OldReplicationBootstrapping != 3 { + panic("Replication Constants have changed") + } + + if ReplicationPerformancePrimary != 1<<5 { + panic("Replication Constants have changed") + } +} + +func (r ReplicationState) string() string { + switch r { + case ReplicationPerformanceSecondary: + return "secondary" + case ReplicationPerformancePrimary: + return "primary" + case ReplicationPerformanceBootstrapping: + return "bootstrapping" + case ReplicationPerformanceDisabled: + return "disabled" + case ReplicationDRPrimary: + return "primary" + case ReplicationDRSecondary: + return "secondary" + case ReplicationDRBootstrapping: + return "bootstrapping" + case ReplicationDRDisabled: + return "disabled" + } + + return "unknown" +} + +func (r ReplicationState) StateStrings() []string { + var ret []string + if r.HasState(ReplicationPerformanceSecondary) { + ret = append(ret, "perf-secondary") + } + if r.HasState(ReplicationPerformancePrimary) { + ret = append(ret, "perf-primary") + } + if r.HasState(ReplicationPerformanceBootstrapping) { + ret = append(ret, "perf-bootstrapping") + } + if r.HasState(ReplicationPerformanceDisabled) { + ret = append(ret, "perf-disabled") + } + if r.HasState(ReplicationDRPrimary) { + ret = append(ret, "dr-primary") + } + if r.HasState(ReplicationDRSecondary) { + ret = append(ret, "dr-secondary") + } + if r.HasState(ReplicationDRBootstrapping) { + ret = append(ret, "dr-bootstrapping") + } + if r.HasState(ReplicationDRDisabled) { + ret = append(ret, "dr-disabled") + } + if r.HasState(ReplicationPerformanceStandby) { + ret = append(ret, "perfstandby") + } + + return ret +} + +func (r ReplicationState) GetDRString() string { + switch { + case r.HasState(ReplicationDRBootstrapping): + return ReplicationDRBootstrapping.string() + case r.HasState(ReplicationDRPrimary): + return ReplicationDRPrimary.string() + case r.HasState(ReplicationDRSecondary): + return ReplicationDRSecondary.string() + case r.HasState(ReplicationDRDisabled): + return ReplicationDRDisabled.string() + default: + return "unknown" + } +} + +func (r ReplicationState) GetPerformanceString() string { + switch { + case r.HasState(ReplicationPerformanceBootstrapping): + return ReplicationPerformanceBootstrapping.string() + case r.HasState(ReplicationPerformancePrimary): + return ReplicationPerformancePrimary.string() + case r.HasState(ReplicationPerformanceSecondary): + return ReplicationPerformanceSecondary.string() + case r.HasState(ReplicationPerformanceDisabled): + return ReplicationPerformanceDisabled.string() + default: + return "unknown" + } +} + +func (r ReplicationState) HasState(flag ReplicationState) bool { return r&flag != 0 } +func (r *ReplicationState) AddState(flag ReplicationState) { *r |= flag } +func (r *ReplicationState) ClearState(flag ReplicationState) { *r &= ^flag } +func (r *ReplicationState) ToggleState(flag ReplicationState) { *r ^= flag } diff --git a/vendor/github.com/hashicorp/vault/helper/parseutil/parseutil.go b/vendor/github.com/hashicorp/vault/helper/parseutil/parseutil.go index 9b32bf7df..8ce5eae4a 100644 --- a/vendor/github.com/hashicorp/vault/helper/parseutil/parseutil.go +++ b/vendor/github.com/hashicorp/vault/helper/parseutil/parseutil.go @@ -106,6 +106,10 @@ func ParseBool(in interface{}) (bool, error) { } func ParseCommaStringSlice(in interface{}) ([]string, error) { + rawString, ok := in.(string) + if ok && rawString == "" { + return []string{}, nil + } var result []string config := &mapstructure.DecoderConfig{ Result: &result, diff --git a/vendor/github.com/hashicorp/vault/helper/strutil/strutil.go b/vendor/github.com/hashicorp/vault/helper/strutil/strutil.go index a77e60d15..3b54b720b 100644 --- a/vendor/github.com/hashicorp/vault/helper/strutil/strutil.go +++ b/vendor/github.com/hashicorp/vault/helper/strutil/strutil.go @@ -43,9 +43,9 @@ func StrListSubset(super, sub []string) bool { return true } -// Parses a comma separated list of strings into a slice of strings. -// The return slice will be sorted and will not contain duplicate or -// empty items. +// ParseDedupAndSortStrings parses a comma separated list of strings +// into a slice of strings. The return slice will be sorted and will +// not contain duplicate or empty items. func ParseDedupAndSortStrings(input string, sep string) []string { input = strings.TrimSpace(input) parsed := []string{} @@ -56,9 +56,10 @@ func ParseDedupAndSortStrings(input string, sep string) []string { return RemoveDuplicates(strings.Split(input, sep), false) } -// Parses a comma separated list of strings into a slice of strings. -// The return slice will be sorted and will not contain duplicate or -// empty items. The values will be converted to lower case. +// ParseDedupLowercaseAndSortStrings parses a comma separated list of +// strings into a slice of strings. The return slice will be sorted and +// will not contain duplicate or empty items. The values will be converted +// to lower case. func ParseDedupLowercaseAndSortStrings(input string, sep string) []string { input = strings.TrimSpace(input) parsed := []string{} @@ -69,8 +70,8 @@ func ParseDedupLowercaseAndSortStrings(input string, sep string) []string { return RemoveDuplicates(strings.Split(input, sep), true) } -// Parses a comma separated list of `=` tuples into a -// map[string]string. +// ParseKeyValues parses a comma separated list of `=` tuples +// into a map[string]string. func ParseKeyValues(input string, out map[string]string, sep string) error { if out == nil { return fmt.Errorf("'out is nil") @@ -97,8 +98,8 @@ func ParseKeyValues(input string, out map[string]string, sep string) error { return nil } -// Parses arbitrary tuples. The input can be one of -// the following: +// ParseArbitraryKeyValues parses arbitrary tuples. The input +// can be one of the following: // * JSON string // * Base64 encoded JSON string // * Comma separated list of `=` pairs @@ -144,8 +145,8 @@ func ParseArbitraryKeyValues(input string, out map[string]string, sep string) er return nil } -// Parses a `sep`-separated list of strings into a -// []string. +// ParseStringSlice parses a `sep`-separated list of strings into a +// []string with surrounding whitespace removed. // // The output will always be a valid slice but may be of length zero. func ParseStringSlice(input string, sep string) []string { @@ -157,14 +158,14 @@ func ParseStringSlice(input string, sep string) []string { splitStr := strings.Split(input, sep) ret := make([]string, len(splitStr)) for i, val := range splitStr { - ret[i] = val + ret[i] = strings.TrimSpace(val) } return ret } -// Parses arbitrary string slice. The input can be one of -// the following: +// ParseArbitraryStringSlice parses arbitrary string slice. The input +// can be one of the following: // * JSON string // * Base64 encoded JSON string // * `sep` separated list of values @@ -215,8 +216,9 @@ func TrimStrings(items []string) []string { return ret } -// Removes duplicate and empty elements from a slice of strings. This also may -// convert the items in the slice to lower case and returns a sorted slice. +// RemoveDuplicates removes duplicate and empty elements from a slice of +// strings. This also may convert the items in the slice to lower case and +// returns a sorted slice. func RemoveDuplicates(items []string, lowercase bool) []string { itemsMap := map[string]bool{} for _, item := range items { @@ -230,13 +232,29 @@ func RemoveDuplicates(items []string, lowercase bool) []string { itemsMap[item] = true } items = make([]string, 0, len(itemsMap)) - for item, _ := range itemsMap { + for item := range itemsMap { items = append(items, item) } sort.Strings(items) return items } +// RemoveEmpty removes empty elements from a slice of +// strings +func RemoveEmpty(items []string) []string { + if len(items) == 0 { + return items + } + itemsSlice := make([]string, 0, len(items)) + for _, item := range items { + if item == "" { + continue + } + itemsSlice = append(itemsSlice, item) + } + return itemsSlice +} + // EquivalentSlices checks whether the given string sets are equivalent, as in, // they contain the same values. func EquivalentSlices(a, b []string) bool { @@ -260,10 +278,10 @@ func EquivalentSlices(a, b []string) bool { // Now we'll build our checking slices var sortedA, sortedB []string - for keyA, _ := range mapA { + for keyA := range mapA { sortedA = append(sortedA, keyA) } - for keyB, _ := range mapB { + for keyB := range mapB { sortedB = append(sortedB, keyB) } sort.Strings(sortedA) @@ -283,6 +301,24 @@ func EquivalentSlices(a, b []string) bool { return true } +// EqualStringMaps tests whether two map[string]string objects are equal. +// Equal means both maps have the same sets of keys and values. This function +// is 6-10x faster than a call to reflect.DeepEqual(). +func EqualStringMaps(a, b map[string]string) bool { + if len(a) != len(b) { + return false + } + + for k := range a { + v, ok := b[k] + if !ok || a[k] != v { + return false + } + } + + return true +} + // StrListDelete removes the first occurrence of the given item from the slice // of strings if the item exists. func StrListDelete(s []string, d string) []string { @@ -299,6 +335,8 @@ func StrListDelete(s []string, d string) []string { return s } +// GlobbedStringsMatch compares item to val with support for a leading and/or +// trailing wildcard '*' in item. func GlobbedStringsMatch(item, val string) bool { if len(item) < 2 { return val == item @@ -325,3 +363,63 @@ func AppendIfMissing(slice []string, i string) []string { } return append(slice, i) } + +// MergeSlices adds an arbitrary number of slices together, uniquely +func MergeSlices(args ...[]string) []string { + all := map[string]struct{}{} + for _, slice := range args { + for _, v := range slice { + all[v] = struct{}{} + } + } + + result := make([]string, 0, len(all)) + for k := range all { + result = append(result, k) + } + sort.Strings(result) + return result +} + +// Difference returns the set difference (A - B) of the two given slices. The +// result will also remove any duplicated values in set A regardless of whether +// that matches any values in set B. +func Difference(a, b []string, lowercase bool) []string { + if len(a) == 0 { + return a + } + if len(b) == 0 { + if !lowercase { + return a + } + newA := make([]string, len(a)) + for i, v := range a { + newA[i] = strings.ToLower(v) + } + return newA + } + + a = RemoveDuplicates(a, lowercase) + b = RemoveDuplicates(b, lowercase) + + itemsMap := map[string]bool{} + for _, aVal := range a { + itemsMap[aVal] = true + } + + // Perform difference calculation + for _, bVal := range b { + if _, ok := itemsMap[bVal]; ok { + itemsMap[bVal] = false + } + } + + items := []string{} + for item, exists := range itemsMap { + if exists { + items = append(items, item) + } + } + sort.Strings(items) + return items +} diff --git a/vendor/github.com/hashicorp/yamux/go.mod b/vendor/github.com/hashicorp/yamux/go.mod new file mode 100644 index 000000000..672a0e581 --- /dev/null +++ b/vendor/github.com/hashicorp/yamux/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/yamux diff --git a/vendor/github.com/hashicorp/yamux/mux.go b/vendor/github.com/hashicorp/yamux/mux.go index 7abc7c744..18a078c8a 100644 --- a/vendor/github.com/hashicorp/yamux/mux.go +++ b/vendor/github.com/hashicorp/yamux/mux.go @@ -3,6 +3,7 @@ package yamux import ( "fmt" "io" + "log" "os" "time" ) @@ -30,8 +31,13 @@ type Config struct { // window size that we allow for a stream. MaxStreamWindowSize uint32 - // LogOutput is used to control the log destination + // LogOutput is used to control the log destination. Either Logger or + // LogOutput can be set, not both. LogOutput io.Writer + + // Logger is used to pass in the logger to be used. Either Logger or + // LogOutput can be set, not both. + Logger *log.Logger } // DefaultConfig is used to return a default configuration @@ -57,6 +63,11 @@ func VerifyConfig(config *Config) error { if config.MaxStreamWindowSize < initialStreamWindow { return fmt.Errorf("MaxStreamWindowSize must be larger than %d", initialStreamWindow) } + if config.LogOutput != nil && config.Logger != nil { + return fmt.Errorf("both Logger and LogOutput may not be set, select one") + } else if config.LogOutput == nil && config.Logger == nil { + return fmt.Errorf("one of Logger or LogOutput must be set, select one") + } return nil } diff --git a/vendor/github.com/hashicorp/yamux/session.go b/vendor/github.com/hashicorp/yamux/session.go index 32ba02e02..a80ddec35 100644 --- a/vendor/github.com/hashicorp/yamux/session.go +++ b/vendor/github.com/hashicorp/yamux/session.go @@ -86,9 +86,14 @@ type sendReady struct { // newSession is used to construct a new session func newSession(config *Config, conn io.ReadWriteCloser, client bool) *Session { + logger := config.Logger + if logger == nil { + logger = log.New(config.LogOutput, "", log.LstdFlags) + } + s := &Session{ config: config, - logger: log.New(config.LogOutput, "", log.LstdFlags), + logger: logger, conn: conn, bufRead: bufio.NewReader(conn), pings: make(map[uint32]chan struct{}), diff --git a/vendor/github.com/hetznercloud/hcloud-go/LICENSE b/vendor/github.com/hetznercloud/hcloud-go/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/action.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/action.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/client.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/client.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/datacenter.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/datacenter.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/error.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/error.go old mode 100755 new mode 100644 index 6235f081d..2e9f3b9a8 --- a/vendor/github.com/hetznercloud/hcloud-go/hcloud/error.go +++ b/vendor/github.com/hetznercloud/hcloud-go/hcloud/error.go @@ -7,11 +7,19 @@ type ErrorCode string // Error codes returned from the API. const ( - ErrorCodeServiceError ErrorCode = "service_error" // Generic server error - ErrorCodeRateLimitExceeded ErrorCode = "rate_limit_exceeded" // Rate limit exceeded - ErrorCodeUnknownError ErrorCode = "unknown_error" // Unknown error - ErrorCodeNotFound ErrorCode = "not_found" // Resource not found - ErrorCodeInvalidInput ErrorCode = "invalid_input" // Validation error + ErrorCodeServiceError ErrorCode = "service_error" // Generic service error + ErrorCodeRateLimitExceeded ErrorCode = "rate_limit_exceeded" // Rate limit exceeded + ErrorCodeUnknownError ErrorCode = "unknown_error" // Unknown error + ErrorCodeNotFound ErrorCode = "not_found" // Resource not found + ErrorCodeInvalidInput ErrorCode = "invalid_input" // Validation error + ErrorCodeForbidden ErrorCode = "forbidden" // Insufficient permissions + ErrorCodeJSONError ErrorCode = "json_error" // Invalid JSON in request + ErrorCodeLocked ErrorCode = "locked" // Item is locked (Another action is running) + ErrorCodeResourceLimitExceeded ErrorCode = "resource_limit_exceeded" // Resource limit exceeded + ErrorCodeResourceUnavailable ErrorCode = "resource_unavailable" // Resource currently unavailable + ErrorCodeUniquenessError ErrorCode = "uniqueness_error" // One or more fields must be unique + ErrorCodeProtected ErrorCode = "protected" // The actions you are trying is protected + ErrorCodeMaintenance ErrorCode = "maintenance" // Cannot perform operation due to maintenance // Deprecated error codes diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/floating_ip.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/floating_ip.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/hcloud.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/hcloud.go old mode 100755 new mode 100644 index 032342ef4..47648590f --- a/vendor/github.com/hetznercloud/hcloud-go/hcloud/hcloud.go +++ b/vendor/github.com/hetznercloud/hcloud-go/hcloud/hcloud.go @@ -2,4 +2,4 @@ package hcloud // Version is the library's version following Semantic Versioning. -const Version = "1.11.0" +const Version = "1.12.0" diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/helper.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/helper.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/image.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/image.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/iso.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/iso.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/location.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/location.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/pricing.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/pricing.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/action.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/action.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/datacenter.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/datacenter.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/error.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/error.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/floating_ip.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/floating_ip.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/image.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/image.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/iso.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/iso.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/location.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/location.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/meta.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/meta.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/pricing.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/pricing.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/server.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/server.go old mode 100755 new mode 100644 index edaf54ce2..e680ae75e --- a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/server.go +++ b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/server.go @@ -85,6 +85,8 @@ type ServerCreateRequest struct { UserData string `json:"user_data,omitempty"` StartAfterCreate *bool `json:"start_after_create,omitempty"` Labels *map[string]string `json:"labels,omitempty"` + Automount *bool `json:"automount,omitempty"` + Volumes []int `json:"volumes,omitempty"` } // ServerCreateResponse defines the schema of the response when diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/server_type.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/server_type.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/ssh_key.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/ssh_key.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/volume.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/volume.go old mode 100755 new mode 100644 index a8aa79341..5e8c73475 --- a/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/volume.go +++ b/vendor/github.com/hetznercloud/hcloud-go/hcloud/schema/volume.go @@ -18,11 +18,13 @@ type Volume struct { // VolumeCreateRequest defines the schema of the request // to create a volume. type VolumeCreateRequest struct { - Name string `json:"name"` - Size int `json:"size"` - Server *int `json:"server,omitempty"` - Location interface{} `json:"location,omitempty"` // int, string, or nil - Labels *map[string]string `json:"labels,omitempty"` + Name string `json:"name"` + Size int `json:"size"` + Server *int `json:"server,omitempty"` + Location interface{} `json:"location,omitempty"` // int, string, or nil + Labels *map[string]string `json:"labels,omitempty"` + Automount *bool `json:"automount,omitempty"` + Format *string `json:"format,omitempty"` } // VolumeCreateResponse defines the schema of the response @@ -76,7 +78,8 @@ type VolumeActionChangeProtectionResponse struct { // VolumeActionAttachVolumeRequest defines the schema of the request to // attach a volume to a server. type VolumeActionAttachVolumeRequest struct { - Server int `json:"server"` + Server int `json:"server"` + Automount *bool `json:"automount,omitempty"` } // VolumeActionAttachVolumeResponse defines the schema of the response when diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/server.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/server.go old mode 100755 new mode 100644 index ad0b16e9d..c301d5baf --- a/vendor/github.com/hetznercloud/hcloud-go/hcloud/server.go +++ b/vendor/github.com/hetznercloud/hcloud-go/hcloud/server.go @@ -205,6 +205,8 @@ type ServerCreateOpts struct { UserData string StartAfterCreate *bool Labels map[string]string + Automount *bool + Volumes []*Volume } // Validate checks if options are valid. @@ -241,6 +243,7 @@ func (c *ServerClient) Create(ctx context.Context, opts ServerCreateOpts) (Serve var reqBody schema.ServerCreateRequest reqBody.UserData = opts.UserData reqBody.Name = opts.Name + reqBody.Automount = opts.Automount reqBody.StartAfterCreate = opts.StartAfterCreate if opts.ServerType.ID != 0 { reqBody.ServerType = opts.ServerType.ID @@ -258,6 +261,10 @@ func (c *ServerClient) Create(ctx context.Context, opts ServerCreateOpts) (Serve for _, sshKey := range opts.SSHKeys { reqBody.SSHKeys = append(reqBody.SSHKeys, sshKey.ID) } + for _, volume := range opts.Volumes { + reqBody.Volumes = append(reqBody.Volumes, volume.ID) + } + if opts.Location != nil { if opts.Location.ID != 0 { reqBody.Location = strconv.Itoa(opts.Location.ID) diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/server_type.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/server_type.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/ssh_key.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/ssh_key.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/volume.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/volume.go old mode 100755 new mode 100644 index 735f3918b..a9d2ea3d5 --- a/vendor/github.com/hetznercloud/hcloud-go/hcloud/volume.go +++ b/vendor/github.com/hetznercloud/hcloud-go/hcloud/volume.go @@ -135,11 +135,13 @@ func (c *VolumeClient) AllWithOpts(ctx context.Context, opts VolumeListOpts) ([] // VolumeCreateOpts specifies parameters for creating a volume. type VolumeCreateOpts struct { - Name string - Size int - Server *Server - Location *Location - Labels map[string]string + Name string + Size int + Server *Server + Location *Location + Labels map[string]string + Automount *bool + Format *string } // Validate checks if options are valid. @@ -156,6 +158,9 @@ func (o VolumeCreateOpts) Validate() error { if o.Server != nil && o.Location != nil { return errors.New("only one of server or location must be provided") } + if o.Server == nil && (o.Automount != nil && *o.Automount) { + return errors.New("server must be provided when automount is true") + } return nil } @@ -172,8 +177,10 @@ func (c *VolumeClient) Create(ctx context.Context, opts VolumeCreateOpts) (Volum return VolumeCreateResult{}, nil, err } reqBody := schema.VolumeCreateRequest{ - Name: opts.Name, - Size: opts.Size, + Name: opts.Name, + Size: opts.Size, + Automount: opts.Automount, + Format: opts.Format, } if opts.Labels != nil { reqBody.Labels = &opts.Labels @@ -188,6 +195,7 @@ func (c *VolumeClient) Create(ctx context.Context, opts VolumeCreateOpts) (Volum reqBody.Location = opts.Location.Name } } + reqBodyData, err := json.Marshal(reqBody) if err != nil { return VolumeCreateResult{}, nil, err @@ -258,11 +266,19 @@ func (c *VolumeClient) Update(ctx context.Context, volume *Volume, opts VolumeUp return VolumeFromSchema(respBody.Volume), resp, nil } -// Attach attaches a volume to a server. -func (c *VolumeClient) Attach(ctx context.Context, volume *Volume, server *Server) (*Action, *Response, error) { +// VolumeAttachOpts specifies options for attaching a volume. +type VolumeAttachOpts struct { + Server *Server + Automount *bool +} + +// AttachWithOpts attaches a volume to a server. +func (c *VolumeClient) AttachWithOpts(ctx context.Context, volume *Volume, opts VolumeAttachOpts) (*Action, *Response, error) { reqBody := schema.VolumeActionAttachVolumeRequest{ - Server: server.ID, + Server: opts.Server.ID, + Automount: opts.Automount, } + reqBodyData, err := json.Marshal(reqBody) if err != nil { return nil, nil, err @@ -282,6 +298,11 @@ func (c *VolumeClient) Attach(ctx context.Context, volume *Volume, server *Serve return ActionFromSchema(respBody.Action), resp, nil } +// Attach attaches a volume to a server. +func (c *VolumeClient) Attach(ctx context.Context, volume *Volume, server *Server) (*Action, *Response, error) { + return c.AttachWithOpts(ctx, volume, VolumeAttachOpts{Server: server}) +} + // Detach detaches a volume from a server. func (c *VolumeClient) Detach(ctx context.Context, volume *Volume) (*Action, *Response, error) { var reqBody schema.VolumeActionDetachVolumeRequest diff --git a/vendor/github.com/joyent/triton-go/.gitignore b/vendor/github.com/joyent/triton-go/.gitignore new file mode 100644 index 000000000..0eb251f2b --- /dev/null +++ b/vendor/github.com/joyent/triton-go/.gitignore @@ -0,0 +1,17 @@ +*.dll +*.exe +.DS_Store +bin/ +pkg/ +.vagrant/ +*.backup +*.log +*.bak +*~ +*# +.*.swp +.idea/ +*.test +*.iml +Notes.md +coverage.txt diff --git a/vendor/github.com/joyent/triton-go/.travis.yml b/vendor/github.com/joyent/triton-go/.travis.yml new file mode 100644 index 000000000..705fa4ed1 --- /dev/null +++ b/vendor/github.com/joyent/triton-go/.travis.yml @@ -0,0 +1,19 @@ +dist: trusty +sudo: false +language: go +go: +- 1.9.1 + +install: +- go get github.com/golang/dep/cmd/dep + +script: +- make default + +branches: + only: + - master +matrix: + fast_finish: true + allow_failures: + - go: tip \ No newline at end of file diff --git a/vendor/github.com/klauspost/cpuid/.gitignore b/vendor/github.com/klauspost/cpuid/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/vendor/github.com/klauspost/cpuid/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/klauspost/cpuid/.travis.yml b/vendor/github.com/klauspost/cpuid/.travis.yml new file mode 100644 index 000000000..fb74de6b8 --- /dev/null +++ b/vendor/github.com/klauspost/cpuid/.travis.yml @@ -0,0 +1,7 @@ +language: go + +go: + - 1.3 + - 1.4 + - 1.5 + - tip diff --git a/vendor/github.com/klauspost/crc32/.gitignore b/vendor/github.com/klauspost/crc32/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/vendor/github.com/klauspost/crc32/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/klauspost/crc32/.travis.yml b/vendor/github.com/klauspost/crc32/.travis.yml new file mode 100644 index 000000000..c62e25f5a --- /dev/null +++ b/vendor/github.com/klauspost/crc32/.travis.yml @@ -0,0 +1,11 @@ +language: go + +go: + - 1.3 + - 1.4 + - 1.5 + - tip + +script: + - go test -v . + - go test -v -race . diff --git a/vendor/github.com/klauspost/pgzip/.gitignore b/vendor/github.com/klauspost/pgzip/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/vendor/github.com/klauspost/pgzip/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/klauspost/pgzip/.travis.yml b/vendor/github.com/klauspost/pgzip/.travis.yml new file mode 100644 index 000000000..7c37376e6 --- /dev/null +++ b/vendor/github.com/klauspost/pgzip/.travis.yml @@ -0,0 +1,13 @@ +language: go + +sudo: false + +go: + - 1.3 + - 1.4 + - 1.5 + - tip + +script: + - go test -v -cpu=1,2,4 . + - go test -v -cpu=2 -race -short . diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE b/vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE new file mode 100644 index 000000000..14127cd83 --- /dev/null +++ b/vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE @@ -0,0 +1,9 @@ +(The MIT License) + +Copyright (c) 2017 marvin + konsorten GmbH (open-source@konsorten.de) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/README.md b/vendor/github.com/konsorten/go-windows-terminal-sequences/README.md new file mode 100644 index 000000000..949b77e30 --- /dev/null +++ b/vendor/github.com/konsorten/go-windows-terminal-sequences/README.md @@ -0,0 +1,40 @@ +# Windows Terminal Sequences + +This library allow for enabling Windows terminal color support for Go. + +See [Console Virtual Terminal Sequences](https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences) for details. + +## Usage + +```go +import ( + "syscall" + + sequences "github.com/konsorten/go-windows-terminal-sequences" +) + +func main() { + sequences.EnableVirtualTerminalProcessing(syscall.Stdout, true) +} + +``` + +## Authors + +The tool is sponsored by the [marvin + konsorten GmbH](http://www.konsorten.de). + +We thank all the authors who provided code to this library: + +* Felix Kollmann + +## License + +(The MIT License) + +Copyright (c) 2018 marvin + konsorten GmbH (open-source@konsorten.de) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod b/vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod new file mode 100644 index 000000000..716c61312 --- /dev/null +++ b/vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod @@ -0,0 +1 @@ +module github.com/konsorten/go-windows-terminal-sequences diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go b/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go new file mode 100644 index 000000000..ef18d8f97 --- /dev/null +++ b/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go @@ -0,0 +1,36 @@ +// +build windows + +package sequences + +import ( + "syscall" + "unsafe" +) + +var ( + kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll") + setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode") +) + +func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error { + const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4 + + var mode uint32 + err := syscall.GetConsoleMode(syscall.Stdout, &mode) + if err != nil { + return err + } + + if enable { + mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING + } else { + mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING + } + + ret, _, err := setConsoleMode.Call(uintptr(unsafe.Pointer(stream)), uintptr(mode)) + if ret == 0 { + return err + } + + return nil +} diff --git a/vendor/github.com/marstr/guid/.travis.yml b/vendor/github.com/marstr/guid/.travis.yml new file mode 100644 index 000000000..35158ec53 --- /dev/null +++ b/vendor/github.com/marstr/guid/.travis.yml @@ -0,0 +1,18 @@ +sudo: false + +language: go + +go: + - 1.7 + - 1.8 + +install: + - go get -u github.com/golang/lint/golint + - go get -u github.com/HewlettPackard/gas + +script: + - golint --set_exit_status + - go vet + - go test -v -cover -race + - go test -bench . + - gas ./... \ No newline at end of file diff --git a/vendor/github.com/masterzen/winrm/.gitignore b/vendor/github.com/masterzen/winrm/.gitignore new file mode 100644 index 000000000..c2398c5f1 --- /dev/null +++ b/vendor/github.com/masterzen/winrm/.gitignore @@ -0,0 +1,28 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test +.idea + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +*.coverprofile +*.cov diff --git a/vendor/github.com/masterzen/winrm/.travis.yml b/vendor/github.com/masterzen/winrm/.travis.yml new file mode 100644 index 000000000..7da672a34 --- /dev/null +++ b/vendor/github.com/masterzen/winrm/.travis.yml @@ -0,0 +1,28 @@ +sudo: false +language: go +go: +- 1.5 +- 1.6 +- 1.7 +- 1.8 +- 1.9 +- '1.10' +install: +- make deps +- go build -o winrm-cli +before_install: +- go get github.com/axw/gocov/gocov +- go get github.com/mattn/goveralls +- go get golang.org/x/tools/cmd/cover +- go get github.com/modocache/gover +- go get gopkg.in/check.v1 +script: +- make ci +after_script: +- $HOME/gopath/bin/goveralls -service="travis-ci" -coverprofile=profile.cov -repotoken $COVERALLS_TOKEN +matrix: + allow_failures: + - go: tip +env: + global: + secure: "GTrEtbp3sq14Jjz34pgIO0/Zv19YaDOOUJay4qnzGxs527HkW7YdsWENz0/yGHet+0jMOPatfP3uLaQHVFCNFZLfMYVmD5apMl7hPFrCaDZVvI9+ZwngIZ8gHzcf2Q+L6LxUT523ypjmRR+T1qYfbOy4UXlfGCyHFBbRB7AbMDk=" diff --git a/vendor/github.com/mattn/go-colorable/.travis.yml b/vendor/github.com/mattn/go-colorable/.travis.yml new file mode 100644 index 000000000..98db8f060 --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/.travis.yml @@ -0,0 +1,9 @@ +language: go +go: + - tip + +before_install: + - go get github.com/mattn/goveralls + - go get golang.org/x/tools/cmd/cover +script: + - $HOME/gopath/bin/goveralls -repotoken xnXqRGwgW3SXIguzxf90ZSK1GPYZPaGrw diff --git a/vendor/github.com/stretchr/objx/LICENSE b/vendor/github.com/mattn/go-colorable/LICENSE similarity index 91% rename from vendor/github.com/stretchr/objx/LICENSE rename to vendor/github.com/mattn/go-colorable/LICENSE index 44d4d9d5a..91b5cef30 100644 --- a/vendor/github.com/stretchr/objx/LICENSE +++ b/vendor/github.com/mattn/go-colorable/LICENSE @@ -1,7 +1,6 @@ -The MIT License +The MIT License (MIT) -Copyright (c) 2014 Stretchr, Inc. -Copyright (c) 2017-2018 objx contributors +Copyright (c) 2016 Yasuhiro Matsumoto Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/github.com/mattn/go-colorable/README.md b/vendor/github.com/mattn/go-colorable/README.md new file mode 100644 index 000000000..56729a92c --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/README.md @@ -0,0 +1,48 @@ +# go-colorable + +[![Godoc Reference](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable) +[![Build Status](https://travis-ci.org/mattn/go-colorable.svg?branch=master)](https://travis-ci.org/mattn/go-colorable) +[![Coverage Status](https://coveralls.io/repos/github/mattn/go-colorable/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-colorable?branch=master) +[![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable) + +Colorable writer for windows. + +For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.) +This package is possible to handle escape sequence for ansi color on windows. + +## Too Bad! + +![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png) + + +## So Good! + +![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png) + +## Usage + +```go +logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) +logrus.SetOutput(colorable.NewColorableStdout()) + +logrus.Info("succeeded") +logrus.Warn("not correct") +logrus.Error("something error") +logrus.Fatal("panic") +``` + +You can compile above code on non-windows OSs. + +## Installation + +``` +$ go get github.com/mattn/go-colorable +``` + +# License + +MIT + +# Author + +Yasuhiro Matsumoto (a.k.a mattn) diff --git a/vendor/github.com/mattn/go-colorable/colorable_appengine.go b/vendor/github.com/mattn/go-colorable/colorable_appengine.go new file mode 100644 index 000000000..1f28d773d --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/colorable_appengine.go @@ -0,0 +1,29 @@ +// +build appengine + +package colorable + +import ( + "io" + "os" + + _ "github.com/mattn/go-isatty" +) + +// NewColorable return new instance of Writer which handle escape sequence. +func NewColorable(file *os.File) io.Writer { + if file == nil { + panic("nil passed instead of *os.File to NewColorable()") + } + + return file +} + +// NewColorableStdout return new instance of Writer which handle escape sequence for stdout. +func NewColorableStdout() io.Writer { + return os.Stdout +} + +// NewColorableStderr return new instance of Writer which handle escape sequence for stderr. +func NewColorableStderr() io.Writer { + return os.Stderr +} diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go new file mode 100644 index 000000000..887f203dc --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/colorable_others.go @@ -0,0 +1,30 @@ +// +build !windows +// +build !appengine + +package colorable + +import ( + "io" + "os" + + _ "github.com/mattn/go-isatty" +) + +// NewColorable return new instance of Writer which handle escape sequence. +func NewColorable(file *os.File) io.Writer { + if file == nil { + panic("nil passed instead of *os.File to NewColorable()") + } + + return file +} + +// NewColorableStdout return new instance of Writer which handle escape sequence for stdout. +func NewColorableStdout() io.Writer { + return os.Stdout +} + +// NewColorableStderr return new instance of Writer which handle escape sequence for stderr. +func NewColorableStderr() io.Writer { + return os.Stderr +} diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go new file mode 100644 index 000000000..e17a5474e --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go @@ -0,0 +1,884 @@ +// +build windows +// +build !appengine + +package colorable + +import ( + "bytes" + "io" + "math" + "os" + "strconv" + "strings" + "syscall" + "unsafe" + + "github.com/mattn/go-isatty" +) + +const ( + foregroundBlue = 0x1 + foregroundGreen = 0x2 + foregroundRed = 0x4 + foregroundIntensity = 0x8 + foregroundMask = (foregroundRed | foregroundBlue | foregroundGreen | foregroundIntensity) + backgroundBlue = 0x10 + backgroundGreen = 0x20 + backgroundRed = 0x40 + backgroundIntensity = 0x80 + backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity) +) + +type wchar uint16 +type short int16 +type dword uint32 +type word uint16 + +type coord struct { + x short + y short +} + +type smallRect struct { + left short + top short + right short + bottom short +} + +type consoleScreenBufferInfo struct { + size coord + cursorPosition coord + attributes word + window smallRect + maximumWindowSize coord +} + +type consoleCursorInfo struct { + size dword + visible int32 +} + +var ( + kernel32 = syscall.NewLazyDLL("kernel32.dll") + procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") + procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute") + procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") + procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW") + procFillConsoleOutputAttribute = kernel32.NewProc("FillConsoleOutputAttribute") + procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo") + procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo") + procSetConsoleTitle = kernel32.NewProc("SetConsoleTitleW") +) + +// Writer provide colorable Writer to the console +type Writer struct { + out io.Writer + handle syscall.Handle + oldattr word + oldpos coord +} + +// NewColorable return new instance of Writer which handle escape sequence from File. +func NewColorable(file *os.File) io.Writer { + if file == nil { + panic("nil passed instead of *os.File to NewColorable()") + } + + if isatty.IsTerminal(file.Fd()) { + var csbi consoleScreenBufferInfo + handle := syscall.Handle(file.Fd()) + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + return &Writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}} + } + return file +} + +// NewColorableStdout return new instance of Writer which handle escape sequence for stdout. +func NewColorableStdout() io.Writer { + return NewColorable(os.Stdout) +} + +// NewColorableStderr return new instance of Writer which handle escape sequence for stderr. +func NewColorableStderr() io.Writer { + return NewColorable(os.Stderr) +} + +var color256 = map[int]int{ + 0: 0x000000, + 1: 0x800000, + 2: 0x008000, + 3: 0x808000, + 4: 0x000080, + 5: 0x800080, + 6: 0x008080, + 7: 0xc0c0c0, + 8: 0x808080, + 9: 0xff0000, + 10: 0x00ff00, + 11: 0xffff00, + 12: 0x0000ff, + 13: 0xff00ff, + 14: 0x00ffff, + 15: 0xffffff, + 16: 0x000000, + 17: 0x00005f, + 18: 0x000087, + 19: 0x0000af, + 20: 0x0000d7, + 21: 0x0000ff, + 22: 0x005f00, + 23: 0x005f5f, + 24: 0x005f87, + 25: 0x005faf, + 26: 0x005fd7, + 27: 0x005fff, + 28: 0x008700, + 29: 0x00875f, + 30: 0x008787, + 31: 0x0087af, + 32: 0x0087d7, + 33: 0x0087ff, + 34: 0x00af00, + 35: 0x00af5f, + 36: 0x00af87, + 37: 0x00afaf, + 38: 0x00afd7, + 39: 0x00afff, + 40: 0x00d700, + 41: 0x00d75f, + 42: 0x00d787, + 43: 0x00d7af, + 44: 0x00d7d7, + 45: 0x00d7ff, + 46: 0x00ff00, + 47: 0x00ff5f, + 48: 0x00ff87, + 49: 0x00ffaf, + 50: 0x00ffd7, + 51: 0x00ffff, + 52: 0x5f0000, + 53: 0x5f005f, + 54: 0x5f0087, + 55: 0x5f00af, + 56: 0x5f00d7, + 57: 0x5f00ff, + 58: 0x5f5f00, + 59: 0x5f5f5f, + 60: 0x5f5f87, + 61: 0x5f5faf, + 62: 0x5f5fd7, + 63: 0x5f5fff, + 64: 0x5f8700, + 65: 0x5f875f, + 66: 0x5f8787, + 67: 0x5f87af, + 68: 0x5f87d7, + 69: 0x5f87ff, + 70: 0x5faf00, + 71: 0x5faf5f, + 72: 0x5faf87, + 73: 0x5fafaf, + 74: 0x5fafd7, + 75: 0x5fafff, + 76: 0x5fd700, + 77: 0x5fd75f, + 78: 0x5fd787, + 79: 0x5fd7af, + 80: 0x5fd7d7, + 81: 0x5fd7ff, + 82: 0x5fff00, + 83: 0x5fff5f, + 84: 0x5fff87, + 85: 0x5fffaf, + 86: 0x5fffd7, + 87: 0x5fffff, + 88: 0x870000, + 89: 0x87005f, + 90: 0x870087, + 91: 0x8700af, + 92: 0x8700d7, + 93: 0x8700ff, + 94: 0x875f00, + 95: 0x875f5f, + 96: 0x875f87, + 97: 0x875faf, + 98: 0x875fd7, + 99: 0x875fff, + 100: 0x878700, + 101: 0x87875f, + 102: 0x878787, + 103: 0x8787af, + 104: 0x8787d7, + 105: 0x8787ff, + 106: 0x87af00, + 107: 0x87af5f, + 108: 0x87af87, + 109: 0x87afaf, + 110: 0x87afd7, + 111: 0x87afff, + 112: 0x87d700, + 113: 0x87d75f, + 114: 0x87d787, + 115: 0x87d7af, + 116: 0x87d7d7, + 117: 0x87d7ff, + 118: 0x87ff00, + 119: 0x87ff5f, + 120: 0x87ff87, + 121: 0x87ffaf, + 122: 0x87ffd7, + 123: 0x87ffff, + 124: 0xaf0000, + 125: 0xaf005f, + 126: 0xaf0087, + 127: 0xaf00af, + 128: 0xaf00d7, + 129: 0xaf00ff, + 130: 0xaf5f00, + 131: 0xaf5f5f, + 132: 0xaf5f87, + 133: 0xaf5faf, + 134: 0xaf5fd7, + 135: 0xaf5fff, + 136: 0xaf8700, + 137: 0xaf875f, + 138: 0xaf8787, + 139: 0xaf87af, + 140: 0xaf87d7, + 141: 0xaf87ff, + 142: 0xafaf00, + 143: 0xafaf5f, + 144: 0xafaf87, + 145: 0xafafaf, + 146: 0xafafd7, + 147: 0xafafff, + 148: 0xafd700, + 149: 0xafd75f, + 150: 0xafd787, + 151: 0xafd7af, + 152: 0xafd7d7, + 153: 0xafd7ff, + 154: 0xafff00, + 155: 0xafff5f, + 156: 0xafff87, + 157: 0xafffaf, + 158: 0xafffd7, + 159: 0xafffff, + 160: 0xd70000, + 161: 0xd7005f, + 162: 0xd70087, + 163: 0xd700af, + 164: 0xd700d7, + 165: 0xd700ff, + 166: 0xd75f00, + 167: 0xd75f5f, + 168: 0xd75f87, + 169: 0xd75faf, + 170: 0xd75fd7, + 171: 0xd75fff, + 172: 0xd78700, + 173: 0xd7875f, + 174: 0xd78787, + 175: 0xd787af, + 176: 0xd787d7, + 177: 0xd787ff, + 178: 0xd7af00, + 179: 0xd7af5f, + 180: 0xd7af87, + 181: 0xd7afaf, + 182: 0xd7afd7, + 183: 0xd7afff, + 184: 0xd7d700, + 185: 0xd7d75f, + 186: 0xd7d787, + 187: 0xd7d7af, + 188: 0xd7d7d7, + 189: 0xd7d7ff, + 190: 0xd7ff00, + 191: 0xd7ff5f, + 192: 0xd7ff87, + 193: 0xd7ffaf, + 194: 0xd7ffd7, + 195: 0xd7ffff, + 196: 0xff0000, + 197: 0xff005f, + 198: 0xff0087, + 199: 0xff00af, + 200: 0xff00d7, + 201: 0xff00ff, + 202: 0xff5f00, + 203: 0xff5f5f, + 204: 0xff5f87, + 205: 0xff5faf, + 206: 0xff5fd7, + 207: 0xff5fff, + 208: 0xff8700, + 209: 0xff875f, + 210: 0xff8787, + 211: 0xff87af, + 212: 0xff87d7, + 213: 0xff87ff, + 214: 0xffaf00, + 215: 0xffaf5f, + 216: 0xffaf87, + 217: 0xffafaf, + 218: 0xffafd7, + 219: 0xffafff, + 220: 0xffd700, + 221: 0xffd75f, + 222: 0xffd787, + 223: 0xffd7af, + 224: 0xffd7d7, + 225: 0xffd7ff, + 226: 0xffff00, + 227: 0xffff5f, + 228: 0xffff87, + 229: 0xffffaf, + 230: 0xffffd7, + 231: 0xffffff, + 232: 0x080808, + 233: 0x121212, + 234: 0x1c1c1c, + 235: 0x262626, + 236: 0x303030, + 237: 0x3a3a3a, + 238: 0x444444, + 239: 0x4e4e4e, + 240: 0x585858, + 241: 0x626262, + 242: 0x6c6c6c, + 243: 0x767676, + 244: 0x808080, + 245: 0x8a8a8a, + 246: 0x949494, + 247: 0x9e9e9e, + 248: 0xa8a8a8, + 249: 0xb2b2b2, + 250: 0xbcbcbc, + 251: 0xc6c6c6, + 252: 0xd0d0d0, + 253: 0xdadada, + 254: 0xe4e4e4, + 255: 0xeeeeee, +} + +// `\033]0;TITLESTR\007` +func doTitleSequence(er *bytes.Reader) error { + var c byte + var err error + + c, err = er.ReadByte() + if err != nil { + return err + } + if c != '0' && c != '2' { + return nil + } + c, err = er.ReadByte() + if err != nil { + return err + } + if c != ';' { + return nil + } + title := make([]byte, 0, 80) + for { + c, err = er.ReadByte() + if err != nil { + return err + } + if c == 0x07 || c == '\n' { + break + } + title = append(title, c) + } + if len(title) > 0 { + title8, err := syscall.UTF16PtrFromString(string(title)) + if err == nil { + procSetConsoleTitle.Call(uintptr(unsafe.Pointer(title8))) + } + } + return nil +} + +// Write write data on console +func (w *Writer) Write(data []byte) (n int, err error) { + var csbi consoleScreenBufferInfo + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + + er := bytes.NewReader(data) + var bw [1]byte +loop: + for { + c1, err := er.ReadByte() + if err != nil { + break loop + } + if c1 != 0x1b { + bw[0] = c1 + w.out.Write(bw[:]) + continue + } + c2, err := er.ReadByte() + if err != nil { + break loop + } + + if c2 == ']' { + if err := doTitleSequence(er); err != nil { + break loop + } + continue + } + if c2 != 0x5b { + continue + } + + var buf bytes.Buffer + var m byte + for { + c, err := er.ReadByte() + if err != nil { + break loop + } + if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { + m = c + break + } + buf.Write([]byte(string(c))) + } + + switch m { + case 'A': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.y -= short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'B': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.y += short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'C': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x += short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'D': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x -= short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'E': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x = 0 + csbi.cursorPosition.y += short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'F': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x = 0 + csbi.cursorPosition.y -= short(n) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'G': + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + csbi.cursorPosition.x = short(n - 1) + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'H', 'f': + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + if buf.Len() > 0 { + token := strings.Split(buf.String(), ";") + switch len(token) { + case 1: + n1, err := strconv.Atoi(token[0]) + if err != nil { + continue + } + csbi.cursorPosition.y = short(n1 - 1) + case 2: + n1, err := strconv.Atoi(token[0]) + if err != nil { + continue + } + n2, err := strconv.Atoi(token[1]) + if err != nil { + continue + } + csbi.cursorPosition.x = short(n2 - 1) + csbi.cursorPosition.y = short(n1 - 1) + } + } else { + csbi.cursorPosition.y = 0 + } + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) + case 'J': + n := 0 + if buf.Len() > 0 { + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + } + var count, written dword + var cursor coord + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + switch n { + case 0: + cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} + count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.size.y-csbi.cursorPosition.y)*csbi.size.x) + case 1: + cursor = coord{x: csbi.window.left, y: csbi.window.top} + count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.window.top-csbi.cursorPosition.y)*csbi.size.x) + case 2: + cursor = coord{x: csbi.window.left, y: csbi.window.top} + count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.size.y-csbi.cursorPosition.y)*csbi.size.x) + } + procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + case 'K': + n := 0 + if buf.Len() > 0 { + n, err = strconv.Atoi(buf.String()) + if err != nil { + continue + } + } + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + var cursor coord + var count, written dword + switch n { + case 0: + cursor = coord{x: csbi.cursorPosition.x + 1, y: csbi.cursorPosition.y} + count = dword(csbi.size.x - csbi.cursorPosition.x - 1) + case 1: + cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y} + count = dword(csbi.size.x - csbi.cursorPosition.x) + case 2: + cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y} + count = dword(csbi.size.x) + } + procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) + case 'm': + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + attr := csbi.attributes + cs := buf.String() + if cs == "" { + procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(w.oldattr)) + continue + } + token := strings.Split(cs, ";") + for i := 0; i < len(token); i++ { + ns := token[i] + if n, err = strconv.Atoi(ns); err == nil { + switch { + case n == 0 || n == 100: + attr = w.oldattr + case 1 <= n && n <= 5: + attr |= foregroundIntensity + case n == 7: + attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4) + case n == 22 || n == 25: + attr |= foregroundIntensity + case n == 27: + attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4) + case 30 <= n && n <= 37: + attr &= backgroundMask + if (n-30)&1 != 0 { + attr |= foregroundRed + } + if (n-30)&2 != 0 { + attr |= foregroundGreen + } + if (n-30)&4 != 0 { + attr |= foregroundBlue + } + case n == 38: // set foreground color. + if i < len(token)-2 && (token[i+1] == "5" || token[i+1] == "05") { + if n256, err := strconv.Atoi(token[i+2]); err == nil { + if n256foreAttr == nil { + n256setup() + } + attr &= backgroundMask + attr |= n256foreAttr[n256] + i += 2 + } + } else { + attr = attr & (w.oldattr & backgroundMask) + } + case n == 39: // reset foreground color. + attr &= backgroundMask + attr |= w.oldattr & foregroundMask + case 40 <= n && n <= 47: + attr &= foregroundMask + if (n-40)&1 != 0 { + attr |= backgroundRed + } + if (n-40)&2 != 0 { + attr |= backgroundGreen + } + if (n-40)&4 != 0 { + attr |= backgroundBlue + } + case n == 48: // set background color. + if i < len(token)-2 && token[i+1] == "5" { + if n256, err := strconv.Atoi(token[i+2]); err == nil { + if n256backAttr == nil { + n256setup() + } + attr &= foregroundMask + attr |= n256backAttr[n256] + i += 2 + } + } else { + attr = attr & (w.oldattr & foregroundMask) + } + case n == 49: // reset foreground color. + attr &= foregroundMask + attr |= w.oldattr & backgroundMask + case 90 <= n && n <= 97: + attr = (attr & backgroundMask) + attr |= foregroundIntensity + if (n-90)&1 != 0 { + attr |= foregroundRed + } + if (n-90)&2 != 0 { + attr |= foregroundGreen + } + if (n-90)&4 != 0 { + attr |= foregroundBlue + } + case 100 <= n && n <= 107: + attr = (attr & foregroundMask) + attr |= backgroundIntensity + if (n-100)&1 != 0 { + attr |= backgroundRed + } + if (n-100)&2 != 0 { + attr |= backgroundGreen + } + if (n-100)&4 != 0 { + attr |= backgroundBlue + } + } + procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(attr)) + } + } + case 'h': + var ci consoleCursorInfo + cs := buf.String() + if cs == "5>" { + procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) + ci.visible = 0 + procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) + } else if cs == "?25" { + procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) + ci.visible = 1 + procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) + } + case 'l': + var ci consoleCursorInfo + cs := buf.String() + if cs == "5>" { + procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) + ci.visible = 1 + procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) + } else if cs == "?25" { + procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) + ci.visible = 0 + procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci))) + } + case 's': + procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + w.oldpos = csbi.cursorPosition + case 'u': + procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&w.oldpos))) + } + } + + return len(data), nil +} + +type consoleColor struct { + rgb int + red bool + green bool + blue bool + intensity bool +} + +func (c consoleColor) foregroundAttr() (attr word) { + if c.red { + attr |= foregroundRed + } + if c.green { + attr |= foregroundGreen + } + if c.blue { + attr |= foregroundBlue + } + if c.intensity { + attr |= foregroundIntensity + } + return +} + +func (c consoleColor) backgroundAttr() (attr word) { + if c.red { + attr |= backgroundRed + } + if c.green { + attr |= backgroundGreen + } + if c.blue { + attr |= backgroundBlue + } + if c.intensity { + attr |= backgroundIntensity + } + return +} + +var color16 = []consoleColor{ + {0x000000, false, false, false, false}, + {0x000080, false, false, true, false}, + {0x008000, false, true, false, false}, + {0x008080, false, true, true, false}, + {0x800000, true, false, false, false}, + {0x800080, true, false, true, false}, + {0x808000, true, true, false, false}, + {0xc0c0c0, true, true, true, false}, + {0x808080, false, false, false, true}, + {0x0000ff, false, false, true, true}, + {0x00ff00, false, true, false, true}, + {0x00ffff, false, true, true, true}, + {0xff0000, true, false, false, true}, + {0xff00ff, true, false, true, true}, + {0xffff00, true, true, false, true}, + {0xffffff, true, true, true, true}, +} + +type hsv struct { + h, s, v float32 +} + +func (a hsv) dist(b hsv) float32 { + dh := a.h - b.h + switch { + case dh > 0.5: + dh = 1 - dh + case dh < -0.5: + dh = -1 - dh + } + ds := a.s - b.s + dv := a.v - b.v + return float32(math.Sqrt(float64(dh*dh + ds*ds + dv*dv))) +} + +func toHSV(rgb int) hsv { + r, g, b := float32((rgb&0xFF0000)>>16)/256.0, + float32((rgb&0x00FF00)>>8)/256.0, + float32(rgb&0x0000FF)/256.0 + min, max := minmax3f(r, g, b) + h := max - min + if h > 0 { + if max == r { + h = (g - b) / h + if h < 0 { + h += 6 + } + } else if max == g { + h = 2 + (b-r)/h + } else { + h = 4 + (r-g)/h + } + } + h /= 6.0 + s := max - min + if max != 0 { + s /= max + } + v := max + return hsv{h: h, s: s, v: v} +} + +type hsvTable []hsv + +func toHSVTable(rgbTable []consoleColor) hsvTable { + t := make(hsvTable, len(rgbTable)) + for i, c := range rgbTable { + t[i] = toHSV(c.rgb) + } + return t +} + +func (t hsvTable) find(rgb int) consoleColor { + hsv := toHSV(rgb) + n := 7 + l := float32(5.0) + for i, p := range t { + d := hsv.dist(p) + if d < l { + l, n = d, i + } + } + return color16[n] +} + +func minmax3f(a, b, c float32) (min, max float32) { + if a < b { + if b < c { + return a, c + } else if a < c { + return a, b + } else { + return c, b + } + } else { + if a < c { + return b, c + } else if b < c { + return b, a + } else { + return c, a + } + } +} + +var n256foreAttr []word +var n256backAttr []word + +func n256setup() { + n256foreAttr = make([]word, 256) + n256backAttr = make([]word, 256) + t := toHSVTable(color16) + for i, rgb := range color256 { + c := t.find(rgb) + n256foreAttr[i] = c.foregroundAttr() + n256backAttr[i] = c.backgroundAttr() + } +} diff --git a/vendor/github.com/mattn/go-colorable/noncolorable.go b/vendor/github.com/mattn/go-colorable/noncolorable.go new file mode 100644 index 000000000..9721e16f4 --- /dev/null +++ b/vendor/github.com/mattn/go-colorable/noncolorable.go @@ -0,0 +1,55 @@ +package colorable + +import ( + "bytes" + "io" +) + +// NonColorable hold writer but remove escape sequence. +type NonColorable struct { + out io.Writer +} + +// NewNonColorable return new instance of Writer which remove escape sequence from Writer. +func NewNonColorable(w io.Writer) io.Writer { + return &NonColorable{out: w} +} + +// Write write data on console +func (w *NonColorable) Write(data []byte) (n int, err error) { + er := bytes.NewReader(data) + var bw [1]byte +loop: + for { + c1, err := er.ReadByte() + if err != nil { + break loop + } + if c1 != 0x1b { + bw[0] = c1 + w.out.Write(bw[:]) + continue + } + c2, err := er.ReadByte() + if err != nil { + break loop + } + if c2 != 0x5b { + continue + } + + var buf bytes.Buffer + for { + c, err := er.ReadByte() + if err != nil { + break loop + } + if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { + break + } + buf.Write([]byte(string(c))) + } + } + + return len(data), nil +} diff --git a/vendor/github.com/mattn/go-tty/tty_windows.go b/vendor/github.com/mattn/go-tty/tty_windows.go index f660e6301..cab27987f 100644 --- a/vendor/github.com/mattn/go-tty/tty_windows.go +++ b/vendor/github.com/mattn/go-tty/tty_windows.go @@ -228,6 +228,37 @@ func (tty *TTY) readRune() (rune, error) { return rune(kr.unicodeChar), nil } vk := kr.virtualKeyCode + if kr.controlKeyState&ctrlPressed != 0 { + switch vk { + case 0x21: // ctrl-page-up + tty.rs = []rune{0x5b, 0x35, 0x3B, 0x35, 0x7e} + return rune(0x1b), nil + case 0x22: // ctrl-page-down + tty.rs = []rune{0x5b, 0x36, 0x3B, 0x35, 0x7e} + return rune(0x1b), nil + case 0x23: // ctrl-end + tty.rs = []rune{0x5b, 0x31, 0x3B, 0x35, 0x46} + return rune(0x1b), nil + case 0x24: // ctrl-home + tty.rs = []rune{0x5b, 0x31, 0x3B, 0x35, 0x48} + return rune(0x1b), nil + case 0x25: // ctrl-left + tty.rs = []rune{0x5b, 0x31, 0x3B, 0x35, 0x44} + return rune(0x1b), nil + case 0x26: // ctrl-up + tty.rs = []rune{0x5b, 0x31, 0x3B, 0x35, 0x41} + return rune(0x1b), nil + case 0x27: // ctrl-right + tty.rs = []rune{0x5b, 0x31, 0x3B, 0x35, 0x43} + return rune(0x1b), nil + case 0x28: // ctrl-down + tty.rs = []rune{0x5b, 0x31, 0x3B, 0x35, 0x42} + return rune(0x1b), nil + case 0x2e: // ctrl-delete + tty.rs = []rune{0x5b, 0x33, 0x3B, 0x35, 0x7e} + return rune(0x1b), nil + } + } switch vk { case 0x21: // page-up tty.rs = []rune{0x5b, 0x35, 0x7e} diff --git a/vendor/github.com/mitchellh/cli/.travis.yml b/vendor/github.com/mitchellh/cli/.travis.yml new file mode 100644 index 000000000..b8599b3ac --- /dev/null +++ b/vendor/github.com/mitchellh/cli/.travis.yml @@ -0,0 +1,14 @@ +sudo: false + +language: go + +go: + - "1.8" + - "1.9" + - "1.10" + +branches: + only: + - master + +script: make updatedeps test testrace diff --git a/vendor/github.com/mitchellh/cli/cli.go b/vendor/github.com/mitchellh/cli/cli.go index 61206d6aa..c2dbe55aa 100644 --- a/vendor/github.com/mitchellh/cli/cli.go +++ b/vendor/github.com/mitchellh/cli/cli.go @@ -87,7 +87,7 @@ type CLI struct { // should be set exactly to the binary name that is autocompleted. // // Autocompletion is supported via the github.com/posener/complete - // library. This library supports both bash and zsh. To add support + // library. This library supports bash, zsh and fish. To add support // for other shells, please see that library. // // AutocompleteInstall and AutocompleteUninstall are the global flag @@ -419,6 +419,11 @@ func (c *CLI) initAutocomplete() { func (c *CLI) initAutocompleteSub(prefix string) complete.Command { var cmd complete.Command walkFn := func(k string, raw interface{}) bool { + // Ignore the empty key which can be present for default commands. + if k == "" { + return false + } + // Keep track of the full key so that we can nest further if necessary fullKey := k @@ -646,9 +651,29 @@ func (c *CLI) processArgs() { if c.subcommand == "" && arg != "" && arg[0] != '-' { c.subcommand = arg if c.commandNested { + // If the command has a space in it, then it is invalid. + // Set a blank command so that it fails. + if strings.ContainsRune(arg, ' ') { + c.subcommand = "" + return + } + + // Determine the argument we look to to end subcommands. + // We look at all arguments until one has a space. This + // disallows commands like: ./cli foo "bar baz". An argument + // with a space is always an argument. + j := 0 + for k, v := range c.Args[i:] { + if strings.ContainsRune(v, ' ') { + break + } + + j = i + k + 1 + } + // Nested CLI, the subcommand is actually the entire // arg list up to a flag that is still a valid subcommand. - searchKey := strings.Join(c.Args[i:], " ") + searchKey := strings.Join(c.Args[i:j], " ") k, _, ok := c.commandTree.LongestPrefix(searchKey) if ok { // k could be a prefix that doesn't contain the full diff --git a/vendor/github.com/mitchellh/cli/go.mod b/vendor/github.com/mitchellh/cli/go.mod new file mode 100644 index 000000000..675325ffa --- /dev/null +++ b/vendor/github.com/mitchellh/cli/go.mod @@ -0,0 +1,12 @@ +module github.com/mitchellh/cli + +require ( + github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 + github.com/bgentry/speakeasy v0.1.0 + github.com/fatih/color v1.7.0 + github.com/hashicorp/go-multierror v1.0.0 // indirect + github.com/mattn/go-colorable v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.3 + github.com/posener/complete v1.1.1 + golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc // indirect +) diff --git a/vendor/github.com/mitchellh/cli/go.sum b/vendor/github.com/mitchellh/cli/go.sum new file mode 100644 index 000000000..037087523 --- /dev/null +++ b/vendor/github.com/mitchellh/cli/go.sum @@ -0,0 +1,22 @@ +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357 h1:Rem2+U35z1QtPQc6r+WolF7yXiefXqDKyk+lN2pE164= +github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0 h1:j30noezaCfvNLcdMYSvHLv81DxYRSt1grlpseG67vhU= +github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc h1:MeuS1UDyZyFH++6vVy44PuufTeFF0d0nfI6XB87YGSk= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/mitchellh/cli/ui_colored.go b/vendor/github.com/mitchellh/cli/ui_colored.go index e3d5131d1..b0ec44840 100644 --- a/vendor/github.com/mitchellh/cli/ui_colored.go +++ b/vendor/github.com/mitchellh/cli/ui_colored.go @@ -1,7 +1,11 @@ package cli import ( - "fmt" + "github.com/fatih/color" +) + +const ( + noColor = -1 ) // UiColor is a posix shell color code to use. @@ -12,13 +16,13 @@ type UiColor struct { // A list of colors that are useful. These are all non-bolded by default. var ( - UiColorNone UiColor = UiColor{-1, false} - UiColorRed = UiColor{31, false} - UiColorGreen = UiColor{32, false} - UiColorYellow = UiColor{33, false} - UiColorBlue = UiColor{34, false} - UiColorMagenta = UiColor{35, false} - UiColorCyan = UiColor{36, false} + UiColorNone UiColor = UiColor{noColor, false} + UiColorRed = UiColor{int(color.FgHiRed), false} + UiColorGreen = UiColor{int(color.FgHiGreen), false} + UiColorYellow = UiColor{int(color.FgHiYellow), false} + UiColorBlue = UiColor{int(color.FgHiBlue), false} + UiColorMagenta = UiColor{int(color.FgHiMagenta), false} + UiColorCyan = UiColor{int(color.FgHiCyan), false} ) // ColoredUi is a Ui implementation that colors its output according @@ -55,15 +59,15 @@ func (u *ColoredUi) Warn(message string) { u.Ui.Warn(u.colorize(message, u.WarnColor)) } -func (u *ColoredUi) colorize(message string, color UiColor) string { - if color.Code == -1 { +func (u *ColoredUi) colorize(message string, uc UiColor) string { + if uc.Code == noColor { return message } - attr := 0 - if color.Bold { - attr = 1 + attr := []color.Attribute{color.Attribute(uc.Code)} + if uc.Bold { + attr = append(attr, color.Bold) } - return fmt.Sprintf("\033[%d;%dm%s\033[0m", attr, color.Code, message) + return color.New(attr...).SprintFunc()(message) } diff --git a/vendor/github.com/mitchellh/mapstructure/.travis.yml b/vendor/github.com/mitchellh/mapstructure/.travis.yml new file mode 100644 index 000000000..d9deadb86 --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/.travis.yml @@ -0,0 +1,8 @@ +language: go + +go: + - 1.9.x + - tip + +script: + - go test diff --git a/vendor/github.com/mitchellh/reflectwalk/.travis.yml b/vendor/github.com/mitchellh/reflectwalk/.travis.yml new file mode 100644 index 000000000..4f2ee4d97 --- /dev/null +++ b/vendor/github.com/mitchellh/reflectwalk/.travis.yml @@ -0,0 +1 @@ +language: go diff --git a/vendor/github.com/mitchellh/reflectwalk/go.mod b/vendor/github.com/mitchellh/reflectwalk/go.mod new file mode 100644 index 000000000..52bb7c469 --- /dev/null +++ b/vendor/github.com/mitchellh/reflectwalk/go.mod @@ -0,0 +1 @@ +module github.com/mitchellh/reflectwalk diff --git a/vendor/github.com/mitchellh/reflectwalk/location.go b/vendor/github.com/mitchellh/reflectwalk/location.go index 7c59d764c..6a7f17611 100644 --- a/vendor/github.com/mitchellh/reflectwalk/location.go +++ b/vendor/github.com/mitchellh/reflectwalk/location.go @@ -11,6 +11,8 @@ const ( MapValue Slice SliceElem + Array + ArrayElem Struct StructField WalkLoc diff --git a/vendor/github.com/mitchellh/reflectwalk/location_string.go b/vendor/github.com/mitchellh/reflectwalk/location_string.go index d3cfe8545..70760cf4c 100644 --- a/vendor/github.com/mitchellh/reflectwalk/location_string.go +++ b/vendor/github.com/mitchellh/reflectwalk/location_string.go @@ -1,15 +1,15 @@ -// generated by stringer -type=Location location.go; DO NOT EDIT +// Code generated by "stringer -type=Location location.go"; DO NOT EDIT. package reflectwalk import "fmt" -const _Location_name = "NoneMapMapKeyMapValueSliceSliceElemStructStructFieldWalkLoc" +const _Location_name = "NoneMapMapKeyMapValueSliceSliceElemArrayArrayElemStructStructFieldWalkLoc" -var _Location_index = [...]uint8{0, 4, 7, 13, 21, 26, 35, 41, 52, 59} +var _Location_index = [...]uint8{0, 4, 7, 13, 21, 26, 35, 40, 49, 55, 66, 73} func (i Location) String() string { - if i+1 >= Location(len(_Location_index)) { + if i >= Location(len(_Location_index)-1) { return fmt.Sprintf("Location(%d)", i) } return _Location_name[_Location_index[i]:_Location_index[i+1]] diff --git a/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go b/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go index 1f2066598..d7ab7b6d7 100644 --- a/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go +++ b/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go @@ -5,6 +5,7 @@ package reflectwalk import ( + "errors" "reflect" ) @@ -18,6 +19,12 @@ type PrimitiveWalker interface { Primitive(reflect.Value) error } +// InterfaceWalker implementations are able to handle interface values as they +// are encountered during the walk. +type InterfaceWalker interface { + Interface(reflect.Value) error +} + // MapWalker implementations are able to handle individual elements // found within a map structure. type MapWalker interface { @@ -32,6 +39,13 @@ type SliceWalker interface { SliceElem(int, reflect.Value) error } +// ArrayWalker implementations are able to handle array elements found +// within complex structures. +type ArrayWalker interface { + Array(reflect.Value) error + ArrayElem(int, reflect.Value) error +} + // StructWalker is an interface that has methods that are called for // structs when a Walk is done. type StructWalker interface { @@ -55,6 +69,14 @@ type PointerWalker interface { PointerExit(bool) error } +// SkipEntry can be returned from walk functions to skip walking +// the value of this field. This is only valid in the following functions: +// +// - Struct: skips all fields from being walked +// - StructField: skips walking the struct value +// +var SkipEntry = errors.New("skip this entry") + // Walk takes an arbitrary value and an interface and traverses the // value, calling callbacks on the interface if they are supported. // The interface should implement one or more of the walker interfaces @@ -79,23 +101,63 @@ func Walk(data, walker interface{}) (err error) { func walk(v reflect.Value, w interface{}) (err error) { // Determine if we're receiving a pointer and if so notify the walker. + // The logic here is convoluted but very important (tests will fail if + // almost any part is changed). I will try to explain here. + // + // First, we check if the value is an interface, if so, we really need + // to check the interface's VALUE to see whether it is a pointer. + // + // Check whether the value is then a pointer. If so, then set pointer + // to true to notify the user. + // + // If we still have a pointer or an interface after the indirections, then + // we unwrap another level + // + // At this time, we also set "v" to be the dereferenced value. This is + // because once we've unwrapped the pointer we want to use that value. pointer := false - if v.Kind() == reflect.Ptr { - pointer = true - v = reflect.Indirect(v) - } - if pw, ok := w.(PointerWalker); ok { - if err = pw.PointerEnter(pointer); err != nil { - return + pointerV := v + + for { + if pointerV.Kind() == reflect.Interface { + if iw, ok := w.(InterfaceWalker); ok { + if err = iw.Interface(pointerV); err != nil { + return + } + } + + pointerV = pointerV.Elem() } - defer func() { - if err != nil { + if pointerV.Kind() == reflect.Ptr { + pointer = true + v = reflect.Indirect(pointerV) + } + if pw, ok := w.(PointerWalker); ok { + if err = pw.PointerEnter(pointer); err != nil { return } - err = pw.PointerExit(pointer) - }() + defer func(pointer bool) { + if err != nil { + return + } + + err = pw.PointerExit(pointer) + }(pointer) + } + + if pointer { + pointerV = v + } + pointer = false + + // If we still have a pointer or interface we have to indirect another level. + switch pointerV.Kind() { + case reflect.Ptr, reflect.Interface: + continue + } + break } // We preserve the original value here because if it is an interface @@ -125,6 +187,9 @@ func walk(v reflect.Value, w interface{}) (err error) { case reflect.Struct: err = walkStruct(v, w) return + case reflect.Array: + err = walkArray(v, w) + return default: panic("unsupported type: " + k.String()) } @@ -232,42 +297,99 @@ func walkSlice(v reflect.Value, w interface{}) (err error) { return nil } +func walkArray(v reflect.Value, w interface{}) (err error) { + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(Array) + } + + if aw, ok := w.(ArrayWalker); ok { + if err := aw.Array(v); err != nil { + return err + } + } + + for i := 0; i < v.Len(); i++ { + elem := v.Index(i) + + if aw, ok := w.(ArrayWalker); ok { + if err := aw.ArrayElem(i, elem); err != nil { + return err + } + } + + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(ArrayElem) + } + + if err := walk(elem, w); err != nil { + return err + } + + if ok { + ew.Exit(ArrayElem) + } + } + + ew, ok = w.(EnterExitWalker) + if ok { + ew.Exit(Array) + } + + return nil +} + func walkStruct(v reflect.Value, w interface{}) (err error) { ew, ewok := w.(EnterExitWalker) if ewok { ew.Enter(Struct) } + skip := false if sw, ok := w.(StructWalker); ok { - if err = sw.Struct(v); err != nil { + err = sw.Struct(v) + if err == SkipEntry { + skip = true + err = nil + } + if err != nil { return } } - vt := v.Type() - for i := 0; i < vt.NumField(); i++ { - sf := vt.Field(i) - f := v.FieldByIndex([]int{i}) + if !skip { + vt := v.Type() + for i := 0; i < vt.NumField(); i++ { + sf := vt.Field(i) + f := v.FieldByIndex([]int{i}) - if sw, ok := w.(StructWalker); ok { - err = sw.StructField(sf, f) + if sw, ok := w.(StructWalker); ok { + err = sw.StructField(sf, f) + + // SkipEntry just pretends this field doesn't even exist + if err == SkipEntry { + continue + } + + if err != nil { + return + } + } + + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(StructField) + } + + err = walk(f, w) if err != nil { return } - } - ew, ok := w.(EnterExitWalker) - if ok { - ew.Enter(StructField) - } - - err = walk(f, w) - if err != nil { - return - } - - if ok { - ew.Exit(StructField) + if ok { + ew.Exit(StructField) + } } } diff --git a/vendor/github.com/moul/anonuuid/.gitignore b/vendor/github.com/moul/anonuuid/.gitignore new file mode 100644 index 000000000..8124bf789 --- /dev/null +++ b/vendor/github.com/moul/anonuuid/.gitignore @@ -0,0 +1,28 @@ +anonuuid + +/dist + +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/moul/anonuuid/.godir b/vendor/github.com/moul/anonuuid/.godir new file mode 100644 index 000000000..ea28ac285 --- /dev/null +++ b/vendor/github.com/moul/anonuuid/.godir @@ -0,0 +1 @@ +github.com/moul/anonuuid diff --git a/vendor/github.com/moul/anonuuid/.goxc.json b/vendor/github.com/moul/anonuuid/.goxc.json new file mode 100644 index 000000000..16f0b4589 --- /dev/null +++ b/vendor/github.com/moul/anonuuid/.goxc.json @@ -0,0 +1,12 @@ +{ + "AppName": "anonuuid", + "ArtifactsDest": "dist", + "OutPath": "{{.Dest}}{{.PS}}{{.Version}}{{.PS}}{{.Os}}_{{.Arch}}{{.PS}}{{.ExeName}}{{.Ext}}", + "TasksExclude": [ + "go-test", + "go-vet" + ], + "MainDirsExclude": "vendor,Godeps,testdata", + "PackageVersion": "1.0", + "ConfigVersion": "0.9" +} diff --git a/vendor/github.com/moul/anonuuid/.travis.yml b/vendor/github.com/moul/anonuuid/.travis.yml new file mode 100644 index 000000000..94f52d1b6 --- /dev/null +++ b/vendor/github.com/moul/anonuuid/.travis.yml @@ -0,0 +1,30 @@ +language: go + + +go: +- 1.3 +- 1.4 +- 1.5 +- tip + + +matrix: + allow_failures: + - go: tip + + +before_install: +- go get -u github.com/axw/gocov/gocov +- go get -u github.com/mattn/goveralls +- go get golang.org/x/tools/cmd/cover + + +#install: +#- go get -d -v -t ./... + + +script: +- go build -v ./cmd/... +- go test -v ./ +- go test -covermode=count -coverprofile=profile.out . +- goveralls -covermode=count -service=travis-ci -v -coverprofile=profile.out diff --git a/vendor/github.com/moul/gotty-client/.gitignore b/vendor/github.com/moul/gotty-client/.gitignore new file mode 100644 index 000000000..ef713932b --- /dev/null +++ b/vendor/github.com/moul/gotty-client/.gitignore @@ -0,0 +1,27 @@ +/gotty-client +/dist + +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/moul/gotty-client/.goxc.json b/vendor/github.com/moul/gotty-client/.goxc.json new file mode 100644 index 000000000..3c3675a6e --- /dev/null +++ b/vendor/github.com/moul/gotty-client/.goxc.json @@ -0,0 +1,13 @@ +{ + "AppName": "gotty-client", + "ArtifactsDest": "dist", + "BuildConstraints": "!plan9,!nacl,!solaris", + "OutPath": "{{.Dest}}{{.PS}}{{.Version}}{{.PS}}{{.ExeName}}_{{.Version}}_{{.Os}}_{{.Arch}}{{.Ext}}", + "TasksExclude": [ + "go-test", + "go-vet" + ], + "MainDirsExclude": "vendor,Godeps,testdata", + "PackageVersion": "1.6.1+dev", + "ConfigVersion": "0.9" +} diff --git a/vendor/github.com/moul/gotty-client/.travis.yml b/vendor/github.com/moul/gotty-client/.travis.yml new file mode 100644 index 000000000..d0ae7abcb --- /dev/null +++ b/vendor/github.com/moul/gotty-client/.travis.yml @@ -0,0 +1,14 @@ +language: go + +go: +- 1.7 +- 1.8 +- tip + +matrix: + allow_failures: + - go: tip + +script: +- go build ./cmd/... +- go run ./cmd/gotty-client/main.go --help || true diff --git a/vendor/github.com/nu7hatch/gouuid/.gitignore b/vendor/github.com/nu7hatch/gouuid/.gitignore new file mode 100644 index 000000000..f9d9cd8ab --- /dev/null +++ b/vendor/github.com/nu7hatch/gouuid/.gitignore @@ -0,0 +1,11 @@ +_obj +_test +*.6 +*.out +_testmain.go +\#* +.\#* +*.log +_cgo* +*.o +*.a diff --git a/vendor/github.com/olekukonko/tablewriter/.travis.yml b/vendor/github.com/olekukonko/tablewriter/.travis.yml new file mode 100644 index 000000000..f156b3b87 --- /dev/null +++ b/vendor/github.com/olekukonko/tablewriter/.travis.yml @@ -0,0 +1,12 @@ +language: go + +go: + - 1.1 + - 1.2 + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - 1.7 + - 1.8 + - tip diff --git a/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md b/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md deleted file mode 100644 index 5818eef9b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md +++ /dev/null @@ -1,117 +0,0 @@ -# CHANGELOG - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/) - -## 1.8.0 - 2018-06-28 -### Added -- Support for service gateway management in the Networking service -- Support for backup and clone of boot volumes in the Block Storage service - -## 1.7.0 - 2018-06-14 -### Added -- Support for the Container Engine service. A sample showing how to use this service from the SDK is available [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_containerengine_test.go) - -### Fixed -- Empty string was send to backend service for optional enum if it's not set - -## 1.6.0 - 2018-05-31 -### Added -- Support for the "soft shutdown" instance action in the Compute service -- Support for Auth Token management in the Identity service -- Support for backup or clone of multiple volumes at once using volume groups in the Block Storage service -- Support for launching a database system from a backup in the Database service - -### Breaking changes -- ``LaunchDbSystemDetails`` is renamed to ``LaunchDbSystemBase`` and the type changed from struct to interface in ``LaunchDbSystemRequest``. Here is sample code that shows how to update your code to incorporate this change. - - - Before - - ```golang - // create a LaunchDbSystemRequest - // There were two ways to initialize the LaunchDbSystemRequest struct. - // This breaking change only impact option #2 - request := database.LaunchDbSystemRequest{} - - // #1. explicity create LaunchDbSystemDetails struct (No impact) - details := database.LaunchDbSystemDetails{} - details.AvailabilityDomain = common.String(validAD()) - details.CompartmentId = common.String(getCompartmentID()) - // ... other properties - request.LaunchDbSystemDetails = details - - // #2. use anonymous fields (Will break) - request.AvailabilityDomain = common.String(validAD()) - request.CompartmentId = common.String(getCompartmentID()) - // ... - ``` - - - After - - ```golang - // create a LaunchDbSystemRequest - request := database.LaunchDbSystemRequest{} - details := database.LaunchDbSystemDetails{} - details.AvailabilityDomain = common.String(validAD()) - details.CompartmentId = common.String(getCompartmentID()) - // ... other properties - - // set the details to LaunchDbSystemBase - request.LaunchDbSystemBase = details - // ... - ``` - -## 1.5.0 - 2018-05-17 -### Added -- ~~Support for backup or clone of multiple volumes at once using volume groups in the Block Storage service~~ -- Support for the ability to optionally specify a compartment filter when listing exports in the File Storage service -- Support for tagging virtual cloud network resources in the Networking service -- Support for specifying the PARAVIRTUALIZED remote volume type when creating a virtual image or launching a new instance in the Compute service -- Support for tilde in private key path in configuration files - -## 1.4.0 - 2018-05-03 -### Added -- Support for ``event_name`` in Audit Service -- Support for multiple ``hostnames`` for loadbalancer listener in LoadBalance service -- Support for auto-generating opc-request-id for all operations -- Add opc-request-id property for all requests except for Object Storage which use opc-client-request-id - -## 1.3.0 - 2018-04-19 -### Added -- Support for retry on OCI service APIs. Example can be found on [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_retry_test.go) -- Support for tagging DbSystem and Database resources in the Database Service -- Support for filtering by DbSystemId in ListDbVersions operation in Database Service - -### Fixed -- Fixed a request signing bug for PatchZoneRecords API -- Fixed a bug in DebugLn - -## 1.2.0 - 2018-04-05 -### Added -- Support for Email Delivery Service. Example can be found on [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_email_test.go) -- Support for paravirtualized volume attachments in Core Services -- Support for remote VCN peering across regions -- Support for variable size boot volumes in Core Services -- Support for SMTP credentials in the Identity Service -- Support for tagging Bucket resources in the Object Storage Service - -## 1.1.0 - 2018-03-27 -### Added -- Support for DNS service -- Support for File Storage service -- Support for PathRouteSets and Listeners in Load Balancing service -- Support for Public IPs in Core Services -- Support for Dynamic Groups in Identity service -- Support for tagging in Core Services and Identity service. Example can be found on [Github](https://github.com/oracle/oci-go-sdk/tree/master/example/example_tagging_test.go) -- Fix ComposingConfigurationProvider to not accept a nil ConfigurationProvider -- Support for passphrase configuration to FileConfiguration provider - -## 1.0.0 - 2018-02-28 Initial Release -### Added -- Support for Audit service -- Support for Core Services (Networking, Compute, Block Volume) -- Support for Database service -- Support for IAM service -- Support for Load Balancing service -- Support for Object Storage service diff --git a/vendor/github.com/oracle/oci-go-sdk/CONTRIBUTING.md b/vendor/github.com/oracle/oci-go-sdk/CONTRIBUTING.md deleted file mode 100644 index 31e4b6c60..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/CONTRIBUTING.md +++ /dev/null @@ -1,24 +0,0 @@ -# Contributing to the Oracle Cloud Infrastructure Go SDK - -*Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.* - -Pull requests can be made under -[The Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html) -(OCA). - -For pull requests to be accepted, the bottom of -your commit message must have the following line using your name and -e-mail address as it appears in the OCA Signatories list. - -``` -Signed-off-by: Your Name -``` - -This can be automatically added to pull requests by committing with: - -``` -git commit --signoff -```` - -Only pull requests from committers that can be verified as having -signed the OCA can be accepted. \ No newline at end of file diff --git a/vendor/github.com/oracle/oci-go-sdk/Makefile b/vendor/github.com/oracle/oci-go-sdk/Makefile deleted file mode 100644 index b717249de..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -DOC_SERVER_URL=https:\/\/docs.us-phoenix-1.oraclecloud.com - -GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine -NON_GEN_TARGETS = common common/auth -TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS) - -TARGETS_WITH_TESTS = common common/auth -TARGETS_BUILD = $(patsubst %,build-%, $(TARGETS)) -TARGETS_CLEAN = $(patsubst %,clean-%, $(GEN_TARGETS)) -TARGETS_LINT = $(patsubst %,lint-%, $(TARGETS)) -TARGETS_TEST = $(patsubst %,test-%, $(TARGETS_WITH_TESTS)) -TARGETS_RELEASE= $(patsubst %,release-%, $(TARGETS)) -GOLINT=$(GOPATH)/bin/golint -LINT_FLAGS=-min_confidence 0.9 -set_exit_status - - -.PHONY: $(TARGETS_BUILD) $(TARGET_TEST) - -build: lint $(TARGETS_BUILD) - -test: build $(TARGETS_TEST) - -lint: $(TARGETS_LINT) - -clean: $(TARGETS_CLEAN) - -$(TARGETS_LINT): lint-%:% - @echo "linting and formatting: $<" - @(cd $< && gofmt -s -w .) - @if [ \( $< = common \) -o \( $< = common/auth \) ]; then\ - (cd $< && $(GOLINT) -set_exit_status .);\ - else\ - (cd $< && $(GOLINT) $(LINT_FLAGS) .);\ - fi - -$(TARGETS_BUILD): build-%:% - @echo "building: $<" - @(cd $< && find . -name '*_integ_test.go' | xargs -I{} mv {} ../integtest) - @(cd $< && go build -v) - -$(TARGETS_TEST): test-%:% - @(cd $< && go test -v) - -$(TARGETS_CLEAN): clean-%:% - @echo "cleaning $<" - @-rm -rf $< - -# clean all generated code under GEN_TARGETS folder -clean-generate: - for target in ${GEN_TARGETS}; do \ - echo "cleaning $$target"; \ - rm -rf $$target; \ - done - -pre-doc: - @echo "Rendering doc server to ${DOC_SERVER_URL}" - find . -name \*.go |xargs sed -i '' 's/{{DOC_SERVER_URL}}/${DOC_SERVER_URL}/g' - -gen-version: - go generate -x - -release: gen-version build pre-doc diff --git a/vendor/github.com/oracle/oci-go-sdk/README.md b/vendor/github.com/oracle/oci-go-sdk/README.md deleted file mode 100644 index 4065a1529..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Oracle Cloud Infrastructure Golang SDK -[![wercker status](https://app.wercker.com/status/09bc4818e7b1d70b04285331a9bdbc41/s/master "wercker status")](https://app.wercker.com/project/byKey/09bc4818e7b1d70b04285331a9bdbc41) - -This is the Go SDK for Oracle Cloud Infrastructure. This project is open source and maintained by Oracle Corp. -The home page for the project is [here](https://godoc.org/github.com/oracle/oci-go-sdk/). ->***WARNING:***: To avoid automatically consuming breaking changes if we have to rev the major version of the Go SDK, -please consider using the [Go dependency management tool](https://github.com/golang/dep), or vendoring the SDK. -This will allow you to pin to a specific version of the Go SDK in your project, letting you control how and when you move to the next major version. - -## Dependencies -- Install [Go programming language](https://golang.org/dl/). -- Install [GNU Make](https://www.gnu.org/software/make/), using the package manager or binary distribution tool appropriate for your platform. - - - -## Installing -Use the following command to install this SDK: - -``` -go get -u github.com/oracle/oci-go-sdk -``` -Alternatively you can git clone this repo. - -## Working with the Go SDK -To start working with the Go SDK, you import the service package, create a client, and then use that client to make calls. - -### Configuring -Before using the SDK, set up a config file with the required credentials. See [SDK and Tool Configuration](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm) for instructions. - -Once a config file has been setup, call `common.DefaultConfigProvider()` function as follows: - - ```go - // Import necessary packages - import ( - "github.com/oracle/oci-go-sdk/common" - "github.com/oracle/oci-go-sdk/identity" // Identity or any other service you wish to make requests to -) - - //... - -configProvider := common.DefaultConfigProvider() -``` - - Or, to configure the SDK programmatically instead, implement the `ConfigurationProvider` interface shown below: - ```go -// ConfigurationProvider wraps information about the account owner -type ConfigurationProvider interface { - KeyProvider - TenancyOCID() (string, error) - UserOCID() (string, error) - KeyFingerprint() (string, error) - Region() (string, error) -} -``` - -### Making a request -To make a request to an OCI service, create a client for the service and then use the client to call a function from the service. - -- *Creating a client*: All packages provide a function to create clients, using the naming convention `NewClientWithConfigurationProvider`, -such as `NewVirtualNetworkClientWithConfigurationProvider` or `NewIdentityClientWithConfigurationProvider`. To create a new client, -pass a struct that conforms to the `ConfigurationProvider` interface, or use the `DefaultConfigProvider()` function in the common package. - -For example: -```go -config := common.DefaultConfigProvider() -client, err := identity.NewIdentityClientWithConfigurationProvider(config) -if err != nil { - panic(err) -} -``` - -- *Making calls*: After successfully creating a client, requests can now be made to the service. Generally all functions associated with an operation -accept [`context.Context`](https://golang.org/pkg/context/) and a struct that wraps all input parameters. The functions then return a response struct -that contains the desired data, and an error struct that describes the error if an error occurs. - -For example: -```go -id := "your_group_id" -response, err := client.GetGroup(context.Background(), identity.GetGroupRequest{GroupId:&id}) -if err != nil { - //Something happened - panic(err) -} -//Process the data in response struct -fmt.Println("Group's name is:", response.Name) -``` - -## Organization of the SDK -The `oci-go-sdk` contains the following: -- **Service packages**: All packages except `common` and any other package found inside `cmd`. These packages represent -the Oracle Cloud Infrastructure services supported by the Go SDK. Each package represents a service. -These packages include methods to interact with the service, structs that model -input and output parameters, and a client struct that acts as receiver for the above methods. - -- **Common package**: Found in the `common` directory. The common package provides supporting functions and structs used by service packages. -Includes HTTP request/response (de)serialization, request signing, JSON parsing, pointer to reference and other helper functions. Most of the functions -in this package are meant to be used by the service packages. - -- **cmd**: Internal tools used by the `oci-go-sdk`. - -## Examples -Examples can be found [here](https://github.com/oracle/oci-go-sdk/tree/master/example) - -## Documentation -Full documentation can be found [on the godocs site](https://godoc.org/github.com/oracle/oci-go-sdk/). - -## Help -* The [Issues](https://github.com/oracle/oci-go-sdk/issues) page of this GitHub repository. -* [Stack Overflow](https://stackoverflow.com/), use the [oracle-cloud-infrastructure](https://stackoverflow.com/questions/tagged/oracle-cloud-infrastructure) and [oci-go-sdk](https://stackoverflow.com/questions/tagged/oci-go-sdk) tags in your post. -* [Developer Tools](https://community.oracle.com/community/cloud_computing/bare-metal/content?filterID=contentstatus%5Bpublished%5D~category%5Bdeveloper-tools%5D&filterID=contentstatus%5Bpublished%5D~objecttype~objecttype%5Bthread%5D) of the Oracle Cloud forums. -* [My Oracle Support](https://support.oracle.com). - - -## Contributing -`oci-go-sdk` is an open source project. See [CONTRIBUTING](/CONTRIBUTING.md) for details. - -Oracle gratefully acknowledges the contributions to oci-go-sdk that have been made by the community. - - -## License -Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - -This SDK and sample is dual licensed under the Universal Permissive License 1.0 and the Apache License 2.0. - -See [LICENSE](/LICENSE.txt) for more details. - -## Changes -See [CHANGELOG](/CHANGELOG.md). - -## Known Issues -You can find information on any known issues with the SDK here and under the [Issues](https://github.com/oracle/oci-go-sdk/issues) tab of this project's GitHub repository. - -## Building and testing -### Dev dependencies -- Install [Testify](https://github.com/stretchr/testify) with the command: -```sh -go get github.com/stretchr/testify -``` -- Install [go lint](https://github.com/golang/lint) with the command: -``` -go get -u github.com/golang/lint/golint -``` -### Build -Building is provided by the make file at the root of the project. To build the project execute. - -``` -make build -``` - -To run the tests: -``` -make test -``` diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go b/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go deleted file mode 100644 index e9c07f183..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Audit API -// -// API for the Audit Service. You can use this API for queries, but not bulk-export operations. -// - -package audit - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -//AuditClient a client for Audit -type AuditClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewAuditClientWithConfigurationProvider Creates a new default Audit client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewAuditClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client AuditClient, err error) { - baseClient, err := common.NewClientWithConfig(configProvider) - if err != nil { - return - } - - client = AuditClient{BaseClient: baseClient} - client.BasePath = "20160918" - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *AuditClient) SetRegion(region string) { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "audit", region) -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *AuditClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { - if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { - return err - } - - // Error has been checked already - region, _ := configProvider.Region() - client.SetRegion(region) - client.config = &configProvider - return nil -} - -// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set -func (client *AuditClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// GetConfiguration Get the configuration -func (client AuditClient) GetConfiguration(ctx context.Context, request GetConfigurationRequest) (response GetConfigurationResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getConfiguration, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetConfigurationResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetConfigurationResponse") - } - return -} - -// getConfiguration implements the OCIOperation interface (enables retrying operations) -func (client AuditClient) getConfiguration(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/configuration") - if err != nil { - return nil, err - } - - var response GetConfigurationResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListEvents Returns all audit events for the specified compartment that were processed within the specified time range. -func (client AuditClient) ListEvents(ctx context.Context, request ListEventsRequest) (response ListEventsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listEvents, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListEventsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListEventsResponse") - } - return -} - -// listEvents implements the OCIOperation interface (enables retrying operations) -func (client AuditClient) listEvents(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/auditEvents") - if err != nil { - return nil, err - } - - var response ListEventsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateConfiguration Update the configuration -func (client AuditClient) UpdateConfiguration(ctx context.Context, request UpdateConfigurationRequest) (response UpdateConfigurationResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateConfiguration, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateConfigurationResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateConfigurationResponse") - } - return -} - -// updateConfiguration implements the OCIOperation interface (enables retrying operations) -func (client AuditClient) updateConfiguration(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/configuration") - if err != nil { - return nil, err - } - - var response UpdateConfigurationResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go b/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go deleted file mode 100644 index 2887502ce..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Audit API -// -// API for the Audit Service. You can use this API for queries, but not bulk-export operations. -// - -package audit - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// AuditEvent The representation of AuditEvent -type AuditEvent struct { - - // The OCID of the tenant. - TenantId *string `mandatory:"false" json:"tenantId"` - - // The OCID of the compartment. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The GUID of the event. - EventId *string `mandatory:"false" json:"eventId"` - - // The name of the event. - // Example: `LaunchInstance` - EventName *string `mandatory:"false" json:"eventName"` - - // The source of the event. - EventSource *string `mandatory:"false" json:"eventSource"` - - // The type of the event. - EventType *string `mandatory:"false" json:"eventType"` - - // The time the event occurred, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. - EventTime *common.SDKTime `mandatory:"false" json:"eventTime"` - - // The OCID of the user whose action triggered the event. - PrincipalId *string `mandatory:"false" json:"principalId"` - - // The credential ID of the user. This value is extracted from the HTTP 'Authorization' request header. It consists of the tenantId, userId, and user fingerprint, all delimited by a slash (/). - CredentialId *string `mandatory:"false" json:"credentialId"` - - // The HTTP method of the request. - RequestAction *string `mandatory:"false" json:"requestAction"` - - // The opc-request-id of the request. - RequestId *string `mandatory:"false" json:"requestId"` - - // The user agent of the client that made the request. - RequestAgent *string `mandatory:"false" json:"requestAgent"` - - // The HTTP header fields and values in the request. - RequestHeaders map[string][]string `mandatory:"false" json:"requestHeaders"` - - // The IP address of the source of the request. - RequestOrigin *string `mandatory:"false" json:"requestOrigin"` - - // The query parameter fields and values for the request. - RequestParameters map[string][]string `mandatory:"false" json:"requestParameters"` - - // The resource targeted by the request. - RequestResource *string `mandatory:"false" json:"requestResource"` - - // The headers of the response. - ResponseHeaders map[string][]string `mandatory:"false" json:"responseHeaders"` - - // The status code of the response. - ResponseStatus *string `mandatory:"false" json:"responseStatus"` - - // The time of the response to the audited request, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. - ResponseTime *common.SDKTime `mandatory:"false" json:"responseTime"` - - // Metadata of interest from the response payload. For example, the OCID of a resource. - ResponsePayload map[string]interface{} `mandatory:"false" json:"responsePayload"` -} - -func (m AuditEvent) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/configuration.go b/vendor/github.com/oracle/oci-go-sdk/audit/configuration.go deleted file mode 100644 index 35d0c9b07..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/audit/configuration.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Audit API -// -// API for the Audit Service. You can use this API for queries, but not bulk-export operations. -// - -package audit - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Configuration The representation of Configuration -type Configuration struct { - - // The retention period days - RetentionPeriodDays *int `mandatory:"false" json:"retentionPeriodDays"` -} - -func (m Configuration) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go deleted file mode 100644 index b6afa90f7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package audit - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetConfigurationRequest wrapper for the GetConfiguration operation -type GetConfigurationRequest struct { - - // ID of the root compartment (tenancy) - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetConfigurationRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetConfigurationRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetConfigurationRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetConfigurationResponse wrapper for the GetConfiguration operation -type GetConfigurationResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Configuration instance - Configuration `presentIn:"body"` -} - -func (response GetConfigurationResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetConfigurationResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go b/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go deleted file mode 100644 index 568e935e0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package audit - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListEventsRequest wrapper for the ListEvents operation -type ListEventsRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // Returns events that were processed at or after this start date and time, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. - // For example, a start value of `2017-01-15T11:30:00Z` will retrieve a list of all events processed since 30 minutes after the 11th hour of January 15, 2017, in Coordinated Universal Time (UTC). - // You can specify a value with granularity to the minute. Seconds (and milliseconds, if included) must be set to `0`. - StartTime *common.SDKTime `mandatory:"true" contributesTo:"query" name:"startTime"` - - // Returns events that were processed before this end date and time, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. For example, a start value of `2017-01-01T00:00:00Z` and an end value of `2017-01-02T00:00:00Z` will retrieve a list of all events processed on January 1, 2017. - // Similarly, a start value of `2017-01-01T00:00:00Z` and an end value of `2017-02-01T00:00:00Z` will result in a list of all events processed between January 1, 2017 and January 31, 2017. - // You can specify a value with granularity to the minute. Seconds (and milliseconds, if included) must be set to `0`. - EndTime *common.SDKTime `mandatory:"true" contributesTo:"query" name:"endTime"` - - // The value of the `opc-next-page` response header from the previous list query. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListEventsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListEventsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListEventsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListEventsResponse wrapper for the ListEvents operation -type ListEventsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []AuditEvent instances - Items []AuditEvent `presentIn:"body"` - - // For pagination of a list of audit events. When this header appears in the response, - // it means you received a partial list and there are more results. - // Include this value as the `page` parameter for the subsequent ListEvents request to get the next batch of events. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListEventsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListEventsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_details.go deleted file mode 100644 index a1129293b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Audit API -// -// API for the Audit Service. You can use this API for queries, but not bulk-export operations. -// - -package audit - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateConfigurationDetails The representation of UpdateConfigurationDetails -type UpdateConfigurationDetails struct { - - // The retention period days - RetentionPeriodDays *int `mandatory:"false" json:"retentionPeriodDays"` -} - -func (m UpdateConfigurationDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go deleted file mode 100644 index d6d9ed1ea..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package audit - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateConfigurationRequest wrapper for the UpdateConfiguration operation -type UpdateConfigurationRequest struct { - - // ID of the root compartment (tenancy) - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The configuration properties - UpdateConfigurationDetails `contributesTo:"body"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateConfigurationRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateConfigurationRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateConfigurationRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateConfigurationResponse wrapper for the UpdateConfiguration operation -type UpdateConfigurationResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response UpdateConfigurationResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateConfigurationResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go b/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go deleted file mode 100644 index f9fc03c9f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go +++ /dev/null @@ -1,40 +0,0 @@ -package main - -const versionTemplate = ` -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated by go generate; DO NOT EDIT - -package common - -import ( - "bytes" - "fmt" - "sync" -) - -const ( - major = "{{.Major}}" - minor = "{{.Minor}}" - patch = "{{.Patch}}" - tag = "{{.Tag}}" -) - -var once sync.Once -var version string - -// Version returns semantic version of the sdk -func Version() string { - once.Do(func() { - ver := fmt.Sprintf("%s.%s.%s", major, minor, patch) - verBuilder := bytes.NewBufferString(ver) - if tag != "" && tag != "-" { - _, err := verBuilder.WriteString(tag) - if err == nil { - verBuilder = bytes.NewBufferString(ver) - } - } - version = verBuilder.String() - }) - return version -} -` diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go deleted file mode 100644 index dcd452da1..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - -package auth - -import ( - "bytes" - "crypto/rsa" - "crypto/x509" - "encoding/pem" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "sync" -) - -// x509CertificateRetriever provides an X509 certificate with the RSA private key -type x509CertificateRetriever interface { - Refresh() error - CertificatePemRaw() []byte - Certificate() *x509.Certificate - PrivateKeyPemRaw() []byte - PrivateKey() *rsa.PrivateKey -} - -// urlBasedX509CertificateRetriever retrieves PEM-encoded X509 certificates from the given URLs. -type urlBasedX509CertificateRetriever struct { - certURL string - privateKeyURL string - passphrase string - certificatePemRaw []byte - certificate *x509.Certificate - privateKeyPemRaw []byte - privateKey *rsa.PrivateKey - mux sync.Mutex -} - -func newURLBasedX509CertificateRetriever(certURL, privateKeyURL, passphrase string) x509CertificateRetriever { - return &urlBasedX509CertificateRetriever{ - certURL: certURL, - privateKeyURL: privateKeyURL, - passphrase: passphrase, - mux: sync.Mutex{}, - } -} - -// Refresh() is failure atomic, i.e., CertificatePemRaw(), Certificate(), PrivateKeyPemRaw(), and PrivateKey() would -// return their previous values if Refresh() fails. -func (r *urlBasedX509CertificateRetriever) Refresh() error { - common.Debugln("Refreshing certificate") - - r.mux.Lock() - defer r.mux.Unlock() - - var err error - - var certificatePemRaw []byte - var certificate *x509.Certificate - if certificatePemRaw, certificate, err = r.renewCertificate(r.certURL); err != nil { - return fmt.Errorf("failed to renew certificate: %s", err.Error()) - } - - var privateKeyPemRaw []byte - var privateKey *rsa.PrivateKey - if r.privateKeyURL != "" { - if privateKeyPemRaw, privateKey, err = r.renewPrivateKey(r.privateKeyURL, r.passphrase); err != nil { - return fmt.Errorf("failed to renew private key: %s", err.Error()) - } - } - - r.certificatePemRaw = certificatePemRaw - r.certificate = certificate - r.privateKeyPemRaw = privateKeyPemRaw - r.privateKey = privateKey - return nil -} - -func (r *urlBasedX509CertificateRetriever) renewCertificate(url string) (certificatePemRaw []byte, certificate *x509.Certificate, err error) { - var body bytes.Buffer - if body, err = httpGet(url); err != nil { - return nil, nil, fmt.Errorf("failed to get certificate from %s: %s", url, err.Error()) - } - - certificatePemRaw = body.Bytes() - var block *pem.Block - block, _ = pem.Decode(certificatePemRaw) - if block == nil { - return nil, nil, fmt.Errorf("failed to parse the new certificate, not valid pem data") - } - - if certificate, err = x509.ParseCertificate(block.Bytes); err != nil { - return nil, nil, fmt.Errorf("failed to parse the new certificate: %s", err.Error()) - } - - return certificatePemRaw, certificate, nil -} - -func (r *urlBasedX509CertificateRetriever) renewPrivateKey(url, passphrase string) (privateKeyPemRaw []byte, privateKey *rsa.PrivateKey, err error) { - var body bytes.Buffer - if body, err = httpGet(url); err != nil { - return nil, nil, fmt.Errorf("failed to get private key from %s: %s", url, err.Error()) - } - - privateKeyPemRaw = body.Bytes() - if privateKey, err = common.PrivateKeyFromBytes(privateKeyPemRaw, &passphrase); err != nil { - return nil, nil, fmt.Errorf("failed to parse the new private key: %s", err.Error()) - } - - return privateKeyPemRaw, privateKey, nil -} - -func (r *urlBasedX509CertificateRetriever) CertificatePemRaw() []byte { - r.mux.Lock() - defer r.mux.Unlock() - - if r.certificatePemRaw == nil { - return nil - } - - c := make([]byte, len(r.certificatePemRaw)) - copy(c, r.certificatePemRaw) - return c -} - -func (r *urlBasedX509CertificateRetriever) Certificate() *x509.Certificate { - r.mux.Lock() - defer r.mux.Unlock() - - if r.certificate == nil { - return nil - } - - c := *r.certificate - return &c -} - -func (r *urlBasedX509CertificateRetriever) PrivateKeyPemRaw() []byte { - r.mux.Lock() - defer r.mux.Unlock() - - if r.privateKeyPemRaw == nil { - return nil - } - - c := make([]byte, len(r.privateKeyPemRaw)) - copy(c, r.privateKeyPemRaw) - return c -} - -func (r *urlBasedX509CertificateRetriever) PrivateKey() *rsa.PrivateKey { - r.mux.Lock() - defer r.mux.Unlock() - - if r.privateKey == nil { - return nil - } - - c := *r.privateKey - return &c -} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go deleted file mode 100644 index 32be79574..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - -package auth - -import ( - "crypto/rsa" - "fmt" - "github.com/oracle/oci-go-sdk/common" -) - -type instancePrincipalConfigurationProvider struct { - keyProvider *instancePrincipalKeyProvider - region *common.Region -} - -//InstancePrincipalConfigurationProvider returns a configuration for instance principals -func InstancePrincipalConfigurationProvider() (common.ConfigurationProvider, error) { - var err error - var keyProvider *instancePrincipalKeyProvider - if keyProvider, err = newInstancePrincipalKeyProvider(); err != nil { - return nil, fmt.Errorf("failed to create a new key provider for instance principal: %s", err.Error()) - } - return instancePrincipalConfigurationProvider{keyProvider: keyProvider, region: nil}, nil -} - -//InstancePrincipalConfigurationProviderForRegion returns a configuration for instance principals with a given region -func InstancePrincipalConfigurationProviderForRegion(region common.Region) (common.ConfigurationProvider, error) { - var err error - var keyProvider *instancePrincipalKeyProvider - if keyProvider, err = newInstancePrincipalKeyProvider(); err != nil { - return nil, fmt.Errorf("failed to create a new key provider for instance principal: %s", err.Error()) - } - return instancePrincipalConfigurationProvider{keyProvider: keyProvider, region: ®ion}, nil -} - -func (p instancePrincipalConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { - return p.keyProvider.PrivateRSAKey() -} - -func (p instancePrincipalConfigurationProvider) KeyID() (string, error) { - return p.keyProvider.KeyID() -} - -func (p instancePrincipalConfigurationProvider) TenancyOCID() (string, error) { - return p.keyProvider.TenancyOCID() -} - -func (p instancePrincipalConfigurationProvider) UserOCID() (string, error) { - return "", nil -} - -func (p instancePrincipalConfigurationProvider) KeyFingerprint() (string, error) { - return "", nil -} - -func (p instancePrincipalConfigurationProvider) Region() (string, error) { - if p.region == nil { - return string(p.keyProvider.RegionForFederationClient()), nil - } - return string(*p.region), nil -} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go deleted file mode 100644 index 1aa258e83..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - -// Package auth provides supporting functions and structs for authentication -package auth - -import ( - "context" - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "encoding/pem" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" - "strings" - "sync" -) - -// federationClient is a client to retrieve the security token for an instance principal necessary to sign a request. -// It also provides the private key whose corresponding public key is used to retrieve the security token. -type federationClient interface { - PrivateKey() (*rsa.PrivateKey, error) - SecurityToken() (string, error) -} - -// x509FederationClient retrieves a security token from Auth service. -type x509FederationClient struct { - tenancyID string - sessionKeySupplier sessionKeySupplier - leafCertificateRetriever x509CertificateRetriever - intermediateCertificateRetrievers []x509CertificateRetriever - securityToken securityToken - authClient *common.BaseClient - mux sync.Mutex -} - -func newX509FederationClient(region common.Region, tenancyID string, leafCertificateRetriever x509CertificateRetriever, intermediateCertificateRetrievers []x509CertificateRetriever) federationClient { - client := &x509FederationClient{ - tenancyID: tenancyID, - leafCertificateRetriever: leafCertificateRetriever, - intermediateCertificateRetrievers: intermediateCertificateRetrievers, - } - client.sessionKeySupplier = newSessionKeySupplier() - client.authClient = newAuthClient(region, client) - return client -} - -var ( - genericHeaders = []string{"date", "(request-target)"} // "host" is not needed for the federation endpoint. Don't ask me why. - bodyHeaders = []string{"content-length", "content-type", "x-content-sha256"} -) - -func newAuthClient(region common.Region, provider common.KeyProvider) *common.BaseClient { - signer := common.RequestSigner(provider, genericHeaders, bodyHeaders) - client := common.DefaultBaseClientWithSigner(signer) - if region == common.RegionSEA { - client.Host = "https://auth.r1.oracleiaas.com" - } else { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "auth", string(region)) - } - client.BasePath = "v1/x509" - return &client -} - -// For authClient to sign requests to X509 Federation Endpoint -func (c *x509FederationClient) KeyID() (string, error) { - tenancy := c.tenancyID - fingerprint := fingerprint(c.leafCertificateRetriever.Certificate()) - return fmt.Sprintf("%s/fed-x509/%s", tenancy, fingerprint), nil -} - -// For authClient to sign requests to X509 Federation Endpoint -func (c *x509FederationClient) PrivateRSAKey() (*rsa.PrivateKey, error) { - return c.leafCertificateRetriever.PrivateKey(), nil -} - -func (c *x509FederationClient) PrivateKey() (*rsa.PrivateKey, error) { - c.mux.Lock() - defer c.mux.Unlock() - - if err := c.renewSecurityTokenIfNotValid(); err != nil { - return nil, err - } - return c.sessionKeySupplier.PrivateKey(), nil -} - -func (c *x509FederationClient) SecurityToken() (token string, err error) { - c.mux.Lock() - defer c.mux.Unlock() - - if err = c.renewSecurityTokenIfNotValid(); err != nil { - return "", err - } - return c.securityToken.String(), nil -} - -func (c *x509FederationClient) renewSecurityTokenIfNotValid() (err error) { - if c.securityToken == nil || !c.securityToken.Valid() { - if err = c.renewSecurityToken(); err != nil { - return fmt.Errorf("failed to renew security token: %s", err.Error()) - } - } - return nil -} - -func (c *x509FederationClient) renewSecurityToken() (err error) { - if err = c.sessionKeySupplier.Refresh(); err != nil { - return fmt.Errorf("failed to refresh session key: %s", err.Error()) - } - - if err = c.leafCertificateRetriever.Refresh(); err != nil { - return fmt.Errorf("failed to refresh leaf certificate: %s", err.Error()) - } - - updatedTenancyID := extractTenancyIDFromCertificate(c.leafCertificateRetriever.Certificate()) - if c.tenancyID != updatedTenancyID { - err = fmt.Errorf("unexpected update of tenancy OCID in the leaf certificate. Previous tenancy: %s, Updated: %s", c.tenancyID, updatedTenancyID) - return - } - - for _, retriever := range c.intermediateCertificateRetrievers { - if err = retriever.Refresh(); err != nil { - return fmt.Errorf("failed to refresh intermediate certificate: %s", err.Error()) - } - } - - if c.securityToken, err = c.getSecurityToken(); err != nil { - return fmt.Errorf("failed to get security token: %s", err.Error()) - } - - return nil -} - -func (c *x509FederationClient) getSecurityToken() (securityToken, error) { - request := c.makeX509FederationRequest() - - var err error - var httpRequest http.Request - if httpRequest, err = common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "", request); err != nil { - return nil, fmt.Errorf("failed to make http request: %s", err.Error()) - } - - var httpResponse *http.Response - defer common.CloseBodyIfValid(httpResponse) - if httpResponse, err = c.authClient.Call(context.Background(), &httpRequest); err != nil { - return nil, fmt.Errorf("failed to call: %s", err.Error()) - } - - response := x509FederationResponse{} - if err = common.UnmarshalResponse(httpResponse, &response); err != nil { - return nil, fmt.Errorf("failed to unmarshal the response: %s", err.Error()) - } - - return newInstancePrincipalToken(response.Token.Token) -} - -type x509FederationRequest struct { - X509FederationDetails `contributesTo:"body"` -} - -// X509FederationDetails x509 federation details -type X509FederationDetails struct { - Certificate string `mandatory:"true" json:"certificate,omitempty"` - PublicKey string `mandatory:"true" json:"publicKey,omitempty"` - IntermediateCertificates []string `mandatory:"false" json:"intermediateCertificates,omitempty"` -} - -type x509FederationResponse struct { - Token `presentIn:"body"` -} - -// Token token -type Token struct { - Token string `mandatory:"true" json:"token,omitempty"` -} - -func (c *x509FederationClient) makeX509FederationRequest() *x509FederationRequest { - certificate := c.sanitizeCertificateString(string(c.leafCertificateRetriever.CertificatePemRaw())) - publicKey := c.sanitizeCertificateString(string(c.sessionKeySupplier.PublicKeyPemRaw())) - var intermediateCertificates []string - for _, retriever := range c.intermediateCertificateRetrievers { - intermediateCertificates = append(intermediateCertificates, c.sanitizeCertificateString(string(retriever.CertificatePemRaw()))) - } - - details := X509FederationDetails{ - Certificate: certificate, - PublicKey: publicKey, - IntermediateCertificates: intermediateCertificates, - } - return &x509FederationRequest{details} -} - -func (c *x509FederationClient) sanitizeCertificateString(certString string) string { - certString = strings.Replace(certString, "-----BEGIN CERTIFICATE-----", "", -1) - certString = strings.Replace(certString, "-----END CERTIFICATE-----", "", -1) - certString = strings.Replace(certString, "-----BEGIN PUBLIC KEY-----", "", -1) - certString = strings.Replace(certString, "-----END PUBLIC KEY-----", "", -1) - certString = strings.Replace(certString, "\n", "", -1) - return certString -} - -// sessionKeySupplier provides an RSA keypair which can be re-generated by calling Refresh(). -type sessionKeySupplier interface { - Refresh() error - PrivateKey() *rsa.PrivateKey - PublicKeyPemRaw() []byte -} - -// inMemorySessionKeySupplier implements sessionKeySupplier to vend an RSA keypair. -// Refresh() generates a new RSA keypair with a random source, and keeps it in memory. -// -// inMemorySessionKeySupplier is not thread-safe. -type inMemorySessionKeySupplier struct { - keySize int - privateKey *rsa.PrivateKey - publicKeyPemRaw []byte -} - -// newSessionKeySupplier creates and returns a sessionKeySupplier instance which generates key pairs of size 2048. -func newSessionKeySupplier() sessionKeySupplier { - return &inMemorySessionKeySupplier{keySize: 2048} -} - -// Refresh() is failure atomic, i.e., PrivateKey() and PublicKeyPemRaw() would return their previous values -// if Refresh() fails. -func (s *inMemorySessionKeySupplier) Refresh() (err error) { - common.Debugln("Refreshing session key") - - var privateKey *rsa.PrivateKey - privateKey, err = rsa.GenerateKey(rand.Reader, s.keySize) - if err != nil { - return fmt.Errorf("failed to generate a new keypair: %s", err) - } - - var publicKeyAsnBytes []byte - if publicKeyAsnBytes, err = x509.MarshalPKIXPublicKey(privateKey.Public()); err != nil { - return fmt.Errorf("failed to marshal the public part of the new keypair: %s", err.Error()) - } - publicKeyPemRaw := pem.EncodeToMemory(&pem.Block{ - Type: "PUBLIC KEY", - Bytes: publicKeyAsnBytes, - }) - - s.privateKey = privateKey - s.publicKeyPemRaw = publicKeyPemRaw - return nil -} - -func (s *inMemorySessionKeySupplier) PrivateKey() *rsa.PrivateKey { - if s.privateKey == nil { - return nil - } - - c := *s.privateKey - return &c -} - -func (s *inMemorySessionKeySupplier) PublicKeyPemRaw() []byte { - if s.publicKeyPemRaw == nil { - return nil - } - - c := make([]byte, len(s.publicKeyPemRaw)) - copy(c, s.publicKeyPemRaw) - return c -} - -type securityToken interface { - fmt.Stringer - Valid() bool -} - -type instancePrincipalToken struct { - tokenString string - jwtToken *jwtToken -} - -func newInstancePrincipalToken(tokenString string) (newToken securityToken, err error) { - var jwtToken *jwtToken - if jwtToken, err = parseJwt(tokenString); err != nil { - return nil, fmt.Errorf("failed to parse the token string \"%s\": %s", tokenString, err.Error()) - } - return &instancePrincipalToken{tokenString, jwtToken}, nil -} - -func (t *instancePrincipalToken) String() string { - return t.tokenString -} - -func (t *instancePrincipalToken) Valid() bool { - return !t.jwtToken.expired() -} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go deleted file mode 100644 index b0f329e32..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - -package auth - -import ( - "bytes" - "crypto/rsa" - "fmt" - "github.com/oracle/oci-go-sdk/common" -) - -const ( - regionURL = `http://169.254.169.254/opc/v1/instance/region` - leafCertificateURL = `http://169.254.169.254/opc/v1/identity/cert.pem` - leafCertificateKeyURL = `http://169.254.169.254/opc/v1/identity/key.pem` - leafCertificateKeyPassphrase = `` // No passphrase for the private key for Compute instances - intermediateCertificateURL = `http://169.254.169.254/opc/v1/identity/intermediate.pem` - intermediateCertificateKeyURL = `` - intermediateCertificateKeyPassphrase = `` // No passphrase for the private key for Compute instances -) - -// instancePrincipalKeyProvider implements KeyProvider to provide a key ID and its corresponding private key -// for an instance principal by getting a security token via x509FederationClient. -// -// The region name of the endpoint for x509FederationClient is obtained from the metadata service on the compute -// instance. -type instancePrincipalKeyProvider struct { - regionForFederationClient common.Region - federationClient federationClient - tenancyID string -} - -// newInstancePrincipalKeyProvider creates and returns an instancePrincipalKeyProvider instance based on -// x509FederationClient. -// -// NOTE: There is a race condition between PrivateRSAKey() and KeyID(). These two pieces are tightly coupled; KeyID -// includes a security token obtained from Auth service by giving a public key which is paired with PrivateRSAKey. -// The x509FederationClient caches the security token in memory until it is expired. Thus, even if a client obtains a -// KeyID that is not expired at the moment, the PrivateRSAKey that the client acquires at a next moment could be -// invalid because the KeyID could be already expired. -func newInstancePrincipalKeyProvider() (provider *instancePrincipalKeyProvider, err error) { - var region common.Region - if region, err = getRegionForFederationClient(regionURL); err != nil { - err = fmt.Errorf("failed to get the region name from %s: %s", regionURL, err.Error()) - common.Logln(err) - return nil, err - } - - leafCertificateRetriever := newURLBasedX509CertificateRetriever( - leafCertificateURL, leafCertificateKeyURL, leafCertificateKeyPassphrase) - intermediateCertificateRetrievers := []x509CertificateRetriever{ - newURLBasedX509CertificateRetriever( - intermediateCertificateURL, intermediateCertificateKeyURL, intermediateCertificateKeyPassphrase), - } - - if err = leafCertificateRetriever.Refresh(); err != nil { - err = fmt.Errorf("failed to refresh the leaf certificate: %s", err.Error()) - return nil, err - } - tenancyID := extractTenancyIDFromCertificate(leafCertificateRetriever.Certificate()) - - federationClient := newX509FederationClient( - region, tenancyID, leafCertificateRetriever, intermediateCertificateRetrievers) - - provider = &instancePrincipalKeyProvider{regionForFederationClient: region, federationClient: federationClient, tenancyID: tenancyID} - return -} - -func getRegionForFederationClient(url string) (r common.Region, err error) { - var body bytes.Buffer - if body, err = httpGet(url); err != nil { - return - } - return common.StringToRegion(body.String()), nil -} - -func (p *instancePrincipalKeyProvider) RegionForFederationClient() common.Region { - return p.regionForFederationClient -} - -func (p *instancePrincipalKeyProvider) PrivateRSAKey() (privateKey *rsa.PrivateKey, err error) { - if privateKey, err = p.federationClient.PrivateKey(); err != nil { - err = fmt.Errorf("failed to get private key: %s", err.Error()) - return nil, err - } - return privateKey, nil -} - -func (p *instancePrincipalKeyProvider) KeyID() (string, error) { - var securityToken string - var err error - if securityToken, err = p.federationClient.SecurityToken(); err != nil { - return "", fmt.Errorf("failed to get security token: %s", err.Error()) - } - return fmt.Sprintf("ST$%s", securityToken), nil -} - -func (p *instancePrincipalKeyProvider) TenancyOCID() (string, error) { - return p.tenancyID, nil -} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/jwt.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/jwt.go deleted file mode 100644 index b199a4d68..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/jwt.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - -package auth - -import ( - "bytes" - "encoding/base64" - "encoding/json" - "fmt" - "strings" - "time" -) - -type jwtToken struct { - raw string - header map[string]interface{} - payload map[string]interface{} -} - -func (t *jwtToken) expired() bool { - exp := int64(t.payload["exp"].(float64)) - return exp <= time.Now().Unix() -} - -func parseJwt(tokenString string) (*jwtToken, error) { - parts := strings.Split(tokenString, ".") - if len(parts) != 3 { - return nil, fmt.Errorf("the given token string contains an invalid number of parts") - } - - token := &jwtToken{raw: tokenString} - var err error - - // Parse Header part - var headerBytes []byte - if headerBytes, err = decodePart(parts[0]); err != nil { - return nil, fmt.Errorf("failed to decode the header bytes: %s", err.Error()) - } - if err = json.Unmarshal(headerBytes, &token.header); err != nil { - return nil, err - } - - // Parse Payload part - var payloadBytes []byte - if payloadBytes, err = decodePart(parts[1]); err != nil { - return nil, fmt.Errorf("failed to decode the payload bytes: %s", err.Error()) - } - decoder := json.NewDecoder(bytes.NewBuffer(payloadBytes)) - if err = decoder.Decode(&token.payload); err != nil { - return nil, fmt.Errorf("failed to decode the payload json: %s", err.Error()) - } - - return token, nil -} - -func decodePart(partString string) ([]byte, error) { - if l := len(partString) % 4; 0 < l { - partString += strings.Repeat("=", 4-l) - } - return base64.URLEncoding.DecodeString(partString) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/utils.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/utils.go deleted file mode 100644 index f84490c7d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/common/auth/utils.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - -package auth - -import ( - "bytes" - "crypto/sha1" - "crypto/x509" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" - "net/http/httputil" - "strings" -) - -// httpGet makes a simple HTTP GET request to the given URL, expecting only "200 OK" status code. -// This is basically for the Instance Metadata Service. -func httpGet(url string) (body bytes.Buffer, err error) { - var response *http.Response - if response, err = http.Get(url); err != nil { - return - } - - common.IfDebug(func() { - if dump, e := httputil.DumpResponse(response, true); e == nil { - common.Logf("Dump Response %v", string(dump)) - } else { - common.Debugln(e) - } - }) - - defer response.Body.Close() - if _, err = body.ReadFrom(response.Body); err != nil { - return - } - - if response.StatusCode != http.StatusOK { - err = fmt.Errorf("HTTP Get failed: URL: %s, Status: %s, Message: %s", - url, response.Status, body.String()) - return - } - - return -} - -func extractTenancyIDFromCertificate(cert *x509.Certificate) string { - for _, nameAttr := range cert.Subject.Names { - value := nameAttr.Value.(string) - if strings.HasPrefix(value, "opc-tenant:") { - return value[len("opc-tenant:"):] - } - } - return "" -} - -func fingerprint(certificate *x509.Certificate) string { - fingerprint := sha1.Sum(certificate.Raw) - return colonSeparatedString(fingerprint) -} - -func colonSeparatedString(fingerprint [sha1.Size]byte) string { - spaceSeparated := fmt.Sprintf("% x", fingerprint) - return strings.Replace(spaceSeparated, " ", ":", -1) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go deleted file mode 100644 index 769f7c72d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/add_on_options.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// AddOnOptions The properties that define options for supported add-ons. -type AddOnOptions struct { - - // Whether or not to enable the Kubernetes Dashboard add-on. - IsKubernetesDashboardEnabled *bool `mandatory:"false" json:"isKubernetesDashboardEnabled"` - - // Whether or not to enable the Tiller add-on. - IsTillerEnabled *bool `mandatory:"false" json:"isTillerEnabled"` -} - -func (m AddOnOptions) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster.go deleted file mode 100644 index 4cb004f80..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Cluster A Kubernetes cluster. -type Cluster struct { - - // The OCID of the cluster. - Id *string `mandatory:"false" json:"id"` - - // The name of the cluster. - Name *string `mandatory:"false" json:"name"` - - // The OCID of the compartment in which the cluster exists. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The OCID of the virtual cloud network (VCN) in which the cluster exists. - VcnId *string `mandatory:"false" json:"vcnId"` - - // The version of Kubernetes running on the cluster masters. - KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` - - // Optional attributes for the cluster. - Options *ClusterCreateOptions `mandatory:"false" json:"options"` - - // Metadata about the cluster. - Metadata *ClusterMetadata `mandatory:"false" json:"metadata"` - - // The state of the cluster masters. - LifecycleState ClusterLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // Details about the state of the cluster masters. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // Endpoints served up by the cluster masters. - Endpoints *ClusterEndpoints `mandatory:"false" json:"endpoints"` - - // Available Kubernetes versions to which the clusters masters may be upgraded. - AvailableKubernetesUpgrades []string `mandatory:"false" json:"availableKubernetesUpgrades"` -} - -func (m Cluster) String() string { - return common.PointerString(m) -} - -// ClusterLifecycleStateEnum Enum with underlying type: string -type ClusterLifecycleStateEnum string - -// Set of constants representing the allowable values for ClusterLifecycleState -const ( - ClusterLifecycleStateCreating ClusterLifecycleStateEnum = "CREATING" - ClusterLifecycleStateActive ClusterLifecycleStateEnum = "ACTIVE" - ClusterLifecycleStateFailed ClusterLifecycleStateEnum = "FAILED" - ClusterLifecycleStateDeleting ClusterLifecycleStateEnum = "DELETING" - ClusterLifecycleStateDeleted ClusterLifecycleStateEnum = "DELETED" - ClusterLifecycleStateUpdating ClusterLifecycleStateEnum = "UPDATING" -) - -var mappingClusterLifecycleState = map[string]ClusterLifecycleStateEnum{ - "CREATING": ClusterLifecycleStateCreating, - "ACTIVE": ClusterLifecycleStateActive, - "FAILED": ClusterLifecycleStateFailed, - "DELETING": ClusterLifecycleStateDeleting, - "DELETED": ClusterLifecycleStateDeleted, - "UPDATING": ClusterLifecycleStateUpdating, -} - -// GetClusterLifecycleStateEnumValues Enumerates the set of values for ClusterLifecycleState -func GetClusterLifecycleStateEnumValues() []ClusterLifecycleStateEnum { - values := make([]ClusterLifecycleStateEnum, 0) - for _, v := range mappingClusterLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go deleted file mode 100644 index 7d43d5998..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_create_options.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ClusterCreateOptions The properties that define extra options for a cluster. -type ClusterCreateOptions struct { - - // The OCIDs of the subnets used for Kubernetes services load balancers. - ServiceLbSubnetIds []string `mandatory:"false" json:"serviceLbSubnetIds"` - - // Network configuration for Kubernetes. - KubernetesNetworkConfig *KubernetesNetworkConfig `mandatory:"false" json:"kubernetesNetworkConfig"` - - // Configurable cluster add-ons - AddOns *AddOnOptions `mandatory:"false" json:"addOns"` -} - -func (m ClusterCreateOptions) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go deleted file mode 100644 index 97a46981e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_endpoints.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ClusterEndpoints The properties that define endpoints for a cluster. -type ClusterEndpoints struct { - - // The Kubernetes API server endpoint. - Kubernetes *string `mandatory:"false" json:"kubernetes"` -} - -func (m ClusterEndpoints) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go deleted file mode 100644 index 369d7a35e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_lifecycle_state.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ClusterLifecycleState The lifecycle state of a cluster. -type ClusterLifecycleState struct { -} - -func (m ClusterLifecycleState) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go deleted file mode 100644 index 588eaf0b9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_metadata.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ClusterMetadata The properties that define meta data for a cluster. -type ClusterMetadata struct { - - // The time the cluster was created. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // The user who created the cluster. - CreatedByUserId *string `mandatory:"false" json:"createdByUserId"` - - // The OCID of the work request which created the cluster. - CreatedByWorkRequestId *string `mandatory:"false" json:"createdByWorkRequestId"` - - // The time the cluster was deleted. - TimeDeleted *common.SDKTime `mandatory:"false" json:"timeDeleted"` - - // The user who deleted the cluster. - DeletedByUserId *string `mandatory:"false" json:"deletedByUserId"` - - // The OCID of the work request which deleted the cluster. - DeletedByWorkRequestId *string `mandatory:"false" json:"deletedByWorkRequestId"` - - // The time the cluster was updated. - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - - // The user who updated the cluster. - UpdatedByUserId *string `mandatory:"false" json:"updatedByUserId"` - - // The OCID of the work request which updated the cluster. - UpdatedByWorkRequestId *string `mandatory:"false" json:"updatedByWorkRequestId"` -} - -func (m ClusterMetadata) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go deleted file mode 100644 index e8ee0ffe6..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_options.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ClusterOptions Options for creating or updating clusters. -type ClusterOptions struct { - - // Available Kubernetes versions. - KubernetesVersions []string `mandatory:"false" json:"kubernetesVersions"` -} - -func (m ClusterOptions) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go deleted file mode 100644 index 8cd31731c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/cluster_summary.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ClusterSummary The properties that define a cluster summary. -type ClusterSummary struct { - - // The OCID of the cluster. - Id *string `mandatory:"false" json:"id"` - - // The name of the cluster. - Name *string `mandatory:"false" json:"name"` - - // The OCID of the compartment in which the cluster exists. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The OCID of the virtual cloud network (VCN) in which the cluster exists - VcnId *string `mandatory:"false" json:"vcnId"` - - // The version of Kubernetes running on the cluster masters. - KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` - - // Optional attributes for the cluster. - Options *ClusterCreateOptions `mandatory:"false" json:"options"` - - // Metadata about the cluster. - Metadata *ClusterMetadata `mandatory:"false" json:"metadata"` - - // The state of the cluster masters. - LifecycleState ClusterSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // Details about the state of the cluster masters. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // Endpoints served up by the cluster masters. - Endpoints *ClusterEndpoints `mandatory:"false" json:"endpoints"` - - // Available Kubernetes versions to which the clusters masters may be upgraded. - AvailableKubernetesUpgrades []string `mandatory:"false" json:"availableKubernetesUpgrades"` -} - -func (m ClusterSummary) String() string { - return common.PointerString(m) -} - -// ClusterSummaryLifecycleStateEnum Enum with underlying type: string -type ClusterSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for ClusterSummaryLifecycleState -const ( - ClusterSummaryLifecycleStateCreating ClusterSummaryLifecycleStateEnum = "CREATING" - ClusterSummaryLifecycleStateActive ClusterSummaryLifecycleStateEnum = "ACTIVE" - ClusterSummaryLifecycleStateFailed ClusterSummaryLifecycleStateEnum = "FAILED" - ClusterSummaryLifecycleStateDeleting ClusterSummaryLifecycleStateEnum = "DELETING" - ClusterSummaryLifecycleStateDeleted ClusterSummaryLifecycleStateEnum = "DELETED" - ClusterSummaryLifecycleStateUpdating ClusterSummaryLifecycleStateEnum = "UPDATING" -) - -var mappingClusterSummaryLifecycleState = map[string]ClusterSummaryLifecycleStateEnum{ - "CREATING": ClusterSummaryLifecycleStateCreating, - "ACTIVE": ClusterSummaryLifecycleStateActive, - "FAILED": ClusterSummaryLifecycleStateFailed, - "DELETING": ClusterSummaryLifecycleStateDeleting, - "DELETED": ClusterSummaryLifecycleStateDeleted, - "UPDATING": ClusterSummaryLifecycleStateUpdating, -} - -// GetClusterSummaryLifecycleStateEnumValues Enumerates the set of values for ClusterSummaryLifecycleState -func GetClusterSummaryLifecycleStateEnumValues() []ClusterSummaryLifecycleStateEnum { - values := make([]ClusterSummaryLifecycleStateEnum, 0) - for _, v := range mappingClusterSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go deleted file mode 100644 index edaf4dc7d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/containerengine_client.go +++ /dev/null @@ -1,761 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -//ContainerEngineClient a client for ContainerEngine -type ContainerEngineClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewContainerEngineClientWithConfigurationProvider Creates a new default ContainerEngine client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewContainerEngineClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ContainerEngineClient, err error) { - baseClient, err := common.NewClientWithConfig(configProvider) - if err != nil { - return - } - - client = ContainerEngineClient{BaseClient: baseClient} - client.BasePath = "20180222" - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *ContainerEngineClient) SetRegion(region string) { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "containerengine", region) -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *ContainerEngineClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { - if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { - return err - } - - // Error has been checked already - region, _ := configProvider.Region() - client.SetRegion(region) - client.config = &configProvider - return nil -} - -// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set -func (client *ContainerEngineClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// CreateCluster Create a new cluster. -func (client ContainerEngineClient) CreateCluster(ctx context.Context, request CreateClusterRequest) (response CreateClusterResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createCluster, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateClusterResponse") - } - return -} - -// createCluster implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) createCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters") - if err != nil { - return nil, err - } - - var response CreateClusterResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateKubeconfig Create the Kubeconfig YAML for a cluster. -func (client ContainerEngineClient) CreateKubeconfig(ctx context.Context, request CreateKubeconfigRequest) (response CreateKubeconfigResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createKubeconfig, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateKubeconfigResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateKubeconfigResponse") - } - return -} - -// createKubeconfig implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) createKubeconfig(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/kubeconfig/content") - if err != nil { - return nil, err - } - - var response CreateKubeconfigResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateNodePool Create a new node pool. -func (client ContainerEngineClient) CreateNodePool(ctx context.Context, request CreateNodePoolRequest) (response CreateNodePoolResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createNodePool, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateNodePoolResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateNodePoolResponse") - } - return -} - -// createNodePool implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) createNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/nodePools") - if err != nil { - return nil, err - } - - var response CreateNodePoolResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteCluster Delete a cluster. -func (client ContainerEngineClient) DeleteCluster(ctx context.Context, request DeleteClusterRequest) (response DeleteClusterResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteCluster, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteClusterResponse") - } - return -} - -// deleteCluster implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) deleteCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/clusters/{clusterId}") - if err != nil { - return nil, err - } - - var response DeleteClusterResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteNodePool Delete a node pool. -func (client ContainerEngineClient) DeleteNodePool(ctx context.Context, request DeleteNodePoolRequest) (response DeleteNodePoolResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteNodePool, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteNodePoolResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteNodePoolResponse") - } - return -} - -// deleteNodePool implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) deleteNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/nodePools/{nodePoolId}") - if err != nil { - return nil, err - } - - var response DeleteNodePoolResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteWorkRequest Cancel a work request that has not started. -func (client ContainerEngineClient) DeleteWorkRequest(ctx context.Context, request DeleteWorkRequestRequest) (response DeleteWorkRequestResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteWorkRequest, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteWorkRequestResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteWorkRequestResponse") - } - return -} - -// deleteWorkRequest implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) deleteWorkRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/workRequests/{workRequestId}") - if err != nil { - return nil, err - } - - var response DeleteWorkRequestResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetCluster Get the details of a cluster. -func (client ContainerEngineClient) GetCluster(ctx context.Context, request GetClusterRequest) (response GetClusterResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getCluster, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetClusterResponse") - } - return -} - -// getCluster implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) getCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}") - if err != nil { - return nil, err - } - - var response GetClusterResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetClusterOptions Get options available for clusters. -func (client ContainerEngineClient) GetClusterOptions(ctx context.Context, request GetClusterOptionsRequest) (response GetClusterOptionsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getClusterOptions, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetClusterOptionsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetClusterOptionsResponse") - } - return -} - -// getClusterOptions implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) getClusterOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusterOptions/{clusterOptionId}") - if err != nil { - return nil, err - } - - var response GetClusterOptionsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetNodePool Get the details of a node pool. -func (client ContainerEngineClient) GetNodePool(ctx context.Context, request GetNodePoolRequest) (response GetNodePoolResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getNodePool, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetNodePoolResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetNodePoolResponse") - } - return -} - -// getNodePool implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) getNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePools/{nodePoolId}") - if err != nil { - return nil, err - } - - var response GetNodePoolResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetNodePoolOptions Get options available for node pools. -func (client ContainerEngineClient) GetNodePoolOptions(ctx context.Context, request GetNodePoolOptionsRequest) (response GetNodePoolOptionsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getNodePoolOptions, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetNodePoolOptionsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetNodePoolOptionsResponse") - } - return -} - -// getNodePoolOptions implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) getNodePoolOptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePoolOptions/{nodePoolOptionId}") - if err != nil { - return nil, err - } - - var response GetNodePoolOptionsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetWorkRequest Get the details of a work request. -func (client ContainerEngineClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") - } - return -} - -// getWorkRequest implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) getWorkRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}") - if err != nil { - return nil, err - } - - var response GetWorkRequestResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListClusters List all the cluster objects in a compartment. -func (client ContainerEngineClient) ListClusters(ctx context.Context, request ListClustersRequest) (response ListClustersResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listClusters, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListClustersResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListClustersResponse") - } - return -} - -// listClusters implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) listClusters(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters") - if err != nil { - return nil, err - } - - var response ListClustersResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListNodePools List all the node pools in a compartment, and optionally filter by cluster. -func (client ContainerEngineClient) ListNodePools(ctx context.Context, request ListNodePoolsRequest) (response ListNodePoolsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listNodePools, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListNodePoolsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListNodePoolsResponse") - } - return -} - -// listNodePools implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) listNodePools(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePools") - if err != nil { - return nil, err - } - - var response ListNodePoolsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListWorkRequestErrors Get the errors of a work request. -func (client ContainerEngineClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") - } - return -} - -// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors") - if err != nil { - return nil, err - } - - var response ListWorkRequestErrorsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListWorkRequestLogs Get the logs of a work request. -func (client ContainerEngineClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") - } - return -} - -// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs") - if err != nil { - return nil, err - } - - var response ListWorkRequestLogsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListWorkRequests List all work requests in a compartment. -func (client ContainerEngineClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") - } - return -} - -// listWorkRequests implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) listWorkRequests(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests") - if err != nil { - return nil, err - } - - var response ListWorkRequestsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateCluster Update the details of a cluster. -func (client ContainerEngineClient) UpdateCluster(ctx context.Context, request UpdateClusterRequest) (response UpdateClusterResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateCluster, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateClusterResponse") - } - return -} - -// updateCluster implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) updateCluster(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/clusters/{clusterId}") - if err != nil { - return nil, err - } - - var response UpdateClusterResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateNodePool Update the details of a node pool. -func (client ContainerEngineClient) UpdateNodePool(ctx context.Context, request UpdateNodePoolRequest) (response UpdateNodePoolResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateNodePool, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateNodePoolResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateNodePoolResponse") - } - return -} - -// updateNodePool implements the OCIOperation interface (enables retrying operations) -func (client ContainerEngineClient) updateNodePool(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/nodePools/{nodePoolId}") - if err != nil { - return nil, err - } - - var response UpdateNodePoolResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go deleted file mode 100644 index 7505a549f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_details.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateClusterDetails The properties that define a request to create a cluster. -type CreateClusterDetails struct { - - // The name of the cluster. Avoid entering confidential information. - Name *string `mandatory:"true" json:"name"` - - // The OCID of the compartment in which to create the cluster. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The OCID of the virtual cloud network (VCN) in which to create the cluster. - VcnId *string `mandatory:"true" json:"vcnId"` - - // The version of Kubernetes to install into the cluster masters. - KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"` - - // Optional attributes for the cluster. - Options *ClusterCreateOptions `mandatory:"false" json:"options"` -} - -func (m CreateClusterDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go deleted file mode 100644 index e1870c79a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_kubeconfig_content_details.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateClusterKubeconfigContentDetails The properties that define a request to create a cluster kubeconfig. -type CreateClusterKubeconfigContentDetails struct { - - // The version of the kubeconfig token. - TokenVersion *string `mandatory:"false" json:"tokenVersion"` - - // The desired expiration, in seconds, to use for the kubeconfig token. - Expiration *int `mandatory:"false" json:"expiration"` -} - -func (m CreateClusterKubeconfigContentDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go deleted file mode 100644 index 5c6c00c5b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_cluster_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateClusterRequest wrapper for the CreateCluster operation -type CreateClusterRequest struct { - - // The details of the cluster to create. - CreateClusterDetails `contributesTo:"body"` - - // A token you supply to uniquely identify the request and provide idempotency if - // the request is retried. Idempotency tokens expire after 24 hours. - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateClusterRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateClusterResponse wrapper for the CreateCluster operation -type CreateClusterResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The OCID of the work request handling the operation. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go deleted file mode 100644 index 827fd54b0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_kubeconfig_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "io" - "net/http" -) - -// CreateKubeconfigRequest wrapper for the CreateKubeconfig operation -type CreateKubeconfigRequest struct { - - // The OCID of the cluster. - ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // The details of the cluster kubeconfig to create. - CreateClusterKubeconfigContentDetails `contributesTo:"body"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateKubeconfigRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateKubeconfigRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateKubeconfigRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateKubeconfigResponse wrapper for the CreateKubeconfig operation -type CreateKubeconfigResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The io.ReadCloser instance - Content io.ReadCloser `presentIn:"body" encoding:"binary"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateKubeconfigResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateKubeconfigResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go deleted file mode 100644 index abd3f39fa..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_details.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateNodePoolDetails The properties that define a request to create a node pool. -type CreateNodePoolDetails struct { - - // The OCID of the compartment in which the node pool exists. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The OCID of the cluster to which this node pool is attached. - ClusterId *string `mandatory:"true" json:"clusterId"` - - // The name of the node pool. Avoid entering confidential information. - Name *string `mandatory:"true" json:"name"` - - // The version of Kubernetes to install on the nodes in the node pool. - KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"` - - // The name of the image running on the nodes in the node pool. - NodeImageName *string `mandatory:"true" json:"nodeImageName"` - - // The name of the node shape of the nodes in the node pool. - NodeShape *string `mandatory:"true" json:"nodeShape"` - - // The OCIDs of the subnets in which to place nodes for this node pool. - SubnetIds []string `mandatory:"true" json:"subnetIds"` - - // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. - InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` - - // The SSH public key to add to each node in the node pool. - SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` - - // The number of nodes to create in each subnet. - QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` -} - -func (m CreateNodePoolDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go deleted file mode 100644 index d3a5e452d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/create_node_pool_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateNodePoolRequest wrapper for the CreateNodePool operation -type CreateNodePoolRequest struct { - - // The details of the node pool to create. - CreateNodePoolDetails `contributesTo:"body"` - - // A token you supply to uniquely identify the request and provide idempotency if - // the request is retried. Idempotency tokens expire after 24 hours. - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateNodePoolRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateNodePoolRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateNodePoolResponse wrapper for the CreateNodePool operation -type CreateNodePoolResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The OCID of the work request handling the operation. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateNodePoolResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateNodePoolResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go deleted file mode 100644 index 6b0d76f8d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_cluster_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteClusterRequest wrapper for the DeleteCluster operation -type DeleteClusterRequest struct { - - // The OCID of the cluster. - ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteClusterRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteClusterResponse wrapper for the DeleteCluster operation -type DeleteClusterResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The OCID of the work request handling the operation. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go deleted file mode 100644 index bba9853bf..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_node_pool_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteNodePoolRequest wrapper for the DeleteNodePool operation -type DeleteNodePoolRequest struct { - - // The OCID of the node pool. - NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteNodePoolRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteNodePoolRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteNodePoolResponse wrapper for the DeleteNodePool operation -type DeleteNodePoolResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The OCID of the work request handling the operation. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteNodePoolResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteNodePoolResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go deleted file mode 100644 index e50708263..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/delete_work_request_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteWorkRequestRequest wrapper for the DeleteWorkRequest operation -type DeleteWorkRequestRequest struct { - - // The OCID of the work request. - WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteWorkRequestRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteWorkRequestRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteWorkRequestRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteWorkRequestResponse wrapper for the DeleteWorkRequest operation -type DeleteWorkRequestResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteWorkRequestResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteWorkRequestResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go deleted file mode 100644 index 94d5a784d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_options_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetClusterOptionsRequest wrapper for the GetClusterOptions operation -type GetClusterOptionsRequest struct { - - // The id of the option set to retrieve. Only "all" is supported. - ClusterOptionId *string `mandatory:"true" contributesTo:"path" name:"clusterOptionId"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetClusterOptionsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetClusterOptionsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetClusterOptionsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetClusterOptionsResponse wrapper for the GetClusterOptions operation -type GetClusterOptionsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The ClusterOptions instance - ClusterOptions `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetClusterOptionsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetClusterOptionsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go deleted file mode 100644 index 76a67753a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_cluster_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetClusterRequest wrapper for the GetCluster operation -type GetClusterRequest struct { - - // The OCID of the cluster. - ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetClusterRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetClusterResponse wrapper for the GetCluster operation -type GetClusterResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Cluster instance - Cluster `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go deleted file mode 100644 index a4201f07a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_options_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetNodePoolOptionsRequest wrapper for the GetNodePoolOptions operation -type GetNodePoolOptionsRequest struct { - - // The id of the option set to retrieve. Use "all" get all options, or use a cluster ID to get options specific to the provided cluster. - NodePoolOptionId *string `mandatory:"true" contributesTo:"path" name:"nodePoolOptionId"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetNodePoolOptionsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetNodePoolOptionsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetNodePoolOptionsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetNodePoolOptionsResponse wrapper for the GetNodePoolOptions operation -type GetNodePoolOptionsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The NodePoolOptions instance - NodePoolOptions `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetNodePoolOptionsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetNodePoolOptionsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go deleted file mode 100644 index 47648ba65..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_node_pool_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetNodePoolRequest wrapper for the GetNodePool operation -type GetNodePoolRequest struct { - - // The OCID of the node pool. - NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetNodePoolRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetNodePoolRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetNodePoolResponse wrapper for the GetNodePool operation -type GetNodePoolResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The NodePool instance - NodePool `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetNodePoolResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetNodePoolResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go deleted file mode 100644 index 60dda6916..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/get_work_request_request_response.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetWorkRequestRequest wrapper for the GetWorkRequest operation -type GetWorkRequestRequest struct { - - // The OCID of the work request. - WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetWorkRequestRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetWorkRequestRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetWorkRequestResponse wrapper for the GetWorkRequest operation -type GetWorkRequestResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The WorkRequest instance - WorkRequest `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // the number of seconds to should wait before polling this endpoint again - RetryAfter *int `presentIn:"header" name:"retry-after"` -} - -func (response GetWorkRequestResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetWorkRequestResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/key_value.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/key_value.go deleted file mode 100644 index 5a28b4f5d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/key_value.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// KeyValue The properties that define a key value pair. -type KeyValue struct { - - // The key of the pair. - Key *string `mandatory:"false" json:"key"` - - // The value of the pair. - Value *string `mandatory:"false" json:"value"` -} - -func (m KeyValue) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go deleted file mode 100644 index a84232182..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/kubernetes_network_config.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// KubernetesNetworkConfig The properties that define the network configuration for Kubernetes. -type KubernetesNetworkConfig struct { - - // The CIDR block for Kubernetes pods. - PodsCidr *string `mandatory:"false" json:"podsCidr"` - - // The CIDR block for Kubernetes services. - ServicesCidr *string `mandatory:"false" json:"servicesCidr"` -} - -func (m KubernetesNetworkConfig) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go deleted file mode 100644 index 42ba892ac..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_clusters_request_response.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListClustersRequest wrapper for the ListClusters operation -type ListClustersRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // A cluster lifecycle state to filter on. Can have multiple parameters of this name. - LifecycleState []ListClustersLifecycleStateEnum `contributesTo:"query" name:"lifecycleState" omitEmpty:"true" collectionFormat:"multi"` - - // The name to filter on. - Name *string `mandatory:"false" contributesTo:"query" name:"name"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The optional order in which to sort the results. - SortOrder ListClustersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // The optional field to sort the results by. - SortBy ListClustersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListClustersRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListClustersRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListClustersRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListClustersResponse wrapper for the ListClusters operation -type ListClustersResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []ClusterSummary instances - Items []ClusterSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there might be additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListClustersResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListClustersResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListClustersLifecycleStateEnum Enum with underlying type: string -type ListClustersLifecycleStateEnum string - -// Set of constants representing the allowable values for ListClustersLifecycleState -const ( - ListClustersLifecycleStateCreating ListClustersLifecycleStateEnum = "CREATING" - ListClustersLifecycleStateActive ListClustersLifecycleStateEnum = "ACTIVE" - ListClustersLifecycleStateFailed ListClustersLifecycleStateEnum = "FAILED" - ListClustersLifecycleStateDeleting ListClustersLifecycleStateEnum = "DELETING" - ListClustersLifecycleStateDeleted ListClustersLifecycleStateEnum = "DELETED" - ListClustersLifecycleStateUpdating ListClustersLifecycleStateEnum = "UPDATING" -) - -var mappingListClustersLifecycleState = map[string]ListClustersLifecycleStateEnum{ - "CREATING": ListClustersLifecycleStateCreating, - "ACTIVE": ListClustersLifecycleStateActive, - "FAILED": ListClustersLifecycleStateFailed, - "DELETING": ListClustersLifecycleStateDeleting, - "DELETED": ListClustersLifecycleStateDeleted, - "UPDATING": ListClustersLifecycleStateUpdating, -} - -// GetListClustersLifecycleStateEnumValues Enumerates the set of values for ListClustersLifecycleState -func GetListClustersLifecycleStateEnumValues() []ListClustersLifecycleStateEnum { - values := make([]ListClustersLifecycleStateEnum, 0) - for _, v := range mappingListClustersLifecycleState { - values = append(values, v) - } - return values -} - -// ListClustersSortOrderEnum Enum with underlying type: string -type ListClustersSortOrderEnum string - -// Set of constants representing the allowable values for ListClustersSortOrder -const ( - ListClustersSortOrderAsc ListClustersSortOrderEnum = "ASC" - ListClustersSortOrderDesc ListClustersSortOrderEnum = "DESC" -) - -var mappingListClustersSortOrder = map[string]ListClustersSortOrderEnum{ - "ASC": ListClustersSortOrderAsc, - "DESC": ListClustersSortOrderDesc, -} - -// GetListClustersSortOrderEnumValues Enumerates the set of values for ListClustersSortOrder -func GetListClustersSortOrderEnumValues() []ListClustersSortOrderEnum { - values := make([]ListClustersSortOrderEnum, 0) - for _, v := range mappingListClustersSortOrder { - values = append(values, v) - } - return values -} - -// ListClustersSortByEnum Enum with underlying type: string -type ListClustersSortByEnum string - -// Set of constants representing the allowable values for ListClustersSortBy -const ( - ListClustersSortById ListClustersSortByEnum = "ID" - ListClustersSortByName ListClustersSortByEnum = "NAME" - ListClustersSortByTimeCreated ListClustersSortByEnum = "TIME_CREATED" -) - -var mappingListClustersSortBy = map[string]ListClustersSortByEnum{ - "ID": ListClustersSortById, - "NAME": ListClustersSortByName, - "TIME_CREATED": ListClustersSortByTimeCreated, -} - -// GetListClustersSortByEnumValues Enumerates the set of values for ListClustersSortBy -func GetListClustersSortByEnumValues() []ListClustersSortByEnum { - values := make([]ListClustersSortByEnum, 0) - for _, v := range mappingListClustersSortBy { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go deleted file mode 100644 index 841513143..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_node_pools_request_response.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListNodePoolsRequest wrapper for the ListNodePools operation -type ListNodePoolsRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The OCID of the cluster. - ClusterId *string `mandatory:"false" contributesTo:"query" name:"clusterId"` - - // The name to filter on. - Name *string `mandatory:"false" contributesTo:"query" name:"name"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The optional order in which to sort the results. - SortOrder ListNodePoolsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // The optional field to sort the results by. - SortBy ListNodePoolsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListNodePoolsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListNodePoolsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListNodePoolsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListNodePoolsResponse wrapper for the ListNodePools operation -type ListNodePoolsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []NodePoolSummary instances - Items []NodePoolSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there might be additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListNodePoolsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListNodePoolsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListNodePoolsSortOrderEnum Enum with underlying type: string -type ListNodePoolsSortOrderEnum string - -// Set of constants representing the allowable values for ListNodePoolsSortOrder -const ( - ListNodePoolsSortOrderAsc ListNodePoolsSortOrderEnum = "ASC" - ListNodePoolsSortOrderDesc ListNodePoolsSortOrderEnum = "DESC" -) - -var mappingListNodePoolsSortOrder = map[string]ListNodePoolsSortOrderEnum{ - "ASC": ListNodePoolsSortOrderAsc, - "DESC": ListNodePoolsSortOrderDesc, -} - -// GetListNodePoolsSortOrderEnumValues Enumerates the set of values for ListNodePoolsSortOrder -func GetListNodePoolsSortOrderEnumValues() []ListNodePoolsSortOrderEnum { - values := make([]ListNodePoolsSortOrderEnum, 0) - for _, v := range mappingListNodePoolsSortOrder { - values = append(values, v) - } - return values -} - -// ListNodePoolsSortByEnum Enum with underlying type: string -type ListNodePoolsSortByEnum string - -// Set of constants representing the allowable values for ListNodePoolsSortBy -const ( - ListNodePoolsSortById ListNodePoolsSortByEnum = "ID" - ListNodePoolsSortByName ListNodePoolsSortByEnum = "NAME" - ListNodePoolsSortByTimeCreated ListNodePoolsSortByEnum = "TIME_CREATED" -) - -var mappingListNodePoolsSortBy = map[string]ListNodePoolsSortByEnum{ - "ID": ListNodePoolsSortById, - "NAME": ListNodePoolsSortByName, - "TIME_CREATED": ListNodePoolsSortByTimeCreated, -} - -// GetListNodePoolsSortByEnumValues Enumerates the set of values for ListNodePoolsSortBy -func GetListNodePoolsSortByEnumValues() []ListNodePoolsSortByEnum { - values := make([]ListNodePoolsSortByEnum, 0) - for _, v := range mappingListNodePoolsSortBy { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go deleted file mode 100644 index 6cb11ab2d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_errors_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation -type ListWorkRequestErrorsRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The OCID of the work request. - WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListWorkRequestErrorsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListWorkRequestErrorsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation -type ListWorkRequestErrorsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []WorkRequestError instance - Items []WorkRequestError `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListWorkRequestErrorsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go deleted file mode 100644 index 790f68e36..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_request_logs_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation -type ListWorkRequestLogsRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The OCID of the work request. - WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListWorkRequestLogsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListWorkRequestLogsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation -type ListWorkRequestLogsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []WorkRequestLogEntry instance - Items []WorkRequestLogEntry `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListWorkRequestLogsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go deleted file mode 100644 index 94dad0e19..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/list_work_requests_request_response.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListWorkRequestsRequest wrapper for the ListWorkRequests operation -type ListWorkRequestsRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The OCID of the cluster. - ClusterId *string `mandatory:"false" contributesTo:"query" name:"clusterId"` - - // The OCID of the resource associated with a work request - ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` - - // Type of the resource associated with a work request - ResourceType ListWorkRequestsResourceTypeEnum `mandatory:"false" contributesTo:"query" name:"resourceType" omitEmpty:"true"` - - // A work request status to filter on. Can have multiple parameters of this name. - Status []ListWorkRequestsStatusEnum `contributesTo:"query" name:"status" omitEmpty:"true" collectionFormat:"multi"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The optional order in which to sort the results. - SortOrder ListWorkRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // The optional field to sort the results by. - SortBy ListWorkRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListWorkRequestsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListWorkRequestsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListWorkRequestsResponse wrapper for the ListWorkRequests operation -type ListWorkRequestsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []WorkRequestSummary instances - Items []WorkRequestSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there might be additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListWorkRequestsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListWorkRequestsResourceTypeEnum Enum with underlying type: string -type ListWorkRequestsResourceTypeEnum string - -// Set of constants representing the allowable values for ListWorkRequestsResourceType -const ( - ListWorkRequestsResourceTypeCluster ListWorkRequestsResourceTypeEnum = "CLUSTER" - ListWorkRequestsResourceTypeNodepool ListWorkRequestsResourceTypeEnum = "NODEPOOL" -) - -var mappingListWorkRequestsResourceType = map[string]ListWorkRequestsResourceTypeEnum{ - "CLUSTER": ListWorkRequestsResourceTypeCluster, - "NODEPOOL": ListWorkRequestsResourceTypeNodepool, -} - -// GetListWorkRequestsResourceTypeEnumValues Enumerates the set of values for ListWorkRequestsResourceType -func GetListWorkRequestsResourceTypeEnumValues() []ListWorkRequestsResourceTypeEnum { - values := make([]ListWorkRequestsResourceTypeEnum, 0) - for _, v := range mappingListWorkRequestsResourceType { - values = append(values, v) - } - return values -} - -// ListWorkRequestsStatusEnum Enum with underlying type: string -type ListWorkRequestsStatusEnum string - -// Set of constants representing the allowable values for ListWorkRequestsStatus -const ( - ListWorkRequestsStatusAccepted ListWorkRequestsStatusEnum = "ACCEPTED" - ListWorkRequestsStatusInProgress ListWorkRequestsStatusEnum = "IN_PROGRESS" - ListWorkRequestsStatusFailed ListWorkRequestsStatusEnum = "FAILED" - ListWorkRequestsStatusSucceeded ListWorkRequestsStatusEnum = "SUCCEEDED" - ListWorkRequestsStatusCanceling ListWorkRequestsStatusEnum = "CANCELING" - ListWorkRequestsStatusCanceled ListWorkRequestsStatusEnum = "CANCELED" -) - -var mappingListWorkRequestsStatus = map[string]ListWorkRequestsStatusEnum{ - "ACCEPTED": ListWorkRequestsStatusAccepted, - "IN_PROGRESS": ListWorkRequestsStatusInProgress, - "FAILED": ListWorkRequestsStatusFailed, - "SUCCEEDED": ListWorkRequestsStatusSucceeded, - "CANCELING": ListWorkRequestsStatusCanceling, - "CANCELED": ListWorkRequestsStatusCanceled, -} - -// GetListWorkRequestsStatusEnumValues Enumerates the set of values for ListWorkRequestsStatus -func GetListWorkRequestsStatusEnumValues() []ListWorkRequestsStatusEnum { - values := make([]ListWorkRequestsStatusEnum, 0) - for _, v := range mappingListWorkRequestsStatus { - values = append(values, v) - } - return values -} - -// ListWorkRequestsSortOrderEnum Enum with underlying type: string -type ListWorkRequestsSortOrderEnum string - -// Set of constants representing the allowable values for ListWorkRequestsSortOrder -const ( - ListWorkRequestsSortOrderAsc ListWorkRequestsSortOrderEnum = "ASC" - ListWorkRequestsSortOrderDesc ListWorkRequestsSortOrderEnum = "DESC" -) - -var mappingListWorkRequestsSortOrder = map[string]ListWorkRequestsSortOrderEnum{ - "ASC": ListWorkRequestsSortOrderAsc, - "DESC": ListWorkRequestsSortOrderDesc, -} - -// GetListWorkRequestsSortOrderEnumValues Enumerates the set of values for ListWorkRequestsSortOrder -func GetListWorkRequestsSortOrderEnumValues() []ListWorkRequestsSortOrderEnum { - values := make([]ListWorkRequestsSortOrderEnum, 0) - for _, v := range mappingListWorkRequestsSortOrder { - values = append(values, v) - } - return values -} - -// ListWorkRequestsSortByEnum Enum with underlying type: string -type ListWorkRequestsSortByEnum string - -// Set of constants representing the allowable values for ListWorkRequestsSortBy -const ( - ListWorkRequestsSortById ListWorkRequestsSortByEnum = "ID" - ListWorkRequestsSortByOperationType ListWorkRequestsSortByEnum = "OPERATION_TYPE" - ListWorkRequestsSortByStatus ListWorkRequestsSortByEnum = "STATUS" - ListWorkRequestsSortByTimeAccepted ListWorkRequestsSortByEnum = "TIME_ACCEPTED" - ListWorkRequestsSortByTimeStarted ListWorkRequestsSortByEnum = "TIME_STARTED" - ListWorkRequestsSortByTimeFinished ListWorkRequestsSortByEnum = "TIME_FINISHED" -) - -var mappingListWorkRequestsSortBy = map[string]ListWorkRequestsSortByEnum{ - "ID": ListWorkRequestsSortById, - "OPERATION_TYPE": ListWorkRequestsSortByOperationType, - "STATUS": ListWorkRequestsSortByStatus, - "TIME_ACCEPTED": ListWorkRequestsSortByTimeAccepted, - "TIME_STARTED": ListWorkRequestsSortByTimeStarted, - "TIME_FINISHED": ListWorkRequestsSortByTimeFinished, -} - -// GetListWorkRequestsSortByEnumValues Enumerates the set of values for ListWorkRequestsSortBy -func GetListWorkRequestsSortByEnumValues() []ListWorkRequestsSortByEnum { - values := make([]ListWorkRequestsSortByEnum, 0) - for _, v := range mappingListWorkRequestsSortBy { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node.go deleted file mode 100644 index 48d475de7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/node.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Node The properties that define a node. -type Node struct { - - // The OCID of the compute instance backing this node. - Id *string `mandatory:"false" json:"id"` - - // The name of the node. - Name *string `mandatory:"false" json:"name"` - - // The name of the availability domain in which this node is placed. - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` - - // The OCID of the subnet in which this node is placed. - SubnetId *string `mandatory:"false" json:"subnetId"` - - // The OCID of the node pool to which this node belongs. - NodePoolId *string `mandatory:"false" json:"nodePoolId"` - - // The public IP address of this node. - PublicIp *string `mandatory:"false" json:"publicIp"` - - // An error that may be associated with the node. - NodeError *NodeError `mandatory:"false" json:"nodeError"` - - // The state of the node. - LifecycleState NodeLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // Details about the state of the node. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` -} - -func (m Node) String() string { - return common.PointerString(m) -} - -// NodeLifecycleStateEnum Enum with underlying type: string -type NodeLifecycleStateEnum string - -// Set of constants representing the allowable values for NodeLifecycleState -const ( - NodeLifecycleStateCreating NodeLifecycleStateEnum = "CREATING" - NodeLifecycleStateActive NodeLifecycleStateEnum = "ACTIVE" - NodeLifecycleStateUpdating NodeLifecycleStateEnum = "UPDATING" - NodeLifecycleStateDeleting NodeLifecycleStateEnum = "DELETING" - NodeLifecycleStateDeleted NodeLifecycleStateEnum = "DELETED" - NodeLifecycleStateFailing NodeLifecycleStateEnum = "FAILING" - NodeLifecycleStateInactive NodeLifecycleStateEnum = "INACTIVE" -) - -var mappingNodeLifecycleState = map[string]NodeLifecycleStateEnum{ - "CREATING": NodeLifecycleStateCreating, - "ACTIVE": NodeLifecycleStateActive, - "UPDATING": NodeLifecycleStateUpdating, - "DELETING": NodeLifecycleStateDeleting, - "DELETED": NodeLifecycleStateDeleted, - "FAILING": NodeLifecycleStateFailing, - "INACTIVE": NodeLifecycleStateInactive, -} - -// GetNodeLifecycleStateEnumValues Enumerates the set of values for NodeLifecycleState -func GetNodeLifecycleStateEnumValues() []NodeLifecycleStateEnum { - values := make([]NodeLifecycleStateEnum, 0) - for _, v := range mappingNodeLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_error.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_error.go deleted file mode 100644 index 704d04234..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_error.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// NodeError The properties that define an upstream error while managing a node. -type NodeError struct { - - // A short error code that defines the upstream error, meant for programmatic parsing. See API Errors (https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm). - Code *string `mandatory:"true" json:"code"` - - // A human-readable error string of the upstream error. - Message *string `mandatory:"true" json:"message"` - - // The status of the HTTP response encountered in the upstream error. - Status *string `mandatory:"false" json:"status"` - - // Unique Oracle-assigned identifier for the upstream request. If you need to contact Oracle about a particular upstream request, please provide the request ID. - OpcRequestId *string `mandatory:"false" json:"opc-request-id"` -} - -func (m NodeError) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool.go deleted file mode 100644 index 68b5c5b71..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// NodePool A pool of compute nodes attached to a cluster. -type NodePool struct { - - // The OCID of the node pool. - Id *string `mandatory:"false" json:"id"` - - // The OCID of the compartment in which the node pool exists. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The OCID of the cluster to which this node pool is attached. - ClusterId *string `mandatory:"false" json:"clusterId"` - - // The name of the node pool. - Name *string `mandatory:"false" json:"name"` - - // The version of Kubernetes running on the nodes in the node pool. - KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` - - // The OCID of the image running on the nodes in the node pool. - NodeImageId *string `mandatory:"false" json:"nodeImageId"` - - // The name of the image running on the nodes in the node pool. - NodeImageName *string `mandatory:"false" json:"nodeImageName"` - - // The name of the node shape of the nodes in the node pool. - NodeShape *string `mandatory:"false" json:"nodeShape"` - - // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. - InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` - - // The SSH public key on each node in the node pool. - SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` - - // The number of nodes in each subnet. - QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` - - // The OCIDs of the subnets in which to place nodes for this node pool. - SubnetIds []string `mandatory:"false" json:"subnetIds"` - - // The nodes in the node pool. - Nodes []Node `mandatory:"false" json:"nodes"` -} - -func (m NodePool) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go deleted file mode 100644 index 4d146fb23..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_options.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// NodePoolOptions Options for creating or updating node pools. -type NodePoolOptions struct { - - // Available Kubernetes versions. - KubernetesVersions []string `mandatory:"false" json:"kubernetesVersions"` - - // Available Kubernetes versions. - Images []string `mandatory:"false" json:"images"` - - // Available shapes for nodes. - Shapes []string `mandatory:"false" json:"shapes"` -} - -func (m NodePoolOptions) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go deleted file mode 100644 index bee7d798b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/node_pool_summary.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// NodePoolSummary The properties that define a node pool summary. -type NodePoolSummary struct { - - // The OCID of the node pool. - Id *string `mandatory:"false" json:"id"` - - // The OCID of the compartment in which the node pool exists. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The OCID of the cluster to which this node pool is attached. - ClusterId *string `mandatory:"false" json:"clusterId"` - - // The name of the node pool. - Name *string `mandatory:"false" json:"name"` - - // The version of Kubernetes running on the nodes in the node pool. - KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` - - // The OCID of the image running on the nodes in the node pool. - NodeImageId *string `mandatory:"false" json:"nodeImageId"` - - // The name of the image running on the nodes in the node pool. - NodeImageName *string `mandatory:"false" json:"nodeImageName"` - - // The name of the node shape of the nodes in the node pool. - NodeShape *string `mandatory:"false" json:"nodeShape"` - - // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. - InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` - - // The SSH public key on each node in the node pool. - SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` - - // The number of nodes in each subnet. - QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` - - // The OCIDs of the subnets in which to place nodes for this node pool. - SubnetIds []string `mandatory:"false" json:"subnetIds"` -} - -func (m NodePoolSummary) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/sort_order.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/sort_order.go deleted file mode 100644 index 30cdc63ef..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/sort_order.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SortOrder The sort order for a list operation. -type SortOrder struct { -} - -func (m SortOrder) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go deleted file mode 100644 index 5598f45f3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_details.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateClusterDetails The properties that define a request to update a cluster. -type UpdateClusterDetails struct { - - // The new name for the cluster. Avoid entering confidential information. - Name *string `mandatory:"false" json:"name"` - - // The version of Kubernetes to which the cluster masters should be upgraded. - KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` -} - -func (m UpdateClusterDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go deleted file mode 100644 index 9931fa03b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_cluster_request_response.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateClusterRequest wrapper for the UpdateCluster operation -type UpdateClusterRequest struct { - - // The OCID of the cluster. - ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` - - // The details of the cluster to update. - UpdateClusterDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateClusterRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateClusterResponse wrapper for the UpdateCluster operation -type UpdateClusterResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The OCID of the work request handling the operation. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go deleted file mode 100644 index cb0c4a3d9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_details.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateNodePoolDetails The properties that define a request to update a node pool. -type UpdateNodePoolDetails struct { - - // The new name for the cluster. Avoid entering confidential information. - Name *string `mandatory:"false" json:"name"` - - // The version of Kubernetes to which the nodes in the node pool should be upgraded. - KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` - - // The number of nodes to ensure in each subnet. - QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` - - // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. - InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` - - // The OCIDs of the subnets in which to place nodes for this node pool. - SubnetIds []string `mandatory:"false" json:"subnetIds"` -} - -func (m UpdateNodePoolDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go deleted file mode 100644 index 689f57613..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/update_node_pool_request_response.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateNodePoolRequest wrapper for the UpdateNodePool operation -type UpdateNodePoolRequest struct { - - // The OCID of the node pool. - NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` - - // The fields to update in a node pool. - UpdateNodePoolDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateNodePoolRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateNodePoolRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateNodePoolRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateNodePoolResponse wrapper for the UpdateNodePool operation -type UpdateNodePoolResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The OCID of the work request handling the operation. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateNodePoolResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateNodePoolResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go deleted file mode 100644 index 646db5339..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// WorkRequest An asynchronous work request. -type WorkRequest struct { - - // The OCID of the work request. - Id *string `mandatory:"false" json:"id"` - - // The type of work the work request is doing. - OperationType WorkRequestOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"` - - // The current status of the work request. - Status WorkRequestStatusEnum `mandatory:"false" json:"status,omitempty"` - - // The OCID of the compartment in which the work request exists. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The resources this work request affects. - Resources []WorkRequestResource `mandatory:"false" json:"resources"` - - // The time the work request was accepted. - TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"` - - // The time the work request was started. - TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - - // The time the work request was finished. - TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` -} - -func (m WorkRequest) String() string { - return common.PointerString(m) -} - -// WorkRequestOperationTypeEnum Enum with underlying type: string -type WorkRequestOperationTypeEnum string - -// Set of constants representing the allowable values for WorkRequestOperationType -const ( - WorkRequestOperationTypeClusterCreate WorkRequestOperationTypeEnum = "CLUSTER_CREATE" - WorkRequestOperationTypeClusterUpdate WorkRequestOperationTypeEnum = "CLUSTER_UPDATE" - WorkRequestOperationTypeClusterDelete WorkRequestOperationTypeEnum = "CLUSTER_DELETE" - WorkRequestOperationTypeNodepoolCreate WorkRequestOperationTypeEnum = "NODEPOOL_CREATE" - WorkRequestOperationTypeNodepoolUpdate WorkRequestOperationTypeEnum = "NODEPOOL_UPDATE" - WorkRequestOperationTypeNodepoolDelete WorkRequestOperationTypeEnum = "NODEPOOL_DELETE" - WorkRequestOperationTypeWorkrequestCancel WorkRequestOperationTypeEnum = "WORKREQUEST_CANCEL" -) - -var mappingWorkRequestOperationType = map[string]WorkRequestOperationTypeEnum{ - "CLUSTER_CREATE": WorkRequestOperationTypeClusterCreate, - "CLUSTER_UPDATE": WorkRequestOperationTypeClusterUpdate, - "CLUSTER_DELETE": WorkRequestOperationTypeClusterDelete, - "NODEPOOL_CREATE": WorkRequestOperationTypeNodepoolCreate, - "NODEPOOL_UPDATE": WorkRequestOperationTypeNodepoolUpdate, - "NODEPOOL_DELETE": WorkRequestOperationTypeNodepoolDelete, - "WORKREQUEST_CANCEL": WorkRequestOperationTypeWorkrequestCancel, -} - -// GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationType -func GetWorkRequestOperationTypeEnumValues() []WorkRequestOperationTypeEnum { - values := make([]WorkRequestOperationTypeEnum, 0) - for _, v := range mappingWorkRequestOperationType { - values = append(values, v) - } - return values -} - -// WorkRequestStatusEnum Enum with underlying type: string -type WorkRequestStatusEnum string - -// Set of constants representing the allowable values for WorkRequestStatus -const ( - WorkRequestStatusAccepted WorkRequestStatusEnum = "ACCEPTED" - WorkRequestStatusInProgress WorkRequestStatusEnum = "IN_PROGRESS" - WorkRequestStatusFailed WorkRequestStatusEnum = "FAILED" - WorkRequestStatusSucceeded WorkRequestStatusEnum = "SUCCEEDED" - WorkRequestStatusCanceling WorkRequestStatusEnum = "CANCELING" - WorkRequestStatusCanceled WorkRequestStatusEnum = "CANCELED" -) - -var mappingWorkRequestStatus = map[string]WorkRequestStatusEnum{ - "ACCEPTED": WorkRequestStatusAccepted, - "IN_PROGRESS": WorkRequestStatusInProgress, - "FAILED": WorkRequestStatusFailed, - "SUCCEEDED": WorkRequestStatusSucceeded, - "CANCELING": WorkRequestStatusCanceling, - "CANCELED": WorkRequestStatusCanceled, -} - -// GetWorkRequestStatusEnumValues Enumerates the set of values for WorkRequestStatus -func GetWorkRequestStatusEnumValues() []WorkRequestStatusEnum { - values := make([]WorkRequestStatusEnum, 0) - for _, v := range mappingWorkRequestStatus { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go deleted file mode 100644 index 1fc7932f7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_error.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// WorkRequestError Errors related to a specific work request. -type WorkRequestError struct { - - // A short error code that defines the error, meant for programmatic parsing. See API Errors (https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm). - Code *string `mandatory:"true" json:"code"` - - // A human-readable error string. - Message *string `mandatory:"true" json:"message"` - - // The date and time the error occurred. - Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` -} - -func (m WorkRequestError) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go deleted file mode 100644 index 390e6d572..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_log_entry.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// WorkRequestLogEntry Log entries related to a specific work request. -type WorkRequestLogEntry struct { - - // The description of an action that occurred. - Message *string `mandatory:"false" json:"message"` - - // The date and time the log entry occurred. - Timestamp *string `mandatory:"false" json:"timestamp"` -} - -func (m WorkRequestLogEntry) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go deleted file mode 100644 index e6e4c6911..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_operation_type.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// WorkRequestOperationType The types of work request operations. -type WorkRequestOperationType struct { -} - -func (m WorkRequestOperationType) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go deleted file mode 100644 index 2fe128211..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_resource.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// WorkRequestResource The properties that define a work request resource. -type WorkRequestResource struct { - - // The way in which this resource was affected by the work tracked by the work request. - ActionType WorkRequestResourceActionTypeEnum `mandatory:"false" json:"actionType,omitempty"` - - // The resource type the work request affects. - EntityType *string `mandatory:"false" json:"entityType"` - - // The OCID of the resource the work request affects. - Identifier *string `mandatory:"false" json:"identifier"` - - // The URI path on which the user can issue a GET request to access the resource metadata. - EntityUri *string `mandatory:"false" json:"entityUri"` -} - -func (m WorkRequestResource) String() string { - return common.PointerString(m) -} - -// WorkRequestResourceActionTypeEnum Enum with underlying type: string -type WorkRequestResourceActionTypeEnum string - -// Set of constants representing the allowable values for WorkRequestResourceActionType -const ( - WorkRequestResourceActionTypeCreated WorkRequestResourceActionTypeEnum = "CREATED" - WorkRequestResourceActionTypeUpdated WorkRequestResourceActionTypeEnum = "UPDATED" - WorkRequestResourceActionTypeDeleted WorkRequestResourceActionTypeEnum = "DELETED" - WorkRequestResourceActionTypeRelated WorkRequestResourceActionTypeEnum = "RELATED" - WorkRequestResourceActionTypeInProgress WorkRequestResourceActionTypeEnum = "IN_PROGRESS" - WorkRequestResourceActionTypeFailed WorkRequestResourceActionTypeEnum = "FAILED" -) - -var mappingWorkRequestResourceActionType = map[string]WorkRequestResourceActionTypeEnum{ - "CREATED": WorkRequestResourceActionTypeCreated, - "UPDATED": WorkRequestResourceActionTypeUpdated, - "DELETED": WorkRequestResourceActionTypeDeleted, - "RELATED": WorkRequestResourceActionTypeRelated, - "IN_PROGRESS": WorkRequestResourceActionTypeInProgress, - "FAILED": WorkRequestResourceActionTypeFailed, -} - -// GetWorkRequestResourceActionTypeEnumValues Enumerates the set of values for WorkRequestResourceActionType -func GetWorkRequestResourceActionTypeEnumValues() []WorkRequestResourceActionTypeEnum { - values := make([]WorkRequestResourceActionTypeEnum, 0) - for _, v := range mappingWorkRequestResourceActionType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go deleted file mode 100644 index 0b2ccb2b3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_status.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// WorkRequestStatus The status of a work request. -type WorkRequestStatus struct { -} - -func (m WorkRequestStatus) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go deleted file mode 100644 index 35f82768a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/containerengine/work_request_summary.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Container Engine for Kubernetes API -// -// Container Engine for Kubernetes API -// - -package containerengine - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// WorkRequestSummary The properties that define a work request summary. -type WorkRequestSummary struct { - - // The OCID of the work request. - Id *string `mandatory:"false" json:"id"` - - // The type of work the work request is doing. - OperationType WorkRequestSummaryOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"` - - // The current status of the work request. - Status WorkRequestSummaryStatusEnum `mandatory:"false" json:"status,omitempty"` - - // The OCID of the compartment in which the work request exists. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The resources this work request affects. - Resources []WorkRequestResource `mandatory:"false" json:"resources"` - - // The time the work request was accepted. - TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"` - - // The time the work request was started. - TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - - // The time the work request was finished. - TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` -} - -func (m WorkRequestSummary) String() string { - return common.PointerString(m) -} - -// WorkRequestSummaryOperationTypeEnum Enum with underlying type: string -type WorkRequestSummaryOperationTypeEnum string - -// Set of constants representing the allowable values for WorkRequestSummaryOperationType -const ( - WorkRequestSummaryOperationTypeClusterCreate WorkRequestSummaryOperationTypeEnum = "CLUSTER_CREATE" - WorkRequestSummaryOperationTypeClusterUpdate WorkRequestSummaryOperationTypeEnum = "CLUSTER_UPDATE" - WorkRequestSummaryOperationTypeClusterDelete WorkRequestSummaryOperationTypeEnum = "CLUSTER_DELETE" - WorkRequestSummaryOperationTypeNodepoolCreate WorkRequestSummaryOperationTypeEnum = "NODEPOOL_CREATE" - WorkRequestSummaryOperationTypeNodepoolUpdate WorkRequestSummaryOperationTypeEnum = "NODEPOOL_UPDATE" - WorkRequestSummaryOperationTypeNodepoolDelete WorkRequestSummaryOperationTypeEnum = "NODEPOOL_DELETE" - WorkRequestSummaryOperationTypeWorkrequestCancel WorkRequestSummaryOperationTypeEnum = "WORKREQUEST_CANCEL" -) - -var mappingWorkRequestSummaryOperationType = map[string]WorkRequestSummaryOperationTypeEnum{ - "CLUSTER_CREATE": WorkRequestSummaryOperationTypeClusterCreate, - "CLUSTER_UPDATE": WorkRequestSummaryOperationTypeClusterUpdate, - "CLUSTER_DELETE": WorkRequestSummaryOperationTypeClusterDelete, - "NODEPOOL_CREATE": WorkRequestSummaryOperationTypeNodepoolCreate, - "NODEPOOL_UPDATE": WorkRequestSummaryOperationTypeNodepoolUpdate, - "NODEPOOL_DELETE": WorkRequestSummaryOperationTypeNodepoolDelete, - "WORKREQUEST_CANCEL": WorkRequestSummaryOperationTypeWorkrequestCancel, -} - -// GetWorkRequestSummaryOperationTypeEnumValues Enumerates the set of values for WorkRequestSummaryOperationType -func GetWorkRequestSummaryOperationTypeEnumValues() []WorkRequestSummaryOperationTypeEnum { - values := make([]WorkRequestSummaryOperationTypeEnum, 0) - for _, v := range mappingWorkRequestSummaryOperationType { - values = append(values, v) - } - return values -} - -// WorkRequestSummaryStatusEnum Enum with underlying type: string -type WorkRequestSummaryStatusEnum string - -// Set of constants representing the allowable values for WorkRequestSummaryStatus -const ( - WorkRequestSummaryStatusAccepted WorkRequestSummaryStatusEnum = "ACCEPTED" - WorkRequestSummaryStatusInProgress WorkRequestSummaryStatusEnum = "IN_PROGRESS" - WorkRequestSummaryStatusFailed WorkRequestSummaryStatusEnum = "FAILED" - WorkRequestSummaryStatusSucceeded WorkRequestSummaryStatusEnum = "SUCCEEDED" - WorkRequestSummaryStatusCanceling WorkRequestSummaryStatusEnum = "CANCELING" - WorkRequestSummaryStatusCanceled WorkRequestSummaryStatusEnum = "CANCELED" -) - -var mappingWorkRequestSummaryStatus = map[string]WorkRequestSummaryStatusEnum{ - "ACCEPTED": WorkRequestSummaryStatusAccepted, - "IN_PROGRESS": WorkRequestSummaryStatusInProgress, - "FAILED": WorkRequestSummaryStatusFailed, - "SUCCEEDED": WorkRequestSummaryStatusSucceeded, - "CANCELING": WorkRequestSummaryStatusCanceling, - "CANCELED": WorkRequestSummaryStatusCanceled, -} - -// GetWorkRequestSummaryStatusEnumValues Enumerates the set of values for WorkRequestSummaryStatus -func GetWorkRequestSummaryStatusEnumValues() []WorkRequestSummaryStatusEnum { - values := make([]WorkRequestSummaryStatusEnum, 0) - for _, v := range mappingWorkRequestSummaryStatus { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/backup.go b/vendor/github.com/oracle/oci-go-sdk/database/backup.go deleted file mode 100644 index feb8bf96f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/backup.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Backup A database backup -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type Backup struct { - - // The name of the Availability Domain that the backup is located in. - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` - - // The OCID of the compartment. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The Oracle Database Edition of the DbSystem on which the backup was taken. - DatabaseEdition *string `mandatory:"false" json:"databaseEdition"` - - // The OCID of the database. - DatabaseId *string `mandatory:"false" json:"databaseId"` - - // Size of the database in mega-bytes at the time the backup was taken. - DbDataSizeInMBs *int `mandatory:"false" json:"dbDataSizeInMBs"` - - // The user-friendly name for the backup. It does not have to be unique. - DisplayName *string `mandatory:"false" json:"displayName"` - - // The OCID of the backup. - Id *string `mandatory:"false" json:"id"` - - // Additional information about the current lifecycleState. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The current state of the backup. - LifecycleState BackupLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The date and time the backup was completed. - TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` - - // The date and time the backup starts. - TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - - // The type of backup. - Type BackupTypeEnum `mandatory:"false" json:"type,omitempty"` -} - -func (m Backup) String() string { - return common.PointerString(m) -} - -// BackupLifecycleStateEnum Enum with underlying type: string -type BackupLifecycleStateEnum string - -// Set of constants representing the allowable values for BackupLifecycleState -const ( - BackupLifecycleStateCreating BackupLifecycleStateEnum = "CREATING" - BackupLifecycleStateActive BackupLifecycleStateEnum = "ACTIVE" - BackupLifecycleStateDeleting BackupLifecycleStateEnum = "DELETING" - BackupLifecycleStateDeleted BackupLifecycleStateEnum = "DELETED" - BackupLifecycleStateFailed BackupLifecycleStateEnum = "FAILED" - BackupLifecycleStateRestoring BackupLifecycleStateEnum = "RESTORING" -) - -var mappingBackupLifecycleState = map[string]BackupLifecycleStateEnum{ - "CREATING": BackupLifecycleStateCreating, - "ACTIVE": BackupLifecycleStateActive, - "DELETING": BackupLifecycleStateDeleting, - "DELETED": BackupLifecycleStateDeleted, - "FAILED": BackupLifecycleStateFailed, - "RESTORING": BackupLifecycleStateRestoring, -} - -// GetBackupLifecycleStateEnumValues Enumerates the set of values for BackupLifecycleState -func GetBackupLifecycleStateEnumValues() []BackupLifecycleStateEnum { - values := make([]BackupLifecycleStateEnum, 0) - for _, v := range mappingBackupLifecycleState { - values = append(values, v) - } - return values -} - -// BackupTypeEnum Enum with underlying type: string -type BackupTypeEnum string - -// Set of constants representing the allowable values for BackupType -const ( - BackupTypeIncremental BackupTypeEnum = "INCREMENTAL" - BackupTypeFull BackupTypeEnum = "FULL" -) - -var mappingBackupType = map[string]BackupTypeEnum{ - "INCREMENTAL": BackupTypeIncremental, - "FULL": BackupTypeFull, -} - -// GetBackupTypeEnumValues Enumerates the set of values for BackupType -func GetBackupTypeEnumValues() []BackupTypeEnum { - values := make([]BackupTypeEnum, 0) - for _, v := range mappingBackupType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go deleted file mode 100644 index 9cbba5db9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// BackupSummary A database backup -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type BackupSummary struct { - - // The name of the Availability Domain that the backup is located in. - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` - - // The OCID of the compartment. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The Oracle Database Edition of the DbSystem on which the backup was taken. - DatabaseEdition *string `mandatory:"false" json:"databaseEdition"` - - // The OCID of the database. - DatabaseId *string `mandatory:"false" json:"databaseId"` - - // Size of the database in mega-bytes at the time the backup was taken. - DbDataSizeInMBs *int `mandatory:"false" json:"dbDataSizeInMBs"` - - // The user-friendly name for the backup. It does not have to be unique. - DisplayName *string `mandatory:"false" json:"displayName"` - - // The OCID of the backup. - Id *string `mandatory:"false" json:"id"` - - // Additional information about the current lifecycleState. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The current state of the backup. - LifecycleState BackupSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The date and time the backup was completed. - TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` - - // The date and time the backup starts. - TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - - // The type of backup. - Type BackupSummaryTypeEnum `mandatory:"false" json:"type,omitempty"` -} - -func (m BackupSummary) String() string { - return common.PointerString(m) -} - -// BackupSummaryLifecycleStateEnum Enum with underlying type: string -type BackupSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for BackupSummaryLifecycleState -const ( - BackupSummaryLifecycleStateCreating BackupSummaryLifecycleStateEnum = "CREATING" - BackupSummaryLifecycleStateActive BackupSummaryLifecycleStateEnum = "ACTIVE" - BackupSummaryLifecycleStateDeleting BackupSummaryLifecycleStateEnum = "DELETING" - BackupSummaryLifecycleStateDeleted BackupSummaryLifecycleStateEnum = "DELETED" - BackupSummaryLifecycleStateFailed BackupSummaryLifecycleStateEnum = "FAILED" - BackupSummaryLifecycleStateRestoring BackupSummaryLifecycleStateEnum = "RESTORING" -) - -var mappingBackupSummaryLifecycleState = map[string]BackupSummaryLifecycleStateEnum{ - "CREATING": BackupSummaryLifecycleStateCreating, - "ACTIVE": BackupSummaryLifecycleStateActive, - "DELETING": BackupSummaryLifecycleStateDeleting, - "DELETED": BackupSummaryLifecycleStateDeleted, - "FAILED": BackupSummaryLifecycleStateFailed, - "RESTORING": BackupSummaryLifecycleStateRestoring, -} - -// GetBackupSummaryLifecycleStateEnumValues Enumerates the set of values for BackupSummaryLifecycleState -func GetBackupSummaryLifecycleStateEnumValues() []BackupSummaryLifecycleStateEnum { - values := make([]BackupSummaryLifecycleStateEnum, 0) - for _, v := range mappingBackupSummaryLifecycleState { - values = append(values, v) - } - return values -} - -// BackupSummaryTypeEnum Enum with underlying type: string -type BackupSummaryTypeEnum string - -// Set of constants representing the allowable values for BackupSummaryType -const ( - BackupSummaryTypeIncremental BackupSummaryTypeEnum = "INCREMENTAL" - BackupSummaryTypeFull BackupSummaryTypeEnum = "FULL" -) - -var mappingBackupSummaryType = map[string]BackupSummaryTypeEnum{ - "INCREMENTAL": BackupSummaryTypeIncremental, - "FULL": BackupSummaryTypeFull, -} - -// GetBackupSummaryTypeEnumValues Enumerates the set of values for BackupSummaryType -func GetBackupSummaryTypeEnumValues() []BackupSummaryTypeEnum { - values := make([]BackupSummaryTypeEnum, 0) - for _, v := range mappingBackupSummaryType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_backup_details.go deleted file mode 100644 index 6faa74c49..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_backup_details.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateBackupDetails The representation of CreateBackupDetails -type CreateBackupDetails struct { - - // The OCID of the database. - DatabaseId *string `mandatory:"true" json:"databaseId"` - - // The user-friendly name for the backup. It does not have to be unique. - DisplayName *string `mandatory:"true" json:"displayName"` -} - -func (m CreateBackupDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go deleted file mode 100644 index fda3b7d57..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateBackupRequest wrapper for the CreateBackup operation -type CreateBackupRequest struct { - - // Request to create a new database backup. - CreateBackupDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (for example, if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateBackupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateBackupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateBackupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateBackupResponse wrapper for the CreateBackup operation -type CreateBackupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Backup instance - Backup `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateBackupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateBackupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_details.go deleted file mode 100644 index dc92eb654..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_details.go +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDataGuardAssociationDetails The configuration details for creating a Data Guard association between databases. -// **NOTE:** -// "ExistingDbSystem" is the only supported `creationType` value. Therefore, all -// CreateDataGuardAssociation -// requests must include the `peerDbSystemId` parameter found in the -// CreateDataGuardAssociationToExistingDbSystemDetails -// object. -type CreateDataGuardAssociationDetails interface { - - // A strong password for the `SYS`, `SYSTEM`, and `PDB Admin` users to apply during standby creation. - // The password must contain no fewer than nine characters and include: - // * At least two uppercase characters. - // * At least two lowercase characters. - // * At least two numeric characters. - // * At least two special characters. Valid special characters include "_", "#", and "-" only. - // **The password MUST be the same as the primary admin password.** - GetDatabaseAdminPassword() *string - - // The protection mode to set up between the primary and standby databases. For more information, see - // Oracle Data Guard Protection Modes (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) - // in the Oracle Data Guard documentation. - // **IMPORTANT** - The only protection mode currently supported by the Database Service is MAXIMUM_PERFORMANCE. - GetProtectionMode() CreateDataGuardAssociationDetailsProtectionModeEnum - - // The redo transport type to use for this Data Guard association. Valid values depend on the specified `protectionMode`: - // * MAXIMUM_AVAILABILITY - SYNC or FASTSYNC - // * MAXIMUM_PERFORMANCE - ASYNC - // * MAXIMUM_PROTECTION - SYNC - // For more information, see - // Redo Transport Services (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) - // in the Oracle Data Guard documentation. - // **IMPORTANT** - The only transport type currently supported by the Database Service is ASYNC. - GetTransportType() CreateDataGuardAssociationDetailsTransportTypeEnum -} - -type createdataguardassociationdetails struct { - JsonData []byte - DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` - ProtectionMode CreateDataGuardAssociationDetailsProtectionModeEnum `mandatory:"true" json:"protectionMode"` - TransportType CreateDataGuardAssociationDetailsTransportTypeEnum `mandatory:"true" json:"transportType"` - CreationType string `json:"creationType"` -} - -// UnmarshalJSON unmarshals json -func (m *createdataguardassociationdetails) UnmarshalJSON(data []byte) error { - m.JsonData = data - type Unmarshalercreatedataguardassociationdetails createdataguardassociationdetails - s := struct { - Model Unmarshalercreatedataguardassociationdetails - }{} - err := json.Unmarshal(data, &s.Model) - if err != nil { - return err - } - m.DatabaseAdminPassword = s.Model.DatabaseAdminPassword - m.ProtectionMode = s.Model.ProtectionMode - m.TransportType = s.Model.TransportType - m.CreationType = s.Model.CreationType - - return err -} - -// UnmarshalPolymorphicJSON unmarshals polymorphic json -func (m *createdataguardassociationdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { - var err error - switch m.CreationType { - case "ExistingDbSystem": - mm := CreateDataGuardAssociationToExistingDbSystemDetails{} - err = json.Unmarshal(data, &mm) - return mm, err - default: - return m, nil - } -} - -//GetDatabaseAdminPassword returns DatabaseAdminPassword -func (m createdataguardassociationdetails) GetDatabaseAdminPassword() *string { - return m.DatabaseAdminPassword -} - -//GetProtectionMode returns ProtectionMode -func (m createdataguardassociationdetails) GetProtectionMode() CreateDataGuardAssociationDetailsProtectionModeEnum { - return m.ProtectionMode -} - -//GetTransportType returns TransportType -func (m createdataguardassociationdetails) GetTransportType() CreateDataGuardAssociationDetailsTransportTypeEnum { - return m.TransportType -} - -func (m createdataguardassociationdetails) String() string { - return common.PointerString(m) -} - -// CreateDataGuardAssociationDetailsProtectionModeEnum Enum with underlying type: string -type CreateDataGuardAssociationDetailsProtectionModeEnum string - -// Set of constants representing the allowable values for CreateDataGuardAssociationDetailsProtectionMode -const ( - CreateDataGuardAssociationDetailsProtectionModeAvailability CreateDataGuardAssociationDetailsProtectionModeEnum = "MAXIMUM_AVAILABILITY" - CreateDataGuardAssociationDetailsProtectionModePerformance CreateDataGuardAssociationDetailsProtectionModeEnum = "MAXIMUM_PERFORMANCE" - CreateDataGuardAssociationDetailsProtectionModeProtection CreateDataGuardAssociationDetailsProtectionModeEnum = "MAXIMUM_PROTECTION" -) - -var mappingCreateDataGuardAssociationDetailsProtectionMode = map[string]CreateDataGuardAssociationDetailsProtectionModeEnum{ - "MAXIMUM_AVAILABILITY": CreateDataGuardAssociationDetailsProtectionModeAvailability, - "MAXIMUM_PERFORMANCE": CreateDataGuardAssociationDetailsProtectionModePerformance, - "MAXIMUM_PROTECTION": CreateDataGuardAssociationDetailsProtectionModeProtection, -} - -// GetCreateDataGuardAssociationDetailsProtectionModeEnumValues Enumerates the set of values for CreateDataGuardAssociationDetailsProtectionMode -func GetCreateDataGuardAssociationDetailsProtectionModeEnumValues() []CreateDataGuardAssociationDetailsProtectionModeEnum { - values := make([]CreateDataGuardAssociationDetailsProtectionModeEnum, 0) - for _, v := range mappingCreateDataGuardAssociationDetailsProtectionMode { - values = append(values, v) - } - return values -} - -// CreateDataGuardAssociationDetailsTransportTypeEnum Enum with underlying type: string -type CreateDataGuardAssociationDetailsTransportTypeEnum string - -// Set of constants representing the allowable values for CreateDataGuardAssociationDetailsTransportType -const ( - CreateDataGuardAssociationDetailsTransportTypeSync CreateDataGuardAssociationDetailsTransportTypeEnum = "SYNC" - CreateDataGuardAssociationDetailsTransportTypeAsync CreateDataGuardAssociationDetailsTransportTypeEnum = "ASYNC" - CreateDataGuardAssociationDetailsTransportTypeFastsync CreateDataGuardAssociationDetailsTransportTypeEnum = "FASTSYNC" -) - -var mappingCreateDataGuardAssociationDetailsTransportType = map[string]CreateDataGuardAssociationDetailsTransportTypeEnum{ - "SYNC": CreateDataGuardAssociationDetailsTransportTypeSync, - "ASYNC": CreateDataGuardAssociationDetailsTransportTypeAsync, - "FASTSYNC": CreateDataGuardAssociationDetailsTransportTypeFastsync, -} - -// GetCreateDataGuardAssociationDetailsTransportTypeEnumValues Enumerates the set of values for CreateDataGuardAssociationDetailsTransportType -func GetCreateDataGuardAssociationDetailsTransportTypeEnumValues() []CreateDataGuardAssociationDetailsTransportTypeEnum { - values := make([]CreateDataGuardAssociationDetailsTransportTypeEnum, 0) - for _, v := range mappingCreateDataGuardAssociationDetailsTransportType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go deleted file mode 100644 index 5b5f42766..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateDataGuardAssociationRequest wrapper for the CreateDataGuardAssociation operation -type CreateDataGuardAssociationRequest struct { - - // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` - - // A request to create a Data Guard association. - CreateDataGuardAssociationDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (for example, if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateDataGuardAssociationRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateDataGuardAssociationResponse wrapper for the CreateDataGuardAssociation operation -type CreateDataGuardAssociationResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DataGuardAssociation instance - DataGuardAssociation `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateDataGuardAssociationResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateDataGuardAssociationResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_to_existing_db_system_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_to_existing_db_system_details.go deleted file mode 100644 index 0badd6d50..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_to_existing_db_system_details.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDataGuardAssociationToExistingDbSystemDetails The configuration details for creating a Data Guard association to an existing database. -type CreateDataGuardAssociationToExistingDbSystemDetails struct { - - // A strong password for the `SYS`, `SYSTEM`, and `PDB Admin` users to apply during standby creation. - // The password must contain no fewer than nine characters and include: - // * At least two uppercase characters. - // * At least two lowercase characters. - // * At least two numeric characters. - // * At least two special characters. Valid special characters include "_", "#", and "-" only. - // **The password MUST be the same as the primary admin password.** - DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System to create the standby database on. - PeerDbSystemId *string `mandatory:"false" json:"peerDbSystemId"` - - // The protection mode to set up between the primary and standby databases. For more information, see - // Oracle Data Guard Protection Modes (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) - // in the Oracle Data Guard documentation. - // **IMPORTANT** - The only protection mode currently supported by the Database Service is MAXIMUM_PERFORMANCE. - ProtectionMode CreateDataGuardAssociationDetailsProtectionModeEnum `mandatory:"true" json:"protectionMode"` - - // The redo transport type to use for this Data Guard association. Valid values depend on the specified `protectionMode`: - // * MAXIMUM_AVAILABILITY - SYNC or FASTSYNC - // * MAXIMUM_PERFORMANCE - ASYNC - // * MAXIMUM_PROTECTION - SYNC - // For more information, see - // Redo Transport Services (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) - // in the Oracle Data Guard documentation. - // **IMPORTANT** - The only transport type currently supported by the Database Service is ASYNC. - TransportType CreateDataGuardAssociationDetailsTransportTypeEnum `mandatory:"true" json:"transportType"` -} - -//GetDatabaseAdminPassword returns DatabaseAdminPassword -func (m CreateDataGuardAssociationToExistingDbSystemDetails) GetDatabaseAdminPassword() *string { - return m.DatabaseAdminPassword -} - -//GetProtectionMode returns ProtectionMode -func (m CreateDataGuardAssociationToExistingDbSystemDetails) GetProtectionMode() CreateDataGuardAssociationDetailsProtectionModeEnum { - return m.ProtectionMode -} - -//GetTransportType returns TransportType -func (m CreateDataGuardAssociationToExistingDbSystemDetails) GetTransportType() CreateDataGuardAssociationDetailsTransportTypeEnum { - return m.TransportType -} - -func (m CreateDataGuardAssociationToExistingDbSystemDetails) String() string { - return common.PointerString(m) -} - -// MarshalJSON marshals to json representation -func (m CreateDataGuardAssociationToExistingDbSystemDetails) MarshalJSON() (buff []byte, e error) { - type MarshalTypeCreateDataGuardAssociationToExistingDbSystemDetails CreateDataGuardAssociationToExistingDbSystemDetails - s := struct { - DiscriminatorParam string `json:"creationType"` - MarshalTypeCreateDataGuardAssociationToExistingDbSystemDetails - }{ - "ExistingDbSystem", - (MarshalTypeCreateDataGuardAssociationToExistingDbSystemDetails)(m), - } - - return json.Marshal(&s) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go deleted file mode 100644 index 5f119edee..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDatabaseDetails The representation of CreateDatabaseDetails -type CreateDatabaseDetails struct { - - // A strong password for SYS, SYSTEM, and PDB Admin. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numbers, and two special characters. The special characters must be _, \#, or -. - AdminPassword *string `mandatory:"true" json:"adminPassword"` - - // The database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. - DbName *string `mandatory:"true" json:"dbName"` - - // The character set for the database. The default is AL32UTF8. Allowed values are: - // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS - CharacterSet *string `mandatory:"false" json:"characterSet"` - - DbBackupConfig *DbBackupConfig `mandatory:"false" json:"dbBackupConfig"` - - // Database workload type. - DbWorkload CreateDatabaseDetailsDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // National character set for the database. The default is AL16UTF16. Allowed values are: - // AL16UTF16 or UTF8. - NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - - // Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. - PdbName *string `mandatory:"false" json:"pdbName"` -} - -func (m CreateDatabaseDetails) String() string { - return common.PointerString(m) -} - -// CreateDatabaseDetailsDbWorkloadEnum Enum with underlying type: string -type CreateDatabaseDetailsDbWorkloadEnum string - -// Set of constants representing the allowable values for CreateDatabaseDetailsDbWorkload -const ( - CreateDatabaseDetailsDbWorkloadOltp CreateDatabaseDetailsDbWorkloadEnum = "OLTP" - CreateDatabaseDetailsDbWorkloadDss CreateDatabaseDetailsDbWorkloadEnum = "DSS" -) - -var mappingCreateDatabaseDetailsDbWorkload = map[string]CreateDatabaseDetailsDbWorkloadEnum{ - "OLTP": CreateDatabaseDetailsDbWorkloadOltp, - "DSS": CreateDatabaseDetailsDbWorkloadDss, -} - -// GetCreateDatabaseDetailsDbWorkloadEnumValues Enumerates the set of values for CreateDatabaseDetailsDbWorkload -func GetCreateDatabaseDetailsDbWorkloadEnumValues() []CreateDatabaseDetailsDbWorkloadEnum { - values := make([]CreateDatabaseDetailsDbWorkloadEnum, 0) - for _, v := range mappingCreateDatabaseDetailsDbWorkload { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_database_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_database_from_backup_details.go deleted file mode 100644 index 9c25aadc4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_database_from_backup_details.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDatabaseFromBackupDetails The representation of CreateDatabaseFromBackupDetails -type CreateDatabaseFromBackupDetails struct { - - // A strong password for SYS, SYSTEM, PDB Admin and TDE Wallet. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numbers, and two special characters. The special characters must be _, \#, or -. - AdminPassword *string `mandatory:"true" json:"adminPassword"` - - // The backup OCID. - BackupId *string `mandatory:"true" json:"backupId"` - - // The password to open the TDE wallet. - BackupTDEPassword *string `mandatory:"true" json:"backupTDEPassword"` -} - -func (m CreateDatabaseFromBackupDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_details.go deleted file mode 100644 index 93eb4c928..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_details.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDbHomeDetails The representation of CreateDbHomeDetails -type CreateDbHomeDetails struct { - Database *CreateDatabaseDetails `mandatory:"true" json:"database"` - - // A valid Oracle database version. To get a list of supported versions, use the ListDbVersions operation. - DbVersion *string `mandatory:"true" json:"dbVersion"` - - // The user-provided name of the database home. - DisplayName *string `mandatory:"false" json:"displayName"` -} - -func (m CreateDbHomeDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_from_backup_details.go deleted file mode 100644 index 53966dcc2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_from_backup_details.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDbHomeFromBackupDetails The representation of CreateDbHomeFromBackupDetails -type CreateDbHomeFromBackupDetails struct { - Database *CreateDatabaseFromBackupDetails `mandatory:"true" json:"database"` - - // The user-provided name of the database home. - DisplayName *string `mandatory:"false" json:"displayName"` -} - -func (m CreateDbHomeFromBackupDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go deleted file mode 100644 index 5d1fedc5e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateDbHomeRequest wrapper for the CreateDbHome operation -type CreateDbHomeRequest struct { - - // Request to create a new DB Home. - CreateDbHomeWithDbSystemIdBase `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (for example, if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateDbHomeRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateDbHomeRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateDbHomeRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateDbHomeResponse wrapper for the CreateDbHome operation -type CreateDbHomeResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DbHome instance - DbHome `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateDbHomeResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateDbHomeResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_base.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_base.go deleted file mode 100644 index 670c00026..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_base.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDbHomeWithDbSystemIdBase The representation of CreateDbHomeWithDbSystemIdBase -type CreateDbHomeWithDbSystemIdBase interface { - - // The OCID of the DB System. - GetDbSystemId() *string - - // The user-provided name of the database home. - GetDisplayName() *string -} - -type createdbhomewithdbsystemidbase struct { - JsonData []byte - DbSystemId *string `mandatory:"true" json:"dbSystemId"` - DisplayName *string `mandatory:"false" json:"displayName"` - Source string `json:"source"` -} - -// UnmarshalJSON unmarshals json -func (m *createdbhomewithdbsystemidbase) UnmarshalJSON(data []byte) error { - m.JsonData = data - type Unmarshalercreatedbhomewithdbsystemidbase createdbhomewithdbsystemidbase - s := struct { - Model Unmarshalercreatedbhomewithdbsystemidbase - }{} - err := json.Unmarshal(data, &s.Model) - if err != nil { - return err - } - m.DbSystemId = s.Model.DbSystemId - m.DisplayName = s.Model.DisplayName - m.Source = s.Model.Source - - return err -} - -// UnmarshalPolymorphicJSON unmarshals polymorphic json -func (m *createdbhomewithdbsystemidbase) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { - var err error - switch m.Source { - case "DB_BACKUP": - mm := CreateDbHomeWithDbSystemIdFromBackupDetails{} - err = json.Unmarshal(data, &mm) - return mm, err - case "NONE": - mm := CreateDbHomeWithDbSystemIdDetails{} - err = json.Unmarshal(data, &mm) - return mm, err - default: - return m, nil - } -} - -//GetDbSystemId returns DbSystemId -func (m createdbhomewithdbsystemidbase) GetDbSystemId() *string { - return m.DbSystemId -} - -//GetDisplayName returns DisplayName -func (m createdbhomewithdbsystemidbase) GetDisplayName() *string { - return m.DisplayName -} - -func (m createdbhomewithdbsystemidbase) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_details.go deleted file mode 100644 index 92795f765..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_details.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDbHomeWithDbSystemIdDetails The representation of CreateDbHomeWithDbSystemIdDetails -type CreateDbHomeWithDbSystemIdDetails struct { - - // The OCID of the DB System. - DbSystemId *string `mandatory:"true" json:"dbSystemId"` - - Database *CreateDatabaseDetails `mandatory:"true" json:"database"` - - // A valid Oracle database version. To get a list of supported versions, use the ListDbVersions operation. - DbVersion *string `mandatory:"true" json:"dbVersion"` - - // The user-provided name of the database home. - DisplayName *string `mandatory:"false" json:"displayName"` -} - -//GetDbSystemId returns DbSystemId -func (m CreateDbHomeWithDbSystemIdDetails) GetDbSystemId() *string { - return m.DbSystemId -} - -//GetDisplayName returns DisplayName -func (m CreateDbHomeWithDbSystemIdDetails) GetDisplayName() *string { - return m.DisplayName -} - -func (m CreateDbHomeWithDbSystemIdDetails) String() string { - return common.PointerString(m) -} - -// MarshalJSON marshals to json representation -func (m CreateDbHomeWithDbSystemIdDetails) MarshalJSON() (buff []byte, e error) { - type MarshalTypeCreateDbHomeWithDbSystemIdDetails CreateDbHomeWithDbSystemIdDetails - s := struct { - DiscriminatorParam string `json:"source"` - MarshalTypeCreateDbHomeWithDbSystemIdDetails - }{ - "NONE", - (MarshalTypeCreateDbHomeWithDbSystemIdDetails)(m), - } - - return json.Marshal(&s) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_from_backup_details.go deleted file mode 100644 index 98f9fc305..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_from_backup_details.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDbHomeWithDbSystemIdFromBackupDetails The representation of CreateDbHomeWithDbSystemIdFromBackupDetails -type CreateDbHomeWithDbSystemIdFromBackupDetails struct { - - // The OCID of the DB System. - DbSystemId *string `mandatory:"true" json:"dbSystemId"` - - Database *CreateDatabaseFromBackupDetails `mandatory:"true" json:"database"` - - // The user-provided name of the database home. - DisplayName *string `mandatory:"false" json:"displayName"` -} - -//GetDbSystemId returns DbSystemId -func (m CreateDbHomeWithDbSystemIdFromBackupDetails) GetDbSystemId() *string { - return m.DbSystemId -} - -//GetDisplayName returns DisplayName -func (m CreateDbHomeWithDbSystemIdFromBackupDetails) GetDisplayName() *string { - return m.DisplayName -} - -func (m CreateDbHomeWithDbSystemIdFromBackupDetails) String() string { - return common.PointerString(m) -} - -// MarshalJSON marshals to json representation -func (m CreateDbHomeWithDbSystemIdFromBackupDetails) MarshalJSON() (buff []byte, e error) { - type MarshalTypeCreateDbHomeWithDbSystemIdFromBackupDetails CreateDbHomeWithDbSystemIdFromBackupDetails - s := struct { - DiscriminatorParam string `json:"source"` - MarshalTypeCreateDbHomeWithDbSystemIdFromBackupDetails - }{ - "DB_BACKUP", - (MarshalTypeCreateDbHomeWithDbSystemIdFromBackupDetails)(m), - } - - return json.Marshal(&s) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association.go b/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association.go deleted file mode 100644 index d572feb42..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DataGuardAssociation The properties that define a Data Guard association. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an -// administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -// For information about endpoints and signing API requests, see -// About the API (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see -// SDKS and Other Tools (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdks.htm). -type DataGuardAssociation struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the reporting database. - DatabaseId *string `mandatory:"true" json:"databaseId"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Data Guard association. - Id *string `mandatory:"true" json:"id"` - - // The current state of the Data Guard association. - LifecycleState DataGuardAssociationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System containing the associated - // peer database. - PeerDbSystemId *string `mandatory:"true" json:"peerDbSystemId"` - - // The role of the peer database in this Data Guard association. - PeerRole DataGuardAssociationPeerRoleEnum `mandatory:"true" json:"peerRole"` - - // The protection mode of this Data Guard association. For more information, see - // Oracle Data Guard Protection Modes (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) - // in the Oracle Data Guard documentation. - ProtectionMode DataGuardAssociationProtectionModeEnum `mandatory:"true" json:"protectionMode"` - - // The role of the reporting database in this Data Guard association. - Role DataGuardAssociationRoleEnum `mandatory:"true" json:"role"` - - // The lag time between updates to the primary database and application of the redo data on the standby database, - // as computed by the reporting database. - // Example: `9 seconds` - ApplyLag *string `mandatory:"false" json:"applyLag"` - - // The rate at which redo logs are synced between the associated databases. - // Example: `180 Mb per second` - ApplyRate *string `mandatory:"false" json:"applyRate"` - - // Additional information about the current lifecycleState, if available. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the peer database's Data Guard association. - PeerDataGuardAssociationId *string `mandatory:"false" json:"peerDataGuardAssociationId"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the associated peer database. - PeerDatabaseId *string `mandatory:"false" json:"peerDatabaseId"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the database home containing the associated peer database. - PeerDbHomeId *string `mandatory:"false" json:"peerDbHomeId"` - - // The date and time the Data Guard Association was created. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // The redo transport type used by this Data Guard association. For more information, see - // Redo Transport Services (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) - // in the Oracle Data Guard documentation. - TransportType DataGuardAssociationTransportTypeEnum `mandatory:"false" json:"transportType,omitempty"` -} - -func (m DataGuardAssociation) String() string { - return common.PointerString(m) -} - -// DataGuardAssociationLifecycleStateEnum Enum with underlying type: string -type DataGuardAssociationLifecycleStateEnum string - -// Set of constants representing the allowable values for DataGuardAssociationLifecycleState -const ( - DataGuardAssociationLifecycleStateProvisioning DataGuardAssociationLifecycleStateEnum = "PROVISIONING" - DataGuardAssociationLifecycleStateAvailable DataGuardAssociationLifecycleStateEnum = "AVAILABLE" - DataGuardAssociationLifecycleStateUpdating DataGuardAssociationLifecycleStateEnum = "UPDATING" - DataGuardAssociationLifecycleStateTerminating DataGuardAssociationLifecycleStateEnum = "TERMINATING" - DataGuardAssociationLifecycleStateTerminated DataGuardAssociationLifecycleStateEnum = "TERMINATED" - DataGuardAssociationLifecycleStateFailed DataGuardAssociationLifecycleStateEnum = "FAILED" -) - -var mappingDataGuardAssociationLifecycleState = map[string]DataGuardAssociationLifecycleStateEnum{ - "PROVISIONING": DataGuardAssociationLifecycleStateProvisioning, - "AVAILABLE": DataGuardAssociationLifecycleStateAvailable, - "UPDATING": DataGuardAssociationLifecycleStateUpdating, - "TERMINATING": DataGuardAssociationLifecycleStateTerminating, - "TERMINATED": DataGuardAssociationLifecycleStateTerminated, - "FAILED": DataGuardAssociationLifecycleStateFailed, -} - -// GetDataGuardAssociationLifecycleStateEnumValues Enumerates the set of values for DataGuardAssociationLifecycleState -func GetDataGuardAssociationLifecycleStateEnumValues() []DataGuardAssociationLifecycleStateEnum { - values := make([]DataGuardAssociationLifecycleStateEnum, 0) - for _, v := range mappingDataGuardAssociationLifecycleState { - values = append(values, v) - } - return values -} - -// DataGuardAssociationPeerRoleEnum Enum with underlying type: string -type DataGuardAssociationPeerRoleEnum string - -// Set of constants representing the allowable values for DataGuardAssociationPeerRole -const ( - DataGuardAssociationPeerRolePrimary DataGuardAssociationPeerRoleEnum = "PRIMARY" - DataGuardAssociationPeerRoleStandby DataGuardAssociationPeerRoleEnum = "STANDBY" - DataGuardAssociationPeerRoleDisabledStandby DataGuardAssociationPeerRoleEnum = "DISABLED_STANDBY" -) - -var mappingDataGuardAssociationPeerRole = map[string]DataGuardAssociationPeerRoleEnum{ - "PRIMARY": DataGuardAssociationPeerRolePrimary, - "STANDBY": DataGuardAssociationPeerRoleStandby, - "DISABLED_STANDBY": DataGuardAssociationPeerRoleDisabledStandby, -} - -// GetDataGuardAssociationPeerRoleEnumValues Enumerates the set of values for DataGuardAssociationPeerRole -func GetDataGuardAssociationPeerRoleEnumValues() []DataGuardAssociationPeerRoleEnum { - values := make([]DataGuardAssociationPeerRoleEnum, 0) - for _, v := range mappingDataGuardAssociationPeerRole { - values = append(values, v) - } - return values -} - -// DataGuardAssociationProtectionModeEnum Enum with underlying type: string -type DataGuardAssociationProtectionModeEnum string - -// Set of constants representing the allowable values for DataGuardAssociationProtectionMode -const ( - DataGuardAssociationProtectionModeAvailability DataGuardAssociationProtectionModeEnum = "MAXIMUM_AVAILABILITY" - DataGuardAssociationProtectionModePerformance DataGuardAssociationProtectionModeEnum = "MAXIMUM_PERFORMANCE" - DataGuardAssociationProtectionModeProtection DataGuardAssociationProtectionModeEnum = "MAXIMUM_PROTECTION" -) - -var mappingDataGuardAssociationProtectionMode = map[string]DataGuardAssociationProtectionModeEnum{ - "MAXIMUM_AVAILABILITY": DataGuardAssociationProtectionModeAvailability, - "MAXIMUM_PERFORMANCE": DataGuardAssociationProtectionModePerformance, - "MAXIMUM_PROTECTION": DataGuardAssociationProtectionModeProtection, -} - -// GetDataGuardAssociationProtectionModeEnumValues Enumerates the set of values for DataGuardAssociationProtectionMode -func GetDataGuardAssociationProtectionModeEnumValues() []DataGuardAssociationProtectionModeEnum { - values := make([]DataGuardAssociationProtectionModeEnum, 0) - for _, v := range mappingDataGuardAssociationProtectionMode { - values = append(values, v) - } - return values -} - -// DataGuardAssociationRoleEnum Enum with underlying type: string -type DataGuardAssociationRoleEnum string - -// Set of constants representing the allowable values for DataGuardAssociationRole -const ( - DataGuardAssociationRolePrimary DataGuardAssociationRoleEnum = "PRIMARY" - DataGuardAssociationRoleStandby DataGuardAssociationRoleEnum = "STANDBY" - DataGuardAssociationRoleDisabledStandby DataGuardAssociationRoleEnum = "DISABLED_STANDBY" -) - -var mappingDataGuardAssociationRole = map[string]DataGuardAssociationRoleEnum{ - "PRIMARY": DataGuardAssociationRolePrimary, - "STANDBY": DataGuardAssociationRoleStandby, - "DISABLED_STANDBY": DataGuardAssociationRoleDisabledStandby, -} - -// GetDataGuardAssociationRoleEnumValues Enumerates the set of values for DataGuardAssociationRole -func GetDataGuardAssociationRoleEnumValues() []DataGuardAssociationRoleEnum { - values := make([]DataGuardAssociationRoleEnum, 0) - for _, v := range mappingDataGuardAssociationRole { - values = append(values, v) - } - return values -} - -// DataGuardAssociationTransportTypeEnum Enum with underlying type: string -type DataGuardAssociationTransportTypeEnum string - -// Set of constants representing the allowable values for DataGuardAssociationTransportType -const ( - DataGuardAssociationTransportTypeSync DataGuardAssociationTransportTypeEnum = "SYNC" - DataGuardAssociationTransportTypeAsync DataGuardAssociationTransportTypeEnum = "ASYNC" - DataGuardAssociationTransportTypeFastsync DataGuardAssociationTransportTypeEnum = "FASTSYNC" -) - -var mappingDataGuardAssociationTransportType = map[string]DataGuardAssociationTransportTypeEnum{ - "SYNC": DataGuardAssociationTransportTypeSync, - "ASYNC": DataGuardAssociationTransportTypeAsync, - "FASTSYNC": DataGuardAssociationTransportTypeFastsync, -} - -// GetDataGuardAssociationTransportTypeEnumValues Enumerates the set of values for DataGuardAssociationTransportType -func GetDataGuardAssociationTransportTypeEnumValues() []DataGuardAssociationTransportTypeEnum { - values := make([]DataGuardAssociationTransportTypeEnum, 0) - for _, v := range mappingDataGuardAssociationTransportType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association_summary.go deleted file mode 100644 index ebfc69c62..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association_summary.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DataGuardAssociationSummary The properties that define a Data Guard association. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an -// administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -// For information about endpoints and signing API requests, see -// About the API (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see -// SDKS and Other Tools (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdks.htm). -type DataGuardAssociationSummary struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the reporting database. - DatabaseId *string `mandatory:"true" json:"databaseId"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Data Guard association. - Id *string `mandatory:"true" json:"id"` - - // The current state of the Data Guard association. - LifecycleState DataGuardAssociationSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System containing the associated - // peer database. - PeerDbSystemId *string `mandatory:"true" json:"peerDbSystemId"` - - // The role of the peer database in this Data Guard association. - PeerRole DataGuardAssociationSummaryPeerRoleEnum `mandatory:"true" json:"peerRole"` - - // The protection mode of this Data Guard association. For more information, see - // Oracle Data Guard Protection Modes (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) - // in the Oracle Data Guard documentation. - ProtectionMode DataGuardAssociationSummaryProtectionModeEnum `mandatory:"true" json:"protectionMode"` - - // The role of the reporting database in this Data Guard association. - Role DataGuardAssociationSummaryRoleEnum `mandatory:"true" json:"role"` - - // The lag time between updates to the primary database and application of the redo data on the standby database, - // as computed by the reporting database. - // Example: `9 seconds` - ApplyLag *string `mandatory:"false" json:"applyLag"` - - // The rate at which redo logs are synced between the associated databases. - // Example: `180 Mb per second` - ApplyRate *string `mandatory:"false" json:"applyRate"` - - // Additional information about the current lifecycleState, if available. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the peer database's Data Guard association. - PeerDataGuardAssociationId *string `mandatory:"false" json:"peerDataGuardAssociationId"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the associated peer database. - PeerDatabaseId *string `mandatory:"false" json:"peerDatabaseId"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the database home containing the associated peer database. - PeerDbHomeId *string `mandatory:"false" json:"peerDbHomeId"` - - // The date and time the Data Guard Association was created. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // The redo transport type used by this Data Guard association. For more information, see - // Redo Transport Services (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) - // in the Oracle Data Guard documentation. - TransportType DataGuardAssociationSummaryTransportTypeEnum `mandatory:"false" json:"transportType,omitempty"` -} - -func (m DataGuardAssociationSummary) String() string { - return common.PointerString(m) -} - -// DataGuardAssociationSummaryLifecycleStateEnum Enum with underlying type: string -type DataGuardAssociationSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for DataGuardAssociationSummaryLifecycleState -const ( - DataGuardAssociationSummaryLifecycleStateProvisioning DataGuardAssociationSummaryLifecycleStateEnum = "PROVISIONING" - DataGuardAssociationSummaryLifecycleStateAvailable DataGuardAssociationSummaryLifecycleStateEnum = "AVAILABLE" - DataGuardAssociationSummaryLifecycleStateUpdating DataGuardAssociationSummaryLifecycleStateEnum = "UPDATING" - DataGuardAssociationSummaryLifecycleStateTerminating DataGuardAssociationSummaryLifecycleStateEnum = "TERMINATING" - DataGuardAssociationSummaryLifecycleStateTerminated DataGuardAssociationSummaryLifecycleStateEnum = "TERMINATED" - DataGuardAssociationSummaryLifecycleStateFailed DataGuardAssociationSummaryLifecycleStateEnum = "FAILED" -) - -var mappingDataGuardAssociationSummaryLifecycleState = map[string]DataGuardAssociationSummaryLifecycleStateEnum{ - "PROVISIONING": DataGuardAssociationSummaryLifecycleStateProvisioning, - "AVAILABLE": DataGuardAssociationSummaryLifecycleStateAvailable, - "UPDATING": DataGuardAssociationSummaryLifecycleStateUpdating, - "TERMINATING": DataGuardAssociationSummaryLifecycleStateTerminating, - "TERMINATED": DataGuardAssociationSummaryLifecycleStateTerminated, - "FAILED": DataGuardAssociationSummaryLifecycleStateFailed, -} - -// GetDataGuardAssociationSummaryLifecycleStateEnumValues Enumerates the set of values for DataGuardAssociationSummaryLifecycleState -func GetDataGuardAssociationSummaryLifecycleStateEnumValues() []DataGuardAssociationSummaryLifecycleStateEnum { - values := make([]DataGuardAssociationSummaryLifecycleStateEnum, 0) - for _, v := range mappingDataGuardAssociationSummaryLifecycleState { - values = append(values, v) - } - return values -} - -// DataGuardAssociationSummaryPeerRoleEnum Enum with underlying type: string -type DataGuardAssociationSummaryPeerRoleEnum string - -// Set of constants representing the allowable values for DataGuardAssociationSummaryPeerRole -const ( - DataGuardAssociationSummaryPeerRolePrimary DataGuardAssociationSummaryPeerRoleEnum = "PRIMARY" - DataGuardAssociationSummaryPeerRoleStandby DataGuardAssociationSummaryPeerRoleEnum = "STANDBY" - DataGuardAssociationSummaryPeerRoleDisabledStandby DataGuardAssociationSummaryPeerRoleEnum = "DISABLED_STANDBY" -) - -var mappingDataGuardAssociationSummaryPeerRole = map[string]DataGuardAssociationSummaryPeerRoleEnum{ - "PRIMARY": DataGuardAssociationSummaryPeerRolePrimary, - "STANDBY": DataGuardAssociationSummaryPeerRoleStandby, - "DISABLED_STANDBY": DataGuardAssociationSummaryPeerRoleDisabledStandby, -} - -// GetDataGuardAssociationSummaryPeerRoleEnumValues Enumerates the set of values for DataGuardAssociationSummaryPeerRole -func GetDataGuardAssociationSummaryPeerRoleEnumValues() []DataGuardAssociationSummaryPeerRoleEnum { - values := make([]DataGuardAssociationSummaryPeerRoleEnum, 0) - for _, v := range mappingDataGuardAssociationSummaryPeerRole { - values = append(values, v) - } - return values -} - -// DataGuardAssociationSummaryProtectionModeEnum Enum with underlying type: string -type DataGuardAssociationSummaryProtectionModeEnum string - -// Set of constants representing the allowable values for DataGuardAssociationSummaryProtectionMode -const ( - DataGuardAssociationSummaryProtectionModeAvailability DataGuardAssociationSummaryProtectionModeEnum = "MAXIMUM_AVAILABILITY" - DataGuardAssociationSummaryProtectionModePerformance DataGuardAssociationSummaryProtectionModeEnum = "MAXIMUM_PERFORMANCE" - DataGuardAssociationSummaryProtectionModeProtection DataGuardAssociationSummaryProtectionModeEnum = "MAXIMUM_PROTECTION" -) - -var mappingDataGuardAssociationSummaryProtectionMode = map[string]DataGuardAssociationSummaryProtectionModeEnum{ - "MAXIMUM_AVAILABILITY": DataGuardAssociationSummaryProtectionModeAvailability, - "MAXIMUM_PERFORMANCE": DataGuardAssociationSummaryProtectionModePerformance, - "MAXIMUM_PROTECTION": DataGuardAssociationSummaryProtectionModeProtection, -} - -// GetDataGuardAssociationSummaryProtectionModeEnumValues Enumerates the set of values for DataGuardAssociationSummaryProtectionMode -func GetDataGuardAssociationSummaryProtectionModeEnumValues() []DataGuardAssociationSummaryProtectionModeEnum { - values := make([]DataGuardAssociationSummaryProtectionModeEnum, 0) - for _, v := range mappingDataGuardAssociationSummaryProtectionMode { - values = append(values, v) - } - return values -} - -// DataGuardAssociationSummaryRoleEnum Enum with underlying type: string -type DataGuardAssociationSummaryRoleEnum string - -// Set of constants representing the allowable values for DataGuardAssociationSummaryRole -const ( - DataGuardAssociationSummaryRolePrimary DataGuardAssociationSummaryRoleEnum = "PRIMARY" - DataGuardAssociationSummaryRoleStandby DataGuardAssociationSummaryRoleEnum = "STANDBY" - DataGuardAssociationSummaryRoleDisabledStandby DataGuardAssociationSummaryRoleEnum = "DISABLED_STANDBY" -) - -var mappingDataGuardAssociationSummaryRole = map[string]DataGuardAssociationSummaryRoleEnum{ - "PRIMARY": DataGuardAssociationSummaryRolePrimary, - "STANDBY": DataGuardAssociationSummaryRoleStandby, - "DISABLED_STANDBY": DataGuardAssociationSummaryRoleDisabledStandby, -} - -// GetDataGuardAssociationSummaryRoleEnumValues Enumerates the set of values for DataGuardAssociationSummaryRole -func GetDataGuardAssociationSummaryRoleEnumValues() []DataGuardAssociationSummaryRoleEnum { - values := make([]DataGuardAssociationSummaryRoleEnum, 0) - for _, v := range mappingDataGuardAssociationSummaryRole { - values = append(values, v) - } - return values -} - -// DataGuardAssociationSummaryTransportTypeEnum Enum with underlying type: string -type DataGuardAssociationSummaryTransportTypeEnum string - -// Set of constants representing the allowable values for DataGuardAssociationSummaryTransportType -const ( - DataGuardAssociationSummaryTransportTypeSync DataGuardAssociationSummaryTransportTypeEnum = "SYNC" - DataGuardAssociationSummaryTransportTypeAsync DataGuardAssociationSummaryTransportTypeEnum = "ASYNC" - DataGuardAssociationSummaryTransportTypeFastsync DataGuardAssociationSummaryTransportTypeEnum = "FASTSYNC" -) - -var mappingDataGuardAssociationSummaryTransportType = map[string]DataGuardAssociationSummaryTransportTypeEnum{ - "SYNC": DataGuardAssociationSummaryTransportTypeSync, - "ASYNC": DataGuardAssociationSummaryTransportTypeAsync, - "FASTSYNC": DataGuardAssociationSummaryTransportTypeFastsync, -} - -// GetDataGuardAssociationSummaryTransportTypeEnumValues Enumerates the set of values for DataGuardAssociationSummaryTransportType -func GetDataGuardAssociationSummaryTransportTypeEnumValues() []DataGuardAssociationSummaryTransportTypeEnum { - values := make([]DataGuardAssociationSummaryTransportTypeEnum, 0) - for _, v := range mappingDataGuardAssociationSummaryTransportType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/database.go b/vendor/github.com/oracle/oci-go-sdk/database/database.go deleted file mode 100644 index f0979ccb3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/database.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Database An Oracle database on a DB System. For more information, see Managing Oracle Databases (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type Database struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The database name. - DbName *string `mandatory:"true" json:"dbName"` - - // A system-generated name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases). The unique name cannot be changed. - DbUniqueName *string `mandatory:"true" json:"dbUniqueName"` - - // The OCID of the database. - Id *string `mandatory:"true" json:"id"` - - // The current state of the database. - LifecycleState DatabaseLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The character set for the database. - CharacterSet *string `mandatory:"false" json:"characterSet"` - - DbBackupConfig *DbBackupConfig `mandatory:"false" json:"dbBackupConfig"` - - // The OCID of the database home. - DbHomeId *string `mandatory:"false" json:"dbHomeId"` - - // Database workload type. - DbWorkload *string `mandatory:"false" json:"dbWorkload"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Additional information about the current lifecycleState. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The national character set for the database. - NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - - // Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. - PdbName *string `mandatory:"false" json:"pdbName"` - - // The date and time the database was created. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m Database) String() string { - return common.PointerString(m) -} - -// DatabaseLifecycleStateEnum Enum with underlying type: string -type DatabaseLifecycleStateEnum string - -// Set of constants representing the allowable values for DatabaseLifecycleState -const ( - DatabaseLifecycleStateProvisioning DatabaseLifecycleStateEnum = "PROVISIONING" - DatabaseLifecycleStateAvailable DatabaseLifecycleStateEnum = "AVAILABLE" - DatabaseLifecycleStateUpdating DatabaseLifecycleStateEnum = "UPDATING" - DatabaseLifecycleStateBackupInProgress DatabaseLifecycleStateEnum = "BACKUP_IN_PROGRESS" - DatabaseLifecycleStateTerminating DatabaseLifecycleStateEnum = "TERMINATING" - DatabaseLifecycleStateTerminated DatabaseLifecycleStateEnum = "TERMINATED" - DatabaseLifecycleStateRestoreFailed DatabaseLifecycleStateEnum = "RESTORE_FAILED" - DatabaseLifecycleStateFailed DatabaseLifecycleStateEnum = "FAILED" -) - -var mappingDatabaseLifecycleState = map[string]DatabaseLifecycleStateEnum{ - "PROVISIONING": DatabaseLifecycleStateProvisioning, - "AVAILABLE": DatabaseLifecycleStateAvailable, - "UPDATING": DatabaseLifecycleStateUpdating, - "BACKUP_IN_PROGRESS": DatabaseLifecycleStateBackupInProgress, - "TERMINATING": DatabaseLifecycleStateTerminating, - "TERMINATED": DatabaseLifecycleStateTerminated, - "RESTORE_FAILED": DatabaseLifecycleStateRestoreFailed, - "FAILED": DatabaseLifecycleStateFailed, -} - -// GetDatabaseLifecycleStateEnumValues Enumerates the set of values for DatabaseLifecycleState -func GetDatabaseLifecycleStateEnumValues() []DatabaseLifecycleStateEnum { - values := make([]DatabaseLifecycleStateEnum, 0) - for _, v := range mappingDatabaseLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/database_client.go b/vendor/github.com/oracle/oci-go-sdk/database/database_client.go deleted file mode 100644 index cab6c6904..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/database_client.go +++ /dev/null @@ -1,1530 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -//DatabaseClient a client for Database -type DatabaseClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewDatabaseClientWithConfigurationProvider Creates a new default Database client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewDatabaseClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client DatabaseClient, err error) { - baseClient, err := common.NewClientWithConfig(configProvider) - if err != nil { - return - } - - client = DatabaseClient{BaseClient: baseClient} - client.BasePath = "20160918" - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *DatabaseClient) SetRegion(region string) { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "database", region) -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *DatabaseClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { - if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { - return err - } - - // Error has been checked already - region, _ := configProvider.Region() - client.SetRegion(region) - client.config = &configProvider - return nil -} - -// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set -func (client *DatabaseClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// CreateBackup Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. -func (client DatabaseClient) CreateBackup(ctx context.Context, request CreateBackupRequest) (response CreateBackupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createBackup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateBackupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateBackupResponse") - } - return -} - -// createBackup implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) createBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/backups") - if err != nil { - return nil, err - } - - var response CreateBackupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateDataGuardAssociation Creates a new Data Guard association. A Data Guard association represents the replication relationship between the -// specified database and a peer database. For more information, see Using Oracle Data Guard (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/usingdataguard.htm). -// All Oracle Cloud Infrastructure resources, including Data Guard associations, get an Oracle-assigned, unique ID -// called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. -// You can also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the -// resource in the Console. For more information, see -// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). -func (client DatabaseClient) CreateDataGuardAssociation(ctx context.Context, request CreateDataGuardAssociationRequest) (response CreateDataGuardAssociationResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createDataGuardAssociation, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateDataGuardAssociationResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateDataGuardAssociationResponse") - } - return -} - -// createDataGuardAssociation implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) createDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations") - if err != nil { - return nil, err - } - - var response CreateDataGuardAssociationResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateDbHome Creates a new DB Home in the specified DB System based on the request parameters you provide. -func (client DatabaseClient) CreateDbHome(ctx context.Context, request CreateDbHomeRequest) (response CreateDbHomeResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createDbHome, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateDbHomeResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateDbHomeResponse") - } - return -} - -// createDbHome implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) createDbHome(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbHomes") - if err != nil { - return nil, err - } - - var response CreateDbHomeResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DbNodeAction Performs an action, such as one of the power actions (start, stop, softreset, or reset), on the specified DB Node. -// **start** - power on -// **stop** - power off -// **softreset** - ACPI shutdown and power on -// **reset** - power off and power on -// Note that the **stop** state has no effect on the resources you consume. -// Billing continues for DB Nodes that you stop, and related resources continue -// to apply against any relevant quotas. You must terminate the DB System -// (TerminateDbSystem) -// to remove its resources from billing and quotas. -func (client DatabaseClient) DbNodeAction(ctx context.Context, request DbNodeActionRequest) (response DbNodeActionResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.dbNodeAction, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DbNodeActionResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DbNodeActionResponse") - } - return -} - -// dbNodeAction implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) dbNodeAction(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbNodes/{dbNodeId}") - if err != nil { - return nil, err - } - - var response DbNodeActionResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteBackup Deletes a full backup. You cannot delete automatic backups using this API. -func (client DatabaseClient) DeleteBackup(ctx context.Context, request DeleteBackupRequest) (response DeleteBackupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteBackup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteBackupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteBackupResponse") - } - return -} - -// deleteBackup implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) deleteBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/backups/{backupId}") - if err != nil { - return nil, err - } - - var response DeleteBackupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteDbHome Deletes a DB Home. The DB Home and its database data are local to the DB System and will be lost when it is deleted. Oracle recommends that you back up any data in the DB System prior to deleting it. -func (client DatabaseClient) DeleteDbHome(ctx context.Context, request DeleteDbHomeRequest) (response DeleteDbHomeResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteDbHome, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteDbHomeResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteDbHomeResponse") - } - return -} - -// deleteDbHome implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) deleteDbHome(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dbHomes/{dbHomeId}") - if err != nil { - return nil, err - } - - var response DeleteDbHomeResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// FailoverDataGuardAssociation Performs a failover to transition the standby database identified by the `databaseId` parameter into the -// specified Data Guard association's primary role after the existing primary database fails or becomes unreachable. -// A failover might result in data loss depending on the protection mode in effect at the time of the primary -// database failure. -func (client DatabaseClient) FailoverDataGuardAssociation(ctx context.Context, request FailoverDataGuardAssociationRequest) (response FailoverDataGuardAssociationResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.failoverDataGuardAssociation, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(FailoverDataGuardAssociationResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into FailoverDataGuardAssociationResponse") - } - return -} - -// failoverDataGuardAssociation implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) failoverDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/failover") - if err != nil { - return nil, err - } - - var response FailoverDataGuardAssociationResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetBackup Gets information about the specified backup. -func (client DatabaseClient) GetBackup(ctx context.Context, request GetBackupRequest) (response GetBackupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getBackup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetBackupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBackupResponse") - } - return -} - -// getBackup implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getBackup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/backups/{backupId}") - if err != nil { - return nil, err - } - - var response GetBackupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDataGuardAssociation Gets the specified Data Guard association's configuration information. -func (client DatabaseClient) GetDataGuardAssociation(ctx context.Context, request GetDataGuardAssociationRequest) (response GetDataGuardAssociationResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDataGuardAssociation, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDataGuardAssociationResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDataGuardAssociationResponse") - } - return -} - -// getDataGuardAssociation implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}") - if err != nil { - return nil, err - } - - var response GetDataGuardAssociationResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDatabase Gets information about a specific database. -func (client DatabaseClient) GetDatabase(ctx context.Context, request GetDatabaseRequest) (response GetDatabaseResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDatabase, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDatabaseResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDatabaseResponse") - } - return -} - -// getDatabase implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getDatabase(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/databases/{databaseId}") - if err != nil { - return nil, err - } - - var response GetDatabaseResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDbHome Gets information about the specified database home. -func (client DatabaseClient) GetDbHome(ctx context.Context, request GetDbHomeRequest) (response GetDbHomeResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDbHome, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDbHomeResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDbHomeResponse") - } - return -} - -// getDbHome implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getDbHome(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}") - if err != nil { - return nil, err - } - - var response GetDbHomeResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDbHomePatch Gets information about a specified patch package. -func (client DatabaseClient) GetDbHomePatch(ctx context.Context, request GetDbHomePatchRequest) (response GetDbHomePatchResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDbHomePatch, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDbHomePatchResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDbHomePatchResponse") - } - return -} - -// getDbHomePatch implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getDbHomePatch(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}/patches/{patchId}") - if err != nil { - return nil, err - } - - var response GetDbHomePatchResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDbHomePatchHistoryEntry Gets the patch history details for the specified patchHistoryEntryId -func (client DatabaseClient) GetDbHomePatchHistoryEntry(ctx context.Context, request GetDbHomePatchHistoryEntryRequest) (response GetDbHomePatchHistoryEntryResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDbHomePatchHistoryEntry, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDbHomePatchHistoryEntryResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDbHomePatchHistoryEntryResponse") - } - return -} - -// getDbHomePatchHistoryEntry implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getDbHomePatchHistoryEntry(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}/patchHistoryEntries/{patchHistoryEntryId}") - if err != nil { - return nil, err - } - - var response GetDbHomePatchHistoryEntryResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDbNode Gets information about the specified database node. -func (client DatabaseClient) GetDbNode(ctx context.Context, request GetDbNodeRequest) (response GetDbNodeResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDbNode, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDbNodeResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDbNodeResponse") - } - return -} - -// getDbNode implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getDbNode(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbNodes/{dbNodeId}") - if err != nil { - return nil, err - } - - var response GetDbNodeResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDbSystem Gets information about the specified DB System. -func (client DatabaseClient) GetDbSystem(ctx context.Context, request GetDbSystemRequest) (response GetDbSystemResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDbSystem, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDbSystemResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDbSystemResponse") - } - return -} - -// getDbSystem implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getDbSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}") - if err != nil { - return nil, err - } - - var response GetDbSystemResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDbSystemPatch Gets information about a specified patch package. -func (client DatabaseClient) GetDbSystemPatch(ctx context.Context, request GetDbSystemPatchRequest) (response GetDbSystemPatchResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDbSystemPatch, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDbSystemPatchResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDbSystemPatchResponse") - } - return -} - -// getDbSystemPatch implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getDbSystemPatch(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/patches/{patchId}") - if err != nil { - return nil, err - } - - var response GetDbSystemPatchResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDbSystemPatchHistoryEntry Gets the patch history details for the specified patchHistoryEntryId. -func (client DatabaseClient) GetDbSystemPatchHistoryEntry(ctx context.Context, request GetDbSystemPatchHistoryEntryRequest) (response GetDbSystemPatchHistoryEntryResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDbSystemPatchHistoryEntry, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDbSystemPatchHistoryEntryResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDbSystemPatchHistoryEntryResponse") - } - return -} - -// getDbSystemPatchHistoryEntry implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) getDbSystemPatchHistoryEntry(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/patchHistoryEntries/{patchHistoryEntryId}") - if err != nil { - return nil, err - } - - var response GetDbSystemPatchHistoryEntryResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// LaunchDbSystem Launches a new DB System in the specified compartment and Availability Domain. You'll specify a single Oracle -// Database Edition that applies to all the databases on that DB System. The selected edition cannot be changed. -// An initial database is created on the DB System based on the request parameters you provide and some default -// options. For more information, -// see Default Options for the Initial Database (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/launchingDB.htm#Default_Options_for_the_Initial_Database). -// The DB System will include a command line interface (CLI) that you can use to create additional databases and -// manage existing databases. For more information, see the -// Oracle Database CLI Reference (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/References/odacli.htm#Oracle_Database_CLI_Reference). -func (client DatabaseClient) LaunchDbSystem(ctx context.Context, request LaunchDbSystemRequest) (response LaunchDbSystemResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.launchDbSystem, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(LaunchDbSystemResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into LaunchDbSystemResponse") - } - return -} - -// launchDbSystem implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) launchDbSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems") - if err != nil { - return nil, err - } - - var response LaunchDbSystemResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListBackups Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided. -func (client DatabaseClient) ListBackups(ctx context.Context, request ListBackupsRequest) (response ListBackupsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listBackups, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListBackupsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListBackupsResponse") - } - return -} - -// listBackups implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listBackups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/backups") - if err != nil { - return nil, err - } - - var response ListBackupsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDataGuardAssociations Lists all Data Guard associations for the specified database. -func (client DatabaseClient) ListDataGuardAssociations(ctx context.Context, request ListDataGuardAssociationsRequest) (response ListDataGuardAssociationsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDataGuardAssociations, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDataGuardAssociationsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDataGuardAssociationsResponse") - } - return -} - -// listDataGuardAssociations implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDataGuardAssociations(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/databases/{databaseId}/dataGuardAssociations") - if err != nil { - return nil, err - } - - var response ListDataGuardAssociationsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDatabases Gets a list of the databases in the specified database home. -func (client DatabaseClient) ListDatabases(ctx context.Context, request ListDatabasesRequest) (response ListDatabasesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDatabases, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDatabasesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDatabasesResponse") - } - return -} - -// listDatabases implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDatabases(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/databases") - if err != nil { - return nil, err - } - - var response ListDatabasesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDbHomePatchHistoryEntries Gets history of the actions taken for patches for the specified database home. -func (client DatabaseClient) ListDbHomePatchHistoryEntries(ctx context.Context, request ListDbHomePatchHistoryEntriesRequest) (response ListDbHomePatchHistoryEntriesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDbHomePatchHistoryEntries, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDbHomePatchHistoryEntriesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDbHomePatchHistoryEntriesResponse") - } - return -} - -// listDbHomePatchHistoryEntries implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDbHomePatchHistoryEntries(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}/patchHistoryEntries") - if err != nil { - return nil, err - } - - var response ListDbHomePatchHistoryEntriesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDbHomePatches Lists patches applicable to the requested database home. -func (client DatabaseClient) ListDbHomePatches(ctx context.Context, request ListDbHomePatchesRequest) (response ListDbHomePatchesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDbHomePatches, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDbHomePatchesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDbHomePatchesResponse") - } - return -} - -// listDbHomePatches implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDbHomePatches(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes/{dbHomeId}/patches") - if err != nil { - return nil, err - } - - var response ListDbHomePatchesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDbHomes Gets a list of database homes in the specified DB System and compartment. A database home is a directory where Oracle database software is installed. -func (client DatabaseClient) ListDbHomes(ctx context.Context, request ListDbHomesRequest) (response ListDbHomesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDbHomes, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDbHomesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDbHomesResponse") - } - return -} - -// listDbHomes implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDbHomes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbHomes") - if err != nil { - return nil, err - } - - var response ListDbHomesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDbNodes Gets a list of database nodes in the specified DB System and compartment. A database node is a server running database software. -func (client DatabaseClient) ListDbNodes(ctx context.Context, request ListDbNodesRequest) (response ListDbNodesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDbNodes, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDbNodesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDbNodesResponse") - } - return -} - -// listDbNodes implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDbNodes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbNodes") - if err != nil { - return nil, err - } - - var response ListDbNodesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDbSystemPatchHistoryEntries Gets the history of the patch actions performed on the specified DB System. -func (client DatabaseClient) ListDbSystemPatchHistoryEntries(ctx context.Context, request ListDbSystemPatchHistoryEntriesRequest) (response ListDbSystemPatchHistoryEntriesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDbSystemPatchHistoryEntries, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDbSystemPatchHistoryEntriesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDbSystemPatchHistoryEntriesResponse") - } - return -} - -// listDbSystemPatchHistoryEntries implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDbSystemPatchHistoryEntries(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/patchHistoryEntries") - if err != nil { - return nil, err - } - - var response ListDbSystemPatchHistoryEntriesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDbSystemPatches Lists the patches applicable to the requested DB System. -func (client DatabaseClient) ListDbSystemPatches(ctx context.Context, request ListDbSystemPatchesRequest) (response ListDbSystemPatchesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDbSystemPatches, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDbSystemPatchesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDbSystemPatchesResponse") - } - return -} - -// listDbSystemPatches implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDbSystemPatches(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/patches") - if err != nil { - return nil, err - } - - var response ListDbSystemPatchesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDbSystemShapes Gets a list of the shapes that can be used to launch a new DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. -func (client DatabaseClient) ListDbSystemShapes(ctx context.Context, request ListDbSystemShapesRequest) (response ListDbSystemShapesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDbSystemShapes, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDbSystemShapesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDbSystemShapesResponse") - } - return -} - -// listDbSystemShapes implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDbSystemShapes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystemShapes") - if err != nil { - return nil, err - } - - var response ListDbSystemShapesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDbSystems Gets a list of the DB Systems in the specified compartment. You can specify a backupId to list only the DB Systems that support creating a database using this backup in this compartment. -// -func (client DatabaseClient) ListDbSystems(ctx context.Context, request ListDbSystemsRequest) (response ListDbSystemsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDbSystems, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDbSystemsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDbSystemsResponse") - } - return -} - -// listDbSystems implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDbSystems(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems") - if err != nil { - return nil, err - } - - var response ListDbSystemsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDbVersions Gets a list of supported Oracle database versions. -func (client DatabaseClient) ListDbVersions(ctx context.Context, request ListDbVersionsRequest) (response ListDbVersionsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDbVersions, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDbVersionsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDbVersionsResponse") - } - return -} - -// listDbVersions implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) listDbVersions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbVersions") - if err != nil { - return nil, err - } - - var response ListDbVersionsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ReinstateDataGuardAssociation Reinstates the database identified by the `databaseId` parameter into the standby role in a Data Guard association. -func (client DatabaseClient) ReinstateDataGuardAssociation(ctx context.Context, request ReinstateDataGuardAssociationRequest) (response ReinstateDataGuardAssociationResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.reinstateDataGuardAssociation, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ReinstateDataGuardAssociationResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ReinstateDataGuardAssociationResponse") - } - return -} - -// reinstateDataGuardAssociation implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) reinstateDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/reinstate") - if err != nil { - return nil, err - } - - var response ReinstateDataGuardAssociationResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// RestoreDatabase Restore a Database based on the request parameters you provide. -func (client DatabaseClient) RestoreDatabase(ctx context.Context, request RestoreDatabaseRequest) (response RestoreDatabaseResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.restoreDatabase, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(RestoreDatabaseResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into RestoreDatabaseResponse") - } - return -} - -// restoreDatabase implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) restoreDatabase(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/actions/restore") - if err != nil { - return nil, err - } - - var response RestoreDatabaseResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// SwitchoverDataGuardAssociation Performs a switchover to transition the primary database of a Data Guard association into a standby role. The -// standby database associated with the `dataGuardAssociationId` assumes the primary database role. -// A switchover guarantees no data loss. -func (client DatabaseClient) SwitchoverDataGuardAssociation(ctx context.Context, request SwitchoverDataGuardAssociationRequest) (response SwitchoverDataGuardAssociationResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.switchoverDataGuardAssociation, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(SwitchoverDataGuardAssociationResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into SwitchoverDataGuardAssociationResponse") - } - return -} - -// switchoverDataGuardAssociation implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) switchoverDataGuardAssociation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/switchover") - if err != nil { - return nil, err - } - - var response SwitchoverDataGuardAssociationResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// TerminateDbSystem Terminates a DB System and permanently deletes it and any databases running on it, and any storage volumes attached to it. The database data is local to the DB System and will be lost when the system is terminated. Oracle recommends that you back up any data in the DB System prior to terminating it. -func (client DatabaseClient) TerminateDbSystem(ctx context.Context, request TerminateDbSystemRequest) (response TerminateDbSystemResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.terminateDbSystem, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(TerminateDbSystemResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into TerminateDbSystemResponse") - } - return -} - -// terminateDbSystem implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) terminateDbSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dbSystems/{dbSystemId}") - if err != nil { - return nil, err - } - - var response TerminateDbSystemResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateDatabase Update a Database based on the request parameters you provide. -func (client DatabaseClient) UpdateDatabase(ctx context.Context, request UpdateDatabaseRequest) (response UpdateDatabaseResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateDatabase, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateDatabaseResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDatabaseResponse") - } - return -} - -// updateDatabase implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) updateDatabase(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/databases/{databaseId}") - if err != nil { - return nil, err - } - - var response UpdateDatabaseResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateDbHome Patches the specified dbHome. -func (client DatabaseClient) UpdateDbHome(ctx context.Context, request UpdateDbHomeRequest) (response UpdateDbHomeResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateDbHome, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateDbHomeResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDbHomeResponse") - } - return -} - -// updateDbHome implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) updateDbHome(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/dbHomes/{dbHomeId}") - if err != nil { - return nil, err - } - - var response UpdateDbHomeResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateDbSystem Updates the properties of a DB System, such as the CPU core count. -func (client DatabaseClient) UpdateDbSystem(ctx context.Context, request UpdateDbSystemRequest) (response UpdateDbSystemResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateDbSystem, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateDbSystemResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDbSystemResponse") - } - return -} - -// updateDbSystem implements the OCIOperation interface (enables retrying operations) -func (client DatabaseClient) updateDbSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/dbSystems/{dbSystemId}") - if err != nil { - return nil, err - } - - var response UpdateDbSystemResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go deleted file mode 100644 index 8028fb062..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DatabaseSummary An Oracle database on a DB System. For more information, see Managing Oracle Databases (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type DatabaseSummary struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The database name. - DbName *string `mandatory:"true" json:"dbName"` - - // A system-generated name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases). The unique name cannot be changed. - DbUniqueName *string `mandatory:"true" json:"dbUniqueName"` - - // The OCID of the database. - Id *string `mandatory:"true" json:"id"` - - // The current state of the database. - LifecycleState DatabaseSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The character set for the database. - CharacterSet *string `mandatory:"false" json:"characterSet"` - - DbBackupConfig *DbBackupConfig `mandatory:"false" json:"dbBackupConfig"` - - // The OCID of the database home. - DbHomeId *string `mandatory:"false" json:"dbHomeId"` - - // Database workload type. - DbWorkload *string `mandatory:"false" json:"dbWorkload"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Additional information about the current lifecycleState. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The national character set for the database. - NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - - // Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. - PdbName *string `mandatory:"false" json:"pdbName"` - - // The date and time the database was created. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m DatabaseSummary) String() string { - return common.PointerString(m) -} - -// DatabaseSummaryLifecycleStateEnum Enum with underlying type: string -type DatabaseSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for DatabaseSummaryLifecycleState -const ( - DatabaseSummaryLifecycleStateProvisioning DatabaseSummaryLifecycleStateEnum = "PROVISIONING" - DatabaseSummaryLifecycleStateAvailable DatabaseSummaryLifecycleStateEnum = "AVAILABLE" - DatabaseSummaryLifecycleStateUpdating DatabaseSummaryLifecycleStateEnum = "UPDATING" - DatabaseSummaryLifecycleStateBackupInProgress DatabaseSummaryLifecycleStateEnum = "BACKUP_IN_PROGRESS" - DatabaseSummaryLifecycleStateTerminating DatabaseSummaryLifecycleStateEnum = "TERMINATING" - DatabaseSummaryLifecycleStateTerminated DatabaseSummaryLifecycleStateEnum = "TERMINATED" - DatabaseSummaryLifecycleStateRestoreFailed DatabaseSummaryLifecycleStateEnum = "RESTORE_FAILED" - DatabaseSummaryLifecycleStateFailed DatabaseSummaryLifecycleStateEnum = "FAILED" -) - -var mappingDatabaseSummaryLifecycleState = map[string]DatabaseSummaryLifecycleStateEnum{ - "PROVISIONING": DatabaseSummaryLifecycleStateProvisioning, - "AVAILABLE": DatabaseSummaryLifecycleStateAvailable, - "UPDATING": DatabaseSummaryLifecycleStateUpdating, - "BACKUP_IN_PROGRESS": DatabaseSummaryLifecycleStateBackupInProgress, - "TERMINATING": DatabaseSummaryLifecycleStateTerminating, - "TERMINATED": DatabaseSummaryLifecycleStateTerminated, - "RESTORE_FAILED": DatabaseSummaryLifecycleStateRestoreFailed, - "FAILED": DatabaseSummaryLifecycleStateFailed, -} - -// GetDatabaseSummaryLifecycleStateEnumValues Enumerates the set of values for DatabaseSummaryLifecycleState -func GetDatabaseSummaryLifecycleStateEnumValues() []DatabaseSummaryLifecycleStateEnum { - values := make([]DatabaseSummaryLifecycleStateEnum, 0) - for _, v := range mappingDatabaseSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_backup_config.go b/vendor/github.com/oracle/oci-go-sdk/database/db_backup_config.go deleted file mode 100644 index 193a4a81c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_backup_config.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DbBackupConfig Backup Options -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type DbBackupConfig struct { - - // If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. - AutoBackupEnabled *bool `mandatory:"false" json:"autoBackupEnabled"` -} - -func (m DbBackupConfig) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_home.go b/vendor/github.com/oracle/oci-go-sdk/database/db_home.go deleted file mode 100644 index dc768b7cc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_home.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DbHome A directory where Oracle database software is installed. Each DB System can have multiple database homes, -// and each database home can have multiple databases within it. All the databases within a single database home -// must be the same database version, but different database homes can run different versions. For more information, -// see Managing Oracle Databases (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an -// administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type DbHome struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The Oracle database version. - DbVersion *string `mandatory:"true" json:"dbVersion"` - - // The user-provided name for the database home. It does not need to be unique. - DisplayName *string `mandatory:"true" json:"displayName"` - - // The OCID of the database home. - Id *string `mandatory:"true" json:"id"` - - // The current state of the database home. - LifecycleState DbHomeLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The OCID of the DB System. - DbSystemId *string `mandatory:"false" json:"dbSystemId"` - - // The OCID of the last patch history. This is updated as soon as a patch operation is started. - LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` - - // The date and time the database home was created. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m DbHome) String() string { - return common.PointerString(m) -} - -// DbHomeLifecycleStateEnum Enum with underlying type: string -type DbHomeLifecycleStateEnum string - -// Set of constants representing the allowable values for DbHomeLifecycleState -const ( - DbHomeLifecycleStateProvisioning DbHomeLifecycleStateEnum = "PROVISIONING" - DbHomeLifecycleStateAvailable DbHomeLifecycleStateEnum = "AVAILABLE" - DbHomeLifecycleStateUpdating DbHomeLifecycleStateEnum = "UPDATING" - DbHomeLifecycleStateTerminating DbHomeLifecycleStateEnum = "TERMINATING" - DbHomeLifecycleStateTerminated DbHomeLifecycleStateEnum = "TERMINATED" - DbHomeLifecycleStateFailed DbHomeLifecycleStateEnum = "FAILED" -) - -var mappingDbHomeLifecycleState = map[string]DbHomeLifecycleStateEnum{ - "PROVISIONING": DbHomeLifecycleStateProvisioning, - "AVAILABLE": DbHomeLifecycleStateAvailable, - "UPDATING": DbHomeLifecycleStateUpdating, - "TERMINATING": DbHomeLifecycleStateTerminating, - "TERMINATED": DbHomeLifecycleStateTerminated, - "FAILED": DbHomeLifecycleStateFailed, -} - -// GetDbHomeLifecycleStateEnumValues Enumerates the set of values for DbHomeLifecycleState -func GetDbHomeLifecycleStateEnumValues() []DbHomeLifecycleStateEnum { - values := make([]DbHomeLifecycleStateEnum, 0) - for _, v := range mappingDbHomeLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_home_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_home_summary.go deleted file mode 100644 index b71dec836..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_home_summary.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DbHomeSummary A directory where Oracle database software is installed. Each DB System can have multiple database homes, -// and each database home can have multiple databases within it. All the databases within a single database home -// must be the same database version, but different database homes can run different versions. For more information, -// see Managing Oracle Databases (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an -// administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type DbHomeSummary struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The Oracle database version. - DbVersion *string `mandatory:"true" json:"dbVersion"` - - // The user-provided name for the database home. It does not need to be unique. - DisplayName *string `mandatory:"true" json:"displayName"` - - // The OCID of the database home. - Id *string `mandatory:"true" json:"id"` - - // The current state of the database home. - LifecycleState DbHomeSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The OCID of the DB System. - DbSystemId *string `mandatory:"false" json:"dbSystemId"` - - // The OCID of the last patch history. This is updated as soon as a patch operation is started. - LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` - - // The date and time the database home was created. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m DbHomeSummary) String() string { - return common.PointerString(m) -} - -// DbHomeSummaryLifecycleStateEnum Enum with underlying type: string -type DbHomeSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for DbHomeSummaryLifecycleState -const ( - DbHomeSummaryLifecycleStateProvisioning DbHomeSummaryLifecycleStateEnum = "PROVISIONING" - DbHomeSummaryLifecycleStateAvailable DbHomeSummaryLifecycleStateEnum = "AVAILABLE" - DbHomeSummaryLifecycleStateUpdating DbHomeSummaryLifecycleStateEnum = "UPDATING" - DbHomeSummaryLifecycleStateTerminating DbHomeSummaryLifecycleStateEnum = "TERMINATING" - DbHomeSummaryLifecycleStateTerminated DbHomeSummaryLifecycleStateEnum = "TERMINATED" - DbHomeSummaryLifecycleStateFailed DbHomeSummaryLifecycleStateEnum = "FAILED" -) - -var mappingDbHomeSummaryLifecycleState = map[string]DbHomeSummaryLifecycleStateEnum{ - "PROVISIONING": DbHomeSummaryLifecycleStateProvisioning, - "AVAILABLE": DbHomeSummaryLifecycleStateAvailable, - "UPDATING": DbHomeSummaryLifecycleStateUpdating, - "TERMINATING": DbHomeSummaryLifecycleStateTerminating, - "TERMINATED": DbHomeSummaryLifecycleStateTerminated, - "FAILED": DbHomeSummaryLifecycleStateFailed, -} - -// GetDbHomeSummaryLifecycleStateEnumValues Enumerates the set of values for DbHomeSummaryLifecycleState -func GetDbHomeSummaryLifecycleStateEnumValues() []DbHomeSummaryLifecycleStateEnum { - values := make([]DbHomeSummaryLifecycleStateEnum, 0) - for _, v := range mappingDbHomeSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_node.go b/vendor/github.com/oracle/oci-go-sdk/database/db_node.go deleted file mode 100644 index 3e052d092..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_node.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DbNode A server where Oracle database software is running. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type DbNode struct { - - // The OCID of the DB System. - DbSystemId *string `mandatory:"true" json:"dbSystemId"` - - // The OCID of the DB Node. - Id *string `mandatory:"true" json:"id"` - - // The current state of the database node. - LifecycleState DbNodeLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The date and time that the DB Node was created. - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The OCID of the VNIC. - VnicId *string `mandatory:"true" json:"vnicId"` - - // The OCID of the backup VNIC. - BackupVnicId *string `mandatory:"false" json:"backupVnicId"` - - // The host name for the DB Node. - Hostname *string `mandatory:"false" json:"hostname"` - - // Storage size, in GBs, of the software volume that is allocated to the DB system. This is applicable only for VM-based DBs. - SoftwareStorageSizeInGB *int `mandatory:"false" json:"softwareStorageSizeInGB"` -} - -func (m DbNode) String() string { - return common.PointerString(m) -} - -// DbNodeLifecycleStateEnum Enum with underlying type: string -type DbNodeLifecycleStateEnum string - -// Set of constants representing the allowable values for DbNodeLifecycleState -const ( - DbNodeLifecycleStateProvisioning DbNodeLifecycleStateEnum = "PROVISIONING" - DbNodeLifecycleStateAvailable DbNodeLifecycleStateEnum = "AVAILABLE" - DbNodeLifecycleStateUpdating DbNodeLifecycleStateEnum = "UPDATING" - DbNodeLifecycleStateStopping DbNodeLifecycleStateEnum = "STOPPING" - DbNodeLifecycleStateStopped DbNodeLifecycleStateEnum = "STOPPED" - DbNodeLifecycleStateStarting DbNodeLifecycleStateEnum = "STARTING" - DbNodeLifecycleStateTerminating DbNodeLifecycleStateEnum = "TERMINATING" - DbNodeLifecycleStateTerminated DbNodeLifecycleStateEnum = "TERMINATED" - DbNodeLifecycleStateFailed DbNodeLifecycleStateEnum = "FAILED" -) - -var mappingDbNodeLifecycleState = map[string]DbNodeLifecycleStateEnum{ - "PROVISIONING": DbNodeLifecycleStateProvisioning, - "AVAILABLE": DbNodeLifecycleStateAvailable, - "UPDATING": DbNodeLifecycleStateUpdating, - "STOPPING": DbNodeLifecycleStateStopping, - "STOPPED": DbNodeLifecycleStateStopped, - "STARTING": DbNodeLifecycleStateStarting, - "TERMINATING": DbNodeLifecycleStateTerminating, - "TERMINATED": DbNodeLifecycleStateTerminated, - "FAILED": DbNodeLifecycleStateFailed, -} - -// GetDbNodeLifecycleStateEnumValues Enumerates the set of values for DbNodeLifecycleState -func GetDbNodeLifecycleStateEnumValues() []DbNodeLifecycleStateEnum { - values := make([]DbNodeLifecycleStateEnum, 0) - for _, v := range mappingDbNodeLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go deleted file mode 100644 index ae68f504f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DbNodeActionRequest wrapper for the DbNodeAction operation -type DbNodeActionRequest struct { - - // The database node OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbNodeId *string `mandatory:"true" contributesTo:"path" name:"dbNodeId"` - - // The action to perform on the DB Node. - Action DbNodeActionActionEnum `mandatory:"true" contributesTo:"query" name:"action" omitEmpty:"true"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (for example, if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DbNodeActionRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DbNodeActionRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DbNodeActionRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DbNodeActionResponse wrapper for the DbNodeAction operation -type DbNodeActionResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DbNode instance - DbNode `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DbNodeActionResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DbNodeActionResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// DbNodeActionActionEnum Enum with underlying type: string -type DbNodeActionActionEnum string - -// Set of constants representing the allowable values for DbNodeActionAction -const ( - DbNodeActionActionStop DbNodeActionActionEnum = "STOP" - DbNodeActionActionStart DbNodeActionActionEnum = "START" - DbNodeActionActionSoftreset DbNodeActionActionEnum = "SOFTRESET" - DbNodeActionActionReset DbNodeActionActionEnum = "RESET" -) - -var mappingDbNodeActionAction = map[string]DbNodeActionActionEnum{ - "STOP": DbNodeActionActionStop, - "START": DbNodeActionActionStart, - "SOFTRESET": DbNodeActionActionSoftreset, - "RESET": DbNodeActionActionReset, -} - -// GetDbNodeActionActionEnumValues Enumerates the set of values for DbNodeActionAction -func GetDbNodeActionActionEnumValues() []DbNodeActionActionEnum { - values := make([]DbNodeActionActionEnum, 0) - for _, v := range mappingDbNodeActionAction { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_node_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_node_summary.go deleted file mode 100644 index 47e4ea0dc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_node_summary.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DbNodeSummary A server where Oracle database software is running. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type DbNodeSummary struct { - - // The OCID of the DB System. - DbSystemId *string `mandatory:"true" json:"dbSystemId"` - - // The OCID of the DB Node. - Id *string `mandatory:"true" json:"id"` - - // The current state of the database node. - LifecycleState DbNodeSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The date and time that the DB Node was created. - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The OCID of the VNIC. - VnicId *string `mandatory:"true" json:"vnicId"` - - // The OCID of the backup VNIC. - BackupVnicId *string `mandatory:"false" json:"backupVnicId"` - - // The host name for the DB Node. - Hostname *string `mandatory:"false" json:"hostname"` - - // Storage size, in GBs, of the software volume that is allocated to the DB system. This is applicable only for VM-based DBs. - SoftwareStorageSizeInGB *int `mandatory:"false" json:"softwareStorageSizeInGB"` -} - -func (m DbNodeSummary) String() string { - return common.PointerString(m) -} - -// DbNodeSummaryLifecycleStateEnum Enum with underlying type: string -type DbNodeSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for DbNodeSummaryLifecycleState -const ( - DbNodeSummaryLifecycleStateProvisioning DbNodeSummaryLifecycleStateEnum = "PROVISIONING" - DbNodeSummaryLifecycleStateAvailable DbNodeSummaryLifecycleStateEnum = "AVAILABLE" - DbNodeSummaryLifecycleStateUpdating DbNodeSummaryLifecycleStateEnum = "UPDATING" - DbNodeSummaryLifecycleStateStopping DbNodeSummaryLifecycleStateEnum = "STOPPING" - DbNodeSummaryLifecycleStateStopped DbNodeSummaryLifecycleStateEnum = "STOPPED" - DbNodeSummaryLifecycleStateStarting DbNodeSummaryLifecycleStateEnum = "STARTING" - DbNodeSummaryLifecycleStateTerminating DbNodeSummaryLifecycleStateEnum = "TERMINATING" - DbNodeSummaryLifecycleStateTerminated DbNodeSummaryLifecycleStateEnum = "TERMINATED" - DbNodeSummaryLifecycleStateFailed DbNodeSummaryLifecycleStateEnum = "FAILED" -) - -var mappingDbNodeSummaryLifecycleState = map[string]DbNodeSummaryLifecycleStateEnum{ - "PROVISIONING": DbNodeSummaryLifecycleStateProvisioning, - "AVAILABLE": DbNodeSummaryLifecycleStateAvailable, - "UPDATING": DbNodeSummaryLifecycleStateUpdating, - "STOPPING": DbNodeSummaryLifecycleStateStopping, - "STOPPED": DbNodeSummaryLifecycleStateStopped, - "STARTING": DbNodeSummaryLifecycleStateStarting, - "TERMINATING": DbNodeSummaryLifecycleStateTerminating, - "TERMINATED": DbNodeSummaryLifecycleStateTerminated, - "FAILED": DbNodeSummaryLifecycleStateFailed, -} - -// GetDbNodeSummaryLifecycleStateEnumValues Enumerates the set of values for DbNodeSummaryLifecycleState -func GetDbNodeSummaryLifecycleStateEnumValues() []DbNodeSummaryLifecycleStateEnum { - values := make([]DbNodeSummaryLifecycleStateEnum, 0) - for _, v := range mappingDbNodeSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_system.go b/vendor/github.com/oracle/oci-go-sdk/database/db_system.go deleted file mode 100644 index 35b9f06af..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_system.go +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DbSystem The Database Service supports several types of DB Systems, ranging in size, price, and performance. For details about each type of system, see: -// - Exadata DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/exaoverview.htm) -// - Bare Metal and Virtual Machine DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm) -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -// -// For information about access control and compartments, see -// Overview of the Identity Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). -// For information about Availability Domains, see -// Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). -// To get a list of Availability Domains, use the `ListAvailabilityDomains` operation -// in the Identity Service API. -type DbSystem struct { - - // The name of the Availability Domain that the DB System is located in. - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The number of CPU cores enabled on the DB System. - CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` - - // The Oracle Database Edition that applies to all the databases on the DB System. - DatabaseEdition DbSystemDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` - - // The user-friendly name for the DB System. It does not have to be unique. - DisplayName *string `mandatory:"true" json:"displayName"` - - // The domain name for the DB System. - Domain *string `mandatory:"true" json:"domain"` - - // The host name for the DB Node. - Hostname *string `mandatory:"true" json:"hostname"` - - // The OCID of the DB System. - Id *string `mandatory:"true" json:"id"` - - // The current state of the DB System. - LifecycleState DbSystemLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The shape of the DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. - Shape *string `mandatory:"true" json:"shape"` - - // The public key portion of one or more key pairs used for SSH access to the DB System. - SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` - - // The OCID of the subnet the DB System is associated with. - // **Subnet Restrictions:** - // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 - // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 - // These subnets are used by the Oracle Clusterware private interconnect on the database instance. - // Specifying an overlapping subnet will cause the private interconnect to malfunction. - // This restriction applies to both the client subnet and backup subnet. - SubnetId *string `mandatory:"true" json:"subnetId"` - - // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. - // **Subnet Restriction:** See above subnetId's 'Subnet Restriction'. - // to malfunction. - BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` - - // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. - ClusterName *string `mandatory:"false" json:"clusterName"` - - // The percentage assigned to DATA storage (user data and database files). - // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 40 and 80. - DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` - - // Data storage size, in GBs, that is currently available to the DB system. This is applicable only for VM-based DBs. - DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // The type of redundancy configured for the DB System. - // Normal is 2-way redundancy. - // High is 3-way redundancy. - DiskRedundancy DbSystemDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // The OCID of the last patch history. This is updated as soon as a patch operation is started. - LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` - - // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. - LicenseModel DbSystemLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` - - // Additional information about the current lifecycleState. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The port number configured for the listener on the DB System. - ListenerPort *int `mandatory:"false" json:"listenerPort"` - - // Number of nodes in this DB system. For RAC DBs, this will be greater than 1. - NodeCount *int `mandatory:"false" json:"nodeCount"` - - // RECO/REDO storage size, in GBs, that is currently allocated to the DB system. This is applicable only for VM-based DBs. - RecoStorageSizeInGB *int `mandatory:"false" json:"recoStorageSizeInGB"` - - // The OCID of the DNS record for the SCAN IP addresses that are associated with the DB System. - ScanDnsRecordId *string `mandatory:"false" json:"scanDnsRecordId"` - - // The OCID of the Single Client Access Name (SCAN) IP addresses associated with the DB System. - // SCAN IP addresses are typically used for load balancing and are not assigned to any interface. - // Clusterware directs the requests to the appropriate nodes in the cluster. - // - For a single-node DB System, this list is empty. - ScanIpIds []string `mandatory:"false" json:"scanIpIds"` - - // The date and time the DB System was created. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // The version of the DB System. - Version *string `mandatory:"false" json:"version"` - - // The OCID of the virtual IP (VIP) addresses associated with the DB System. - // The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the DB System to - // enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. - // - For a single-node DB System, this list is empty. - VipIds []string `mandatory:"false" json:"vipIds"` -} - -func (m DbSystem) String() string { - return common.PointerString(m) -} - -// DbSystemDatabaseEditionEnum Enum with underlying type: string -type DbSystemDatabaseEditionEnum string - -// Set of constants representing the allowable values for DbSystemDatabaseEdition -const ( - DbSystemDatabaseEditionStandardEdition DbSystemDatabaseEditionEnum = "STANDARD_EDITION" - DbSystemDatabaseEditionEnterpriseEdition DbSystemDatabaseEditionEnum = "ENTERPRISE_EDITION" - DbSystemDatabaseEditionEnterpriseEditionExtremePerformance DbSystemDatabaseEditionEnum = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" - DbSystemDatabaseEditionEnterpriseEditionHighPerformance DbSystemDatabaseEditionEnum = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" -) - -var mappingDbSystemDatabaseEdition = map[string]DbSystemDatabaseEditionEnum{ - "STANDARD_EDITION": DbSystemDatabaseEditionStandardEdition, - "ENTERPRISE_EDITION": DbSystemDatabaseEditionEnterpriseEdition, - "ENTERPRISE_EDITION_EXTREME_PERFORMANCE": DbSystemDatabaseEditionEnterpriseEditionExtremePerformance, - "ENTERPRISE_EDITION_HIGH_PERFORMANCE": DbSystemDatabaseEditionEnterpriseEditionHighPerformance, -} - -// GetDbSystemDatabaseEditionEnumValues Enumerates the set of values for DbSystemDatabaseEdition -func GetDbSystemDatabaseEditionEnumValues() []DbSystemDatabaseEditionEnum { - values := make([]DbSystemDatabaseEditionEnum, 0) - for _, v := range mappingDbSystemDatabaseEdition { - values = append(values, v) - } - return values -} - -// DbSystemDiskRedundancyEnum Enum with underlying type: string -type DbSystemDiskRedundancyEnum string - -// Set of constants representing the allowable values for DbSystemDiskRedundancy -const ( - DbSystemDiskRedundancyHigh DbSystemDiskRedundancyEnum = "HIGH" - DbSystemDiskRedundancyNormal DbSystemDiskRedundancyEnum = "NORMAL" -) - -var mappingDbSystemDiskRedundancy = map[string]DbSystemDiskRedundancyEnum{ - "HIGH": DbSystemDiskRedundancyHigh, - "NORMAL": DbSystemDiskRedundancyNormal, -} - -// GetDbSystemDiskRedundancyEnumValues Enumerates the set of values for DbSystemDiskRedundancy -func GetDbSystemDiskRedundancyEnumValues() []DbSystemDiskRedundancyEnum { - values := make([]DbSystemDiskRedundancyEnum, 0) - for _, v := range mappingDbSystemDiskRedundancy { - values = append(values, v) - } - return values -} - -// DbSystemLicenseModelEnum Enum with underlying type: string -type DbSystemLicenseModelEnum string - -// Set of constants representing the allowable values for DbSystemLicenseModel -const ( - DbSystemLicenseModelLicenseIncluded DbSystemLicenseModelEnum = "LICENSE_INCLUDED" - DbSystemLicenseModelBringYourOwnLicense DbSystemLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" -) - -var mappingDbSystemLicenseModel = map[string]DbSystemLicenseModelEnum{ - "LICENSE_INCLUDED": DbSystemLicenseModelLicenseIncluded, - "BRING_YOUR_OWN_LICENSE": DbSystemLicenseModelBringYourOwnLicense, -} - -// GetDbSystemLicenseModelEnumValues Enumerates the set of values for DbSystemLicenseModel -func GetDbSystemLicenseModelEnumValues() []DbSystemLicenseModelEnum { - values := make([]DbSystemLicenseModelEnum, 0) - for _, v := range mappingDbSystemLicenseModel { - values = append(values, v) - } - return values -} - -// DbSystemLifecycleStateEnum Enum with underlying type: string -type DbSystemLifecycleStateEnum string - -// Set of constants representing the allowable values for DbSystemLifecycleState -const ( - DbSystemLifecycleStateProvisioning DbSystemLifecycleStateEnum = "PROVISIONING" - DbSystemLifecycleStateAvailable DbSystemLifecycleStateEnum = "AVAILABLE" - DbSystemLifecycleStateUpdating DbSystemLifecycleStateEnum = "UPDATING" - DbSystemLifecycleStateTerminating DbSystemLifecycleStateEnum = "TERMINATING" - DbSystemLifecycleStateTerminated DbSystemLifecycleStateEnum = "TERMINATED" - DbSystemLifecycleStateFailed DbSystemLifecycleStateEnum = "FAILED" -) - -var mappingDbSystemLifecycleState = map[string]DbSystemLifecycleStateEnum{ - "PROVISIONING": DbSystemLifecycleStateProvisioning, - "AVAILABLE": DbSystemLifecycleStateAvailable, - "UPDATING": DbSystemLifecycleStateUpdating, - "TERMINATING": DbSystemLifecycleStateTerminating, - "TERMINATED": DbSystemLifecycleStateTerminated, - "FAILED": DbSystemLifecycleStateFailed, -} - -// GetDbSystemLifecycleStateEnumValues Enumerates the set of values for DbSystemLifecycleState -func GetDbSystemLifecycleStateEnumValues() []DbSystemLifecycleStateEnum { - values := make([]DbSystemLifecycleStateEnum, 0) - for _, v := range mappingDbSystemLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go deleted file mode 100644 index 6e8a2a200..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DbSystemShapeSummary The shape of the DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. -// For a description of shapes, see DB System Launch Options (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/References/launchoptions.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. -// If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type DbSystemShapeSummary struct { - - // The maximum number of CPU cores that can be enabled on the DB System for this shape. - AvailableCoreCount *int `mandatory:"true" json:"availableCoreCount"` - - // The name of the shape used for the DB System. - Name *string `mandatory:"true" json:"name"` - - // The discrete number by which the CPU core count for this shape can be increased or decreased. - CoreCountIncrement *int `mandatory:"false" json:"coreCountIncrement"` - - // The maximum number of database nodes available for this shape. - MaximumNodeCount *int `mandatory:"false" json:"maximumNodeCount"` - - // The minimum number of CPU cores that can be enabled on the DB System for this shape. - MinimumCoreCount *int `mandatory:"false" json:"minimumCoreCount"` - - // The minimum number of database nodes available for this shape. - MinimumNodeCount *int `mandatory:"false" json:"minimumNodeCount"` - - // Deprecated. Use `name` instead of `shape`. - Shape *string `mandatory:"false" json:"shape"` -} - -func (m DbSystemShapeSummary) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go deleted file mode 100644 index 40cbce8e4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DbSystemSummary The Database Service supports several types of DB Systems, ranging in size, price, and performance. For details about each type of system, see: -// - Exadata DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/exaoverview.htm) -// - Bare Metal and Virtual Machine DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm) -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -// -// For information about access control and compartments, see -// Overview of the Identity Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). -// For information about Availability Domains, see -// Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). -// To get a list of Availability Domains, use the `ListAvailabilityDomains` operation -// in the Identity Service API. -type DbSystemSummary struct { - - // The name of the Availability Domain that the DB System is located in. - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The number of CPU cores enabled on the DB System. - CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` - - // The Oracle Database Edition that applies to all the databases on the DB System. - DatabaseEdition DbSystemSummaryDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` - - // The user-friendly name for the DB System. It does not have to be unique. - DisplayName *string `mandatory:"true" json:"displayName"` - - // The domain name for the DB System. - Domain *string `mandatory:"true" json:"domain"` - - // The host name for the DB Node. - Hostname *string `mandatory:"true" json:"hostname"` - - // The OCID of the DB System. - Id *string `mandatory:"true" json:"id"` - - // The current state of the DB System. - LifecycleState DbSystemSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The shape of the DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. - Shape *string `mandatory:"true" json:"shape"` - - // The public key portion of one or more key pairs used for SSH access to the DB System. - SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` - - // The OCID of the subnet the DB System is associated with. - // **Subnet Restrictions:** - // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 - // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 - // These subnets are used by the Oracle Clusterware private interconnect on the database instance. - // Specifying an overlapping subnet will cause the private interconnect to malfunction. - // This restriction applies to both the client subnet and backup subnet. - SubnetId *string `mandatory:"true" json:"subnetId"` - - // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. - // **Subnet Restriction:** See above subnetId's 'Subnet Restriction'. - // to malfunction. - BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` - - // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. - ClusterName *string `mandatory:"false" json:"clusterName"` - - // The percentage assigned to DATA storage (user data and database files). - // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 40 and 80. - DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` - - // Data storage size, in GBs, that is currently available to the DB system. This is applicable only for VM-based DBs. - DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // The type of redundancy configured for the DB System. - // Normal is 2-way redundancy. - // High is 3-way redundancy. - DiskRedundancy DbSystemSummaryDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // The OCID of the last patch history. This is updated as soon as a patch operation is started. - LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` - - // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. - LicenseModel DbSystemSummaryLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` - - // Additional information about the current lifecycleState. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The port number configured for the listener on the DB System. - ListenerPort *int `mandatory:"false" json:"listenerPort"` - - // Number of nodes in this DB system. For RAC DBs, this will be greater than 1. - NodeCount *int `mandatory:"false" json:"nodeCount"` - - // RECO/REDO storage size, in GBs, that is currently allocated to the DB system. This is applicable only for VM-based DBs. - RecoStorageSizeInGB *int `mandatory:"false" json:"recoStorageSizeInGB"` - - // The OCID of the DNS record for the SCAN IP addresses that are associated with the DB System. - ScanDnsRecordId *string `mandatory:"false" json:"scanDnsRecordId"` - - // The OCID of the Single Client Access Name (SCAN) IP addresses associated with the DB System. - // SCAN IP addresses are typically used for load balancing and are not assigned to any interface. - // Clusterware directs the requests to the appropriate nodes in the cluster. - // - For a single-node DB System, this list is empty. - ScanIpIds []string `mandatory:"false" json:"scanIpIds"` - - // The date and time the DB System was created. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // The version of the DB System. - Version *string `mandatory:"false" json:"version"` - - // The OCID of the virtual IP (VIP) addresses associated with the DB System. - // The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the DB System to - // enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. - // - For a single-node DB System, this list is empty. - VipIds []string `mandatory:"false" json:"vipIds"` -} - -func (m DbSystemSummary) String() string { - return common.PointerString(m) -} - -// DbSystemSummaryDatabaseEditionEnum Enum with underlying type: string -type DbSystemSummaryDatabaseEditionEnum string - -// Set of constants representing the allowable values for DbSystemSummaryDatabaseEdition -const ( - DbSystemSummaryDatabaseEditionStandardEdition DbSystemSummaryDatabaseEditionEnum = "STANDARD_EDITION" - DbSystemSummaryDatabaseEditionEnterpriseEdition DbSystemSummaryDatabaseEditionEnum = "ENTERPRISE_EDITION" - DbSystemSummaryDatabaseEditionEnterpriseEditionExtremePerformance DbSystemSummaryDatabaseEditionEnum = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" - DbSystemSummaryDatabaseEditionEnterpriseEditionHighPerformance DbSystemSummaryDatabaseEditionEnum = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" -) - -var mappingDbSystemSummaryDatabaseEdition = map[string]DbSystemSummaryDatabaseEditionEnum{ - "STANDARD_EDITION": DbSystemSummaryDatabaseEditionStandardEdition, - "ENTERPRISE_EDITION": DbSystemSummaryDatabaseEditionEnterpriseEdition, - "ENTERPRISE_EDITION_EXTREME_PERFORMANCE": DbSystemSummaryDatabaseEditionEnterpriseEditionExtremePerformance, - "ENTERPRISE_EDITION_HIGH_PERFORMANCE": DbSystemSummaryDatabaseEditionEnterpriseEditionHighPerformance, -} - -// GetDbSystemSummaryDatabaseEditionEnumValues Enumerates the set of values for DbSystemSummaryDatabaseEdition -func GetDbSystemSummaryDatabaseEditionEnumValues() []DbSystemSummaryDatabaseEditionEnum { - values := make([]DbSystemSummaryDatabaseEditionEnum, 0) - for _, v := range mappingDbSystemSummaryDatabaseEdition { - values = append(values, v) - } - return values -} - -// DbSystemSummaryDiskRedundancyEnum Enum with underlying type: string -type DbSystemSummaryDiskRedundancyEnum string - -// Set of constants representing the allowable values for DbSystemSummaryDiskRedundancy -const ( - DbSystemSummaryDiskRedundancyHigh DbSystemSummaryDiskRedundancyEnum = "HIGH" - DbSystemSummaryDiskRedundancyNormal DbSystemSummaryDiskRedundancyEnum = "NORMAL" -) - -var mappingDbSystemSummaryDiskRedundancy = map[string]DbSystemSummaryDiskRedundancyEnum{ - "HIGH": DbSystemSummaryDiskRedundancyHigh, - "NORMAL": DbSystemSummaryDiskRedundancyNormal, -} - -// GetDbSystemSummaryDiskRedundancyEnumValues Enumerates the set of values for DbSystemSummaryDiskRedundancy -func GetDbSystemSummaryDiskRedundancyEnumValues() []DbSystemSummaryDiskRedundancyEnum { - values := make([]DbSystemSummaryDiskRedundancyEnum, 0) - for _, v := range mappingDbSystemSummaryDiskRedundancy { - values = append(values, v) - } - return values -} - -// DbSystemSummaryLicenseModelEnum Enum with underlying type: string -type DbSystemSummaryLicenseModelEnum string - -// Set of constants representing the allowable values for DbSystemSummaryLicenseModel -const ( - DbSystemSummaryLicenseModelLicenseIncluded DbSystemSummaryLicenseModelEnum = "LICENSE_INCLUDED" - DbSystemSummaryLicenseModelBringYourOwnLicense DbSystemSummaryLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" -) - -var mappingDbSystemSummaryLicenseModel = map[string]DbSystemSummaryLicenseModelEnum{ - "LICENSE_INCLUDED": DbSystemSummaryLicenseModelLicenseIncluded, - "BRING_YOUR_OWN_LICENSE": DbSystemSummaryLicenseModelBringYourOwnLicense, -} - -// GetDbSystemSummaryLicenseModelEnumValues Enumerates the set of values for DbSystemSummaryLicenseModel -func GetDbSystemSummaryLicenseModelEnumValues() []DbSystemSummaryLicenseModelEnum { - values := make([]DbSystemSummaryLicenseModelEnum, 0) - for _, v := range mappingDbSystemSummaryLicenseModel { - values = append(values, v) - } - return values -} - -// DbSystemSummaryLifecycleStateEnum Enum with underlying type: string -type DbSystemSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for DbSystemSummaryLifecycleState -const ( - DbSystemSummaryLifecycleStateProvisioning DbSystemSummaryLifecycleStateEnum = "PROVISIONING" - DbSystemSummaryLifecycleStateAvailable DbSystemSummaryLifecycleStateEnum = "AVAILABLE" - DbSystemSummaryLifecycleStateUpdating DbSystemSummaryLifecycleStateEnum = "UPDATING" - DbSystemSummaryLifecycleStateTerminating DbSystemSummaryLifecycleStateEnum = "TERMINATING" - DbSystemSummaryLifecycleStateTerminated DbSystemSummaryLifecycleStateEnum = "TERMINATED" - DbSystemSummaryLifecycleStateFailed DbSystemSummaryLifecycleStateEnum = "FAILED" -) - -var mappingDbSystemSummaryLifecycleState = map[string]DbSystemSummaryLifecycleStateEnum{ - "PROVISIONING": DbSystemSummaryLifecycleStateProvisioning, - "AVAILABLE": DbSystemSummaryLifecycleStateAvailable, - "UPDATING": DbSystemSummaryLifecycleStateUpdating, - "TERMINATING": DbSystemSummaryLifecycleStateTerminating, - "TERMINATED": DbSystemSummaryLifecycleStateTerminated, - "FAILED": DbSystemSummaryLifecycleStateFailed, -} - -// GetDbSystemSummaryLifecycleStateEnumValues Enumerates the set of values for DbSystemSummaryLifecycleState -func GetDbSystemSummaryLifecycleStateEnumValues() []DbSystemSummaryLifecycleStateEnum { - values := make([]DbSystemSummaryLifecycleStateEnum, 0) - for _, v := range mappingDbSystemSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_version_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_version_summary.go deleted file mode 100644 index 5920cb4b9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/db_version_summary.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DbVersionSummary The Oracle database software version. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type DbVersionSummary struct { - - // A valid Oracle database version. - Version *string `mandatory:"true" json:"version"` - - // True if this version of the Oracle database software supports pluggable dbs. - SupportsPdb *bool `mandatory:"false" json:"supportsPdb"` -} - -func (m DbVersionSummary) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go deleted file mode 100644 index cb4728d60..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteBackupRequest wrapper for the DeleteBackup operation -type DeleteBackupRequest struct { - - // The backup OCID. - BackupId *string `mandatory:"true" contributesTo:"path" name:"backupId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteBackupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteBackupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteBackupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteBackupResponse wrapper for the DeleteBackup operation -type DeleteBackupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteBackupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteBackupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go deleted file mode 100644 index eca56c68b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteDbHomeRequest wrapper for the DeleteDbHome operation -type DeleteDbHomeRequest struct { - - // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Whether to perform a final backup of the database or not. Default is false. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. - PerformFinalBackup *bool `mandatory:"false" contributesTo:"query" name:"performFinalBackup"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteDbHomeRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteDbHomeRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteDbHomeRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteDbHomeResponse wrapper for the DeleteDbHome operation -type DeleteDbHomeResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteDbHomeResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteDbHomeResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_details.go b/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_details.go deleted file mode 100644 index 40e8bc76b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// FailoverDataGuardAssociationDetails The Data Guard association failover parameters. -type FailoverDataGuardAssociationDetails struct { - - // The DB System administrator password. - DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` -} - -func (m FailoverDataGuardAssociationDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go deleted file mode 100644 index 56fd8a713..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// FailoverDataGuardAssociationRequest wrapper for the FailoverDataGuardAssociation operation -type FailoverDataGuardAssociationRequest struct { - - // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` - - // The Data Guard association's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DataGuardAssociationId *string `mandatory:"true" contributesTo:"path" name:"dataGuardAssociationId"` - - // A request to perform a failover, transitioning a standby database into a primary database. - FailoverDataGuardAssociationDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request FailoverDataGuardAssociationRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request FailoverDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request FailoverDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// FailoverDataGuardAssociationResponse wrapper for the FailoverDataGuardAssociation operation -type FailoverDataGuardAssociationResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DataGuardAssociation instance - DataGuardAssociation `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response FailoverDataGuardAssociationResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response FailoverDataGuardAssociationResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go deleted file mode 100644 index 0eb197c54..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetBackupRequest wrapper for the GetBackup operation -type GetBackupRequest struct { - - // The backup OCID. - BackupId *string `mandatory:"true" contributesTo:"path" name:"backupId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetBackupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetBackupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetBackupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetBackupResponse wrapper for the GetBackup operation -type GetBackupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Backup instance - Backup `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetBackupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetBackupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go deleted file mode 100644 index 81cbde2cb..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDataGuardAssociationRequest wrapper for the GetDataGuardAssociation operation -type GetDataGuardAssociationRequest struct { - - // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` - - // The Data Guard association's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DataGuardAssociationId *string `mandatory:"true" contributesTo:"path" name:"dataGuardAssociationId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDataGuardAssociationRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDataGuardAssociationResponse wrapper for the GetDataGuardAssociation operation -type GetDataGuardAssociationResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DataGuardAssociation instance - DataGuardAssociation `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetDataGuardAssociationResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDataGuardAssociationResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go deleted file mode 100644 index 709de26b3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDatabaseRequest wrapper for the GetDatabase operation -type GetDatabaseRequest struct { - - // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDatabaseRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDatabaseRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDatabaseRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDatabaseResponse wrapper for the GetDatabase operation -type GetDatabaseResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Database instance - Database `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetDatabaseResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDatabaseResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go deleted file mode 100644 index 45afc6c5a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDbHomePatchHistoryEntryRequest wrapper for the GetDbHomePatchHistoryEntry operation -type GetDbHomePatchHistoryEntryRequest struct { - - // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` - - // The OCID of the patch history entry. - PatchHistoryEntryId *string `mandatory:"true" contributesTo:"path" name:"patchHistoryEntryId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDbHomePatchHistoryEntryRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDbHomePatchHistoryEntryRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDbHomePatchHistoryEntryRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDbHomePatchHistoryEntryResponse wrapper for the GetDbHomePatchHistoryEntry operation -type GetDbHomePatchHistoryEntryResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The PatchHistoryEntry instance - PatchHistoryEntry `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetDbHomePatchHistoryEntryResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDbHomePatchHistoryEntryResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go deleted file mode 100644 index 3994d45f8..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDbHomePatchRequest wrapper for the GetDbHomePatch operation -type GetDbHomePatchRequest struct { - - // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` - - // The OCID of the patch. - PatchId *string `mandatory:"true" contributesTo:"path" name:"patchId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDbHomePatchRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDbHomePatchRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDbHomePatchRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDbHomePatchResponse wrapper for the GetDbHomePatch operation -type GetDbHomePatchResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Patch instance - Patch `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetDbHomePatchResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDbHomePatchResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go deleted file mode 100644 index 6a11d10f4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDbHomeRequest wrapper for the GetDbHome operation -type GetDbHomeRequest struct { - - // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDbHomeRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDbHomeRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDbHomeRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDbHomeResponse wrapper for the GetDbHome operation -type GetDbHomeResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DbHome instance - DbHome `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetDbHomeResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDbHomeResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go deleted file mode 100644 index bc925ccc0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDbNodeRequest wrapper for the GetDbNode operation -type GetDbNodeRequest struct { - - // The database node OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbNodeId *string `mandatory:"true" contributesTo:"path" name:"dbNodeId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDbNodeRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDbNodeRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDbNodeRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDbNodeResponse wrapper for the GetDbNode operation -type GetDbNodeResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DbNode instance - DbNode `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetDbNodeResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDbNodeResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go deleted file mode 100644 index b158b3cda..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDbSystemPatchHistoryEntryRequest wrapper for the GetDbSystemPatchHistoryEntry operation -type GetDbSystemPatchHistoryEntryRequest struct { - - // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // The OCID of the patch history entry. - PatchHistoryEntryId *string `mandatory:"true" contributesTo:"path" name:"patchHistoryEntryId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDbSystemPatchHistoryEntryRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDbSystemPatchHistoryEntryRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDbSystemPatchHistoryEntryRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDbSystemPatchHistoryEntryResponse wrapper for the GetDbSystemPatchHistoryEntry operation -type GetDbSystemPatchHistoryEntryResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The PatchHistoryEntry instance - PatchHistoryEntry `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetDbSystemPatchHistoryEntryResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDbSystemPatchHistoryEntryResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go deleted file mode 100644 index fec5ae6d4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDbSystemPatchRequest wrapper for the GetDbSystemPatch operation -type GetDbSystemPatchRequest struct { - - // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // The OCID of the patch. - PatchId *string `mandatory:"true" contributesTo:"path" name:"patchId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDbSystemPatchRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDbSystemPatchRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDbSystemPatchRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDbSystemPatchResponse wrapper for the GetDbSystemPatch operation -type GetDbSystemPatchResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Patch instance - Patch `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetDbSystemPatchResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDbSystemPatchResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go deleted file mode 100644 index 75cfeb978..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDbSystemRequest wrapper for the GetDbSystem operation -type GetDbSystemRequest struct { - - // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDbSystemRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDbSystemRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDbSystemRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDbSystemResponse wrapper for the GetDbSystem operation -type GetDbSystemResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DbSystem instance - DbSystem `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetDbSystemResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDbSystemResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_base.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_base.go deleted file mode 100644 index 90feddd34..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_base.go +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// LaunchDbSystemBase The representation of LaunchDbSystemBase -type LaunchDbSystemBase interface { - - // The Availability Domain where the DB System is located. - GetAvailabilityDomain() *string - - // The Oracle Cloud ID (OCID) of the compartment the DB System belongs in. - GetCompartmentId() *string - - // The number of CPU cores to enable. The valid values depend on the specified shape: - // - BM.DenseIO1.36 and BM.HighIO1.36 - Specify a multiple of 2, from 2 to 36. - // - BM.RACLocalStorage1.72 - Specify a multiple of 4, from 4 to 72. - // - Exadata.Quarter1.84 - Specify a multiple of 2, from 22 to 84. - // - Exadata.Half1.168 - Specify a multiple of 4, from 44 to 168. - // - Exadata.Full1.336 - Specify a multiple of 8, from 88 to 336. - // For VM DB systems, the core count is inferred from the specific VM shape chosen, so this parameter is not used. - GetCpuCoreCount() *int - - // The host name for the DB System. The host name must begin with an alphabetic character and - // can contain a maximum of 30 alphanumeric characters, including hyphens (-). - // The maximum length of the combined hostname and domain is 63 characters. - // **Note:** The hostname must be unique within the subnet. If it is not unique, - // the DB System will fail to provision. - GetHostname() *string - - // The shape of the DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListDbSystemShapes operation. - GetShape() *string - - // The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. - GetSshPublicKeys() []string - - // The OCID of the subnet the DB System is associated with. - // **Subnet Restrictions:** - // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 - // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 - // These subnets are used by the Oracle Clusterware private interconnect on the database instance. - // Specifying an overlapping subnet will cause the private interconnect to malfunction. - // This restriction applies to both the client subnet and backup subnet. - GetSubnetId() *string - - // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. - // **Subnet Restrictions:** See above subnetId's **Subnet Restriction**. - GetBackupSubnetId() *string - - // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. - GetClusterName() *string - - // The percentage assigned to DATA storage (user data and database files). - // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). - // Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems. - GetDataStoragePercentage() *int - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - GetDefinedTags() map[string]map[string]interface{} - - // The user-friendly name for the DB System. It does not have to be unique. - GetDisplayName() *string - - // A domain name used for the DB System. If the Oracle-provided Internet and VCN - // Resolver is enabled for the specified subnet, the domain name for the subnet is used - // (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. - GetDomain() *string - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - GetFreeformTags() map[string]string - - // Size, in GBs, of the initial data volume that will be created and attached to VM-shape based DB system. This storage can later be scaled up if needed. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. - GetInitialDataStorageSizeInGB() *int - - // Number of nodes to launch for a VM-shape based RAC DB system. - GetNodeCount() *int -} - -type launchdbsystembase struct { - JsonData []byte - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` - Hostname *string `mandatory:"true" json:"hostname"` - Shape *string `mandatory:"true" json:"shape"` - SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` - SubnetId *string `mandatory:"true" json:"subnetId"` - BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` - ClusterName *string `mandatory:"false" json:"clusterName"` - DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - DisplayName *string `mandatory:"false" json:"displayName"` - Domain *string `mandatory:"false" json:"domain"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - InitialDataStorageSizeInGB *int `mandatory:"false" json:"initialDataStorageSizeInGB"` - NodeCount *int `mandatory:"false" json:"nodeCount"` - Source string `json:"source"` -} - -// UnmarshalJSON unmarshals json -func (m *launchdbsystembase) UnmarshalJSON(data []byte) error { - m.JsonData = data - type Unmarshalerlaunchdbsystembase launchdbsystembase - s := struct { - Model Unmarshalerlaunchdbsystembase - }{} - err := json.Unmarshal(data, &s.Model) - if err != nil { - return err - } - m.AvailabilityDomain = s.Model.AvailabilityDomain - m.CompartmentId = s.Model.CompartmentId - m.CpuCoreCount = s.Model.CpuCoreCount - m.Hostname = s.Model.Hostname - m.Shape = s.Model.Shape - m.SshPublicKeys = s.Model.SshPublicKeys - m.SubnetId = s.Model.SubnetId - m.BackupSubnetId = s.Model.BackupSubnetId - m.ClusterName = s.Model.ClusterName - m.DataStoragePercentage = s.Model.DataStoragePercentage - m.DefinedTags = s.Model.DefinedTags - m.DisplayName = s.Model.DisplayName - m.Domain = s.Model.Domain - m.FreeformTags = s.Model.FreeformTags - m.InitialDataStorageSizeInGB = s.Model.InitialDataStorageSizeInGB - m.NodeCount = s.Model.NodeCount - m.Source = s.Model.Source - - return err -} - -// UnmarshalPolymorphicJSON unmarshals polymorphic json -func (m *launchdbsystembase) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { - var err error - switch m.Source { - case "NONE": - mm := LaunchDbSystemDetails{} - err = json.Unmarshal(data, &mm) - return mm, err - case "DB_BACKUP": - mm := LaunchDbSystemFromBackupDetails{} - err = json.Unmarshal(data, &mm) - return mm, err - default: - return m, nil - } -} - -//GetAvailabilityDomain returns AvailabilityDomain -func (m launchdbsystembase) GetAvailabilityDomain() *string { - return m.AvailabilityDomain -} - -//GetCompartmentId returns CompartmentId -func (m launchdbsystembase) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetCpuCoreCount returns CpuCoreCount -func (m launchdbsystembase) GetCpuCoreCount() *int { - return m.CpuCoreCount -} - -//GetHostname returns Hostname -func (m launchdbsystembase) GetHostname() *string { - return m.Hostname -} - -//GetShape returns Shape -func (m launchdbsystembase) GetShape() *string { - return m.Shape -} - -//GetSshPublicKeys returns SshPublicKeys -func (m launchdbsystembase) GetSshPublicKeys() []string { - return m.SshPublicKeys -} - -//GetSubnetId returns SubnetId -func (m launchdbsystembase) GetSubnetId() *string { - return m.SubnetId -} - -//GetBackupSubnetId returns BackupSubnetId -func (m launchdbsystembase) GetBackupSubnetId() *string { - return m.BackupSubnetId -} - -//GetClusterName returns ClusterName -func (m launchdbsystembase) GetClusterName() *string { - return m.ClusterName -} - -//GetDataStoragePercentage returns DataStoragePercentage -func (m launchdbsystembase) GetDataStoragePercentage() *int { - return m.DataStoragePercentage -} - -//GetDefinedTags returns DefinedTags -func (m launchdbsystembase) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetDisplayName returns DisplayName -func (m launchdbsystembase) GetDisplayName() *string { - return m.DisplayName -} - -//GetDomain returns Domain -func (m launchdbsystembase) GetDomain() *string { - return m.Domain -} - -//GetFreeformTags returns FreeformTags -func (m launchdbsystembase) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetInitialDataStorageSizeInGB returns InitialDataStorageSizeInGB -func (m launchdbsystembase) GetInitialDataStorageSizeInGB() *int { - return m.InitialDataStorageSizeInGB -} - -//GetNodeCount returns NodeCount -func (m launchdbsystembase) GetNodeCount() *int { - return m.NodeCount -} - -func (m launchdbsystembase) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go deleted file mode 100644 index bd27422ef..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// LaunchDbSystemDetails The representation of LaunchDbSystemDetails -type LaunchDbSystemDetails struct { - - // The Availability Domain where the DB System is located. - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - - // The Oracle Cloud ID (OCID) of the compartment the DB System belongs in. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The number of CPU cores to enable. The valid values depend on the specified shape: - // - BM.DenseIO1.36 and BM.HighIO1.36 - Specify a multiple of 2, from 2 to 36. - // - BM.RACLocalStorage1.72 - Specify a multiple of 4, from 4 to 72. - // - Exadata.Quarter1.84 - Specify a multiple of 2, from 22 to 84. - // - Exadata.Half1.168 - Specify a multiple of 4, from 44 to 168. - // - Exadata.Full1.336 - Specify a multiple of 8, from 88 to 336. - // For VM DB systems, the core count is inferred from the specific VM shape chosen, so this parameter is not used. - CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` - - // The host name for the DB System. The host name must begin with an alphabetic character and - // can contain a maximum of 30 alphanumeric characters, including hyphens (-). - // The maximum length of the combined hostname and domain is 63 characters. - // **Note:** The hostname must be unique within the subnet. If it is not unique, - // the DB System will fail to provision. - Hostname *string `mandatory:"true" json:"hostname"` - - // The shape of the DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListDbSystemShapes operation. - Shape *string `mandatory:"true" json:"shape"` - - // The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. - SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` - - // The OCID of the subnet the DB System is associated with. - // **Subnet Restrictions:** - // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 - // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 - // These subnets are used by the Oracle Clusterware private interconnect on the database instance. - // Specifying an overlapping subnet will cause the private interconnect to malfunction. - // This restriction applies to both the client subnet and backup subnet. - SubnetId *string `mandatory:"true" json:"subnetId"` - - DbHome *CreateDbHomeDetails `mandatory:"true" json:"dbHome"` - - // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. - // **Subnet Restrictions:** See above subnetId's **Subnet Restriction**. - BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` - - // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. - ClusterName *string `mandatory:"false" json:"clusterName"` - - // The percentage assigned to DATA storage (user data and database files). - // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). - // Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems. - DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // The user-friendly name for the DB System. It does not have to be unique. - DisplayName *string `mandatory:"false" json:"displayName"` - - // A domain name used for the DB System. If the Oracle-provided Internet and VCN - // Resolver is enabled for the specified subnet, the domain name for the subnet is used - // (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. - Domain *string `mandatory:"false" json:"domain"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Size, in GBs, of the initial data volume that will be created and attached to VM-shape based DB system. This storage can later be scaled up if needed. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. - InitialDataStorageSizeInGB *int `mandatory:"false" json:"initialDataStorageSizeInGB"` - - // Number of nodes to launch for a VM-shape based RAC DB system. - NodeCount *int `mandatory:"false" json:"nodeCount"` - - // The Oracle Database Edition that applies to all the databases on the DB System. - // Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE. - DatabaseEdition LaunchDbSystemDetailsDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` - - // The type of redundancy configured for the DB System. - // Normal is 2-way redundancy, recommended for test and development systems. - // High is 3-way redundancy, recommended for production systems. - DiskRedundancy LaunchDbSystemDetailsDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` - - // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. - LicenseModel LaunchDbSystemDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` -} - -//GetAvailabilityDomain returns AvailabilityDomain -func (m LaunchDbSystemDetails) GetAvailabilityDomain() *string { - return m.AvailabilityDomain -} - -//GetBackupSubnetId returns BackupSubnetId -func (m LaunchDbSystemDetails) GetBackupSubnetId() *string { - return m.BackupSubnetId -} - -//GetClusterName returns ClusterName -func (m LaunchDbSystemDetails) GetClusterName() *string { - return m.ClusterName -} - -//GetCompartmentId returns CompartmentId -func (m LaunchDbSystemDetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetCpuCoreCount returns CpuCoreCount -func (m LaunchDbSystemDetails) GetCpuCoreCount() *int { - return m.CpuCoreCount -} - -//GetDataStoragePercentage returns DataStoragePercentage -func (m LaunchDbSystemDetails) GetDataStoragePercentage() *int { - return m.DataStoragePercentage -} - -//GetDefinedTags returns DefinedTags -func (m LaunchDbSystemDetails) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetDisplayName returns DisplayName -func (m LaunchDbSystemDetails) GetDisplayName() *string { - return m.DisplayName -} - -//GetDomain returns Domain -func (m LaunchDbSystemDetails) GetDomain() *string { - return m.Domain -} - -//GetFreeformTags returns FreeformTags -func (m LaunchDbSystemDetails) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetHostname returns Hostname -func (m LaunchDbSystemDetails) GetHostname() *string { - return m.Hostname -} - -//GetInitialDataStorageSizeInGB returns InitialDataStorageSizeInGB -func (m LaunchDbSystemDetails) GetInitialDataStorageSizeInGB() *int { - return m.InitialDataStorageSizeInGB -} - -//GetNodeCount returns NodeCount -func (m LaunchDbSystemDetails) GetNodeCount() *int { - return m.NodeCount -} - -//GetShape returns Shape -func (m LaunchDbSystemDetails) GetShape() *string { - return m.Shape -} - -//GetSshPublicKeys returns SshPublicKeys -func (m LaunchDbSystemDetails) GetSshPublicKeys() []string { - return m.SshPublicKeys -} - -//GetSubnetId returns SubnetId -func (m LaunchDbSystemDetails) GetSubnetId() *string { - return m.SubnetId -} - -func (m LaunchDbSystemDetails) String() string { - return common.PointerString(m) -} - -// MarshalJSON marshals to json representation -func (m LaunchDbSystemDetails) MarshalJSON() (buff []byte, e error) { - type MarshalTypeLaunchDbSystemDetails LaunchDbSystemDetails - s := struct { - DiscriminatorParam string `json:"source"` - MarshalTypeLaunchDbSystemDetails - }{ - "NONE", - (MarshalTypeLaunchDbSystemDetails)(m), - } - - return json.Marshal(&s) -} - -// LaunchDbSystemDetailsDatabaseEditionEnum Enum with underlying type: string -type LaunchDbSystemDetailsDatabaseEditionEnum string - -// Set of constants representing the allowable values for LaunchDbSystemDetailsDatabaseEdition -const ( - LaunchDbSystemDetailsDatabaseEditionStandardEdition LaunchDbSystemDetailsDatabaseEditionEnum = "STANDARD_EDITION" - LaunchDbSystemDetailsDatabaseEditionEnterpriseEdition LaunchDbSystemDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION" - LaunchDbSystemDetailsDatabaseEditionEnterpriseEditionExtremePerformance LaunchDbSystemDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" - LaunchDbSystemDetailsDatabaseEditionEnterpriseEditionHighPerformance LaunchDbSystemDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" -) - -var mappingLaunchDbSystemDetailsDatabaseEdition = map[string]LaunchDbSystemDetailsDatabaseEditionEnum{ - "STANDARD_EDITION": LaunchDbSystemDetailsDatabaseEditionStandardEdition, - "ENTERPRISE_EDITION": LaunchDbSystemDetailsDatabaseEditionEnterpriseEdition, - "ENTERPRISE_EDITION_EXTREME_PERFORMANCE": LaunchDbSystemDetailsDatabaseEditionEnterpriseEditionExtremePerformance, - "ENTERPRISE_EDITION_HIGH_PERFORMANCE": LaunchDbSystemDetailsDatabaseEditionEnterpriseEditionHighPerformance, -} - -// GetLaunchDbSystemDetailsDatabaseEditionEnumValues Enumerates the set of values for LaunchDbSystemDetailsDatabaseEdition -func GetLaunchDbSystemDetailsDatabaseEditionEnumValues() []LaunchDbSystemDetailsDatabaseEditionEnum { - values := make([]LaunchDbSystemDetailsDatabaseEditionEnum, 0) - for _, v := range mappingLaunchDbSystemDetailsDatabaseEdition { - values = append(values, v) - } - return values -} - -// LaunchDbSystemDetailsDiskRedundancyEnum Enum with underlying type: string -type LaunchDbSystemDetailsDiskRedundancyEnum string - -// Set of constants representing the allowable values for LaunchDbSystemDetailsDiskRedundancy -const ( - LaunchDbSystemDetailsDiskRedundancyHigh LaunchDbSystemDetailsDiskRedundancyEnum = "HIGH" - LaunchDbSystemDetailsDiskRedundancyNormal LaunchDbSystemDetailsDiskRedundancyEnum = "NORMAL" -) - -var mappingLaunchDbSystemDetailsDiskRedundancy = map[string]LaunchDbSystemDetailsDiskRedundancyEnum{ - "HIGH": LaunchDbSystemDetailsDiskRedundancyHigh, - "NORMAL": LaunchDbSystemDetailsDiskRedundancyNormal, -} - -// GetLaunchDbSystemDetailsDiskRedundancyEnumValues Enumerates the set of values for LaunchDbSystemDetailsDiskRedundancy -func GetLaunchDbSystemDetailsDiskRedundancyEnumValues() []LaunchDbSystemDetailsDiskRedundancyEnum { - values := make([]LaunchDbSystemDetailsDiskRedundancyEnum, 0) - for _, v := range mappingLaunchDbSystemDetailsDiskRedundancy { - values = append(values, v) - } - return values -} - -// LaunchDbSystemDetailsLicenseModelEnum Enum with underlying type: string -type LaunchDbSystemDetailsLicenseModelEnum string - -// Set of constants representing the allowable values for LaunchDbSystemDetailsLicenseModel -const ( - LaunchDbSystemDetailsLicenseModelLicenseIncluded LaunchDbSystemDetailsLicenseModelEnum = "LICENSE_INCLUDED" - LaunchDbSystemDetailsLicenseModelBringYourOwnLicense LaunchDbSystemDetailsLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" -) - -var mappingLaunchDbSystemDetailsLicenseModel = map[string]LaunchDbSystemDetailsLicenseModelEnum{ - "LICENSE_INCLUDED": LaunchDbSystemDetailsLicenseModelLicenseIncluded, - "BRING_YOUR_OWN_LICENSE": LaunchDbSystemDetailsLicenseModelBringYourOwnLicense, -} - -// GetLaunchDbSystemDetailsLicenseModelEnumValues Enumerates the set of values for LaunchDbSystemDetailsLicenseModel -func GetLaunchDbSystemDetailsLicenseModelEnumValues() []LaunchDbSystemDetailsLicenseModelEnum { - values := make([]LaunchDbSystemDetailsLicenseModelEnum, 0) - for _, v := range mappingLaunchDbSystemDetailsLicenseModel { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_from_backup_details.go deleted file mode 100644 index 309a54dc0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_from_backup_details.go +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// LaunchDbSystemFromBackupDetails The representation of LaunchDbSystemFromBackupDetails -type LaunchDbSystemFromBackupDetails struct { - - // The Availability Domain where the DB System is located. - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - - // The Oracle Cloud ID (OCID) of the compartment the DB System belongs in. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The number of CPU cores to enable. The valid values depend on the specified shape: - // - BM.DenseIO1.36 and BM.HighIO1.36 - Specify a multiple of 2, from 2 to 36. - // - BM.RACLocalStorage1.72 - Specify a multiple of 4, from 4 to 72. - // - Exadata.Quarter1.84 - Specify a multiple of 2, from 22 to 84. - // - Exadata.Half1.168 - Specify a multiple of 4, from 44 to 168. - // - Exadata.Full1.336 - Specify a multiple of 8, from 88 to 336. - // For VM DB systems, the core count is inferred from the specific VM shape chosen, so this parameter is not used. - CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` - - // The host name for the DB System. The host name must begin with an alphabetic character and - // can contain a maximum of 30 alphanumeric characters, including hyphens (-). - // The maximum length of the combined hostname and domain is 63 characters. - // **Note:** The hostname must be unique within the subnet. If it is not unique, - // the DB System will fail to provision. - Hostname *string `mandatory:"true" json:"hostname"` - - // The shape of the DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListDbSystemShapes operation. - Shape *string `mandatory:"true" json:"shape"` - - // The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. - SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` - - // The OCID of the subnet the DB System is associated with. - // **Subnet Restrictions:** - // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 - // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 - // These subnets are used by the Oracle Clusterware private interconnect on the database instance. - // Specifying an overlapping subnet will cause the private interconnect to malfunction. - // This restriction applies to both the client subnet and backup subnet. - SubnetId *string `mandatory:"true" json:"subnetId"` - - DbHome *CreateDbHomeFromBackupDetails `mandatory:"true" json:"dbHome"` - - // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. - // **Subnet Restrictions:** See above subnetId's **Subnet Restriction**. - BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` - - // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. - ClusterName *string `mandatory:"false" json:"clusterName"` - - // The percentage assigned to DATA storage (user data and database files). - // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). - // Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems. - DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // The user-friendly name for the DB System. It does not have to be unique. - DisplayName *string `mandatory:"false" json:"displayName"` - - // A domain name used for the DB System. If the Oracle-provided Internet and VCN - // Resolver is enabled for the specified subnet, the domain name for the subnet is used - // (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. - Domain *string `mandatory:"false" json:"domain"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Size, in GBs, of the initial data volume that will be created and attached to VM-shape based DB system. This storage can later be scaled up if needed. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. - InitialDataStorageSizeInGB *int `mandatory:"false" json:"initialDataStorageSizeInGB"` - - // Number of nodes to launch for a VM-shape based RAC DB system. - NodeCount *int `mandatory:"false" json:"nodeCount"` - - // The Oracle Database Edition that applies to all the databases on the DB System. - // Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE. - DatabaseEdition LaunchDbSystemFromBackupDetailsDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` - - // The type of redundancy configured for the DB System. - // Normal is 2-way redundancy, recommended for test and development systems. - // High is 3-way redundancy, recommended for production systems. - DiskRedundancy LaunchDbSystemFromBackupDetailsDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` - - // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. - LicenseModel LaunchDbSystemFromBackupDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` -} - -//GetAvailabilityDomain returns AvailabilityDomain -func (m LaunchDbSystemFromBackupDetails) GetAvailabilityDomain() *string { - return m.AvailabilityDomain -} - -//GetBackupSubnetId returns BackupSubnetId -func (m LaunchDbSystemFromBackupDetails) GetBackupSubnetId() *string { - return m.BackupSubnetId -} - -//GetClusterName returns ClusterName -func (m LaunchDbSystemFromBackupDetails) GetClusterName() *string { - return m.ClusterName -} - -//GetCompartmentId returns CompartmentId -func (m LaunchDbSystemFromBackupDetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetCpuCoreCount returns CpuCoreCount -func (m LaunchDbSystemFromBackupDetails) GetCpuCoreCount() *int { - return m.CpuCoreCount -} - -//GetDataStoragePercentage returns DataStoragePercentage -func (m LaunchDbSystemFromBackupDetails) GetDataStoragePercentage() *int { - return m.DataStoragePercentage -} - -//GetDefinedTags returns DefinedTags -func (m LaunchDbSystemFromBackupDetails) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetDisplayName returns DisplayName -func (m LaunchDbSystemFromBackupDetails) GetDisplayName() *string { - return m.DisplayName -} - -//GetDomain returns Domain -func (m LaunchDbSystemFromBackupDetails) GetDomain() *string { - return m.Domain -} - -//GetFreeformTags returns FreeformTags -func (m LaunchDbSystemFromBackupDetails) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetHostname returns Hostname -func (m LaunchDbSystemFromBackupDetails) GetHostname() *string { - return m.Hostname -} - -//GetInitialDataStorageSizeInGB returns InitialDataStorageSizeInGB -func (m LaunchDbSystemFromBackupDetails) GetInitialDataStorageSizeInGB() *int { - return m.InitialDataStorageSizeInGB -} - -//GetNodeCount returns NodeCount -func (m LaunchDbSystemFromBackupDetails) GetNodeCount() *int { - return m.NodeCount -} - -//GetShape returns Shape -func (m LaunchDbSystemFromBackupDetails) GetShape() *string { - return m.Shape -} - -//GetSshPublicKeys returns SshPublicKeys -func (m LaunchDbSystemFromBackupDetails) GetSshPublicKeys() []string { - return m.SshPublicKeys -} - -//GetSubnetId returns SubnetId -func (m LaunchDbSystemFromBackupDetails) GetSubnetId() *string { - return m.SubnetId -} - -func (m LaunchDbSystemFromBackupDetails) String() string { - return common.PointerString(m) -} - -// MarshalJSON marshals to json representation -func (m LaunchDbSystemFromBackupDetails) MarshalJSON() (buff []byte, e error) { - type MarshalTypeLaunchDbSystemFromBackupDetails LaunchDbSystemFromBackupDetails - s := struct { - DiscriminatorParam string `json:"source"` - MarshalTypeLaunchDbSystemFromBackupDetails - }{ - "DB_BACKUP", - (MarshalTypeLaunchDbSystemFromBackupDetails)(m), - } - - return json.Marshal(&s) -} - -// LaunchDbSystemFromBackupDetailsDatabaseEditionEnum Enum with underlying type: string -type LaunchDbSystemFromBackupDetailsDatabaseEditionEnum string - -// Set of constants representing the allowable values for LaunchDbSystemFromBackupDetailsDatabaseEdition -const ( - LaunchDbSystemFromBackupDetailsDatabaseEditionStandardEdition LaunchDbSystemFromBackupDetailsDatabaseEditionEnum = "STANDARD_EDITION" - LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEdition LaunchDbSystemFromBackupDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION" - LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEditionExtremePerformance LaunchDbSystemFromBackupDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" - LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEditionHighPerformance LaunchDbSystemFromBackupDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" -) - -var mappingLaunchDbSystemFromBackupDetailsDatabaseEdition = map[string]LaunchDbSystemFromBackupDetailsDatabaseEditionEnum{ - "STANDARD_EDITION": LaunchDbSystemFromBackupDetailsDatabaseEditionStandardEdition, - "ENTERPRISE_EDITION": LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEdition, - "ENTERPRISE_EDITION_EXTREME_PERFORMANCE": LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEditionExtremePerformance, - "ENTERPRISE_EDITION_HIGH_PERFORMANCE": LaunchDbSystemFromBackupDetailsDatabaseEditionEnterpriseEditionHighPerformance, -} - -// GetLaunchDbSystemFromBackupDetailsDatabaseEditionEnumValues Enumerates the set of values for LaunchDbSystemFromBackupDetailsDatabaseEdition -func GetLaunchDbSystemFromBackupDetailsDatabaseEditionEnumValues() []LaunchDbSystemFromBackupDetailsDatabaseEditionEnum { - values := make([]LaunchDbSystemFromBackupDetailsDatabaseEditionEnum, 0) - for _, v := range mappingLaunchDbSystemFromBackupDetailsDatabaseEdition { - values = append(values, v) - } - return values -} - -// LaunchDbSystemFromBackupDetailsDiskRedundancyEnum Enum with underlying type: string -type LaunchDbSystemFromBackupDetailsDiskRedundancyEnum string - -// Set of constants representing the allowable values for LaunchDbSystemFromBackupDetailsDiskRedundancy -const ( - LaunchDbSystemFromBackupDetailsDiskRedundancyHigh LaunchDbSystemFromBackupDetailsDiskRedundancyEnum = "HIGH" - LaunchDbSystemFromBackupDetailsDiskRedundancyNormal LaunchDbSystemFromBackupDetailsDiskRedundancyEnum = "NORMAL" -) - -var mappingLaunchDbSystemFromBackupDetailsDiskRedundancy = map[string]LaunchDbSystemFromBackupDetailsDiskRedundancyEnum{ - "HIGH": LaunchDbSystemFromBackupDetailsDiskRedundancyHigh, - "NORMAL": LaunchDbSystemFromBackupDetailsDiskRedundancyNormal, -} - -// GetLaunchDbSystemFromBackupDetailsDiskRedundancyEnumValues Enumerates the set of values for LaunchDbSystemFromBackupDetailsDiskRedundancy -func GetLaunchDbSystemFromBackupDetailsDiskRedundancyEnumValues() []LaunchDbSystemFromBackupDetailsDiskRedundancyEnum { - values := make([]LaunchDbSystemFromBackupDetailsDiskRedundancyEnum, 0) - for _, v := range mappingLaunchDbSystemFromBackupDetailsDiskRedundancy { - values = append(values, v) - } - return values -} - -// LaunchDbSystemFromBackupDetailsLicenseModelEnum Enum with underlying type: string -type LaunchDbSystemFromBackupDetailsLicenseModelEnum string - -// Set of constants representing the allowable values for LaunchDbSystemFromBackupDetailsLicenseModel -const ( - LaunchDbSystemFromBackupDetailsLicenseModelLicenseIncluded LaunchDbSystemFromBackupDetailsLicenseModelEnum = "LICENSE_INCLUDED" - LaunchDbSystemFromBackupDetailsLicenseModelBringYourOwnLicense LaunchDbSystemFromBackupDetailsLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" -) - -var mappingLaunchDbSystemFromBackupDetailsLicenseModel = map[string]LaunchDbSystemFromBackupDetailsLicenseModelEnum{ - "LICENSE_INCLUDED": LaunchDbSystemFromBackupDetailsLicenseModelLicenseIncluded, - "BRING_YOUR_OWN_LICENSE": LaunchDbSystemFromBackupDetailsLicenseModelBringYourOwnLicense, -} - -// GetLaunchDbSystemFromBackupDetailsLicenseModelEnumValues Enumerates the set of values for LaunchDbSystemFromBackupDetailsLicenseModel -func GetLaunchDbSystemFromBackupDetailsLicenseModelEnumValues() []LaunchDbSystemFromBackupDetailsLicenseModelEnum { - values := make([]LaunchDbSystemFromBackupDetailsLicenseModelEnum, 0) - for _, v := range mappingLaunchDbSystemFromBackupDetailsLicenseModel { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go deleted file mode 100644 index 2f09bfec7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// LaunchDbSystemRequest wrapper for the LaunchDbSystem operation -type LaunchDbSystemRequest struct { - - // Request to launch a DB System. - LaunchDbSystemDetails LaunchDbSystemBase `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (for example, if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request LaunchDbSystemRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request LaunchDbSystemRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request LaunchDbSystemRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// LaunchDbSystemResponse wrapper for the LaunchDbSystem operation -type LaunchDbSystemResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DbSystem instance - DbSystem `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response LaunchDbSystemResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response LaunchDbSystemResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go deleted file mode 100644 index c323f1b34..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListBackupsRequest wrapper for the ListBackups operation -type ListBackupsRequest struct { - - // The OCID of the database. - DatabaseId *string `mandatory:"false" contributesTo:"query" name:"databaseId"` - - // The compartment OCID. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListBackupsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListBackupsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListBackupsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListBackupsResponse wrapper for the ListBackups operation -type ListBackupsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []BackupSummary instances - Items []BackupSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListBackupsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListBackupsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go deleted file mode 100644 index 368f73320..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDataGuardAssociationsRequest wrapper for the ListDataGuardAssociations operation -type ListDataGuardAssociationsRequest struct { - - // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDataGuardAssociationsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDataGuardAssociationsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDataGuardAssociationsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDataGuardAssociationsResponse wrapper for the ListDataGuardAssociations operation -type ListDataGuardAssociationsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []DataGuardAssociationSummary instances - Items []DataGuardAssociationSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDataGuardAssociationsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDataGuardAssociationsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go deleted file mode 100644 index 2c8380774..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDatabasesRequest wrapper for the ListDatabases operation -type ListDatabasesRequest struct { - - // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // A database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbHomeId *string `mandatory:"true" contributesTo:"query" name:"dbHomeId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDatabasesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDatabasesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDatabasesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDatabasesResponse wrapper for the ListDatabases operation -type ListDatabasesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []DatabaseSummary instances - Items []DatabaseSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDatabasesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDatabasesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go deleted file mode 100644 index c421ec669..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDbHomePatchHistoryEntriesRequest wrapper for the ListDbHomePatchHistoryEntries operation -type ListDbHomePatchHistoryEntriesRequest struct { - - // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDbHomePatchHistoryEntriesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDbHomePatchHistoryEntriesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDbHomePatchHistoryEntriesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDbHomePatchHistoryEntriesResponse wrapper for the ListDbHomePatchHistoryEntries operation -type ListDbHomePatchHistoryEntriesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []PatchHistoryEntrySummary instances - Items []PatchHistoryEntrySummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDbHomePatchHistoryEntriesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDbHomePatchHistoryEntriesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go deleted file mode 100644 index 07e495530..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDbHomePatchesRequest wrapper for the ListDbHomePatches operation -type ListDbHomePatchesRequest struct { - - // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDbHomePatchesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDbHomePatchesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDbHomePatchesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDbHomePatchesResponse wrapper for the ListDbHomePatches operation -type ListDbHomePatchesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []PatchSummary instances - Items []PatchSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDbHomePatchesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDbHomePatchesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go deleted file mode 100644 index be6132b91..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDbHomesRequest wrapper for the ListDbHomes operation -type ListDbHomesRequest struct { - - // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System. - DbSystemId *string `mandatory:"true" contributesTo:"query" name:"dbSystemId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDbHomesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDbHomesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDbHomesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDbHomesResponse wrapper for the ListDbHomes operation -type ListDbHomesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []DbHomeSummary instances - Items []DbHomeSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDbHomesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDbHomesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go deleted file mode 100644 index 845ebad3a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDbNodesRequest wrapper for the ListDbNodes operation -type ListDbNodesRequest struct { - - // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System. - DbSystemId *string `mandatory:"true" contributesTo:"query" name:"dbSystemId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDbNodesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDbNodesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDbNodesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDbNodesResponse wrapper for the ListDbNodes operation -type ListDbNodesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []DbNodeSummary instances - Items []DbNodeSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDbNodesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDbNodesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go deleted file mode 100644 index 8717d5a67..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDbSystemPatchHistoryEntriesRequest wrapper for the ListDbSystemPatchHistoryEntries operation -type ListDbSystemPatchHistoryEntriesRequest struct { - - // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDbSystemPatchHistoryEntriesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDbSystemPatchHistoryEntriesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDbSystemPatchHistoryEntriesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDbSystemPatchHistoryEntriesResponse wrapper for the ListDbSystemPatchHistoryEntries operation -type ListDbSystemPatchHistoryEntriesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []PatchHistoryEntrySummary instances - Items []PatchHistoryEntrySummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDbSystemPatchHistoryEntriesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDbSystemPatchHistoryEntriesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go deleted file mode 100644 index 82feefa79..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDbSystemPatchesRequest wrapper for the ListDbSystemPatches operation -type ListDbSystemPatchesRequest struct { - - // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDbSystemPatchesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDbSystemPatchesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDbSystemPatchesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDbSystemPatchesResponse wrapper for the ListDbSystemPatches operation -type ListDbSystemPatchesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []PatchSummary instances - Items []PatchSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDbSystemPatchesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDbSystemPatchesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go deleted file mode 100644 index 8cb139fec..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDbSystemShapesRequest wrapper for the ListDbSystemShapes operation -type ListDbSystemShapesRequest struct { - - // The name of the Availability Domain. - AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` - - // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDbSystemShapesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDbSystemShapesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDbSystemShapesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDbSystemShapesResponse wrapper for the ListDbSystemShapes operation -type ListDbSystemShapesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []DbSystemShapeSummary instances - Items []DbSystemShapeSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDbSystemShapesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDbSystemShapesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go deleted file mode 100644 index 707094a96..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDbSystemsRequest wrapper for the ListDbSystems operation -type ListDbSystemsRequest struct { - - // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The OCID of the backup. Specify a backupId to list only the DB Systems that support creating a database using this backup in this compartment. - BackupId *string `mandatory:"false" contributesTo:"query" name:"backupId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDbSystemsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDbSystemsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDbSystemsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDbSystemsResponse wrapper for the ListDbSystems operation -type ListDbSystemsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []DbSystemSummary instances - Items []DbSystemSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDbSystemsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDbSystemsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go deleted file mode 100644 index 256a04642..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDbVersionsRequest wrapper for the ListDbVersions operation -type ListDbVersionsRequest struct { - - // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The pagination token to continue listing from. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // If provided, filters the results to the set of database versions which are supported for the given shape. - DbSystemShape *string `mandatory:"false" contributesTo:"query" name:"dbSystemShape"` - - // The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system. - DbSystemId *string `mandatory:"false" contributesTo:"query" name:"dbSystemId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDbVersionsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDbVersionsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDbVersionsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDbVersionsResponse wrapper for the ListDbVersions operation -type ListDbVersionsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []DbVersionSummary instances - Items []DbVersionSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then there are additional items still to get. Include this value as the `page` parameter for the - // subsequent GET request. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListDbVersionsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDbVersionsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch.go b/vendor/github.com/oracle/oci-go-sdk/database/patch.go deleted file mode 100644 index 7ed8a3398..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/patch.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Patch A Patch for a DB System or DB Home. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type Patch struct { - - // The text describing this patch package. - Description *string `mandatory:"true" json:"description"` - - // The OCID of the patch. - Id *string `mandatory:"true" json:"id"` - - // The date and time that the patch was released. - TimeReleased *common.SDKTime `mandatory:"true" json:"timeReleased"` - - // The version of this patch package. - Version *string `mandatory:"true" json:"version"` - - // Actions that can possibly be performed using this patch. - AvailableActions []PatchAvailableActionsEnum `mandatory:"false" json:"availableActions,omitempty"` - - // Action that is currently being performed or was completed last. - LastAction PatchLastActionEnum `mandatory:"false" json:"lastAction,omitempty"` - - // A descriptive text associated with the lifecycleState. - // Typically can contain additional displayable text. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The current state of the patch as a result of lastAction. - LifecycleState PatchLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` -} - -func (m Patch) String() string { - return common.PointerString(m) -} - -// PatchAvailableActionsEnum Enum with underlying type: string -type PatchAvailableActionsEnum string - -// Set of constants representing the allowable values for PatchAvailableActions -const ( - PatchAvailableActionsApply PatchAvailableActionsEnum = "APPLY" - PatchAvailableActionsPrecheck PatchAvailableActionsEnum = "PRECHECK" -) - -var mappingPatchAvailableActions = map[string]PatchAvailableActionsEnum{ - "APPLY": PatchAvailableActionsApply, - "PRECHECK": PatchAvailableActionsPrecheck, -} - -// GetPatchAvailableActionsEnumValues Enumerates the set of values for PatchAvailableActions -func GetPatchAvailableActionsEnumValues() []PatchAvailableActionsEnum { - values := make([]PatchAvailableActionsEnum, 0) - for _, v := range mappingPatchAvailableActions { - values = append(values, v) - } - return values -} - -// PatchLastActionEnum Enum with underlying type: string -type PatchLastActionEnum string - -// Set of constants representing the allowable values for PatchLastAction -const ( - PatchLastActionApply PatchLastActionEnum = "APPLY" - PatchLastActionPrecheck PatchLastActionEnum = "PRECHECK" -) - -var mappingPatchLastAction = map[string]PatchLastActionEnum{ - "APPLY": PatchLastActionApply, - "PRECHECK": PatchLastActionPrecheck, -} - -// GetPatchLastActionEnumValues Enumerates the set of values for PatchLastAction -func GetPatchLastActionEnumValues() []PatchLastActionEnum { - values := make([]PatchLastActionEnum, 0) - for _, v := range mappingPatchLastAction { - values = append(values, v) - } - return values -} - -// PatchLifecycleStateEnum Enum with underlying type: string -type PatchLifecycleStateEnum string - -// Set of constants representing the allowable values for PatchLifecycleState -const ( - PatchLifecycleStateAvailable PatchLifecycleStateEnum = "AVAILABLE" - PatchLifecycleStateSuccess PatchLifecycleStateEnum = "SUCCESS" - PatchLifecycleStateInProgress PatchLifecycleStateEnum = "IN_PROGRESS" - PatchLifecycleStateFailed PatchLifecycleStateEnum = "FAILED" -) - -var mappingPatchLifecycleState = map[string]PatchLifecycleStateEnum{ - "AVAILABLE": PatchLifecycleStateAvailable, - "SUCCESS": PatchLifecycleStateSuccess, - "IN_PROGRESS": PatchLifecycleStateInProgress, - "FAILED": PatchLifecycleStateFailed, -} - -// GetPatchLifecycleStateEnumValues Enumerates the set of values for PatchLifecycleState -func GetPatchLifecycleStateEnumValues() []PatchLifecycleStateEnum { - values := make([]PatchLifecycleStateEnum, 0) - for _, v := range mappingPatchLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch_details.go b/vendor/github.com/oracle/oci-go-sdk/database/patch_details.go deleted file mode 100644 index 1dab6a67a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/patch_details.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PatchDetails The details about what actions to perform and using what patch to the specified target. -// This is part of an update request that is applied to a version field on the target such -// as DB System, database home, etc. -type PatchDetails struct { - - // The action to perform on the patch. - Action PatchDetailsActionEnum `mandatory:"false" json:"action,omitempty"` - - // The OCID of the patch. - PatchId *string `mandatory:"false" json:"patchId"` -} - -func (m PatchDetails) String() string { - return common.PointerString(m) -} - -// PatchDetailsActionEnum Enum with underlying type: string -type PatchDetailsActionEnum string - -// Set of constants representing the allowable values for PatchDetailsAction -const ( - PatchDetailsActionApply PatchDetailsActionEnum = "APPLY" - PatchDetailsActionPrecheck PatchDetailsActionEnum = "PRECHECK" -) - -var mappingPatchDetailsAction = map[string]PatchDetailsActionEnum{ - "APPLY": PatchDetailsActionApply, - "PRECHECK": PatchDetailsActionPrecheck, -} - -// GetPatchDetailsActionEnumValues Enumerates the set of values for PatchDetailsAction -func GetPatchDetailsActionEnumValues() []PatchDetailsActionEnum { - values := make([]PatchDetailsActionEnum, 0) - for _, v := range mappingPatchDetailsAction { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry.go b/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry.go deleted file mode 100644 index 21fa02767..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PatchHistoryEntry The record of a patch action on a specified target. -type PatchHistoryEntry struct { - - // The OCID of the patch history entry. - Id *string `mandatory:"true" json:"id"` - - // The current state of the action. - LifecycleState PatchHistoryEntryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The OCID of the patch. - PatchId *string `mandatory:"true" json:"patchId"` - - // The date and time when the patch action started. - TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` - - // The action being performed or was completed. - Action PatchHistoryEntryActionEnum `mandatory:"false" json:"action,omitempty"` - - // A descriptive text associated with the lifecycleState. - // Typically contains additional displayable text. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The date and time when the patch action completed. - TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` -} - -func (m PatchHistoryEntry) String() string { - return common.PointerString(m) -} - -// PatchHistoryEntryActionEnum Enum with underlying type: string -type PatchHistoryEntryActionEnum string - -// Set of constants representing the allowable values for PatchHistoryEntryAction -const ( - PatchHistoryEntryActionApply PatchHistoryEntryActionEnum = "APPLY" - PatchHistoryEntryActionPrecheck PatchHistoryEntryActionEnum = "PRECHECK" -) - -var mappingPatchHistoryEntryAction = map[string]PatchHistoryEntryActionEnum{ - "APPLY": PatchHistoryEntryActionApply, - "PRECHECK": PatchHistoryEntryActionPrecheck, -} - -// GetPatchHistoryEntryActionEnumValues Enumerates the set of values for PatchHistoryEntryAction -func GetPatchHistoryEntryActionEnumValues() []PatchHistoryEntryActionEnum { - values := make([]PatchHistoryEntryActionEnum, 0) - for _, v := range mappingPatchHistoryEntryAction { - values = append(values, v) - } - return values -} - -// PatchHistoryEntryLifecycleStateEnum Enum with underlying type: string -type PatchHistoryEntryLifecycleStateEnum string - -// Set of constants representing the allowable values for PatchHistoryEntryLifecycleState -const ( - PatchHistoryEntryLifecycleStateInProgress PatchHistoryEntryLifecycleStateEnum = "IN_PROGRESS" - PatchHistoryEntryLifecycleStateSucceeded PatchHistoryEntryLifecycleStateEnum = "SUCCEEDED" - PatchHistoryEntryLifecycleStateFailed PatchHistoryEntryLifecycleStateEnum = "FAILED" -) - -var mappingPatchHistoryEntryLifecycleState = map[string]PatchHistoryEntryLifecycleStateEnum{ - "IN_PROGRESS": PatchHistoryEntryLifecycleStateInProgress, - "SUCCEEDED": PatchHistoryEntryLifecycleStateSucceeded, - "FAILED": PatchHistoryEntryLifecycleStateFailed, -} - -// GetPatchHistoryEntryLifecycleStateEnumValues Enumerates the set of values for PatchHistoryEntryLifecycleState -func GetPatchHistoryEntryLifecycleStateEnumValues() []PatchHistoryEntryLifecycleStateEnum { - values := make([]PatchHistoryEntryLifecycleStateEnum, 0) - for _, v := range mappingPatchHistoryEntryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry_summary.go deleted file mode 100644 index ddb964f93..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry_summary.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PatchHistoryEntrySummary The record of a patch action on a specified target. -type PatchHistoryEntrySummary struct { - - // The OCID of the patch history entry. - Id *string `mandatory:"true" json:"id"` - - // The current state of the action. - LifecycleState PatchHistoryEntrySummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The OCID of the patch. - PatchId *string `mandatory:"true" json:"patchId"` - - // The date and time when the patch action started. - TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` - - // The action being performed or was completed. - Action PatchHistoryEntrySummaryActionEnum `mandatory:"false" json:"action,omitempty"` - - // A descriptive text associated with the lifecycleState. - // Typically contains additional displayable text. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The date and time when the patch action completed. - TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` -} - -func (m PatchHistoryEntrySummary) String() string { - return common.PointerString(m) -} - -// PatchHistoryEntrySummaryActionEnum Enum with underlying type: string -type PatchHistoryEntrySummaryActionEnum string - -// Set of constants representing the allowable values for PatchHistoryEntrySummaryAction -const ( - PatchHistoryEntrySummaryActionApply PatchHistoryEntrySummaryActionEnum = "APPLY" - PatchHistoryEntrySummaryActionPrecheck PatchHistoryEntrySummaryActionEnum = "PRECHECK" -) - -var mappingPatchHistoryEntrySummaryAction = map[string]PatchHistoryEntrySummaryActionEnum{ - "APPLY": PatchHistoryEntrySummaryActionApply, - "PRECHECK": PatchHistoryEntrySummaryActionPrecheck, -} - -// GetPatchHistoryEntrySummaryActionEnumValues Enumerates the set of values for PatchHistoryEntrySummaryAction -func GetPatchHistoryEntrySummaryActionEnumValues() []PatchHistoryEntrySummaryActionEnum { - values := make([]PatchHistoryEntrySummaryActionEnum, 0) - for _, v := range mappingPatchHistoryEntrySummaryAction { - values = append(values, v) - } - return values -} - -// PatchHistoryEntrySummaryLifecycleStateEnum Enum with underlying type: string -type PatchHistoryEntrySummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for PatchHistoryEntrySummaryLifecycleState -const ( - PatchHistoryEntrySummaryLifecycleStateInProgress PatchHistoryEntrySummaryLifecycleStateEnum = "IN_PROGRESS" - PatchHistoryEntrySummaryLifecycleStateSucceeded PatchHistoryEntrySummaryLifecycleStateEnum = "SUCCEEDED" - PatchHistoryEntrySummaryLifecycleStateFailed PatchHistoryEntrySummaryLifecycleStateEnum = "FAILED" -) - -var mappingPatchHistoryEntrySummaryLifecycleState = map[string]PatchHistoryEntrySummaryLifecycleStateEnum{ - "IN_PROGRESS": PatchHistoryEntrySummaryLifecycleStateInProgress, - "SUCCEEDED": PatchHistoryEntrySummaryLifecycleStateSucceeded, - "FAILED": PatchHistoryEntrySummaryLifecycleStateFailed, -} - -// GetPatchHistoryEntrySummaryLifecycleStateEnumValues Enumerates the set of values for PatchHistoryEntrySummaryLifecycleState -func GetPatchHistoryEntrySummaryLifecycleStateEnumValues() []PatchHistoryEntrySummaryLifecycleStateEnum { - values := make([]PatchHistoryEntrySummaryLifecycleStateEnum, 0) - for _, v := range mappingPatchHistoryEntrySummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/patch_summary.go deleted file mode 100644 index e803c53fb..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/patch_summary.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PatchSummary A Patch for a DB System or DB Home. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type PatchSummary struct { - - // The text describing this patch package. - Description *string `mandatory:"true" json:"description"` - - // The OCID of the patch. - Id *string `mandatory:"true" json:"id"` - - // The date and time that the patch was released. - TimeReleased *common.SDKTime `mandatory:"true" json:"timeReleased"` - - // The version of this patch package. - Version *string `mandatory:"true" json:"version"` - - // Actions that can possibly be performed using this patch. - AvailableActions []PatchSummaryAvailableActionsEnum `mandatory:"false" json:"availableActions,omitempty"` - - // Action that is currently being performed or was completed last. - LastAction PatchSummaryLastActionEnum `mandatory:"false" json:"lastAction,omitempty"` - - // A descriptive text associated with the lifecycleState. - // Typically can contain additional displayable text. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - - // The current state of the patch as a result of lastAction. - LifecycleState PatchSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` -} - -func (m PatchSummary) String() string { - return common.PointerString(m) -} - -// PatchSummaryAvailableActionsEnum Enum with underlying type: string -type PatchSummaryAvailableActionsEnum string - -// Set of constants representing the allowable values for PatchSummaryAvailableActions -const ( - PatchSummaryAvailableActionsApply PatchSummaryAvailableActionsEnum = "APPLY" - PatchSummaryAvailableActionsPrecheck PatchSummaryAvailableActionsEnum = "PRECHECK" -) - -var mappingPatchSummaryAvailableActions = map[string]PatchSummaryAvailableActionsEnum{ - "APPLY": PatchSummaryAvailableActionsApply, - "PRECHECK": PatchSummaryAvailableActionsPrecheck, -} - -// GetPatchSummaryAvailableActionsEnumValues Enumerates the set of values for PatchSummaryAvailableActions -func GetPatchSummaryAvailableActionsEnumValues() []PatchSummaryAvailableActionsEnum { - values := make([]PatchSummaryAvailableActionsEnum, 0) - for _, v := range mappingPatchSummaryAvailableActions { - values = append(values, v) - } - return values -} - -// PatchSummaryLastActionEnum Enum with underlying type: string -type PatchSummaryLastActionEnum string - -// Set of constants representing the allowable values for PatchSummaryLastAction -const ( - PatchSummaryLastActionApply PatchSummaryLastActionEnum = "APPLY" - PatchSummaryLastActionPrecheck PatchSummaryLastActionEnum = "PRECHECK" -) - -var mappingPatchSummaryLastAction = map[string]PatchSummaryLastActionEnum{ - "APPLY": PatchSummaryLastActionApply, - "PRECHECK": PatchSummaryLastActionPrecheck, -} - -// GetPatchSummaryLastActionEnumValues Enumerates the set of values for PatchSummaryLastAction -func GetPatchSummaryLastActionEnumValues() []PatchSummaryLastActionEnum { - values := make([]PatchSummaryLastActionEnum, 0) - for _, v := range mappingPatchSummaryLastAction { - values = append(values, v) - } - return values -} - -// PatchSummaryLifecycleStateEnum Enum with underlying type: string -type PatchSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for PatchSummaryLifecycleState -const ( - PatchSummaryLifecycleStateAvailable PatchSummaryLifecycleStateEnum = "AVAILABLE" - PatchSummaryLifecycleStateSuccess PatchSummaryLifecycleStateEnum = "SUCCESS" - PatchSummaryLifecycleStateInProgress PatchSummaryLifecycleStateEnum = "IN_PROGRESS" - PatchSummaryLifecycleStateFailed PatchSummaryLifecycleStateEnum = "FAILED" -) - -var mappingPatchSummaryLifecycleState = map[string]PatchSummaryLifecycleStateEnum{ - "AVAILABLE": PatchSummaryLifecycleStateAvailable, - "SUCCESS": PatchSummaryLifecycleStateSuccess, - "IN_PROGRESS": PatchSummaryLifecycleStateInProgress, - "FAILED": PatchSummaryLifecycleStateFailed, -} - -// GetPatchSummaryLifecycleStateEnumValues Enumerates the set of values for PatchSummaryLifecycleState -func GetPatchSummaryLifecycleStateEnumValues() []PatchSummaryLifecycleStateEnum { - values := make([]PatchSummaryLifecycleStateEnum, 0) - for _, v := range mappingPatchSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_details.go b/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_details.go deleted file mode 100644 index b348fafb9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ReinstateDataGuardAssociationDetails The Data Guard association reinstate parameters. -type ReinstateDataGuardAssociationDetails struct { - - // The DB System administrator password. - DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` -} - -func (m ReinstateDataGuardAssociationDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go deleted file mode 100644 index 95f6d1a11..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ReinstateDataGuardAssociationRequest wrapper for the ReinstateDataGuardAssociation operation -type ReinstateDataGuardAssociationRequest struct { - - // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` - - // The Data Guard association's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DataGuardAssociationId *string `mandatory:"true" contributesTo:"path" name:"dataGuardAssociationId"` - - // A request to reinstate a database in a standby role. - ReinstateDataGuardAssociationDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ReinstateDataGuardAssociationRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ReinstateDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ReinstateDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ReinstateDataGuardAssociationResponse wrapper for the ReinstateDataGuardAssociation operation -type ReinstateDataGuardAssociationResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DataGuardAssociation instance - DataGuardAssociation `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ReinstateDataGuardAssociationResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ReinstateDataGuardAssociationResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/restore_database_details.go b/vendor/github.com/oracle/oci-go-sdk/database/restore_database_details.go deleted file mode 100644 index 4322a35ad..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/restore_database_details.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// RestoreDatabaseDetails The representation of RestoreDatabaseDetails -type RestoreDatabaseDetails struct { - - // Restores using the backup with the System Change Number (SCN) specified. - DatabaseSCN *string `mandatory:"false" json:"databaseSCN"` - - // Restores to the last known good state with the least possible data loss. - Latest *bool `mandatory:"false" json:"latest"` - - // Restores to the timestamp specified. - Timestamp *common.SDKTime `mandatory:"false" json:"timestamp"` -} - -func (m RestoreDatabaseDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go deleted file mode 100644 index b4c69a81c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// RestoreDatabaseRequest wrapper for the RestoreDatabase operation -type RestoreDatabaseRequest struct { - - // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` - - // Request to perform database restore. - RestoreDatabaseDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request RestoreDatabaseRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request RestoreDatabaseRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request RestoreDatabaseRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// RestoreDatabaseResponse wrapper for the RestoreDatabase operation -type RestoreDatabaseResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Database instance - Database `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response RestoreDatabaseResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response RestoreDatabaseResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_details.go b/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_details.go deleted file mode 100644 index 087705923..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SwitchoverDataGuardAssociationDetails The Data Guard association switchover parameters. -type SwitchoverDataGuardAssociationDetails struct { - - // The DB System administrator password. - DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` -} - -func (m SwitchoverDataGuardAssociationDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go deleted file mode 100644 index 95e8f7f7b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// SwitchoverDataGuardAssociationRequest wrapper for the SwitchoverDataGuardAssociation operation -type SwitchoverDataGuardAssociationRequest struct { - - // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` - - // The Data Guard association's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DataGuardAssociationId *string `mandatory:"true" contributesTo:"path" name:"dataGuardAssociationId"` - - // Request to swtichover a primary to a standby. - SwitchoverDataGuardAssociationDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request SwitchoverDataGuardAssociationRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request SwitchoverDataGuardAssociationRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request SwitchoverDataGuardAssociationRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// SwitchoverDataGuardAssociationResponse wrapper for the SwitchoverDataGuardAssociation operation -type SwitchoverDataGuardAssociationResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DataGuardAssociation instance - DataGuardAssociation `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response SwitchoverDataGuardAssociationResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response SwitchoverDataGuardAssociationResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go deleted file mode 100644 index a3c274ad5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// TerminateDbSystemRequest wrapper for the TerminateDbSystem operation -type TerminateDbSystemRequest struct { - - // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request TerminateDbSystemRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request TerminateDbSystemRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request TerminateDbSystemRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// TerminateDbSystemResponse wrapper for the TerminateDbSystem operation -type TerminateDbSystemResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response TerminateDbSystemResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response TerminateDbSystemResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go b/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go deleted file mode 100644 index 9eaa6801c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateDatabaseDetails The representation of UpdateDatabaseDetails -type UpdateDatabaseDetails struct { - DbBackupConfig *DbBackupConfig `mandatory:"false" json:"dbBackupConfig"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` -} - -func (m UpdateDatabaseDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go deleted file mode 100644 index 78c147af4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateDatabaseRequest wrapper for the UpdateDatabase operation -type UpdateDatabaseRequest struct { - - // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` - - // Request to perform database update. - UpdateDatabaseDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateDatabaseRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateDatabaseRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateDatabaseRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateDatabaseResponse wrapper for the UpdateDatabase operation -type UpdateDatabaseResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Database instance - Database `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateDatabaseResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateDatabaseResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_details.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_details.go deleted file mode 100644 index 741a7e36f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_details.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateDbHomeDetails Describes the modification parameters for the DB Home. -type UpdateDbHomeDetails struct { - DbVersion *PatchDetails `mandatory:"false" json:"dbVersion"` -} - -func (m UpdateDbHomeDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go deleted file mode 100644 index 586d3ef93..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateDbHomeRequest wrapper for the UpdateDbHome operation -type UpdateDbHomeRequest struct { - - // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` - - // Request to update the properties of a DB Home. - UpdateDbHomeDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateDbHomeRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateDbHomeRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateDbHomeRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateDbHomeResponse wrapper for the UpdateDbHome operation -type UpdateDbHomeResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DbHome instance - DbHome `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateDbHomeResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateDbHomeResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go deleted file mode 100644 index b7c400d83..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Database Service API -// -// The API for the Database Service. -// - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateDbSystemDetails Describes the modification parameters for the DB System. -type UpdateDbSystemDetails struct { - - // The number of CPU Cores to be set on the DB System. Applicable only for non-VM based DB systems. - CpuCoreCount *int `mandatory:"false" json:"cpuCoreCount"` - - // Size, in GBs, to which the currently attached storage needs to be scaled up to for VM based DB system. This must be greater than current storage size. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. - DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. - SshPublicKeys []string `mandatory:"false" json:"sshPublicKeys"` - - Version *PatchDetails `mandatory:"false" json:"version"` -} - -func (m UpdateDbSystemDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go deleted file mode 100644 index 80fdec7a2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package database - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateDbSystemRequest wrapper for the UpdateDbSystem operation -type UpdateDbSystemRequest struct { - - // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // Request to update the properties of a DB System. - UpdateDbSystemDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateDbSystemRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateDbSystemRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateDbSystemRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateDbSystemResponse wrapper for the UpdateDbSystem operation -type UpdateDbSystemResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DbSystem instance - DbSystem `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateDbSystemResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateDbSystemResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_details.go deleted file mode 100644 index 38353f29b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_details.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateZoneDetails The body for defining a new zone. -type CreateZoneDetails struct { - - // The name of the zone. - Name *string `mandatory:"true" json:"name"` - - // The type of the zone. Must be either `PRIMARY` or `SECONDARY`. - ZoneType CreateZoneDetailsZoneTypeEnum `mandatory:"true" json:"zoneType"` - - // The OCID of the compartment containing the zone. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // External master servers for the zone. - ExternalMasters []ExternalMaster `mandatory:"false" json:"externalMasters"` -} - -func (m CreateZoneDetails) String() string { - return common.PointerString(m) -} - -// CreateZoneDetailsZoneTypeEnum Enum with underlying type: string -type CreateZoneDetailsZoneTypeEnum string - -// Set of constants representing the allowable values for CreateZoneDetailsZoneType -const ( - CreateZoneDetailsZoneTypePrimary CreateZoneDetailsZoneTypeEnum = "PRIMARY" - CreateZoneDetailsZoneTypeSecondary CreateZoneDetailsZoneTypeEnum = "SECONDARY" -) - -var mappingCreateZoneDetailsZoneType = map[string]CreateZoneDetailsZoneTypeEnum{ - "PRIMARY": CreateZoneDetailsZoneTypePrimary, - "SECONDARY": CreateZoneDetailsZoneTypeSecondary, -} - -// GetCreateZoneDetailsZoneTypeEnumValues Enumerates the set of values for CreateZoneDetailsZoneType -func GetCreateZoneDetailsZoneTypeEnumValues() []CreateZoneDetailsZoneTypeEnum { - values := make([]CreateZoneDetailsZoneTypeEnum, 0) - for _, v := range mappingCreateZoneDetailsZoneType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_request_response.go deleted file mode 100644 index 480f46e93..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/create_zone_request_response.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateZoneRequest wrapper for the CreateZone operation -type CreateZoneRequest struct { - - // Details for creating a new zone. - CreateZoneDetails `contributesTo:"body"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateZoneRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateZoneRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateZoneRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateZoneResponse wrapper for the CreateZone operation -type CreateZoneResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Zone instance - Zone `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to - // contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the zone, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response CreateZoneResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateZoneResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/delete_domain_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/delete_domain_records_request_response.go deleted file mode 100644 index 4f96cfc1c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/delete_domain_records_request_response.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteDomainRecordsRequest wrapper for the DeleteDomainRecords operation -type DeleteDomainRecordsRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The target fully-qualified domain name (FQDN) within the target zone. - Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteDomainRecordsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteDomainRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteDomainRecordsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteDomainRecordsResponse wrapper for the DeleteDomainRecords operation -type DeleteDomainRecordsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteDomainRecordsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteDomainRecordsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/delete_r_r_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/delete_r_r_set_request_response.go deleted file mode 100644 index 4f9a4f243..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/delete_r_r_set_request_response.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteRRSetRequest wrapper for the DeleteRRSet operation -type DeleteRRSetRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The target fully-qualified domain name (FQDN) within the target zone. - Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` - - // The type of the target RRSet within the target zone. - Rtype *string `mandatory:"true" contributesTo:"path" name:"rtype"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteRRSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteRRSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteRRSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteRRSetResponse wrapper for the DeleteRRSet operation -type DeleteRRSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteRRSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteRRSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/delete_zone_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/delete_zone_request_response.go deleted file mode 100644 index 6583fcc9f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/delete_zone_request_response.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteZoneRequest wrapper for the DeleteZone operation -type DeleteZoneRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteZoneRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteZoneRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteZoneRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteZoneResponse wrapper for the DeleteZone operation -type DeleteZoneResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteZoneResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteZoneResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/dns_client.go b/vendor/github.com/oracle/oci-go-sdk/dns/dns_client.go deleted file mode 100644 index b1b124cc2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/dns_client.go +++ /dev/null @@ -1,707 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -//DnsClient a client for Dns -type DnsClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewDnsClientWithConfigurationProvider Creates a new default Dns client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewDnsClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client DnsClient, err error) { - baseClient, err := common.NewClientWithConfig(configProvider) - if err != nil { - return - } - - client = DnsClient{BaseClient: baseClient} - client.BasePath = "20180115" - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *DnsClient) SetRegion(region string) { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "dns", region) -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *DnsClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { - if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { - return err - } - - // Error has been checked already - region, _ := configProvider.Region() - client.SetRegion(region) - client.config = &configProvider - return nil -} - -// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set -func (client *DnsClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// CreateZone Creates a new zone in the specified compartment. The `compartmentId` -// query parameter is required if the `Content-Type` header for the -// request is `text/dns`. -func (client DnsClient) CreateZone(ctx context.Context, request CreateZoneRequest) (response CreateZoneResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createZone, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateZoneResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateZoneResponse") - } - return -} - -// createZone implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) createZone(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/zones") - if err != nil { - return nil, err - } - - var response CreateZoneResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteDomainRecords Deletes all records at the specified zone and domain. -func (client DnsClient) DeleteDomainRecords(ctx context.Context, request DeleteDomainRecordsRequest) (response DeleteDomainRecordsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteDomainRecords, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteDomainRecordsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteDomainRecordsResponse") - } - return -} - -// deleteDomainRecords implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) deleteDomainRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/zones/{zoneNameOrId}/records/{domain}") - if err != nil { - return nil, err - } - - var response DeleteDomainRecordsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteRRSet Deletes all records in the specified RRSet. -func (client DnsClient) DeleteRRSet(ctx context.Context, request DeleteRRSetRequest) (response DeleteRRSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteRRSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteRRSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteRRSetResponse") - } - return -} - -// deleteRRSet implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) deleteRRSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/zones/{zoneNameOrId}/records/{domain}/{rtype}") - if err != nil { - return nil, err - } - - var response DeleteRRSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteZone Deletes the specified zone. A `204` response indicates that zone has been -// successfully deleted. -func (client DnsClient) DeleteZone(ctx context.Context, request DeleteZoneRequest) (response DeleteZoneResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteZone, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteZoneResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteZoneResponse") - } - return -} - -// deleteZone implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) deleteZone(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/zones/{zoneNameOrId}") - if err != nil { - return nil, err - } - - var response DeleteZoneResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDomainRecords Gets a list of all records at the specified zone and domain. -// The results are sorted by `rtype` in alphabetical order by default. You -// can optionally filter and/or sort the results using the listed parameters. -func (client DnsClient) GetDomainRecords(ctx context.Context, request GetDomainRecordsRequest) (response GetDomainRecordsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDomainRecords, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDomainRecordsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDomainRecordsResponse") - } - return -} - -// getDomainRecords implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) getDomainRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones/{zoneNameOrId}/records/{domain}") - if err != nil { - return nil, err - } - - var response GetDomainRecordsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetRRSet Gets a list of all records in the specified RRSet. The results are -// sorted by `recordHash` by default. -func (client DnsClient) GetRRSet(ctx context.Context, request GetRRSetRequest) (response GetRRSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getRRSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetRRSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetRRSetResponse") - } - return -} - -// getRRSet implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) getRRSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones/{zoneNameOrId}/records/{domain}/{rtype}") - if err != nil { - return nil, err - } - - var response GetRRSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetZone Gets information about the specified zone, including its creation date, -// zone type, and serial. -func (client DnsClient) GetZone(ctx context.Context, request GetZoneRequest) (response GetZoneResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getZone, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetZoneResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetZoneResponse") - } - return -} - -// getZone implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) getZone(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones/{zoneNameOrId}") - if err != nil { - return nil, err - } - - var response GetZoneResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetZoneRecords Gets all records in the specified zone. The results are -// sorted by `domain` in alphabetical order by default. For more -// information about records, please see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). -func (client DnsClient) GetZoneRecords(ctx context.Context, request GetZoneRecordsRequest) (response GetZoneRecordsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getZoneRecords, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetZoneRecordsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetZoneRecordsResponse") - } - return -} - -// getZoneRecords implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) getZoneRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones/{zoneNameOrId}/records") - if err != nil { - return nil, err - } - - var response GetZoneRecordsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListZones Gets a list of all zones in the specified compartment. The collection -// can be filtered by name, time created, and zone type. -func (client DnsClient) ListZones(ctx context.Context, request ListZonesRequest) (response ListZonesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listZones, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListZonesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListZonesResponse") - } - return -} - -// listZones implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) listZones(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/zones") - if err != nil { - return nil, err - } - - var response ListZonesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// PatchDomainRecords Replaces records in the specified zone at a domain. You can update one record or all records for the specified zone depending on the changes provided in the request body. You can also add or remove records using this function. -func (client DnsClient) PatchDomainRecords(ctx context.Context, request PatchDomainRecordsRequest) (response PatchDomainRecordsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.patchDomainRecords, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(PatchDomainRecordsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchDomainRecordsResponse") - } - return -} - -// patchDomainRecords implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) patchDomainRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/zones/{zoneNameOrId}/records/{domain}") - if err != nil { - return nil, err - } - - var response PatchDomainRecordsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// PatchRRSet Updates records in the specified RRSet. -func (client DnsClient) PatchRRSet(ctx context.Context, request PatchRRSetRequest) (response PatchRRSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.patchRRSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(PatchRRSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchRRSetResponse") - } - return -} - -// patchRRSet implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) patchRRSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/zones/{zoneNameOrId}/records/{domain}/{rtype}") - if err != nil { - return nil, err - } - - var response PatchRRSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// PatchZoneRecords Updates a collection of records in the specified zone. You can update -// one record or all records for the specified zone depending on the -// changes provided in the request body. You can also add or remove records -// using this function. -func (client DnsClient) PatchZoneRecords(ctx context.Context, request PatchZoneRecordsRequest) (response PatchZoneRecordsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.patchZoneRecords, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(PatchZoneRecordsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchZoneRecordsResponse") - } - return -} - -// patchZoneRecords implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) patchZoneRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/zones/{zoneNameOrId}/records") - if err != nil { - return nil, err - } - - var response PatchZoneRecordsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateDomainRecords Replaces records in the specified zone at a domain with the records -// specified in the request body. If a specified record does not exist, -// it will be created. If the record exists, then it will be updated to -// represent the record in the body of the request. If a record in the zone -// does not exist in the request body, the record will be removed from the -// zone. -func (client DnsClient) UpdateDomainRecords(ctx context.Context, request UpdateDomainRecordsRequest) (response UpdateDomainRecordsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateDomainRecords, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateDomainRecordsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDomainRecordsResponse") - } - return -} - -// updateDomainRecords implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) updateDomainRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/zones/{zoneNameOrId}/records/{domain}") - if err != nil { - return nil, err - } - - var response UpdateDomainRecordsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateRRSet Replaces records in the specified RRSet. -func (client DnsClient) UpdateRRSet(ctx context.Context, request UpdateRRSetRequest) (response UpdateRRSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateRRSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateRRSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateRRSetResponse") - } - return -} - -// updateRRSet implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) updateRRSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/zones/{zoneNameOrId}/records/{domain}/{rtype}") - if err != nil { - return nil, err - } - - var response UpdateRRSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateZone Updates the specified secondary zone with your new external master -// server information. For more information about secondary zone, see -// Manage DNS Service Zone (https://docs.us-phoenix-1.oraclecloud.com/Content/DNS/Tasks/managingdnszones.htm). -func (client DnsClient) UpdateZone(ctx context.Context, request UpdateZoneRequest) (response UpdateZoneResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateZone, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateZoneResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateZoneResponse") - } - return -} - -// updateZone implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) updateZone(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/zones/{zoneNameOrId}") - if err != nil { - return nil, err - } - - var response UpdateZoneResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateZoneRecords Replaces records in the specified zone with the records specified in the -// request body. If a specified record does not exist, it will be created. -// If the record exists, then it will be updated to represent the record in -// the body of the request. If a record in the zone does not exist in the -// request body, the record will be removed from the zone. -func (client DnsClient) UpdateZoneRecords(ctx context.Context, request UpdateZoneRecordsRequest) (response UpdateZoneRecordsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateZoneRecords, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateZoneRecordsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateZoneRecordsResponse") - } - return -} - -// updateZoneRecords implements the OCIOperation interface (enables retrying operations) -func (client DnsClient) updateZoneRecords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/zones/{zoneNameOrId}/records") - if err != nil { - return nil, err - } - - var response UpdateZoneRecordsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/external_master.go b/vendor/github.com/oracle/oci-go-sdk/dns/external_master.go deleted file mode 100644 index 0d17dd9b7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/external_master.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ExternalMaster An external master name server used as the source of zone data. -type ExternalMaster struct { - - // The server's IP address (IPv4 or IPv6). - Address *string `mandatory:"true" json:"address"` - - // The server's port. - Port *int `mandatory:"false" json:"port"` - - Tsig *Tsig `mandatory:"false" json:"tsig"` -} - -func (m ExternalMaster) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/get_domain_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/get_domain_records_request_response.go deleted file mode 100644 index 3adaf85e1..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/get_domain_records_request_response.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDomainRecordsRequest wrapper for the GetDomainRecords operation -type GetDomainRecordsRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The target fully-qualified domain name (FQDN) within the target zone. - Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` - - // The `If-None-Match` header field makes the request method conditional on - // the absence of any current representation of the target resource, when - // the field-value is `*`, or having a selected representation with an - // entity-tag that does not match any of those listed in the field-value. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"If-None-Match"` - - // The `If-Modified-Since` header field makes a GET or HEAD request method - // conditional on the selected representation's modification date being more - // recent than the date provided in the field-value. Transfer of the - // selected representation's data is avoided if that data has not changed. - IfModifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Modified-Since"` - - // The maximum number of items to return in a page of the collection. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The version of the zone for which data is requested. - ZoneVersion *string `mandatory:"false" contributesTo:"query" name:"zoneVersion"` - - // Search by record type. - // Will match any record whose type (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4) (case-insensitive) equals the provided value. - Rtype *string `mandatory:"false" contributesTo:"query" name:"rtype"` - - // The field by which to sort records. - SortBy GetDomainRecordsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The order to sort the resources. - SortOrder GetDomainRecordsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDomainRecordsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDomainRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDomainRecordsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDomainRecordsResponse wrapper for the GetDomainRecords operation -type GetDomainRecordsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of RecordCollection instances - RecordCollection `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the record collection, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response GetDomainRecordsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDomainRecordsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// GetDomainRecordsSortByEnum Enum with underlying type: string -type GetDomainRecordsSortByEnum string - -// Set of constants representing the allowable values for GetDomainRecordsSortBy -const ( - GetDomainRecordsSortByRtype GetDomainRecordsSortByEnum = "rtype" - GetDomainRecordsSortByTtl GetDomainRecordsSortByEnum = "ttl" -) - -var mappingGetDomainRecordsSortBy = map[string]GetDomainRecordsSortByEnum{ - "rtype": GetDomainRecordsSortByRtype, - "ttl": GetDomainRecordsSortByTtl, -} - -// GetGetDomainRecordsSortByEnumValues Enumerates the set of values for GetDomainRecordsSortBy -func GetGetDomainRecordsSortByEnumValues() []GetDomainRecordsSortByEnum { - values := make([]GetDomainRecordsSortByEnum, 0) - for _, v := range mappingGetDomainRecordsSortBy { - values = append(values, v) - } - return values -} - -// GetDomainRecordsSortOrderEnum Enum with underlying type: string -type GetDomainRecordsSortOrderEnum string - -// Set of constants representing the allowable values for GetDomainRecordsSortOrder -const ( - GetDomainRecordsSortOrderAsc GetDomainRecordsSortOrderEnum = "ASC" - GetDomainRecordsSortOrderDesc GetDomainRecordsSortOrderEnum = "DESC" -) - -var mappingGetDomainRecordsSortOrder = map[string]GetDomainRecordsSortOrderEnum{ - "ASC": GetDomainRecordsSortOrderAsc, - "DESC": GetDomainRecordsSortOrderDesc, -} - -// GetGetDomainRecordsSortOrderEnumValues Enumerates the set of values for GetDomainRecordsSortOrder -func GetGetDomainRecordsSortOrderEnumValues() []GetDomainRecordsSortOrderEnum { - values := make([]GetDomainRecordsSortOrderEnum, 0) - for _, v := range mappingGetDomainRecordsSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/get_r_r_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/get_r_r_set_request_response.go deleted file mode 100644 index acad3eb31..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/get_r_r_set_request_response.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetRRSetRequest wrapper for the GetRRSet operation -type GetRRSetRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The target fully-qualified domain name (FQDN) within the target zone. - Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` - - // The type of the target RRSet within the target zone. - Rtype *string `mandatory:"true" contributesTo:"path" name:"rtype"` - - // The `If-None-Match` header field makes the request method conditional on - // the absence of any current representation of the target resource, when - // the field-value is `*`, or having a selected representation with an - // entity-tag that does not match any of those listed in the field-value. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"If-None-Match"` - - // The `If-Modified-Since` header field makes a GET or HEAD request method - // conditional on the selected representation's modification date being more - // recent than the date provided in the field-value. Transfer of the - // selected representation's data is avoided if that data has not changed. - IfModifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Modified-Since"` - - // The maximum number of items to return in a page of the collection. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The version of the zone for which data is requested. - ZoneVersion *string `mandatory:"false" contributesTo:"query" name:"zoneVersion"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetRRSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetRRSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetRRSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetRRSetResponse wrapper for the GetRRSet operation -type GetRRSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of RrSet instances - RrSet `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the record collection, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response GetRRSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetRRSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_records_request_response.go deleted file mode 100644 index 7aa915300..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_records_request_response.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetZoneRecordsRequest wrapper for the GetZoneRecords operation -type GetZoneRecordsRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The `If-None-Match` header field makes the request method conditional on - // the absence of any current representation of the target resource, when - // the field-value is `*`, or having a selected representation with an - // entity-tag that does not match any of those listed in the field-value. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"If-None-Match"` - - // The `If-Modified-Since` header field makes a GET or HEAD request method - // conditional on the selected representation's modification date being more - // recent than the date provided in the field-value. Transfer of the - // selected representation's data is avoided if that data has not changed. - IfModifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Modified-Since"` - - // The maximum number of items to return in a page of the collection. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The version of the zone for which data is requested. - ZoneVersion *string `mandatory:"false" contributesTo:"query" name:"zoneVersion"` - - // Search by domain. - // Will match any record whose domain (case-insensitive) equals the provided value. - Domain *string `mandatory:"false" contributesTo:"query" name:"domain"` - - // Search by domain. - // Will match any record whose domain (case-insensitive) contains the provided value. - DomainContains *string `mandatory:"false" contributesTo:"query" name:"domainContains"` - - // Search by record type. - // Will match any record whose type (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4) (case-insensitive) equals the provided value. - Rtype *string `mandatory:"false" contributesTo:"query" name:"rtype"` - - // The field by which to sort records. - SortBy GetZoneRecordsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The order to sort the resources. - SortOrder GetZoneRecordsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetZoneRecordsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetZoneRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetZoneRecordsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetZoneRecordsResponse wrapper for the GetZoneRecords operation -type GetZoneRecordsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of RecordCollection instances - RecordCollection `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the record collection, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response GetZoneRecordsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetZoneRecordsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// GetZoneRecordsSortByEnum Enum with underlying type: string -type GetZoneRecordsSortByEnum string - -// Set of constants representing the allowable values for GetZoneRecordsSortBy -const ( - GetZoneRecordsSortByDomain GetZoneRecordsSortByEnum = "domain" - GetZoneRecordsSortByRtype GetZoneRecordsSortByEnum = "rtype" - GetZoneRecordsSortByTtl GetZoneRecordsSortByEnum = "ttl" -) - -var mappingGetZoneRecordsSortBy = map[string]GetZoneRecordsSortByEnum{ - "domain": GetZoneRecordsSortByDomain, - "rtype": GetZoneRecordsSortByRtype, - "ttl": GetZoneRecordsSortByTtl, -} - -// GetGetZoneRecordsSortByEnumValues Enumerates the set of values for GetZoneRecordsSortBy -func GetGetZoneRecordsSortByEnumValues() []GetZoneRecordsSortByEnum { - values := make([]GetZoneRecordsSortByEnum, 0) - for _, v := range mappingGetZoneRecordsSortBy { - values = append(values, v) - } - return values -} - -// GetZoneRecordsSortOrderEnum Enum with underlying type: string -type GetZoneRecordsSortOrderEnum string - -// Set of constants representing the allowable values for GetZoneRecordsSortOrder -const ( - GetZoneRecordsSortOrderAsc GetZoneRecordsSortOrderEnum = "ASC" - GetZoneRecordsSortOrderDesc GetZoneRecordsSortOrderEnum = "DESC" -) - -var mappingGetZoneRecordsSortOrder = map[string]GetZoneRecordsSortOrderEnum{ - "ASC": GetZoneRecordsSortOrderAsc, - "DESC": GetZoneRecordsSortOrderDesc, -} - -// GetGetZoneRecordsSortOrderEnumValues Enumerates the set of values for GetZoneRecordsSortOrder -func GetGetZoneRecordsSortOrderEnumValues() []GetZoneRecordsSortOrderEnum { - values := make([]GetZoneRecordsSortOrderEnum, 0) - for _, v := range mappingGetZoneRecordsSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_request_response.go deleted file mode 100644 index 2ba1b7c89..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/get_zone_request_response.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetZoneRequest wrapper for the GetZone operation -type GetZoneRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The `If-None-Match` header field makes the request method conditional on - // the absence of any current representation of the target resource, when - // the field-value is `*`, or having a selected representation with an - // entity-tag that does not match any of those listed in the field-value. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"If-None-Match"` - - // The `If-Modified-Since` header field makes a GET or HEAD request method - // conditional on the selected representation's modification date being more - // recent than the date provided in the field-value. Transfer of the - // selected representation's data is avoided if that data has not changed. - IfModifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Modified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetZoneRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetZoneRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetZoneRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetZoneResponse wrapper for the GetZone operation -type GetZoneResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Zone instance - Zone `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to - // contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the zone, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response GetZoneResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetZoneResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/list_zones_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/list_zones_request_response.go deleted file mode 100644 index 79b68258a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/list_zones_request_response.go +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListZonesRequest wrapper for the ListZones operation -type ListZonesRequest struct { - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The maximum number of items to return in a page of the collection. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // A case-sensitive filter for zone names. - // Will match any zone with a name that equals the provided value. - Name *string `mandatory:"false" contributesTo:"query" name:"name"` - - // Search by zone name. - // Will match any zone whose name (case-insensitive) contains the provided value. - NameContains *string `mandatory:"false" contributesTo:"query" name:"nameContains"` - - // Search by zone type, `PRIMARY` or `SECONDARY`. - // Will match any zone whose type equals the provided value. - ZoneType ListZonesZoneTypeEnum `mandatory:"false" contributesTo:"query" name:"zoneType" omitEmpty:"true"` - - // An RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) timestamp that states - // all returned resources were created on or after the indicated time. - TimeCreatedGreaterThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeCreatedGreaterThanOrEqualTo"` - - // An RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) timestamp that states - // all returned resources were created before the indicated time. - TimeCreatedLessThan *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeCreatedLessThan"` - - // The field by which to sort zones. - SortBy ListZonesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The order to sort the resources. - SortOrder ListZonesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // The state of a resource. - LifecycleState ListZonesLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListZonesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListZonesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListZonesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListZonesResponse wrapper for the ListZones operation -type ListZonesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []ZoneSummary instances - Items []ZoneSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need to - // contact Oracle about a particular request, please provide the request - // ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListZonesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListZonesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListZonesZoneTypeEnum Enum with underlying type: string -type ListZonesZoneTypeEnum string - -// Set of constants representing the allowable values for ListZonesZoneType -const ( - ListZonesZoneTypePrimary ListZonesZoneTypeEnum = "PRIMARY" - ListZonesZoneTypeSecondary ListZonesZoneTypeEnum = "SECONDARY" -) - -var mappingListZonesZoneType = map[string]ListZonesZoneTypeEnum{ - "PRIMARY": ListZonesZoneTypePrimary, - "SECONDARY": ListZonesZoneTypeSecondary, -} - -// GetListZonesZoneTypeEnumValues Enumerates the set of values for ListZonesZoneType -func GetListZonesZoneTypeEnumValues() []ListZonesZoneTypeEnum { - values := make([]ListZonesZoneTypeEnum, 0) - for _, v := range mappingListZonesZoneType { - values = append(values, v) - } - return values -} - -// ListZonesSortByEnum Enum with underlying type: string -type ListZonesSortByEnum string - -// Set of constants representing the allowable values for ListZonesSortBy -const ( - ListZonesSortByName ListZonesSortByEnum = "name" - ListZonesSortByZonetype ListZonesSortByEnum = "zoneType" - ListZonesSortByTimecreated ListZonesSortByEnum = "timeCreated" -) - -var mappingListZonesSortBy = map[string]ListZonesSortByEnum{ - "name": ListZonesSortByName, - "zoneType": ListZonesSortByZonetype, - "timeCreated": ListZonesSortByTimecreated, -} - -// GetListZonesSortByEnumValues Enumerates the set of values for ListZonesSortBy -func GetListZonesSortByEnumValues() []ListZonesSortByEnum { - values := make([]ListZonesSortByEnum, 0) - for _, v := range mappingListZonesSortBy { - values = append(values, v) - } - return values -} - -// ListZonesSortOrderEnum Enum with underlying type: string -type ListZonesSortOrderEnum string - -// Set of constants representing the allowable values for ListZonesSortOrder -const ( - ListZonesSortOrderAsc ListZonesSortOrderEnum = "ASC" - ListZonesSortOrderDesc ListZonesSortOrderEnum = "DESC" -) - -var mappingListZonesSortOrder = map[string]ListZonesSortOrderEnum{ - "ASC": ListZonesSortOrderAsc, - "DESC": ListZonesSortOrderDesc, -} - -// GetListZonesSortOrderEnumValues Enumerates the set of values for ListZonesSortOrder -func GetListZonesSortOrderEnumValues() []ListZonesSortOrderEnum { - values := make([]ListZonesSortOrderEnum, 0) - for _, v := range mappingListZonesSortOrder { - values = append(values, v) - } - return values -} - -// ListZonesLifecycleStateEnum Enum with underlying type: string -type ListZonesLifecycleStateEnum string - -// Set of constants representing the allowable values for ListZonesLifecycleState -const ( - ListZonesLifecycleStateActive ListZonesLifecycleStateEnum = "ACTIVE" - ListZonesLifecycleStateCreating ListZonesLifecycleStateEnum = "CREATING" - ListZonesLifecycleStateDeleted ListZonesLifecycleStateEnum = "DELETED" - ListZonesLifecycleStateDeleting ListZonesLifecycleStateEnum = "DELETING" - ListZonesLifecycleStateFailed ListZonesLifecycleStateEnum = "FAILED" -) - -var mappingListZonesLifecycleState = map[string]ListZonesLifecycleStateEnum{ - "ACTIVE": ListZonesLifecycleStateActive, - "CREATING": ListZonesLifecycleStateCreating, - "DELETED": ListZonesLifecycleStateDeleted, - "DELETING": ListZonesLifecycleStateDeleting, - "FAILED": ListZonesLifecycleStateFailed, -} - -// GetListZonesLifecycleStateEnumValues Enumerates the set of values for ListZonesLifecycleState -func GetListZonesLifecycleStateEnumValues() []ListZonesLifecycleStateEnum { - values := make([]ListZonesLifecycleStateEnum, 0) - for _, v := range mappingListZonesLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_details.go deleted file mode 100644 index 5ef165776..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_details.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PatchDomainRecordsDetails The representation of PatchDomainRecordsDetails -type PatchDomainRecordsDetails struct { - Items []RecordOperation `mandatory:"false" json:"items"` -} - -func (m PatchDomainRecordsDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_request_response.go deleted file mode 100644 index d6bff184e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/patch_domain_records_request_response.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// PatchDomainRecordsRequest wrapper for the PatchDomainRecords operation -type PatchDomainRecordsRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The target fully-qualified domain name (FQDN) within the target zone. - Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` - - // Operations describing how to modify the collection of records. - PatchDomainRecordsDetails `contributesTo:"body"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request PatchDomainRecordsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request PatchDomainRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request PatchDomainRecordsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// PatchDomainRecordsResponse wrapper for the PatchDomainRecords operation -type PatchDomainRecordsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The RecordCollection instance - RecordCollection `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the record collection, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response PatchDomainRecordsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response PatchDomainRecordsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_r_r_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_r_r_set_request_response.go deleted file mode 100644 index 833af05cf..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/patch_r_r_set_request_response.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// PatchRRSetRequest wrapper for the PatchRRSet operation -type PatchRRSetRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The target fully-qualified domain name (FQDN) within the target zone. - Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` - - // The type of the target RRSet within the target zone. - Rtype *string `mandatory:"true" contributesTo:"path" name:"rtype"` - - // Operations describing how to modify the collection of records. - PatchRrSetDetails `contributesTo:"body"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request PatchRRSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request PatchRRSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request PatchRRSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// PatchRRSetResponse wrapper for the PatchRRSet operation -type PatchRRSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The RecordCollection instance - RecordCollection `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the record collection, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response PatchRRSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response PatchRRSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_rr_set_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_rr_set_details.go deleted file mode 100644 index d070e86da..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/patch_rr_set_details.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PatchRrSetDetails The representation of PatchRrSetDetails -type PatchRrSetDetails struct { - Items []RecordOperation `mandatory:"false" json:"items"` -} - -func (m PatchRrSetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_details.go deleted file mode 100644 index b72c1fe5a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_details.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PatchZoneRecordsDetails The representation of PatchZoneRecordsDetails -type PatchZoneRecordsDetails struct { - Items []RecordOperation `mandatory:"false" json:"items"` -} - -func (m PatchZoneRecordsDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_request_response.go deleted file mode 100644 index 27fd5659f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/patch_zone_records_request_response.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// PatchZoneRecordsRequest wrapper for the PatchZoneRecords operation -type PatchZoneRecordsRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The operations describing how to modify the collection of records. - PatchZoneRecordsDetails `contributesTo:"body"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request PatchZoneRecordsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request PatchZoneRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request PatchZoneRecordsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// PatchZoneRecordsResponse wrapper for the PatchZoneRecords operation -type PatchZoneRecordsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The RecordCollection instance - RecordCollection `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the record collection, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response PatchZoneRecordsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response PatchZoneRecordsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/record.go b/vendor/github.com/oracle/oci-go-sdk/dns/record.go deleted file mode 100644 index b96e8d834..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/record.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Record A DNS resource record. For more information about DNS records, see RFC 1034 (https://tools.ietf.org/html/rfc1034#section-3.6). -type Record struct { - - // The fully qualified domain name where the record can be located. - Domain *string `mandatory:"false" json:"domain"` - - // A unique identifier for the record within its zone. - RecordHash *string `mandatory:"false" json:"recordHash"` - - // A Boolean flag indicating whether or not parts of the record - // are unable to be explicitly managed. - IsProtected *bool `mandatory:"false" json:"isProtected"` - - // The record's data, as whitespace-delimited tokens in - // type-specific presentation format. - Rdata *string `mandatory:"false" json:"rdata"` - - // The latest version of the record's zone in which its RRSet differs - // from the preceding version. - RrsetVersion *string `mandatory:"false" json:"rrsetVersion"` - - // The canonical name for the record's type, such as A or CNAME. For more - // information, see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). - Rtype *string `mandatory:"false" json:"rtype"` - - // The Time To Live for the record, in seconds. - Ttl *int `mandatory:"false" json:"ttl"` -} - -func (m Record) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/record_collection.go b/vendor/github.com/oracle/oci-go-sdk/dns/record_collection.go deleted file mode 100644 index a030cea64..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/record_collection.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// RecordCollection A collection of DNS resource records. -type RecordCollection struct { - Items []Record `mandatory:"false" json:"items"` -} - -func (m RecordCollection) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/record_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/record_details.go deleted file mode 100644 index b9da9dace..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/record_details.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// RecordDetails A DNS resource record. For more information about records, see RFC 1034 (https://tools.ietf.org/html/rfc1034#section-3.6). -type RecordDetails struct { - - // The fully qualified domain name where the record can be located. - Domain *string `mandatory:"true" json:"domain"` - - // The record's data, as whitespace-delimited tokens in - // type-specific presentation format. - Rdata *string `mandatory:"true" json:"rdata"` - - // The canonical name for the record's type, such as A or CNAME. For more - // information, see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). - Rtype *string `mandatory:"true" json:"rtype"` - - // The Time To Live for the record, in seconds. - Ttl *int `mandatory:"true" json:"ttl"` - - // A unique identifier for the record within its zone. - RecordHash *string `mandatory:"false" json:"recordHash"` - - // A Boolean flag indicating whether or not parts of the record - // are unable to be explicitly managed. - IsProtected *bool `mandatory:"false" json:"isProtected"` - - // The latest version of the record's zone in which its RRSet differs - // from the preceding version. - RrsetVersion *string `mandatory:"false" json:"rrsetVersion"` -} - -func (m RecordDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/record_operation.go b/vendor/github.com/oracle/oci-go-sdk/dns/record_operation.go deleted file mode 100644 index 3e597d7fa..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/record_operation.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// RecordOperation An extension of the existing record resource, describing either a -// precondition, an add, or a remove. Preconditions check all fields, -// including read-only data like `recordHash` and `rrsetVersion`. -type RecordOperation struct { - - // The fully qualified domain name where the record can be located. - Domain *string `mandatory:"false" json:"domain"` - - // A unique identifier for the record within its zone. - RecordHash *string `mandatory:"false" json:"recordHash"` - - // A Boolean flag indicating whether or not parts of the record - // are unable to be explicitly managed. - IsProtected *bool `mandatory:"false" json:"isProtected"` - - // The record's data, as whitespace-delimited tokens in - // type-specific presentation format. - Rdata *string `mandatory:"false" json:"rdata"` - - // The latest version of the record's zone in which its RRSet differs - // from the preceding version. - RrsetVersion *string `mandatory:"false" json:"rrsetVersion"` - - // The canonical name for the record's type, such as A or CNAME. For more - // information, see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). - Rtype *string `mandatory:"false" json:"rtype"` - - // The Time To Live for the record, in seconds. - Ttl *int `mandatory:"false" json:"ttl"` - - // A description of how a record relates to a PATCH operation. - // - `REQUIRE` indicates a precondition that record data **must** already exist. - // - `PROHIBIT` indicates a precondition that record data **must not** already exist. - // - `ADD` indicates that record data **must** exist after successful application. - // - `REMOVE` indicates that record data **must not** exist after successful application. - // **Note:** `ADD` and `REMOVE` operations can succeed even if - // they require no changes when applied, such as when the described - // records are already present or absent. - // **Note:** `ADD` and `REMOVE` operations can describe changes for - // more than one record. - // **Example:** `{ "domain": "www.example.com", "rtype": "AAAA", "ttl": 60 }` - // specifies a new TTL for every record in the www.example.com AAAA RRSet. - Operation RecordOperationOperationEnum `mandatory:"false" json:"operation,omitempty"` -} - -func (m RecordOperation) String() string { - return common.PointerString(m) -} - -// RecordOperationOperationEnum Enum with underlying type: string -type RecordOperationOperationEnum string - -// Set of constants representing the allowable values for RecordOperationOperation -const ( - RecordOperationOperationRequire RecordOperationOperationEnum = "REQUIRE" - RecordOperationOperationProhibit RecordOperationOperationEnum = "PROHIBIT" - RecordOperationOperationAdd RecordOperationOperationEnum = "ADD" - RecordOperationOperationRemove RecordOperationOperationEnum = "REMOVE" -) - -var mappingRecordOperationOperation = map[string]RecordOperationOperationEnum{ - "REQUIRE": RecordOperationOperationRequire, - "PROHIBIT": RecordOperationOperationProhibit, - "ADD": RecordOperationOperationAdd, - "REMOVE": RecordOperationOperationRemove, -} - -// GetRecordOperationOperationEnumValues Enumerates the set of values for RecordOperationOperation -func GetRecordOperationOperationEnumValues() []RecordOperationOperationEnum { - values := make([]RecordOperationOperationEnum, 0) - for _, v := range mappingRecordOperationOperation { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/rr_set.go b/vendor/github.com/oracle/oci-go-sdk/dns/rr_set.go deleted file mode 100644 index 127516b1f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/rr_set.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// RrSet A collection of DNS records of the same domain and type. For more -// information about record types, see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). -type RrSet struct { - Items []Record `mandatory:"false" json:"items"` -} - -func (m RrSet) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/sort_order.go b/vendor/github.com/oracle/oci-go-sdk/dns/sort_order.go deleted file mode 100644 index c55060d0a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/sort_order.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SortOrder The order to sort the resources. -type SortOrder struct { -} - -func (m SortOrder) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/tsig.go b/vendor/github.com/oracle/oci-go-sdk/dns/tsig.go deleted file mode 100644 index 3215bcb47..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/tsig.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Tsig A TSIG (https://tools.ietf.org/html/rfc2845) key. -type Tsig struct { - - // A domain name identifying the key for a given pair of hosts. - Name *string `mandatory:"true" json:"name"` - - // A base64 string encoding the binary shared secret. - Secret *string `mandatory:"true" json:"secret"` - - // TSIG Algorithms are encoded as domain names, but most consist of only one - // non-empty label, which is not required to be explicitly absolute. For a - // full list of TSIG algorithms, see Secret Key Transaction Authentication for DNS (TSIG) Algorithm Names (http://www.iana.org/assignments/tsig-algorithm-names/tsig-algorithm-names.xhtml#tsig-algorithm-names-1) - Algorithm *string `mandatory:"true" json:"algorithm"` -} - -func (m Tsig) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_details.go deleted file mode 100644 index 528013635..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_details.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateDomainRecordsDetails The representation of UpdateDomainRecordsDetails -type UpdateDomainRecordsDetails struct { - Items []RecordDetails `mandatory:"false" json:"items"` -} - -func (m UpdateDomainRecordsDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_request_response.go deleted file mode 100644 index 3b34094ff..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/update_domain_records_request_response.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateDomainRecordsRequest wrapper for the UpdateDomainRecords operation -type UpdateDomainRecordsRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The target fully-qualified domain name (FQDN) within the target zone. - Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` - - // A full list of records for the domain. - UpdateDomainRecordsDetails `contributesTo:"body"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateDomainRecordsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateDomainRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateDomainRecordsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateDomainRecordsResponse wrapper for the UpdateDomainRecords operation -type UpdateDomainRecordsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The RecordCollection instance - RecordCollection `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the record collection, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateDomainRecordsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateDomainRecordsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_r_r_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_r_r_set_request_response.go deleted file mode 100644 index b236b3e9e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/update_r_r_set_request_response.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateRRSetRequest wrapper for the UpdateRRSet operation -type UpdateRRSetRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // The target fully-qualified domain name (FQDN) within the target zone. - Domain *string `mandatory:"true" contributesTo:"path" name:"domain"` - - // The type of the target RRSet within the target zone. - Rtype *string `mandatory:"true" contributesTo:"path" name:"rtype"` - - // A full list of records for the RRSet. - UpdateRrSetDetails `contributesTo:"body"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateRRSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateRRSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateRRSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateRRSetResponse wrapper for the UpdateRRSet operation -type UpdateRRSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The RecordCollection instance - RecordCollection `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the record collection, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateRRSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateRRSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_rr_set_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_rr_set_details.go deleted file mode 100644 index 0c35e7532..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/update_rr_set_details.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateRrSetDetails The representation of UpdateRrSetDetails -type UpdateRrSetDetails struct { - Items []RecordDetails `mandatory:"false" json:"items"` -} - -func (m UpdateRrSetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_details.go deleted file mode 100644 index bf2434192..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateZoneDetails The body for updating a zone. -type UpdateZoneDetails struct { - - // External master servers for the zone. - ExternalMasters []ExternalMaster `mandatory:"false" json:"externalMasters"` -} - -func (m UpdateZoneDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_details.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_details.go deleted file mode 100644 index cd1d8bb4e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_details.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateZoneRecordsDetails The representation of UpdateZoneRecordsDetails -type UpdateZoneRecordsDetails struct { - Items []RecordDetails `mandatory:"false" json:"items"` -} - -func (m UpdateZoneRecordsDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_request_response.go deleted file mode 100644 index fffece0e7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_records_request_response.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateZoneRecordsRequest wrapper for the UpdateZoneRecords operation -type UpdateZoneRecordsRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // A full list of records for the zone. - UpdateZoneRecordsDetails `contributesTo:"body"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateZoneRecordsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateZoneRecordsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateZoneRecordsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateZoneRecordsResponse wrapper for the UpdateZoneRecords operation -type UpdateZoneRecordsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The RecordCollection instance - RecordCollection `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if - // this header appears in the response, then a partial list might have - // been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items that match the query. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide - // the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the record collection, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateZoneRecordsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateZoneRecordsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_request_response.go b/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_request_response.go deleted file mode 100644 index d691af0be..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/update_zone_request_response.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateZoneRequest wrapper for the UpdateZone operation -type UpdateZoneRequest struct { - - // The name or OCID of the target zone. - ZoneNameOrId *string `mandatory:"true" contributesTo:"path" name:"zoneNameOrId"` - - // New data for the zone. - UpdateZoneDetails `contributesTo:"body"` - - // The `If-Match` header field makes the request method conditional on the - // existence of at least one current representation of the target resource, - // when the field-value is `*`, or having a current representation of the - // target resource that has an entity-tag matching a member of the list of - // entity-tags provided in the field-value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"If-Match"` - - // The `If-Unmodified-Since` header field makes the request method - // conditional on the selected representation's last modification date being - // earlier than or equal to the date provided in the field-value. This - // field accomplishes the same purpose as If-Match for cases where the user - // agent does not have an entity-tag for the representation. - IfUnmodifiedSince *string `mandatory:"false" contributesTo:"header" name:"If-Unmodified-Since"` - - // The OCID of the compartment the resource belongs to. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateZoneRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateZoneRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateZoneRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateZoneResponse wrapper for the UpdateZone operation -type UpdateZoneResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Zone instance - Zone `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to - // contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current version of the zone, ending with a - // representation-specific suffix. This value may be used in If-Match - // and If-None-Match headers for later requests of the same resource. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateZoneResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateZoneResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/zone.go b/vendor/github.com/oracle/oci-go-sdk/dns/zone.go deleted file mode 100644 index 53e1efaae..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/zone.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Zone A DNS zone. -type Zone struct { - - // The name of the zone. - Name *string `mandatory:"false" json:"name"` - - // The type of the zone. Must be either `PRIMARY` or `SECONDARY`. - ZoneType ZoneZoneTypeEnum `mandatory:"false" json:"zoneType,omitempty"` - - // The OCID of the compartment containing the zone. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // External master servers for the zone. - ExternalMasters []ExternalMaster `mandatory:"false" json:"externalMasters"` - - // The canonical absolute URL of the resource. - Self *string `mandatory:"false" json:"self"` - - // The OCID of the zone. - Id *string `mandatory:"false" json:"id"` - - // The date and time the image was created in "YYYY-MM-ddThh:mmZ" format - // with a Z offset, as defined by RFC 3339. - // **Example:** `2016-07-22T17:23:59:60Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // Version is the never-repeating, totally-orderable, version of the - // zone, from which the serial field of the zone's SOA record is - // derived. - Version *string `mandatory:"false" json:"version"` - - // The current serial of the zone. As seen in the zone's SOA record. - Serial *int `mandatory:"false" json:"serial"` - - // The current state of the zone resource. - LifecycleState ZoneLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` -} - -func (m Zone) String() string { - return common.PointerString(m) -} - -// ZoneZoneTypeEnum Enum with underlying type: string -type ZoneZoneTypeEnum string - -// Set of constants representing the allowable values for ZoneZoneType -const ( - ZoneZoneTypePrimary ZoneZoneTypeEnum = "PRIMARY" - ZoneZoneTypeSecondary ZoneZoneTypeEnum = "SECONDARY" -) - -var mappingZoneZoneType = map[string]ZoneZoneTypeEnum{ - "PRIMARY": ZoneZoneTypePrimary, - "SECONDARY": ZoneZoneTypeSecondary, -} - -// GetZoneZoneTypeEnumValues Enumerates the set of values for ZoneZoneType -func GetZoneZoneTypeEnumValues() []ZoneZoneTypeEnum { - values := make([]ZoneZoneTypeEnum, 0) - for _, v := range mappingZoneZoneType { - values = append(values, v) - } - return values -} - -// ZoneLifecycleStateEnum Enum with underlying type: string -type ZoneLifecycleStateEnum string - -// Set of constants representing the allowable values for ZoneLifecycleState -const ( - ZoneLifecycleStateActive ZoneLifecycleStateEnum = "ACTIVE" - ZoneLifecycleStateCreating ZoneLifecycleStateEnum = "CREATING" - ZoneLifecycleStateDeleted ZoneLifecycleStateEnum = "DELETED" - ZoneLifecycleStateDeleting ZoneLifecycleStateEnum = "DELETING" - ZoneLifecycleStateFailed ZoneLifecycleStateEnum = "FAILED" -) - -var mappingZoneLifecycleState = map[string]ZoneLifecycleStateEnum{ - "ACTIVE": ZoneLifecycleStateActive, - "CREATING": ZoneLifecycleStateCreating, - "DELETED": ZoneLifecycleStateDeleted, - "DELETING": ZoneLifecycleStateDeleting, - "FAILED": ZoneLifecycleStateFailed, -} - -// GetZoneLifecycleStateEnumValues Enumerates the set of values for ZoneLifecycleState -func GetZoneLifecycleStateEnumValues() []ZoneLifecycleStateEnum { - values := make([]ZoneLifecycleStateEnum, 0) - for _, v := range mappingZoneLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/dns/zone_summary.go b/vendor/github.com/oracle/oci-go-sdk/dns/zone_summary.go deleted file mode 100644 index ea2994d16..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/dns/zone_summary.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Public DNS Service -// -// API for managing DNS zones, records, and policies. -// - -package dns - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ZoneSummary A DNS zone. -type ZoneSummary struct { - - // The name of the zone. - Name *string `mandatory:"false" json:"name"` - - // The type of the zone. Must be either `PRIMARY` or `SECONDARY`. - ZoneType ZoneSummaryZoneTypeEnum `mandatory:"false" json:"zoneType,omitempty"` - - // The OCID of the compartment containing the zone. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The canonical absolute URL of the resource. - Self *string `mandatory:"false" json:"self"` - - // The OCID of the zone. - Id *string `mandatory:"false" json:"id"` - - // The date and time the image was created in "YYYY-MM-ddThh:mmZ" format - // with a Z offset, as defined by RFC 3339. - // **Example:** `2016-07-22T17:23:59:60Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // Version is the never-repeating, totally-orderable, version of the - // zone, from which the serial field of the zone's SOA record is - // derived. - Version *string `mandatory:"false" json:"version"` - - // The current serial of the zone. As seen in the zone's SOA record. - Serial *int `mandatory:"false" json:"serial"` -} - -func (m ZoneSummary) String() string { - return common.PointerString(m) -} - -// ZoneSummaryZoneTypeEnum Enum with underlying type: string -type ZoneSummaryZoneTypeEnum string - -// Set of constants representing the allowable values for ZoneSummaryZoneType -const ( - ZoneSummaryZoneTypePrimary ZoneSummaryZoneTypeEnum = "PRIMARY" - ZoneSummaryZoneTypeSecondary ZoneSummaryZoneTypeEnum = "SECONDARY" -) - -var mappingZoneSummaryZoneType = map[string]ZoneSummaryZoneTypeEnum{ - "PRIMARY": ZoneSummaryZoneTypePrimary, - "SECONDARY": ZoneSummaryZoneTypeSecondary, -} - -// GetZoneSummaryZoneTypeEnumValues Enumerates the set of values for ZoneSummaryZoneType -func GetZoneSummaryZoneTypeEnumValues() []ZoneSummaryZoneTypeEnum { - values := make([]ZoneSummaryZoneTypeEnum, 0) - for _, v := range mappingZoneSummaryZoneType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/create_sender_details.go b/vendor/github.com/oracle/oci-go-sdk/email/create_sender_details.go deleted file mode 100644 index fb9fa90a7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/create_sender_details.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Email Delivery Service API -// -// API spec for managing OCI Email Delivery services. -// - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateSenderDetails The details needed for creating a sender. -type CreateSenderDetails struct { - - // The OCID of the compartment that contains the sender. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The email address of the sender. - EmailAddress *string `mandatory:"false" json:"emailAddress"` -} - -func (m CreateSenderDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/create_sender_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/create_sender_request_response.go deleted file mode 100644 index f605d5973..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/create_sender_request_response.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateSenderRequest wrapper for the CreateSender operation -type CreateSenderRequest struct { - - // Create a sender. - CreateSenderDetails `contributesTo:"body"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateSenderRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateSenderRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateSenderRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateSenderResponse wrapper for the CreateSender operation -type CreateSenderResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Sender instance - Sender `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide the - // request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateSenderResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateSenderResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_details.go b/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_details.go deleted file mode 100644 index 5e9358f84..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_details.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Email Delivery Service API -// -// API spec for managing OCI Email Delivery services. -// - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateSuppressionDetails The details needed for creating a single suppression. -type CreateSuppressionDetails struct { - - // The OCID of the compartment to contain the suppression. Since - // suppressions are at the customer level, this must be the tenancy - // OCID. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The recipient email address of the suppression. - EmailAddress *string `mandatory:"false" json:"emailAddress"` -} - -func (m CreateSuppressionDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_request_response.go deleted file mode 100644 index 727bfbe43..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/create_suppression_request_response.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateSuppressionRequest wrapper for the CreateSuppression operation -type CreateSuppressionRequest struct { - - // Adds a single email address to the suppression list for a compartment's tenancy. - CreateSuppressionDetails `contributesTo:"body"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateSuppressionRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateSuppressionRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateSuppressionRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateSuppressionResponse wrapper for the CreateSuppression operation -type CreateSuppressionResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Suppression instance - Suppression `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateSuppressionResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateSuppressionResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/delete_sender_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/delete_sender_request_response.go deleted file mode 100644 index a4bbf3289..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/delete_sender_request_response.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteSenderRequest wrapper for the DeleteSender operation -type DeleteSenderRequest struct { - - // The unique OCID of the sender. - SenderId *string `mandatory:"true" contributesTo:"path" name:"senderId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteSenderRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteSenderRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteSenderRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteSenderResponse wrapper for the DeleteSender operation -type DeleteSenderResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to - // contact Oracle about a particular request, please provide the request - // ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteSenderResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteSenderResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/delete_suppression_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/delete_suppression_request_response.go deleted file mode 100644 index 78df3bc75..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/delete_suppression_request_response.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteSuppressionRequest wrapper for the DeleteSuppression operation -type DeleteSuppressionRequest struct { - - // The unique OCID of the suppression. - SuppressionId *string `mandatory:"true" contributesTo:"path" name:"suppressionId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteSuppressionRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteSuppressionRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteSuppressionRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteSuppressionResponse wrapper for the DeleteSuppression operation -type DeleteSuppressionResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to - // contact Oracle about a particular request, please provide the request - // ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteSuppressionResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteSuppressionResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/email_client.go b/vendor/github.com/oracle/oci-go-sdk/email/email_client.go deleted file mode 100644 index 2d6a402fc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/email_client.go +++ /dev/null @@ -1,376 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Email Delivery Service API -// -// API spec for managing OCI Email Delivery services. -// - -package email - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -//EmailClient a client for Email -type EmailClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewEmailClientWithConfigurationProvider Creates a new default Email client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewEmailClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client EmailClient, err error) { - baseClient, err := common.NewClientWithConfig(configProvider) - if err != nil { - return - } - - client = EmailClient{BaseClient: baseClient} - client.BasePath = "20170907" - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *EmailClient) SetRegion(region string) { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "email", region) -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *EmailClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { - if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { - return err - } - - // Error has been checked already - region, _ := configProvider.Region() - client.SetRegion(region) - client.config = &configProvider - return nil -} - -// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set -func (client *EmailClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// CreateSender Creates a sender for a tenancy in a given compartment. -func (client EmailClient) CreateSender(ctx context.Context, request CreateSenderRequest) (response CreateSenderResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createSender, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateSenderResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateSenderResponse") - } - return -} - -// createSender implements the OCIOperation interface (enables retrying operations) -func (client EmailClient) createSender(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/senders") - if err != nil { - return nil, err - } - - var response CreateSenderResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateSuppression Adds recipient email addresses to the suppression list for a tenancy. -func (client EmailClient) CreateSuppression(ctx context.Context, request CreateSuppressionRequest) (response CreateSuppressionResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createSuppression, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateSuppressionResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateSuppressionResponse") - } - return -} - -// createSuppression implements the OCIOperation interface (enables retrying operations) -func (client EmailClient) createSuppression(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/suppressions") - if err != nil { - return nil, err - } - - var response CreateSuppressionResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteSender Deletes an approved sender for a tenancy in a given compartment for a -// provided `senderId`. -func (client EmailClient) DeleteSender(ctx context.Context, request DeleteSenderRequest) (response DeleteSenderResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteSender, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteSenderResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteSenderResponse") - } - return -} - -// deleteSender implements the OCIOperation interface (enables retrying operations) -func (client EmailClient) deleteSender(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/senders/{senderId}") - if err != nil { - return nil, err - } - - var response DeleteSenderResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteSuppression Removes a suppressed recipient email address from the suppression list -// for a tenancy in a given compartment for a provided `suppressionId`. -func (client EmailClient) DeleteSuppression(ctx context.Context, request DeleteSuppressionRequest) (response DeleteSuppressionResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteSuppression, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteSuppressionResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteSuppressionResponse") - } - return -} - -// deleteSuppression implements the OCIOperation interface (enables retrying operations) -func (client EmailClient) deleteSuppression(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/suppressions/{suppressionId}") - if err != nil { - return nil, err - } - - var response DeleteSuppressionResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetSender Gets an approved sender for a given `senderId`. -func (client EmailClient) GetSender(ctx context.Context, request GetSenderRequest) (response GetSenderResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getSender, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetSenderResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetSenderResponse") - } - return -} - -// getSender implements the OCIOperation interface (enables retrying operations) -func (client EmailClient) getSender(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/senders/{senderId}") - if err != nil { - return nil, err - } - - var response GetSenderResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetSuppression Gets the details of a suppressed recipient email address for a given -// `suppressionId`. Each suppression is given a unique OCID. -func (client EmailClient) GetSuppression(ctx context.Context, request GetSuppressionRequest) (response GetSuppressionResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getSuppression, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetSuppressionResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetSuppressionResponse") - } - return -} - -// getSuppression implements the OCIOperation interface (enables retrying operations) -func (client EmailClient) getSuppression(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/suppressions/{suppressionId}") - if err != nil { - return nil, err - } - - var response GetSuppressionResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListSenders Gets a collection of approved sender email addresses and sender IDs. -func (client EmailClient) ListSenders(ctx context.Context, request ListSendersRequest) (response ListSendersResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listSenders, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListSendersResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSendersResponse") - } - return -} - -// listSenders implements the OCIOperation interface (enables retrying operations) -func (client EmailClient) listSenders(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/senders") - if err != nil { - return nil, err - } - - var response ListSendersResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListSuppressions Gets a list of suppressed recipient email addresses for a user. The -// `compartmentId` for suppressions must be a tenancy OCID. The returned list -// is sorted by creation time in descending order. -func (client EmailClient) ListSuppressions(ctx context.Context, request ListSuppressionsRequest) (response ListSuppressionsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listSuppressions, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListSuppressionsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSuppressionsResponse") - } - return -} - -// listSuppressions implements the OCIOperation interface (enables retrying operations) -func (client EmailClient) listSuppressions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/suppressions") - if err != nil { - return nil, err - } - - var response ListSuppressionsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/get_sender_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/get_sender_request_response.go deleted file mode 100644 index 68d6f5df7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/get_sender_request_response.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetSenderRequest wrapper for the GetSender operation -type GetSenderRequest struct { - - // The unique OCID of the sender. - SenderId *string `mandatory:"true" contributesTo:"path" name:"senderId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetSenderRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetSenderRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetSenderRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetSenderResponse wrapper for the GetSender operation -type GetSenderResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Sender instance - Sender `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide the - // request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetSenderResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetSenderResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/get_suppression_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/get_suppression_request_response.go deleted file mode 100644 index 4dc05f477..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/get_suppression_request_response.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetSuppressionRequest wrapper for the GetSuppression operation -type GetSuppressionRequest struct { - - // The unique OCID of the suppression. - SuppressionId *string `mandatory:"true" contributesTo:"path" name:"suppressionId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetSuppressionRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetSuppressionRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetSuppressionRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetSuppressionResponse wrapper for the GetSuppression operation -type GetSuppressionResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Suppression instance - Suppression `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetSuppressionResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetSuppressionResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/list_senders_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/list_senders_request_response.go deleted file mode 100644 index 64321b648..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/list_senders_request_response.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListSendersRequest wrapper for the ListSenders operation -type ListSendersRequest struct { - - // The OCID for the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The current state of a sender. - LifecycleState SenderLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` - - // The email address of the approved sender. - EmailAddress *string `mandatory:"false" contributesTo:"query" name:"emailAddress"` - - // The value of the `opc-next-page` response header from the previous - // GET request. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated GET request. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The field to sort by. The `TIMECREATED` value returns the list in in - // descending order by default. The `EMAILADDRESS` value returns the list in - // ascending order by default. Use the `SortOrderQueryParam` to change the - // direction of the returned list of items. - SortBy ListSendersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The sort order to use, either ascending or descending order. - SortOrder ListSendersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListSendersRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListSendersRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListSendersRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListSendersResponse wrapper for the ListSenders operation -type ListSendersResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []SenderSummary instances - Items []SenderSummary `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide the - // request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. If this header appears in the - // response, then a partial list might have been returned. Include - // this value for the `page` parameter in subsequent GET - // requests to return the next batch of items. - // of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // The total number of items returned from the request. - OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` -} - -func (response ListSendersResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListSendersResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListSendersSortByEnum Enum with underlying type: string -type ListSendersSortByEnum string - -// Set of constants representing the allowable values for ListSendersSortBy -const ( - ListSendersSortByTimecreated ListSendersSortByEnum = "TIMECREATED" - ListSendersSortByEmailaddress ListSendersSortByEnum = "EMAILADDRESS" -) - -var mappingListSendersSortBy = map[string]ListSendersSortByEnum{ - "TIMECREATED": ListSendersSortByTimecreated, - "EMAILADDRESS": ListSendersSortByEmailaddress, -} - -// GetListSendersSortByEnumValues Enumerates the set of values for ListSendersSortBy -func GetListSendersSortByEnumValues() []ListSendersSortByEnum { - values := make([]ListSendersSortByEnum, 0) - for _, v := range mappingListSendersSortBy { - values = append(values, v) - } - return values -} - -// ListSendersSortOrderEnum Enum with underlying type: string -type ListSendersSortOrderEnum string - -// Set of constants representing the allowable values for ListSendersSortOrder -const ( - ListSendersSortOrderAsc ListSendersSortOrderEnum = "ASC" - ListSendersSortOrderDesc ListSendersSortOrderEnum = "DESC" -) - -var mappingListSendersSortOrder = map[string]ListSendersSortOrderEnum{ - "ASC": ListSendersSortOrderAsc, - "DESC": ListSendersSortOrderDesc, -} - -// GetListSendersSortOrderEnumValues Enumerates the set of values for ListSendersSortOrder -func GetListSendersSortOrderEnumValues() []ListSendersSortOrderEnum { - values := make([]ListSendersSortOrderEnum, 0) - for _, v := range mappingListSendersSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/list_suppressions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/email/list_suppressions_request_response.go deleted file mode 100644 index 1670e9760..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/list_suppressions_request_response.go +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListSuppressionsRequest wrapper for the ListSuppressions operation -type ListSuppressionsRequest struct { - - // The OCID for the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The email address of the suppression. - EmailAddress *string `mandatory:"false" contributesTo:"query" name:"emailAddress"` - - // Search for suppressions that were created within a specific date range, - // using this parameter to specify the earliest creation date for the - // returned list (inclusive). Specifying this parameter without the - // corresponding `timeCreatedLessThan` parameter will retrieve suppressions created from the - // given `timeCreatedGreaterThanOrEqualTo` to the current time, in "YYYY-MM-ddThh:mmZ" format with a - // Z offset, as defined by RFC 3339. - // **Example:** 2016-12-19T16:39:57.600Z - TimeCreatedGreaterThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeCreatedGreaterThanOrEqualTo"` - - // Search for suppressions that were created within a specific date range, - // using this parameter to specify the latest creation date for the returned - // list (exclusive). Specifying this parameter without the corresponding - // `timeCreatedGreaterThanOrEqualTo` parameter will retrieve all suppressions created before the - // specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as - // defined by RFC 3339. - // **Example:** 2016-12-19T16:39:57.600Z - TimeCreatedLessThan *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeCreatedLessThan"` - - // The value of the `opc-next-page` response header from the previous - // GET request. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated GET request. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The field to sort by. The `TIMECREATED` value returns the list in in - // descending order by default. The `EMAILADDRESS` value returns the list in - // ascending order by default. Use the `SortOrderQueryParam` to change the - // direction of the returned list of items. - SortBy ListSuppressionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The sort order to use, either ascending or descending order. - SortOrder ListSuppressionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListSuppressionsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListSuppressionsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListSuppressionsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListSuppressionsResponse wrapper for the ListSuppressions operation -type ListSuppressionsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []SuppressionSummary instances - Items []SuppressionSummary `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need - // to contact Oracle about a particular request, please provide the - // request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. If this header appears in the - // response, then a partial list might have been returned. Include - // this value for the `page` parameter in subsequent GET - // requests to return the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListSuppressionsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListSuppressionsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListSuppressionsSortByEnum Enum with underlying type: string -type ListSuppressionsSortByEnum string - -// Set of constants representing the allowable values for ListSuppressionsSortBy -const ( - ListSuppressionsSortByTimecreated ListSuppressionsSortByEnum = "TIMECREATED" - ListSuppressionsSortByEmailaddress ListSuppressionsSortByEnum = "EMAILADDRESS" -) - -var mappingListSuppressionsSortBy = map[string]ListSuppressionsSortByEnum{ - "TIMECREATED": ListSuppressionsSortByTimecreated, - "EMAILADDRESS": ListSuppressionsSortByEmailaddress, -} - -// GetListSuppressionsSortByEnumValues Enumerates the set of values for ListSuppressionsSortBy -func GetListSuppressionsSortByEnumValues() []ListSuppressionsSortByEnum { - values := make([]ListSuppressionsSortByEnum, 0) - for _, v := range mappingListSuppressionsSortBy { - values = append(values, v) - } - return values -} - -// ListSuppressionsSortOrderEnum Enum with underlying type: string -type ListSuppressionsSortOrderEnum string - -// Set of constants representing the allowable values for ListSuppressionsSortOrder -const ( - ListSuppressionsSortOrderAsc ListSuppressionsSortOrderEnum = "ASC" - ListSuppressionsSortOrderDesc ListSuppressionsSortOrderEnum = "DESC" -) - -var mappingListSuppressionsSortOrder = map[string]ListSuppressionsSortOrderEnum{ - "ASC": ListSuppressionsSortOrderAsc, - "DESC": ListSuppressionsSortOrderDesc, -} - -// GetListSuppressionsSortOrderEnumValues Enumerates the set of values for ListSuppressionsSortOrder -func GetListSuppressionsSortOrderEnumValues() []ListSuppressionsSortOrderEnum { - values := make([]ListSuppressionsSortOrderEnum, 0) - for _, v := range mappingListSuppressionsSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/sender.go b/vendor/github.com/oracle/oci-go-sdk/email/sender.go deleted file mode 100644 index 19b3ff8a2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/sender.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Email Delivery Service API -// -// API spec for managing OCI Email Delivery services. -// - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Sender The full information representing an approved sender. -type Sender struct { - - // Email address of the sender. - EmailAddress *string `mandatory:"false" json:"emailAddress"` - - // The unique OCID of the sender. - Id *string `mandatory:"false" json:"id"` - - // Value of the SPF field. For more information about SPF, please see - // SPF Authentication (https://docs.us-phoenix-1.oraclecloud.com/Content/Email/Concepts/emaildeliveryoverview.htm#spf). - IsSpf *bool `mandatory:"false" json:"isSpf"` - - // The sender's current lifecycle state. - LifecycleState SenderLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" - // format with a Z offset, as defined by RFC 3339. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m Sender) String() string { - return common.PointerString(m) -} - -// SenderLifecycleStateEnum Enum with underlying type: string -type SenderLifecycleStateEnum string - -// Set of constants representing the allowable values for SenderLifecycleState -const ( - SenderLifecycleStateCreating SenderLifecycleStateEnum = "CREATING" - SenderLifecycleStateActive SenderLifecycleStateEnum = "ACTIVE" - SenderLifecycleStateDeleting SenderLifecycleStateEnum = "DELETING" - SenderLifecycleStateDeleted SenderLifecycleStateEnum = "DELETED" -) - -var mappingSenderLifecycleState = map[string]SenderLifecycleStateEnum{ - "CREATING": SenderLifecycleStateCreating, - "ACTIVE": SenderLifecycleStateActive, - "DELETING": SenderLifecycleStateDeleting, - "DELETED": SenderLifecycleStateDeleted, -} - -// GetSenderLifecycleStateEnumValues Enumerates the set of values for SenderLifecycleState -func GetSenderLifecycleStateEnumValues() []SenderLifecycleStateEnum { - values := make([]SenderLifecycleStateEnum, 0) - for _, v := range mappingSenderLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/sender_summary.go b/vendor/github.com/oracle/oci-go-sdk/email/sender_summary.go deleted file mode 100644 index 2d5600131..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/sender_summary.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Email Delivery Service API -// -// API spec for managing OCI Email Delivery services. -// - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SenderSummary The email addresses and `senderId` representing an approved sender. -type SenderSummary struct { - - // The email address of the sender. - EmailAddress *string `mandatory:"false" json:"emailAddress"` - - // The unique ID of the sender. - Id *string `mandatory:"false" json:"id"` - - // The current status of the approved sender. - LifecycleState SenderSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // Date time the approved sender was added, in "YYYY-MM-ddThh:mmZ" - // format with a Z offset, as defined by RFC 3339. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m SenderSummary) String() string { - return common.PointerString(m) -} - -// SenderSummaryLifecycleStateEnum Enum with underlying type: string -type SenderSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for SenderSummaryLifecycleState -const ( - SenderSummaryLifecycleStateCreating SenderSummaryLifecycleStateEnum = "CREATING" - SenderSummaryLifecycleStateActive SenderSummaryLifecycleStateEnum = "ACTIVE" - SenderSummaryLifecycleStateDeleting SenderSummaryLifecycleStateEnum = "DELETING" - SenderSummaryLifecycleStateDeleted SenderSummaryLifecycleStateEnum = "DELETED" -) - -var mappingSenderSummaryLifecycleState = map[string]SenderSummaryLifecycleStateEnum{ - "CREATING": SenderSummaryLifecycleStateCreating, - "ACTIVE": SenderSummaryLifecycleStateActive, - "DELETING": SenderSummaryLifecycleStateDeleting, - "DELETED": SenderSummaryLifecycleStateDeleted, -} - -// GetSenderSummaryLifecycleStateEnumValues Enumerates the set of values for SenderSummaryLifecycleState -func GetSenderSummaryLifecycleStateEnumValues() []SenderSummaryLifecycleStateEnum { - values := make([]SenderSummaryLifecycleStateEnum, 0) - for _, v := range mappingSenderSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/suppression.go b/vendor/github.com/oracle/oci-go-sdk/email/suppression.go deleted file mode 100644 index 86c1571af..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/suppression.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Email Delivery Service API -// -// API spec for managing OCI Email Delivery services. -// - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Suppression The full information representing an email suppression. -type Suppression struct { - - // Email address of the suppression. - EmailAddress *string `mandatory:"false" json:"emailAddress"` - - // The unique ID of the suppression. - Id *string `mandatory:"false" json:"id"` - - // The reason that the email address was suppressed. For more information on the types of bounces, see Suppresion List (https://docs.us-phoenix-1.oraclecloud.com/Content/Email/Concepts/emaildeliveryoverview.htm#suppressionlist). - Reason SuppressionReasonEnum `mandatory:"false" json:"reason,omitempty"` - - // The date and time the approved sender was added in "YYYY-MM-ddThh:mmZ" - // format with a Z offset, as defined by RFC 3339. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m Suppression) String() string { - return common.PointerString(m) -} - -// SuppressionReasonEnum Enum with underlying type: string -type SuppressionReasonEnum string - -// Set of constants representing the allowable values for SuppressionReason -const ( - SuppressionReasonUnknown SuppressionReasonEnum = "UNKNOWN" - SuppressionReasonHardbounce SuppressionReasonEnum = "HARDBOUNCE" - SuppressionReasonComplaint SuppressionReasonEnum = "COMPLAINT" - SuppressionReasonManual SuppressionReasonEnum = "MANUAL" - SuppressionReasonSoftbounce SuppressionReasonEnum = "SOFTBOUNCE" - SuppressionReasonUnsubscribe SuppressionReasonEnum = "UNSUBSCRIBE" -) - -var mappingSuppressionReason = map[string]SuppressionReasonEnum{ - "UNKNOWN": SuppressionReasonUnknown, - "HARDBOUNCE": SuppressionReasonHardbounce, - "COMPLAINT": SuppressionReasonComplaint, - "MANUAL": SuppressionReasonManual, - "SOFTBOUNCE": SuppressionReasonSoftbounce, - "UNSUBSCRIBE": SuppressionReasonUnsubscribe, -} - -// GetSuppressionReasonEnumValues Enumerates the set of values for SuppressionReason -func GetSuppressionReasonEnumValues() []SuppressionReasonEnum { - values := make([]SuppressionReasonEnum, 0) - for _, v := range mappingSuppressionReason { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/email/suppression_summary.go b/vendor/github.com/oracle/oci-go-sdk/email/suppression_summary.go deleted file mode 100644 index 46bdf1856..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/email/suppression_summary.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Email Delivery Service API -// -// API spec for managing OCI Email Delivery services. -// - -package email - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SuppressionSummary The full information representing a suppression. -type SuppressionSummary struct { - - // The email address of the suppression. - EmailAddress *string `mandatory:"false" json:"emailAddress"` - - // The unique OCID of the suppression. - Id *string `mandatory:"false" json:"id"` - - // The reason that the email address was suppressed. - Reason SuppressionSummaryReasonEnum `mandatory:"false" json:"reason,omitempty"` - - // The date and time a recipient's email address was added to the - // suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as - // defined by RFC 3339. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m SuppressionSummary) String() string { - return common.PointerString(m) -} - -// SuppressionSummaryReasonEnum Enum with underlying type: string -type SuppressionSummaryReasonEnum string - -// Set of constants representing the allowable values for SuppressionSummaryReason -const ( - SuppressionSummaryReasonUnknown SuppressionSummaryReasonEnum = "UNKNOWN" - SuppressionSummaryReasonHardbounce SuppressionSummaryReasonEnum = "HARDBOUNCE" - SuppressionSummaryReasonComplaint SuppressionSummaryReasonEnum = "COMPLAINT" - SuppressionSummaryReasonManual SuppressionSummaryReasonEnum = "MANUAL" - SuppressionSummaryReasonSoftbounce SuppressionSummaryReasonEnum = "SOFTBOUNCE" - SuppressionSummaryReasonUnsubscribe SuppressionSummaryReasonEnum = "UNSUBSCRIBE" -) - -var mappingSuppressionSummaryReason = map[string]SuppressionSummaryReasonEnum{ - "UNKNOWN": SuppressionSummaryReasonUnknown, - "HARDBOUNCE": SuppressionSummaryReasonHardbounce, - "COMPLAINT": SuppressionSummaryReasonComplaint, - "MANUAL": SuppressionSummaryReasonManual, - "SOFTBOUNCE": SuppressionSummaryReasonSoftbounce, - "UNSUBSCRIBE": SuppressionSummaryReasonUnsubscribe, -} - -// GetSuppressionSummaryReasonEnumValues Enumerates the set of values for SuppressionSummaryReason -func GetSuppressionSummaryReasonEnumValues() []SuppressionSummaryReasonEnum { - values := make([]SuppressionSummaryReasonEnum, 0) - for _, v := range mappingSuppressionSummaryReason { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go b/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go deleted file mode 100644 index dfc3a2863..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// -// Helper methods for OCI GOSDK Samples -// - -package helpers - -import ( - "os" - - "github.com/oracle/oci-go-sdk/common" -) - -var ( - availabilityDomain string - compartmentID string - rootCompartmentID string -) - -// ParseEnvironmentVariables parse shared variables from environment variables, other samples should define their own -// viariables and call this function to initialize shared variables -func ParseEnvironmentVariables() { - availabilityDomain = os.Getenv("OCI_AVAILABILITY_DOMAIN") - compartmentID = os.Getenv("OCI_COMPARTMENT_ID") - rootCompartmentID = os.Getenv("OCI_ROOT_COMPARTMENT_ID") -} - -// AvailabilityDomain return the aviailability domain defined in .env.sample file -func AvailabilityDomain() *string { - return common.String(availabilityDomain) -} - -// CompartmentID return the compartment ID defined in .env.sample file -func CompartmentID() *string { - return common.String(compartmentID) -} - -// RootCompartmentID return the root compartment ID defined in .env.sample file -func RootCompartmentID() *string { - return common.String(rootCompartmentID) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go b/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go deleted file mode 100644 index d4233d63e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// -// Helper methods for OCI GOSDK Samples -// - -package helpers - -import ( - "fmt" - "log" - "math" - "math/rand" - "reflect" - "strings" - "time" - - "github.com/oracle/oci-go-sdk/common" -) - -// FatalIfError is equivalent to Println() followed by a call to os.Exit(1) if error is not nil -func FatalIfError(err error) { - if err != nil { - log.Fatalln(err.Error()) - } -} - -// RetryUntilTrueOrError retries a function until the predicate is true or it reaches a timeout. -// The operation is retried at the give frequency -func RetryUntilTrueOrError(operation func() (interface{}, error), predicate func(interface{}) (bool, error), frequency, timeout <-chan time.Time) error { - for { - select { - case <-timeout: - return fmt.Errorf("timeout reached") - case <-frequency: - result, err := operation() - if err != nil { - return err - } - - isTrue, err := predicate(result) - if err != nil { - return err - } - - if isTrue { - return nil - } - } - } -} - -// FindLifecycleFieldValue finds lifecycle value inside the struct based on reflection -func FindLifecycleFieldValue(request interface{}) (string, error) { - val := reflect.ValueOf(request) - if val.Kind() == reflect.Ptr { - if val.IsNil() { - return "", fmt.Errorf("can not unmarshal to response a pointer to nil structure") - } - val = val.Elem() - } - - var err error - typ := val.Type() - for i := 0; i < typ.NumField(); i++ { - if err != nil { - return "", err - } - - sf := typ.Field(i) - - //unexported - if sf.PkgPath != "" { - continue - } - - sv := val.Field(i) - - if sv.Kind() == reflect.Struct { - lif, err := FindLifecycleFieldValue(sv.Interface()) - if err == nil { - return lif, nil - } - } - if !strings.Contains(strings.ToLower(sf.Name), "lifecyclestate") { - continue - } - return sv.String(), nil - } - return "", fmt.Errorf("request does not have a lifecycle field") -} - -// CheckLifecycleState returns a function that checks for that a struct has the given lifecycle -func CheckLifecycleState(lifecycleState string) func(interface{}) (bool, error) { - return func(request interface{}) (bool, error) { - fieldLifecycle, err := FindLifecycleFieldValue(request) - if err != nil { - return false, err - } - isEqual := fieldLifecycle == lifecycleState - log.Printf("Current lifecycle state is: %s, waiting for it becomes to: %s", fieldLifecycle, lifecycleState) - return isEqual, nil - } -} - -// GetRequestMetadataWithDefaultRetryPolicy returns a requestMetadata with default retry policy -// which will do retry for non-200 status code return back from service -// Notes: not all non-200 status code should do retry, this should be based on specific operation -// such as delete operation followed with get operation will retrun 404 if resource already been -// deleted -func GetRequestMetadataWithDefaultRetryPolicy() common.RequestMetadata { - return common.RequestMetadata{ - RetryPolicy: getDefaultRetryPolicy(), - } -} - -// GetRequestMetadataWithCustomizedRetryPolicy returns a requestMetadata which will do the retry based on -// input function (retry until the function return false) -func GetRequestMetadataWithCustomizedRetryPolicy(fn func(r common.OCIOperationResponse) bool) common.RequestMetadata { - return common.RequestMetadata{ - RetryPolicy: getExponentialBackoffRetryPolicy(uint(20), fn), - } -} - -func getDefaultRetryPolicy() *common.RetryPolicy { - // how many times to do the retry - attempts := uint(10) - - // retry for all non-200 status code - retryOnAllNon200ResponseCodes := func(r common.OCIOperationResponse) bool { - return !(r.Error == nil && 199 < r.Response.HTTPResponse().StatusCode && r.Response.HTTPResponse().StatusCode < 300) - } - return getExponentialBackoffRetryPolicy(attempts, retryOnAllNon200ResponseCodes) -} - -func getExponentialBackoffRetryPolicy(n uint, fn func(r common.OCIOperationResponse) bool) *common.RetryPolicy { - // the duration between each retry operation, you might want to waite longer each time the retry fails - exponentialBackoff := func(r common.OCIOperationResponse) time.Duration { - return time.Duration(math.Pow(float64(2), float64(r.AttemptNumber-1))) * time.Second - } - policy := common.NewRetryPolicy(n, fn, exponentialBackoff) - return &policy -} - -// GetRandomString returns a random string with length equals to n -func GetRandomString(n int) string { - letters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") - - b := make([]rune, n) - for i := range b { - b[i] = letters[rand.Intn(len(letters))] - } - return string(b) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_details.go deleted file mode 100644 index 56642c4e9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_details.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateExportDetails The representation of CreateExportDetails -type CreateExportDetails struct { - - // The OCID of this export's export set. - ExportSetId *string `mandatory:"true" json:"exportSetId"` - - // The OCID of this export's file system. - FileSystemId *string `mandatory:"true" json:"fileSystemId"` - - // Path used to access the associated file system. - // Avoid entering confidential information. - // Example: `/mediafiles` - Path *string `mandatory:"true" json:"path"` -} - -func (m CreateExportDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_request_response.go deleted file mode 100644 index e706a07ab..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_export_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateExportRequest wrapper for the CreateExport operation -type CreateExportRequest struct { - - // Details for creating a new export. - CreateExportDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations. For example, if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // might be rejected. - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateExportRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateExportRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateExportRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateExportResponse wrapper for the CreateExport operation -type CreateExportResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Export instance - Export `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateExportResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateExportResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_details.go deleted file mode 100644 index 5b4b3bff2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_details.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateFileSystemDetails The representation of CreateFileSystemDetails -type CreateFileSystemDetails struct { - - // The availability domain to create the file system in. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - - // The OCID of the compartment to create the file system in. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My file system` - DisplayName *string `mandatory:"false" json:"displayName"` -} - -func (m CreateFileSystemDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_request_response.go deleted file mode 100644 index eaec3e794..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_file_system_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateFileSystemRequest wrapper for the CreateFileSystem operation -type CreateFileSystemRequest struct { - - // Details for creating a new file system. - CreateFileSystemDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations. For example, if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // might be rejected. - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateFileSystemRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateFileSystemRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateFileSystemRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateFileSystemResponse wrapper for the CreateFileSystem operation -type CreateFileSystemResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The FileSystem instance - FileSystem `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateFileSystemResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateFileSystemResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_details.go deleted file mode 100644 index 0f7501d74..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_details.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateMountTargetDetails The representation of CreateMountTargetDetails -type CreateMountTargetDetails struct { - - // The availability domain in which to create the mount target. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - - // The OCID of the compartment in which to create the mount target. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The OCID of the subnet in which to create the mount target. - SubnetId *string `mandatory:"true" json:"subnetId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My mount target` - DisplayName *string `mandatory:"false" json:"displayName"` - - // The hostname for the mount target's IP address, used for - // DNS resolution. The value is the hostname portion of the private IP - // address's fully qualified domain name (FQDN). For example, - // `files-1` in the FQDN `files-1.subnet123.vcn1.oraclevcn.com`. - // Must be unique across all VNICs in the subnet and comply - // with RFC 952 (https://tools.ietf.org/html/rfc952) - // and RFC 1123 (https://tools.ietf.org/html/rfc1123). - // For more information, see - // DNS in Your Virtual Cloud Network (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). - // Example: `files-1` - HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` - - // A private IP address of your choice. Must be an available IP address within - // the subnet's CIDR. If you don't specify a value, Oracle automatically - // assigns a private IP address from the subnet. - // Example: `10.0.3.3` - IpAddress *string `mandatory:"false" json:"ipAddress"` -} - -func (m CreateMountTargetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_request_response.go deleted file mode 100644 index e7a4bf447..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_mount_target_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateMountTargetRequest wrapper for the CreateMountTarget operation -type CreateMountTargetRequest struct { - - // Details for creating a new mount target. - CreateMountTargetDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations. For example, if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // might be rejected. - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateMountTargetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateMountTargetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateMountTargetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateMountTargetResponse wrapper for the CreateMountTarget operation -type CreateMountTargetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The MountTarget instance - MountTarget `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateMountTargetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateMountTargetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_details.go deleted file mode 100644 index 77736e0d5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_details.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateSnapshotDetails The representation of CreateSnapshotDetails -type CreateSnapshotDetails struct { - - // The OCID of this export's file system. - FileSystemId *string `mandatory:"true" json:"fileSystemId"` - - // Name of the snapshot. This value is immutable. It must also be unique with respect - // to all other non-DELETED snapshots on the associated file - // system. - // Avoid entering confidential information. - // Example: `Sunday` - Name *string `mandatory:"true" json:"name"` -} - -func (m CreateSnapshotDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_request_response.go deleted file mode 100644 index 8e80b17be..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/create_snapshot_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateSnapshotRequest wrapper for the CreateSnapshot operation -type CreateSnapshotRequest struct { - - // Details for creating a new snapshot. - CreateSnapshotDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations. For example, if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // might be rejected. - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateSnapshotRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateSnapshotRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateSnapshotRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateSnapshotResponse wrapper for the CreateSnapshot operation -type CreateSnapshotResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Snapshot instance - Snapshot `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateSnapshotResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateSnapshotResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_export_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_export_request_response.go deleted file mode 100644 index bc97b114e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_export_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteExportRequest wrapper for the DeleteExport operation -type DeleteExportRequest struct { - - // The OCID of the export. - ExportId *string `mandatory:"true" contributesTo:"path" name:"exportId"` - - // For optimistic concurrency control. In the PUT or DELETE call - // for a resource, set the `if-match` parameter to the value of the - // etag from a previous GET or POST response for that resource. - // The resource will be updated or deleted only if the etag you - // provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteExportRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteExportRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteExportRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteExportResponse wrapper for the DeleteExport operation -type DeleteExportResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteExportResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteExportResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_file_system_request_response.go deleted file mode 100644 index 2306c1bc0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_file_system_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteFileSystemRequest wrapper for the DeleteFileSystem operation -type DeleteFileSystemRequest struct { - - // The OCID of the file system. - FileSystemId *string `mandatory:"true" contributesTo:"path" name:"fileSystemId"` - - // For optimistic concurrency control. In the PUT or DELETE call - // for a resource, set the `if-match` parameter to the value of the - // etag from a previous GET or POST response for that resource. - // The resource will be updated or deleted only if the etag you - // provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteFileSystemRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteFileSystemRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteFileSystemRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteFileSystemResponse wrapper for the DeleteFileSystem operation -type DeleteFileSystemResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteFileSystemResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteFileSystemResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_mount_target_request_response.go deleted file mode 100644 index fe9cb467d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_mount_target_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteMountTargetRequest wrapper for the DeleteMountTarget operation -type DeleteMountTargetRequest struct { - - // The OCID of the mount target. - MountTargetId *string `mandatory:"true" contributesTo:"path" name:"mountTargetId"` - - // For optimistic concurrency control. In the PUT or DELETE call - // for a resource, set the `if-match` parameter to the value of the - // etag from a previous GET or POST response for that resource. - // The resource will be updated or deleted only if the etag you - // provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteMountTargetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteMountTargetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteMountTargetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteMountTargetResponse wrapper for the DeleteMountTarget operation -type DeleteMountTargetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteMountTargetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteMountTargetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_snapshot_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_snapshot_request_response.go deleted file mode 100644 index ffc9eec18..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/delete_snapshot_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteSnapshotRequest wrapper for the DeleteSnapshot operation -type DeleteSnapshotRequest struct { - - // The OCID of the snapshot. - SnapshotId *string `mandatory:"true" contributesTo:"path" name:"snapshotId"` - - // For optimistic concurrency control. In the PUT or DELETE call - // for a resource, set the `if-match` parameter to the value of the - // etag from a previous GET or POST response for that resource. - // The resource will be updated or deleted only if the etag you - // provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteSnapshotRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteSnapshotRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteSnapshotRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteSnapshotResponse wrapper for the DeleteSnapshot operation -type DeleteSnapshotResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteSnapshotResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteSnapshotResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/export.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/export.go deleted file mode 100644 index f0065824b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/export.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Export A file system and the path that you can use to mount it. Each export -// resource belongs to exactly one export set. -// The export's path attribute is not a path in the -// referenced file system, but the value used by clients for the path -// component of the remotetarget argument when mounting the file -// system. -// The path must start with a slash (/) followed by a sequence of zero or more -// slash-separated path elements. For any two export resources associated with -// the same export set, except those in a 'DELETED' state, the path element -// sequence for the first export resource can't contain the -// complete path element sequence of the second export resource. -// -// For example, the following are acceptable: -// * /example and /path -// * /example1 and /example2 -// * /example and /example1 -// The following examples are not acceptable: -// * /example and /example/path -// * / and /example -// Paths may not end in a slash (/). No path element can be a period (.) -// or two periods in sequence (..). All path elements must be 255 bytes or less. -// No two non-'DELETED' export resources in the same export set can -// reference the same file system. -type Export struct { - - // The OCID of this export's export set. - ExportSetId *string `mandatory:"true" json:"exportSetId"` - - // The OCID of this export's file system. - FileSystemId *string `mandatory:"true" json:"fileSystemId"` - - // The OCID of this export. - Id *string `mandatory:"true" json:"id"` - - // The current state of this export. - LifecycleState ExportLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // Path used to access the associated file system. - // Avoid entering confidential information. - // Example: `/accounting` - Path *string `mandatory:"true" json:"path"` - - // The date and time the export was created, expressed - // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` -} - -func (m Export) String() string { - return common.PointerString(m) -} - -// ExportLifecycleStateEnum Enum with underlying type: string -type ExportLifecycleStateEnum string - -// Set of constants representing the allowable values for ExportLifecycleState -const ( - ExportLifecycleStateCreating ExportLifecycleStateEnum = "CREATING" - ExportLifecycleStateActive ExportLifecycleStateEnum = "ACTIVE" - ExportLifecycleStateDeleting ExportLifecycleStateEnum = "DELETING" - ExportLifecycleStateDeleted ExportLifecycleStateEnum = "DELETED" -) - -var mappingExportLifecycleState = map[string]ExportLifecycleStateEnum{ - "CREATING": ExportLifecycleStateCreating, - "ACTIVE": ExportLifecycleStateActive, - "DELETING": ExportLifecycleStateDeleting, - "DELETED": ExportLifecycleStateDeleted, -} - -// GetExportLifecycleStateEnumValues Enumerates the set of values for ExportLifecycleState -func GetExportLifecycleStateEnumValues() []ExportLifecycleStateEnum { - values := make([]ExportLifecycleStateEnum, 0) - for _, v := range mappingExportLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set.go deleted file mode 100644 index ed4ad87b8..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ExportSet A set of file systems to export through one or more mount -// targets. Composed of zero or more export resources. -type ExportSet struct { - - // The OCID of the compartment that contains the export set. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My export set` - DisplayName *string `mandatory:"true" json:"displayName"` - - // The OCID of the export set. - Id *string `mandatory:"true" json:"id"` - - // The current state of the export set. - LifecycleState ExportSetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The date and time the export set was created, expressed - // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The OCID of the virtual cloud network (VCN) the export set is in. - VcnId *string `mandatory:"true" json:"vcnId"` - - // The availability domain the export set is in. May be unset - // as a blank or NULL value. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` - - // Controls the maximum `tbytes`, `fbytes`, and `abytes`, - // values reported by `NFS FSSTAT` calls through any associated - // mount targets. This is an advanced feature. For most - // applications, use the default value. The - // `tbytes` value reported by `FSSTAT` will be - // `maxFsStatBytes`. The value of `fbytes` and `abytes` will be - // `maxFsStatBytes` minus the metered size of the file - // system. If the metered size is larger than `maxFsStatBytes`, - // then `fbytes` and `abytes` will both be '0'. - MaxFsStatBytes *int `mandatory:"false" json:"maxFsStatBytes"` - - // Controls the maximum `ffiles`, `ffiles`, and `afiles` - // values reported by `NFS FSSTAT` calls through any associated - // mount targets. This is an advanced feature. For most - // applications, use the default value. The - // `tfiles` value reported by `FSSTAT` will be - // `maxFsStatFiles`. The value of `ffiles` and `afiles` will be - // `maxFsStatFiles` minus the metered size of the file - // system. If the metered size is larger than `maxFsStatFiles`, - // then `ffiles` and `afiles` will both be '0'. - MaxFsStatFiles *int `mandatory:"false" json:"maxFsStatFiles"` -} - -func (m ExportSet) String() string { - return common.PointerString(m) -} - -// ExportSetLifecycleStateEnum Enum with underlying type: string -type ExportSetLifecycleStateEnum string - -// Set of constants representing the allowable values for ExportSetLifecycleState -const ( - ExportSetLifecycleStateCreating ExportSetLifecycleStateEnum = "CREATING" - ExportSetLifecycleStateActive ExportSetLifecycleStateEnum = "ACTIVE" - ExportSetLifecycleStateDeleting ExportSetLifecycleStateEnum = "DELETING" - ExportSetLifecycleStateDeleted ExportSetLifecycleStateEnum = "DELETED" -) - -var mappingExportSetLifecycleState = map[string]ExportSetLifecycleStateEnum{ - "CREATING": ExportSetLifecycleStateCreating, - "ACTIVE": ExportSetLifecycleStateActive, - "DELETING": ExportSetLifecycleStateDeleting, - "DELETED": ExportSetLifecycleStateDeleted, -} - -// GetExportSetLifecycleStateEnumValues Enumerates the set of values for ExportSetLifecycleState -func GetExportSetLifecycleStateEnumValues() []ExportSetLifecycleStateEnum { - values := make([]ExportSetLifecycleStateEnum, 0) - for _, v := range mappingExportSetLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set_summary.go deleted file mode 100644 index d9bca9a3d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/export_set_summary.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ExportSetSummary Summary information for an export set. -type ExportSetSummary struct { - - // The OCID of the compartment that contains the export set. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My export set` - DisplayName *string `mandatory:"true" json:"displayName"` - - // The OCID of the export set. - Id *string `mandatory:"true" json:"id"` - - // The current state of the export set. - LifecycleState ExportSetSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The date and time the export set was created, expressed - // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The OCID of the virtual cloud network (VCN) the export set is in. - VcnId *string `mandatory:"true" json:"vcnId"` - - // The availability domain the export set is in. May be unset - // as a blank or NULL value. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` -} - -func (m ExportSetSummary) String() string { - return common.PointerString(m) -} - -// ExportSetSummaryLifecycleStateEnum Enum with underlying type: string -type ExportSetSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for ExportSetSummaryLifecycleState -const ( - ExportSetSummaryLifecycleStateCreating ExportSetSummaryLifecycleStateEnum = "CREATING" - ExportSetSummaryLifecycleStateActive ExportSetSummaryLifecycleStateEnum = "ACTIVE" - ExportSetSummaryLifecycleStateDeleting ExportSetSummaryLifecycleStateEnum = "DELETING" - ExportSetSummaryLifecycleStateDeleted ExportSetSummaryLifecycleStateEnum = "DELETED" -) - -var mappingExportSetSummaryLifecycleState = map[string]ExportSetSummaryLifecycleStateEnum{ - "CREATING": ExportSetSummaryLifecycleStateCreating, - "ACTIVE": ExportSetSummaryLifecycleStateActive, - "DELETING": ExportSetSummaryLifecycleStateDeleting, - "DELETED": ExportSetSummaryLifecycleStateDeleted, -} - -// GetExportSetSummaryLifecycleStateEnumValues Enumerates the set of values for ExportSetSummaryLifecycleState -func GetExportSetSummaryLifecycleStateEnumValues() []ExportSetSummaryLifecycleStateEnum { - values := make([]ExportSetSummaryLifecycleStateEnum, 0) - for _, v := range mappingExportSetSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/export_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/export_summary.go deleted file mode 100644 index fb2515619..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/export_summary.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ExportSummary Summary information for an export. -type ExportSummary struct { - - // The OCID of this export's export set. - ExportSetId *string `mandatory:"true" json:"exportSetId"` - - // The OCID of this export's file system. - FileSystemId *string `mandatory:"true" json:"fileSystemId"` - - // The OCID of this export. - Id *string `mandatory:"true" json:"id"` - - // The current state of this export. - LifecycleState ExportSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // Path used to access the associated file system. - // Avoid entering confidential information. - // Example: `/mediafiles` - Path *string `mandatory:"true" json:"path"` - - // The date and time the export was created, expressed - // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` -} - -func (m ExportSummary) String() string { - return common.PointerString(m) -} - -// ExportSummaryLifecycleStateEnum Enum with underlying type: string -type ExportSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for ExportSummaryLifecycleState -const ( - ExportSummaryLifecycleStateCreating ExportSummaryLifecycleStateEnum = "CREATING" - ExportSummaryLifecycleStateActive ExportSummaryLifecycleStateEnum = "ACTIVE" - ExportSummaryLifecycleStateDeleting ExportSummaryLifecycleStateEnum = "DELETING" - ExportSummaryLifecycleStateDeleted ExportSummaryLifecycleStateEnum = "DELETED" -) - -var mappingExportSummaryLifecycleState = map[string]ExportSummaryLifecycleStateEnum{ - "CREATING": ExportSummaryLifecycleStateCreating, - "ACTIVE": ExportSummaryLifecycleStateActive, - "DELETING": ExportSummaryLifecycleStateDeleting, - "DELETED": ExportSummaryLifecycleStateDeleted, -} - -// GetExportSummaryLifecycleStateEnumValues Enumerates the set of values for ExportSummaryLifecycleState -func GetExportSummaryLifecycleStateEnumValues() []ExportSummaryLifecycleStateEnum { - values := make([]ExportSummaryLifecycleStateEnum, 0) - for _, v := range mappingExportSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system.go deleted file mode 100644 index 93d4547a7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// FileSystem An NFS file system. To allow access to a file system, add it -// to an export set and associate the export set with a mount -// target. The same file system can be in multiple export sets and -// associated with multiple mount targets. -// To use any of the API operations, you must be authorized in an -// IAM policy. If you're not authorized, talk to an -// administrator. If you're an administrator who needs to write -// policies to give users access, see Getting Started with -// Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type FileSystem struct { - - // The number of bytes consumed by the file system, including - // any snapshots. This number reflects the metered size of the file - // system and is updated asynchronously with respect to - // updates to the file system. - MeteredBytes *int `mandatory:"true" json:"meteredBytes"` - - // The OCID of the compartment that contains the file system. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My file system` - DisplayName *string `mandatory:"true" json:"displayName"` - - // The OCID of the file system. - Id *string `mandatory:"true" json:"id"` - - // The current state of the file system. - LifecycleState FileSystemLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The date and time the file system was created, expressed in - // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The availability domain the file system is in. May be unset - // as a blank or NULL value. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` -} - -func (m FileSystem) String() string { - return common.PointerString(m) -} - -// FileSystemLifecycleStateEnum Enum with underlying type: string -type FileSystemLifecycleStateEnum string - -// Set of constants representing the allowable values for FileSystemLifecycleState -const ( - FileSystemLifecycleStateCreating FileSystemLifecycleStateEnum = "CREATING" - FileSystemLifecycleStateActive FileSystemLifecycleStateEnum = "ACTIVE" - FileSystemLifecycleStateDeleting FileSystemLifecycleStateEnum = "DELETING" - FileSystemLifecycleStateDeleted FileSystemLifecycleStateEnum = "DELETED" -) - -var mappingFileSystemLifecycleState = map[string]FileSystemLifecycleStateEnum{ - "CREATING": FileSystemLifecycleStateCreating, - "ACTIVE": FileSystemLifecycleStateActive, - "DELETING": FileSystemLifecycleStateDeleting, - "DELETED": FileSystemLifecycleStateDeleted, -} - -// GetFileSystemLifecycleStateEnumValues Enumerates the set of values for FileSystemLifecycleState -func GetFileSystemLifecycleStateEnumValues() []FileSystemLifecycleStateEnum { - values := make([]FileSystemLifecycleStateEnum, 0) - for _, v := range mappingFileSystemLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system_summary.go deleted file mode 100644 index e4f36b816..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/file_system_summary.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// FileSystemSummary Summary information for a file system. -type FileSystemSummary struct { - - // The number of bytes consumed by the file system, including - // any snapshots. This number reflects the metered size of the file - // system and is updated asynchronously with respect to - // updates to the file system. - MeteredBytes *int `mandatory:"true" json:"meteredBytes"` - - // The OCID of the compartment that contains the file system. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My file system` - DisplayName *string `mandatory:"true" json:"displayName"` - - // The OCID of the file system. - Id *string `mandatory:"true" json:"id"` - - // The current state of the file system. - LifecycleState FileSystemSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The date and time the file system was created, expressed - // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The availability domain the file system is in. May be unset - // as a blank or NULL value. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` -} - -func (m FileSystemSummary) String() string { - return common.PointerString(m) -} - -// FileSystemSummaryLifecycleStateEnum Enum with underlying type: string -type FileSystemSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for FileSystemSummaryLifecycleState -const ( - FileSystemSummaryLifecycleStateCreating FileSystemSummaryLifecycleStateEnum = "CREATING" - FileSystemSummaryLifecycleStateActive FileSystemSummaryLifecycleStateEnum = "ACTIVE" - FileSystemSummaryLifecycleStateDeleting FileSystemSummaryLifecycleStateEnum = "DELETING" - FileSystemSummaryLifecycleStateDeleted FileSystemSummaryLifecycleStateEnum = "DELETED" -) - -var mappingFileSystemSummaryLifecycleState = map[string]FileSystemSummaryLifecycleStateEnum{ - "CREATING": FileSystemSummaryLifecycleStateCreating, - "ACTIVE": FileSystemSummaryLifecycleStateActive, - "DELETING": FileSystemSummaryLifecycleStateDeleting, - "DELETED": FileSystemSummaryLifecycleStateDeleted, -} - -// GetFileSystemSummaryLifecycleStateEnumValues Enumerates the set of values for FileSystemSummaryLifecycleState -func GetFileSystemSummaryLifecycleStateEnumValues() []FileSystemSummaryLifecycleStateEnum { - values := make([]FileSystemSummaryLifecycleStateEnum, 0) - for _, v := range mappingFileSystemSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/filestorage_client.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/filestorage_client.go deleted file mode 100644 index 4439b13e5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/filestorage_client.go +++ /dev/null @@ -1,934 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -//FileStorageClient a client for FileStorage -type FileStorageClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewFileStorageClientWithConfigurationProvider Creates a new default FileStorage client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewFileStorageClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client FileStorageClient, err error) { - baseClient, err := common.NewClientWithConfig(configProvider) - if err != nil { - return - } - - client = FileStorageClient{BaseClient: baseClient} - client.BasePath = "20171215" - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *FileStorageClient) SetRegion(region string) { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "filestorage", region) -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *FileStorageClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { - if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { - return err - } - - // Error has been checked already - region, _ := configProvider.Region() - client.SetRegion(region) - client.config = &configProvider - return nil -} - -// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set -func (client *FileStorageClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// CreateExport Creates a new export in the specified export set, path, and -// file system. -func (client FileStorageClient) CreateExport(ctx context.Context, request CreateExportRequest) (response CreateExportResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createExport, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateExportResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateExportResponse") - } - return -} - -// createExport implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createExport(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/exports") - if err != nil { - return nil, err - } - - var response CreateExportResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateFileSystem Creates a new file system in the specified compartment and -// availability domain. Instances can mount file systems in -// another availability domain, but doing so might increase -// latency when compared to mounting instances in the same -// availability domain. -// After you create a file system, you can associate it with a mount -// target. Instances can then mount the file system by connecting to the -// mount target's IP address. You can associate a file system with -// more than one mount target at a time. -// For information about access control and compartments, see -// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). -// For information about availability domains, see Regions and -// Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). -// To get a list of availability domains, use the -// `ListAvailabilityDomains` operation in the Identity and Access -// Management Service API. -// All Oracle Cloud Infrastructure resources, including -// file systems, get an Oracle-assigned, unique ID called an Oracle -// Cloud Identifier (OCID). When you create a resource, you can -// find its OCID in the response. You can also retrieve a -// resource's OCID by using a List API operation on that resource -// type or by viewing the resource in the Console. -func (client FileStorageClient) CreateFileSystem(ctx context.Context, request CreateFileSystemRequest) (response CreateFileSystemResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createFileSystem, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateFileSystemResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateFileSystemResponse") - } - return -} - -// createFileSystem implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createFileSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems") - if err != nil { - return nil, err - } - - var response CreateFileSystemResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateMountTarget Creates a new mount target in the specified compartment and -// subnet. You can associate a file system with a mount -// target only when they exist in the same availability domain. Instances -// can connect to mount targets in another availablity domain, but -// you might see higher latency than with instances in the same -// availability domain as the mount target. -// Mount targets have one or more private IP addresses that you can -// provide as the host portion of remote target parameters in -// client mount commands. These private IP addresses are listed -// in the privateIpIds property of the mount target and are highly available. Mount -// targets also consume additional IP addresses in their subnet. -// Do not use /30 or smaller subnets for mount target creation because they -// do not have sufficient available IP addresses. -// Allow at least three IP addresses for each mount target. -// For information about access control and compartments, see -// Overview of the IAM -// Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). -// For information about availability domains, see Regions and -// Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). -// To get a list of availability domains, use the -// `ListAvailabilityDomains` operation in the Identity and Access -// Management Service API. -// All Oracle Cloud Infrastructure Services resources, including -// mount targets, get an Oracle-assigned, unique ID called an -// Oracle Cloud Identifier (OCID). When you create a resource, -// you can find its OCID in the response. You can also retrieve a -// resource's OCID by using a List API operation on that resource -// type, or by viewing the resource in the Console. -func (client FileStorageClient) CreateMountTarget(ctx context.Context, request CreateMountTargetRequest) (response CreateMountTargetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createMountTarget, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateMountTargetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMountTargetResponse") - } - return -} - -// createMountTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createMountTarget(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets") - if err != nil { - return nil, err - } - - var response CreateMountTargetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateSnapshot Creates a new snapshot of the specified file system. You -// can access the snapshot at `.snapshot/`. -func (client FileStorageClient) CreateSnapshot(ctx context.Context, request CreateSnapshotRequest) (response CreateSnapshotResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createSnapshot, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateSnapshotResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateSnapshotResponse") - } - return -} - -// createSnapshot implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createSnapshot(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/snapshots") - if err != nil { - return nil, err - } - - var response CreateSnapshotResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteExport Deletes the specified export. -func (client FileStorageClient) DeleteExport(ctx context.Context, request DeleteExportRequest) (response DeleteExportResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteExport, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteExportResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteExportResponse") - } - return -} - -// deleteExport implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteExport(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/exports/{exportId}") - if err != nil { - return nil, err - } - - var response DeleteExportResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteFileSystem Deletes the specified file system. Before you delete the file system, -// verify that no remaining export resources still reference it. Deleting a -// file system also deletes all of its snapshots. -func (client FileStorageClient) DeleteFileSystem(ctx context.Context, request DeleteFileSystemRequest) (response DeleteFileSystemResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteFileSystem, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteFileSystemResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteFileSystemResponse") - } - return -} - -// deleteFileSystem implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteFileSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fileSystems/{fileSystemId}") - if err != nil { - return nil, err - } - - var response DeleteFileSystemResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteMountTarget Deletes the specified mount target. This operation also deletes the -// mount target's VNICs. -func (client FileStorageClient) DeleteMountTarget(ctx context.Context, request DeleteMountTargetRequest) (response DeleteMountTargetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteMountTarget, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteMountTargetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMountTargetResponse") - } - return -} - -// deleteMountTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteMountTarget(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/mountTargets/{mountTargetId}") - if err != nil { - return nil, err - } - - var response DeleteMountTargetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteSnapshot Deletes the specified snapshot. -func (client FileStorageClient) DeleteSnapshot(ctx context.Context, request DeleteSnapshotRequest) (response DeleteSnapshotResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteSnapshot, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteSnapshotResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteSnapshotResponse") - } - return -} - -// deleteSnapshot implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteSnapshot(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/snapshots/{snapshotId}") - if err != nil { - return nil, err - } - - var response DeleteSnapshotResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetExport Gets the specified export's information. -func (client FileStorageClient) GetExport(ctx context.Context, request GetExportRequest) (response GetExportResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getExport, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetExportResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetExportResponse") - } - return -} - -// getExport implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getExport(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exports/{exportId}") - if err != nil { - return nil, err - } - - var response GetExportResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetExportSet Gets the specified export set's information. -func (client FileStorageClient) GetExportSet(ctx context.Context, request GetExportSetRequest) (response GetExportSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getExportSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetExportSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetExportSetResponse") - } - return -} - -// getExportSet implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getExportSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exportSets/{exportSetId}") - if err != nil { - return nil, err - } - - var response GetExportSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetFileSystem Gets the specified file system's information. -func (client FileStorageClient) GetFileSystem(ctx context.Context, request GetFileSystemRequest) (response GetFileSystemResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getFileSystem, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetFileSystemResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetFileSystemResponse") - } - return -} - -// getFileSystem implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getFileSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/fileSystems/{fileSystemId}") - if err != nil { - return nil, err - } - - var response GetFileSystemResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetMountTarget Gets the specified mount target's information. -func (client FileStorageClient) GetMountTarget(ctx context.Context, request GetMountTargetRequest) (response GetMountTargetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getMountTarget, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetMountTargetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMountTargetResponse") - } - return -} - -// getMountTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getMountTarget(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/mountTargets/{mountTargetId}") - if err != nil { - return nil, err - } - - var response GetMountTargetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetSnapshot Gets the specified snapshot's information. -func (client FileStorageClient) GetSnapshot(ctx context.Context, request GetSnapshotRequest) (response GetSnapshotResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getSnapshot, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetSnapshotResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetSnapshotResponse") - } - return -} - -// getSnapshot implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getSnapshot(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/snapshots/{snapshotId}") - if err != nil { - return nil, err - } - - var response GetSnapshotResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListExportSets Lists the export set resources in the specified compartment. -func (client FileStorageClient) ListExportSets(ctx context.Context, request ListExportSetsRequest) (response ListExportSetsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listExportSets, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListExportSetsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListExportSetsResponse") - } - return -} - -// listExportSets implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listExportSets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exportSets") - if err != nil { - return nil, err - } - - var response ListExportSetsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListExports Lists export resources by compartment, file system, or export -// set. You must specify an export set ID, a file system ID, and -// / or a compartment ID. -func (client FileStorageClient) ListExports(ctx context.Context, request ListExportsRequest) (response ListExportsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listExports, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListExportsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListExportsResponse") - } - return -} - -// listExports implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listExports(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exports") - if err != nil { - return nil, err - } - - var response ListExportsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListFileSystems Lists the file system resources in the specified compartment. -func (client FileStorageClient) ListFileSystems(ctx context.Context, request ListFileSystemsRequest) (response ListFileSystemsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listFileSystems, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListFileSystemsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListFileSystemsResponse") - } - return -} - -// listFileSystems implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listFileSystems(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/fileSystems") - if err != nil { - return nil, err - } - - var response ListFileSystemsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListMountTargets Lists the mount target resources in the specified compartment. -func (client FileStorageClient) ListMountTargets(ctx context.Context, request ListMountTargetsRequest) (response ListMountTargetsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listMountTargets, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListMountTargetsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMountTargetsResponse") - } - return -} - -// listMountTargets implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listMountTargets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/mountTargets") - if err != nil { - return nil, err - } - - var response ListMountTargetsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListSnapshots Lists snapshots of the specified file system. -func (client FileStorageClient) ListSnapshots(ctx context.Context, request ListSnapshotsRequest) (response ListSnapshotsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listSnapshots, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListSnapshotsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSnapshotsResponse") - } - return -} - -// listSnapshots implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listSnapshots(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/snapshots") - if err != nil { - return nil, err - } - - var response ListSnapshotsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateExportSet Updates the specified export set's information. -func (client FileStorageClient) UpdateExportSet(ctx context.Context, request UpdateExportSetRequest) (response UpdateExportSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateExportSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateExportSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateExportSetResponse") - } - return -} - -// updateExportSet implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) updateExportSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/exportSets/{exportSetId}") - if err != nil { - return nil, err - } - - var response UpdateExportSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateFileSystem Updates the specified file system's information. -// You can use this operation to rename a file system. -func (client FileStorageClient) UpdateFileSystem(ctx context.Context, request UpdateFileSystemRequest) (response UpdateFileSystemResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateFileSystem, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateFileSystemResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateFileSystemResponse") - } - return -} - -// updateFileSystem implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) updateFileSystem(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/fileSystems/{fileSystemId}") - if err != nil { - return nil, err - } - - var response UpdateFileSystemResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateMountTarget Updates the specified mount target's information. -func (client FileStorageClient) UpdateMountTarget(ctx context.Context, request UpdateMountTargetRequest) (response UpdateMountTargetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateMountTarget, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateMountTargetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateMountTargetResponse") - } - return -} - -// updateMountTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) updateMountTarget(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/mountTargets/{mountTargetId}") - if err != nil { - return nil, err - } - - var response UpdateMountTargetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_request_response.go deleted file mode 100644 index f5facbfd0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetExportRequest wrapper for the GetExport operation -type GetExportRequest struct { - - // The OCID of the export. - ExportId *string `mandatory:"true" contributesTo:"path" name:"exportId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetExportRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetExportRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetExportRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetExportResponse wrapper for the GetExport operation -type GetExportResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Export instance - Export `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetExportResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetExportResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_set_request_response.go deleted file mode 100644 index 38d4b73b0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_export_set_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetExportSetRequest wrapper for the GetExportSet operation -type GetExportSetRequest struct { - - // The OCID of the export set. - ExportSetId *string `mandatory:"true" contributesTo:"path" name:"exportSetId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetExportSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetExportSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetExportSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetExportSetResponse wrapper for the GetExportSet operation -type GetExportSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The ExportSet instance - ExportSet `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetExportSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetExportSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_file_system_request_response.go deleted file mode 100644 index 2c0007c34..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_file_system_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetFileSystemRequest wrapper for the GetFileSystem operation -type GetFileSystemRequest struct { - - // The OCID of the file system. - FileSystemId *string `mandatory:"true" contributesTo:"path" name:"fileSystemId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetFileSystemRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetFileSystemRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetFileSystemRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetFileSystemResponse wrapper for the GetFileSystem operation -type GetFileSystemResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The FileSystem instance - FileSystem `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetFileSystemResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetFileSystemResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_mount_target_request_response.go deleted file mode 100644 index 5ad050f3b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_mount_target_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetMountTargetRequest wrapper for the GetMountTarget operation -type GetMountTargetRequest struct { - - // The OCID of the mount target. - MountTargetId *string `mandatory:"true" contributesTo:"path" name:"mountTargetId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetMountTargetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetMountTargetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetMountTargetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetMountTargetResponse wrapper for the GetMountTarget operation -type GetMountTargetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The MountTarget instance - MountTarget `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetMountTargetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetMountTargetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_snapshot_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/get_snapshot_request_response.go deleted file mode 100644 index 87c4d5cbc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/get_snapshot_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetSnapshotRequest wrapper for the GetSnapshot operation -type GetSnapshotRequest struct { - - // The OCID of the snapshot. - SnapshotId *string `mandatory:"true" contributesTo:"path" name:"snapshotId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetSnapshotRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetSnapshotRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetSnapshotRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetSnapshotResponse wrapper for the GetSnapshot operation -type GetSnapshotResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Snapshot instance - Snapshot `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetSnapshotResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetSnapshotResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_export_sets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_export_sets_request_response.go deleted file mode 100644 index c95801ca3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_export_sets_request_response.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListExportSetsRequest wrapper for the ListExportSets operation -type ListExportSetsRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The name of the availability domain. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Example: `My resource` - DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - - // Filter results by the specified lifecycle state. Must be a valid - // state for the resource type. - LifecycleState ListExportSetsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` - - // Filter results by OCID. Must be an OCID of the correct type for - // the resouce type. - Id *string `mandatory:"false" contributesTo:"query" name:"id"` - - // The field to sort by. You can provide either value, but not both. - // By default, when you sort by time created, results are shown - // in descending order. When you sort by display name, results are - // shown in ascending order. - SortBy ListExportSetsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The sort order to use, either 'asc' or 'desc', where 'asc' is - // ascending and 'desc' is descending. - SortOrder ListExportSetsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListExportSetsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListExportSetsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListExportSetsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListExportSetsResponse wrapper for the ListExportSets operation -type ListExportSetsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []ExportSetSummary instances - Items []ExportSetSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through - // a list, if this header appears in the response, then a - // partial list might have been returned. Include this - // value as the `page` parameter for the subsequent GET - // request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListExportSetsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListExportSetsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListExportSetsLifecycleStateEnum Enum with underlying type: string -type ListExportSetsLifecycleStateEnum string - -// Set of constants representing the allowable values for ListExportSetsLifecycleState -const ( - ListExportSetsLifecycleStateCreating ListExportSetsLifecycleStateEnum = "CREATING" - ListExportSetsLifecycleStateActive ListExportSetsLifecycleStateEnum = "ACTIVE" - ListExportSetsLifecycleStateDeleting ListExportSetsLifecycleStateEnum = "DELETING" - ListExportSetsLifecycleStateDeleted ListExportSetsLifecycleStateEnum = "DELETED" - ListExportSetsLifecycleStateFailed ListExportSetsLifecycleStateEnum = "FAILED" -) - -var mappingListExportSetsLifecycleState = map[string]ListExportSetsLifecycleStateEnum{ - "CREATING": ListExportSetsLifecycleStateCreating, - "ACTIVE": ListExportSetsLifecycleStateActive, - "DELETING": ListExportSetsLifecycleStateDeleting, - "DELETED": ListExportSetsLifecycleStateDeleted, - "FAILED": ListExportSetsLifecycleStateFailed, -} - -// GetListExportSetsLifecycleStateEnumValues Enumerates the set of values for ListExportSetsLifecycleState -func GetListExportSetsLifecycleStateEnumValues() []ListExportSetsLifecycleStateEnum { - values := make([]ListExportSetsLifecycleStateEnum, 0) - for _, v := range mappingListExportSetsLifecycleState { - values = append(values, v) - } - return values -} - -// ListExportSetsSortByEnum Enum with underlying type: string -type ListExportSetsSortByEnum string - -// Set of constants representing the allowable values for ListExportSetsSortBy -const ( - ListExportSetsSortByTimecreated ListExportSetsSortByEnum = "TIMECREATED" - ListExportSetsSortByDisplayname ListExportSetsSortByEnum = "DISPLAYNAME" -) - -var mappingListExportSetsSortBy = map[string]ListExportSetsSortByEnum{ - "TIMECREATED": ListExportSetsSortByTimecreated, - "DISPLAYNAME": ListExportSetsSortByDisplayname, -} - -// GetListExportSetsSortByEnumValues Enumerates the set of values for ListExportSetsSortBy -func GetListExportSetsSortByEnumValues() []ListExportSetsSortByEnum { - values := make([]ListExportSetsSortByEnum, 0) - for _, v := range mappingListExportSetsSortBy { - values = append(values, v) - } - return values -} - -// ListExportSetsSortOrderEnum Enum with underlying type: string -type ListExportSetsSortOrderEnum string - -// Set of constants representing the allowable values for ListExportSetsSortOrder -const ( - ListExportSetsSortOrderAsc ListExportSetsSortOrderEnum = "ASC" - ListExportSetsSortOrderDesc ListExportSetsSortOrderEnum = "DESC" -) - -var mappingListExportSetsSortOrder = map[string]ListExportSetsSortOrderEnum{ - "ASC": ListExportSetsSortOrderAsc, - "DESC": ListExportSetsSortOrderDesc, -} - -// GetListExportSetsSortOrderEnumValues Enumerates the set of values for ListExportSetsSortOrder -func GetListExportSetsSortOrderEnumValues() []ListExportSetsSortOrderEnum { - values := make([]ListExportSetsSortOrderEnum, 0) - for _, v := range mappingListExportSetsSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_exports_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_exports_request_response.go deleted file mode 100644 index 681e3c23a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_exports_request_response.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListExportsRequest wrapper for the ListExports operation -type ListExportsRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The OCID of the export set. - ExportSetId *string `mandatory:"false" contributesTo:"query" name:"exportSetId"` - - // The OCID of the file system. - FileSystemId *string `mandatory:"false" contributesTo:"query" name:"fileSystemId"` - - // Filter results by the specified lifecycle state. Must be a valid - // state for the resource type. - LifecycleState ListExportsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` - - // Filter results by OCID. Must be an OCID of the correct type for - // the resouce type. - Id *string `mandatory:"false" contributesTo:"query" name:"id"` - - // The field to sort by. You can provide either value, but not both. - // By default, when you sort by time created, results are shown - // in descending order. When you sort by path, results are - // shown in ascending alphanumeric order. - SortBy ListExportsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The sort order to use, either 'asc' or 'desc', where 'asc' is - // ascending and 'desc' is descending. - SortOrder ListExportsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListExportsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListExportsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListExportsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListExportsResponse wrapper for the ListExports operation -type ListExportsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []ExportSummary instances - Items []ExportSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through - // a list, if this header appears in the response, then a - // partial list might have been returned. Include this - // value as the `page` parameter for the subsequent GET - // request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListExportsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListExportsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListExportsLifecycleStateEnum Enum with underlying type: string -type ListExportsLifecycleStateEnum string - -// Set of constants representing the allowable values for ListExportsLifecycleState -const ( - ListExportsLifecycleStateCreating ListExportsLifecycleStateEnum = "CREATING" - ListExportsLifecycleStateActive ListExportsLifecycleStateEnum = "ACTIVE" - ListExportsLifecycleStateDeleting ListExportsLifecycleStateEnum = "DELETING" - ListExportsLifecycleStateDeleted ListExportsLifecycleStateEnum = "DELETED" - ListExportsLifecycleStateFailed ListExportsLifecycleStateEnum = "FAILED" -) - -var mappingListExportsLifecycleState = map[string]ListExportsLifecycleStateEnum{ - "CREATING": ListExportsLifecycleStateCreating, - "ACTIVE": ListExportsLifecycleStateActive, - "DELETING": ListExportsLifecycleStateDeleting, - "DELETED": ListExportsLifecycleStateDeleted, - "FAILED": ListExportsLifecycleStateFailed, -} - -// GetListExportsLifecycleStateEnumValues Enumerates the set of values for ListExportsLifecycleState -func GetListExportsLifecycleStateEnumValues() []ListExportsLifecycleStateEnum { - values := make([]ListExportsLifecycleStateEnum, 0) - for _, v := range mappingListExportsLifecycleState { - values = append(values, v) - } - return values -} - -// ListExportsSortByEnum Enum with underlying type: string -type ListExportsSortByEnum string - -// Set of constants representing the allowable values for ListExportsSortBy -const ( - ListExportsSortByTimecreated ListExportsSortByEnum = "TIMECREATED" - ListExportsSortByPath ListExportsSortByEnum = "PATH" -) - -var mappingListExportsSortBy = map[string]ListExportsSortByEnum{ - "TIMECREATED": ListExportsSortByTimecreated, - "PATH": ListExportsSortByPath, -} - -// GetListExportsSortByEnumValues Enumerates the set of values for ListExportsSortBy -func GetListExportsSortByEnumValues() []ListExportsSortByEnum { - values := make([]ListExportsSortByEnum, 0) - for _, v := range mappingListExportsSortBy { - values = append(values, v) - } - return values -} - -// ListExportsSortOrderEnum Enum with underlying type: string -type ListExportsSortOrderEnum string - -// Set of constants representing the allowable values for ListExportsSortOrder -const ( - ListExportsSortOrderAsc ListExportsSortOrderEnum = "ASC" - ListExportsSortOrderDesc ListExportsSortOrderEnum = "DESC" -) - -var mappingListExportsSortOrder = map[string]ListExportsSortOrderEnum{ - "ASC": ListExportsSortOrderAsc, - "DESC": ListExportsSortOrderDesc, -} - -// GetListExportsSortOrderEnumValues Enumerates the set of values for ListExportsSortOrder -func GetListExportsSortOrderEnumValues() []ListExportsSortOrderEnum { - values := make([]ListExportsSortOrderEnum, 0) - for _, v := range mappingListExportsSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_file_systems_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_file_systems_request_response.go deleted file mode 100644 index 058e91c02..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_file_systems_request_response.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListFileSystemsRequest wrapper for the ListFileSystems operation -type ListFileSystemsRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The name of the availability domain. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Example: `My resource` - DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - - // Filter results by the specified lifecycle state. Must be a valid - // state for the resource type. - LifecycleState ListFileSystemsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` - - // Filter results by OCID. Must be an OCID of the correct type for - // the resouce type. - Id *string `mandatory:"false" contributesTo:"query" name:"id"` - - // The field to sort by. You can provide either value, but not both. - // By default, when you sort by time created, results are shown - // in descending order. When you sort by display name, results are - // shown in ascending order. - SortBy ListFileSystemsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The sort order to use, either 'asc' or 'desc', where 'asc' is - // ascending and 'desc' is descending. - SortOrder ListFileSystemsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListFileSystemsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListFileSystemsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListFileSystemsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListFileSystemsResponse wrapper for the ListFileSystems operation -type ListFileSystemsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []FileSystemSummary instances - Items []FileSystemSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through - // a list, if this header appears in the response, then a - // partial list might have been returned. Include this - // value as the `page` parameter for the subsequent GET - // request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListFileSystemsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListFileSystemsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListFileSystemsLifecycleStateEnum Enum with underlying type: string -type ListFileSystemsLifecycleStateEnum string - -// Set of constants representing the allowable values for ListFileSystemsLifecycleState -const ( - ListFileSystemsLifecycleStateCreating ListFileSystemsLifecycleStateEnum = "CREATING" - ListFileSystemsLifecycleStateActive ListFileSystemsLifecycleStateEnum = "ACTIVE" - ListFileSystemsLifecycleStateDeleting ListFileSystemsLifecycleStateEnum = "DELETING" - ListFileSystemsLifecycleStateDeleted ListFileSystemsLifecycleStateEnum = "DELETED" - ListFileSystemsLifecycleStateFailed ListFileSystemsLifecycleStateEnum = "FAILED" -) - -var mappingListFileSystemsLifecycleState = map[string]ListFileSystemsLifecycleStateEnum{ - "CREATING": ListFileSystemsLifecycleStateCreating, - "ACTIVE": ListFileSystemsLifecycleStateActive, - "DELETING": ListFileSystemsLifecycleStateDeleting, - "DELETED": ListFileSystemsLifecycleStateDeleted, - "FAILED": ListFileSystemsLifecycleStateFailed, -} - -// GetListFileSystemsLifecycleStateEnumValues Enumerates the set of values for ListFileSystemsLifecycleState -func GetListFileSystemsLifecycleStateEnumValues() []ListFileSystemsLifecycleStateEnum { - values := make([]ListFileSystemsLifecycleStateEnum, 0) - for _, v := range mappingListFileSystemsLifecycleState { - values = append(values, v) - } - return values -} - -// ListFileSystemsSortByEnum Enum with underlying type: string -type ListFileSystemsSortByEnum string - -// Set of constants representing the allowable values for ListFileSystemsSortBy -const ( - ListFileSystemsSortByTimecreated ListFileSystemsSortByEnum = "TIMECREATED" - ListFileSystemsSortByDisplayname ListFileSystemsSortByEnum = "DISPLAYNAME" -) - -var mappingListFileSystemsSortBy = map[string]ListFileSystemsSortByEnum{ - "TIMECREATED": ListFileSystemsSortByTimecreated, - "DISPLAYNAME": ListFileSystemsSortByDisplayname, -} - -// GetListFileSystemsSortByEnumValues Enumerates the set of values for ListFileSystemsSortBy -func GetListFileSystemsSortByEnumValues() []ListFileSystemsSortByEnum { - values := make([]ListFileSystemsSortByEnum, 0) - for _, v := range mappingListFileSystemsSortBy { - values = append(values, v) - } - return values -} - -// ListFileSystemsSortOrderEnum Enum with underlying type: string -type ListFileSystemsSortOrderEnum string - -// Set of constants representing the allowable values for ListFileSystemsSortOrder -const ( - ListFileSystemsSortOrderAsc ListFileSystemsSortOrderEnum = "ASC" - ListFileSystemsSortOrderDesc ListFileSystemsSortOrderEnum = "DESC" -) - -var mappingListFileSystemsSortOrder = map[string]ListFileSystemsSortOrderEnum{ - "ASC": ListFileSystemsSortOrderAsc, - "DESC": ListFileSystemsSortOrderDesc, -} - -// GetListFileSystemsSortOrderEnumValues Enumerates the set of values for ListFileSystemsSortOrder -func GetListFileSystemsSortOrderEnumValues() []ListFileSystemsSortOrderEnum { - values := make([]ListFileSystemsSortOrderEnum, 0) - for _, v := range mappingListFileSystemsSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_mount_targets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_mount_targets_request_response.go deleted file mode 100644 index b92471345..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_mount_targets_request_response.go +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListMountTargetsRequest wrapper for the ListMountTargets operation -type ListMountTargetsRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The name of the availability domain. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Example: `My resource` - DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - - // The OCID of the export set. - ExportSetId *string `mandatory:"false" contributesTo:"query" name:"exportSetId"` - - // Filter results by the specified lifecycle state. Must be a valid - // state for the resource type. - LifecycleState ListMountTargetsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` - - // Filter results by OCID. Must be an OCID of the correct type for - // the resouce type. - Id *string `mandatory:"false" contributesTo:"query" name:"id"` - - // The field to sort by. You can choose either value, but not both. - // By default, when you sort by time created, results are shown - // in descending order. When you sort by display name, results are - // shown in ascending order. - SortBy ListMountTargetsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The sort order to use, either 'asc' or 'desc', where 'asc' is - // ascending and 'desc' is descending. - SortOrder ListMountTargetsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListMountTargetsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListMountTargetsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListMountTargetsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListMountTargetsResponse wrapper for the ListMountTargets operation -type ListMountTargetsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []MountTargetSummary instances - Items []MountTargetSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through - // a list, if this header appears in the response, then a - // partial list might have been returned. Include this - // value as the `page` parameter for the subsequent GET - // request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListMountTargetsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListMountTargetsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListMountTargetsLifecycleStateEnum Enum with underlying type: string -type ListMountTargetsLifecycleStateEnum string - -// Set of constants representing the allowable values for ListMountTargetsLifecycleState -const ( - ListMountTargetsLifecycleStateCreating ListMountTargetsLifecycleStateEnum = "CREATING" - ListMountTargetsLifecycleStateActive ListMountTargetsLifecycleStateEnum = "ACTIVE" - ListMountTargetsLifecycleStateDeleting ListMountTargetsLifecycleStateEnum = "DELETING" - ListMountTargetsLifecycleStateDeleted ListMountTargetsLifecycleStateEnum = "DELETED" - ListMountTargetsLifecycleStateFailed ListMountTargetsLifecycleStateEnum = "FAILED" -) - -var mappingListMountTargetsLifecycleState = map[string]ListMountTargetsLifecycleStateEnum{ - "CREATING": ListMountTargetsLifecycleStateCreating, - "ACTIVE": ListMountTargetsLifecycleStateActive, - "DELETING": ListMountTargetsLifecycleStateDeleting, - "DELETED": ListMountTargetsLifecycleStateDeleted, - "FAILED": ListMountTargetsLifecycleStateFailed, -} - -// GetListMountTargetsLifecycleStateEnumValues Enumerates the set of values for ListMountTargetsLifecycleState -func GetListMountTargetsLifecycleStateEnumValues() []ListMountTargetsLifecycleStateEnum { - values := make([]ListMountTargetsLifecycleStateEnum, 0) - for _, v := range mappingListMountTargetsLifecycleState { - values = append(values, v) - } - return values -} - -// ListMountTargetsSortByEnum Enum with underlying type: string -type ListMountTargetsSortByEnum string - -// Set of constants representing the allowable values for ListMountTargetsSortBy -const ( - ListMountTargetsSortByTimecreated ListMountTargetsSortByEnum = "TIMECREATED" - ListMountTargetsSortByDisplayname ListMountTargetsSortByEnum = "DISPLAYNAME" -) - -var mappingListMountTargetsSortBy = map[string]ListMountTargetsSortByEnum{ - "TIMECREATED": ListMountTargetsSortByTimecreated, - "DISPLAYNAME": ListMountTargetsSortByDisplayname, -} - -// GetListMountTargetsSortByEnumValues Enumerates the set of values for ListMountTargetsSortBy -func GetListMountTargetsSortByEnumValues() []ListMountTargetsSortByEnum { - values := make([]ListMountTargetsSortByEnum, 0) - for _, v := range mappingListMountTargetsSortBy { - values = append(values, v) - } - return values -} - -// ListMountTargetsSortOrderEnum Enum with underlying type: string -type ListMountTargetsSortOrderEnum string - -// Set of constants representing the allowable values for ListMountTargetsSortOrder -const ( - ListMountTargetsSortOrderAsc ListMountTargetsSortOrderEnum = "ASC" - ListMountTargetsSortOrderDesc ListMountTargetsSortOrderEnum = "DESC" -) - -var mappingListMountTargetsSortOrder = map[string]ListMountTargetsSortOrderEnum{ - "ASC": ListMountTargetsSortOrderAsc, - "DESC": ListMountTargetsSortOrderDesc, -} - -// GetListMountTargetsSortOrderEnumValues Enumerates the set of values for ListMountTargetsSortOrder -func GetListMountTargetsSortOrderEnumValues() []ListMountTargetsSortOrderEnum { - values := make([]ListMountTargetsSortOrderEnum, 0) - for _, v := range mappingListMountTargetsSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_snapshots_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/list_snapshots_request_response.go deleted file mode 100644 index a7458495d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/list_snapshots_request_response.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListSnapshotsRequest wrapper for the ListSnapshots operation -type ListSnapshotsRequest struct { - - // The OCID of the file system. - FileSystemId *string `mandatory:"true" contributesTo:"query" name:"fileSystemId"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Filter results by the specified lifecycle state. Must be a valid - // state for the resource type. - LifecycleState ListSnapshotsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` - - // Filter results by OCID. Must be an OCID of the correct type for - // the resouce type. - Id *string `mandatory:"false" contributesTo:"query" name:"id"` - - // The sort order to use, either 'asc' or 'desc', where 'asc' is - // ascending and 'desc' is descending. - SortOrder ListSnapshotsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListSnapshotsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListSnapshotsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListSnapshotsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListSnapshotsResponse wrapper for the ListSnapshots operation -type ListSnapshotsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []SnapshotSummary instances - Items []SnapshotSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through - // a list, if this header appears in the response, then a - // partial list might have been returned. Include this - // value as the `page` parameter for the subsequent GET - // request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListSnapshotsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListSnapshotsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListSnapshotsLifecycleStateEnum Enum with underlying type: string -type ListSnapshotsLifecycleStateEnum string - -// Set of constants representing the allowable values for ListSnapshotsLifecycleState -const ( - ListSnapshotsLifecycleStateCreating ListSnapshotsLifecycleStateEnum = "CREATING" - ListSnapshotsLifecycleStateActive ListSnapshotsLifecycleStateEnum = "ACTIVE" - ListSnapshotsLifecycleStateDeleting ListSnapshotsLifecycleStateEnum = "DELETING" - ListSnapshotsLifecycleStateDeleted ListSnapshotsLifecycleStateEnum = "DELETED" - ListSnapshotsLifecycleStateFailed ListSnapshotsLifecycleStateEnum = "FAILED" -) - -var mappingListSnapshotsLifecycleState = map[string]ListSnapshotsLifecycleStateEnum{ - "CREATING": ListSnapshotsLifecycleStateCreating, - "ACTIVE": ListSnapshotsLifecycleStateActive, - "DELETING": ListSnapshotsLifecycleStateDeleting, - "DELETED": ListSnapshotsLifecycleStateDeleted, - "FAILED": ListSnapshotsLifecycleStateFailed, -} - -// GetListSnapshotsLifecycleStateEnumValues Enumerates the set of values for ListSnapshotsLifecycleState -func GetListSnapshotsLifecycleStateEnumValues() []ListSnapshotsLifecycleStateEnum { - values := make([]ListSnapshotsLifecycleStateEnum, 0) - for _, v := range mappingListSnapshotsLifecycleState { - values = append(values, v) - } - return values -} - -// ListSnapshotsSortOrderEnum Enum with underlying type: string -type ListSnapshotsSortOrderEnum string - -// Set of constants representing the allowable values for ListSnapshotsSortOrder -const ( - ListSnapshotsSortOrderAsc ListSnapshotsSortOrderEnum = "ASC" - ListSnapshotsSortOrderDesc ListSnapshotsSortOrderEnum = "DESC" -) - -var mappingListSnapshotsSortOrder = map[string]ListSnapshotsSortOrderEnum{ - "ASC": ListSnapshotsSortOrderAsc, - "DESC": ListSnapshotsSortOrderDesc, -} - -// GetListSnapshotsSortOrderEnumValues Enumerates the set of values for ListSnapshotsSortOrder -func GetListSnapshotsSortOrderEnumValues() []ListSnapshotsSortOrderEnum { - values := make([]ListSnapshotsSortOrderEnum, 0) - for _, v := range mappingListSnapshotsSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target.go deleted file mode 100644 index 09868aef9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// MountTarget Provides access to a collection of file systems through one or more VNICs on a -// specified subnet. The set of file systems is controlled through the -// referenced export set. -type MountTarget struct { - - // The OCID of the compartment that contains the mount target. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My mount target` - DisplayName *string `mandatory:"true" json:"displayName"` - - // The OCID of the mount target. - Id *string `mandatory:"true" json:"id"` - - // Additional information about the current 'lifecycleState'. - LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` - - // The current state of the mount target. - LifecycleState MountTargetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The OCIDs of the private IP addresses associated with this mount target. - PrivateIpIds []string `mandatory:"true" json:"privateIpIds"` - - // The OCID of the subnet the mount target is in. - SubnetId *string `mandatory:"true" json:"subnetId"` - - // The date and time the mount target was created, expressed - // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The availability domain the mount target is in. May be unset - // as a blank or NULL value. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` - - // The OCID of the associated export set. Controls what file - // systems will be exported through Network File System (NFS) protocol on this - // mount target. - ExportSetId *string `mandatory:"false" json:"exportSetId"` -} - -func (m MountTarget) String() string { - return common.PointerString(m) -} - -// MountTargetLifecycleStateEnum Enum with underlying type: string -type MountTargetLifecycleStateEnum string - -// Set of constants representing the allowable values for MountTargetLifecycleState -const ( - MountTargetLifecycleStateCreating MountTargetLifecycleStateEnum = "CREATING" - MountTargetLifecycleStateActive MountTargetLifecycleStateEnum = "ACTIVE" - MountTargetLifecycleStateDeleting MountTargetLifecycleStateEnum = "DELETING" - MountTargetLifecycleStateDeleted MountTargetLifecycleStateEnum = "DELETED" - MountTargetLifecycleStateFailed MountTargetLifecycleStateEnum = "FAILED" -) - -var mappingMountTargetLifecycleState = map[string]MountTargetLifecycleStateEnum{ - "CREATING": MountTargetLifecycleStateCreating, - "ACTIVE": MountTargetLifecycleStateActive, - "DELETING": MountTargetLifecycleStateDeleting, - "DELETED": MountTargetLifecycleStateDeleted, - "FAILED": MountTargetLifecycleStateFailed, -} - -// GetMountTargetLifecycleStateEnumValues Enumerates the set of values for MountTargetLifecycleState -func GetMountTargetLifecycleStateEnumValues() []MountTargetLifecycleStateEnum { - values := make([]MountTargetLifecycleStateEnum, 0) - for _, v := range mappingMountTargetLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target_summary.go deleted file mode 100644 index b0b0e238c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/mount_target_summary.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// MountTargetSummary Summary information for the specified mount target. -type MountTargetSummary struct { - - // The OCID of the compartment that contains the mount target. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My mount target` - DisplayName *string `mandatory:"true" json:"displayName"` - - // The OCID of the mount target. - Id *string `mandatory:"true" json:"id"` - - // The current state of the mount target. - LifecycleState MountTargetSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The OCIDs of the private IP addresses associated with this mount target. - PrivateIpIds []string `mandatory:"true" json:"privateIpIds"` - - // The OCID of the subnet the mount target is in. - SubnetId *string `mandatory:"true" json:"subnetId"` - - // The date and time the mount target was created, expressed - // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The availability domain the mount target is in. May be unset - // as a blank or NULL value. - // Example: `Uocm:PHX-AD-1` - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` - - // The OCID of the associated export set. Controls what file - // systems will be exported using Network File System (NFS) protocol on - // this mount target. - ExportSetId *string `mandatory:"false" json:"exportSetId"` -} - -func (m MountTargetSummary) String() string { - return common.PointerString(m) -} - -// MountTargetSummaryLifecycleStateEnum Enum with underlying type: string -type MountTargetSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for MountTargetSummaryLifecycleState -const ( - MountTargetSummaryLifecycleStateCreating MountTargetSummaryLifecycleStateEnum = "CREATING" - MountTargetSummaryLifecycleStateActive MountTargetSummaryLifecycleStateEnum = "ACTIVE" - MountTargetSummaryLifecycleStateDeleting MountTargetSummaryLifecycleStateEnum = "DELETING" - MountTargetSummaryLifecycleStateDeleted MountTargetSummaryLifecycleStateEnum = "DELETED" - MountTargetSummaryLifecycleStateFailed MountTargetSummaryLifecycleStateEnum = "FAILED" -) - -var mappingMountTargetSummaryLifecycleState = map[string]MountTargetSummaryLifecycleStateEnum{ - "CREATING": MountTargetSummaryLifecycleStateCreating, - "ACTIVE": MountTargetSummaryLifecycleStateActive, - "DELETING": MountTargetSummaryLifecycleStateDeleting, - "DELETED": MountTargetSummaryLifecycleStateDeleted, - "FAILED": MountTargetSummaryLifecycleStateFailed, -} - -// GetMountTargetSummaryLifecycleStateEnumValues Enumerates the set of values for MountTargetSummaryLifecycleState -func GetMountTargetSummaryLifecycleStateEnumValues() []MountTargetSummaryLifecycleStateEnum { - values := make([]MountTargetSummaryLifecycleStateEnum, 0) - for _, v := range mappingMountTargetSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot.go deleted file mode 100644 index 715d97cdd..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Snapshot A point-in-time snapshot of a specified file system. -type Snapshot struct { - - // The OCID of the file system from which the snapshot - // was created. - FileSystemId *string `mandatory:"true" json:"fileSystemId"` - - // The OCID of the snapshot. - Id *string `mandatory:"true" json:"id"` - - // The current state of the snapshot. - LifecycleState SnapshotLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // Name of the snapshot. This value is immutable. - // Avoid entering confidential information. - // Example: `Sunday` - Name *string `mandatory:"true" json:"name"` - - // The date and time the snapshot was created, expressed - // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` -} - -func (m Snapshot) String() string { - return common.PointerString(m) -} - -// SnapshotLifecycleStateEnum Enum with underlying type: string -type SnapshotLifecycleStateEnum string - -// Set of constants representing the allowable values for SnapshotLifecycleState -const ( - SnapshotLifecycleStateCreating SnapshotLifecycleStateEnum = "CREATING" - SnapshotLifecycleStateActive SnapshotLifecycleStateEnum = "ACTIVE" - SnapshotLifecycleStateDeleting SnapshotLifecycleStateEnum = "DELETING" - SnapshotLifecycleStateDeleted SnapshotLifecycleStateEnum = "DELETED" -) - -var mappingSnapshotLifecycleState = map[string]SnapshotLifecycleStateEnum{ - "CREATING": SnapshotLifecycleStateCreating, - "ACTIVE": SnapshotLifecycleStateActive, - "DELETING": SnapshotLifecycleStateDeleting, - "DELETED": SnapshotLifecycleStateDeleted, -} - -// GetSnapshotLifecycleStateEnumValues Enumerates the set of values for SnapshotLifecycleState -func GetSnapshotLifecycleStateEnumValues() []SnapshotLifecycleStateEnum { - values := make([]SnapshotLifecycleStateEnum, 0) - for _, v := range mappingSnapshotLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot_summary.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot_summary.go deleted file mode 100644 index ccf8b719f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/snapshot_summary.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SnapshotSummary Summary information for a snapshot. -type SnapshotSummary struct { - - // The OCID of the file system from which the - // snapshot was created. - FileSystemId *string `mandatory:"true" json:"fileSystemId"` - - // The OCID of the snapshot. - Id *string `mandatory:"true" json:"id"` - - // The current state of the snapshot. - LifecycleState SnapshotSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // Name of the snapshot. This value is immutable. - // Avoid entering confidential information. - // Example: `Sunday` - Name *string `mandatory:"true" json:"name"` - - // The date and time the snapshot was created, expressed - // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` -} - -func (m SnapshotSummary) String() string { - return common.PointerString(m) -} - -// SnapshotSummaryLifecycleStateEnum Enum with underlying type: string -type SnapshotSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for SnapshotSummaryLifecycleState -const ( - SnapshotSummaryLifecycleStateCreating SnapshotSummaryLifecycleStateEnum = "CREATING" - SnapshotSummaryLifecycleStateActive SnapshotSummaryLifecycleStateEnum = "ACTIVE" - SnapshotSummaryLifecycleStateDeleting SnapshotSummaryLifecycleStateEnum = "DELETING" - SnapshotSummaryLifecycleStateDeleted SnapshotSummaryLifecycleStateEnum = "DELETED" -) - -var mappingSnapshotSummaryLifecycleState = map[string]SnapshotSummaryLifecycleStateEnum{ - "CREATING": SnapshotSummaryLifecycleStateCreating, - "ACTIVE": SnapshotSummaryLifecycleStateActive, - "DELETING": SnapshotSummaryLifecycleStateDeleting, - "DELETED": SnapshotSummaryLifecycleStateDeleted, -} - -// GetSnapshotSummaryLifecycleStateEnumValues Enumerates the set of values for SnapshotSummaryLifecycleState -func GetSnapshotSummaryLifecycleStateEnumValues() []SnapshotSummaryLifecycleStateEnum { - values := make([]SnapshotSummaryLifecycleStateEnum, 0) - for _, v := range mappingSnapshotSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_details.go deleted file mode 100644 index ceb3c7447..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_details.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateExportSetDetails The representation of UpdateExportSetDetails -type UpdateExportSetDetails struct { - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My export set` - DisplayName *string `mandatory:"false" json:"displayName"` - - // Controls the maximum `tbytes`, `fbytes`, and `abytes` - // values reported by `NFS FSSTAT` calls through any associated - // mount targets. This is an advanced feature. For most - // applications, use the default value. The - // `tbytes` value reported by `FSSTAT` will be - // `maxFsStatBytes`. The value of `fbytes` and `abytes` will be - // `maxFsStatBytes` minus the metered size of the file - // system. If the metered size is larger than `maxFsStatBytes`, - // then `fbytes` and `abytes` will both be '0'. - MaxFsStatBytes *int `mandatory:"false" json:"maxFsStatBytes"` - - // Controls the maximum `ffiles`, `ffiles`, and `afiles` - // values reported by `NFS FSSTAT` calls through any associated - // mount targets. This is an advanced feature. For most - // applications, use the default value. The - // `tfiles` value reported by `FSSTAT` will be - // `maxFsStatFiles`. The value of `ffiles` and `afiles` will be - // `maxFsStatFiles` minus the metered size of the file - // system. If the metered size is larger than `maxFsStatFiles`, - // then `ffiles` and `afiles` will both be '0'. - MaxFsStatFiles *int `mandatory:"false" json:"maxFsStatFiles"` -} - -func (m UpdateExportSetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_request_response.go deleted file mode 100644 index eada6e465..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_export_set_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateExportSetRequest wrapper for the UpdateExportSet operation -type UpdateExportSetRequest struct { - - // The OCID of the export set. - ExportSetId *string `mandatory:"true" contributesTo:"path" name:"exportSetId"` - - // Details object for updating an export set. - UpdateExportSetDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call - // for a resource, set the `if-match` parameter to the value of the - // etag from a previous GET or POST response for that resource. - // The resource will be updated or deleted only if the etag you - // provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateExportSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateExportSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateExportSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateExportSetResponse wrapper for the UpdateExportSet operation -type UpdateExportSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The ExportSet instance - ExportSet `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateExportSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateExportSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_details.go deleted file mode 100644 index 6237eecea..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_details.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateFileSystemDetails The representation of UpdateFileSystemDetails -type UpdateFileSystemDetails struct { - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My file system` - DisplayName *string `mandatory:"false" json:"displayName"` -} - -func (m UpdateFileSystemDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_request_response.go deleted file mode 100644 index e2408be34..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_file_system_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateFileSystemRequest wrapper for the UpdateFileSystem operation -type UpdateFileSystemRequest struct { - - // The OCID of the file system. - FileSystemId *string `mandatory:"true" contributesTo:"path" name:"fileSystemId"` - - // Details object for updating a file system. - UpdateFileSystemDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call - // for a resource, set the `if-match` parameter to the value of the - // etag from a previous GET or POST response for that resource. - // The resource will be updated or deleted only if the etag you - // provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateFileSystemRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateFileSystemRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateFileSystemRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateFileSystemResponse wrapper for the UpdateFileSystem operation -type UpdateFileSystemResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The FileSystem instance - FileSystem `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateFileSystemResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateFileSystemResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_details.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_details.go deleted file mode 100644 index 2639430fd..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_details.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// File Storage Service API -// -// The API for the File Storage Service. -// - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateMountTargetDetails The representation of UpdateMountTargetDetails -type UpdateMountTargetDetails struct { - - // A user-friendly name. Does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `My mount target` - DisplayName *string `mandatory:"false" json:"displayName"` -} - -func (m UpdateMountTargetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_request_response.go deleted file mode 100644 index 669d793ce..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/filestorage/update_mount_target_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package filestorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateMountTargetRequest wrapper for the UpdateMountTarget operation -type UpdateMountTargetRequest struct { - - // The OCID of the mount target. - MountTargetId *string `mandatory:"true" contributesTo:"path" name:"mountTargetId"` - - // Details object for updating a mount target. - UpdateMountTargetDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call - // for a resource, set the `if-match` parameter to the value of the - // etag from a previous GET or POST response for that resource. - // The resource will be updated or deleted only if the etag you - // provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateMountTargetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateMountTargetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateMountTargetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateMountTargetResponse wrapper for the UpdateMountTarget operation -type UpdateMountTargetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The MountTarget instance - MountTarget `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If - // you need to contact Oracle about a particular request, - // please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateMountTargetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateMountTargetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_details.go deleted file mode 100644 index 03b811f24..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_details.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// AddUserToGroupDetails The representation of AddUserToGroupDetails -type AddUserToGroupDetails struct { - - // The OCID of the user. - UserId *string `mandatory:"true" json:"userId"` - - // The OCID of the group. - GroupId *string `mandatory:"true" json:"groupId"` -} - -func (m AddUserToGroupDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go deleted file mode 100644 index f45f98bf6..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// AddUserToGroupRequest wrapper for the AddUserToGroup operation -type AddUserToGroupRequest struct { - - // Request object for adding a user to a group. - AddUserToGroupDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request AddUserToGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request AddUserToGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request AddUserToGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// AddUserToGroupResponse wrapper for the AddUserToGroup operation -type AddUserToGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The UserGroupMembership instance - UserGroupMembership `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response AddUserToGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response AddUserToGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/api_key.go b/vendor/github.com/oracle/oci-go-sdk/identity/api_key.go deleted file mode 100644 index d5b9eed1d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/api_key.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ApiKey A PEM-format RSA credential for securing requests to the Oracle Cloud Infrastructure REST API. Also known -// as an *API signing key*. Specifically, this is the public key from the key pair. The private key remains with -// the user calling the API. For information about generating a key pair -// in the required PEM format, see Required Keys and OCIDs (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm). -// **Important:** This is **not** the SSH key for accessing compute instances. -// Each user can have a maximum of three API signing keys. -// For more information about user credentials, see User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm). -type ApiKey struct { - - // An Oracle-assigned identifier for the key, in this format: - // TENANCY_OCID/USER_OCID/KEY_FINGERPRINT. - KeyId *string `mandatory:"false" json:"keyId"` - - // The key's value. - KeyValue *string `mandatory:"false" json:"keyValue"` - - // The key's fingerprint (e.g., 12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef). - Fingerprint *string `mandatory:"false" json:"fingerprint"` - - // The OCID of the user the key belongs to. - UserId *string `mandatory:"false" json:"userId"` - - // Date and time the `ApiKey` object was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // The API key's current state. After creating an `ApiKey` object, make sure its `lifecycleState` changes from - // CREATING to ACTIVE before using it. - LifecycleState ApiKeyLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m ApiKey) String() string { - return common.PointerString(m) -} - -// ApiKeyLifecycleStateEnum Enum with underlying type: string -type ApiKeyLifecycleStateEnum string - -// Set of constants representing the allowable values for ApiKeyLifecycleState -const ( - ApiKeyLifecycleStateCreating ApiKeyLifecycleStateEnum = "CREATING" - ApiKeyLifecycleStateActive ApiKeyLifecycleStateEnum = "ACTIVE" - ApiKeyLifecycleStateInactive ApiKeyLifecycleStateEnum = "INACTIVE" - ApiKeyLifecycleStateDeleting ApiKeyLifecycleStateEnum = "DELETING" - ApiKeyLifecycleStateDeleted ApiKeyLifecycleStateEnum = "DELETED" -) - -var mappingApiKeyLifecycleState = map[string]ApiKeyLifecycleStateEnum{ - "CREATING": ApiKeyLifecycleStateCreating, - "ACTIVE": ApiKeyLifecycleStateActive, - "INACTIVE": ApiKeyLifecycleStateInactive, - "DELETING": ApiKeyLifecycleStateDeleting, - "DELETED": ApiKeyLifecycleStateDeleted, -} - -// GetApiKeyLifecycleStateEnumValues Enumerates the set of values for ApiKeyLifecycleState -func GetApiKeyLifecycleStateEnumValues() []ApiKeyLifecycleStateEnum { - values := make([]ApiKeyLifecycleStateEnum, 0) - for _, v := range mappingApiKeyLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/auth_token.go b/vendor/github.com/oracle/oci-go-sdk/identity/auth_token.go deleted file mode 100644 index 25237aefa..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/auth_token.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// AuthToken An `AuthToken` is an Oracle-generated token string that you can use to authenticate with third-party APIs -// that do not support Oracle Cloud Infrastructure's signature-based authentication. For example, use an `AuthToken` -// to authenticate with a Swift client with the Object Storage Service. -// The auth token is associated with the user's Console login. Auth tokens never expire. A user can have up to two -// auth tokens at a time. -// **Note:** The token is always an Oracle-generated string; you can't change it to a string of your choice. -// For more information, see Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). -type AuthToken struct { - - // The auth token. The value is available only in the response for `CreateAuthToken`, and not - // for `ListAuthTokens` or `UpdateAuthToken`. - Token *string `mandatory:"false" json:"token"` - - // The OCID of the auth token. - Id *string `mandatory:"false" json:"id"` - - // The OCID of the user the auth token belongs to. - UserId *string `mandatory:"false" json:"userId"` - - // The description you assign to the auth token. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // Date and time the `AuthToken` object was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // Date and time when this auth token will expire, in the format defined by RFC3339. - // Null if it never expires. - // Example: `2016-08-25T21:10:29.600Z` - TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` - - // The token's current state. After creating an auth token, make sure its `lifecycleState` changes from - // CREATING to ACTIVE before using it. - LifecycleState AuthTokenLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m AuthToken) String() string { - return common.PointerString(m) -} - -// AuthTokenLifecycleStateEnum Enum with underlying type: string -type AuthTokenLifecycleStateEnum string - -// Set of constants representing the allowable values for AuthTokenLifecycleState -const ( - AuthTokenLifecycleStateCreating AuthTokenLifecycleStateEnum = "CREATING" - AuthTokenLifecycleStateActive AuthTokenLifecycleStateEnum = "ACTIVE" - AuthTokenLifecycleStateInactive AuthTokenLifecycleStateEnum = "INACTIVE" - AuthTokenLifecycleStateDeleting AuthTokenLifecycleStateEnum = "DELETING" - AuthTokenLifecycleStateDeleted AuthTokenLifecycleStateEnum = "DELETED" -) - -var mappingAuthTokenLifecycleState = map[string]AuthTokenLifecycleStateEnum{ - "CREATING": AuthTokenLifecycleStateCreating, - "ACTIVE": AuthTokenLifecycleStateActive, - "INACTIVE": AuthTokenLifecycleStateInactive, - "DELETING": AuthTokenLifecycleStateDeleting, - "DELETED": AuthTokenLifecycleStateDeleted, -} - -// GetAuthTokenLifecycleStateEnumValues Enumerates the set of values for AuthTokenLifecycleState -func GetAuthTokenLifecycleStateEnumValues() []AuthTokenLifecycleStateEnum { - values := make([]AuthTokenLifecycleStateEnum, 0) - for _, v := range mappingAuthTokenLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/availability_domain.go b/vendor/github.com/oracle/oci-go-sdk/identity/availability_domain.go deleted file mode 100644 index 7d5d03b95..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/availability_domain.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// AvailabilityDomain One or more isolated, fault-tolerant Oracle data centers that host cloud resources such as instances, volumes, -// and subnets. A region contains several Availability Domains. For more information, see -// Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). -type AvailabilityDomain struct { - - // The name of the Availability Domain. - Name *string `mandatory:"false" json:"name"` - - // The OCID of the tenancy. - CompartmentId *string `mandatory:"false" json:"compartmentId"` -} - -func (m AvailabilityDomain) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go b/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go deleted file mode 100644 index 84e432f10..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Compartment A collection of related resources. Compartments are a fundamental component of Oracle Cloud Infrastructure -// for organizing and isolating your cloud resources. You use them to clearly separate resources for the purposes -// of measuring usage and billing, access (through the use of IAM Service policies), and isolation (separating the -// resources for one project or business unit from another). A common approach is to create a compartment for each -// major part of your organization. For more information, see -// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm) and also -// Setting Up Your Tenancy (https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Concepts/settinguptenancy.htm). -// To place a resource in a compartment, simply specify the compartment ID in the "Create" request object when -// initially creating the resource. For example, to launch an instance into a particular compartment, specify -// that compartment's OCID in the `LaunchInstance` request. You can't move an existing resource from one -// compartment to another. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type Compartment struct { - - // The OCID of the compartment. - Id *string `mandatory:"true" json:"id"` - - // The OCID of the tenancy containing the compartment. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the compartment during creation. The name must be unique across all - // compartments in the tenancy. Avoid entering confidential information. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the compartment. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // Date and time the compartment was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The compartment's current state. After creating a compartment, make sure its `lifecycleState` changes from - // CREATING to ACTIVE before using it. - LifecycleState CompartmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m Compartment) String() string { - return common.PointerString(m) -} - -// CompartmentLifecycleStateEnum Enum with underlying type: string -type CompartmentLifecycleStateEnum string - -// Set of constants representing the allowable values for CompartmentLifecycleState -const ( - CompartmentLifecycleStateCreating CompartmentLifecycleStateEnum = "CREATING" - CompartmentLifecycleStateActive CompartmentLifecycleStateEnum = "ACTIVE" - CompartmentLifecycleStateInactive CompartmentLifecycleStateEnum = "INACTIVE" - CompartmentLifecycleStateDeleting CompartmentLifecycleStateEnum = "DELETING" - CompartmentLifecycleStateDeleted CompartmentLifecycleStateEnum = "DELETED" -) - -var mappingCompartmentLifecycleState = map[string]CompartmentLifecycleStateEnum{ - "CREATING": CompartmentLifecycleStateCreating, - "ACTIVE": CompartmentLifecycleStateActive, - "INACTIVE": CompartmentLifecycleStateInactive, - "DELETING": CompartmentLifecycleStateDeleting, - "DELETED": CompartmentLifecycleStateDeleted, -} - -// GetCompartmentLifecycleStateEnumValues Enumerates the set of values for CompartmentLifecycleState -func GetCompartmentLifecycleStateEnumValues() []CompartmentLifecycleStateEnum { - values := make([]CompartmentLifecycleStateEnum, 0) - for _, v := range mappingCompartmentLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_api_key_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_api_key_details.go deleted file mode 100644 index b9d6157ab..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_api_key_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateApiKeyDetails The representation of CreateApiKeyDetails -type CreateApiKeyDetails struct { - - // The public key. Must be an RSA key in PEM format. - Key *string `mandatory:"true" json:"key"` -} - -func (m CreateApiKeyDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_details.go deleted file mode 100644 index 6bc351e9c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateAuthTokenDetails The representation of CreateAuthTokenDetails -type CreateAuthTokenDetails struct { - - // The description you assign to the auth token during creation. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` -} - -func (m CreateAuthTokenDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_request_response.go deleted file mode 100644 index 0b954f7dd..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_auth_token_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateAuthTokenRequest wrapper for the CreateAuthToken operation -type CreateAuthTokenRequest struct { - - // Request object for creating a new auth token. - CreateAuthTokenDetails `contributesTo:"body"` - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateAuthTokenRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateAuthTokenRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateAuthTokenRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateAuthTokenResponse wrapper for the CreateAuthToken operation -type CreateAuthTokenResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The AuthToken instance - AuthToken `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateAuthTokenResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateAuthTokenResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go deleted file mode 100644 index fa2e1e94d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateCompartmentDetails The representation of CreateCompartmentDetails -type CreateCompartmentDetails struct { - - // The OCID of the tenancy containing the compartment. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the compartment during creation. The name must be unique across all compartments - // in the tenancy. Avoid entering confidential information. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the compartment during creation. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m CreateCompartmentDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go deleted file mode 100644 index c95d8bbba..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateCompartmentRequest wrapper for the CreateCompartment operation -type CreateCompartmentRequest struct { - - // Request object for creating a new compartment. - CreateCompartmentDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateCompartmentRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateCompartmentRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateCompartmentRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateCompartmentResponse wrapper for the CreateCompartment operation -type CreateCompartmentResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Compartment instance - Compartment `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateCompartmentResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateCompartmentResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_details.go deleted file mode 100644 index f61527dc9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateCustomerSecretKeyDetails The representation of CreateCustomerSecretKeyDetails -type CreateCustomerSecretKeyDetails struct { - - // The name you assign to the secret key during creation. Does not have to be unique, and it's changeable. - DisplayName *string `mandatory:"true" json:"displayName"` -} - -func (m CreateCustomerSecretKeyDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go deleted file mode 100644 index 3d20147ee..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateCustomerSecretKeyRequest wrapper for the CreateCustomerSecretKey operation -type CreateCustomerSecretKeyRequest struct { - - // Request object for creating a new secret key. - CreateCustomerSecretKeyDetails `contributesTo:"body"` - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateCustomerSecretKeyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateCustomerSecretKeyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateCustomerSecretKeyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateCustomerSecretKeyResponse wrapper for the CreateCustomerSecretKey operation -type CreateCustomerSecretKeyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The CustomerSecretKey instance - CustomerSecretKey `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateCustomerSecretKeyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateCustomerSecretKeyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_details.go deleted file mode 100644 index 559d4aa65..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_details.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateDynamicGroupDetails Properties for creating a dynamic group. -type CreateDynamicGroupDetails struct { - - // The OCID of the tenancy containing the group. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the group during creation. The name must be unique across all groups - // in the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The matching rule to dynamically match an instance certificate to this dynamic group. - // For rule syntax, see Managing Dynamic Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingdynamicgroups.htm). - MatchingRule *string `mandatory:"true" json:"matchingRule"` - - // The description you assign to the group during creation. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` -} - -func (m CreateDynamicGroupDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_request_response.go deleted file mode 100644 index d7f46e6bc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_dynamic_group_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateDynamicGroupRequest wrapper for the CreateDynamicGroup operation -type CreateDynamicGroupRequest struct { - - // Request object for creating a new dynamic group. - CreateDynamicGroupDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateDynamicGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateDynamicGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateDynamicGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateDynamicGroupResponse wrapper for the CreateDynamicGroup operation -type CreateDynamicGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DynamicGroup instance - DynamicGroup `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateDynamicGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateDynamicGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go deleted file mode 100644 index d689c3a89..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateGroupDetails The representation of CreateGroupDetails -type CreateGroupDetails struct { - - // The OCID of the tenancy containing the group. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the group during creation. The name must be unique across all groups - // in the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the group during creation. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m CreateGroupDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go deleted file mode 100644 index 344b8452f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateGroupRequest wrapper for the CreateGroup operation -type CreateGroupRequest struct { - - // Request object for creating a new group. - CreateGroupDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateGroupResponse wrapper for the CreateGroup operation -type CreateGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Group instance - Group `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go deleted file mode 100644 index 3b8d84bc8..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// CreateIdentityProviderDetails The representation of CreateIdentityProviderDetails -type CreateIdentityProviderDetails interface { - - // The OCID of your tenancy. - GetCompartmentId() *string - - // The name you assign to the `IdentityProvider` during creation. - // The name must be unique across all `IdentityProvider` objects in the - // tenancy and cannot be changed. - GetName() *string - - // The description you assign to the `IdentityProvider` during creation. - // Does not have to be unique, and it's changeable. - GetDescription() *string - - // The identity provider service or product. - // Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft - // Active Directory Federation Services (ADFS). - // Example: `IDCS` - GetProductType() CreateIdentityProviderDetailsProductTypeEnum - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - GetFreeformTags() map[string]string - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - GetDefinedTags() map[string]map[string]interface{} -} - -type createidentityproviderdetails struct { - JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` - Name *string `mandatory:"true" json:"name"` - Description *string `mandatory:"true" json:"description"` - ProductType CreateIdentityProviderDetailsProductTypeEnum `mandatory:"true" json:"productType"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - Protocol string `json:"protocol"` -} - -// UnmarshalJSON unmarshals json -func (m *createidentityproviderdetails) UnmarshalJSON(data []byte) error { - m.JsonData = data - type Unmarshalercreateidentityproviderdetails createidentityproviderdetails - s := struct { - Model Unmarshalercreateidentityproviderdetails - }{} - err := json.Unmarshal(data, &s.Model) - if err != nil { - return err - } - m.CompartmentId = s.Model.CompartmentId - m.Name = s.Model.Name - m.Description = s.Model.Description - m.ProductType = s.Model.ProductType - m.FreeformTags = s.Model.FreeformTags - m.DefinedTags = s.Model.DefinedTags - m.Protocol = s.Model.Protocol - - return err -} - -// UnmarshalPolymorphicJSON unmarshals polymorphic json -func (m *createidentityproviderdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { - var err error - switch m.Protocol { - case "SAML2": - mm := CreateSaml2IdentityProviderDetails{} - err = json.Unmarshal(data, &mm) - return mm, err - default: - return m, nil - } -} - -//GetCompartmentId returns CompartmentId -func (m createidentityproviderdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetName returns Name -func (m createidentityproviderdetails) GetName() *string { - return m.Name -} - -//GetDescription returns Description -func (m createidentityproviderdetails) GetDescription() *string { - return m.Description -} - -//GetProductType returns ProductType -func (m createidentityproviderdetails) GetProductType() CreateIdentityProviderDetailsProductTypeEnum { - return m.ProductType -} - -//GetFreeformTags returns FreeformTags -func (m createidentityproviderdetails) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m createidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -func (m createidentityproviderdetails) String() string { - return common.PointerString(m) -} - -// CreateIdentityProviderDetailsProductTypeEnum Enum with underlying type: string -type CreateIdentityProviderDetailsProductTypeEnum string - -// Set of constants representing the allowable values for CreateIdentityProviderDetailsProductType -const ( - CreateIdentityProviderDetailsProductTypeIdcs CreateIdentityProviderDetailsProductTypeEnum = "IDCS" - CreateIdentityProviderDetailsProductTypeAdfs CreateIdentityProviderDetailsProductTypeEnum = "ADFS" -) - -var mappingCreateIdentityProviderDetailsProductType = map[string]CreateIdentityProviderDetailsProductTypeEnum{ - "IDCS": CreateIdentityProviderDetailsProductTypeIdcs, - "ADFS": CreateIdentityProviderDetailsProductTypeAdfs, -} - -// GetCreateIdentityProviderDetailsProductTypeEnumValues Enumerates the set of values for CreateIdentityProviderDetailsProductType -func GetCreateIdentityProviderDetailsProductTypeEnumValues() []CreateIdentityProviderDetailsProductTypeEnum { - values := make([]CreateIdentityProviderDetailsProductTypeEnum, 0) - for _, v := range mappingCreateIdentityProviderDetailsProductType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go deleted file mode 100644 index 579231664..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateIdentityProviderRequest wrapper for the CreateIdentityProvider operation -type CreateIdentityProviderRequest struct { - - // Request object for creating a new SAML2 identity provider. - CreateIdentityProviderDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateIdentityProviderRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateIdentityProviderRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateIdentityProviderRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateIdentityProviderResponse wrapper for the CreateIdentityProvider operation -type CreateIdentityProviderResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The IdentityProvider instance - IdentityProvider `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateIdentityProviderResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateIdentityProviderResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_details.go deleted file mode 100644 index a6cb91192..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_details.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateIdpGroupMappingDetails The representation of CreateIdpGroupMappingDetails -type CreateIdpGroupMappingDetails struct { - - // The name of the IdP group you want to map. - IdpGroupName *string `mandatory:"true" json:"idpGroupName"` - - // The OCID of the IAM Service Group - // you want to map to the IdP group. - GroupId *string `mandatory:"true" json:"groupId"` -} - -func (m CreateIdpGroupMappingDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go deleted file mode 100644 index 14df8f80d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateIdpGroupMappingRequest wrapper for the CreateIdpGroupMapping operation -type CreateIdpGroupMappingRequest struct { - - // Add a mapping from an SAML2.0 identity provider group to a BMC group. - CreateIdpGroupMappingDetails `contributesTo:"body"` - - // The OCID of the identity provider. - IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateIdpGroupMappingRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateIdpGroupMappingRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateIdpGroupMappingRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateIdpGroupMappingResponse wrapper for the CreateIdpGroupMapping operation -type CreateIdpGroupMappingResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The IdpGroupMapping instance - IdpGroupMapping `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateIdpGroupMappingResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateIdpGroupMappingResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go deleted file mode 100644 index 50f62899c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateOrResetUIPasswordRequest wrapper for the CreateOrResetUIPassword operation -type CreateOrResetUIPasswordRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateOrResetUIPasswordRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateOrResetUIPasswordRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateOrResetUIPasswordRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateOrResetUIPasswordResponse wrapper for the CreateOrResetUIPassword operation -type CreateOrResetUIPasswordResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The UiPassword instance - UiPassword `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateOrResetUIPasswordResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateOrResetUIPasswordResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go deleted file mode 100644 index 187890608..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreatePolicyDetails The representation of CreatePolicyDetails -type CreatePolicyDetails struct { - - // The OCID of the compartment containing the policy (either the tenancy or another compartment). - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the policy during creation. The name must be unique across all policies - // in the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // An array of policy statements written in the policy language. See - // How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and - // Common Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm). - Statements []string `mandatory:"true" json:"statements"` - - // The description you assign to the policy during creation. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // The version of the policy. If null or set to an empty string, when a request comes in for authorization, the - // policy will be evaluated according to the current behavior of the services at that moment. If set to a particular - // date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - VersionDate *common.SDKTime `mandatory:"false" json:"versionDate"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m CreatePolicyDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go deleted file mode 100644 index 4ebff64a4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreatePolicyRequest wrapper for the CreatePolicy operation -type CreatePolicyRequest struct { - - // Request object for creating a new policy. - CreatePolicyDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreatePolicyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreatePolicyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreatePolicyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreatePolicyResponse wrapper for the CreatePolicy operation -type CreatePolicyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Policy instance - Policy `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreatePolicyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreatePolicyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go deleted file mode 100644 index b682a490c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateRegionSubscriptionDetails The representation of CreateRegionSubscriptionDetails -type CreateRegionSubscriptionDetails struct { - - // The regions's key. - // Allowed values are: - // - `PHX` - // - `IAD` - // - `FRA` - // - `LHR` - // Example: `PHX` - RegionKey *string `mandatory:"true" json:"regionKey"` -} - -func (m CreateRegionSubscriptionDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go deleted file mode 100644 index f58432800..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateRegionSubscriptionRequest wrapper for the CreateRegionSubscription operation -type CreateRegionSubscriptionRequest struct { - - // Request object for activate a new region. - CreateRegionSubscriptionDetails `contributesTo:"body"` - - // The OCID of the tenancy. - TenancyId *string `mandatory:"true" contributesTo:"path" name:"tenancyId"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateRegionSubscriptionRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateRegionSubscriptionRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateRegionSubscriptionRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateRegionSubscriptionResponse wrapper for the CreateRegionSubscription operation -type CreateRegionSubscriptionResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The RegionSubscription instance - RegionSubscription `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateRegionSubscriptionResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateRegionSubscriptionResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go deleted file mode 100644 index 9f07fb95e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// CreateSaml2IdentityProviderDetails The representation of CreateSaml2IdentityProviderDetails -type CreateSaml2IdentityProviderDetails struct { - - // The OCID of your tenancy. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the `IdentityProvider` during creation. - // The name must be unique across all `IdentityProvider` objects in the - // tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the `IdentityProvider` during creation. - // Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // The URL for retrieving the identity provider's metadata, - // which contains information required for federating. - MetadataUrl *string `mandatory:"true" json:"metadataUrl"` - - // The XML that contains the information required for federating. - Metadata *string `mandatory:"true" json:"metadata"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // The identity provider service or product. - // Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft - // Active Directory Federation Services (ADFS). - // Example: `IDCS` - ProductType CreateIdentityProviderDetailsProductTypeEnum `mandatory:"true" json:"productType"` -} - -//GetCompartmentId returns CompartmentId -func (m CreateSaml2IdentityProviderDetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetName returns Name -func (m CreateSaml2IdentityProviderDetails) GetName() *string { - return m.Name -} - -//GetDescription returns Description -func (m CreateSaml2IdentityProviderDetails) GetDescription() *string { - return m.Description -} - -//GetProductType returns ProductType -func (m CreateSaml2IdentityProviderDetails) GetProductType() CreateIdentityProviderDetailsProductTypeEnum { - return m.ProductType -} - -//GetFreeformTags returns FreeformTags -func (m CreateSaml2IdentityProviderDetails) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m CreateSaml2IdentityProviderDetails) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -func (m CreateSaml2IdentityProviderDetails) String() string { - return common.PointerString(m) -} - -// MarshalJSON marshals to json representation -func (m CreateSaml2IdentityProviderDetails) MarshalJSON() (buff []byte, e error) { - type MarshalTypeCreateSaml2IdentityProviderDetails CreateSaml2IdentityProviderDetails - s := struct { - DiscriminatorParam string `json:"protocol"` - MarshalTypeCreateSaml2IdentityProviderDetails - }{ - "SAML2", - (MarshalTypeCreateSaml2IdentityProviderDetails)(m), - } - - return json.Marshal(&s) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_details.go deleted file mode 100644 index 6240a43c5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateSmtpCredentialDetails The representation of CreateSmtpCredentialDetails -type CreateSmtpCredentialDetails struct { - - // The description you assign to the SMTP credentials during creation. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` -} - -func (m CreateSmtpCredentialDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_request_response.go deleted file mode 100644 index 8452a7558..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_smtp_credential_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateSmtpCredentialRequest wrapper for the CreateSmtpCredential operation -type CreateSmtpCredentialRequest struct { - - // Request object for creating a new SMTP credential with the user. - CreateSmtpCredentialDetails `contributesTo:"body"` - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateSmtpCredentialRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateSmtpCredentialRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateSmtpCredentialRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateSmtpCredentialResponse wrapper for the CreateSmtpCredential operation -type CreateSmtpCredentialResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The SmtpCredential instance - SmtpCredential `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateSmtpCredentialResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateSmtpCredentialResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_details.go deleted file mode 100644 index 0182d9dc5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateSwiftPasswordDetails The representation of CreateSwiftPasswordDetails -type CreateSwiftPasswordDetails struct { - - // The description you assign to the Swift password during creation. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` -} - -func (m CreateSwiftPasswordDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go deleted file mode 100644 index 90fc31320..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateSwiftPasswordRequest wrapper for the CreateSwiftPassword operation -type CreateSwiftPasswordRequest struct { - - // Request object for creating a new swift password. - CreateSwiftPasswordDetails `contributesTo:"body"` - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateSwiftPasswordRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateSwiftPasswordRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateSwiftPasswordRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateSwiftPasswordResponse wrapper for the CreateSwiftPassword operation -type CreateSwiftPasswordResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The SwiftPassword instance - SwiftPassword `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateSwiftPasswordResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateSwiftPasswordResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_details.go deleted file mode 100644 index 86ac57d4c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_details.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateTagDetails The representation of CreateTagDetails -type CreateTagDetails struct { - - // The name you assign to the tag during creation. The name must be unique within the tag namespace and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the tag during creation. - Description *string `mandatory:"true" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m CreateTagDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_details.go deleted file mode 100644 index 1967669fc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_details.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateTagNamespaceDetails The representation of CreateTagNamespaceDetails -type CreateTagNamespaceDetails struct { - - // The OCID of the tenancy containing the tag namespace. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the tag namespace during creation. It must be unique across all tag namespaces in the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the tag namespace during creation. - Description *string `mandatory:"true" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m CreateTagNamespaceDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_request_response.go deleted file mode 100644 index fb4ad6aaa..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_namespace_request_response.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateTagNamespaceRequest wrapper for the CreateTagNamespace operation -type CreateTagNamespaceRequest struct { - - // Request object for creating a new tag namespace. - CreateTagNamespaceDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateTagNamespaceRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateTagNamespaceRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateTagNamespaceRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateTagNamespaceResponse wrapper for the CreateTagNamespace operation -type CreateTagNamespaceResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The TagNamespace instance - TagNamespace `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateTagNamespaceResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateTagNamespaceResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_request_response.go deleted file mode 100644 index 1fd047163..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_tag_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateTagRequest wrapper for the CreateTag operation -type CreateTagRequest struct { - - // The OCID of the tag namespace. - TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` - - // Request object for creating a new tag in the specified tag namespace. - CreateTagDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateTagRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateTagRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateTagRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateTagResponse wrapper for the CreateTag operation -type CreateTagResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Tag instance - Tag `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreateTagResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateTagResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go deleted file mode 100644 index f775c1ab1..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateUserDetails The representation of CreateUserDetails -type CreateUserDetails struct { - - // The OCID of the tenancy containing the user. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the user during creation. This is the user's login for the Console. - // The name must be unique across all users in the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the user during creation. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m CreateUserDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go deleted file mode 100644 index ac64d39d5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateUserRequest wrapper for the CreateUser operation -type CreateUserRequest struct { - - // Request object for creating a new user. - CreateUserDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateUserRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateUserRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateUserRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateUserResponse wrapper for the CreateUser operation -type CreateUserResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The User instance - User `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response CreateUserResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateUserResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key.go b/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key.go deleted file mode 100644 index f3137bf6e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CustomerSecretKey A `CustomerSecretKey` is an Oracle-provided key for using the Object Storage Service's -// Amazon S3 compatible API (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/s3compatibleapi.htm). -// A user can have up to two secret keys at a time. -// **Note:** The secret key is always an Oracle-generated string; you can't change it to a string of your choice. -// For more information, see Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). -type CustomerSecretKey struct { - - // The secret key. - Key *string `mandatory:"false" json:"key"` - - // The OCID of the secret key. - Id *string `mandatory:"false" json:"id"` - - // The OCID of the user the password belongs to. - UserId *string `mandatory:"false" json:"userId"` - - // The display name you assign to the secret key. Does not have to be unique, and it's changeable. - DisplayName *string `mandatory:"false" json:"displayName"` - - // Date and time the `CustomerSecretKey` object was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // Date and time when this password will expire, in the format defined by RFC3339. - // Null if it never expires. - // Example: `2016-08-25T21:10:29.600Z` - TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` - - // The secret key's current state. After creating a secret key, make sure its `lifecycleState` changes from - // CREATING to ACTIVE before using it. - LifecycleState CustomerSecretKeyLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m CustomerSecretKey) String() string { - return common.PointerString(m) -} - -// CustomerSecretKeyLifecycleStateEnum Enum with underlying type: string -type CustomerSecretKeyLifecycleStateEnum string - -// Set of constants representing the allowable values for CustomerSecretKeyLifecycleState -const ( - CustomerSecretKeyLifecycleStateCreating CustomerSecretKeyLifecycleStateEnum = "CREATING" - CustomerSecretKeyLifecycleStateActive CustomerSecretKeyLifecycleStateEnum = "ACTIVE" - CustomerSecretKeyLifecycleStateInactive CustomerSecretKeyLifecycleStateEnum = "INACTIVE" - CustomerSecretKeyLifecycleStateDeleting CustomerSecretKeyLifecycleStateEnum = "DELETING" - CustomerSecretKeyLifecycleStateDeleted CustomerSecretKeyLifecycleStateEnum = "DELETED" -) - -var mappingCustomerSecretKeyLifecycleState = map[string]CustomerSecretKeyLifecycleStateEnum{ - "CREATING": CustomerSecretKeyLifecycleStateCreating, - "ACTIVE": CustomerSecretKeyLifecycleStateActive, - "INACTIVE": CustomerSecretKeyLifecycleStateInactive, - "DELETING": CustomerSecretKeyLifecycleStateDeleting, - "DELETED": CustomerSecretKeyLifecycleStateDeleted, -} - -// GetCustomerSecretKeyLifecycleStateEnumValues Enumerates the set of values for CustomerSecretKeyLifecycleState -func GetCustomerSecretKeyLifecycleStateEnumValues() []CustomerSecretKeyLifecycleStateEnum { - values := make([]CustomerSecretKeyLifecycleStateEnum, 0) - for _, v := range mappingCustomerSecretKeyLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key_summary.go b/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key_summary.go deleted file mode 100644 index bc59eed42..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key_summary.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CustomerSecretKeySummary As the name suggests, a `CustomerSecretKeySummary` object contains information about a `CustomerSecretKey`. -// A `CustomerSecretKey` is an Oracle-provided key for using the Object Storage Service's Amazon S3 compatible API. -type CustomerSecretKeySummary struct { - - // The OCID of the secret key. - Id *string `mandatory:"false" json:"id"` - - // The OCID of the user the password belongs to. - UserId *string `mandatory:"false" json:"userId"` - - // The displayName you assign to the secret key. Does not have to be unique, and it's changeable. - DisplayName *string `mandatory:"false" json:"displayName"` - - // Date and time the `CustomerSecretKey` object was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // Date and time when this password will expire, in the format defined by RFC3339. - // Null if it never expires. - // Example: `2016-08-25T21:10:29.600Z` - TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` - - // The secret key's current state. After creating a secret key, make sure its `lifecycleState` changes from - // CREATING to ACTIVE before using it. - LifecycleState CustomerSecretKeySummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m CustomerSecretKeySummary) String() string { - return common.PointerString(m) -} - -// CustomerSecretKeySummaryLifecycleStateEnum Enum with underlying type: string -type CustomerSecretKeySummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for CustomerSecretKeySummaryLifecycleState -const ( - CustomerSecretKeySummaryLifecycleStateCreating CustomerSecretKeySummaryLifecycleStateEnum = "CREATING" - CustomerSecretKeySummaryLifecycleStateActive CustomerSecretKeySummaryLifecycleStateEnum = "ACTIVE" - CustomerSecretKeySummaryLifecycleStateInactive CustomerSecretKeySummaryLifecycleStateEnum = "INACTIVE" - CustomerSecretKeySummaryLifecycleStateDeleting CustomerSecretKeySummaryLifecycleStateEnum = "DELETING" - CustomerSecretKeySummaryLifecycleStateDeleted CustomerSecretKeySummaryLifecycleStateEnum = "DELETED" -) - -var mappingCustomerSecretKeySummaryLifecycleState = map[string]CustomerSecretKeySummaryLifecycleStateEnum{ - "CREATING": CustomerSecretKeySummaryLifecycleStateCreating, - "ACTIVE": CustomerSecretKeySummaryLifecycleStateActive, - "INACTIVE": CustomerSecretKeySummaryLifecycleStateInactive, - "DELETING": CustomerSecretKeySummaryLifecycleStateDeleting, - "DELETED": CustomerSecretKeySummaryLifecycleStateDeleted, -} - -// GetCustomerSecretKeySummaryLifecycleStateEnumValues Enumerates the set of values for CustomerSecretKeySummaryLifecycleState -func GetCustomerSecretKeySummaryLifecycleStateEnumValues() []CustomerSecretKeySummaryLifecycleStateEnum { - values := make([]CustomerSecretKeySummaryLifecycleStateEnum, 0) - for _, v := range mappingCustomerSecretKeySummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go deleted file mode 100644 index eadd6ffd9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteApiKeyRequest wrapper for the DeleteApiKey operation -type DeleteApiKeyRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // The key's fingerprint. - Fingerprint *string `mandatory:"true" contributesTo:"path" name:"fingerprint"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteApiKeyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteApiKeyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteApiKeyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteApiKeyResponse wrapper for the DeleteApiKey operation -type DeleteApiKeyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteApiKeyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteApiKeyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_auth_token_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_auth_token_request_response.go deleted file mode 100644 index 714256257..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_auth_token_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteAuthTokenRequest wrapper for the DeleteAuthToken operation -type DeleteAuthTokenRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // The OCID of the auth token. - AuthTokenId *string `mandatory:"true" contributesTo:"path" name:"authTokenId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteAuthTokenRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteAuthTokenRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteAuthTokenRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteAuthTokenResponse wrapper for the DeleteAuthToken operation -type DeleteAuthTokenResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteAuthTokenResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteAuthTokenResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go deleted file mode 100644 index fa2d079b9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteCustomerSecretKeyRequest wrapper for the DeleteCustomerSecretKey operation -type DeleteCustomerSecretKeyRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // The OCID of the secret key. - CustomerSecretKeyId *string `mandatory:"true" contributesTo:"path" name:"customerSecretKeyId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteCustomerSecretKeyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteCustomerSecretKeyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteCustomerSecretKeyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteCustomerSecretKeyResponse wrapper for the DeleteCustomerSecretKey operation -type DeleteCustomerSecretKeyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteCustomerSecretKeyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteCustomerSecretKeyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_dynamic_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_dynamic_group_request_response.go deleted file mode 100644 index e3b59782d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_dynamic_group_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteDynamicGroupRequest wrapper for the DeleteDynamicGroup operation -type DeleteDynamicGroupRequest struct { - - // The OCID of the dynamic group. - DynamicGroupId *string `mandatory:"true" contributesTo:"path" name:"dynamicGroupId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteDynamicGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteDynamicGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteDynamicGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteDynamicGroupResponse wrapper for the DeleteDynamicGroup operation -type DeleteDynamicGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteDynamicGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteDynamicGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go deleted file mode 100644 index d6a7b5f33..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteGroupRequest wrapper for the DeleteGroup operation -type DeleteGroupRequest struct { - - // The OCID of the group. - GroupId *string `mandatory:"true" contributesTo:"path" name:"groupId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteGroupResponse wrapper for the DeleteGroup operation -type DeleteGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go deleted file mode 100644 index 6716cc95d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteIdentityProviderRequest wrapper for the DeleteIdentityProvider operation -type DeleteIdentityProviderRequest struct { - - // The OCID of the identity provider. - IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteIdentityProviderRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteIdentityProviderRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteIdentityProviderRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteIdentityProviderResponse wrapper for the DeleteIdentityProvider operation -type DeleteIdentityProviderResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteIdentityProviderResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteIdentityProviderResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go deleted file mode 100644 index 8b0d55d16..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteIdpGroupMappingRequest wrapper for the DeleteIdpGroupMapping operation -type DeleteIdpGroupMappingRequest struct { - - // The OCID of the identity provider. - IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` - - // The OCID of the group mapping. - MappingId *string `mandatory:"true" contributesTo:"path" name:"mappingId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteIdpGroupMappingRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteIdpGroupMappingRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteIdpGroupMappingRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteIdpGroupMappingResponse wrapper for the DeleteIdpGroupMapping operation -type DeleteIdpGroupMappingResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteIdpGroupMappingResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteIdpGroupMappingResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go deleted file mode 100644 index 12054caa1..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeletePolicyRequest wrapper for the DeletePolicy operation -type DeletePolicyRequest struct { - - // The OCID of the policy. - PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeletePolicyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeletePolicyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeletePolicyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeletePolicyResponse wrapper for the DeletePolicy operation -type DeletePolicyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeletePolicyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeletePolicyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_smtp_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_smtp_credential_request_response.go deleted file mode 100644 index 9191bb0b7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_smtp_credential_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteSmtpCredentialRequest wrapper for the DeleteSmtpCredential operation -type DeleteSmtpCredentialRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // The OCID of the SMTP credential. - SmtpCredentialId *string `mandatory:"true" contributesTo:"path" name:"smtpCredentialId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteSmtpCredentialRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteSmtpCredentialRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteSmtpCredentialRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteSmtpCredentialResponse wrapper for the DeleteSmtpCredential operation -type DeleteSmtpCredentialResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteSmtpCredentialResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteSmtpCredentialResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go deleted file mode 100644 index 8a0c4633e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteSwiftPasswordRequest wrapper for the DeleteSwiftPassword operation -type DeleteSwiftPasswordRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // The OCID of the Swift password. - SwiftPasswordId *string `mandatory:"true" contributesTo:"path" name:"swiftPasswordId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteSwiftPasswordRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteSwiftPasswordRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteSwiftPasswordRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteSwiftPasswordResponse wrapper for the DeleteSwiftPassword operation -type DeleteSwiftPasswordResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteSwiftPasswordResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteSwiftPasswordResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go deleted file mode 100644 index 434ea1adc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteUserRequest wrapper for the DeleteUser operation -type DeleteUserRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteUserRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteUserRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteUserRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteUserResponse wrapper for the DeleteUser operation -type DeleteUserResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteUserResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteUserResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/dynamic_group.go b/vendor/github.com/oracle/oci-go-sdk/identity/dynamic_group.go deleted file mode 100644 index 386edcaa8..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/dynamic_group.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// DynamicGroup A dynamic group defines a matching rule. Every bare metal or virtual machine instance is deployed with an instance certificate. -// The certificate contains metadata about the instance. This includes the instance OCID and the compartment OCID, along -// with a few other optional properties. When an API call is made using this instance certificate as the authenticator, -// the certificate can be matched to one or multiple dynamic groups. The instance can then get access to the API -// based on the permissions granted in policies written for the dynamic groups. -// This works like regular user/group membership. But in that case, the membership is a static relationship, whereas -// in a dynamic group, the membership of an instance certificate to a dynamic group is determined during runtime. -// For more information, see Managing Dynamic Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingdynamicgroups.htm). -type DynamicGroup struct { - - // The OCID of the group. - Id *string `mandatory:"true" json:"id"` - - // The OCID of the tenancy containing the group. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the group during creation. The name must be unique across all groups in - // the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the group. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // A rule string that defines which instance certificates will be matched. - // For syntax, see Managing Dynamic Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingdynamicgroups.htm). - MatchingRule *string `mandatory:"true" json:"matchingRule"` - - // Date and time the group was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The group's current state. After creating a group, make sure its `lifecycleState` changes from CREATING to - // ACTIVE before using it. - LifecycleState DynamicGroupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m DynamicGroup) String() string { - return common.PointerString(m) -} - -// DynamicGroupLifecycleStateEnum Enum with underlying type: string -type DynamicGroupLifecycleStateEnum string - -// Set of constants representing the allowable values for DynamicGroupLifecycleState -const ( - DynamicGroupLifecycleStateCreating DynamicGroupLifecycleStateEnum = "CREATING" - DynamicGroupLifecycleStateActive DynamicGroupLifecycleStateEnum = "ACTIVE" - DynamicGroupLifecycleStateInactive DynamicGroupLifecycleStateEnum = "INACTIVE" - DynamicGroupLifecycleStateDeleting DynamicGroupLifecycleStateEnum = "DELETING" - DynamicGroupLifecycleStateDeleted DynamicGroupLifecycleStateEnum = "DELETED" -) - -var mappingDynamicGroupLifecycleState = map[string]DynamicGroupLifecycleStateEnum{ - "CREATING": DynamicGroupLifecycleStateCreating, - "ACTIVE": DynamicGroupLifecycleStateActive, - "INACTIVE": DynamicGroupLifecycleStateInactive, - "DELETING": DynamicGroupLifecycleStateDeleting, - "DELETED": DynamicGroupLifecycleStateDeleted, -} - -// GetDynamicGroupLifecycleStateEnumValues Enumerates the set of values for DynamicGroupLifecycleState -func GetDynamicGroupLifecycleStateEnumValues() []DynamicGroupLifecycleStateEnum { - values := make([]DynamicGroupLifecycleStateEnum, 0) - for _, v := range mappingDynamicGroupLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go deleted file mode 100644 index 65133c7ac..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetCompartmentRequest wrapper for the GetCompartment operation -type GetCompartmentRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"path" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetCompartmentRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetCompartmentRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetCompartmentRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetCompartmentResponse wrapper for the GetCompartment operation -type GetCompartmentResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Compartment instance - Compartment `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response GetCompartmentResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetCompartmentResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_dynamic_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_dynamic_group_request_response.go deleted file mode 100644 index c1328c191..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_dynamic_group_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetDynamicGroupRequest wrapper for the GetDynamicGroup operation -type GetDynamicGroupRequest struct { - - // The OCID of the dynamic group. - DynamicGroupId *string `mandatory:"true" contributesTo:"path" name:"dynamicGroupId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetDynamicGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetDynamicGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetDynamicGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetDynamicGroupResponse wrapper for the GetDynamicGroup operation -type GetDynamicGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DynamicGroup instance - DynamicGroup `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response GetDynamicGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetDynamicGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go deleted file mode 100644 index 8e71f7a99..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetGroupRequest wrapper for the GetGroup operation -type GetGroupRequest struct { - - // The OCID of the group. - GroupId *string `mandatory:"true" contributesTo:"path" name:"groupId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetGroupResponse wrapper for the GetGroup operation -type GetGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Group instance - Group `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response GetGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go deleted file mode 100644 index 4b652e9e3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetIdentityProviderRequest wrapper for the GetIdentityProvider operation -type GetIdentityProviderRequest struct { - - // The OCID of the identity provider. - IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetIdentityProviderRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetIdentityProviderRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetIdentityProviderRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetIdentityProviderResponse wrapper for the GetIdentityProvider operation -type GetIdentityProviderResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The IdentityProvider instance - IdentityProvider `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response GetIdentityProviderResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetIdentityProviderResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go deleted file mode 100644 index b500bb040..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetIdpGroupMappingRequest wrapper for the GetIdpGroupMapping operation -type GetIdpGroupMappingRequest struct { - - // The OCID of the identity provider. - IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` - - // The OCID of the group mapping. - MappingId *string `mandatory:"true" contributesTo:"path" name:"mappingId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetIdpGroupMappingRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetIdpGroupMappingRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetIdpGroupMappingRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetIdpGroupMappingResponse wrapper for the GetIdpGroupMapping operation -type GetIdpGroupMappingResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The IdpGroupMapping instance - IdpGroupMapping `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response GetIdpGroupMappingResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetIdpGroupMappingResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go deleted file mode 100644 index d35f9b898..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetPolicyRequest wrapper for the GetPolicy operation -type GetPolicyRequest struct { - - // The OCID of the policy. - PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetPolicyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetPolicyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetPolicyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetPolicyResponse wrapper for the GetPolicy operation -type GetPolicyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Policy instance - Policy `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response GetPolicyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetPolicyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_namespace_request_response.go deleted file mode 100644 index 2c1e44f3b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_namespace_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetTagNamespaceRequest wrapper for the GetTagNamespace operation -type GetTagNamespaceRequest struct { - - // The OCID of the tag namespace. - TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetTagNamespaceRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetTagNamespaceRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetTagNamespaceRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetTagNamespaceResponse wrapper for the GetTagNamespace operation -type GetTagNamespaceResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The TagNamespace instance - TagNamespace `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetTagNamespaceResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetTagNamespaceResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_request_response.go deleted file mode 100644 index f4a9d07a3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_tag_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetTagRequest wrapper for the GetTag operation -type GetTagRequest struct { - - // The OCID of the tag namespace. - TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` - - // The name of the tag. - TagName *string `mandatory:"true" contributesTo:"path" name:"tagName"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetTagRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetTagRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetTagRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetTagResponse wrapper for the GetTag operation -type GetTagResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Tag instance - Tag `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetTagResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetTagResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go deleted file mode 100644 index 7b6610187..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetTenancyRequest wrapper for the GetTenancy operation -type GetTenancyRequest struct { - - // The OCID of the tenancy. - TenancyId *string `mandatory:"true" contributesTo:"path" name:"tenancyId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetTenancyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetTenancyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetTenancyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetTenancyResponse wrapper for the GetTenancy operation -type GetTenancyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Tenancy instance - Tenancy `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetTenancyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetTenancyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go deleted file mode 100644 index 9d48752ce..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetUserGroupMembershipRequest wrapper for the GetUserGroupMembership operation -type GetUserGroupMembershipRequest struct { - - // The OCID of the userGroupMembership. - UserGroupMembershipId *string `mandatory:"true" contributesTo:"path" name:"userGroupMembershipId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetUserGroupMembershipRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetUserGroupMembershipRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetUserGroupMembershipRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetUserGroupMembershipResponse wrapper for the GetUserGroupMembership operation -type GetUserGroupMembershipResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The UserGroupMembership instance - UserGroupMembership `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response GetUserGroupMembershipResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetUserGroupMembershipResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go deleted file mode 100644 index 140824e24..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetUserRequest wrapper for the GetUser operation -type GetUserRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetUserRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetUserRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetUserRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetUserResponse wrapper for the GetUser operation -type GetUserResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The User instance - User `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response GetUserResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetUserResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/group.go b/vendor/github.com/oracle/oci-go-sdk/identity/group.go deleted file mode 100644 index 75c91ace9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/group.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Group A collection of users who all need the same type of access to a particular set of resources or compartment. -// For conceptual information about groups and other IAM Service components, see -// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). -// If you're federating with an identity provider (IdP), you need to create mappings between the groups -// defined in the IdP and groups you define in the IAM service. For more information, see -// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). Also see -// IdentityProvider and -// IdpGroupMapping. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type Group struct { - - // The OCID of the group. - Id *string `mandatory:"true" json:"id"` - - // The OCID of the tenancy containing the group. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the group during creation. The name must be unique across all groups in - // the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the group. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // Date and time the group was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The group's current state. After creating a group, make sure its `lifecycleState` changes from CREATING to - // ACTIVE before using it. - LifecycleState GroupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m Group) String() string { - return common.PointerString(m) -} - -// GroupLifecycleStateEnum Enum with underlying type: string -type GroupLifecycleStateEnum string - -// Set of constants representing the allowable values for GroupLifecycleState -const ( - GroupLifecycleStateCreating GroupLifecycleStateEnum = "CREATING" - GroupLifecycleStateActive GroupLifecycleStateEnum = "ACTIVE" - GroupLifecycleStateInactive GroupLifecycleStateEnum = "INACTIVE" - GroupLifecycleStateDeleting GroupLifecycleStateEnum = "DELETING" - GroupLifecycleStateDeleted GroupLifecycleStateEnum = "DELETED" -) - -var mappingGroupLifecycleState = map[string]GroupLifecycleStateEnum{ - "CREATING": GroupLifecycleStateCreating, - "ACTIVE": GroupLifecycleStateActive, - "INACTIVE": GroupLifecycleStateInactive, - "DELETING": GroupLifecycleStateDeleting, - "DELETED": GroupLifecycleStateDeleted, -} - -// GetGroupLifecycleStateEnumValues Enumerates the set of values for GroupLifecycleState -func GetGroupLifecycleStateEnumValues() []GroupLifecycleStateEnum { - values := make([]GroupLifecycleStateEnum, 0) - for _, v := range mappingGroupLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go b/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go deleted file mode 100644 index f019155e0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go +++ /dev/null @@ -1,3092 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -//IdentityClient a client for Identity -type IdentityClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewIdentityClientWithConfigurationProvider Creates a new default Identity client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewIdentityClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client IdentityClient, err error) { - baseClient, err := common.NewClientWithConfig(configProvider) - if err != nil { - return - } - - client = IdentityClient{BaseClient: baseClient} - client.BasePath = "20160918" - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *IdentityClient) SetRegion(region string) { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "identity", region) -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *IdentityClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { - if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { - return err - } - - // Error has been checked already - region, _ := configProvider.Region() - client.SetRegion(region) - client.config = &configProvider - return nil -} - -// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set -func (client *IdentityClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// AddUserToGroup Adds the specified user to the specified group and returns a `UserGroupMembership` object with its own OCID. -// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the -// object, first make sure its `lifecycleState` has changed to ACTIVE. -func (client IdentityClient) AddUserToGroup(ctx context.Context, request AddUserToGroupRequest) (response AddUserToGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.addUserToGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(AddUserToGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into AddUserToGroupResponse") - } - return -} - -// addUserToGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) addUserToGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/userGroupMemberships/") - if err != nil { - return nil, err - } - - var response AddUserToGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateAuthToken Creates a new auth token for the specified user. For information about what auth tokens are for, see -// Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). -// You must specify a *description* for the auth token (although it can be an empty string). It does not -// have to be unique, and you can change it anytime with -// UpdateAuthToken. -// Every user has permission to create an auth token for *their own user ID*. An administrator in your organization -// does not need to write a policy to give users this ability. To compare, administrators who have permission to the -// tenancy can use this operation to create an auth token for any user, including themselves. -func (client IdentityClient) CreateAuthToken(ctx context.Context, request CreateAuthTokenRequest) (response CreateAuthTokenResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createAuthToken, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateAuthTokenResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateAuthTokenResponse") - } - return -} - -// createAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createAuthToken(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/authTokens/") - if err != nil { - return nil, err - } - - var response CreateAuthTokenResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateCompartment Creates a new compartment in your tenancy. -// **Important:** Compartments cannot be deleted. -// You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy -// is simply the root compartment. For information about OCIDs, see -// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). -// You must also specify a *name* for the compartment, which must be unique across all compartments in -// your tenancy. You can use this name or the OCID when writing policies that apply -// to the compartment. For more information about policies, see -// How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm). -// You must also specify a *description* for the compartment (although it can be an empty string). It does -// not have to be unique, and you can change it anytime with -// UpdateCompartment. -// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the -// object, first make sure its `lifecycleState` has changed to ACTIVE. -func (client IdentityClient) CreateCompartment(ctx context.Context, request CreateCompartmentRequest) (response CreateCompartmentResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createCompartment, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateCompartmentResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateCompartmentResponse") - } - return -} - -// createCompartment implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createCompartment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/compartments/") - if err != nil { - return nil, err - } - - var response CreateCompartmentResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateCustomerSecretKey Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service's Amazon S3 -// compatible API. For information, see -// Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). -// You must specify a *description* for the secret key (although it can be an empty string). It does not -// have to be unique, and you can change it anytime with -// UpdateCustomerSecretKey. -// Every user has permission to create a secret key for *their own user ID*. An administrator in your organization -// does not need to write a policy to give users this ability. To compare, administrators who have permission to the -// tenancy can use this operation to create a secret key for any user, including themselves. -func (client IdentityClient) CreateCustomerSecretKey(ctx context.Context, request CreateCustomerSecretKeyRequest) (response CreateCustomerSecretKeyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createCustomerSecretKey, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateCustomerSecretKeyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateCustomerSecretKeyResponse") - } - return -} - -// createCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createCustomerSecretKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/customerSecretKeys/") - if err != nil { - return nil, err - } - - var response CreateCustomerSecretKeyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateDynamicGroup Creates a new dynamic group in your tenancy. -// You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy -// is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) -// reside within the tenancy itself, unlike cloud resources such as compute instances, which typically -// reside within compartments inside the tenancy. For information about OCIDs, see -// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). -// You must also specify a *name* for the dynamic group, which must be unique across all dynamic groups in your -// tenancy, and cannot be changed. Note that this name has to be also unique accross all groups in your tenancy. -// You can use this name or the OCID when writing policies that apply to the dynamic group. For more information -// about policies, see How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm). -// You must also specify a *description* for the dynamic group (although it can be an empty string). It does not -// have to be unique, and you can change it anytime with UpdateDynamicGroup. -// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the -// object, first make sure its `lifecycleState` has changed to ACTIVE. -func (client IdentityClient) CreateDynamicGroup(ctx context.Context, request CreateDynamicGroupRequest) (response CreateDynamicGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createDynamicGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateDynamicGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateDynamicGroupResponse") - } - return -} - -// createDynamicGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createDynamicGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/dynamicGroups/") - if err != nil { - return nil, err - } - - var response CreateDynamicGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateGroup Creates a new group in your tenancy. -// You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy -// is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) -// reside within the tenancy itself, unlike cloud resources such as compute instances, which typically -// reside within compartments inside the tenancy. For information about OCIDs, see -// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). -// You must also specify a *name* for the group, which must be unique across all groups in your tenancy and -// cannot be changed. You can use this name or the OCID when writing policies that apply to the group. For more -// information about policies, see How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm). -// You must also specify a *description* for the group (although it can be an empty string). It does not -// have to be unique, and you can change it anytime with UpdateGroup. -// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the -// object, first make sure its `lifecycleState` has changed to ACTIVE. -// After creating the group, you need to put users in it and write policies for it. -// See AddUserToGroup and -// CreatePolicy. -func (client IdentityClient) CreateGroup(ctx context.Context, request CreateGroupRequest) (response CreateGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateGroupResponse") - } - return -} - -// createGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/groups/") - if err != nil { - return nil, err - } - - var response CreateGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateIdentityProvider Creates a new identity provider in your tenancy. For more information, see -// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). -// You must specify your tenancy's OCID as the compartment ID in the request object. -// Remember that the tenancy is simply the root compartment. For information about -// OCIDs, see Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). -// You must also specify a *name* for the `IdentityProvider`, which must be unique -// across all `IdentityProvider` objects in your tenancy and cannot be changed. -// You must also specify a *description* for the `IdentityProvider` (although -// it can be an empty string). It does not have to be unique, and you can change -// it anytime with -// UpdateIdentityProvider. -// After you send your request, the new object's `lifecycleState` will temporarily -// be CREATING. Before using the object, first make sure its `lifecycleState` has -// changed to ACTIVE. -func (client IdentityClient) CreateIdentityProvider(ctx context.Context, request CreateIdentityProviderRequest) (response CreateIdentityProviderResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createIdentityProvider, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateIdentityProviderResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateIdentityProviderResponse") - } - return -} - -// createIdentityProvider implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createIdentityProvider(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/identityProviders/") - if err != nil { - return nil, err - } - - var response CreateIdentityProviderResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &identityprovider{}) - return response, err -} - -// CreateIdpGroupMapping Creates a single mapping between an IdP group and an IAM Service -// Group. -func (client IdentityClient) CreateIdpGroupMapping(ctx context.Context, request CreateIdpGroupMappingRequest) (response CreateIdpGroupMappingResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createIdpGroupMapping, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateIdpGroupMappingResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateIdpGroupMappingResponse") - } - return -} - -// createIdpGroupMapping implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createIdpGroupMapping(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/identityProviders/{identityProviderId}/groupMappings/") - if err != nil { - return nil, err - } - - var response CreateIdpGroupMappingResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateOrResetUIPassword Creates a new Console one-time password for the specified user. For more information about user -// credentials, see User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm). -// Use this operation after creating a new user, or if a user forgets their password. The new one-time -// password is returned to you in the response, and you must securely deliver it to the user. They'll -// be prompted to change this password the next time they sign in to the Console. If they don't change -// it within 7 days, the password will expire and you'll need to create a new one-time password for the -// user. -// **Note:** The user's Console login is the unique name you specified when you created the user -// (see CreateUser). -func (client IdentityClient) CreateOrResetUIPassword(ctx context.Context, request CreateOrResetUIPasswordRequest) (response CreateOrResetUIPasswordResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createOrResetUIPassword, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateOrResetUIPasswordResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateOrResetUIPasswordResponse") - } - return -} - -// createOrResetUIPassword implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createOrResetUIPassword(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/uiPassword") - if err != nil { - return nil, err - } - - var response CreateOrResetUIPasswordResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreatePolicy Creates a new policy in the specified compartment (either the tenancy or another of your compartments). -// If you're new to policies, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -// You must specify a *name* for the policy, which must be unique across all policies in your tenancy -// and cannot be changed. -// You must also specify a *description* for the policy (although it can be an empty string). It does not -// have to be unique, and you can change it anytime with UpdatePolicy. -// You must specify one or more policy statements in the statements array. For information about writing -// policies, see How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and -// Common Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm). -// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the -// object, first make sure its `lifecycleState` has changed to ACTIVE. -// New policies take effect typically within 10 seconds. -func (client IdentityClient) CreatePolicy(ctx context.Context, request CreatePolicyRequest) (response CreatePolicyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createPolicy, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreatePolicyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreatePolicyResponse") - } - return -} - -// createPolicy implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createPolicy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/policies/") - if err != nil { - return nil, err - } - - var response CreatePolicyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateRegionSubscription Creates a subscription to a region for a tenancy. -func (client IdentityClient) CreateRegionSubscription(ctx context.Context, request CreateRegionSubscriptionRequest) (response CreateRegionSubscriptionResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createRegionSubscription, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateRegionSubscriptionResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateRegionSubscriptionResponse") - } - return -} - -// createRegionSubscription implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createRegionSubscription(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/tenancies/{tenancyId}/regionSubscriptions") - if err != nil { - return nil, err - } - - var response CreateRegionSubscriptionResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateSmtpCredential Creates a new SMTP credential for the specified user. An SMTP credential has an SMTP user name and an SMTP password. -// You must specify a *description* for the SMTP credential (although it can be an empty string). It does not -// have to be unique, and you can change it anytime with -// UpdateSmtpCredential. -func (client IdentityClient) CreateSmtpCredential(ctx context.Context, request CreateSmtpCredentialRequest) (response CreateSmtpCredentialResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createSmtpCredential, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateSmtpCredentialResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateSmtpCredentialResponse") - } - return -} - -// createSmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createSmtpCredential(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/smtpCredentials/") - if err != nil { - return nil, err - } - - var response CreateSmtpCredentialResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateSwiftPassword **Deprecated. Use CreateAuthToken instead.** -// Creates a new Swift password for the specified user. For information about what Swift passwords are for, see -// Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). -// You must specify a *description* for the Swift password (although it can be an empty string). It does not -// have to be unique, and you can change it anytime with -// UpdateSwiftPassword. -// Every user has permission to create a Swift password for *their own user ID*. An administrator in your organization -// does not need to write a policy to give users this ability. To compare, administrators who have permission to the -// tenancy can use this operation to create a Swift password for any user, including themselves. -func (client IdentityClient) CreateSwiftPassword(ctx context.Context, request CreateSwiftPasswordRequest) (response CreateSwiftPasswordResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createSwiftPassword, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateSwiftPasswordResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateSwiftPasswordResponse") - } - return -} - -// createSwiftPassword implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createSwiftPassword(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/swiftPasswords/") - if err != nil { - return nil, err - } - - var response CreateSwiftPasswordResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateTag Creates a new tag in the specified tag namespace. -// You must specify either the OCID or the name of the tag namespace that will contain this tag definition. -// You must also specify a *name* for the tag, which must be unique across all tags in the tag namespace -// and cannot be changed. The name can contain any ASCII character except the space (_) or period (.) characters. -// Names are case insensitive. That means, for example, "myTag" and "mytag" are not allowed in the same namespace. -// If you specify a name that's already in use in the tag namespace, a 409 error is returned. -// You must also specify a *description* for the tag. -// It does not have to be unique, and you can change it with -// UpdateTag. -func (client IdentityClient) CreateTag(ctx context.Context, request CreateTagRequest) (response CreateTagResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createTag, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateTagResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateTagResponse") - } - return -} - -// createTag implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createTag(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/tagNamespaces/{tagNamespaceId}/tags") - if err != nil { - return nil, err - } - - var response CreateTagResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateTagNamespace Creates a new tag namespace in the specified compartment. -// You must specify the compartment ID in the request object (remember that the tenancy is simply the root -// compartment). -// You must also specify a *name* for the namespace, which must be unique across all namespaces in your tenancy -// and cannot be changed. The name can contain any ASCII character except the space (_) or period (.). -// Names are case insensitive. That means, for example, "myNamespace" and "mynamespace" are not allowed -// in the same tenancy. Once you created a namespace, you cannot change the name. -// If you specify a name that's already in use in the tenancy, a 409 error is returned. -// You must also specify a *description* for the namespace. -// It does not have to be unique, and you can change it with -// UpdateTagNamespace. -// Tag namespaces cannot be deleted, but they can be retired. -// See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring) for more information. -func (client IdentityClient) CreateTagNamespace(ctx context.Context, request CreateTagNamespaceRequest) (response CreateTagNamespaceResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createTagNamespace, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateTagNamespaceResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateTagNamespaceResponse") - } - return -} - -// createTagNamespace implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createTagNamespace(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/tagNamespaces") - if err != nil { - return nil, err - } - - var response CreateTagNamespaceResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateUser Creates a new user in your tenancy. For conceptual information about users, your tenancy, and other -// IAM Service components, see Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). -// You must specify your tenancy's OCID as the compartment ID in the request object (remember that the -// tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and -// some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, -// which typically reside within compartments inside the tenancy. For information about OCIDs, see -// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). -// You must also specify a *name* for the user, which must be unique across all users in your tenancy -// and cannot be changed. Allowed characters: No spaces. Only letters, numerals, hyphens, periods, -// underscores, +, and @. If you specify a name that's already in use, you'll get a 409 error. -// This name will be the user's login to the Console. You might want to pick a -// name that your company's own identity system (e.g., Active Directory, LDAP, etc.) already uses. -// If you delete a user and then create a new user with the same name, they'll be considered different -// users because they have different OCIDs. -// You must also specify a *description* for the user (although it can be an empty string). -// It does not have to be unique, and you can change it anytime with -// UpdateUser. You can use the field to provide the user's -// full name, a description, a nickname, or other information to generally identify the user. -// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before -// using the object, first make sure its `lifecycleState` has changed to ACTIVE. -// A new user has no permissions until you place the user in one or more groups (see -// AddUserToGroup). If the user needs to -// access the Console, you need to provide the user a password (see -// CreateOrResetUIPassword). -// If the user needs to access the Oracle Cloud Infrastructure REST API, you need to upload a -// public API signing key for that user (see -// Required Keys and OCIDs (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) and also -// UploadApiKey). -// **Important:** Make sure to inform the new user which compartment(s) they have access to. -func (client IdentityClient) CreateUser(ctx context.Context, request CreateUserRequest) (response CreateUserResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createUser, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateUserResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateUserResponse") - } - return -} - -// createUser implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) createUser(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/") - if err != nil { - return nil, err - } - - var response CreateUserResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteApiKey Deletes the specified API signing key for the specified user. -// Every user has permission to use this operation to delete a key for *their own user ID*. An -// administrator in your organization does not need to write a policy to give users this ability. -// To compare, administrators who have permission to the tenancy can use this operation to delete -// a key for any user, including themselves. -func (client IdentityClient) DeleteApiKey(ctx context.Context, request DeleteApiKeyRequest) (response DeleteApiKeyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteApiKey, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteApiKeyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteApiKeyResponse") - } - return -} - -// deleteApiKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteApiKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/apiKeys/{fingerprint}") - if err != nil { - return nil, err - } - - var response DeleteApiKeyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteAuthToken Deletes the specified auth token for the specified user. -func (client IdentityClient) DeleteAuthToken(ctx context.Context, request DeleteAuthTokenRequest) (response DeleteAuthTokenResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteAuthToken, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteAuthTokenResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteAuthTokenResponse") - } - return -} - -// deleteAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteAuthToken(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/authTokens/{authTokenId}") - if err != nil { - return nil, err - } - - var response DeleteAuthTokenResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteCustomerSecretKey Deletes the specified secret key for the specified user. -func (client IdentityClient) DeleteCustomerSecretKey(ctx context.Context, request DeleteCustomerSecretKeyRequest) (response DeleteCustomerSecretKeyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteCustomerSecretKey, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteCustomerSecretKeyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteCustomerSecretKeyResponse") - } - return -} - -// deleteCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteCustomerSecretKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/customerSecretKeys/{customerSecretKeyId}") - if err != nil { - return nil, err - } - - var response DeleteCustomerSecretKeyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteDynamicGroup Deletes the specified dynamic group. -func (client IdentityClient) DeleteDynamicGroup(ctx context.Context, request DeleteDynamicGroupRequest) (response DeleteDynamicGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteDynamicGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteDynamicGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteDynamicGroupResponse") - } - return -} - -// deleteDynamicGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteDynamicGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dynamicGroups/{dynamicGroupId}") - if err != nil { - return nil, err - } - - var response DeleteDynamicGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteGroup Deletes the specified group. The group must be empty. -func (client IdentityClient) DeleteGroup(ctx context.Context, request DeleteGroupRequest) (response DeleteGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteGroupResponse") - } - return -} - -// deleteGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/groups/{groupId}") - if err != nil { - return nil, err - } - - var response DeleteGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteIdentityProvider Deletes the specified identity provider. The identity provider must not have -// any group mappings (see IdpGroupMapping). -func (client IdentityClient) DeleteIdentityProvider(ctx context.Context, request DeleteIdentityProviderRequest) (response DeleteIdentityProviderResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteIdentityProvider, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteIdentityProviderResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteIdentityProviderResponse") - } - return -} - -// deleteIdentityProvider implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteIdentityProvider(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/identityProviders/{identityProviderId}") - if err != nil { - return nil, err - } - - var response DeleteIdentityProviderResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteIdpGroupMapping Deletes the specified group mapping. -func (client IdentityClient) DeleteIdpGroupMapping(ctx context.Context, request DeleteIdpGroupMappingRequest) (response DeleteIdpGroupMappingResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteIdpGroupMapping, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteIdpGroupMappingResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteIdpGroupMappingResponse") - } - return -} - -// deleteIdpGroupMapping implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteIdpGroupMapping(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}") - if err != nil { - return nil, err - } - - var response DeleteIdpGroupMappingResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeletePolicy Deletes the specified policy. The deletion takes effect typically within 10 seconds. -func (client IdentityClient) DeletePolicy(ctx context.Context, request DeletePolicyRequest) (response DeletePolicyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deletePolicy, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeletePolicyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeletePolicyResponse") - } - return -} - -// deletePolicy implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deletePolicy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/policies/{policyId}") - if err != nil { - return nil, err - } - - var response DeletePolicyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteSmtpCredential Deletes the specified SMTP credential for the specified user. -func (client IdentityClient) DeleteSmtpCredential(ctx context.Context, request DeleteSmtpCredentialRequest) (response DeleteSmtpCredentialResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteSmtpCredential, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteSmtpCredentialResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteSmtpCredentialResponse") - } - return -} - -// deleteSmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteSmtpCredential(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/smtpCredentials/{smtpCredentialId}") - if err != nil { - return nil, err - } - - var response DeleteSmtpCredentialResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteSwiftPassword **Deprecated. Use DeleteAuthToken instead.** -// Deletes the specified Swift password for the specified user. -func (client IdentityClient) DeleteSwiftPassword(ctx context.Context, request DeleteSwiftPasswordRequest) (response DeleteSwiftPasswordResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteSwiftPassword, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteSwiftPasswordResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteSwiftPasswordResponse") - } - return -} - -// deleteSwiftPassword implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteSwiftPassword(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}/swiftPasswords/{swiftPasswordId}") - if err != nil { - return nil, err - } - - var response DeleteSwiftPasswordResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteUser Deletes the specified user. The user must not be in any groups. -func (client IdentityClient) DeleteUser(ctx context.Context, request DeleteUserRequest) (response DeleteUserResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteUser, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteUserResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteUserResponse") - } - return -} - -// deleteUser implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) deleteUser(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/users/{userId}") - if err != nil { - return nil, err - } - - var response DeleteUserResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetCompartment Gets the specified compartment's information. -// This operation does not return a list of all the resources inside the compartment. There is no single -// API operation that does that. Compartments can contain multiple types of resources (instances, block -// storage volumes, etc.). To find out what's in a compartment, you must call the "List" operation for -// each resource type and specify the compartment's OCID as a query parameter in the request. For example, -// call the ListInstances operation in the Cloud Compute -// Service or the ListVolumes operation in Cloud Block Storage. -func (client IdentityClient) GetCompartment(ctx context.Context, request GetCompartmentRequest) (response GetCompartmentResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getCompartment, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetCompartmentResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetCompartmentResponse") - } - return -} - -// getCompartment implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getCompartment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/compartments/{compartmentId}") - if err != nil { - return nil, err - } - - var response GetCompartmentResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetDynamicGroup Gets the specified dynamic group's information. -func (client IdentityClient) GetDynamicGroup(ctx context.Context, request GetDynamicGroupRequest) (response GetDynamicGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getDynamicGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetDynamicGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDynamicGroupResponse") - } - return -} - -// getDynamicGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getDynamicGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dynamicGroups/{dynamicGroupId}") - if err != nil { - return nil, err - } - - var response GetDynamicGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetGroup Gets the specified group's information. -// This operation does not return a list of all the users in the group. To do that, use -// ListUserGroupMemberships and -// provide the group's OCID as a query parameter in the request. -func (client IdentityClient) GetGroup(ctx context.Context, request GetGroupRequest) (response GetGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetGroupResponse") - } - return -} - -// getGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/groups/{groupId}") - if err != nil { - return nil, err - } - - var response GetGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetIdentityProvider Gets the specified identity provider's information. -func (client IdentityClient) GetIdentityProvider(ctx context.Context, request GetIdentityProviderRequest) (response GetIdentityProviderResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getIdentityProvider, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetIdentityProviderResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetIdentityProviderResponse") - } - return -} - -// getIdentityProvider implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getIdentityProvider(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/identityProviders/{identityProviderId}") - if err != nil { - return nil, err - } - - var response GetIdentityProviderResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &identityprovider{}) - return response, err -} - -// GetIdpGroupMapping Gets the specified group mapping. -func (client IdentityClient) GetIdpGroupMapping(ctx context.Context, request GetIdpGroupMappingRequest) (response GetIdpGroupMappingResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getIdpGroupMapping, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetIdpGroupMappingResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetIdpGroupMappingResponse") - } - return -} - -// getIdpGroupMapping implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getIdpGroupMapping(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}") - if err != nil { - return nil, err - } - - var response GetIdpGroupMappingResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetPolicy Gets the specified policy's information. -func (client IdentityClient) GetPolicy(ctx context.Context, request GetPolicyRequest) (response GetPolicyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getPolicy, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetPolicyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetPolicyResponse") - } - return -} - -// getPolicy implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getPolicy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/policies/{policyId}") - if err != nil { - return nil, err - } - - var response GetPolicyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetTag Gets the specified tag's information. -func (client IdentityClient) GetTag(ctx context.Context, request GetTagRequest) (response GetTagResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getTag, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetTagResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetTagResponse") - } - return -} - -// getTag implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getTag(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/tagNamespaces/{tagNamespaceId}/tags/{tagName}") - if err != nil { - return nil, err - } - - var response GetTagResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetTagNamespace Gets the specified tag namespace's information. -func (client IdentityClient) GetTagNamespace(ctx context.Context, request GetTagNamespaceRequest) (response GetTagNamespaceResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getTagNamespace, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetTagNamespaceResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetTagNamespaceResponse") - } - return -} - -// getTagNamespace implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getTagNamespace(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/tagNamespaces/{tagNamespaceId}") - if err != nil { - return nil, err - } - - var response GetTagNamespaceResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetTenancy Get the specified tenancy's information. -func (client IdentityClient) GetTenancy(ctx context.Context, request GetTenancyRequest) (response GetTenancyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getTenancy, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetTenancyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetTenancyResponse") - } - return -} - -// getTenancy implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getTenancy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/tenancies/{tenancyId}") - if err != nil { - return nil, err - } - - var response GetTenancyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetUser Gets the specified user's information. -func (client IdentityClient) GetUser(ctx context.Context, request GetUserRequest) (response GetUserResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getUser, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetUserResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetUserResponse") - } - return -} - -// getUser implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getUser(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}") - if err != nil { - return nil, err - } - - var response GetUserResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetUserGroupMembership Gets the specified UserGroupMembership's information. -func (client IdentityClient) GetUserGroupMembership(ctx context.Context, request GetUserGroupMembershipRequest) (response GetUserGroupMembershipResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getUserGroupMembership, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetUserGroupMembershipResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetUserGroupMembershipResponse") - } - return -} - -// getUserGroupMembership implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) getUserGroupMembership(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/userGroupMemberships/{userGroupMembershipId}") - if err != nil { - return nil, err - } - - var response GetUserGroupMembershipResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListApiKeys Lists the API signing keys for the specified user. A user can have a maximum of three keys. -// Every user has permission to use this API call for *their own user ID*. An administrator in your -// organization does not need to write a policy to give users this ability. -func (client IdentityClient) ListApiKeys(ctx context.Context, request ListApiKeysRequest) (response ListApiKeysResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listApiKeys, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListApiKeysResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListApiKeysResponse") - } - return -} - -// listApiKeys implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listApiKeys(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/apiKeys/") - if err != nil { - return nil, err - } - - var response ListApiKeysResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListAuthTokens Lists the auth tokens for the specified user. The returned object contains the token's OCID, but not -// the token itself. The actual token is returned only upon creation. -func (client IdentityClient) ListAuthTokens(ctx context.Context, request ListAuthTokensRequest) (response ListAuthTokensResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listAuthTokens, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListAuthTokensResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAuthTokensResponse") - } - return -} - -// listAuthTokens implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listAuthTokens(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/authTokens/") - if err != nil { - return nil, err - } - - var response ListAuthTokensResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListAvailabilityDomains Lists the Availability Domains in your tenancy. Specify the OCID of either the tenancy or another -// of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). -// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). -func (client IdentityClient) ListAvailabilityDomains(ctx context.Context, request ListAvailabilityDomainsRequest) (response ListAvailabilityDomainsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listAvailabilityDomains, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListAvailabilityDomainsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAvailabilityDomainsResponse") - } - return -} - -// listAvailabilityDomains implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listAvailabilityDomains(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/availabilityDomains/") - if err != nil { - return nil, err - } - - var response ListAvailabilityDomainsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListCompartments Lists the compartments in your tenancy. You must specify your tenancy's OCID as the value -// for the compartment ID (remember that the tenancy is simply the root compartment). -// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). -func (client IdentityClient) ListCompartments(ctx context.Context, request ListCompartmentsRequest) (response ListCompartmentsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listCompartments, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListCompartmentsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListCompartmentsResponse") - } - return -} - -// listCompartments implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listCompartments(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/compartments/") - if err != nil { - return nil, err - } - - var response ListCompartmentsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListCustomerSecretKeys Lists the secret keys for the specified user. The returned object contains the secret key's OCID, but not -// the secret key itself. The actual secret key is returned only upon creation. -func (client IdentityClient) ListCustomerSecretKeys(ctx context.Context, request ListCustomerSecretKeysRequest) (response ListCustomerSecretKeysResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listCustomerSecretKeys, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListCustomerSecretKeysResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListCustomerSecretKeysResponse") - } - return -} - -// listCustomerSecretKeys implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listCustomerSecretKeys(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/customerSecretKeys/") - if err != nil { - return nil, err - } - - var response ListCustomerSecretKeysResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListDynamicGroups Lists the dynamic groups in your tenancy. You must specify your tenancy's OCID as the value for -// the compartment ID (remember that the tenancy is simply the root compartment). -// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). -func (client IdentityClient) ListDynamicGroups(ctx context.Context, request ListDynamicGroupsRequest) (response ListDynamicGroupsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listDynamicGroups, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListDynamicGroupsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDynamicGroupsResponse") - } - return -} - -// listDynamicGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listDynamicGroups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dynamicGroups/") - if err != nil { - return nil, err - } - - var response ListDynamicGroupsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListGroups Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for -// the compartment ID (remember that the tenancy is simply the root compartment). -// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). -func (client IdentityClient) ListGroups(ctx context.Context, request ListGroupsRequest) (response ListGroupsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listGroups, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListGroupsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListGroupsResponse") - } - return -} - -// listGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listGroups(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/groups/") - if err != nil { - return nil, err - } - - var response ListGroupsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -//listidentityprovider allows to unmarshal list of polymorphic IdentityProvider -type listidentityprovider []identityprovider - -//UnmarshalPolymorphicJSON unmarshals polymorphic json list of items -func (m *listidentityprovider) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { - res := make([]IdentityProvider, len(*m)) - for i, v := range *m { - nn, err := v.UnmarshalPolymorphicJSON(v.JsonData) - if err != nil { - return nil, err - } - res[i] = nn.(IdentityProvider) - } - return res, nil -} - -// ListIdentityProviders Lists all the identity providers in your tenancy. You must specify the identity provider type (e.g., `SAML2` for -// identity providers using the SAML2.0 protocol). You must specify your tenancy's OCID as the value for the -// compartment ID (remember that the tenancy is simply the root compartment). -// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). -func (client IdentityClient) ListIdentityProviders(ctx context.Context, request ListIdentityProvidersRequest) (response ListIdentityProvidersResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listIdentityProviders, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListIdentityProvidersResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListIdentityProvidersResponse") - } - return -} - -// listIdentityProviders implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listIdentityProviders(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/identityProviders/") - if err != nil { - return nil, err - } - - var response ListIdentityProvidersResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &listidentityprovider{}) - return response, err -} - -// ListIdpGroupMappings Lists the group mappings for the specified identity provider. -func (client IdentityClient) ListIdpGroupMappings(ctx context.Context, request ListIdpGroupMappingsRequest) (response ListIdpGroupMappingsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listIdpGroupMappings, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListIdpGroupMappingsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListIdpGroupMappingsResponse") - } - return -} - -// listIdpGroupMappings implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listIdpGroupMappings(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/identityProviders/{identityProviderId}/groupMappings/") - if err != nil { - return nil, err - } - - var response ListIdpGroupMappingsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListPolicies Lists the policies in the specified compartment (either the tenancy or another of your compartments). -// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). -// To determine which policies apply to a particular group or compartment, you must view the individual -// statements inside all your policies. There isn't a way to automatically obtain that information via the API. -func (client IdentityClient) ListPolicies(ctx context.Context, request ListPoliciesRequest) (response ListPoliciesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listPolicies, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListPoliciesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListPoliciesResponse") - } - return -} - -// listPolicies implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listPolicies(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/policies/") - if err != nil { - return nil, err - } - - var response ListPoliciesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListRegionSubscriptions Lists the region subscriptions for the specified tenancy. -func (client IdentityClient) ListRegionSubscriptions(ctx context.Context, request ListRegionSubscriptionsRequest) (response ListRegionSubscriptionsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listRegionSubscriptions, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListRegionSubscriptionsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListRegionSubscriptionsResponse") - } - return -} - -// listRegionSubscriptions implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listRegionSubscriptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/tenancies/{tenancyId}/regionSubscriptions") - if err != nil { - return nil, err - } - - var response ListRegionSubscriptionsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListRegions Lists all the regions offered by Oracle Cloud Infrastructure. -func (client IdentityClient) ListRegions(ctx context.Context) (response ListRegionsResponse, err error) { - var ociResponse common.OCIResponse - ociResponse, err = client.listRegions(ctx) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListRegionsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListRegionsResponse") - } - return -} - -// listRegions performs the request (retry policy is not enabled without a request object) -func (client IdentityClient) listRegions(ctx context.Context) (common.OCIResponse, error) { - httpRequest := common.MakeDefaultHTTPRequest(http.MethodGet, "/regions") - var err error - - var response ListRegionsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListSmtpCredentials Lists the SMTP credentials for the specified user. The returned object contains the credential's OCID, -// the SMTP user name but not the SMTP password. The SMTP password is returned only upon creation. -func (client IdentityClient) ListSmtpCredentials(ctx context.Context, request ListSmtpCredentialsRequest) (response ListSmtpCredentialsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listSmtpCredentials, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListSmtpCredentialsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSmtpCredentialsResponse") - } - return -} - -// listSmtpCredentials implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listSmtpCredentials(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/smtpCredentials/") - if err != nil { - return nil, err - } - - var response ListSmtpCredentialsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListSwiftPasswords **Deprecated. Use ListAuthTokens instead.** -// Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not -// the password itself. The actual password is returned only upon creation. -func (client IdentityClient) ListSwiftPasswords(ctx context.Context, request ListSwiftPasswordsRequest) (response ListSwiftPasswordsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listSwiftPasswords, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListSwiftPasswordsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSwiftPasswordsResponse") - } - return -} - -// listSwiftPasswords implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listSwiftPasswords(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/{userId}/swiftPasswords/") - if err != nil { - return nil, err - } - - var response ListSwiftPasswordsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListTagNamespaces Lists the tag namespaces in the specified compartment. -func (client IdentityClient) ListTagNamespaces(ctx context.Context, request ListTagNamespacesRequest) (response ListTagNamespacesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listTagNamespaces, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListTagNamespacesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListTagNamespacesResponse") - } - return -} - -// listTagNamespaces implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listTagNamespaces(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/tagNamespaces") - if err != nil { - return nil, err - } - - var response ListTagNamespacesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListTags Lists the tag definitions in the specified tag namespace. -func (client IdentityClient) ListTags(ctx context.Context, request ListTagsRequest) (response ListTagsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listTags, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListTagsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListTagsResponse") - } - return -} - -// listTags implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listTags(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/tagNamespaces/{tagNamespaceId}/tags") - if err != nil { - return nil, err - } - - var response ListTagsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListUserGroupMemberships Lists the `UserGroupMembership` objects in your tenancy. You must specify your tenancy's OCID -// as the value for the compartment ID -// (see Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five)). -// You must also then filter the list in one of these ways: -// - You can limit the results to just the memberships for a given user by specifying a `userId`. -// - Similarly, you can limit the results to just the memberships for a given group by specifying a `groupId`. -// - You can set both the `userId` and `groupId` to determine if the specified user is in the specified group. -// If the answer is no, the response is an empty list. -// - Although`userId` and `groupId` are not indvidually required, you must set one of them. -func (client IdentityClient) ListUserGroupMemberships(ctx context.Context, request ListUserGroupMembershipsRequest) (response ListUserGroupMembershipsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listUserGroupMemberships, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListUserGroupMembershipsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListUserGroupMembershipsResponse") - } - return -} - -// listUserGroupMemberships implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listUserGroupMemberships(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/userGroupMemberships/") - if err != nil { - return nil, err - } - - var response ListUserGroupMembershipsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListUsers Lists the users in your tenancy. You must specify your tenancy's OCID as the value for the -// compartment ID (remember that the tenancy is simply the root compartment). -// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). -func (client IdentityClient) ListUsers(ctx context.Context, request ListUsersRequest) (response ListUsersResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listUsers, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListUsersResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListUsersResponse") - } - return -} - -// listUsers implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) listUsers(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/users/") - if err != nil { - return nil, err - } - - var response ListUsersResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// RemoveUserFromGroup Removes a user from a group by deleting the corresponding `UserGroupMembership`. -func (client IdentityClient) RemoveUserFromGroup(ctx context.Context, request RemoveUserFromGroupRequest) (response RemoveUserFromGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.removeUserFromGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(RemoveUserFromGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into RemoveUserFromGroupResponse") - } - return -} - -// removeUserFromGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) removeUserFromGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/userGroupMemberships/{userGroupMembershipId}") - if err != nil { - return nil, err - } - - var response RemoveUserFromGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateAuthToken Updates the specified auth token's description. -func (client IdentityClient) UpdateAuthToken(ctx context.Context, request UpdateAuthTokenRequest) (response UpdateAuthTokenResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateAuthToken, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateAuthTokenResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateAuthTokenResponse") - } - return -} - -// updateAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateAuthToken(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/authTokens/{authTokenId}") - if err != nil { - return nil, err - } - - var response UpdateAuthTokenResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateCompartment Updates the specified compartment's description or name. You can't update the root compartment. -func (client IdentityClient) UpdateCompartment(ctx context.Context, request UpdateCompartmentRequest) (response UpdateCompartmentResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateCompartment, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateCompartmentResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateCompartmentResponse") - } - return -} - -// updateCompartment implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateCompartment(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/compartments/{compartmentId}") - if err != nil { - return nil, err - } - - var response UpdateCompartmentResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateCustomerSecretKey Updates the specified secret key's description. -func (client IdentityClient) UpdateCustomerSecretKey(ctx context.Context, request UpdateCustomerSecretKeyRequest) (response UpdateCustomerSecretKeyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateCustomerSecretKey, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateCustomerSecretKeyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateCustomerSecretKeyResponse") - } - return -} - -// updateCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateCustomerSecretKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/customerSecretKeys/{customerSecretKeyId}") - if err != nil { - return nil, err - } - - var response UpdateCustomerSecretKeyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateDynamicGroup Updates the specified dynamic group. -func (client IdentityClient) UpdateDynamicGroup(ctx context.Context, request UpdateDynamicGroupRequest) (response UpdateDynamicGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateDynamicGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateDynamicGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDynamicGroupResponse") - } - return -} - -// updateDynamicGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateDynamicGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/dynamicGroups/{dynamicGroupId}") - if err != nil { - return nil, err - } - - var response UpdateDynamicGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateGroup Updates the specified group. -func (client IdentityClient) UpdateGroup(ctx context.Context, request UpdateGroupRequest) (response UpdateGroupResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateGroup, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateGroupResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateGroupResponse") - } - return -} - -// updateGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateGroup(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/groups/{groupId}") - if err != nil { - return nil, err - } - - var response UpdateGroupResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateIdentityProvider Updates the specified identity provider. -func (client IdentityClient) UpdateIdentityProvider(ctx context.Context, request UpdateIdentityProviderRequest) (response UpdateIdentityProviderResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateIdentityProvider, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateIdentityProviderResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateIdentityProviderResponse") - } - return -} - -// updateIdentityProvider implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateIdentityProvider(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/identityProviders/{identityProviderId}") - if err != nil { - return nil, err - } - - var response UpdateIdentityProviderResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &identityprovider{}) - return response, err -} - -// UpdateIdpGroupMapping Updates the specified group mapping. -func (client IdentityClient) UpdateIdpGroupMapping(ctx context.Context, request UpdateIdpGroupMappingRequest) (response UpdateIdpGroupMappingResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateIdpGroupMapping, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateIdpGroupMappingResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateIdpGroupMappingResponse") - } - return -} - -// updateIdpGroupMapping implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateIdpGroupMapping(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}") - if err != nil { - return nil, err - } - - var response UpdateIdpGroupMappingResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdatePolicy Updates the specified policy. You can update the description or the policy statements themselves. -// Policy changes take effect typically within 10 seconds. -func (client IdentityClient) UpdatePolicy(ctx context.Context, request UpdatePolicyRequest) (response UpdatePolicyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updatePolicy, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdatePolicyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdatePolicyResponse") - } - return -} - -// updatePolicy implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updatePolicy(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/policies/{policyId}") - if err != nil { - return nil, err - } - - var response UpdatePolicyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateSmtpCredential Updates the specified SMTP credential's description. -func (client IdentityClient) UpdateSmtpCredential(ctx context.Context, request UpdateSmtpCredentialRequest) (response UpdateSmtpCredentialResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateSmtpCredential, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateSmtpCredentialResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateSmtpCredentialResponse") - } - return -} - -// updateSmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateSmtpCredential(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/smtpCredentials/{smtpCredentialId}") - if err != nil { - return nil, err - } - - var response UpdateSmtpCredentialResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateSwiftPassword **Deprecated. Use UpdateAuthToken instead.** -// Updates the specified Swift password's description. -func (client IdentityClient) UpdateSwiftPassword(ctx context.Context, request UpdateSwiftPasswordRequest) (response UpdateSwiftPasswordResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateSwiftPassword, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateSwiftPasswordResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateSwiftPasswordResponse") - } - return -} - -// updateSwiftPassword implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateSwiftPassword(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/swiftPasswords/{swiftPasswordId}") - if err != nil { - return nil, err - } - - var response UpdateSwiftPasswordResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateTag Updates the the specified tag definition. You can update `description`, and `isRetired`. -func (client IdentityClient) UpdateTag(ctx context.Context, request UpdateTagRequest) (response UpdateTagResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateTag, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateTagResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateTagResponse") - } - return -} - -// updateTag implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateTag(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/tagNamespaces/{tagNamespaceId}/tags/{tagName}") - if err != nil { - return nil, err - } - - var response UpdateTagResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateTagNamespace Updates the the specified tag namespace. You can't update the namespace name. -// Updating `isRetired` to 'true' retires the namespace and all the tag definitions in the namespace. Reactivating a -// namespace (changing `isRetired` from 'true' to 'false') does not reactivate tag definitions. -// To reactivate the tag definitions, you must reactivate each one indvidually *after* you reactivate the namespace, -// using UpdateTag. For more information about retiring tag namespaces, see -// Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). -// You can't add a namespace with the same name as a retired namespace in the same tenancy. -func (client IdentityClient) UpdateTagNamespace(ctx context.Context, request UpdateTagNamespaceRequest) (response UpdateTagNamespaceResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateTagNamespace, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateTagNamespaceResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateTagNamespaceResponse") - } - return -} - -// updateTagNamespace implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateTagNamespace(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/tagNamespaces/{tagNamespaceId}") - if err != nil { - return nil, err - } - - var response UpdateTagNamespaceResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateUser Updates the description of the specified user. -func (client IdentityClient) UpdateUser(ctx context.Context, request UpdateUserRequest) (response UpdateUserResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateUser, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateUserResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateUserResponse") - } - return -} - -// updateUser implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateUser(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}") - if err != nil { - return nil, err - } - - var response UpdateUserResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateUserState Updates the state of the specified user. -func (client IdentityClient) UpdateUserState(ctx context.Context, request UpdateUserStateRequest) (response UpdateUserStateResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateUserState, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateUserStateResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateUserStateResponse") - } - return -} - -// updateUserState implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) updateUserState(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/users/{userId}/state/") - if err != nil { - return nil, err - } - - var response UpdateUserStateResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UploadApiKey Uploads an API signing key for the specified user. -// Every user has permission to use this operation to upload a key for *their own user ID*. An -// administrator in your organization does not need to write a policy to give users this ability. -// To compare, administrators who have permission to the tenancy can use this operation to upload a -// key for any user, including themselves. -// **Important:** Even though you have permission to upload an API key, you might not yet -// have permission to do much else. If you try calling an operation unrelated to your own credential -// management (e.g., `ListUsers`, `LaunchInstance`) and receive an "unauthorized" error, -// check with an administrator to confirm which IAM Service group(s) you're in and what access -// you have. Also confirm you're working in the correct compartment. -// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using -// the object, first make sure its `lifecycleState` has changed to ACTIVE. -func (client IdentityClient) UploadApiKey(ctx context.Context, request UploadApiKeyRequest) (response UploadApiKeyResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.uploadApiKey, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UploadApiKeyResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UploadApiKeyResponse") - } - return -} - -// uploadApiKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityClient) uploadApiKey(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/users/{userId}/apiKeys/") - if err != nil { - return nil, err - } - - var response UploadApiKeyResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go b/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go deleted file mode 100644 index 6b3f9c572..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// IdentityProvider The resulting base object when you add an identity provider to your tenancy. A -// Saml2IdentityProvider -// is a specific type of `IdentityProvider` that supports the SAML 2.0 protocol. Each -// `IdentityProvider` object has its own OCID. For more information, see -// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type IdentityProvider interface { - - // The OCID of the `IdentityProvider`. - GetId() *string - - // The OCID of the tenancy containing the `IdentityProvider`. - GetCompartmentId() *string - - // The name you assign to the `IdentityProvider` during creation. The name - // must be unique across all `IdentityProvider` objects in the tenancy and - // cannot be changed. This is the name federated users see when choosing - // which identity provider to use when signing in to the Oracle Cloud Infrastructure - // Console. - GetName() *string - - // The description you assign to the `IdentityProvider` during creation. Does - // not have to be unique, and it's changeable. - GetDescription() *string - - // The identity provider service or product. - // Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft - // Active Directory Federation Services (ADFS). - // Allowed values are: - // - `ADFS` - // - `IDCS` - // Example: `IDCS` - GetProductType() *string - - // Date and time the `IdentityProvider` was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - GetTimeCreated() *common.SDKTime - - // The current state. After creating an `IdentityProvider`, make sure its - // `lifecycleState` changes from CREATING to ACTIVE before using it. - GetLifecycleState() IdentityProviderLifecycleStateEnum - - // The detailed status of INACTIVE lifecycleState. - GetInactiveStatus() *int - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - GetFreeformTags() map[string]string - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - GetDefinedTags() map[string]map[string]interface{} -} - -type identityprovider struct { - JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - Name *string `mandatory:"true" json:"name"` - Description *string `mandatory:"true" json:"description"` - ProductType *string `mandatory:"true" json:"productType"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - LifecycleState IdentityProviderLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - Protocol string `json:"protocol"` -} - -// UnmarshalJSON unmarshals json -func (m *identityprovider) UnmarshalJSON(data []byte) error { - m.JsonData = data - type Unmarshaleridentityprovider identityprovider - s := struct { - Model Unmarshaleridentityprovider - }{} - err := json.Unmarshal(data, &s.Model) - if err != nil { - return err - } - m.Id = s.Model.Id - m.CompartmentId = s.Model.CompartmentId - m.Name = s.Model.Name - m.Description = s.Model.Description - m.ProductType = s.Model.ProductType - m.TimeCreated = s.Model.TimeCreated - m.LifecycleState = s.Model.LifecycleState - m.InactiveStatus = s.Model.InactiveStatus - m.FreeformTags = s.Model.FreeformTags - m.DefinedTags = s.Model.DefinedTags - m.Protocol = s.Model.Protocol - - return err -} - -// UnmarshalPolymorphicJSON unmarshals polymorphic json -func (m *identityprovider) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { - var err error - switch m.Protocol { - case "SAML2": - mm := Saml2IdentityProvider{} - err = json.Unmarshal(data, &mm) - return mm, err - default: - return m, nil - } -} - -//GetId returns Id -func (m identityprovider) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m identityprovider) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetName returns Name -func (m identityprovider) GetName() *string { - return m.Name -} - -//GetDescription returns Description -func (m identityprovider) GetDescription() *string { - return m.Description -} - -//GetProductType returns ProductType -func (m identityprovider) GetProductType() *string { - return m.ProductType -} - -//GetTimeCreated returns TimeCreated -func (m identityprovider) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetLifecycleState returns LifecycleState -func (m identityprovider) GetLifecycleState() IdentityProviderLifecycleStateEnum { - return m.LifecycleState -} - -//GetInactiveStatus returns InactiveStatus -func (m identityprovider) GetInactiveStatus() *int { - return m.InactiveStatus -} - -//GetFreeformTags returns FreeformTags -func (m identityprovider) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m identityprovider) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -func (m identityprovider) String() string { - return common.PointerString(m) -} - -// IdentityProviderLifecycleStateEnum Enum with underlying type: string -type IdentityProviderLifecycleStateEnum string - -// Set of constants representing the allowable values for IdentityProviderLifecycleState -const ( - IdentityProviderLifecycleStateCreating IdentityProviderLifecycleStateEnum = "CREATING" - IdentityProviderLifecycleStateActive IdentityProviderLifecycleStateEnum = "ACTIVE" - IdentityProviderLifecycleStateInactive IdentityProviderLifecycleStateEnum = "INACTIVE" - IdentityProviderLifecycleStateDeleting IdentityProviderLifecycleStateEnum = "DELETING" - IdentityProviderLifecycleStateDeleted IdentityProviderLifecycleStateEnum = "DELETED" -) - -var mappingIdentityProviderLifecycleState = map[string]IdentityProviderLifecycleStateEnum{ - "CREATING": IdentityProviderLifecycleStateCreating, - "ACTIVE": IdentityProviderLifecycleStateActive, - "INACTIVE": IdentityProviderLifecycleStateInactive, - "DELETING": IdentityProviderLifecycleStateDeleting, - "DELETED": IdentityProviderLifecycleStateDeleted, -} - -// GetIdentityProviderLifecycleStateEnumValues Enumerates the set of values for IdentityProviderLifecycleState -func GetIdentityProviderLifecycleStateEnumValues() []IdentityProviderLifecycleStateEnum { - values := make([]IdentityProviderLifecycleStateEnum, 0) - for _, v := range mappingIdentityProviderLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/idp_group_mapping.go b/vendor/github.com/oracle/oci-go-sdk/identity/idp_group_mapping.go deleted file mode 100644 index cf9c0100b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/idp_group_mapping.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// IdpGroupMapping A mapping between a single group defined by the identity provider (IdP) you're federating with -// and a single IAM Service Group in Oracle Cloud Infrastructure. -// For more information about group mappings and what they're for, see -// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). -// A given IdP group can be mapped to zero, one, or multiple IAM Service groups, and vice versa. -// But each `IdPGroupMapping` object is between only a single IdP group and IAM Service group. -// Each `IdPGroupMapping` object has its own OCID. -// **Note:** Any users who are in more than 50 IdP groups cannot be authenticated to use the Oracle -// Cloud Infrastructure Console. -type IdpGroupMapping struct { - - // The OCID of the `IdpGroupMapping`. - Id *string `mandatory:"true" json:"id"` - - // The OCID of the `IdentityProvider` this mapping belongs to. - IdpId *string `mandatory:"true" json:"idpId"` - - // The name of the IdP group that is mapped to the IAM Service group. - IdpGroupName *string `mandatory:"true" json:"idpGroupName"` - - // The OCID of the IAM Service group that is mapped to the IdP group. - GroupId *string `mandatory:"true" json:"groupId"` - - // The OCID of the tenancy containing the `IdentityProvider`. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // Date and time the mapping was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The mapping's current state. After creating a mapping object, make sure its `lifecycleState` changes - // from CREATING to ACTIVE before using it. - LifecycleState IdpGroupMappingLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m IdpGroupMapping) String() string { - return common.PointerString(m) -} - -// IdpGroupMappingLifecycleStateEnum Enum with underlying type: string -type IdpGroupMappingLifecycleStateEnum string - -// Set of constants representing the allowable values for IdpGroupMappingLifecycleState -const ( - IdpGroupMappingLifecycleStateCreating IdpGroupMappingLifecycleStateEnum = "CREATING" - IdpGroupMappingLifecycleStateActive IdpGroupMappingLifecycleStateEnum = "ACTIVE" - IdpGroupMappingLifecycleStateInactive IdpGroupMappingLifecycleStateEnum = "INACTIVE" - IdpGroupMappingLifecycleStateDeleting IdpGroupMappingLifecycleStateEnum = "DELETING" - IdpGroupMappingLifecycleStateDeleted IdpGroupMappingLifecycleStateEnum = "DELETED" -) - -var mappingIdpGroupMappingLifecycleState = map[string]IdpGroupMappingLifecycleStateEnum{ - "CREATING": IdpGroupMappingLifecycleStateCreating, - "ACTIVE": IdpGroupMappingLifecycleStateActive, - "INACTIVE": IdpGroupMappingLifecycleStateInactive, - "DELETING": IdpGroupMappingLifecycleStateDeleting, - "DELETED": IdpGroupMappingLifecycleStateDeleted, -} - -// GetIdpGroupMappingLifecycleStateEnumValues Enumerates the set of values for IdpGroupMappingLifecycleState -func GetIdpGroupMappingLifecycleStateEnumValues() []IdpGroupMappingLifecycleStateEnum { - values := make([]IdpGroupMappingLifecycleStateEnum, 0) - for _, v := range mappingIdpGroupMappingLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go deleted file mode 100644 index 8193e69eb..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListApiKeysRequest wrapper for the ListApiKeys operation -type ListApiKeysRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListApiKeysRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListApiKeysRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListApiKeysRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListApiKeysResponse wrapper for the ListApiKeys operation -type ListApiKeysResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []ApiKey instance - Items []ApiKey `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListApiKeysResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListApiKeysResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_auth_tokens_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_auth_tokens_request_response.go deleted file mode 100644 index 6a9ffca80..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_auth_tokens_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListAuthTokensRequest wrapper for the ListAuthTokens operation -type ListAuthTokensRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListAuthTokensRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListAuthTokensRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListAuthTokensRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListAuthTokensResponse wrapper for the ListAuthTokens operation -type ListAuthTokensResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []AuthToken instance - Items []AuthToken `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListAuthTokensResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListAuthTokensResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go deleted file mode 100644 index 917b4288d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListAvailabilityDomainsRequest wrapper for the ListAvailabilityDomains operation -type ListAvailabilityDomainsRequest struct { - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListAvailabilityDomainsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListAvailabilityDomainsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListAvailabilityDomainsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListAvailabilityDomainsResponse wrapper for the ListAvailabilityDomains operation -type ListAvailabilityDomainsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []AvailabilityDomain instance - Items []AvailabilityDomain `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListAvailabilityDomainsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListAvailabilityDomainsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go deleted file mode 100644 index d132e3467..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListCompartmentsRequest wrapper for the ListCompartments operation -type ListCompartmentsRequest struct { - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListCompartmentsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListCompartmentsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListCompartmentsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListCompartmentsResponse wrapper for the ListCompartments operation -type ListCompartmentsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []Compartment instances - Items []Compartment `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListCompartmentsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListCompartmentsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go deleted file mode 100644 index 885d7ee96..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListCustomerSecretKeysRequest wrapper for the ListCustomerSecretKeys operation -type ListCustomerSecretKeysRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListCustomerSecretKeysRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListCustomerSecretKeysRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListCustomerSecretKeysRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListCustomerSecretKeysResponse wrapper for the ListCustomerSecretKeys operation -type ListCustomerSecretKeysResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []CustomerSecretKeySummary instance - Items []CustomerSecretKeySummary `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListCustomerSecretKeysResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListCustomerSecretKeysResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_dynamic_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_dynamic_groups_request_response.go deleted file mode 100644 index 9821c3bf3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_dynamic_groups_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListDynamicGroupsRequest wrapper for the ListDynamicGroups operation -type ListDynamicGroupsRequest struct { - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListDynamicGroupsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListDynamicGroupsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListDynamicGroupsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListDynamicGroupsResponse wrapper for the ListDynamicGroups operation -type ListDynamicGroupsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []DynamicGroup instances - Items []DynamicGroup `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListDynamicGroupsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListDynamicGroupsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go deleted file mode 100644 index 29e9d14ec..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListGroupsRequest wrapper for the ListGroups operation -type ListGroupsRequest struct { - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListGroupsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListGroupsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListGroupsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListGroupsResponse wrapper for the ListGroups operation -type ListGroupsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []Group instances - Items []Group `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListGroupsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListGroupsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go deleted file mode 100644 index f7200987e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListIdentityProvidersRequest wrapper for the ListIdentityProviders operation -type ListIdentityProvidersRequest struct { - - // The protocol used for federation. - Protocol ListIdentityProvidersProtocolEnum `mandatory:"true" contributesTo:"query" name:"protocol" omitEmpty:"true"` - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListIdentityProvidersRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListIdentityProvidersRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListIdentityProvidersRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListIdentityProvidersResponse wrapper for the ListIdentityProviders operation -type ListIdentityProvidersResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []IdentityProvider instances - Items []IdentityProvider `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListIdentityProvidersResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListIdentityProvidersResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListIdentityProvidersProtocolEnum Enum with underlying type: string -type ListIdentityProvidersProtocolEnum string - -// Set of constants representing the allowable values for ListIdentityProvidersProtocol -const ( - ListIdentityProvidersProtocolSaml2 ListIdentityProvidersProtocolEnum = "SAML2" -) - -var mappingListIdentityProvidersProtocol = map[string]ListIdentityProvidersProtocolEnum{ - "SAML2": ListIdentityProvidersProtocolSaml2, -} - -// GetListIdentityProvidersProtocolEnumValues Enumerates the set of values for ListIdentityProvidersProtocol -func GetListIdentityProvidersProtocolEnumValues() []ListIdentityProvidersProtocolEnum { - values := make([]ListIdentityProvidersProtocolEnum, 0) - for _, v := range mappingListIdentityProvidersProtocol { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go deleted file mode 100644 index 0c7536f42..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListIdpGroupMappingsRequest wrapper for the ListIdpGroupMappings operation -type ListIdpGroupMappingsRequest struct { - - // The OCID of the identity provider. - IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListIdpGroupMappingsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListIdpGroupMappingsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListIdpGroupMappingsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListIdpGroupMappingsResponse wrapper for the ListIdpGroupMappings operation -type ListIdpGroupMappingsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []IdpGroupMapping instances - Items []IdpGroupMapping `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListIdpGroupMappingsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListIdpGroupMappingsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go deleted file mode 100644 index 3b9b2f94e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListPoliciesRequest wrapper for the ListPolicies operation -type ListPoliciesRequest struct { - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListPoliciesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListPoliciesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListPoliciesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListPoliciesResponse wrapper for the ListPolicies operation -type ListPoliciesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []Policy instances - Items []Policy `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListPoliciesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListPoliciesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go deleted file mode 100644 index 48619d703..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListRegionSubscriptionsRequest wrapper for the ListRegionSubscriptions operation -type ListRegionSubscriptionsRequest struct { - - // The OCID of the tenancy. - TenancyId *string `mandatory:"true" contributesTo:"path" name:"tenancyId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListRegionSubscriptionsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListRegionSubscriptionsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListRegionSubscriptionsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListRegionSubscriptionsResponse wrapper for the ListRegionSubscriptions operation -type ListRegionSubscriptionsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []RegionSubscription instance - Items []RegionSubscription `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListRegionSubscriptionsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListRegionSubscriptionsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go deleted file mode 100644 index 7d1a5faba..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListRegionsRequest wrapper for the ListRegions operation -type ListRegionsRequest struct { - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListRegionsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListRegionsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListRegionsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListRegionsResponse wrapper for the ListRegions operation -type ListRegionsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []Region instance - Items []Region `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListRegionsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListRegionsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_smtp_credentials_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_smtp_credentials_request_response.go deleted file mode 100644 index dc6e099d8..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_smtp_credentials_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListSmtpCredentialsRequest wrapper for the ListSmtpCredentials operation -type ListSmtpCredentialsRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListSmtpCredentialsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListSmtpCredentialsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListSmtpCredentialsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListSmtpCredentialsResponse wrapper for the ListSmtpCredentials operation -type ListSmtpCredentialsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []SmtpCredentialSummary instance - Items []SmtpCredentialSummary `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListSmtpCredentialsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListSmtpCredentialsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go deleted file mode 100644 index eb6bc6b48..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListSwiftPasswordsRequest wrapper for the ListSwiftPasswords operation -type ListSwiftPasswordsRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListSwiftPasswordsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListSwiftPasswordsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListSwiftPasswordsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListSwiftPasswordsResponse wrapper for the ListSwiftPasswords operation -type ListSwiftPasswordsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []SwiftPassword instance - Items []SwiftPassword `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListSwiftPasswordsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListSwiftPasswordsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_tag_namespaces_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_tag_namespaces_request_response.go deleted file mode 100644 index 5d367d537..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_tag_namespaces_request_response.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListTagNamespacesRequest wrapper for the ListTagNamespaces operation -type ListTagNamespacesRequest struct { - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // An optional boolean parameter indicating whether to retrieve all tag namespaces in subcompartments. If this - // parameter is not specified, only the tag namespaces defined in the specified compartment are retrieved. - IncludeSubcompartments *bool `mandatory:"false" contributesTo:"query" name:"includeSubcompartments"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListTagNamespacesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListTagNamespacesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListTagNamespacesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListTagNamespacesResponse wrapper for the ListTagNamespaces operation -type ListTagNamespacesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []TagNamespaceSummary instances - Items []TagNamespaceSummary `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of tagNamespaces. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListTagNamespacesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListTagNamespacesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_tags_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_tags_request_response.go deleted file mode 100644 index fe201c404..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_tags_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListTagsRequest wrapper for the ListTags operation -type ListTagsRequest struct { - - // The OCID of the tag namespace. - TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListTagsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListTagsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListTagsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListTagsResponse wrapper for the ListTags operation -type ListTagsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []TagSummary instances - Items []TagSummary `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of tags. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListTagsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListTagsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go deleted file mode 100644 index bedd1f697..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListUserGroupMembershipsRequest wrapper for the ListUserGroupMemberships operation -type ListUserGroupMembershipsRequest struct { - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The OCID of the user. - UserId *string `mandatory:"false" contributesTo:"query" name:"userId"` - - // The OCID of the group. - GroupId *string `mandatory:"false" contributesTo:"query" name:"groupId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListUserGroupMembershipsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListUserGroupMembershipsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListUserGroupMembershipsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListUserGroupMembershipsResponse wrapper for the ListUserGroupMemberships operation -type ListUserGroupMembershipsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []UserGroupMembership instances - Items []UserGroupMembership `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListUserGroupMembershipsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListUserGroupMembershipsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go deleted file mode 100644 index 3bdd6b6a0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListUsersRequest wrapper for the ListUsers operation -type ListUsersRequest struct { - - // The OCID of the compartment (remember that the tenancy is simply the root compartment). - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The value of the `opc-next-page` response header from the previous "List" call. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The maximum number of items to return in a paginated "List" call. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListUsersRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListUsersRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListUsersRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListUsersResponse wrapper for the ListUsers operation -type ListUsersResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []User instances - Items []User `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListUsersResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListUsersResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/policy.go b/vendor/github.com/oracle/oci-go-sdk/identity/policy.go deleted file mode 100644 index be04461b5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/policy.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Policy A document that specifies the type of access a group has to the resources in a compartment. For information about -// policies and other IAM Service components, see -// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). If you're new to policies, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -// The word "policy" is used by people in different ways: -// * An individual statement written in the policy language -// * A collection of statements in a single, named "policy" document (which has an Oracle Cloud ID (OCID) assigned to it) -// * The overall body of policies your organization uses to control access to resources -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. -type Policy struct { - - // The OCID of the policy. - Id *string `mandatory:"true" json:"id"` - - // The OCID of the compartment containing the policy (either the tenancy or another compartment). - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the policy during creation. The name must be unique across all policies - // in the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // An array of one or more policy statements written in the policy language. - Statements []string `mandatory:"true" json:"statements"` - - // The description you assign to the policy. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // Date and time the policy was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The policy's current state. After creating a policy, make sure its `lifecycleState` changes from CREATING to - // ACTIVE before using it. - LifecycleState PolicyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` - - // The version of the policy. If null or set to an empty string, when a request comes in for authorization, the - // policy will be evaluated according to the current behavior of the services at that moment. If set to a particular - // date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - VersionDate *common.SDKTime `mandatory:"false" json:"versionDate"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m Policy) String() string { - return common.PointerString(m) -} - -// PolicyLifecycleStateEnum Enum with underlying type: string -type PolicyLifecycleStateEnum string - -// Set of constants representing the allowable values for PolicyLifecycleState -const ( - PolicyLifecycleStateCreating PolicyLifecycleStateEnum = "CREATING" - PolicyLifecycleStateActive PolicyLifecycleStateEnum = "ACTIVE" - PolicyLifecycleStateInactive PolicyLifecycleStateEnum = "INACTIVE" - PolicyLifecycleStateDeleting PolicyLifecycleStateEnum = "DELETING" - PolicyLifecycleStateDeleted PolicyLifecycleStateEnum = "DELETED" -) - -var mappingPolicyLifecycleState = map[string]PolicyLifecycleStateEnum{ - "CREATING": PolicyLifecycleStateCreating, - "ACTIVE": PolicyLifecycleStateActive, - "INACTIVE": PolicyLifecycleStateInactive, - "DELETING": PolicyLifecycleStateDeleting, - "DELETED": PolicyLifecycleStateDeleted, -} - -// GetPolicyLifecycleStateEnumValues Enumerates the set of values for PolicyLifecycleState -func GetPolicyLifecycleStateEnumValues() []PolicyLifecycleStateEnum { - values := make([]PolicyLifecycleStateEnum, 0) - for _, v := range mappingPolicyLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/region.go b/vendor/github.com/oracle/oci-go-sdk/identity/region.go deleted file mode 100644 index 36fa7d1d6..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/region.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Region A localized geographic area, such as Phoenix, AZ. Oracle Cloud Infrastructure is hosted in regions and Availability -// Domains. A region is composed of several Availability Domains. An Availability Domain is one or more data centers -// located within a region. For more information, see Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type Region struct { - - // The key of the region. - // Allowed values are: - // - `PHX` - // - `IAD` - // - `FRA` - // - `LHR` - Key *string `mandatory:"false" json:"key"` - - // The name of the region. - // Allowed values are: - // - `us-phoenix-1` - // - `us-ashburn-1` - // - `eu-frankfurt-1` - // - `uk-london-1` - Name *string `mandatory:"false" json:"name"` -} - -func (m Region) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go b/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go deleted file mode 100644 index 040558980..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// RegionSubscription An object that represents your tenancy's access to a particular region (i.e., a subscription), the status of that -// access, and whether that region is the home region. For more information, see Managing Regions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingregions.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type RegionSubscription struct { - - // The region's key. - // Allowed values are: - // - `PHX` - // - `IAD` - // - `FRA` - // - `LHR` - RegionKey *string `mandatory:"true" json:"regionKey"` - - // The region's name. - // Allowed values are: - // - `us-phoenix-1` - // - `us-ashburn-1` - // - `eu-frankurt-1` - // - `uk-london-1` - RegionName *string `mandatory:"true" json:"regionName"` - - // The region subscription status. - Status RegionSubscriptionStatusEnum `mandatory:"true" json:"status"` - - // Indicates if the region is the home region or not. - IsHomeRegion *bool `mandatory:"true" json:"isHomeRegion"` -} - -func (m RegionSubscription) String() string { - return common.PointerString(m) -} - -// RegionSubscriptionStatusEnum Enum with underlying type: string -type RegionSubscriptionStatusEnum string - -// Set of constants representing the allowable values for RegionSubscriptionStatus -const ( - RegionSubscriptionStatusReady RegionSubscriptionStatusEnum = "READY" - RegionSubscriptionStatusInProgress RegionSubscriptionStatusEnum = "IN_PROGRESS" -) - -var mappingRegionSubscriptionStatus = map[string]RegionSubscriptionStatusEnum{ - "READY": RegionSubscriptionStatusReady, - "IN_PROGRESS": RegionSubscriptionStatusInProgress, -} - -// GetRegionSubscriptionStatusEnumValues Enumerates the set of values for RegionSubscriptionStatus -func GetRegionSubscriptionStatusEnumValues() []RegionSubscriptionStatusEnum { - values := make([]RegionSubscriptionStatusEnum, 0) - for _, v := range mappingRegionSubscriptionStatus { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go deleted file mode 100644 index b488021ed..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// RemoveUserFromGroupRequest wrapper for the RemoveUserFromGroup operation -type RemoveUserFromGroupRequest struct { - - // The OCID of the userGroupMembership. - UserGroupMembershipId *string `mandatory:"true" contributesTo:"path" name:"userGroupMembershipId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request RemoveUserFromGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request RemoveUserFromGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request RemoveUserFromGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// RemoveUserFromGroupResponse wrapper for the RemoveUserFromGroup operation -type RemoveUserFromGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response RemoveUserFromGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response RemoveUserFromGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go b/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go deleted file mode 100644 index 265b07748..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// Saml2IdentityProvider A special type of IdentityProvider that -// supports the SAML 2.0 protocol. For more information, see -// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). -type Saml2IdentityProvider struct { - - // The OCID of the `IdentityProvider`. - Id *string `mandatory:"true" json:"id"` - - // The OCID of the tenancy containing the `IdentityProvider`. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the `IdentityProvider` during creation. The name - // must be unique across all `IdentityProvider` objects in the tenancy and - // cannot be changed. This is the name federated users see when choosing - // which identity provider to use when signing in to the Oracle Cloud Infrastructure - // Console. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the `IdentityProvider` during creation. Does - // not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // The identity provider service or product. - // Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft - // Active Directory Federation Services (ADFS). - // Allowed values are: - // - `ADFS` - // - `IDCS` - // Example: `IDCS` - ProductType *string `mandatory:"true" json:"productType"` - - // Date and time the `IdentityProvider` was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The URL for retrieving the identity provider's metadata, which - // contains information required for federating. - MetadataUrl *string `mandatory:"true" json:"metadataUrl"` - - // The identity provider's signing certificate used by the IAM Service - // to validate the SAML2 token. - SigningCertificate *string `mandatory:"true" json:"signingCertificate"` - - // The URL to redirect federated users to for authentication with the - // identity provider. - RedirectUrl *string `mandatory:"true" json:"redirectUrl"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // The current state. After creating an `IdentityProvider`, make sure its - // `lifecycleState` changes from CREATING to ACTIVE before using it. - LifecycleState IdentityProviderLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` -} - -//GetId returns Id -func (m Saml2IdentityProvider) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m Saml2IdentityProvider) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetName returns Name -func (m Saml2IdentityProvider) GetName() *string { - return m.Name -} - -//GetDescription returns Description -func (m Saml2IdentityProvider) GetDescription() *string { - return m.Description -} - -//GetProductType returns ProductType -func (m Saml2IdentityProvider) GetProductType() *string { - return m.ProductType -} - -//GetTimeCreated returns TimeCreated -func (m Saml2IdentityProvider) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetLifecycleState returns LifecycleState -func (m Saml2IdentityProvider) GetLifecycleState() IdentityProviderLifecycleStateEnum { - return m.LifecycleState -} - -//GetInactiveStatus returns InactiveStatus -func (m Saml2IdentityProvider) GetInactiveStatus() *int { - return m.InactiveStatus -} - -//GetFreeformTags returns FreeformTags -func (m Saml2IdentityProvider) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m Saml2IdentityProvider) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -func (m Saml2IdentityProvider) String() string { - return common.PointerString(m) -} - -// MarshalJSON marshals to json representation -func (m Saml2IdentityProvider) MarshalJSON() (buff []byte, e error) { - type MarshalTypeSaml2IdentityProvider Saml2IdentityProvider - s := struct { - DiscriminatorParam string `json:"protocol"` - MarshalTypeSaml2IdentityProvider - }{ - "SAML2", - (MarshalTypeSaml2IdentityProvider)(m), - } - - return json.Marshal(&s) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential.go b/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential.go deleted file mode 100644 index e2b8bda13..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SmtpCredential Simple Mail Transfer Protocol (SMTP) credentials are needed to send email through Email Delivery. -// The SMTP credentials are used for SMTP authentication with the service. The credentials never expire. -// A user can have up to 2 SMTP credentials at a time. -// **Note:** The credential set is always an Oracle-generated SMTP user name and password pair; -// you cannot designate the SMTP user name or the SMTP password. -// For more information, see Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm#SMTP). -type SmtpCredential struct { - - // The SMTP user name. - Username *string `mandatory:"false" json:"username"` - - // The SMTP password. - Password *string `mandatory:"false" json:"password"` - - // The OCID of the SMTP credential. - Id *string `mandatory:"false" json:"id"` - - // The OCID of the user the SMTP credential belongs to. - UserId *string `mandatory:"false" json:"userId"` - - // The description you assign to the SMTP credential. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // Date and time the `SmtpCredential` object was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // Date and time when this credential will expire, in the format defined by RFC3339. - // Null if it never expires. - // Example: `2016-08-25T21:10:29.600Z` - TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` - - // The credential's current state. After creating a SMTP credential, make sure its `lifecycleState` changes from - // CREATING to ACTIVE before using it. - LifecycleState SmtpCredentialLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m SmtpCredential) String() string { - return common.PointerString(m) -} - -// SmtpCredentialLifecycleStateEnum Enum with underlying type: string -type SmtpCredentialLifecycleStateEnum string - -// Set of constants representing the allowable values for SmtpCredentialLifecycleState -const ( - SmtpCredentialLifecycleStateCreating SmtpCredentialLifecycleStateEnum = "CREATING" - SmtpCredentialLifecycleStateActive SmtpCredentialLifecycleStateEnum = "ACTIVE" - SmtpCredentialLifecycleStateInactive SmtpCredentialLifecycleStateEnum = "INACTIVE" - SmtpCredentialLifecycleStateDeleting SmtpCredentialLifecycleStateEnum = "DELETING" - SmtpCredentialLifecycleStateDeleted SmtpCredentialLifecycleStateEnum = "DELETED" -) - -var mappingSmtpCredentialLifecycleState = map[string]SmtpCredentialLifecycleStateEnum{ - "CREATING": SmtpCredentialLifecycleStateCreating, - "ACTIVE": SmtpCredentialLifecycleStateActive, - "INACTIVE": SmtpCredentialLifecycleStateInactive, - "DELETING": SmtpCredentialLifecycleStateDeleting, - "DELETED": SmtpCredentialLifecycleStateDeleted, -} - -// GetSmtpCredentialLifecycleStateEnumValues Enumerates the set of values for SmtpCredentialLifecycleState -func GetSmtpCredentialLifecycleStateEnumValues() []SmtpCredentialLifecycleStateEnum { - values := make([]SmtpCredentialLifecycleStateEnum, 0) - for _, v := range mappingSmtpCredentialLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential_summary.go b/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential_summary.go deleted file mode 100644 index 5ad398c8b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/smtp_credential_summary.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SmtpCredentialSummary As the name suggests, an `SmtpCredentialSummary` object contains information about an `SmtpCredential`. -// The SMTP credential is used for SMTP authentication with -// the Email Delivery Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Email/Concepts/overview.htm). -type SmtpCredentialSummary struct { - - // The SMTP user name. - Username *string `mandatory:"false" json:"username"` - - // The OCID of the SMTP credential. - Id *string `mandatory:"false" json:"id"` - - // The OCID of the user the SMTP credential belongs to. - UserId *string `mandatory:"false" json:"userId"` - - // The description you assign to the SMTP credential. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // Date and time the `SmtpCredential` object was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // Date and time when this credential will expire, in the format defined by RFC3339. - // Null if it never expires. - // Example: `2016-08-25T21:10:29.600Z` - TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` - - // The credential's current state. After creating a SMTP credential, make sure its `lifecycleState` changes from - // CREATING to ACTIVE before using it. - LifecycleState SmtpCredentialSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m SmtpCredentialSummary) String() string { - return common.PointerString(m) -} - -// SmtpCredentialSummaryLifecycleStateEnum Enum with underlying type: string -type SmtpCredentialSummaryLifecycleStateEnum string - -// Set of constants representing the allowable values for SmtpCredentialSummaryLifecycleState -const ( - SmtpCredentialSummaryLifecycleStateCreating SmtpCredentialSummaryLifecycleStateEnum = "CREATING" - SmtpCredentialSummaryLifecycleStateActive SmtpCredentialSummaryLifecycleStateEnum = "ACTIVE" - SmtpCredentialSummaryLifecycleStateInactive SmtpCredentialSummaryLifecycleStateEnum = "INACTIVE" - SmtpCredentialSummaryLifecycleStateDeleting SmtpCredentialSummaryLifecycleStateEnum = "DELETING" - SmtpCredentialSummaryLifecycleStateDeleted SmtpCredentialSummaryLifecycleStateEnum = "DELETED" -) - -var mappingSmtpCredentialSummaryLifecycleState = map[string]SmtpCredentialSummaryLifecycleStateEnum{ - "CREATING": SmtpCredentialSummaryLifecycleStateCreating, - "ACTIVE": SmtpCredentialSummaryLifecycleStateActive, - "INACTIVE": SmtpCredentialSummaryLifecycleStateInactive, - "DELETING": SmtpCredentialSummaryLifecycleStateDeleting, - "DELETED": SmtpCredentialSummaryLifecycleStateDeleted, -} - -// GetSmtpCredentialSummaryLifecycleStateEnumValues Enumerates the set of values for SmtpCredentialSummaryLifecycleState -func GetSmtpCredentialSummaryLifecycleStateEnumValues() []SmtpCredentialSummaryLifecycleStateEnum { - values := make([]SmtpCredentialSummaryLifecycleStateEnum, 0) - for _, v := range mappingSmtpCredentialSummaryLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go b/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go deleted file mode 100644 index 92bab6995..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SwiftPassword **Deprecated. Use AuthToken instead.** -// Swift is the OpenStack object storage service. A `SwiftPassword` is an Oracle-provided password for using a -// Swift client with the Object Storage Service. This password is associated with -// the user's Console login. Swift passwords never expire. A user can have up to two Swift passwords at a time. -// **Note:** The password is always an Oracle-generated string; you can't change it to a string of your choice. -// For more information, see Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). -type SwiftPassword struct { - - // The Swift password. The value is available only in the response for `CreateSwiftPassword`, and not - // for `ListSwiftPasswords` or `UpdateSwiftPassword`. - Password *string `mandatory:"false" json:"password"` - - // The OCID of the Swift password. - Id *string `mandatory:"false" json:"id"` - - // The OCID of the user the password belongs to. - UserId *string `mandatory:"false" json:"userId"` - - // The description you assign to the Swift password. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // Date and time the `SwiftPassword` object was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // Date and time when this password will expire, in the format defined by RFC3339. - // Null if it never expires. - // Example: `2016-08-25T21:10:29.600Z` - ExpiresOn *common.SDKTime `mandatory:"false" json:"expiresOn"` - - // The password's current state. After creating a password, make sure its `lifecycleState` changes from - // CREATING to ACTIVE before using it. - LifecycleState SwiftPasswordLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m SwiftPassword) String() string { - return common.PointerString(m) -} - -// SwiftPasswordLifecycleStateEnum Enum with underlying type: string -type SwiftPasswordLifecycleStateEnum string - -// Set of constants representing the allowable values for SwiftPasswordLifecycleState -const ( - SwiftPasswordLifecycleStateCreating SwiftPasswordLifecycleStateEnum = "CREATING" - SwiftPasswordLifecycleStateActive SwiftPasswordLifecycleStateEnum = "ACTIVE" - SwiftPasswordLifecycleStateInactive SwiftPasswordLifecycleStateEnum = "INACTIVE" - SwiftPasswordLifecycleStateDeleting SwiftPasswordLifecycleStateEnum = "DELETING" - SwiftPasswordLifecycleStateDeleted SwiftPasswordLifecycleStateEnum = "DELETED" -) - -var mappingSwiftPasswordLifecycleState = map[string]SwiftPasswordLifecycleStateEnum{ - "CREATING": SwiftPasswordLifecycleStateCreating, - "ACTIVE": SwiftPasswordLifecycleStateActive, - "INACTIVE": SwiftPasswordLifecycleStateInactive, - "DELETING": SwiftPasswordLifecycleStateDeleting, - "DELETED": SwiftPasswordLifecycleStateDeleted, -} - -// GetSwiftPasswordLifecycleStateEnumValues Enumerates the set of values for SwiftPasswordLifecycleState -func GetSwiftPasswordLifecycleStateEnumValues() []SwiftPasswordLifecycleStateEnum { - values := make([]SwiftPasswordLifecycleStateEnum, 0) - for _, v := range mappingSwiftPasswordLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tag.go b/vendor/github.com/oracle/oci-go-sdk/identity/tag.go deleted file mode 100644 index 73f408ced..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/tag.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Tag A tag definition that belongs to a specific tag namespace. "Defined tags" must be set up in your tenancy before -// you can apply them to resources. -// For more information, see Managing Tags and Tag Namespaces (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm). -type Tag struct { - - // The OCID of the compartment that contains the tag definition. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The OCID of the namespace that contains the tag definition. - TagNamespaceId *string `mandatory:"true" json:"tagNamespaceId"` - - // The name of the tag namespace that contains the tag definition. - TagNamespaceName *string `mandatory:"true" json:"tagNamespaceName"` - - // The OCID of the tag definition. - Id *string `mandatory:"true" json:"id"` - - // The name of the tag. The name must be unique across all tags in the namespace and can't be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the tag. - Description *string `mandatory:"true" json:"description"` - - // Indicates whether the tag is retired. - // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). - IsRetired *bool `mandatory:"true" json:"isRetired"` - - // Date and time the tag was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}`` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m Tag) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace.go b/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace.go deleted file mode 100644 index b04a28ea7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// TagNamespace A managed container for defined tags. A tag namespace is unique in a tenancy. A tag namespace can't be deleted. -// For more information, see Managing Tags and Tag Namespaces (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm). -type TagNamespace struct { - - // The OCID of the tag namespace. - Id *string `mandatory:"true" json:"id"` - - // The OCID of the compartment that contains the tag namespace. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name of the tag namespace. It must be unique across all tag namespaces in the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the tag namespace. - Description *string `mandatory:"true" json:"description"` - - // Whether the tag namespace is retired. - // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). - IsRetired *bool `mandatory:"true" json:"isRetired"` - - // Date and time the tagNamespace was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m TagNamespace) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace_summary.go b/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace_summary.go deleted file mode 100644 index c4c2ffe05..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/tag_namespace_summary.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// TagNamespaceSummary A container for defined tags. -type TagNamespaceSummary struct { - - // The OCID of the tag namespace. - Id *string `mandatory:"false" json:"id"` - - // The OCID of the compartment that contains the tag namespace. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The name of the tag namespace. It must be unique across all tag namespaces in the tenancy and cannot be changed. - Name *string `mandatory:"false" json:"name"` - - // The description you assign to the tag namespace. - Description *string `mandatory:"false" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // Whether the tag namespace is retired. - // For more information, see Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). - IsRetired *bool `mandatory:"false" json:"isRetired"` - - // Date and time the tagNamespace was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m TagNamespaceSummary) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tag_summary.go b/vendor/github.com/oracle/oci-go-sdk/identity/tag_summary.go deleted file mode 100644 index 44cf2b71a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/tag_summary.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// TagSummary A tag definition that belongs to a specific tag namespace. -type TagSummary struct { - - // The OCID of the compartment that contains the tag definition. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The OCID of the tag definition. - Id *string `mandatory:"false" json:"id"` - - // The name of the tag. The name must be unique across all tags in the tag namespace and can't be changed. - Name *string `mandatory:"false" json:"name"` - - // The description you assign to the tag. - Description *string `mandatory:"false" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // Whether the tag is retired. - // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). - IsRetired *bool `mandatory:"false" json:"isRetired"` - - // Date and time the tag was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m TagSummary) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go b/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go deleted file mode 100644 index 1acda2f54..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Tenancy The root compartment that contains all of your organization's compartments and other -// Oracle Cloud Infrastructure cloud resources. When you sign up for Oracle Cloud Infrastructure, -// Oracle creates a tenancy for your company, which is a secure and isolated partition -// where you can create, organize, and administer your cloud resources. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type Tenancy struct { - - // The OCID of the tenancy. - Id *string `mandatory:"false" json:"id"` - - // The name of the tenancy. - Name *string `mandatory:"false" json:"name"` - - // The description of the tenancy. - Description *string `mandatory:"false" json:"description"` - - // The region key for the tenancy's home region. For more information about regions, see - // Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). - // Allowed values are: - // - `IAD` - // - `PHX` - // - `FRA` - // - `LHR` - HomeRegionKey *string `mandatory:"false" json:"homeRegionKey"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m Tenancy) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/ui_password.go b/vendor/github.com/oracle/oci-go-sdk/identity/ui_password.go deleted file mode 100644 index d0ff89997..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/ui_password.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UiPassword A text password that enables a user to sign in to the Console, the user interface for interacting with Oracle -// Cloud Infrastructure. -// For more information about user credentials, see User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm). -type UiPassword struct { - - // The user's password for the Console. - Password *string `mandatory:"false" json:"password"` - - // The OCID of the user. - UserId *string `mandatory:"false" json:"userId"` - - // Date and time the password was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // The password's current state. After creating a password, make sure its `lifecycleState` changes from - // CREATING to ACTIVE before using it. - LifecycleState UiPasswordLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m UiPassword) String() string { - return common.PointerString(m) -} - -// UiPasswordLifecycleStateEnum Enum with underlying type: string -type UiPasswordLifecycleStateEnum string - -// Set of constants representing the allowable values for UiPasswordLifecycleState -const ( - UiPasswordLifecycleStateCreating UiPasswordLifecycleStateEnum = "CREATING" - UiPasswordLifecycleStateActive UiPasswordLifecycleStateEnum = "ACTIVE" - UiPasswordLifecycleStateInactive UiPasswordLifecycleStateEnum = "INACTIVE" - UiPasswordLifecycleStateDeleting UiPasswordLifecycleStateEnum = "DELETING" - UiPasswordLifecycleStateDeleted UiPasswordLifecycleStateEnum = "DELETED" -) - -var mappingUiPasswordLifecycleState = map[string]UiPasswordLifecycleStateEnum{ - "CREATING": UiPasswordLifecycleStateCreating, - "ACTIVE": UiPasswordLifecycleStateActive, - "INACTIVE": UiPasswordLifecycleStateInactive, - "DELETING": UiPasswordLifecycleStateDeleting, - "DELETED": UiPasswordLifecycleStateDeleted, -} - -// GetUiPasswordLifecycleStateEnumValues Enumerates the set of values for UiPasswordLifecycleState -func GetUiPasswordLifecycleStateEnumValues() []UiPasswordLifecycleStateEnum { - values := make([]UiPasswordLifecycleStateEnum, 0) - for _, v := range mappingUiPasswordLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_details.go deleted file mode 100644 index 60d3729a3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateAuthTokenDetails The representation of UpdateAuthTokenDetails -type UpdateAuthTokenDetails struct { - - // The description you assign to the auth token. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` -} - -func (m UpdateAuthTokenDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_request_response.go deleted file mode 100644 index a318401be..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_auth_token_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateAuthTokenRequest wrapper for the UpdateAuthToken operation -type UpdateAuthTokenRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // The OCID of the auth token. - AuthTokenId *string `mandatory:"true" contributesTo:"path" name:"authTokenId"` - - // Request object for updating an auth token. - UpdateAuthTokenDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateAuthTokenRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateAuthTokenRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateAuthTokenRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateAuthTokenResponse wrapper for the UpdateAuthToken operation -type UpdateAuthTokenResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The AuthToken instance - AuthToken `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateAuthTokenResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateAuthTokenResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go deleted file mode 100644 index 1d0abe20e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateCompartmentDetails The representation of UpdateCompartmentDetails -type UpdateCompartmentDetails struct { - - // The description you assign to the compartment. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // The new name you assign to the compartment. The name must be unique across all compartments in the tenancy. - // Avoid entering confidential information. - Name *string `mandatory:"false" json:"name"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m UpdateCompartmentDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go deleted file mode 100644 index 12defce75..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateCompartmentRequest wrapper for the UpdateCompartment operation -type UpdateCompartmentRequest struct { - - // The OCID of the compartment. - CompartmentId *string `mandatory:"true" contributesTo:"path" name:"compartmentId"` - - // Request object for updating a compartment. - UpdateCompartmentDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateCompartmentRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateCompartmentRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateCompartmentRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateCompartmentResponse wrapper for the UpdateCompartment operation -type UpdateCompartmentResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Compartment instance - Compartment `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateCompartmentResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateCompartmentResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_details.go deleted file mode 100644 index 397e18396..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateCustomerSecretKeyDetails The representation of UpdateCustomerSecretKeyDetails -type UpdateCustomerSecretKeyDetails struct { - - // The description you assign to the secret key. Does not have to be unique, and it's changeable. - DisplayName *string `mandatory:"false" json:"displayName"` -} - -func (m UpdateCustomerSecretKeyDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go deleted file mode 100644 index c39922e4d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateCustomerSecretKeyRequest wrapper for the UpdateCustomerSecretKey operation -type UpdateCustomerSecretKeyRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // The OCID of the secret key. - CustomerSecretKeyId *string `mandatory:"true" contributesTo:"path" name:"customerSecretKeyId"` - - // Request object for updating a secret key. - UpdateCustomerSecretKeyDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateCustomerSecretKeyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateCustomerSecretKeyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateCustomerSecretKeyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateCustomerSecretKeyResponse wrapper for the UpdateCustomerSecretKey operation -type UpdateCustomerSecretKeyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The CustomerSecretKeySummary instance - CustomerSecretKeySummary `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateCustomerSecretKeyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateCustomerSecretKeyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_details.go deleted file mode 100644 index 84059385c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_details.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateDynamicGroupDetails Properties for updating a dynamic group. -type UpdateDynamicGroupDetails struct { - - // The description you assign to the dynamic group. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // The matching rule to dynamically match an instance certificate to this dynamic group. - // For rule syntax, see Managing Dynamic Groups (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingdynamicgroups.htm). - MatchingRule *string `mandatory:"false" json:"matchingRule"` -} - -func (m UpdateDynamicGroupDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_request_response.go deleted file mode 100644 index 04a435426..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_dynamic_group_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateDynamicGroupRequest wrapper for the UpdateDynamicGroup operation -type UpdateDynamicGroupRequest struct { - - // The OCID of the dynamic group. - DynamicGroupId *string `mandatory:"true" contributesTo:"path" name:"dynamicGroupId"` - - // Request object for updating an dynamic group. - UpdateDynamicGroupDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateDynamicGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateDynamicGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateDynamicGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateDynamicGroupResponse wrapper for the UpdateDynamicGroup operation -type UpdateDynamicGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The DynamicGroup instance - DynamicGroup `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateDynamicGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateDynamicGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go deleted file mode 100644 index 5c613d256..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateGroupDetails The representation of UpdateGroupDetails -type UpdateGroupDetails struct { - - // The description you assign to the group. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m UpdateGroupDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go deleted file mode 100644 index c7afc1848..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateGroupRequest wrapper for the UpdateGroup operation -type UpdateGroupRequest struct { - - // The OCID of the group. - GroupId *string `mandatory:"true" contributesTo:"path" name:"groupId"` - - // Request object for updating a group. - UpdateGroupDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateGroupRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateGroupRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateGroupRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateGroupResponse wrapper for the UpdateGroup operation -type UpdateGroupResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Group instance - Group `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateGroupResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateGroupResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go deleted file mode 100644 index 175591cdf..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateIdentityProviderDetails The representation of UpdateIdentityProviderDetails -type UpdateIdentityProviderDetails interface { - - // The description you assign to the `IdentityProvider`. Does not have to - // be unique, and it's changeable. - GetDescription() *string - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - GetFreeformTags() map[string]string - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - GetDefinedTags() map[string]map[string]interface{} -} - -type updateidentityproviderdetails struct { - JsonData []byte - Description *string `mandatory:"false" json:"description"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - Protocol string `json:"protocol"` -} - -// UnmarshalJSON unmarshals json -func (m *updateidentityproviderdetails) UnmarshalJSON(data []byte) error { - m.JsonData = data - type Unmarshalerupdateidentityproviderdetails updateidentityproviderdetails - s := struct { - Model Unmarshalerupdateidentityproviderdetails - }{} - err := json.Unmarshal(data, &s.Model) - if err != nil { - return err - } - m.Description = s.Model.Description - m.FreeformTags = s.Model.FreeformTags - m.DefinedTags = s.Model.DefinedTags - m.Protocol = s.Model.Protocol - - return err -} - -// UnmarshalPolymorphicJSON unmarshals polymorphic json -func (m *updateidentityproviderdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { - var err error - switch m.Protocol { - case "SAML2": - mm := UpdateSaml2IdentityProviderDetails{} - err = json.Unmarshal(data, &mm) - return mm, err - default: - return m, nil - } -} - -//GetDescription returns Description -func (m updateidentityproviderdetails) GetDescription() *string { - return m.Description -} - -//GetFreeformTags returns FreeformTags -func (m updateidentityproviderdetails) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m updateidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -func (m updateidentityproviderdetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go deleted file mode 100644 index 74b06bc9e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateIdentityProviderRequest wrapper for the UpdateIdentityProvider operation -type UpdateIdentityProviderRequest struct { - - // The OCID of the identity provider. - IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` - - // Request object for updating a identity provider. - UpdateIdentityProviderDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateIdentityProviderRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateIdentityProviderRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateIdentityProviderRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateIdentityProviderResponse wrapper for the UpdateIdentityProvider operation -type UpdateIdentityProviderResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The IdentityProvider instance - IdentityProvider `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateIdentityProviderResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateIdentityProviderResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_details.go deleted file mode 100644 index bf7716f61..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_details.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateIdpGroupMappingDetails The representation of UpdateIdpGroupMappingDetails -type UpdateIdpGroupMappingDetails struct { - - // The idp group name. - IdpGroupName *string `mandatory:"false" json:"idpGroupName"` - - // The OCID of the group. - GroupId *string `mandatory:"false" json:"groupId"` -} - -func (m UpdateIdpGroupMappingDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go deleted file mode 100644 index d90d88f69..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateIdpGroupMappingRequest wrapper for the UpdateIdpGroupMapping operation -type UpdateIdpGroupMappingRequest struct { - - // The OCID of the identity provider. - IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` - - // The OCID of the group mapping. - MappingId *string `mandatory:"true" contributesTo:"path" name:"mappingId"` - - // Request object for updating an identity provider group mapping - UpdateIdpGroupMappingDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateIdpGroupMappingRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateIdpGroupMappingRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateIdpGroupMappingRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateIdpGroupMappingResponse wrapper for the UpdateIdpGroupMapping operation -type UpdateIdpGroupMappingResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The IdpGroupMapping instance - IdpGroupMapping `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateIdpGroupMappingResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateIdpGroupMappingResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go deleted file mode 100644 index 264f4aef7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdatePolicyDetails The representation of UpdatePolicyDetails -type UpdatePolicyDetails struct { - - // The description you assign to the policy. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // An array of policy statements written in the policy language. See - // How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and - // Common Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm). - Statements []string `mandatory:"false" json:"statements"` - - // The version of the policy. If null or set to an empty string, when a request comes in for authorization, the - // policy will be evaluated according to the current behavior of the services at that moment. If set to a particular - // date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - VersionDate *common.SDKTime `mandatory:"false" json:"versionDate"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m UpdatePolicyDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go deleted file mode 100644 index 25c214550..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdatePolicyRequest wrapper for the UpdatePolicy operation -type UpdatePolicyRequest struct { - - // The OCID of the policy. - PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` - - // Request object for updating a policy. - UpdatePolicyDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdatePolicyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdatePolicyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdatePolicyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdatePolicyResponse wrapper for the UpdatePolicy operation -type UpdatePolicyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Policy instance - Policy `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdatePolicyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdatePolicyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go deleted file mode 100644 index 7e28f96ca..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "encoding/json" - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateSaml2IdentityProviderDetails The representation of UpdateSaml2IdentityProviderDetails -type UpdateSaml2IdentityProviderDetails struct { - - // The description you assign to the `IdentityProvider`. Does not have to - // be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - // The URL for retrieving the identity provider's metadata, - // which contains information required for federating. - MetadataUrl *string `mandatory:"false" json:"metadataUrl"` - - // The XML that contains the information required for federating. - Metadata *string `mandatory:"false" json:"metadata"` -} - -//GetDescription returns Description -func (m UpdateSaml2IdentityProviderDetails) GetDescription() *string { - return m.Description -} - -//GetFreeformTags returns FreeformTags -func (m UpdateSaml2IdentityProviderDetails) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m UpdateSaml2IdentityProviderDetails) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -func (m UpdateSaml2IdentityProviderDetails) String() string { - return common.PointerString(m) -} - -// MarshalJSON marshals to json representation -func (m UpdateSaml2IdentityProviderDetails) MarshalJSON() (buff []byte, e error) { - type MarshalTypeUpdateSaml2IdentityProviderDetails UpdateSaml2IdentityProviderDetails - s := struct { - DiscriminatorParam string `json:"protocol"` - MarshalTypeUpdateSaml2IdentityProviderDetails - }{ - "SAML2", - (MarshalTypeUpdateSaml2IdentityProviderDetails)(m), - } - - return json.Marshal(&s) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_details.go deleted file mode 100644 index 04d580033..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateSmtpCredentialDetails The representation of UpdateSmtpCredentialDetails -type UpdateSmtpCredentialDetails struct { - - // The description you assign to the SMTP credential. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` -} - -func (m UpdateSmtpCredentialDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_request_response.go deleted file mode 100644 index 730db05b6..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_smtp_credential_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateSmtpCredentialRequest wrapper for the UpdateSmtpCredential operation -type UpdateSmtpCredentialRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // The OCID of the SMTP credential. - SmtpCredentialId *string `mandatory:"true" contributesTo:"path" name:"smtpCredentialId"` - - // Request object for updating a SMTP credential. - UpdateSmtpCredentialDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateSmtpCredentialRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateSmtpCredentialRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateSmtpCredentialRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateSmtpCredentialResponse wrapper for the UpdateSmtpCredential operation -type UpdateSmtpCredentialResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The SmtpCredentialSummary instance - SmtpCredentialSummary `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateSmtpCredentialResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateSmtpCredentialResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_state_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_state_details.go deleted file mode 100644 index 3c920d786..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_state_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateStateDetails The representation of UpdateStateDetails -type UpdateStateDetails struct { - - // Update state to blocked or unblocked. Only "false" is supported (for changing the state to unblocked). - Blocked *bool `mandatory:"false" json:"blocked"` -} - -func (m UpdateStateDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_details.go deleted file mode 100644 index 7f987bf70..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateSwiftPasswordDetails The representation of UpdateSwiftPasswordDetails -type UpdateSwiftPasswordDetails struct { - - // The description you assign to the Swift password. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` -} - -func (m UpdateSwiftPasswordDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go deleted file mode 100644 index c1d82d8ae..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateSwiftPasswordRequest wrapper for the UpdateSwiftPassword operation -type UpdateSwiftPasswordRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // The OCID of the Swift password. - SwiftPasswordId *string `mandatory:"true" contributesTo:"path" name:"swiftPasswordId"` - - // Request object for updating a Swift password. - UpdateSwiftPasswordDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateSwiftPasswordRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateSwiftPasswordRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateSwiftPasswordRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateSwiftPasswordResponse wrapper for the UpdateSwiftPassword operation -type UpdateSwiftPasswordResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The SwiftPassword instance - SwiftPassword `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateSwiftPasswordResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateSwiftPasswordResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_details.go deleted file mode 100644 index 0abb1f972..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_details.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateTagDetails The representation of UpdateTagDetails -type UpdateTagDetails struct { - - // The description you assign to the tag during creation. - Description *string `mandatory:"false" json:"description"` - - // Whether the tag is retired. - // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). - IsRetired *bool `mandatory:"false" json:"isRetired"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m UpdateTagDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_details.go deleted file mode 100644 index 78dd3f2f4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_details.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateTagNamespaceDetails The representation of UpdateTagNamespaceDetails -type UpdateTagNamespaceDetails struct { - - // The description you assign to the tag namespace. - Description *string `mandatory:"false" json:"description"` - - // Whether the tag namespace is retired. - // See Retiring Key Definitions and Namespace Definitions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). - IsRetired *bool `mandatory:"false" json:"isRetired"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m UpdateTagNamespaceDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_request_response.go deleted file mode 100644 index c2ae136b7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_namespace_request_response.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateTagNamespaceRequest wrapper for the UpdateTagNamespace operation -type UpdateTagNamespaceRequest struct { - - // The OCID of the tag namespace. - TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` - - // Request object for updating a namespace. - UpdateTagNamespaceDetails `contributesTo:"body"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateTagNamespaceRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateTagNamespaceRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateTagNamespaceRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateTagNamespaceResponse wrapper for the UpdateTagNamespace operation -type UpdateTagNamespaceResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The TagNamespace instance - TagNamespace `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateTagNamespaceResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateTagNamespaceResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_request_response.go deleted file mode 100644 index 6fc3cd6c5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_tag_request_response.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateTagRequest wrapper for the UpdateTag operation -type UpdateTagRequest struct { - - // The OCID of the tag namespace. - TagNamespaceId *string `mandatory:"true" contributesTo:"path" name:"tagNamespaceId"` - - // The name of the tag. - TagName *string `mandatory:"true" contributesTo:"path" name:"tagName"` - - // Request object for updating a tag. - UpdateTagDetails `contributesTo:"body"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateTagRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateTagRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateTagRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateTagResponse wrapper for the UpdateTag operation -type UpdateTagResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Tag instance - Tag `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateTagResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateTagResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go deleted file mode 100644 index 84363a12c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateUserDetails The representation of UpdateUserDetails -type UpdateUserDetails struct { - - // The description you assign to the user. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m UpdateUserDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go deleted file mode 100644 index 952f3790d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateUserRequest wrapper for the UpdateUser operation -type UpdateUserRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // Request object for updating a user. - UpdateUserDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateUserRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateUserRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateUserRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateUserResponse wrapper for the UpdateUser operation -type UpdateUserResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The User instance - User `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateUserResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateUserResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go deleted file mode 100644 index 86b46c6eb..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateUserStateRequest wrapper for the UpdateUserState operation -type UpdateUserStateRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // Request object for updating a user state. - UpdateStateDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` - // parameter to the value of the etag from a previous GET or POST response for that resource. The resource - // will be updated or deleted only if the etag you provide matches the resource's current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateUserStateRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateUserStateRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateUserStateRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateUserStateResponse wrapper for the UpdateUserState operation -type UpdateUserStateResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The User instance - User `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateUserStateResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateUserStateResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go deleted file mode 100644 index defdc1237..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UploadApiKeyRequest wrapper for the UploadApiKey operation -type UploadApiKeyRequest struct { - - // The OCID of the user. - UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` - - // Request object for uploading an API key for a user. - CreateApiKeyDetails `contributesTo:"body"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Unique Oracle-assigned identifier for the request. - // If you need to contact Oracle about a particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UploadApiKeyRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UploadApiKeyRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UploadApiKeyRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UploadApiKeyResponse wrapper for the UploadApiKey operation -type UploadApiKeyResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The ApiKey instance - ApiKey `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` -} - -func (response UploadApiKeyResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UploadApiKeyResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/user.go b/vendor/github.com/oracle/oci-go-sdk/identity/user.go deleted file mode 100644 index af4c328a2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/user.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// User An individual employee or system that needs to manage or use your company's Oracle Cloud Infrastructure -// resources. Users might need to launch instances, manage remote disks, work with your cloud network, etc. Users -// have one or more IAM Service credentials (ApiKey, -// UIPassword, SwiftPassword and -// AuthToken). -// For more information, see User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usercredentials.htm)). End users of your -// application are not typically IAM Service users. For conceptual information about users and other IAM Service -// components, see Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). -// These users are created directly within the Oracle Cloud Infrastructure system, via the IAM service. -// They are different from *federated users*, who authenticate themselves to the Oracle Cloud Infrastructure -// Console via an identity provider. For more information, see -// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type User struct { - - // The OCID of the user. - Id *string `mandatory:"true" json:"id"` - - // The OCID of the tenancy containing the user. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The name you assign to the user during creation. This is the user's login for the Console. - // The name must be unique across all users in the tenancy and cannot be changed. - Name *string `mandatory:"true" json:"name"` - - // The description you assign to the user. Does not have to be unique, and it's changeable. - Description *string `mandatory:"true" json:"description"` - - // Date and time the user was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The user's current state. After creating a user, make sure its `lifecycleState` changes from CREATING to - // ACTIVE before using it. - LifecycleState UserLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // Returned only if the user's `lifecycleState` is INACTIVE. A 16-bit value showing the reason why the user - // is inactive: - // - bit 0: SUSPENDED (reserved for future use) - // - bit 1: DISABLED (reserved for future use) - // - bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Console) - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m User) String() string { - return common.PointerString(m) -} - -// UserLifecycleStateEnum Enum with underlying type: string -type UserLifecycleStateEnum string - -// Set of constants representing the allowable values for UserLifecycleState -const ( - UserLifecycleStateCreating UserLifecycleStateEnum = "CREATING" - UserLifecycleStateActive UserLifecycleStateEnum = "ACTIVE" - UserLifecycleStateInactive UserLifecycleStateEnum = "INACTIVE" - UserLifecycleStateDeleting UserLifecycleStateEnum = "DELETING" - UserLifecycleStateDeleted UserLifecycleStateEnum = "DELETED" -) - -var mappingUserLifecycleState = map[string]UserLifecycleStateEnum{ - "CREATING": UserLifecycleStateCreating, - "ACTIVE": UserLifecycleStateActive, - "INACTIVE": UserLifecycleStateInactive, - "DELETING": UserLifecycleStateDeleting, - "DELETED": UserLifecycleStateDeleted, -} - -// GetUserLifecycleStateEnumValues Enumerates the set of values for UserLifecycleState -func GetUserLifecycleStateEnumValues() []UserLifecycleStateEnum { - values := make([]UserLifecycleStateEnum, 0) - for _, v := range mappingUserLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/user_group_membership.go b/vendor/github.com/oracle/oci-go-sdk/identity/user_group_membership.go deleted file mode 100644 index f2b1a3aee..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/identity/user_group_membership.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Identity and Access Management Service API -// -// APIs for managing users, groups, compartments, and policies. -// - -package identity - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UserGroupMembership An object that represents the membership of a user in a group. When you add a user to a group, the result is a -// `UserGroupMembership` with its own OCID. To remove a user from a group, you delete the `UserGroupMembership` object. -type UserGroupMembership struct { - - // The OCID of the membership. - Id *string `mandatory:"true" json:"id"` - - // The OCID of the tenancy containing the user, group, and membership object. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The OCID of the group. - GroupId *string `mandatory:"true" json:"groupId"` - - // The OCID of the user. - UserId *string `mandatory:"true" json:"userId"` - - // Date and time the membership was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The membership's current state. After creating a membership object, make sure its `lifecycleState` changes - // from CREATING to ACTIVE before using it. - LifecycleState UserGroupMembershipLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The detailed status of INACTIVE lifecycleState. - InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` -} - -func (m UserGroupMembership) String() string { - return common.PointerString(m) -} - -// UserGroupMembershipLifecycleStateEnum Enum with underlying type: string -type UserGroupMembershipLifecycleStateEnum string - -// Set of constants representing the allowable values for UserGroupMembershipLifecycleState -const ( - UserGroupMembershipLifecycleStateCreating UserGroupMembershipLifecycleStateEnum = "CREATING" - UserGroupMembershipLifecycleStateActive UserGroupMembershipLifecycleStateEnum = "ACTIVE" - UserGroupMembershipLifecycleStateInactive UserGroupMembershipLifecycleStateEnum = "INACTIVE" - UserGroupMembershipLifecycleStateDeleting UserGroupMembershipLifecycleStateEnum = "DELETING" - UserGroupMembershipLifecycleStateDeleted UserGroupMembershipLifecycleStateEnum = "DELETED" -) - -var mappingUserGroupMembershipLifecycleState = map[string]UserGroupMembershipLifecycleStateEnum{ - "CREATING": UserGroupMembershipLifecycleStateCreating, - "ACTIVE": UserGroupMembershipLifecycleStateActive, - "INACTIVE": UserGroupMembershipLifecycleStateInactive, - "DELETING": UserGroupMembershipLifecycleStateDeleting, - "DELETED": UserGroupMembershipLifecycleStateDeleted, -} - -// GetUserGroupMembershipLifecycleStateEnumValues Enumerates the set of values for UserGroupMembershipLifecycleState -func GetUserGroupMembershipLifecycleStateEnumValues() []UserGroupMembershipLifecycleStateEnum { - values := make([]UserGroupMembershipLifecycleStateEnum, 0) - for _, v := range mappingUserGroupMembershipLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go deleted file mode 100644 index cb6185170..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Backend The configuration of a backend server that is a member of a load balancer backend set. -// For more information, see Managing Backend Servers (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingbackendservers.htm). -type Backend struct { - - // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress - // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. - // Example: `false` - Backup *bool `mandatory:"true" json:"backup"` - - // Whether the load balancer should drain this server. Servers marked "drain" receive no new - // incoming traffic. - // Example: `false` - Drain *bool `mandatory:"true" json:"drain"` - - // The IP address of the backend server. - // Example: `10.0.0.3` - IpAddress *string `mandatory:"true" json:"ipAddress"` - - // A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. - // Example: `10.0.0.3:8080` - Name *string `mandatory:"true" json:"name"` - - // Whether the load balancer should treat this server as offline. Offline servers receive no incoming - // traffic. - // Example: `false` - Offline *bool `mandatory:"true" json:"offline"` - - // The communication port for the backend server. - // Example: `8080` - Port *int `mandatory:"true" json:"port"` - - // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger - // proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections - // as a server weighted '1'. - // For more information on load balancing policies, see - // How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). - // Example: `3` - Weight *int `mandatory:"true" json:"weight"` -} - -func (m Backend) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go deleted file mode 100644 index bc2744227..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// BackendDetails The load balancing configuration details of a backend server. -type BackendDetails struct { - - // The IP address of the backend server. - // Example: `10.0.0.3` - IpAddress *string `mandatory:"true" json:"ipAddress"` - - // The communication port for the backend server. - // Example: `8080` - Port *int `mandatory:"true" json:"port"` - - // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress - // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. - // Example: `false` - Backup *bool `mandatory:"false" json:"backup"` - - // Whether the load balancer should drain this server. Servers marked "drain" receive no new - // incoming traffic. - // Example: `false` - Drain *bool `mandatory:"false" json:"drain"` - - // Whether the load balancer should treat this server as offline. Offline servers receive no incoming - // traffic. - // Example: `false` - Offline *bool `mandatory:"false" json:"offline"` - - // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger - // proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections - // as a server weighted '1'. - // For more information on load balancing policies, see - // How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). - // Example: `3` - Weight *int `mandatory:"false" json:"weight"` -} - -func (m BackendDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_health.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_health.go deleted file mode 100644 index ca8cbc42c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_health.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// BackendHealth The health status of the specified backend server as reported by the primary and standby load balancers. -type BackendHealth struct { - - // A list of the most recent health check results returned for the specified backend server. - HealthCheckResults []HealthCheckResult `mandatory:"true" json:"healthCheckResults"` - - // The general health status of the specified backend server as reported by the primary and standby load balancers. - // * **OK:** Both health checks returned `OK`. - // * **WARNING:** One health check returned `OK` and one did not. - // * **CRITICAL:** Neither health check returned `OK`. - // * **UNKNOWN:** One or both health checks returned `UNKNOWN`, or the system was unable to retrieve metrics at this time. - Status BackendHealthStatusEnum `mandatory:"true" json:"status"` -} - -func (m BackendHealth) String() string { - return common.PointerString(m) -} - -// BackendHealthStatusEnum Enum with underlying type: string -type BackendHealthStatusEnum string - -// Set of constants representing the allowable values for BackendHealthStatus -const ( - BackendHealthStatusOk BackendHealthStatusEnum = "OK" - BackendHealthStatusWarning BackendHealthStatusEnum = "WARNING" - BackendHealthStatusCritical BackendHealthStatusEnum = "CRITICAL" - BackendHealthStatusUnknown BackendHealthStatusEnum = "UNKNOWN" -) - -var mappingBackendHealthStatus = map[string]BackendHealthStatusEnum{ - "OK": BackendHealthStatusOk, - "WARNING": BackendHealthStatusWarning, - "CRITICAL": BackendHealthStatusCritical, - "UNKNOWN": BackendHealthStatusUnknown, -} - -// GetBackendHealthStatusEnumValues Enumerates the set of values for BackendHealthStatus -func GetBackendHealthStatusEnumValues() []BackendHealthStatusEnum { - values := make([]BackendHealthStatusEnum, 0) - for _, v := range mappingBackendHealthStatus { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go deleted file mode 100644 index 8932a1c0a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// BackendSet The configuration of a load balancer backend set. -// For more information on backend set configuration, see -// Managing Backend Sets (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendsets.htm). -type BackendSet struct { - Backends []Backend `mandatory:"true" json:"backends"` - - HealthChecker *HealthChecker `mandatory:"true" json:"healthChecker"` - - // A friendly name for the backend set. It must be unique and it cannot be changed. - // Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot - // contain spaces. Avoid entering confidential information. - // Example: `example_backend_set` - Name *string `mandatory:"true" json:"name"` - - // The load balancer policy for the backend set. To get a list of available policies, use the - // ListPolicies operation. - // Example: `LEAST_CONNECTIONS` - Policy *string `mandatory:"true" json:"policy"` - - SessionPersistenceConfiguration *SessionPersistenceConfigurationDetails `mandatory:"false" json:"sessionPersistenceConfiguration"` - - SslConfiguration *SslConfiguration `mandatory:"false" json:"sslConfiguration"` -} - -func (m BackendSet) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_details.go deleted file mode 100644 index dad4d6591..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_details.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// BackendSetDetails The configuration details for a load balancer backend set. -// For more information on backend set configuration, see -// Managing Backend Sets (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendsets.htm). -type BackendSetDetails struct { - HealthChecker *HealthCheckerDetails `mandatory:"true" json:"healthChecker"` - - // The load balancer policy for the backend set. To get a list of available policies, use the - // ListPolicies operation. - // Example: `LEAST_CONNECTIONS` - Policy *string `mandatory:"true" json:"policy"` - - Backends []BackendDetails `mandatory:"false" json:"backends"` - - SessionPersistenceConfiguration *SessionPersistenceConfigurationDetails `mandatory:"false" json:"sessionPersistenceConfiguration"` - - SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` -} - -func (m BackendSetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go deleted file mode 100644 index 9e656d7ab..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// BackendSetHealth The health status details for a backend set. -// This object does not explicitly enumerate backend servers with a status of `OK`. However, they are included in the -// `totalBackendCount` sum. -type BackendSetHealth struct { - - // A list of backend servers that are currently in the `CRITICAL` health state. The list identifies each backend server by - // IP address and port. - // Example: `10.0.0.4:8080` - CriticalStateBackendNames []string `mandatory:"true" json:"criticalStateBackendNames"` - - // Overall health status of the backend set. - // * **OK:** All backend servers in the backend set return a status of `OK`. - // * **WARNING:** Half or more of the backend set's backend servers return a status of `OK` and at least one backend - // server returns a status of `WARNING`, `CRITICAL`, or `UNKNOWN`. - // * **CRITICAL:** Fewer than half of the backend set's backend servers return a status of `OK`. - // * **UNKNOWN:** More than half of the backend set's backend servers return a status of `UNKNOWN`, the system was - // unable to retrieve metrics, or the backend set does not have a listener attached. - Status BackendSetHealthStatusEnum `mandatory:"true" json:"status"` - - // The total number of backend servers in this backend set. - // Example: `7` - TotalBackendCount *int `mandatory:"true" json:"totalBackendCount"` - - // A list of backend servers that are currently in the `UNKNOWN` health state. The list identifies each backend server by - // IP address and port. - // Example: `10.0.0.5:8080` - UnknownStateBackendNames []string `mandatory:"true" json:"unknownStateBackendNames"` - - // A list of backend servers that are currently in the `WARNING` health state. The list identifies each backend server by - // IP address and port. - // Example: `10.0.0.3:8080` - WarningStateBackendNames []string `mandatory:"true" json:"warningStateBackendNames"` -} - -func (m BackendSetHealth) String() string { - return common.PointerString(m) -} - -// BackendSetHealthStatusEnum Enum with underlying type: string -type BackendSetHealthStatusEnum string - -// Set of constants representing the allowable values for BackendSetHealthStatus -const ( - BackendSetHealthStatusOk BackendSetHealthStatusEnum = "OK" - BackendSetHealthStatusWarning BackendSetHealthStatusEnum = "WARNING" - BackendSetHealthStatusCritical BackendSetHealthStatusEnum = "CRITICAL" - BackendSetHealthStatusUnknown BackendSetHealthStatusEnum = "UNKNOWN" -) - -var mappingBackendSetHealthStatus = map[string]BackendSetHealthStatusEnum{ - "OK": BackendSetHealthStatusOk, - "WARNING": BackendSetHealthStatusWarning, - "CRITICAL": BackendSetHealthStatusCritical, - "UNKNOWN": BackendSetHealthStatusUnknown, -} - -// GetBackendSetHealthStatusEnumValues Enumerates the set of values for BackendSetHealthStatus -func GetBackendSetHealthStatusEnumValues() []BackendSetHealthStatusEnum { - values := make([]BackendSetHealthStatusEnum, 0) - for _, v := range mappingBackendSetHealthStatus { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go deleted file mode 100644 index c66a770b5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Certificate The configuration details of a certificate bundle. -// For more information on SSL certficate configuration, see -// Managing SSL Certificates (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingcertificates.htm). -type Certificate struct { - - // The Certificate Authority certificate, or any interim certificate, that you received from your SSL certificate provider. - // Example: - // -----BEGIN CERTIFICATE----- - // MIIEczCCA1ugAwIBAgIBADANBgkqhkiG9w0BAQQFAD..AkGA1UEBhMCR0Ix - // EzARBgNVBAgTClNvbWUtU3RhdGUxFDASBgNVBAoTC0..0EgTHRkMTcwNQYD - // VQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcn..XRpb24gQXV0aG9y - // aXR5MRQwEgYDVQQDEwtCZXN0IENBIEx0ZDAeFw0wMD..TUwMTZaFw0wMTAy - // ... - // -----END CERTIFICATE----- - CaCertificate *string `mandatory:"true" json:"caCertificate"` - - // A friendly name for the certificate bundle. It must be unique and it cannot be changed. - // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. - // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `example_certificate_bundle` - CertificateName *string `mandatory:"true" json:"certificateName"` - - // The public certificate, in PEM format, that you received from your SSL certificate provider. - // Example: - // -----BEGIN CERTIFICATE----- - // MIIC2jCCAkMCAg38MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG - // A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE - // MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl - // YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw - // ... - // -----END CERTIFICATE----- - PublicCertificate *string `mandatory:"true" json:"publicCertificate"` -} - -func (m Certificate) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go deleted file mode 100644 index 526bb3cd5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CertificateDetails The configuration details for a certificate bundle. -// For more information on SSL certficate configuration, see -// Managing SSL Certificates (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingcertificates.htm). -type CertificateDetails struct { - - // A friendly name for the certificate bundle. It must be unique and it cannot be changed. - // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. - // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `example_certificate_bundle` - CertificateName *string `mandatory:"true" json:"certificateName"` - - // The Certificate Authority certificate, or any interim certificate, that you received from your SSL certificate provider. - // Example: - // -----BEGIN CERTIFICATE----- - // MIIEczCCA1ugAwIBAgIBADANBgkqhkiG9w0BAQQFAD..AkGA1UEBhMCR0Ix - // EzARBgNVBAgTClNvbWUtU3RhdGUxFDASBgNVBAoTC0..0EgTHRkMTcwNQYD - // VQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcn..XRpb24gQXV0aG9y - // aXR5MRQwEgYDVQQDEwtCZXN0IENBIEx0ZDAeFw0wMD..TUwMTZaFw0wMTAy - // ... - // -----END CERTIFICATE----- - CaCertificate *string `mandatory:"false" json:"caCertificate"` - - // A passphrase for encrypted private keys. This is needed only if you created your certificate with a passphrase. - Passphrase *string `mandatory:"false" json:"passphrase"` - - // The SSL private key for your certificate, in PEM format. - // Example: - // -----BEGIN RSA PRIVATE KEY----- - // jO1O1v2ftXMsawM90tnXwc6xhOAT1gDBC9S8DKeca..JZNUgYYwNS0dP2UK - // tmyN+XqVcAKw4HqVmChXy5b5msu8eIq3uc2NqNVtR..2ksSLukP8pxXcHyb - // +sEwvM4uf8qbnHAqwnOnP9+KV9vds6BaH1eRA4CHz..n+NVZlzBsTxTlS16 - // /Umr7wJzVrMqK5sDiSu4WuaaBdqMGfL5hLsTjcBFD..Da2iyQmSKuVD4lIZ - // ... - // -----END RSA PRIVATE KEY----- - PrivateKey *string `mandatory:"false" json:"privateKey"` - - // The public certificate, in PEM format, that you received from your SSL certificate provider. - // Example: - // -----BEGIN CERTIFICATE----- - // MIIC2jCCAkMCAg38MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG - // A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE - // MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl - // YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw - // ... - // -----END CERTIFICATE----- - PublicCertificate *string `mandatory:"false" json:"publicCertificate"` -} - -func (m CertificateDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/connection_configuration.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/connection_configuration.go deleted file mode 100644 index ab6bb2d21..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/connection_configuration.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ConnectionConfiguration Configuration details for the connection between the client and backend servers. -type ConnectionConfiguration struct { - - // The maximum idle time, in seconds, allowed between two successive receive or two successive send operations - // between the client and backend servers. A send operation does not reset the timer for receive operations. A - // receive operation does not reset the timer for send operations. - // For more information, see Connection Configuration (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/connectionreuse.htm#ConnectionConfiguration). - // Example: `1200` - IdleTimeout *int `mandatory:"true" json:"idleTimeout"` -} - -func (m ConnectionConfiguration) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go deleted file mode 100644 index 1fc3a835f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateBackendDetails The configuration details for creating a backend server in a backend set. -// For more information on backend server configuration, see -// Managing Backend Servers (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendservers.htm). -type CreateBackendDetails struct { - - // The IP address of the backend server. - // Example: `10.0.0.3` - IpAddress *string `mandatory:"true" json:"ipAddress"` - - // The communication port for the backend server. - // Example: `8080` - Port *int `mandatory:"true" json:"port"` - - // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress - // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. - // Example: `false` - Backup *bool `mandatory:"false" json:"backup"` - - // Whether the load balancer should drain this server. Servers marked "drain" receive no new - // incoming traffic. - // Example: `false` - Drain *bool `mandatory:"false" json:"drain"` - - // Whether the load balancer should treat this server as offline. Offline servers receive no incoming - // traffic. - // Example: `false` - Offline *bool `mandatory:"false" json:"offline"` - - // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger - // proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections - // as a server weighted '1'. - // For more information on load balancing policies, see - // How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). - // Example: `3` - Weight *int `mandatory:"false" json:"weight"` -} - -func (m CreateBackendDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go deleted file mode 100644 index e351d21a8..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateBackendRequest wrapper for the CreateBackend operation -type CreateBackendRequest struct { - - // The details to add a backend server to a backend set. - CreateBackendDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and servers. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set to add the backend server to. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateBackendRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateBackendRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateBackendRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateBackendResponse wrapper for the CreateBackend operation -type CreateBackendResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response CreateBackendResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateBackendResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go deleted file mode 100644 index 171058a9f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateBackendSetDetails The configuration details for creating a backend set in a load balancer. -// For more information on backend set configuration, see -// Managing Backend Sets (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendsets.htm). -type CreateBackendSetDetails struct { - HealthChecker *HealthCheckerDetails `mandatory:"true" json:"healthChecker"` - - // A friendly name for the backend set. It must be unique and it cannot be changed. - // Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot - // contain spaces. Avoid entering confidential information. - // Example: `example_backend_set` - Name *string `mandatory:"true" json:"name"` - - // The load balancer policy for the backend set. To get a list of available policies, use the - // ListPolicies operation. - // Example: `LEAST_CONNECTIONS` - Policy *string `mandatory:"true" json:"policy"` - - Backends []BackendDetails `mandatory:"false" json:"backends"` - - SessionPersistenceConfiguration *SessionPersistenceConfigurationDetails `mandatory:"false" json:"sessionPersistenceConfiguration"` - - SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` -} - -func (m CreateBackendSetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go deleted file mode 100644 index 8f2576872..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateBackendSetRequest wrapper for the CreateBackendSet operation -type CreateBackendSetRequest struct { - - // The details for adding a backend set. - CreateBackendSetDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a backend set. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateBackendSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateBackendSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateBackendSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateBackendSetResponse wrapper for the CreateBackendSet operation -type CreateBackendSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response CreateBackendSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateBackendSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go deleted file mode 100644 index a84550c40..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateCertificateDetails The configuration details for adding a certificate bundle to a listener. -// For more information on SSL certficate configuration, see -// Managing SSL Certificates (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingcertificates.htm). -type CreateCertificateDetails struct { - - // A friendly name for the certificate bundle. It must be unique and it cannot be changed. - // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. - // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `example_certificate_bundle` - CertificateName *string `mandatory:"true" json:"certificateName"` - - // The Certificate Authority certificate, or any interim certificate, that you received from your SSL certificate provider. - // Example: - // -----BEGIN CERTIFICATE----- - // MIIEczCCA1ugAwIBAgIBADANBgkqhkiG9w0BAQQFAD..AkGA1UEBhMCR0Ix - // EzARBgNVBAgTClNvbWUtU3RhdGUxFDASBgNVBAoTC0..0EgTHRkMTcwNQYD - // VQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcn..XRpb24gQXV0aG9y - // aXR5MRQwEgYDVQQDEwtCZXN0IENBIEx0ZDAeFw0wMD..TUwMTZaFw0wMTAy - // ... - // -----END CERTIFICATE----- - CaCertificate *string `mandatory:"false" json:"caCertificate"` - - // A passphrase for encrypted private keys. This is needed only if you created your certificate with a passphrase. - Passphrase *string `mandatory:"false" json:"passphrase"` - - // The SSL private key for your certificate, in PEM format. - // Example: - // -----BEGIN RSA PRIVATE KEY----- - // jO1O1v2ftXMsawM90tnXwc6xhOAT1gDBC9S8DKeca..JZNUgYYwNS0dP2UK - // tmyN+XqVcAKw4HqVmChXy5b5msu8eIq3uc2NqNVtR..2ksSLukP8pxXcHyb - // +sEwvM4uf8qbnHAqwnOnP9+KV9vds6BaH1eRA4CHz..n+NVZlzBsTxTlS16 - // /Umr7wJzVrMqK5sDiSu4WuaaBdqMGfL5hLsTjcBFD..Da2iyQmSKuVD4lIZ - // ... - // -----END RSA PRIVATE KEY----- - PrivateKey *string `mandatory:"false" json:"privateKey"` - - // The public certificate, in PEM format, that you received from your SSL certificate provider. - // Example: - // -----BEGIN CERTIFICATE----- - // MIIC2jCCAkMCAg38MA0GCSqGSIb3DQEBBQUAMIGbM..QswCQYDVQQGEwJKU - // A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxE..TAPBgNVBAoTCEZyY - // MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWB..gNVBAMTD0ZyYW5rN - // YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmc..mFuazRkZC5jb20wH - // ... - // -----END CERTIFICATE----- - PublicCertificate *string `mandatory:"false" json:"publicCertificate"` -} - -func (m CreateCertificateDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go deleted file mode 100644 index fb6c01e99..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateCertificateRequest wrapper for the CreateCertificate operation -type CreateCertificateRequest struct { - - // The details of the certificate bundle to add. - CreateCertificateDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add the certificate bundle. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateCertificateRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateCertificateRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateCertificateRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateCertificateResponse wrapper for the CreateCertificate operation -type CreateCertificateResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response CreateCertificateResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateCertificateResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_details.go deleted file mode 100644 index 5bfbb4efb..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_details.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateHostnameDetails The details of the hostname resource to add to a load balancer. -type CreateHostnameDetails struct { - - // A virtual hostname. For more information about virtual hostname string construction, see - // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). - // Example: `app.example.com` - Hostname *string `mandatory:"true" json:"hostname"` - - // A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential - // information. - // Example: `example_hostname_001` - Name *string `mandatory:"true" json:"name"` -} - -func (m CreateHostnameDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_request_response.go deleted file mode 100644 index 16f3809d0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_hostname_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateHostnameRequest wrapper for the CreateHostname operation -type CreateHostnameRequest struct { - - // The details of the hostname resource to add to the specified load balancer. - CreateHostnameDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to add the hostname to. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateHostnameRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateHostnameRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateHostnameRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateHostnameResponse wrapper for the CreateHostname operation -type CreateHostnameResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response CreateHostnameResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateHostnameResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go deleted file mode 100644 index 8734a6886..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateListenerDetails The configuration details for adding a listener to a backend set. -// For more information on listener configuration, see -// Managing Load Balancer Listeners (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managinglisteners.htm). -type CreateListenerDetails struct { - - // The name of the associated backend set. - // Example: `example_backend_set` - DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` - - // A friendly name for the listener. It must be unique and it cannot be changed. - // Avoid entering confidential information. - // Example: `example_listener` - Name *string `mandatory:"true" json:"name"` - - // The communication port for the listener. - // Example: `80` - Port *int `mandatory:"true" json:"port"` - - // The protocol on which the listener accepts connection requests. - // To get a list of valid protocols, use the ListProtocols - // operation. - // Example: `HTTP` - Protocol *string `mandatory:"true" json:"protocol"` - - ConnectionConfiguration *ConnectionConfiguration `mandatory:"false" json:"connectionConfiguration"` - - // An array of hostname resource names. - HostnameNames []string `mandatory:"false" json:"hostnameNames"` - - // The name of the set of path-based routing rules, PathRouteSet, - // applied to this listener's traffic. - // Example: `example_path_route_set` - PathRouteSetName *string `mandatory:"false" json:"pathRouteSetName"` - - SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` -} - -func (m CreateListenerDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go deleted file mode 100644 index fc461aebb..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateListenerRequest wrapper for the CreateListener operation -type CreateListenerRequest struct { - - // Details to add a listener. - CreateListenerDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a listener. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateListenerRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateListenerRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateListenerRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateListenerResponse wrapper for the CreateListener operation -type CreateListenerResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response CreateListenerResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateListenerResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go deleted file mode 100644 index c96321ea2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateLoadBalancerDetails The configuration details for creating a load balancer. -type CreateLoadBalancerDetails struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment in which to create the load balancer. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `example_load_balancer` - DisplayName *string `mandatory:"true" json:"displayName"` - - // A template that determines the total pre-provisioned bandwidth (ingress plus egress). - // To get a list of available shapes, use the ListShapes - // operation. - // Example: `100Mbps` - ShapeName *string `mandatory:"true" json:"shapeName"` - - // An array of subnet OCIDs (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - SubnetIds []string `mandatory:"true" json:"subnetIds"` - - BackendSets map[string]BackendSetDetails `mandatory:"false" json:"backendSets"` - - Certificates map[string]CertificateDetails `mandatory:"false" json:"certificates"` - - Hostnames map[string]HostnameDetails `mandatory:"false" json:"hostnames"` - - // Whether the load balancer has a VCN-local (private) IP address. - // If "true", the service assigns a private IP address to the load balancer. The load balancer requires only one subnet - // to host both the primary and secondary load balancers. The private IP address is local to the subnet. The load balancer - // is accessible only from within the VCN that contains the associated subnet, or as further restricted by your security - // list rules. The load balancer can route traffic to any backend server that is reachable from the VCN. - // For a private load balancer, both the primary and secondary load balancer hosts are within the same Availability Domain. - // If "false", the service assigns a public IP address to the load balancer. A load balancer with a public IP address - // requires two subnets, each in a different Availability Domain. One subnet hosts the primary load balancer and the other - // hosts the secondary (standby) load balancer. A public load balancer is accessible from the internet, depending on your - // VCN's security list rules (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm). - // Example: `true` - IsPrivate *bool `mandatory:"false" json:"isPrivate"` - - Listeners map[string]ListenerDetails `mandatory:"false" json:"listeners"` - - PathRouteSets map[string]PathRouteSetDetails `mandatory:"false" json:"pathRouteSets"` -} - -func (m CreateLoadBalancerDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go deleted file mode 100644 index 9f51806e1..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateLoadBalancerRequest wrapper for the CreateLoadBalancer operation -type CreateLoadBalancerRequest struct { - - // The configuration details for creating a load balancer. - CreateLoadBalancerDetails `contributesTo:"body"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateLoadBalancerRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateLoadBalancerRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateLoadBalancerResponse wrapper for the CreateLoadBalancer operation -type CreateLoadBalancerResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response CreateLoadBalancerResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateLoadBalancerResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_details.go deleted file mode 100644 index f6a82fded..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_details.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreatePathRouteSetDetails A named set of path route rules to add to the load balancer. -type CreatePathRouteSetDetails struct { - - // The name for this set of path route rules. It must be unique and it cannot be changed. Avoid entering - // confidential information. - // Example: `example_path_route_set` - Name *string `mandatory:"true" json:"name"` - - // The set of path route rules. - PathRoutes []PathRoute `mandatory:"true" json:"pathRoutes"` -} - -func (m CreatePathRouteSetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_request_response.go deleted file mode 100644 index 7f201241d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_path_route_set_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreatePathRouteSetRequest wrapper for the CreatePathRouteSet operation -type CreatePathRouteSetRequest struct { - - // The details of the path route set to add. - CreatePathRouteSetDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to add the path route set to. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreatePathRouteSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreatePathRouteSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreatePathRouteSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreatePathRouteSetResponse wrapper for the CreatePathRouteSet operation -type CreatePathRouteSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response CreatePathRouteSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreatePathRouteSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go deleted file mode 100644 index df043dbd5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteBackendRequest wrapper for the DeleteBackend operation -type DeleteBackendRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set associated with the backend server. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The IP address and port of the backend server to remove. - // Example: `10.0.0.3:8080` - BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteBackendRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteBackendRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteBackendRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteBackendResponse wrapper for the DeleteBackend operation -type DeleteBackendResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response DeleteBackendResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteBackendResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go deleted file mode 100644 index 4baa185aa..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteBackendSetRequest wrapper for the DeleteBackendSet operation -type DeleteBackendSetRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set to delete. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteBackendSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteBackendSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteBackendSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteBackendSetResponse wrapper for the DeleteBackendSet operation -type DeleteBackendSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response DeleteBackendSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteBackendSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go deleted file mode 100644 index 5c159ab1a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteCertificateRequest wrapper for the DeleteCertificate operation -type DeleteCertificateRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificate bundle - // to be deleted. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the certificate bundle to delete. - // Example: `example_certificate_bundle` - CertificateName *string `mandatory:"true" contributesTo:"path" name:"certificateName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteCertificateRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteCertificateRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteCertificateRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteCertificateResponse wrapper for the DeleteCertificate operation -type DeleteCertificateResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response DeleteCertificateResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteCertificateResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_hostname_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_hostname_request_response.go deleted file mode 100644 index a08c54af8..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_hostname_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteHostnameRequest wrapper for the DeleteHostname operation -type DeleteHostnameRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the hostname to delete. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the hostname resource to delete. - // Example: `example_hostname_001` - Name *string `mandatory:"true" contributesTo:"path" name:"name"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteHostnameRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteHostnameRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteHostnameRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteHostnameResponse wrapper for the DeleteHostname operation -type DeleteHostnameResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response DeleteHostnameResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteHostnameResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go deleted file mode 100644 index d03101f89..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteListenerRequest wrapper for the DeleteListener operation -type DeleteListenerRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the listener to delete. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the listener to delete. - // Example: `example_listener` - ListenerName *string `mandatory:"true" contributesTo:"path" name:"listenerName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteListenerRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteListenerRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteListenerRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteListenerResponse wrapper for the DeleteListener operation -type DeleteListenerResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response DeleteListenerResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteListenerResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go deleted file mode 100644 index 3ff01a012..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteLoadBalancerRequest wrapper for the DeleteLoadBalancer operation -type DeleteLoadBalancerRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to delete. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteLoadBalancerRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteLoadBalancerRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteLoadBalancerResponse wrapper for the DeleteLoadBalancer operation -type DeleteLoadBalancerResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response DeleteLoadBalancerResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteLoadBalancerResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_path_route_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_path_route_set_request_response.go deleted file mode 100644 index 59f47c502..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_path_route_set_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeletePathRouteSetRequest wrapper for the DeletePathRouteSet operation -type DeletePathRouteSetRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the path route set to delete. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the path route set to delete. - // Example: `example_path_route_set` - PathRouteSetName *string `mandatory:"true" contributesTo:"path" name:"pathRouteSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeletePathRouteSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeletePathRouteSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeletePathRouteSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeletePathRouteSetResponse wrapper for the DeletePathRouteSet operation -type DeletePathRouteSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response DeletePathRouteSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeletePathRouteSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go deleted file mode 100644 index d89abad76..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetBackendHealthRequest wrapper for the GetBackendHealth operation -type GetBackendHealthRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend server health status to be retrieved. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set associated with the backend server to retrieve the health status for. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The IP address and port of the backend server to retrieve the health status for. - // Example: `10.0.0.3:8080` - BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetBackendHealthRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetBackendHealthRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetBackendHealthRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetBackendHealthResponse wrapper for the GetBackendHealth operation -type GetBackendHealthResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The BackendHealth instance - BackendHealth `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetBackendHealthResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetBackendHealthResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go deleted file mode 100644 index 26c799c05..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetBackendRequest wrapper for the GetBackend operation -type GetBackendRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set that includes the backend server. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The IP address and port of the backend server to retrieve. - // Example: `10.0.0.3:8080` - BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetBackendRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetBackendRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetBackendRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetBackendResponse wrapper for the GetBackend operation -type GetBackendResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Backend instance - Backend `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetBackendResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetBackendResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go deleted file mode 100644 index 85adf3cec..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetBackendSetHealthRequest wrapper for the GetBackendSetHealth operation -type GetBackendSetHealthRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set health status to be retrieved. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set to retrieve the health status for. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetBackendSetHealthRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetBackendSetHealthRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetBackendSetHealthRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetBackendSetHealthResponse wrapper for the GetBackendSetHealth operation -type GetBackendSetHealthResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The BackendSetHealth instance - BackendSetHealth `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetBackendSetHealthResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetBackendSetHealthResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go deleted file mode 100644 index 8162ec428..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetBackendSetRequest wrapper for the GetBackendSet operation -type GetBackendSetRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the specified load balancer. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set to retrieve. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetBackendSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetBackendSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetBackendSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetBackendSetResponse wrapper for the GetBackendSet operation -type GetBackendSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The BackendSet instance - BackendSet `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetBackendSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetBackendSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go deleted file mode 100644 index d45f6efad..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetHealthCheckerRequest wrapper for the GetHealthChecker operation -type GetHealthCheckerRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the health check policy to be retrieved. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set associated with the health check policy to be retrieved. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetHealthCheckerRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetHealthCheckerRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetHealthCheckerRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetHealthCheckerResponse wrapper for the GetHealthChecker operation -type GetHealthCheckerResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The HealthChecker instance - HealthChecker `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetHealthCheckerResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetHealthCheckerResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_hostname_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_hostname_request_response.go deleted file mode 100644 index ea05a3859..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_hostname_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetHostnameRequest wrapper for the GetHostname operation -type GetHostnameRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the specified load balancer. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the hostname resource to retrieve. - // Example: `example_hostname_001` - Name *string `mandatory:"true" contributesTo:"path" name:"name"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetHostnameRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetHostnameRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetHostnameRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetHostnameResponse wrapper for the GetHostname operation -type GetHostnameResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Hostname instance - Hostname `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetHostnameResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetHostnameResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go deleted file mode 100644 index 3b667eb6a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetLoadBalancerHealthRequest wrapper for the GetLoadBalancerHealth operation -type GetLoadBalancerHealthRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to return health status for. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetLoadBalancerHealthRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetLoadBalancerHealthRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetLoadBalancerHealthRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetLoadBalancerHealthResponse wrapper for the GetLoadBalancerHealth operation -type GetLoadBalancerHealthResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The LoadBalancerHealth instance - LoadBalancerHealth `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetLoadBalancerHealthResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetLoadBalancerHealthResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go deleted file mode 100644 index 04e20a43a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetLoadBalancerRequest wrapper for the GetLoadBalancer operation -type GetLoadBalancerRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to retrieve. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetLoadBalancerRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetLoadBalancerRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetLoadBalancerResponse wrapper for the GetLoadBalancer operation -type GetLoadBalancerResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The LoadBalancer instance - LoadBalancer `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetLoadBalancerResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetLoadBalancerResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_path_route_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_path_route_set_request_response.go deleted file mode 100644 index ab4c51879..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_path_route_set_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetPathRouteSetRequest wrapper for the GetPathRouteSet operation -type GetPathRouteSetRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the specified load balancer. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the path route set to retrieve. - // Example: `example_path_route_set` - PathRouteSetName *string `mandatory:"true" contributesTo:"path" name:"pathRouteSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetPathRouteSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetPathRouteSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetPathRouteSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetPathRouteSetResponse wrapper for the GetPathRouteSet operation -type GetPathRouteSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The PathRouteSet instance - PathRouteSet `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetPathRouteSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetPathRouteSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go deleted file mode 100644 index 702d609e8..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetWorkRequestRequest wrapper for the GetWorkRequest operation -type GetWorkRequestRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request to retrieve. - WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetWorkRequestRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetWorkRequestRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetWorkRequestResponse wrapper for the GetWorkRequest operation -type GetWorkRequestResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The WorkRequest instance - WorkRequest `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetWorkRequestResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetWorkRequestResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go deleted file mode 100644 index 529eb1ca6..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// HealthCheckResult Information about a single backend server health check result reported by a load balancer. -type HealthCheckResult struct { - - // The result of the most recent health check. - HealthCheckStatus HealthCheckResultHealthCheckStatusEnum `mandatory:"true" json:"healthCheckStatus"` - - // The IP address of the health check status report provider. This identifier helps you differentiate same-subnet - // (private) load balancers that report health check status. - // Example: `10.0.0.7` - SourceIpAddress *string `mandatory:"true" json:"sourceIpAddress"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the subnet hosting the load balancer that reported this health check status. - SubnetId *string `mandatory:"true" json:"subnetId"` - - // The date and time the data was retrieved, in the format defined by RFC3339. - // Example: `2017-06-02T18:28:11+00:00` - Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` -} - -func (m HealthCheckResult) String() string { - return common.PointerString(m) -} - -// HealthCheckResultHealthCheckStatusEnum Enum with underlying type: string -type HealthCheckResultHealthCheckStatusEnum string - -// Set of constants representing the allowable values for HealthCheckResultHealthCheckStatus -const ( - HealthCheckResultHealthCheckStatusOk HealthCheckResultHealthCheckStatusEnum = "OK" - HealthCheckResultHealthCheckStatusInvalidStatusCode HealthCheckResultHealthCheckStatusEnum = "INVALID_STATUS_CODE" - HealthCheckResultHealthCheckStatusTimedOut HealthCheckResultHealthCheckStatusEnum = "TIMED_OUT" - HealthCheckResultHealthCheckStatusRegexMismatch HealthCheckResultHealthCheckStatusEnum = "REGEX_MISMATCH" - HealthCheckResultHealthCheckStatusConnectFailed HealthCheckResultHealthCheckStatusEnum = "CONNECT_FAILED" - HealthCheckResultHealthCheckStatusIoError HealthCheckResultHealthCheckStatusEnum = "IO_ERROR" - HealthCheckResultHealthCheckStatusOffline HealthCheckResultHealthCheckStatusEnum = "OFFLINE" - HealthCheckResultHealthCheckStatusUnknown HealthCheckResultHealthCheckStatusEnum = "UNKNOWN" -) - -var mappingHealthCheckResultHealthCheckStatus = map[string]HealthCheckResultHealthCheckStatusEnum{ - "OK": HealthCheckResultHealthCheckStatusOk, - "INVALID_STATUS_CODE": HealthCheckResultHealthCheckStatusInvalidStatusCode, - "TIMED_OUT": HealthCheckResultHealthCheckStatusTimedOut, - "REGEX_MISMATCH": HealthCheckResultHealthCheckStatusRegexMismatch, - "CONNECT_FAILED": HealthCheckResultHealthCheckStatusConnectFailed, - "IO_ERROR": HealthCheckResultHealthCheckStatusIoError, - "OFFLINE": HealthCheckResultHealthCheckStatusOffline, - "UNKNOWN": HealthCheckResultHealthCheckStatusUnknown, -} - -// GetHealthCheckResultHealthCheckStatusEnumValues Enumerates the set of values for HealthCheckResultHealthCheckStatus -func GetHealthCheckResultHealthCheckStatusEnumValues() []HealthCheckResultHealthCheckStatusEnum { - values := make([]HealthCheckResultHealthCheckStatusEnum, 0) - for _, v := range mappingHealthCheckResultHealthCheckStatus { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go deleted file mode 100644 index 7fd4d372e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// HealthChecker The health check policy configuration. -// For more information, see Editing Health Check Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/editinghealthcheck.htm). -type HealthChecker struct { - - // The backend server port against which to run the health check. If the port is not specified, the load balancer uses the - // port information from the `Backend` object. - // Example: `8080` - Port *int `mandatory:"true" json:"port"` - - // The protocol the health check must use; either HTTP or TCP. - // Example: `HTTP` - Protocol *string `mandatory:"true" json:"protocol"` - - // A regular expression for parsing the response body from the backend server. - // Example: `^((?!false).|\s)*$` - ResponseBodyRegex *string `mandatory:"true" json:"responseBodyRegex"` - - // The status code a healthy backend server should return. If you configure the health check policy to use the HTTP protocol, - // you can use common HTTP status codes such as "200". - // Example: `200` - ReturnCode *int `mandatory:"true" json:"returnCode"` - - // The interval between health checks, in milliseconds. The default is 10000 (10 seconds). - // Example: `10000` - IntervalInMillis *int `mandatory:"false" json:"intervalInMillis"` - - // The number of retries to attempt before a backend server is considered "unhealthy". Defaults to 3. - // Example: `3` - Retries *int `mandatory:"false" json:"retries"` - - // The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply - // returns within this timeout period. Defaults to 3000 (3 seconds). - // Example: `3000` - TimeoutInMillis *int `mandatory:"false" json:"timeoutInMillis"` - - // The path against which to run the health check. - // Example: `/healthcheck` - UrlPath *string `mandatory:"false" json:"urlPath"` -} - -func (m HealthChecker) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go deleted file mode 100644 index d1ad1ac26..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// HealthCheckerDetails The health check policy's configuration details. -type HealthCheckerDetails struct { - - // The protocol the health check must use; either HTTP or TCP. - // Example: `HTTP` - Protocol *string `mandatory:"true" json:"protocol"` - - // The interval between health checks, in milliseconds. - // Example: `10000` - IntervalInMillis *int `mandatory:"false" json:"intervalInMillis"` - - // The backend server port against which to run the health check. If the port is not specified, the load balancer uses the - // port information from the `Backend` object. - // Example: `8080` - Port *int `mandatory:"false" json:"port"` - - // A regular expression for parsing the response body from the backend server. - // Example: `^((?!false).|\s)*$` - ResponseBodyRegex *string `mandatory:"false" json:"responseBodyRegex"` - - // The number of retries to attempt before a backend server is considered "unhealthy". - // Example: `3` - Retries *int `mandatory:"false" json:"retries"` - - // The status code a healthy backend server should return. - // Example: `200` - ReturnCode *int `mandatory:"false" json:"returnCode"` - - // The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply - // returns within this timeout period. - // Example: `3000` - TimeoutInMillis *int `mandatory:"false" json:"timeoutInMillis"` - - // The path against which to run the health check. - // Example: `/healthcheck` - UrlPath *string `mandatory:"false" json:"urlPath"` -} - -func (m HealthCheckerDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname.go deleted file mode 100644 index 0f5ed18f3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Hostname A hostname resource associated with a load balancer for use by one or more listeners. -type Hostname struct { - - // A virtual hostname. For more information about virtual hostname string construction, see - // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). - // Example: `app.example.com` - Hostname *string `mandatory:"true" json:"hostname"` - - // A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential - // information. - // Example: `example_hostname_001` - Name *string `mandatory:"true" json:"name"` -} - -func (m Hostname) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname_details.go deleted file mode 100644 index fa0e54486..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/hostname_details.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// HostnameDetails The details of a hostname resource associated with a load balancer. -type HostnameDetails struct { - - // A virtual hostname. For more information about virtual hostname string construction, see - // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). - // Example: `app.example.com` - Hostname *string `mandatory:"true" json:"hostname"` - - // The name of the hostname resource. - // Example: `example_hostname_001` - Name *string `mandatory:"true" json:"name"` -} - -func (m HostnameDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go deleted file mode 100644 index c598c5c94..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// IpAddress A load balancer IP address. -type IpAddress struct { - - // An IP address. - // Example: `192.168.0.3` - IpAddress *string `mandatory:"true" json:"ipAddress"` - - // Whether the IP address is public or private. - // If "true", the IP address is public and accessible from the internet. - // If "false", the IP address is private and accessible only from within the associated VCN. - IsPublic *bool `mandatory:"false" json:"isPublic"` -} - -func (m IpAddress) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go deleted file mode 100644 index d31a5a287..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListBackendSetsRequest wrapper for the ListBackendSets operation -type ListBackendSetsRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend sets to retrieve. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListBackendSetsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListBackendSetsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListBackendSetsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListBackendSetsResponse wrapper for the ListBackendSets operation -type ListBackendSetsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []BackendSet instance - Items []BackendSet `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListBackendSetsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListBackendSetsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go deleted file mode 100644 index b5752098f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListBackendsRequest wrapper for the ListBackends operation -type ListBackendsRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and servers. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set associated with the backend servers. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListBackendsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListBackendsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListBackendsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListBackendsResponse wrapper for the ListBackends operation -type ListBackendsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []Backend instance - Items []Backend `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListBackendsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListBackendsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go deleted file mode 100644 index 7c609b06a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListCertificatesRequest wrapper for the ListCertificates operation -type ListCertificatesRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificate bundles - // to be listed. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListCertificatesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListCertificatesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListCertificatesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListCertificatesResponse wrapper for the ListCertificates operation -type ListCertificatesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []Certificate instance - Items []Certificate `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListCertificatesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListCertificatesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_hostnames_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_hostnames_request_response.go deleted file mode 100644 index 39d2a58dc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_hostnames_request_response.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListHostnamesRequest wrapper for the ListHostnames operation -type ListHostnamesRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the hostnames - // to retrieve. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListHostnamesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListHostnamesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListHostnamesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListHostnamesResponse wrapper for the ListHostnames operation -type ListHostnamesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []Hostname instance - Items []Hostname `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListHostnamesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListHostnamesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go deleted file mode 100644 index b816939fb..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListLoadBalancerHealthsRequest wrapper for the ListLoadBalancerHealths operation -type ListLoadBalancerHealthsRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancers to return health status information for. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - // Example: `3` - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListLoadBalancerHealthsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListLoadBalancerHealthsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListLoadBalancerHealthsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListLoadBalancerHealthsResponse wrapper for the ListLoadBalancerHealths operation -type ListLoadBalancerHealthsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []LoadBalancerHealthSummary instances - Items []LoadBalancerHealthSummary `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListLoadBalancerHealthsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListLoadBalancerHealthsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go deleted file mode 100644 index ed89da39a..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListLoadBalancersRequest wrapper for the ListLoadBalancers operation -type ListLoadBalancersRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancers to list. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - // Example: `3` - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The level of detail to return for each result. Can be `full` or `simple`. - // Example: `full` - Detail *string `mandatory:"false" contributesTo:"query" name:"detail"` - - // The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. - // Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. - SortBy ListLoadBalancersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - - // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive. - SortOrder ListLoadBalancersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - - // A filter to return only resources that match the given display name exactly. - // Example: `example_load_balancer` - DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - - // A filter to return only resources that match the given lifecycle state. - // Example: `SUCCEEDED` - LifecycleState LoadBalancerLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListLoadBalancersRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListLoadBalancersRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListLoadBalancersRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListLoadBalancersResponse wrapper for the ListLoadBalancers operation -type ListLoadBalancersResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []LoadBalancer instances - Items []LoadBalancer `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListLoadBalancersResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListLoadBalancersResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListLoadBalancersSortByEnum Enum with underlying type: string -type ListLoadBalancersSortByEnum string - -// Set of constants representing the allowable values for ListLoadBalancersSortBy -const ( - ListLoadBalancersSortByTimecreated ListLoadBalancersSortByEnum = "TIMECREATED" - ListLoadBalancersSortByDisplayname ListLoadBalancersSortByEnum = "DISPLAYNAME" -) - -var mappingListLoadBalancersSortBy = map[string]ListLoadBalancersSortByEnum{ - "TIMECREATED": ListLoadBalancersSortByTimecreated, - "DISPLAYNAME": ListLoadBalancersSortByDisplayname, -} - -// GetListLoadBalancersSortByEnumValues Enumerates the set of values for ListLoadBalancersSortBy -func GetListLoadBalancersSortByEnumValues() []ListLoadBalancersSortByEnum { - values := make([]ListLoadBalancersSortByEnum, 0) - for _, v := range mappingListLoadBalancersSortBy { - values = append(values, v) - } - return values -} - -// ListLoadBalancersSortOrderEnum Enum with underlying type: string -type ListLoadBalancersSortOrderEnum string - -// Set of constants representing the allowable values for ListLoadBalancersSortOrder -const ( - ListLoadBalancersSortOrderAsc ListLoadBalancersSortOrderEnum = "ASC" - ListLoadBalancersSortOrderDesc ListLoadBalancersSortOrderEnum = "DESC" -) - -var mappingListLoadBalancersSortOrder = map[string]ListLoadBalancersSortOrderEnum{ - "ASC": ListLoadBalancersSortOrderAsc, - "DESC": ListLoadBalancersSortOrderDesc, -} - -// GetListLoadBalancersSortOrderEnumValues Enumerates the set of values for ListLoadBalancersSortOrder -func GetListLoadBalancersSortOrderEnumValues() []ListLoadBalancersSortOrderEnum { - values := make([]ListLoadBalancersSortOrderEnum, 0) - for _, v := range mappingListLoadBalancersSortOrder { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_path_route_sets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_path_route_sets_request_response.go deleted file mode 100644 index 55163bab4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_path_route_sets_request_response.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListPathRouteSetsRequest wrapper for the ListPathRouteSets operation -type ListPathRouteSetsRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the path route sets - // to retrieve. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListPathRouteSetsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListPathRouteSetsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListPathRouteSetsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListPathRouteSetsResponse wrapper for the ListPathRouteSets operation -type ListPathRouteSetsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The []PathRouteSet instance - Items []PathRouteSet `presentIn:"body"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListPathRouteSetsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListPathRouteSetsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go deleted file mode 100644 index 482cfd8e9..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListPoliciesRequest wrapper for the ListPolicies operation -type ListPoliciesRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer policies to list. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - // Example: `3` - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListPoliciesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListPoliciesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListPoliciesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListPoliciesResponse wrapper for the ListPolicies operation -type ListPoliciesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []LoadBalancerPolicy instances - Items []LoadBalancerPolicy `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListPoliciesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListPoliciesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go deleted file mode 100644 index 01d46c111..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListProtocolsRequest wrapper for the ListProtocols operation -type ListProtocolsRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer protocols to list. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - // Example: `3` - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListProtocolsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListProtocolsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListProtocolsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListProtocolsResponse wrapper for the ListProtocols operation -type ListProtocolsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []LoadBalancerProtocol instances - Items []LoadBalancerProtocol `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListProtocolsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListProtocolsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go deleted file mode 100644 index 326ba2808..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListShapesRequest wrapper for the ListShapes operation -type ListShapesRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer shapes to list. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - // Example: `3` - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListShapesRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListShapesRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListShapesRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListShapesResponse wrapper for the ListShapes operation -type ListShapesResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []LoadBalancerShape instances - Items []LoadBalancerShape `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListShapesResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListShapesResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go deleted file mode 100644 index 8fbe738f4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListWorkRequestsRequest wrapper for the ListWorkRequests operation -type ListWorkRequestsRequest struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the work requests to retrieve. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // The maximum number of items to return in a paginated "List" call. - // Example: `500` - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The value of the `opc-next-page` response header from the previous "List" call. - // Example: `3` - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListWorkRequestsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListWorkRequestsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListWorkRequestsResponse wrapper for the ListWorkRequests operation -type ListWorkRequestsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []WorkRequest instances - Items []WorkRequest `presentIn:"body"` - - // For pagination of a list of items. When paging through a list, if this header appears in the response, - // then a partial list might have been returned. Include this value as the `page` parameter for the - // subsequent GET request to get the next batch of items. - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListWorkRequestsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go deleted file mode 100644 index d4ca0c8fa..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Listener The listener's configuration. -// For more information on backend set configuration, see -// Managing Load Balancer Listeners (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managinglisteners.htm). -type Listener struct { - - // The name of the associated backend set. - // Example: `example_backend_set` - DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` - - // A friendly name for the listener. It must be unique and it cannot be changed. - // Example: `example_listener` - Name *string `mandatory:"true" json:"name"` - - // The communication port for the listener. - // Example: `80` - Port *int `mandatory:"true" json:"port"` - - // The protocol on which the listener accepts connection requests. - // To get a list of valid protocols, use the ListProtocols - // operation. - // Example: `HTTP` - Protocol *string `mandatory:"true" json:"protocol"` - - ConnectionConfiguration *ConnectionConfiguration `mandatory:"false" json:"connectionConfiguration"` - - // An array of hostname resource names. - HostnameNames []string `mandatory:"false" json:"hostnameNames"` - - // The name of the set of path-based routing rules, PathRouteSet, - // applied to this listener's traffic. - // Example: `example_path_route_set` - PathRouteSetName *string `mandatory:"false" json:"pathRouteSetName"` - - SslConfiguration *SslConfiguration `mandatory:"false" json:"sslConfiguration"` -} - -func (m Listener) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go deleted file mode 100644 index dfbad5032..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ListenerDetails The listener's configuration details. -type ListenerDetails struct { - - // The name of the associated backend set. - // Example: `example_backend_set` - DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` - - // The communication port for the listener. - // Example: `80` - Port *int `mandatory:"true" json:"port"` - - // The protocol on which the listener accepts connection requests. - // To get a list of valid protocols, use the ListProtocols - // operation. - // Example: `HTTP` - Protocol *string `mandatory:"true" json:"protocol"` - - ConnectionConfiguration *ConnectionConfiguration `mandatory:"false" json:"connectionConfiguration"` - - // An array of hostname resource names. - HostnameNames []string `mandatory:"false" json:"hostnameNames"` - - // The name of the set of path-based routing rules, PathRouteSet, - // applied to this listener's traffic. - // Example: `example_path_route_set` - PathRouteSetName *string `mandatory:"false" json:"pathRouteSetName"` - - SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` -} - -func (m ListenerDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go deleted file mode 100644 index 3d138dbe7..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// LoadBalancer The properties that define a load balancer. For more information, see -// Managing a Load Balancer (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingloadbalancer.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -// For information about endpoints and signing API requests, see -// About the API (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see -// SDKS and Other Tools (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdks.htm). -type LoadBalancer struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // A user-friendly name. It does not have to be unique, and it is changeable. - // Example: `example_load_balancer` - DisplayName *string `mandatory:"true" json:"displayName"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer. - Id *string `mandatory:"true" json:"id"` - - // The current state of the load balancer. - LifecycleState LoadBalancerLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // A template that determines the total pre-provisioned bandwidth (ingress plus egress). - // To get a list of available shapes, use the ListShapes - // operation. - // Example: `100Mbps` - ShapeName *string `mandatory:"true" json:"shapeName"` - - // The date and time the load balancer was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - BackendSets map[string]BackendSet `mandatory:"false" json:"backendSets"` - - Certificates map[string]Certificate `mandatory:"false" json:"certificates"` - - Hostnames map[string]Hostname `mandatory:"false" json:"hostnames"` - - // An array of IP addresses. - IpAddresses []IpAddress `mandatory:"false" json:"ipAddresses"` - - // Whether the load balancer has a VCN-local (private) IP address. - // If "true", the service assigns a private IP address to the load balancer. The load balancer requires only one subnet - // to host both the primary and secondary load balancers. The private IP address is local to the subnet. The load balancer - // is accessible only from within the VCN that contains the associated subnet, or as further restricted by your security - // list rules. The load balancer can route traffic to any backend server that is reachable from the VCN. - // For a private load balancer, both the primary and secondary load balancer hosts are within the same Availability Domain. - // If "false", the service assigns a public IP address to the load balancer. A load balancer with a public IP address - // requires two subnets, each in a different Availability Domain. One subnet hosts the primary load balancer and the other - // hosts the secondary (standby) load balancer. A public load balancer is accessible from the internet, depending on your - // VCN's security list rules (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm). - // Example: `true` - IsPrivate *bool `mandatory:"false" json:"isPrivate"` - - Listeners map[string]Listener `mandatory:"false" json:"listeners"` - - PathRouteSets map[string]PathRouteSet `mandatory:"false" json:"pathRouteSets"` - - // An array of subnet OCIDs (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). - SubnetIds []string `mandatory:"false" json:"subnetIds"` -} - -func (m LoadBalancer) String() string { - return common.PointerString(m) -} - -// LoadBalancerLifecycleStateEnum Enum with underlying type: string -type LoadBalancerLifecycleStateEnum string - -// Set of constants representing the allowable values for LoadBalancerLifecycleState -const ( - LoadBalancerLifecycleStateCreating LoadBalancerLifecycleStateEnum = "CREATING" - LoadBalancerLifecycleStateFailed LoadBalancerLifecycleStateEnum = "FAILED" - LoadBalancerLifecycleStateActive LoadBalancerLifecycleStateEnum = "ACTIVE" - LoadBalancerLifecycleStateDeleting LoadBalancerLifecycleStateEnum = "DELETING" - LoadBalancerLifecycleStateDeleted LoadBalancerLifecycleStateEnum = "DELETED" -) - -var mappingLoadBalancerLifecycleState = map[string]LoadBalancerLifecycleStateEnum{ - "CREATING": LoadBalancerLifecycleStateCreating, - "FAILED": LoadBalancerLifecycleStateFailed, - "ACTIVE": LoadBalancerLifecycleStateActive, - "DELETING": LoadBalancerLifecycleStateDeleting, - "DELETED": LoadBalancerLifecycleStateDeleted, -} - -// GetLoadBalancerLifecycleStateEnumValues Enumerates the set of values for LoadBalancerLifecycleState -func GetLoadBalancerLifecycleStateEnumValues() []LoadBalancerLifecycleStateEnum { - values := make([]LoadBalancerLifecycleStateEnum, 0) - for _, v := range mappingLoadBalancerLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go deleted file mode 100644 index 5a62e7cc0..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// LoadBalancerHealth The health status details for the specified load balancer. -// This object does not explicitly enumerate backend sets with a status of `OK`. However, they are included in the -// `totalBackendSetCount` sum. -type LoadBalancerHealth struct { - - // A list of backend sets that are currently in the `CRITICAL` health state. The list identifies each backend set by the - // friendly name you assigned when you created it. - // Example: `example_backend_set` - CriticalStateBackendSetNames []string `mandatory:"true" json:"criticalStateBackendSetNames"` - - // The overall health status of the load balancer. - // * **OK:** All backend sets associated with the load balancer return a status of `OK`. - // * **WARNING:** At least one of the backend sets associated with the load balancer returns a status of `WARNING`, - // no backend sets return a status of `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. - // * **CRITICAL:** One or more of the backend sets associated with the load balancer return a status of `CRITICAL`. - // * **UNKNOWN:** If any one of the following conditions is true: - // * The load balancer life cycle state is not `ACTIVE`. - // * No backend sets are defined for the load balancer. - // * More than half of the backend sets associated with the load balancer return a status of `UNKNOWN`, none of the backend - // sets return a status of `WARNING` or `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. - // * The system could not retrieve metrics for any reason. - Status LoadBalancerHealthStatusEnum `mandatory:"true" json:"status"` - - // The total number of backend sets associated with this load balancer. - // Example: `4` - TotalBackendSetCount *int `mandatory:"true" json:"totalBackendSetCount"` - - // A list of backend sets that are currently in the `UNKNOWN` health state. The list identifies each backend set by the - // friendly name you assigned when you created it. - // Example: `example_backend_set2` - UnknownStateBackendSetNames []string `mandatory:"true" json:"unknownStateBackendSetNames"` - - // A list of backend sets that are currently in the `WARNING` health state. The list identifies each backend set by the - // friendly name you assigned when you created it. - // Example: `example_backend_set3` - WarningStateBackendSetNames []string `mandatory:"true" json:"warningStateBackendSetNames"` -} - -func (m LoadBalancerHealth) String() string { - return common.PointerString(m) -} - -// LoadBalancerHealthStatusEnum Enum with underlying type: string -type LoadBalancerHealthStatusEnum string - -// Set of constants representing the allowable values for LoadBalancerHealthStatus -const ( - LoadBalancerHealthStatusOk LoadBalancerHealthStatusEnum = "OK" - LoadBalancerHealthStatusWarning LoadBalancerHealthStatusEnum = "WARNING" - LoadBalancerHealthStatusCritical LoadBalancerHealthStatusEnum = "CRITICAL" - LoadBalancerHealthStatusUnknown LoadBalancerHealthStatusEnum = "UNKNOWN" -) - -var mappingLoadBalancerHealthStatus = map[string]LoadBalancerHealthStatusEnum{ - "OK": LoadBalancerHealthStatusOk, - "WARNING": LoadBalancerHealthStatusWarning, - "CRITICAL": LoadBalancerHealthStatusCritical, - "UNKNOWN": LoadBalancerHealthStatusUnknown, -} - -// GetLoadBalancerHealthStatusEnumValues Enumerates the set of values for LoadBalancerHealthStatus -func GetLoadBalancerHealthStatusEnumValues() []LoadBalancerHealthStatusEnum { - values := make([]LoadBalancerHealthStatusEnum, 0) - for _, v := range mappingLoadBalancerHealthStatus { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health_summary.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health_summary.go deleted file mode 100644 index 0ff51e894..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health_summary.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// LoadBalancerHealthSummary A health status summary for the specified load balancer. -type LoadBalancerHealthSummary struct { - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer the health status is associated with. - LoadBalancerId *string `mandatory:"true" json:"loadBalancerId"` - - // The overall health status of the load balancer. - // * **OK:** All backend sets associated with the load balancer return a status of `OK`. - // * **WARNING:** At least one of the backend sets associated with the load balancer returns a status of `WARNING`, - // no backend sets return a status of `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. - // * **CRITICAL:** One or more of the backend sets associated with the load balancer return a status of `CRITICAL`. - // * **UNKNOWN:** If any one of the following conditions is true: - // * The load balancer life cycle state is not `ACTIVE`. - // * No backend sets are defined for the load balancer. - // * More than half of the backend sets associated with the load balancer return a status of `UNKNOWN`, none of the backend - // sets return a status of `WARNING` or `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. - // * The system could not retrieve metrics for any reason. - Status LoadBalancerHealthSummaryStatusEnum `mandatory:"true" json:"status"` -} - -func (m LoadBalancerHealthSummary) String() string { - return common.PointerString(m) -} - -// LoadBalancerHealthSummaryStatusEnum Enum with underlying type: string -type LoadBalancerHealthSummaryStatusEnum string - -// Set of constants representing the allowable values for LoadBalancerHealthSummaryStatus -const ( - LoadBalancerHealthSummaryStatusOk LoadBalancerHealthSummaryStatusEnum = "OK" - LoadBalancerHealthSummaryStatusWarning LoadBalancerHealthSummaryStatusEnum = "WARNING" - LoadBalancerHealthSummaryStatusCritical LoadBalancerHealthSummaryStatusEnum = "CRITICAL" - LoadBalancerHealthSummaryStatusUnknown LoadBalancerHealthSummaryStatusEnum = "UNKNOWN" -) - -var mappingLoadBalancerHealthSummaryStatus = map[string]LoadBalancerHealthSummaryStatusEnum{ - "OK": LoadBalancerHealthSummaryStatusOk, - "WARNING": LoadBalancerHealthSummaryStatusWarning, - "CRITICAL": LoadBalancerHealthSummaryStatusCritical, - "UNKNOWN": LoadBalancerHealthSummaryStatusUnknown, -} - -// GetLoadBalancerHealthSummaryStatusEnumValues Enumerates the set of values for LoadBalancerHealthSummaryStatus -func GetLoadBalancerHealthSummaryStatusEnumValues() []LoadBalancerHealthSummaryStatusEnum { - values := make([]LoadBalancerHealthSummaryStatusEnum, 0) - for _, v := range mappingLoadBalancerHealthSummaryStatus { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go deleted file mode 100644 index 7a0ce46e6..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// LoadBalancerPolicy A policy that determines how traffic is distributed among backend servers. -// For more information on load balancing policies, see -// How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). -type LoadBalancerPolicy struct { - - // The name of a load balancing policy. - // Example: 'LEAST_CONNECTIONS' - Name *string `mandatory:"true" json:"name"` -} - -func (m LoadBalancerPolicy) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go deleted file mode 100644 index 68e9a45f2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// LoadBalancerProtocol A protocol that defines the type of traffic accepted by a listener. -type LoadBalancerProtocol struct { - - // The name of a protocol. - // Example: 'HTTP' - Name *string `mandatory:"true" json:"name"` -} - -func (m LoadBalancerProtocol) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go deleted file mode 100644 index 5ecc28117..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// LoadBalancerShape A shape is a template that determines the total pre-provisioned bandwidth (ingress plus egress) for the -// load balancer. -// Note that the pre-provisioned maximum capacity applies to aggregated connections, not to a single client -// attempting to use the full bandwidth. -type LoadBalancerShape struct { - - // The name of the shape. - // Example: `100Mbps` - Name *string `mandatory:"true" json:"name"` -} - -func (m LoadBalancerShape) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go deleted file mode 100644 index c7fcd931d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go +++ /dev/null @@ -1,1727 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -//LoadBalancerClient a client for LoadBalancer -type LoadBalancerClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewLoadBalancerClientWithConfigurationProvider Creates a new default LoadBalancer client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewLoadBalancerClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client LoadBalancerClient, err error) { - baseClient, err := common.NewClientWithConfig(configProvider) - if err != nil { - return - } - - client = LoadBalancerClient{BaseClient: baseClient} - client.BasePath = "20170115" - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *LoadBalancerClient) SetRegion(region string) { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "iaas", region) -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *LoadBalancerClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { - if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { - return err - } - - // Error has been checked already - region, _ := configProvider.Region() - client.SetRegion(region) - client.config = &configProvider - return nil -} - -// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set -func (client *LoadBalancerClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// CreateBackend Adds a backend server to a backend set. -func (client LoadBalancerClient) CreateBackend(ctx context.Context, request CreateBackendRequest) (response CreateBackendResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createBackend, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateBackendResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateBackendResponse") - } - return -} - -// createBackend implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) createBackend(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends") - if err != nil { - return nil, err - } - - var response CreateBackendResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateBackendSet Adds a backend set to a load balancer. -func (client LoadBalancerClient) CreateBackendSet(ctx context.Context, request CreateBackendSetRequest) (response CreateBackendSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createBackendSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateBackendSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateBackendSetResponse") - } - return -} - -// createBackendSet implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) createBackendSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/backendSets") - if err != nil { - return nil, err - } - - var response CreateBackendSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateCertificate Creates an asynchronous request to add an SSL certificate bundle. -func (client LoadBalancerClient) CreateCertificate(ctx context.Context, request CreateCertificateRequest) (response CreateCertificateResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createCertificate, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateCertificateResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateCertificateResponse") - } - return -} - -// createCertificate implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) createCertificate(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/certificates") - if err != nil { - return nil, err - } - - var response CreateCertificateResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateHostname Adds a hostname resource to the specified load balancer. For more information, see -// Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). -func (client LoadBalancerClient) CreateHostname(ctx context.Context, request CreateHostnameRequest) (response CreateHostnameResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createHostname, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateHostnameResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateHostnameResponse") - } - return -} - -// createHostname implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) createHostname(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/hostnames") - if err != nil { - return nil, err - } - - var response CreateHostnameResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateListener Adds a listener to a load balancer. -func (client LoadBalancerClient) CreateListener(ctx context.Context, request CreateListenerRequest) (response CreateListenerResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createListener, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateListenerResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateListenerResponse") - } - return -} - -// createListener implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) createListener(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/listeners") - if err != nil { - return nil, err - } - - var response CreateListenerResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateLoadBalancer Creates a new load balancer in the specified compartment. For general information about load balancers, -// see Overview of the Load Balancing Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Concepts/balanceoverview.htm). -// For the purposes of access control, you must provide the OCID of the compartment where you want -// the load balancer to reside. Notice that the load balancer doesn't have to be in the same compartment as the VCN -// or backend set. If you're not sure which compartment to use, put the load balancer in the same compartment as the VCN. -// For information about access control and compartments, see -// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). -// You must specify a display name for the load balancer. It does not have to be unique, and you can change it. -// For information about Availability Domains, see -// Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). -// To get a list of Availability Domains, use the `ListAvailabilityDomains` operation -// in the Identity and Access Management Service API. -// All Oracle Cloud Infrastructure resources, including load balancers, get an Oracle-assigned, -// unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID -// in the response. You can also retrieve a resource's OCID by using a List API operation on that resource type, -// or by viewing the resource in the Console. Fore more information, see -// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). -// After you send your request, the new object's state will temporarily be PROVISIONING. Before using the -// object, first make sure its state has changed to RUNNING. -// When you create a load balancer, the system assigns an IP address. -// To get the IP address, use the GetLoadBalancer operation. -func (client LoadBalancerClient) CreateLoadBalancer(ctx context.Context, request CreateLoadBalancerRequest) (response CreateLoadBalancerResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createLoadBalancer, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateLoadBalancerResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateLoadBalancerResponse") - } - return -} - -// createLoadBalancer implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) createLoadBalancer(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers") - if err != nil { - return nil, err - } - - var response CreateLoadBalancerResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreatePathRouteSet Adds a path route set to a load balancer. For more information, see -// Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). -func (client LoadBalancerClient) CreatePathRouteSet(ctx context.Context, request CreatePathRouteSetRequest) (response CreatePathRouteSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createPathRouteSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreatePathRouteSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreatePathRouteSetResponse") - } - return -} - -// createPathRouteSet implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) createPathRouteSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/loadBalancers/{loadBalancerId}/pathRouteSets") - if err != nil { - return nil, err - } - - var response CreatePathRouteSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteBackend Removes a backend server from a given load balancer and backend set. -func (client LoadBalancerClient) DeleteBackend(ctx context.Context, request DeleteBackendRequest) (response DeleteBackendResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteBackend, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteBackendResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteBackendResponse") - } - return -} - -// deleteBackend implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) deleteBackend(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}") - if err != nil { - return nil, err - } - - var response DeleteBackendResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteBackendSet Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the load balancer. -// Before you can delete a backend set, you must remove it from any active listeners. -func (client LoadBalancerClient) DeleteBackendSet(ctx context.Context, request DeleteBackendSetRequest) (response DeleteBackendSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteBackendSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteBackendSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteBackendSetResponse") - } - return -} - -// deleteBackendSet implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) deleteBackendSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}") - if err != nil { - return nil, err - } - - var response DeleteBackendSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteCertificate Deletes an SSL certificate bundle from a load balancer. -func (client LoadBalancerClient) DeleteCertificate(ctx context.Context, request DeleteCertificateRequest) (response DeleteCertificateResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteCertificate, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteCertificateResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteCertificateResponse") - } - return -} - -// deleteCertificate implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) deleteCertificate(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/certificates/{certificateName}") - if err != nil { - return nil, err - } - - var response DeleteCertificateResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteHostname Deletes a hostname resource from the specified load balancer. -func (client LoadBalancerClient) DeleteHostname(ctx context.Context, request DeleteHostnameRequest) (response DeleteHostnameResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteHostname, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteHostnameResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteHostnameResponse") - } - return -} - -// deleteHostname implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) deleteHostname(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/hostnames/{name}") - if err != nil { - return nil, err - } - - var response DeleteHostnameResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteListener Deletes a listener from a load balancer. -func (client LoadBalancerClient) DeleteListener(ctx context.Context, request DeleteListenerRequest) (response DeleteListenerResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteListener, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteListenerResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteListenerResponse") - } - return -} - -// deleteListener implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) deleteListener(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/listeners/{listenerName}") - if err != nil { - return nil, err - } - - var response DeleteListenerResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteLoadBalancer Stops a load balancer and removes it from service. -func (client LoadBalancerClient) DeleteLoadBalancer(ctx context.Context, request DeleteLoadBalancerRequest) (response DeleteLoadBalancerResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteLoadBalancer, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteLoadBalancerResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteLoadBalancerResponse") - } - return -} - -// deleteLoadBalancer implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) deleteLoadBalancer(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}") - if err != nil { - return nil, err - } - - var response DeleteLoadBalancerResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeletePathRouteSet Deletes a path route set from the specified load balancer. -// To delete a path route rule from a path route set, use the -// UpdatePathRouteSet operation. -func (client LoadBalancerClient) DeletePathRouteSet(ctx context.Context, request DeletePathRouteSetRequest) (response DeletePathRouteSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deletePathRouteSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeletePathRouteSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeletePathRouteSetResponse") - } - return -} - -// deletePathRouteSet implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) deletePathRouteSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}") - if err != nil { - return nil, err - } - - var response DeletePathRouteSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetBackend Gets the specified backend server's configuration information. -func (client LoadBalancerClient) GetBackend(ctx context.Context, request GetBackendRequest) (response GetBackendResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getBackend, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetBackendResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBackendResponse") - } - return -} - -// getBackend implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getBackend(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}") - if err != nil { - return nil, err - } - - var response GetBackendResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetBackendHealth Gets the current health status of the specified backend server. -func (client LoadBalancerClient) GetBackendHealth(ctx context.Context, request GetBackendHealthRequest) (response GetBackendHealthResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getBackendHealth, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetBackendHealthResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBackendHealthResponse") - } - return -} - -// getBackendHealth implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getBackendHealth(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}/health") - if err != nil { - return nil, err - } - - var response GetBackendHealthResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetBackendSet Gets the specified backend set's configuration information. -func (client LoadBalancerClient) GetBackendSet(ctx context.Context, request GetBackendSetRequest) (response GetBackendSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getBackendSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetBackendSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBackendSetResponse") - } - return -} - -// getBackendSet implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getBackendSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}") - if err != nil { - return nil, err - } - - var response GetBackendSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetBackendSetHealth Gets the health status for the specified backend set. -func (client LoadBalancerClient) GetBackendSetHealth(ctx context.Context, request GetBackendSetHealthRequest) (response GetBackendSetHealthResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getBackendSetHealth, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetBackendSetHealthResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBackendSetHealthResponse") - } - return -} - -// getBackendSetHealth implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getBackendSetHealth(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/health") - if err != nil { - return nil, err - } - - var response GetBackendSetHealthResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetHealthChecker Gets the health check policy information for a given load balancer and backend set. -func (client LoadBalancerClient) GetHealthChecker(ctx context.Context, request GetHealthCheckerRequest) (response GetHealthCheckerResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getHealthChecker, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetHealthCheckerResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetHealthCheckerResponse") - } - return -} - -// getHealthChecker implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getHealthChecker(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker") - if err != nil { - return nil, err - } - - var response GetHealthCheckerResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetHostname Gets the specified hostname resource's configuration information. -func (client LoadBalancerClient) GetHostname(ctx context.Context, request GetHostnameRequest) (response GetHostnameResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getHostname, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetHostnameResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetHostnameResponse") - } - return -} - -// getHostname implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getHostname(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/hostnames/{name}") - if err != nil { - return nil, err - } - - var response GetHostnameResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetLoadBalancer Gets the specified load balancer's configuration information. -func (client LoadBalancerClient) GetLoadBalancer(ctx context.Context, request GetLoadBalancerRequest) (response GetLoadBalancerResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getLoadBalancer, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetLoadBalancerResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetLoadBalancerResponse") - } - return -} - -// getLoadBalancer implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getLoadBalancer(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}") - if err != nil { - return nil, err - } - - var response GetLoadBalancerResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetLoadBalancerHealth Gets the health status for the specified load balancer. -func (client LoadBalancerClient) GetLoadBalancerHealth(ctx context.Context, request GetLoadBalancerHealthRequest) (response GetLoadBalancerHealthResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getLoadBalancerHealth, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetLoadBalancerHealthResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetLoadBalancerHealthResponse") - } - return -} - -// getLoadBalancerHealth implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getLoadBalancerHealth(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/health") - if err != nil { - return nil, err - } - - var response GetLoadBalancerHealthResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetPathRouteSet Gets the specified path route set's configuration information. -func (client LoadBalancerClient) GetPathRouteSet(ctx context.Context, request GetPathRouteSetRequest) (response GetPathRouteSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getPathRouteSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetPathRouteSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetPathRouteSetResponse") - } - return -} - -// getPathRouteSet implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getPathRouteSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}") - if err != nil { - return nil, err - } - - var response GetPathRouteSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetWorkRequest Gets the details of a work request. -func (client LoadBalancerClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") - } - return -} - -// getWorkRequest implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) getWorkRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerWorkRequests/{workRequestId}") - if err != nil { - return nil, err - } - - var response GetWorkRequestResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListBackendSets Lists all backend sets associated with a given load balancer. -func (client LoadBalancerClient) ListBackendSets(ctx context.Context, request ListBackendSetsRequest) (response ListBackendSetsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listBackendSets, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListBackendSetsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListBackendSetsResponse") - } - return -} - -// listBackendSets implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listBackendSets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets") - if err != nil { - return nil, err - } - - var response ListBackendSetsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListBackends Lists the backend servers for a given load balancer and backend set. -func (client LoadBalancerClient) ListBackends(ctx context.Context, request ListBackendsRequest) (response ListBackendsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listBackends, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListBackendsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListBackendsResponse") - } - return -} - -// listBackends implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listBackends(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends") - if err != nil { - return nil, err - } - - var response ListBackendsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListCertificates Lists all SSL certificates bundles associated with a given load balancer. -func (client LoadBalancerClient) ListCertificates(ctx context.Context, request ListCertificatesRequest) (response ListCertificatesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listCertificates, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListCertificatesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListCertificatesResponse") - } - return -} - -// listCertificates implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listCertificates(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/certificates") - if err != nil { - return nil, err - } - - var response ListCertificatesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListHostnames Lists all hostname resources associated with the specified load balancer. -func (client LoadBalancerClient) ListHostnames(ctx context.Context, request ListHostnamesRequest) (response ListHostnamesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listHostnames, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListHostnamesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListHostnamesResponse") - } - return -} - -// listHostnames implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listHostnames(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/hostnames") - if err != nil { - return nil, err - } - - var response ListHostnamesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListLoadBalancerHealths Lists the summary health statuses for all load balancers in the specified compartment. -func (client LoadBalancerClient) ListLoadBalancerHealths(ctx context.Context, request ListLoadBalancerHealthsRequest) (response ListLoadBalancerHealthsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listLoadBalancerHealths, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListLoadBalancerHealthsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListLoadBalancerHealthsResponse") - } - return -} - -// listLoadBalancerHealths implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listLoadBalancerHealths(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerHealths") - if err != nil { - return nil, err - } - - var response ListLoadBalancerHealthsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListLoadBalancers Lists all load balancers in the specified compartment. -func (client LoadBalancerClient) ListLoadBalancers(ctx context.Context, request ListLoadBalancersRequest) (response ListLoadBalancersResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listLoadBalancers, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListLoadBalancersResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListLoadBalancersResponse") - } - return -} - -// listLoadBalancers implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listLoadBalancers(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers") - if err != nil { - return nil, err - } - - var response ListLoadBalancersResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListPathRouteSets Lists all path route sets associated with the specified load balancer. -func (client LoadBalancerClient) ListPathRouteSets(ctx context.Context, request ListPathRouteSetsRequest) (response ListPathRouteSetsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listPathRouteSets, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListPathRouteSetsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListPathRouteSetsResponse") - } - return -} - -// listPathRouteSets implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listPathRouteSets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/pathRouteSets") - if err != nil { - return nil, err - } - - var response ListPathRouteSetsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListPolicies Lists the available load balancer policies. -func (client LoadBalancerClient) ListPolicies(ctx context.Context, request ListPoliciesRequest) (response ListPoliciesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listPolicies, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListPoliciesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListPoliciesResponse") - } - return -} - -// listPolicies implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listPolicies(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerPolicies") - if err != nil { - return nil, err - } - - var response ListPoliciesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListProtocols Lists all supported traffic protocols. -func (client LoadBalancerClient) ListProtocols(ctx context.Context, request ListProtocolsRequest) (response ListProtocolsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listProtocols, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListProtocolsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListProtocolsResponse") - } - return -} - -// listProtocols implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listProtocols(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerProtocols") - if err != nil { - return nil, err - } - - var response ListProtocolsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListShapes Lists the valid load balancer shapes. -func (client LoadBalancerClient) ListShapes(ctx context.Context, request ListShapesRequest) (response ListShapesResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listShapes, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListShapesResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListShapesResponse") - } - return -} - -// listShapes implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listShapes(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancerShapes") - if err != nil { - return nil, err - } - - var response ListShapesResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListWorkRequests Lists the work requests for a given load balancer. -func (client LoadBalancerClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") - } - return -} - -// listWorkRequests implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) listWorkRequests(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/loadBalancers/{loadBalancerId}/workRequests") - if err != nil { - return nil, err - } - - var response ListWorkRequestsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateBackend Updates the configuration of a backend server within the specified backend set. -func (client LoadBalancerClient) UpdateBackend(ctx context.Context, request UpdateBackendRequest) (response UpdateBackendResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateBackend, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateBackendResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateBackendResponse") - } - return -} - -// updateBackend implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) updateBackend(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}") - if err != nil { - return nil, err - } - - var response UpdateBackendResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateBackendSet Updates a backend set. -func (client LoadBalancerClient) UpdateBackendSet(ctx context.Context, request UpdateBackendSetRequest) (response UpdateBackendSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateBackendSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateBackendSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateBackendSetResponse") - } - return -} - -// updateBackendSet implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) updateBackendSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}") - if err != nil { - return nil, err - } - - var response UpdateBackendSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateHealthChecker Updates the health check policy for a given load balancer and backend set. -func (client LoadBalancerClient) UpdateHealthChecker(ctx context.Context, request UpdateHealthCheckerRequest) (response UpdateHealthCheckerResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateHealthChecker, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateHealthCheckerResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateHealthCheckerResponse") - } - return -} - -// updateHealthChecker implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) updateHealthChecker(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker") - if err != nil { - return nil, err - } - - var response UpdateHealthCheckerResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateHostname Overwrites an existing hostname resource on the specified load balancer. Use this operation to change a -// virtual hostname. -func (client LoadBalancerClient) UpdateHostname(ctx context.Context, request UpdateHostnameRequest) (response UpdateHostnameResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateHostname, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateHostnameResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateHostnameResponse") - } - return -} - -// updateHostname implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) updateHostname(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/hostnames/{name}") - if err != nil { - return nil, err - } - - var response UpdateHostnameResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateListener Updates a listener for a given load balancer. -func (client LoadBalancerClient) UpdateListener(ctx context.Context, request UpdateListenerRequest) (response UpdateListenerResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateListener, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateListenerResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateListenerResponse") - } - return -} - -// updateListener implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) updateListener(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/listeners/{listenerName}") - if err != nil { - return nil, err - } - - var response UpdateListenerResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateLoadBalancer Updates a load balancer's configuration. -func (client LoadBalancerClient) UpdateLoadBalancer(ctx context.Context, request UpdateLoadBalancerRequest) (response UpdateLoadBalancerResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateLoadBalancer, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateLoadBalancerResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateLoadBalancerResponse") - } - return -} - -// updateLoadBalancer implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) updateLoadBalancer(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}") - if err != nil { - return nil, err - } - - var response UpdateLoadBalancerResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdatePathRouteSet Overwrites an existing path route set on the specified load balancer. Use this operation to add, delete, or alter -// path route rules in a path route set. -// To add a new path route rule to a path route set, the `pathRoutes` in the -// UpdatePathRouteSetDetails object must include -// both the new path route rule to add and the existing path route rules to retain. -func (client LoadBalancerClient) UpdatePathRouteSet(ctx context.Context, request UpdatePathRouteSetRequest) (response UpdatePathRouteSetResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updatePathRouteSet, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdatePathRouteSetResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdatePathRouteSetResponse") - } - return -} - -// updatePathRouteSet implements the OCIOperation interface (enables retrying operations) -func (client LoadBalancerClient) updatePathRouteSet(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}") - if err != nil { - return nil, err - } - - var response UpdatePathRouteSetResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_match_type.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_match_type.go deleted file mode 100644 index 291c84472..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_match_type.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PathMatchType The type of matching to apply to incoming URIs. -type PathMatchType struct { - - // Specifies how the load balancing service compares a PathRoute - // object's `path` string against the incoming URI. - // * **EXACT_MATCH** - Looks for a `path` string that exactly matches the incoming URI path. - // * **FORCE_LONGEST_PREFIX_MATCH** - Looks for the `path` string with the best, longest match of the beginning - // portion of the incoming URI path. - // * **PREFIX_MATCH** - Looks for a `path` string that matches the beginning portion of the incoming URI path. - // * **SUFFIX_MATCH** - Looks for a `path` string that matches the ending portion of the incoming URI path. - // For a full description of how the system handles `matchType` in a path route set containing multiple rules, see - // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). - MatchType PathMatchTypeMatchTypeEnum `mandatory:"true" json:"matchType"` -} - -func (m PathMatchType) String() string { - return common.PointerString(m) -} - -// PathMatchTypeMatchTypeEnum Enum with underlying type: string -type PathMatchTypeMatchTypeEnum string - -// Set of constants representing the allowable values for PathMatchTypeMatchType -const ( - PathMatchTypeMatchTypeExactMatch PathMatchTypeMatchTypeEnum = "EXACT_MATCH" - PathMatchTypeMatchTypeForceLongestPrefixMatch PathMatchTypeMatchTypeEnum = "FORCE_LONGEST_PREFIX_MATCH" - PathMatchTypeMatchTypePrefixMatch PathMatchTypeMatchTypeEnum = "PREFIX_MATCH" - PathMatchTypeMatchTypeSuffixMatch PathMatchTypeMatchTypeEnum = "SUFFIX_MATCH" -) - -var mappingPathMatchTypeMatchType = map[string]PathMatchTypeMatchTypeEnum{ - "EXACT_MATCH": PathMatchTypeMatchTypeExactMatch, - "FORCE_LONGEST_PREFIX_MATCH": PathMatchTypeMatchTypeForceLongestPrefixMatch, - "PREFIX_MATCH": PathMatchTypeMatchTypePrefixMatch, - "SUFFIX_MATCH": PathMatchTypeMatchTypeSuffixMatch, -} - -// GetPathMatchTypeMatchTypeEnumValues Enumerates the set of values for PathMatchTypeMatchType -func GetPathMatchTypeMatchTypeEnumValues() []PathMatchTypeMatchTypeEnum { - values := make([]PathMatchTypeMatchTypeEnum, 0) - for _, v := range mappingPathMatchTypeMatchType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route.go deleted file mode 100644 index 752f86218..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PathRoute A "path route rule" to evaluate an incoming URI path, and then route a matching request to the specified backend set. -// Path route rules apply only to HTTP and HTTPS requests. They have no effect on TCP requests. -type PathRoute struct { - - // The name of the target backend set for requests where the incoming URI matches the specified path. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" json:"backendSetName"` - - // The path string to match against the incoming URI path. - // * Path strings are case-insensitive. - // * Asterisk (*) wildcards are not supported. - // * Regular expressions are not supported. - // Example: `/example/video/123` - Path *string `mandatory:"true" json:"path"` - - // The type of matching to apply to incoming URIs. - PathMatchType *PathMatchType `mandatory:"true" json:"pathMatchType"` -} - -func (m PathRoute) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set.go deleted file mode 100644 index 6eb21bfb2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PathRouteSet A named set of path route rules. For more information, see -// Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). -type PathRouteSet struct { - - // The unique name for this set of path route rules. Avoid entering confidential information. - // Example: `example_path_route_set` - Name *string `mandatory:"true" json:"name"` - - // The set of path route rules. - PathRoutes []PathRoute `mandatory:"true" json:"pathRoutes"` -} - -func (m PathRouteSet) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set_details.go deleted file mode 100644 index 5fa988dc6..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/path_route_set_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PathRouteSetDetails A set of path route rules. -type PathRouteSetDetails struct { - - // The set of path route rules. - PathRoutes []PathRoute `mandatory:"true" json:"pathRoutes"` -} - -func (m PathRouteSetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go deleted file mode 100644 index dd2c515b5..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SessionPersistenceConfigurationDetails The configuration details for implementing session persistence. Session persistence enables the Load Balancing -// Service to direct any number of requests that originate from a single logical client to a single backend web server. -// For more information, see Session Persistence (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/sessionpersistence.htm). -// To disable session persistence on a running load balancer, use the -// UpdateBackendSet operation and specify "null" for the -// `SessionPersistenceConfigurationDetails` object. -// Example: `SessionPersistenceConfigurationDetails: null` -type SessionPersistenceConfigurationDetails struct { - - // The name of the cookie used to detect a session initiated by the backend server. Use '*' to specify - // that any cookie set by the backend causes the session to persist. - // Example: `example_cookie` - CookieName *string `mandatory:"true" json:"cookieName"` - - // Whether the load balancer is prevented from directing traffic from a persistent session client to - // a different backend server if the original server is unavailable. Defaults to false. - // Example: `false` - DisableFallback *bool `mandatory:"false" json:"disableFallback"` -} - -func (m SessionPersistenceConfigurationDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go deleted file mode 100644 index f60f7c14d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SslConfiguration A listener's SSL handling configuration. -// To use SSL, a listener must be associated with a Certificate. -type SslConfiguration struct { - - // A friendly name for the certificate bundle. It must be unique and it cannot be changed. - // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. - // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `example_certificate_bundle` - CertificateName *string `mandatory:"true" json:"certificateName"` - - // The maximum depth for peer certificate chain verification. - // Example: `3` - VerifyDepth *int `mandatory:"true" json:"verifyDepth"` - - // Whether the load balancer listener should verify peer certificates. - // Example: `true` - VerifyPeerCertificate *bool `mandatory:"true" json:"verifyPeerCertificate"` -} - -func (m SslConfiguration) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go deleted file mode 100644 index f74f266fe..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// SslConfigurationDetails The load balancer's SSL handling configuration details. -type SslConfigurationDetails struct { - - // A friendly name for the certificate bundle. It must be unique and it cannot be changed. - // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. - // Certificate bundle names cannot contain spaces. Avoid entering confidential information. - // Example: `example_certificate_bundle` - CertificateName *string `mandatory:"true" json:"certificateName"` - - // The maximum depth for peer certificate chain verification. - // Example: `3` - VerifyDepth *int `mandatory:"false" json:"verifyDepth"` - - // Whether the load balancer listener should verify peer certificates. - // Example: `true` - VerifyPeerCertificate *bool `mandatory:"false" json:"verifyPeerCertificate"` -} - -func (m SslConfigurationDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go deleted file mode 100644 index 1409a72e6..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateBackendDetails The configuration details for updating a backend server. -type UpdateBackendDetails struct { - - // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress - // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. - // Example: `false` - Backup *bool `mandatory:"true" json:"backup"` - - // Whether the load balancer should drain this server. Servers marked "drain" receive no new - // incoming traffic. - // Example: `false` - Drain *bool `mandatory:"true" json:"drain"` - - // Whether the load balancer should treat this server as offline. Offline servers receive no incoming - // traffic. - // Example: `false` - Offline *bool `mandatory:"true" json:"offline"` - - // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger - // proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections - // as a server weighted '1'. - // For more information on load balancing policies, see - // How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). - // Example: `3` - Weight *int `mandatory:"true" json:"weight"` -} - -func (m UpdateBackendDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go deleted file mode 100644 index 0199b6217..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateBackendRequest wrapper for the UpdateBackend operation -type UpdateBackendRequest struct { - - // Details for updating a backend server. - UpdateBackendDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set associated with the backend server. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The IP address and port of the backend server to update. - // Example: `10.0.0.3:8080` - BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateBackendRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateBackendRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateBackendRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateBackendResponse wrapper for the UpdateBackend operation -type UpdateBackendResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response UpdateBackendResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateBackendResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_details.go deleted file mode 100644 index 4da009e97..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_details.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateBackendSetDetails The configuration details for updating a load balancer backend set. -// For more information on backend set configuration, see -// Managing Backend Sets (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendsets.htm). -type UpdateBackendSetDetails struct { - Backends []BackendDetails `mandatory:"true" json:"backends"` - - HealthChecker *HealthCheckerDetails `mandatory:"true" json:"healthChecker"` - - // The load balancer policy for the backend set. To get a list of available policies, use the - // ListPolicies operation. - // Example: `LEAST_CONNECTIONS` - Policy *string `mandatory:"true" json:"policy"` - - SessionPersistenceConfiguration *SessionPersistenceConfigurationDetails `mandatory:"false" json:"sessionPersistenceConfiguration"` - - SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` -} - -func (m UpdateBackendSetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go deleted file mode 100644 index b7f43477f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateBackendSetRequest wrapper for the UpdateBackendSet operation -type UpdateBackendSetRequest struct { - - // The details to update a backend set. - UpdateBackendSetDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set to update. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateBackendSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateBackendSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateBackendSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateBackendSetResponse wrapper for the UpdateBackendSet operation -type UpdateBackendSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response UpdateBackendSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateBackendSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go deleted file mode 100644 index 85750f118..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateHealthCheckerDetails The health checker's configuration details. -type UpdateHealthCheckerDetails struct { - - // The interval between health checks, in milliseconds. - // Example: `10000` - IntervalInMillis *int `mandatory:"true" json:"intervalInMillis"` - - // The backend server port against which to run the health check. - // Example: `8080` - Port *int `mandatory:"true" json:"port"` - - // The protocol the health check must use; either HTTP or TCP. - // Example: `HTTP` - Protocol *string `mandatory:"true" json:"protocol"` - - // A regular expression for parsing the response body from the backend server. - // Example: `^((?!false).|\s)*$` - ResponseBodyRegex *string `mandatory:"true" json:"responseBodyRegex"` - - // The number of retries to attempt before a backend server is considered "unhealthy". - // Example: `3` - Retries *int `mandatory:"true" json:"retries"` - - // The status code a healthy backend server should return. - // Example: `200` - ReturnCode *int `mandatory:"true" json:"returnCode"` - - // The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply - // returns within this timeout period. - // Example: `3000` - TimeoutInMillis *int `mandatory:"true" json:"timeoutInMillis"` - - // The path against which to run the health check. - // Example: `/healthcheck` - UrlPath *string `mandatory:"false" json:"urlPath"` -} - -func (m UpdateHealthCheckerDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go deleted file mode 100644 index f18e0a45f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateHealthCheckerRequest wrapper for the UpdateHealthChecker operation -type UpdateHealthCheckerRequest struct { - - // The health check policy configuration details. - UpdateHealthCheckerDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the health check policy to be updated. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the backend set associated with the health check policy to be retrieved. - // Example: `example_backend_set` - BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateHealthCheckerRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateHealthCheckerRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateHealthCheckerRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateHealthCheckerResponse wrapper for the UpdateHealthChecker operation -type UpdateHealthCheckerResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response UpdateHealthCheckerResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateHealthCheckerResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_details.go deleted file mode 100644 index 4effa8a86..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_details.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateHostnameDetails The configuration details for updating a virtual hostname. -// For more information on virtual hostnames, see -// Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm). -type UpdateHostnameDetails struct { - - // The virtual hostname to update. For more information about virtual hostname string construction, see - // Managing Request Routing (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). - // Example: `app.example.com` - Hostname *string `mandatory:"false" json:"hostname"` -} - -func (m UpdateHostnameDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_request_response.go deleted file mode 100644 index 6ca227e26..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_hostname_request_response.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateHostnameRequest wrapper for the UpdateHostname operation -type UpdateHostnameRequest struct { - - // The configuration details to update a virtual hostname. - UpdateHostnameDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the virtual hostname - // to update. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the hostname resource to update. - // Example: `example_hostname_001` - Name *string `mandatory:"true" contributesTo:"path" name:"name"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateHostnameRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateHostnameRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateHostnameRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateHostnameResponse wrapper for the UpdateHostname operation -type UpdateHostnameResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response UpdateHostnameResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateHostnameResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go deleted file mode 100644 index 54141760e..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateListenerDetails The configuration details for updating a listener. -type UpdateListenerDetails struct { - - // The name of the associated backend set. - // Example: `example_backend_set` - DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` - - // The communication port for the listener. - // Example: `80` - Port *int `mandatory:"true" json:"port"` - - // The protocol on which the listener accepts connection requests. - // To get a list of valid protocols, use the ListProtocols - // operation. - // Example: `HTTP` - Protocol *string `mandatory:"true" json:"protocol"` - - ConnectionConfiguration *ConnectionConfiguration `mandatory:"false" json:"connectionConfiguration"` - - // An array of hostname resource names. - HostnameNames []string `mandatory:"false" json:"hostnameNames"` - - // The name of the set of path-based routing rules, PathRouteSet, - // applied to this listener's traffic. - // Example: `example_path_route_set` - PathRouteSetName *string `mandatory:"false" json:"pathRouteSetName"` - - SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` -} - -func (m UpdateListenerDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go deleted file mode 100644 index aead08301..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateListenerRequest wrapper for the UpdateListener operation -type UpdateListenerRequest struct { - - // Details to update a listener. - UpdateListenerDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the listener to update. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the listener to update. - // Example: `example_listener` - ListenerName *string `mandatory:"true" contributesTo:"path" name:"listenerName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateListenerRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateListenerRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateListenerRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateListenerResponse wrapper for the UpdateListener operation -type UpdateListenerResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response UpdateListenerResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateListenerResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go deleted file mode 100644 index 7ab1175a1..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateLoadBalancerDetails Configuration details to update a load balancer. -type UpdateLoadBalancerDetails struct { - - // The user-friendly display name for the load balancer. It does not have to be unique, and it is changeable. - // Avoid entering confidential information. - // Example: `example_load_balancer` - DisplayName *string `mandatory:"true" json:"displayName"` -} - -func (m UpdateLoadBalancerDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go deleted file mode 100644 index 00589d0c3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateLoadBalancerRequest wrapper for the UpdateLoadBalancer operation -type UpdateLoadBalancerRequest struct { - - // The details for updating a load balancer's configuration. - UpdateLoadBalancerDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to update. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateLoadBalancerRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateLoadBalancerRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateLoadBalancerResponse wrapper for the UpdateLoadBalancer operation -type UpdateLoadBalancerResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response UpdateLoadBalancerResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateLoadBalancerResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_details.go deleted file mode 100644 index d4f924b14..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_details.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdatePathRouteSetDetails An updated set of path route rules that overwrites the existing set of rules. -type UpdatePathRouteSetDetails struct { - - // The set of path route rules. - PathRoutes []PathRoute `mandatory:"true" json:"pathRoutes"` -} - -func (m UpdatePathRouteSetDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_request_response.go deleted file mode 100644 index 0c0f2d5dd..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_path_route_set_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdatePathRouteSetRequest wrapper for the UpdatePathRouteSet operation -type UpdatePathRouteSetRequest struct { - - // The configuration details to update a path route set. - UpdatePathRouteSetDetails `contributesTo:"body"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the path route set to update. - LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` - - // The name of the path route set to update. - // Example: `example_path_route_set` - PathRouteSetName *string `mandatory:"true" contributesTo:"path" name:"pathRouteSetName"` - - // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - // particular request, please provide the request ID. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case of a timeout or - // server error without risk of executing that same action again. Retry tokens expire after 24 - // hours, but can be invalidated before then due to conflicting operations (e.g., if a resource - // has been deleted and purged from the system, then a retry of the original creation request - // may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdatePathRouteSetRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdatePathRouteSetRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdatePathRouteSetRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdatePathRouteSetResponse wrapper for the UpdatePathRouteSet operation -type UpdatePathRouteSetResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about - // a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` -} - -func (response UpdatePathRouteSetResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdatePathRouteSetResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go deleted file mode 100644 index 9d8543c43..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// WorkRequest Many of the API requests you use to create and configure load balancing do not take effect immediately. -// In these cases, the request spawns an asynchronous work flow to fulfill the request. WorkRequest objects provide visibility -// for in-progress work flows. -// For more information about work requests, see Viewing the State of a Work Request (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/viewingworkrequest.htm). -type WorkRequest struct { - ErrorDetails []WorkRequestError `mandatory:"true" json:"errorDetails"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. - Id *string `mandatory:"true" json:"id"` - - // The current state of the work request. - LifecycleState WorkRequestLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer with which the work request - // is associated. - LoadBalancerId *string `mandatory:"true" json:"loadBalancerId"` - - // A collection of data, related to the load balancer provisioning process, that helps with debugging in the event of failure. - // Possible data elements include: - // - workflow name - // - event ID - // - work request ID - // - load balancer ID - // - workflow completion message - Message *string `mandatory:"true" json:"message"` - - // The date and time the work request was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` - - // The type of action the work request represents. - // Example: `CreateListener` - Type *string `mandatory:"true" json:"type"` - - // The date and time the work request was completed, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` -} - -func (m WorkRequest) String() string { - return common.PointerString(m) -} - -// WorkRequestLifecycleStateEnum Enum with underlying type: string -type WorkRequestLifecycleStateEnum string - -// Set of constants representing the allowable values for WorkRequestLifecycleState -const ( - WorkRequestLifecycleStateAccepted WorkRequestLifecycleStateEnum = "ACCEPTED" - WorkRequestLifecycleStateInProgress WorkRequestLifecycleStateEnum = "IN_PROGRESS" - WorkRequestLifecycleStateFailed WorkRequestLifecycleStateEnum = "FAILED" - WorkRequestLifecycleStateSucceeded WorkRequestLifecycleStateEnum = "SUCCEEDED" -) - -var mappingWorkRequestLifecycleState = map[string]WorkRequestLifecycleStateEnum{ - "ACCEPTED": WorkRequestLifecycleStateAccepted, - "IN_PROGRESS": WorkRequestLifecycleStateInProgress, - "FAILED": WorkRequestLifecycleStateFailed, - "SUCCEEDED": WorkRequestLifecycleStateSucceeded, -} - -// GetWorkRequestLifecycleStateEnumValues Enumerates the set of values for WorkRequestLifecycleState -func GetWorkRequestLifecycleStateEnumValues() []WorkRequestLifecycleStateEnum { - values := make([]WorkRequestLifecycleStateEnum, 0) - for _, v := range mappingWorkRequestLifecycleState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request_error.go deleted file mode 100644 index 6b755f4b1..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request_error.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Load Balancing Service API -// -// API for the Load Balancing Service -// - -package loadbalancer - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// WorkRequestError An object returned in the event of a work request error. -type WorkRequestError struct { - ErrorCode WorkRequestErrorErrorCodeEnum `mandatory:"true" json:"errorCode"` - - // A human-readable error string. - Message *string `mandatory:"true" json:"message"` -} - -func (m WorkRequestError) String() string { - return common.PointerString(m) -} - -// WorkRequestErrorErrorCodeEnum Enum with underlying type: string -type WorkRequestErrorErrorCodeEnum string - -// Set of constants representing the allowable values for WorkRequestErrorErrorCode -const ( - WorkRequestErrorErrorCodeBadInput WorkRequestErrorErrorCodeEnum = "BAD_INPUT" - WorkRequestErrorErrorCodeInternalError WorkRequestErrorErrorCodeEnum = "INTERNAL_ERROR" -) - -var mappingWorkRequestErrorErrorCode = map[string]WorkRequestErrorErrorCodeEnum{ - "BAD_INPUT": WorkRequestErrorErrorCodeBadInput, - "INTERNAL_ERROR": WorkRequestErrorErrorCodeInternalError, -} - -// GetWorkRequestErrorErrorCodeEnumValues Enumerates the set of values for WorkRequestErrorErrorCode -func GetWorkRequestErrorErrorCodeEnumValues() []WorkRequestErrorErrorCodeEnum { - values := make([]WorkRequestErrorErrorCodeEnum, 0) - for _, v := range mappingWorkRequestErrorErrorCode { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go deleted file mode 100644 index b1acb9a62..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// AbortMultipartUploadRequest wrapper for the AbortMultipartUpload operation -type AbortMultipartUploadRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The name of the object. Avoid entering confidential information. - // Example: `test/object1.log` - ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` - - // The upload ID for a multipart upload. - UploadId *string `mandatory:"true" contributesTo:"query" name:"uploadId"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request AbortMultipartUploadRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request AbortMultipartUploadRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request AbortMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// AbortMultipartUploadResponse wrapper for the AbortMultipartUpload operation -type AbortMultipartUploadResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response AbortMultipartUploadResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response AbortMultipartUploadResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go deleted file mode 100644 index 2fc78c1ea..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// Bucket A bucket is a container for storing objects in a compartment within a namespace. A bucket is associated with a single compartment. -// The compartment has policies that indicate what actions a user can perform on a bucket and all the objects in the bucket. For more -// information, see Managing Buckets (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingbuckets.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type Bucket struct { - - // The namespace in which the bucket lives. - Namespace *string `mandatory:"true" json:"namespace"` - - // The name of the bucket. Avoid entering confidential information. - // Example: my-new-bucket1 - Name *string `mandatory:"true" json:"name"` - - // The compartment ID in which the bucket is authorized. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // Arbitrary string keys and values for user-defined metadata. - Metadata map[string]string `mandatory:"true" json:"metadata"` - - // The OCID of the user who created the bucket. - CreatedBy *string `mandatory:"true" json:"createdBy"` - - // The date and time the bucket was created, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The entity tag for the bucket. - Etag *string `mandatory:"true" json:"etag"` - - // The type of public access enabled on this bucket. - // A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the - // bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the - // `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled on the - // bucket, public access is allowed for the `GetObject` and `HeadObject` operations. - PublicAccessType BucketPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` - - // The type of storage tier of this bucket. - // A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. - // When 'Archive' tier type is set explicitly, the bucket is put in the archive storage tier. The 'storageTier' - // property is immutable after bucket is created. - StorageTier BucketStorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m Bucket) String() string { - return common.PointerString(m) -} - -// BucketPublicAccessTypeEnum Enum with underlying type: string -type BucketPublicAccessTypeEnum string - -// Set of constants representing the allowable values for BucketPublicAccessType -const ( - BucketPublicAccessTypeNopublicaccess BucketPublicAccessTypeEnum = "NoPublicAccess" - BucketPublicAccessTypeObjectread BucketPublicAccessTypeEnum = "ObjectRead" - BucketPublicAccessTypeObjectreadwithoutlist BucketPublicAccessTypeEnum = "ObjectReadWithoutList" -) - -var mappingBucketPublicAccessType = map[string]BucketPublicAccessTypeEnum{ - "NoPublicAccess": BucketPublicAccessTypeNopublicaccess, - "ObjectRead": BucketPublicAccessTypeObjectread, - "ObjectReadWithoutList": BucketPublicAccessTypeObjectreadwithoutlist, -} - -// GetBucketPublicAccessTypeEnumValues Enumerates the set of values for BucketPublicAccessType -func GetBucketPublicAccessTypeEnumValues() []BucketPublicAccessTypeEnum { - values := make([]BucketPublicAccessTypeEnum, 0) - for _, v := range mappingBucketPublicAccessType { - values = append(values, v) - } - return values -} - -// BucketStorageTierEnum Enum with underlying type: string -type BucketStorageTierEnum string - -// Set of constants representing the allowable values for BucketStorageTier -const ( - BucketStorageTierStandard BucketStorageTierEnum = "Standard" - BucketStorageTierArchive BucketStorageTierEnum = "Archive" -) - -var mappingBucketStorageTier = map[string]BucketStorageTierEnum{ - "Standard": BucketStorageTierStandard, - "Archive": BucketStorageTierArchive, -} - -// GetBucketStorageTierEnumValues Enumerates the set of values for BucketStorageTier -func GetBucketStorageTierEnumValues() []BucketStorageTierEnum { - values := make([]BucketStorageTierEnum, 0) - for _, v := range mappingBucketStorageTier { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go deleted file mode 100644 index bee2aa055..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// BucketSummary To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type BucketSummary struct { - - // The namespace in which the bucket lives. - Namespace *string `mandatory:"true" json:"namespace"` - - // The name of the bucket. Avoid entering confidential information. - // Example: my-new-bucket1 - Name *string `mandatory:"true" json:"name"` - - // The compartment ID in which the bucket is authorized. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // The OCID of the user who created the bucket. - CreatedBy *string `mandatory:"true" json:"createdBy"` - - // The date and time the bucket was created, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The entity tag for the bucket. - Etag *string `mandatory:"true" json:"etag"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m BucketSummary) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go deleted file mode 100644 index 0d09fa852..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CommitMultipartUploadDetails To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type CommitMultipartUploadDetails struct { - - // The part numbers and ETags for the parts to be committed. - PartsToCommit []CommitMultipartUploadPartDetails `mandatory:"true" json:"partsToCommit"` - - // The part numbers for the parts to be excluded from the completed object. - // Each part created for this upload must be in either partsToExclude or partsToCommit, but cannot be in both. - PartsToExclude []int `mandatory:"false" json:"partsToExclude"` -} - -func (m CommitMultipartUploadDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go deleted file mode 100644 index b23c10a0d..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CommitMultipartUploadPartDetails To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type CommitMultipartUploadPartDetails struct { - - // The part number for this part. - PartNum *int `mandatory:"true" json:"partNum"` - - // The ETag returned when this part was uploaded. - Etag *string `mandatory:"true" json:"etag"` -} - -func (m CommitMultipartUploadPartDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go deleted file mode 100644 index f4851abde..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CommitMultipartUploadRequest wrapper for the CommitMultipartUpload operation -type CommitMultipartUploadRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The name of the object. Avoid entering confidential information. - // Example: `test/object1.log` - ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` - - // The upload ID for a multipart upload. - UploadId *string `mandatory:"true" contributesTo:"query" name:"uploadId"` - - // The part numbers and ETags for the parts you want to commit. - CommitMultipartUploadDetails `contributesTo:"body"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CommitMultipartUploadRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CommitMultipartUploadRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CommitMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CommitMultipartUploadResponse wrapper for the CommitMultipartUpload operation -type CommitMultipartUploadResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // Base-64 representation of the multipart object hash. - // The multipart object hash is calculated by taking the MD5 hashes of the parts passed to this call, - // concatenating the binary representation of those hashes in order of their part numbers, - // and then calculating the MD5 hash of the concatenated values. The multipart object hash is followed - // by a hyphen and the total number of parts (for example, '-6'). - OpcMultipartMd5 *string `presentIn:"header" name:"opc-multipart-md5"` - - // The entity tag for the object. - ETag *string `presentIn:"header" name:"etag"` - - // The time the object was last modified, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` -} - -func (response CommitMultipartUploadResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CommitMultipartUploadResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go deleted file mode 100644 index 755d7da27..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateBucketDetails To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type CreateBucketDetails struct { - - // The name of the bucket. Valid characters are uppercase or lowercase letters, - // numbers, and dashes. Bucket names must be unique within the namespace. Avoid entering confidential information. - // example: Example: my-new-bucket1 - Name *string `mandatory:"true" json:"name"` - - // The ID of the compartment in which to create the bucket. - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - // Arbitrary string, up to 4KB, of keys and values for user-defined metadata. - Metadata map[string]string `mandatory:"false" json:"metadata"` - - // The type of public access enabled on this bucket. - // A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the - // bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the - // `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled on the bucket, - // public access is allowed for the `GetObject` and `HeadObject` operations. - PublicAccessType CreateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` - - // The type of storage tier of this bucket. - // A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. - // When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' - // property is immutable after bucket is created. - StorageTier CreateBucketDetailsStorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}}` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m CreateBucketDetails) String() string { - return common.PointerString(m) -} - -// CreateBucketDetailsPublicAccessTypeEnum Enum with underlying type: string -type CreateBucketDetailsPublicAccessTypeEnum string - -// Set of constants representing the allowable values for CreateBucketDetailsPublicAccessType -const ( - CreateBucketDetailsPublicAccessTypeNopublicaccess CreateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" - CreateBucketDetailsPublicAccessTypeObjectread CreateBucketDetailsPublicAccessTypeEnum = "ObjectRead" - CreateBucketDetailsPublicAccessTypeObjectreadwithoutlist CreateBucketDetailsPublicAccessTypeEnum = "ObjectReadWithoutList" -) - -var mappingCreateBucketDetailsPublicAccessType = map[string]CreateBucketDetailsPublicAccessTypeEnum{ - "NoPublicAccess": CreateBucketDetailsPublicAccessTypeNopublicaccess, - "ObjectRead": CreateBucketDetailsPublicAccessTypeObjectread, - "ObjectReadWithoutList": CreateBucketDetailsPublicAccessTypeObjectreadwithoutlist, -} - -// GetCreateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for CreateBucketDetailsPublicAccessType -func GetCreateBucketDetailsPublicAccessTypeEnumValues() []CreateBucketDetailsPublicAccessTypeEnum { - values := make([]CreateBucketDetailsPublicAccessTypeEnum, 0) - for _, v := range mappingCreateBucketDetailsPublicAccessType { - values = append(values, v) - } - return values -} - -// CreateBucketDetailsStorageTierEnum Enum with underlying type: string -type CreateBucketDetailsStorageTierEnum string - -// Set of constants representing the allowable values for CreateBucketDetailsStorageTier -const ( - CreateBucketDetailsStorageTierStandard CreateBucketDetailsStorageTierEnum = "Standard" - CreateBucketDetailsStorageTierArchive CreateBucketDetailsStorageTierEnum = "Archive" -) - -var mappingCreateBucketDetailsStorageTier = map[string]CreateBucketDetailsStorageTierEnum{ - "Standard": CreateBucketDetailsStorageTierStandard, - "Archive": CreateBucketDetailsStorageTierArchive, -} - -// GetCreateBucketDetailsStorageTierEnumValues Enumerates the set of values for CreateBucketDetailsStorageTier -func GetCreateBucketDetailsStorageTierEnumValues() []CreateBucketDetailsStorageTierEnum { - values := make([]CreateBucketDetailsStorageTierEnum, 0) - for _, v := range mappingCreateBucketDetailsStorageTier { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go deleted file mode 100644 index f5dd58212..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateBucketRequest wrapper for the CreateBucket operation -type CreateBucketRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // Request object for creating a bucket. - CreateBucketDetails `contributesTo:"body"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateBucketRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateBucketRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateBucketRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateBucketResponse wrapper for the CreateBucket operation -type CreateBucketResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Bucket instance - Bucket `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The entity tag for the bucket that was created. - ETag *string `presentIn:"header" name:"etag"` - - // The full path to the bucket that was created. - Location *string `presentIn:"header" name:"location"` -} - -func (response CreateBucketResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateBucketResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go deleted file mode 100644 index 4e451a153..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreateMultipartUploadDetails To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type CreateMultipartUploadDetails struct { - - // The name of the object to which this multi-part upload is targeted. Avoid entering confidential information. - // Example: test/object1.log - Object *string `mandatory:"true" json:"object"` - - // The content type of the object to upload. - ContentType *string `mandatory:"false" json:"contentType"` - - // The content language of the object to upload. - ContentLanguage *string `mandatory:"false" json:"contentLanguage"` - - // The content encoding of the object to upload. - ContentEncoding *string `mandatory:"false" json:"contentEncoding"` - - // Arbitrary string keys and values for the user-defined metadata for the object. - // Keys must be in "opc-meta-*" format. Avoid entering confidential information. - Metadata map[string]string `mandatory:"false" json:"metadata"` -} - -func (m CreateMultipartUploadDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go deleted file mode 100644 index 09022258f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreateMultipartUploadRequest wrapper for the CreateMultipartUpload operation -type CreateMultipartUploadRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // Request object for creating a multi-part upload. - CreateMultipartUploadDetails `contributesTo:"body"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreateMultipartUploadRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreateMultipartUploadRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreateMultipartUploadResponse wrapper for the CreateMultipartUpload operation -type CreateMultipartUploadResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The MultipartUpload instance - MultipartUpload `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The full path to the new upload. - Location *string `presentIn:"header" name:"location"` -} - -func (response CreateMultipartUploadResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreateMultipartUploadResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go deleted file mode 100644 index b5f796ddc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// CreatePreauthenticatedRequestDetails The representation of CreatePreauthenticatedRequestDetails -type CreatePreauthenticatedRequestDetails struct { - - // A user-specified name for the pre-authenticated request. Helpful for management purposes. - Name *string `mandatory:"true" json:"name"` - - // The operation that can be performed on this resource. - AccessType CreatePreauthenticatedRequestDetailsAccessTypeEnum `mandatory:"true" json:"accessType"` - - // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid. - TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` - - // The name of object that is being granted access to by the pre-authenticated request. This can be null and if it is, the pre-authenticated request grants access to the entire bucket. - ObjectName *string `mandatory:"false" json:"objectName"` -} - -func (m CreatePreauthenticatedRequestDetails) String() string { - return common.PointerString(m) -} - -// CreatePreauthenticatedRequestDetailsAccessTypeEnum Enum with underlying type: string -type CreatePreauthenticatedRequestDetailsAccessTypeEnum string - -// Set of constants representing the allowable values for CreatePreauthenticatedRequestDetailsAccessType -const ( - CreatePreauthenticatedRequestDetailsAccessTypeObjectread CreatePreauthenticatedRequestDetailsAccessTypeEnum = "ObjectRead" - CreatePreauthenticatedRequestDetailsAccessTypeObjectwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "ObjectWrite" - CreatePreauthenticatedRequestDetailsAccessTypeObjectreadwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "ObjectReadWrite" - CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "AnyObjectWrite" -) - -var mappingCreatePreauthenticatedRequestDetailsAccessType = map[string]CreatePreauthenticatedRequestDetailsAccessTypeEnum{ - "ObjectRead": CreatePreauthenticatedRequestDetailsAccessTypeObjectread, - "ObjectWrite": CreatePreauthenticatedRequestDetailsAccessTypeObjectwrite, - "ObjectReadWrite": CreatePreauthenticatedRequestDetailsAccessTypeObjectreadwrite, - "AnyObjectWrite": CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectwrite, -} - -// GetCreatePreauthenticatedRequestDetailsAccessTypeEnumValues Enumerates the set of values for CreatePreauthenticatedRequestDetailsAccessType -func GetCreatePreauthenticatedRequestDetailsAccessTypeEnumValues() []CreatePreauthenticatedRequestDetailsAccessTypeEnum { - values := make([]CreatePreauthenticatedRequestDetailsAccessTypeEnum, 0) - for _, v := range mappingCreatePreauthenticatedRequestDetailsAccessType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go deleted file mode 100644 index 3788579d4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// CreatePreauthenticatedRequestRequest wrapper for the CreatePreauthenticatedRequest operation -type CreatePreauthenticatedRequestRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // Information needed to create the pre-authenticated request. - CreatePreauthenticatedRequestDetails `contributesTo:"body"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request CreatePreauthenticatedRequestRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request CreatePreauthenticatedRequestRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreatePreauthenticatedRequestRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// CreatePreauthenticatedRequestResponse wrapper for the CreatePreauthenticatedRequest operation -type CreatePreauthenticatedRequestResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The PreauthenticatedRequest instance - PreauthenticatedRequest `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response CreatePreauthenticatedRequestResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response CreatePreauthenticatedRequestResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go deleted file mode 100644 index b53656096..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteBucketRequest wrapper for the DeleteBucket operation -type DeleteBucketRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteBucketRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteBucketRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteBucketRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteBucketResponse wrapper for the DeleteBucket operation -type DeleteBucketResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeleteBucketResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteBucketResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go deleted file mode 100644 index f0acd4db8..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeleteObjectRequest wrapper for the DeleteObject operation -type DeleteObjectRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The name of the object. Avoid entering confidential information. - // Example: `test/object1.log` - ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteObjectRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteObjectRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteObjectRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeleteObjectResponse wrapper for the DeleteObject operation -type DeleteObjectResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The time the object was deleted, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` -} - -func (response DeleteObjectResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteObjectResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go deleted file mode 100644 index 05fb86826..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// DeletePreauthenticatedRequestRequest wrapper for the DeletePreauthenticatedRequest operation -type DeletePreauthenticatedRequestRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The unique identifier for the pre-authenticated request. This can be used to manage operations against - // the pre-authenticated request, such as GET or DELETE. - ParId *string `mandatory:"true" contributesTo:"path" name:"parId"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeletePreauthenticatedRequestRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeletePreauthenticatedRequestRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeletePreauthenticatedRequestRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// DeletePreauthenticatedRequestResponse wrapper for the DeletePreauthenticatedRequest operation -type DeletePreauthenticatedRequestResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response DeletePreauthenticatedRequestResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeletePreauthenticatedRequestResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go deleted file mode 100644 index 1525adc61..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetBucketRequest wrapper for the GetBucket operation -type GetBucketRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetBucketRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetBucketRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetBucketRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetBucketResponse wrapper for the GetBucket operation -type GetBucketResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Bucket instance - Bucket `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current entity tag for the bucket. - ETag *string `presentIn:"header" name:"etag"` - - // Flag to indicate whether or not the object was modified. If this is true, - // the getter for the object itself will return null. Callers should check this - // if they specified one of the request params that might result in a conditional - // response (like 'if-match'/'if-none-match'). - IsNotModified bool -} - -func (response GetBucketResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetBucketResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_metadata_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_metadata_request_response.go deleted file mode 100644 index 539bb91e3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_metadata_request_response.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetNamespaceMetadataRequest wrapper for the GetNamespaceMetadata operation -type GetNamespaceMetadataRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetNamespaceMetadataRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetNamespaceMetadataRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetNamespaceMetadataRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetNamespaceMetadataResponse wrapper for the GetNamespaceMetadata operation -type GetNamespaceMetadataResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The NamespaceMetadata instance - NamespaceMetadata `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetNamespaceMetadataResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetNamespaceMetadataResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go deleted file mode 100644 index ccdcefcfb..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetNamespaceRequest wrapper for the GetNamespace operation -type GetNamespaceRequest struct { - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetNamespaceRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetNamespaceRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetNamespaceRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetNamespaceResponse wrapper for the GetNamespace operation -type GetNamespaceResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The string instance - Value *string `presentIn:"body"` -} - -func (response GetNamespaceResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetNamespaceResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go deleted file mode 100644 index 5510197ce..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "io" - "net/http" -) - -// GetObjectRequest wrapper for the GetObject operation -type GetObjectRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The name of the object. Avoid entering confidential information. - // Example: `test/object1.log` - ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Optional byte range to fetch, as described in RFC 7233 (https://tools.ietf.org/rfc/rfc7233), section 2.1. - // Note that only a single range of bytes is supported. - Range *string `mandatory:"false" contributesTo:"header" name:"range"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetObjectRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetObjectRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetObjectRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetObjectResponse wrapper for the GetObject operation -type GetObjectResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The io.ReadCloser instance - Content io.ReadCloser `presentIn:"body" encoding:"binary"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The entity tag for the object. - ETag *string `presentIn:"header" name:"etag"` - - // The user-defined metadata for the object. - OpcMeta map[string]string `presentIn:"header-collection" prefix:"opc-meta-"` - - // The object size in bytes. - ContentLength *int `presentIn:"header" name:"content-length"` - - // Content-Range header for range requests, per RFC 7233 (https://tools.ietf.org/rfc/rfc7233), section 4.2. - ContentRange *string `presentIn:"header" name:"content-range"` - - // Content-MD5 header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.15. - // Unavailable for objects uploaded using multipart upload. - ContentMd5 *string `presentIn:"header" name:"content-md5"` - - // Only applicable to objects uploaded using multipart upload. - // Base-64 representation of the multipart object hash. - // The multipart object hash is calculated by taking the MD5 hashes of the parts, - // concatenating the binary representation of those hashes in order of their part numbers, - // and then calculating the MD5 hash of the concatenated values. - OpcMultipartMd5 *string `presentIn:"header" name:"opc-multipart-md5"` - - // Content-Type header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.17. - ContentType *string `presentIn:"header" name:"content-type"` - - // Content-Language header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.12. - ContentLanguage *string `presentIn:"header" name:"content-language"` - - // Content-Encoding header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.11. - ContentEncoding *string `presentIn:"header" name:"content-encoding"` - - // The object modification time, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` - - // The current state of the object. - ArchivalState GetObjectArchivalStateEnum `presentIn:"header" name:"archival-state"` - - // Time that the object is returned to the archived state. This field is only present for restored objects. - TimeOfArchival *common.SDKTime `presentIn:"header" name:"time-of-archival"` - - // Flag to indicate whether or not the object was modified. If this is true, - // the getter for the object itself will return null. Callers should check this - // if they specified one of the request params that might result in a conditional - // response (like 'if-match'/'if-none-match'). - IsNotModified bool -} - -func (response GetObjectResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetObjectResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// GetObjectArchivalStateEnum Enum with underlying type: string -type GetObjectArchivalStateEnum string - -// Set of constants representing the allowable values for GetObjectArchivalState -const ( - GetObjectArchivalStateAvailable GetObjectArchivalStateEnum = "AVAILABLE" - GetObjectArchivalStateArchived GetObjectArchivalStateEnum = "ARCHIVED" - GetObjectArchivalStateRestoring GetObjectArchivalStateEnum = "RESTORING" - GetObjectArchivalStateRestored GetObjectArchivalStateEnum = "RESTORED" -) - -var mappingGetObjectArchivalState = map[string]GetObjectArchivalStateEnum{ - "AVAILABLE": GetObjectArchivalStateAvailable, - "ARCHIVED": GetObjectArchivalStateArchived, - "RESTORING": GetObjectArchivalStateRestoring, - "RESTORED": GetObjectArchivalStateRestored, -} - -// GetGetObjectArchivalStateEnumValues Enumerates the set of values for GetObjectArchivalState -func GetGetObjectArchivalStateEnumValues() []GetObjectArchivalStateEnum { - values := make([]GetObjectArchivalStateEnum, 0) - for _, v := range mappingGetObjectArchivalState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go deleted file mode 100644 index 2feec1362..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// GetPreauthenticatedRequestRequest wrapper for the GetPreauthenticatedRequest operation -type GetPreauthenticatedRequestRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The unique identifier for the pre-authenticated request. This can be used to manage operations against - // the pre-authenticated request, such as GET or DELETE. - ParId *string `mandatory:"true" contributesTo:"path" name:"parId"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetPreauthenticatedRequestRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetPreauthenticatedRequestRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetPreauthenticatedRequestRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// GetPreauthenticatedRequestResponse wrapper for the GetPreauthenticatedRequest operation -type GetPreauthenticatedRequestResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The PreauthenticatedRequestSummary instance - PreauthenticatedRequestSummary `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response GetPreauthenticatedRequestResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetPreauthenticatedRequestResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go deleted file mode 100644 index f12383727..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// HeadBucketRequest wrapper for the HeadBucket operation -type HeadBucketRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request HeadBucketRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request HeadBucketRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request HeadBucketRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// HeadBucketResponse wrapper for the HeadBucket operation -type HeadBucketResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The current entity tag for the bucket. - ETag *string `presentIn:"header" name:"etag"` - - // Flag to indicate whether or not the object was modified. If this is true, - // the getter for the object itself will return null. Callers should check this - // if they specified one of the request params that might result in a conditional - // response (like 'if-match'/'if-none-match'). - IsNotModified bool -} - -func (response HeadBucketResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response HeadBucketResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go deleted file mode 100644 index 1f63e0e85..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// HeadObjectRequest wrapper for the HeadObject operation -type HeadObjectRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The name of the object. Avoid entering confidential information. - // Example: `test/object1.log` - ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request HeadObjectRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request HeadObjectRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request HeadObjectRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// HeadObjectResponse wrapper for the HeadObject operation -type HeadObjectResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The entity tag for the object. - ETag *string `presentIn:"header" name:"etag"` - - // The user-defined metadata for the object. - OpcMeta map[string]string `presentIn:"header-collection" prefix:"opc-meta-"` - - // The object size in bytes. - ContentLength *int `presentIn:"header" name:"content-length"` - - // Content-MD5 header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.15. - // Unavailable for objects uploaded using multipart upload. - ContentMd5 *string `presentIn:"header" name:"content-md5"` - - // Only applicable to objects uploaded using multipart upload. - // Base-64 representation of the multipart object hash. - // The multipart object hash is calculated by taking the MD5 hashes of the parts, - // concatenating the binary representation of those hashes in order of their part numbers, - // and then calculating the MD5 hash of the concatenated values. - OpcMultipartMd5 *string `presentIn:"header" name:"opc-multipart-md5"` - - // Content-Type header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.17. - ContentType *string `presentIn:"header" name:"content-type"` - - // Content-Language header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.12. - ContentLanguage *string `presentIn:"header" name:"content-language"` - - // Content-Encoding header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.11. - ContentEncoding *string `presentIn:"header" name:"content-encoding"` - - // The object modification time, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` - - // The current state of the object. - ArchivalState HeadObjectArchivalStateEnum `presentIn:"header" name:"archival-state"` - - // Time that the object is returned to the archived state. This field is only present for restored objects. - TimeOfArchival *common.SDKTime `presentIn:"header" name:"time-of-archival"` - - // Flag to indicate whether or not the object was modified. If this is true, - // the getter for the object itself will return null. Callers should check this - // if they specified one of the request params that might result in a conditional - // response (like 'if-match'/'if-none-match'). - IsNotModified bool -} - -func (response HeadObjectResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response HeadObjectResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// HeadObjectArchivalStateEnum Enum with underlying type: string -type HeadObjectArchivalStateEnum string - -// Set of constants representing the allowable values for HeadObjectArchivalState -const ( - HeadObjectArchivalStateAvailable HeadObjectArchivalStateEnum = "AVAILABLE" - HeadObjectArchivalStateArchived HeadObjectArchivalStateEnum = "ARCHIVED" - HeadObjectArchivalStateRestoring HeadObjectArchivalStateEnum = "RESTORING" - HeadObjectArchivalStateRestored HeadObjectArchivalStateEnum = "RESTORED" -) - -var mappingHeadObjectArchivalState = map[string]HeadObjectArchivalStateEnum{ - "AVAILABLE": HeadObjectArchivalStateAvailable, - "ARCHIVED": HeadObjectArchivalStateArchived, - "RESTORING": HeadObjectArchivalStateRestoring, - "RESTORED": HeadObjectArchivalStateRestored, -} - -// GetHeadObjectArchivalStateEnumValues Enumerates the set of values for HeadObjectArchivalState -func GetHeadObjectArchivalStateEnumValues() []HeadObjectArchivalStateEnum { - values := make([]HeadObjectArchivalStateEnum, 0) - for _, v := range mappingHeadObjectArchivalState { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go deleted file mode 100644 index cefcedfbe..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListBucketsRequest wrapper for the ListBuckets operation -type ListBucketsRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The ID of the compartment in which to list buckets. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The page at which to start retrieving results. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // Bucket summary in list of buckets includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated', - // and 'etag' fields. This parameter can also include 'tags' (freeformTags and definedTags). The only supported value - // of this parameter is 'tags' for now. Example 'tags'. - Fields []ListBucketsFieldsEnum `contributesTo:"query" name:"fields" omitEmpty:"true" collectionFormat:"csv"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListBucketsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListBucketsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListBucketsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListBucketsResponse wrapper for the ListBuckets operation -type ListBucketsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []BucketSummary instances - Items []BucketSummary `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of `Bucket`s. If this header appears in the response, then this - // is a partial list of buckets. Include this value as the `page` parameter in a subsequent - // GET request to get the next batch of buckets. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#nine). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListBucketsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListBucketsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} - -// ListBucketsFieldsEnum Enum with underlying type: string -type ListBucketsFieldsEnum string - -// Set of constants representing the allowable values for ListBucketsFields -const ( - ListBucketsFieldsTags ListBucketsFieldsEnum = "tags" -) - -var mappingListBucketsFields = map[string]ListBucketsFieldsEnum{ - "tags": ListBucketsFieldsTags, -} - -// GetListBucketsFieldsEnumValues Enumerates the set of values for ListBucketsFields -func GetListBucketsFieldsEnumValues() []ListBucketsFieldsEnum { - values := make([]ListBucketsFieldsEnum, 0) - for _, v := range mappingListBucketsFields { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go deleted file mode 100644 index bb35eea34..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListMultipartUploadPartsRequest wrapper for the ListMultipartUploadParts operation -type ListMultipartUploadPartsRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The name of the object. Avoid entering confidential information. - // Example: `test/object1.log` - ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` - - // The upload ID for a multipart upload. - UploadId *string `mandatory:"true" contributesTo:"query" name:"uploadId"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The page at which to start retrieving results. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListMultipartUploadPartsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListMultipartUploadPartsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListMultipartUploadPartsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListMultipartUploadPartsResponse wrapper for the ListMultipartUploadParts operation -type ListMultipartUploadPartsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []MultipartUploadPartSummary instances - Items []MultipartUploadPartSummary `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of `MultipartUploadPartSummary`s. If this header appears in the response, - // then this is a partial list of object parts. Include this value as the `page` parameter in a subsequent - // GET request to get the next batch of object parts. For information about pagination, see - // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListMultipartUploadPartsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListMultipartUploadPartsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go deleted file mode 100644 index b81cc98e4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListMultipartUploadsRequest wrapper for the ListMultipartUploads operation -type ListMultipartUploadsRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The page at which to start retrieving results. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListMultipartUploadsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListMultipartUploadsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListMultipartUploadsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListMultipartUploadsResponse wrapper for the ListMultipartUploads operation -type ListMultipartUploadsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []MultipartUpload instances - Items []MultipartUpload `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of `MultipartUpload`s. If this header appears in the response, then - // this is a partial list of multipart uploads. Include this value as the `page` parameter in a subsequent - // GET request. For information about pagination, see List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListMultipartUploadsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListMultipartUploadsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go deleted file mode 100644 index 8bc96caa2..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ListObjects To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type ListObjects struct { - - // An array of object summaries. - Objects []ObjectSummary `mandatory:"true" json:"objects"` - - // Prefixes that are common to the results returned by the request if the request specified a delimiter. - Prefixes []string `mandatory:"false" json:"prefixes"` - - // The name of the object to use in the 'startWith' parameter to obtain the next page of - // a truncated ListObjects response. Avoid entering confidential information. - // Example: test/object1.log - NextStartWith *string `mandatory:"false" json:"nextStartWith"` -} - -func (m ListObjects) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go deleted file mode 100644 index 05599aca3..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListObjectsRequest wrapper for the ListObjects operation -type ListObjectsRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The string to use for matching against the start of object names in a list query. - Prefix *string `mandatory:"false" contributesTo:"query" name:"prefix"` - - // Object names returned by a list query must be greater or equal to this parameter. - Start *string `mandatory:"false" contributesTo:"query" name:"start"` - - // Object names returned by a list query must be strictly less than this parameter. - End *string `mandatory:"false" contributesTo:"query" name:"end"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // When this parameter is set, only objects whose names do not contain the delimiter character - // (after an optionally specified prefix) are returned in the objects key of the response body. - // Scanned objects whose names contain the delimiter have the part of their name up to the first - // occurrence of the delimiter (including the optional prefix) returned as a set of prefixes. - // Note that only '/' is a supported delimiter character at this time. - Delimiter *string `mandatory:"false" contributesTo:"query" name:"delimiter"` - - // Object summary in list of objects includes the 'name' field. This parameter can also include 'size' - // (object size in bytes), 'md5', and 'timeCreated' (object creation date and time) fields. - // Value of this parameter should be a comma-separated, case-insensitive list of those field names. - // For example 'name,timeCreated,md5'. - Fields *string `mandatory:"false" contributesTo:"query" name:"fields" omitEmpty:"true"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListObjectsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListObjectsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListObjectsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListObjectsResponse wrapper for the ListObjects operation -type ListObjectsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The ListObjects instance - ListObjects `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response ListObjectsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListObjectsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go deleted file mode 100644 index 3a5682137..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// ListPreauthenticatedRequestsRequest wrapper for the ListPreauthenticatedRequests operation -type ListPreauthenticatedRequestsRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // User-specified object name prefixes can be used to query and return a list of pre-authenticated requests. - ObjectNamePrefix *string `mandatory:"false" contributesTo:"query" name:"objectNamePrefix"` - - // The maximum number of items to return. - Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - - // The page at which to start retrieving results. - Page *string `mandatory:"false" contributesTo:"query" name:"page"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request ListPreauthenticatedRequestsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request ListPreauthenticatedRequestsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request ListPreauthenticatedRequestsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ListPreauthenticatedRequestsResponse wrapper for the ListPreauthenticatedRequests operation -type ListPreauthenticatedRequestsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // A list of []PreauthenticatedRequestSummary instances - Items []PreauthenticatedRequestSummary `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // For pagination of a list of pre-authenticated requests, if this header appears in the response, - // then this is a partial list. Include this value as the `page` parameter in a subsequent - // GET request to get the next batch of pre-authenticated requests. - // For information about pagination, see List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#nine). - OpcNextPage *string `presentIn:"header" name:"opc-next-page"` -} - -func (response ListPreauthenticatedRequestsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response ListPreauthenticatedRequestsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go deleted file mode 100644 index 30a6b6cea..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// MultipartUpload Multipart uploads provide efficient and resilient uploads, especially for large objects. Multipart uploads also accommodate -// objects that are too large for a single upload operation. With multipart uploads, individual parts of an object can be -// uploaded in parallel to reduce the amount of time you spend uploading. Multipart uploads can also minimize the impact -// of network failures by letting you retry a failed part upload instead of requiring you to retry an entire object upload. -// See Managing Multipart Uploads (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingmultipartuploads.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type MultipartUpload struct { - - // The namespace in which the in-progress multipart upload is stored. - Namespace *string `mandatory:"true" json:"namespace"` - - // The bucket in which the in-progress multipart upload is stored. - Bucket *string `mandatory:"true" json:"bucket"` - - // The object name of the in-progress multipart upload. - Object *string `mandatory:"true" json:"object"` - - // The unique identifier for the in-progress multipart upload. - UploadId *string `mandatory:"true" json:"uploadId"` - - // The date and time the upload was created, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` -} - -func (m MultipartUpload) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go deleted file mode 100644 index be1e9a5e4..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// MultipartUploadPartSummary Get summary information about multipart uploads. -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, -// see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type MultipartUploadPartSummary struct { - - // The current entity tag for the part. - Etag *string `mandatory:"true" json:"etag"` - - // The MD5 hash of the bytes of the part. - Md5 *string `mandatory:"true" json:"md5"` - - // The size of the part in bytes. - Size *int `mandatory:"true" json:"size"` - - // The part number for this part. - PartNumber *int `mandatory:"true" json:"partNumber"` -} - -func (m MultipartUploadPartSummary) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/namespace_metadata.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/namespace_metadata.go deleted file mode 100644 index 7863b211f..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/namespace_metadata.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// NamespaceMetadata A NamespaceMetadta is a map for storing namespace and defaultS3CompartmentId, defaultSwiftCompartmentId. -type NamespaceMetadata struct { - - // The namespace to which the metadata belongs. - Namespace *string `mandatory:"true" json:"namespace"` - - // The default compartment ID for an S3 client. - DefaultS3CompartmentId *string `mandatory:"true" json:"defaultS3CompartmentId"` - - // The default compartment ID for a Swift client. - DefaultSwiftCompartmentId *string `mandatory:"true" json:"defaultSwiftCompartmentId"` -} - -func (m NamespaceMetadata) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go deleted file mode 100644 index 318aa0c60..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// ObjectSummary To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type ObjectSummary struct { - - // The name of the object. Avoid entering confidential information. - // Example: test/object1.log - Name *string `mandatory:"true" json:"name"` - - // Size of the object in bytes. - Size *int `mandatory:"false" json:"size"` - - // Base64-encoded MD5 hash of the object data. - Md5 *string `mandatory:"false" json:"md5"` - - // The date and time the object was created, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` -} - -func (m ObjectSummary) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go deleted file mode 100644 index 5c07820ca..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go +++ /dev/null @@ -1,1088 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -//ObjectStorageClient a client for ObjectStorage -type ObjectStorageClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewObjectStorageClientWithConfigurationProvider Creates a new default ObjectStorage client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewObjectStorageClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ObjectStorageClient, err error) { - baseClient, err := common.NewClientWithConfig(configProvider) - if err != nil { - return - } - - client = ObjectStorageClient{BaseClient: baseClient} - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *ObjectStorageClient) SetRegion(region string) { - client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "objectstorage", region) -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *ObjectStorageClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { - if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { - return err - } - - // Error has been checked already - region, _ := configProvider.Region() - client.SetRegion(region) - client.config = &configProvider - return nil -} - -// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set -func (client *ObjectStorageClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// AbortMultipartUpload Aborts an in-progress multipart upload and deletes all parts that have been uploaded. -func (client ObjectStorageClient) AbortMultipartUpload(ctx context.Context, request AbortMultipartUploadRequest) (response AbortMultipartUploadResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.abortMultipartUpload, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(AbortMultipartUploadResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into AbortMultipartUploadResponse") - } - return -} - -// abortMultipartUpload implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) abortMultipartUpload(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/u/{objectName}") - if err != nil { - return nil, err - } - - var response AbortMultipartUploadResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CommitMultipartUpload Commits a multipart upload, which involves checking part numbers and ETags of the parts, to create an aggregate object. -func (client ObjectStorageClient) CommitMultipartUpload(ctx context.Context, request CommitMultipartUploadRequest) (response CommitMultipartUploadResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.commitMultipartUpload, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CommitMultipartUploadResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CommitMultipartUploadResponse") - } - return -} - -// commitMultipartUpload implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) commitMultipartUpload(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u/{objectName}") - if err != nil { - return nil, err - } - - var response CommitMultipartUploadResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateBucket Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. -func (client ObjectStorageClient) CreateBucket(ctx context.Context, request CreateBucketRequest) (response CreateBucketResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createBucket, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateBucketResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateBucketResponse") - } - return -} - -// createBucket implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) createBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/") - if err != nil { - return nil, err - } - - var response CreateBucketResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreateMultipartUpload Starts a new multipart upload to a specific object in the given bucket in the given namespace. -func (client ObjectStorageClient) CreateMultipartUpload(ctx context.Context, request CreateMultipartUploadRequest) (response CreateMultipartUploadResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createMultipartUpload, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreateMultipartUploadResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMultipartUploadResponse") - } - return -} - -// createMultipartUpload implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) createMultipartUpload(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u") - if err != nil { - return nil, err - } - - var response CreateMultipartUploadResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// CreatePreauthenticatedRequest Creates a pre-authenticated request specific to the bucket. -func (client ObjectStorageClient) CreatePreauthenticatedRequest(ctx context.Context, request CreatePreauthenticatedRequestRequest) (response CreatePreauthenticatedRequestResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.createPreauthenticatedRequest, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(CreatePreauthenticatedRequestResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreatePreauthenticatedRequestResponse") - } - return -} - -// createPreauthenticatedRequest implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) createPreauthenticatedRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/p/") - if err != nil { - return nil, err - } - - var response CreatePreauthenticatedRequestResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteBucket Deletes a bucket if it is already empty. If the bucket is not empty, use DeleteObject first. -func (client ObjectStorageClient) DeleteBucket(ctx context.Context, request DeleteBucketRequest) (response DeleteBucketResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteBucket, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteBucketResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteBucketResponse") - } - return -} - -// deleteBucket implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) deleteBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/") - if err != nil { - return nil, err - } - - var response DeleteBucketResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeleteObject Deletes an object. -func (client ObjectStorageClient) DeleteObject(ctx context.Context, request DeleteObjectRequest) (response DeleteObjectResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deleteObject, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeleteObjectResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteObjectResponse") - } - return -} - -// deleteObject implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) deleteObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/o/{objectName}") - if err != nil { - return nil, err - } - - var response DeleteObjectResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// DeletePreauthenticatedRequest Deletes the pre-authenticated request for the bucket. -func (client ObjectStorageClient) DeletePreauthenticatedRequest(ctx context.Context, request DeletePreauthenticatedRequestRequest) (response DeletePreauthenticatedRequestResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.deletePreauthenticatedRequest, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(DeletePreauthenticatedRequestResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeletePreauthenticatedRequestResponse") - } - return -} - -// deletePreauthenticatedRequest implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) deletePreauthenticatedRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/p/{parId}") - if err != nil { - return nil, err - } - - var response DeletePreauthenticatedRequestResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetBucket Gets the current representation of the given bucket in the given namespace. -func (client ObjectStorageClient) GetBucket(ctx context.Context, request GetBucketRequest) (response GetBucketResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getBucket, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetBucketResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBucketResponse") - } - return -} - -// getBucket implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) getBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/") - if err != nil { - return nil, err - } - - var response GetBucketResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetNamespace Namespaces are unique. Namespaces are either the tenancy name or a random string automatically generated during -// account creation. You cannot edit a namespace. -func (client ObjectStorageClient) GetNamespace(ctx context.Context, request GetNamespaceRequest) (response GetNamespaceResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getNamespace, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetNamespaceResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetNamespaceResponse") - } - return -} - -// getNamespace implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) getNamespace(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/") - if err != nil { - return nil, err - } - - var response GetNamespaceResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetNamespaceMetadata Get the metadata for the namespace, which contains defaultS3CompartmentId and defaultSwiftCompartmentId. -// Any user with the NAMESPACE_READ permission will be able to see the current metadata. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write -// policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -func (client ObjectStorageClient) GetNamespaceMetadata(ctx context.Context, request GetNamespaceMetadataRequest) (response GetNamespaceMetadataResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getNamespaceMetadata, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetNamespaceMetadataResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetNamespaceMetadataResponse") - } - return -} - -// getNamespaceMetadata implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) getNamespaceMetadata(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}") - if err != nil { - return nil, err - } - - var response GetNamespaceMetadataResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetObject Gets the metadata and body of an object. -func (client ObjectStorageClient) GetObject(ctx context.Context, request GetObjectRequest) (response GetObjectResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getObject, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetObjectResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetObjectResponse") - } - return -} - -// getObject implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) getObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o/{objectName}") - if err != nil { - return nil, err - } - - var response GetObjectResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetPreauthenticatedRequest Gets the pre-authenticated request for the bucket. -func (client ObjectStorageClient) GetPreauthenticatedRequest(ctx context.Context, request GetPreauthenticatedRequestRequest) (response GetPreauthenticatedRequestResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.getPreauthenticatedRequest, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(GetPreauthenticatedRequestResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetPreauthenticatedRequestResponse") - } - return -} - -// getPreauthenticatedRequest implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) getPreauthenticatedRequest(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p/{parId}") - if err != nil { - return nil, err - } - - var response GetPreauthenticatedRequestResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// HeadBucket Efficiently checks to see if a bucket exists and gets the current ETag for the bucket. -func (client ObjectStorageClient) HeadBucket(ctx context.Context, request HeadBucketRequest) (response HeadBucketResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.headBucket, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(HeadBucketResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into HeadBucketResponse") - } - return -} - -// headBucket implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) headBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodHead, "/n/{namespaceName}/b/{bucketName}/") - if err != nil { - return nil, err - } - - var response HeadBucketResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// HeadObject Gets the user-defined metadata and entity tag for an object. -func (client ObjectStorageClient) HeadObject(ctx context.Context, request HeadObjectRequest) (response HeadObjectResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.headObject, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(HeadObjectResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into HeadObjectResponse") - } - return -} - -// headObject implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) headObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodHead, "/n/{namespaceName}/b/{bucketName}/o/{objectName}") - if err != nil { - return nil, err - } - - var response HeadObjectResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListBuckets Gets a list of all `BucketSummary`s in a compartment. A `BucketSummary` contains only summary fields for the bucket -// and does not contain fields like the user-defined metadata. -// To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -func (client ObjectStorageClient) ListBuckets(ctx context.Context, request ListBucketsRequest) (response ListBucketsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listBuckets, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListBucketsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListBucketsResponse") - } - return -} - -// listBuckets implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) listBuckets(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/") - if err != nil { - return nil, err - } - - var response ListBucketsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListMultipartUploadParts Lists the parts of an in-progress multipart upload. -func (client ObjectStorageClient) ListMultipartUploadParts(ctx context.Context, request ListMultipartUploadPartsRequest) (response ListMultipartUploadPartsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listMultipartUploadParts, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListMultipartUploadPartsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMultipartUploadPartsResponse") - } - return -} - -// listMultipartUploadParts implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) listMultipartUploadParts(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u/{objectName}") - if err != nil { - return nil, err - } - - var response ListMultipartUploadPartsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListMultipartUploads Lists all in-progress multipart uploads for the given bucket in the given namespace. -func (client ObjectStorageClient) ListMultipartUploads(ctx context.Context, request ListMultipartUploadsRequest) (response ListMultipartUploadsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listMultipartUploads, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListMultipartUploadsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMultipartUploadsResponse") - } - return -} - -// listMultipartUploads implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) listMultipartUploads(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u") - if err != nil { - return nil, err - } - - var response ListMultipartUploadsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListObjects Lists the objects in a bucket. -// To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -func (client ObjectStorageClient) ListObjects(ctx context.Context, request ListObjectsRequest) (response ListObjectsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listObjects, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListObjectsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListObjectsResponse") - } - return -} - -// listObjects implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) listObjects(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o") - if err != nil { - return nil, err - } - - var response ListObjectsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// ListPreauthenticatedRequests Lists pre-authenticated requests for the bucket. -func (client ObjectStorageClient) ListPreauthenticatedRequests(ctx context.Context, request ListPreauthenticatedRequestsRequest) (response ListPreauthenticatedRequestsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.listPreauthenticatedRequests, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(ListPreauthenticatedRequestsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into ListPreauthenticatedRequestsResponse") - } - return -} - -// listPreauthenticatedRequests implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) listPreauthenticatedRequests(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p/") - if err != nil { - return nil, err - } - - var response ListPreauthenticatedRequestsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// PutObject Creates a new object or overwrites an existing one. -func (client ObjectStorageClient) PutObject(ctx context.Context, request PutObjectRequest) (response PutObjectResponse, err error) { - client.Signer = common.RequestSignerExcludeBody(*client.config) - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.putObject, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(PutObjectResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into PutObjectResponse") - } - return -} - -// putObject implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) putObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/o/{objectName}") - if err != nil { - return nil, err - } - - var response PutObjectResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// RenameObject Rename an object from source key to target key in the given namespace. -func (client ObjectStorageClient) RenameObject(ctx context.Context, request RenameObjectRequest) (response RenameObjectResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.renameObject, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(RenameObjectResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into RenameObjectResponse") - } - return -} - -// renameObject implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) renameObject(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/renameObject") - if err != nil { - return nil, err - } - - var response RenameObjectResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// RestoreObjects Restore one or more objects specified by objectName parameter. -// By default object will be restored for 24 hours.Duration can be configured using hours parameter. -func (client ObjectStorageClient) RestoreObjects(ctx context.Context, request RestoreObjectsRequest) (response RestoreObjectsResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.restoreObjects, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(RestoreObjectsResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into RestoreObjectsResponse") - } - return -} - -// restoreObjects implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) restoreObjects(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/restoreObjects") - if err != nil { - return nil, err - } - - var response RestoreObjectsResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateBucket Performs a partial or full update of a bucket's user-defined metadata. -func (client ObjectStorageClient) UpdateBucket(ctx context.Context, request UpdateBucketRequest) (response UpdateBucketResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateBucket, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateBucketResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateBucketResponse") - } - return -} - -// updateBucket implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) updateBucket(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/") - if err != nil { - return nil, err - } - - var response UpdateBucketResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UpdateNamespaceMetadata Change the default Swift/S3 compartmentId of user's namespace into the user-defined compartmentId. Upon doing -// this, all subsequent bucket creations will use the new default compartment, but no previously created -// buckets will be modified. A user must have the NAMESPACE_UPDATE permission to make changes to the default -// compartments for S3 and Swift. -func (client ObjectStorageClient) UpdateNamespaceMetadata(ctx context.Context, request UpdateNamespaceMetadataRequest) (response UpdateNamespaceMetadataResponse, err error) { - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.updateNamespaceMetadata, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UpdateNamespaceMetadataResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateNamespaceMetadataResponse") - } - return -} - -// updateNamespaceMetadata implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) updateNamespaceMetadata(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}") - if err != nil { - return nil, err - } - - var response UpdateNamespaceMetadataResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// UploadPart Uploads a single part of a multipart upload. -func (client ObjectStorageClient) UploadPart(ctx context.Context, request UploadPartRequest) (response UploadPartResponse, err error) { - client.Signer = common.RequestSignerExcludeBody(*client.config) - var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() - if request.RetryPolicy() != nil { - policy = *request.RetryPolicy() - } - ociResponse, err = common.Retry(ctx, request, client.uploadPart, policy) - if err != nil { - return - } - if convertedResponse, ok := ociResponse.(UploadPartResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UploadPartResponse") - } - return -} - -// uploadPart implements the OCIOperation interface (enables retrying operations) -func (client ObjectStorageClient) uploadPart(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/u/{objectName}") - if err != nil { - return nil, err - } - - var response UploadPartResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go deleted file mode 100644 index fdf12fd9b..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PreauthenticatedRequest Pre-authenticated requests provide a way to let users access a bucket or an object without having their own credentials. -// When you create a pre-authenticated request, a unique URL is generated. Users in your organization, partners, or third -// parties can use this URL to access the targets identified in the pre-authenticated request. See Managing Access to Buckets and Objects (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm). -// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. -// If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type PreauthenticatedRequest struct { - - // The unique identifier to use when directly addressing the pre-authenticated request. - Id *string `mandatory:"true" json:"id"` - - // The user-provided name of the pre-authenticated request. - Name *string `mandatory:"true" json:"name"` - - // The URI to embed in the URL when using the pre-authenticated request. - AccessUri *string `mandatory:"true" json:"accessUri"` - - // The operation that can be performed on this resource. - AccessType PreauthenticatedRequestAccessTypeEnum `mandatory:"true" json:"accessType"` - - // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid. - TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` - - // The date when the pre-authenticated request was created as per specification - // RFC 3339 (https://tools.ietf.org/rfc/rfc3339). - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The name of the object that is being granted access to by the pre-authenticated request. This can be null and - // if so, the pre-authenticated request grants access to the entire bucket. Avoid entering confidential information. - // Example: test/object1.log - ObjectName *string `mandatory:"false" json:"objectName"` -} - -func (m PreauthenticatedRequest) String() string { - return common.PointerString(m) -} - -// PreauthenticatedRequestAccessTypeEnum Enum with underlying type: string -type PreauthenticatedRequestAccessTypeEnum string - -// Set of constants representing the allowable values for PreauthenticatedRequestAccessType -const ( - PreauthenticatedRequestAccessTypeObjectread PreauthenticatedRequestAccessTypeEnum = "ObjectRead" - PreauthenticatedRequestAccessTypeObjectwrite PreauthenticatedRequestAccessTypeEnum = "ObjectWrite" - PreauthenticatedRequestAccessTypeObjectreadwrite PreauthenticatedRequestAccessTypeEnum = "ObjectReadWrite" - PreauthenticatedRequestAccessTypeAnyobjectwrite PreauthenticatedRequestAccessTypeEnum = "AnyObjectWrite" -) - -var mappingPreauthenticatedRequestAccessType = map[string]PreauthenticatedRequestAccessTypeEnum{ - "ObjectRead": PreauthenticatedRequestAccessTypeObjectread, - "ObjectWrite": PreauthenticatedRequestAccessTypeObjectwrite, - "ObjectReadWrite": PreauthenticatedRequestAccessTypeObjectreadwrite, - "AnyObjectWrite": PreauthenticatedRequestAccessTypeAnyobjectwrite, -} - -// GetPreauthenticatedRequestAccessTypeEnumValues Enumerates the set of values for PreauthenticatedRequestAccessType -func GetPreauthenticatedRequestAccessTypeEnumValues() []PreauthenticatedRequestAccessTypeEnum { - values := make([]PreauthenticatedRequestAccessTypeEnum, 0) - for _, v := range mappingPreauthenticatedRequestAccessType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go deleted file mode 100644 index 04b5440ad..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// PreauthenticatedRequestSummary Get summary information about pre-authenticated requests. -type PreauthenticatedRequestSummary struct { - - // The unique identifier to use when directly addressing the pre-authenticated request. - Id *string `mandatory:"true" json:"id"` - - // The user-provided name of the pre-authenticated request. - Name *string `mandatory:"true" json:"name"` - - // The operation that can be performed on this resource. - AccessType PreauthenticatedRequestSummaryAccessTypeEnum `mandatory:"true" json:"accessType"` - - // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid. - TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` - - // The date when the pre-authenticated request was created as per RFC 3339 (https://tools.ietf.org/rfc/rfc3339). - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The name of object that is being granted access to by the pre-authenticated request. This can be null and if it is, the pre-authenticated request grants access to the entire bucket. - ObjectName *string `mandatory:"false" json:"objectName"` -} - -func (m PreauthenticatedRequestSummary) String() string { - return common.PointerString(m) -} - -// PreauthenticatedRequestSummaryAccessTypeEnum Enum with underlying type: string -type PreauthenticatedRequestSummaryAccessTypeEnum string - -// Set of constants representing the allowable values for PreauthenticatedRequestSummaryAccessType -const ( - PreauthenticatedRequestSummaryAccessTypeObjectread PreauthenticatedRequestSummaryAccessTypeEnum = "ObjectRead" - PreauthenticatedRequestSummaryAccessTypeObjectwrite PreauthenticatedRequestSummaryAccessTypeEnum = "ObjectWrite" - PreauthenticatedRequestSummaryAccessTypeObjectreadwrite PreauthenticatedRequestSummaryAccessTypeEnum = "ObjectReadWrite" - PreauthenticatedRequestSummaryAccessTypeAnyobjectwrite PreauthenticatedRequestSummaryAccessTypeEnum = "AnyObjectWrite" -) - -var mappingPreauthenticatedRequestSummaryAccessType = map[string]PreauthenticatedRequestSummaryAccessTypeEnum{ - "ObjectRead": PreauthenticatedRequestSummaryAccessTypeObjectread, - "ObjectWrite": PreauthenticatedRequestSummaryAccessTypeObjectwrite, - "ObjectReadWrite": PreauthenticatedRequestSummaryAccessTypeObjectreadwrite, - "AnyObjectWrite": PreauthenticatedRequestSummaryAccessTypeAnyobjectwrite, -} - -// GetPreauthenticatedRequestSummaryAccessTypeEnumValues Enumerates the set of values for PreauthenticatedRequestSummaryAccessType -func GetPreauthenticatedRequestSummaryAccessTypeEnumValues() []PreauthenticatedRequestSummaryAccessTypeEnum { - values := make([]PreauthenticatedRequestSummaryAccessTypeEnum, 0) - for _, v := range mappingPreauthenticatedRequestSummaryAccessType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go deleted file mode 100644 index f112573cc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "io" - "net/http" -) - -// PutObjectRequest wrapper for the PutObject operation -type PutObjectRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The name of the object. Avoid entering confidential information. - // Example: `test/object1.log` - ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` - - // The content length of the body. - ContentLength *int `mandatory:"true" contributesTo:"header" name:"Content-Length"` - - // The object to upload to the object store. - PutObjectBody io.ReadCloser `mandatory:"true" contributesTo:"body" encoding:"binary"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // 100-continue - Expect *string `mandatory:"false" contributesTo:"header" name:"Expect"` - - // The base-64 encoded MD5 hash of the body. - ContentMD5 *string `mandatory:"false" contributesTo:"header" name:"Content-MD5"` - - // The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call. - ContentType *string `mandatory:"false" contributesTo:"header" name:"Content-Type"` - - // The content language of the object. - ContentLanguage *string `mandatory:"false" contributesTo:"header" name:"Content-Language"` - - // The content encoding of the object. - ContentEncoding *string `mandatory:"false" contributesTo:"header" name:"Content-Encoding"` - - // Optional user-defined metadata key and value. - OpcMeta map[string]string `mandatory:"false" contributesTo:"header-collection" prefix:"opc-meta-"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request PutObjectRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request PutObjectRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request PutObjectRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// PutObjectResponse wrapper for the PutObject operation -type PutObjectResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The base-64 encoded MD5 hash of the request body as computed by the server. - OpcContentMd5 *string `presentIn:"header" name:"opc-content-md5"` - - // The entity tag for the object. - ETag *string `presentIn:"header" name:"etag"` - - // The time the object was modified, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` -} - -func (response PutObjectResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response PutObjectResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_details.go deleted file mode 100644 index 99cce0816..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_details.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// RenameObjectDetails To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type RenameObjectDetails struct { - - // The name of the source object to be renamed. - SourceName *string `mandatory:"true" json:"sourceName"` - - // The new name of the source object. - NewName *string `mandatory:"true" json:"newName"` - - // The if-match entity tag of the source object. - SrcObjIfMatchETag *string `mandatory:"false" json:"srcObjIfMatchETag"` - - // The if-match entity tag of the new object. - NewObjIfMatchETag *string `mandatory:"false" json:"newObjIfMatchETag"` - - // The if-none-match entity tag of the new object. - NewObjIfNoneMatchETag *string `mandatory:"false" json:"newObjIfNoneMatchETag"` -} - -func (m RenameObjectDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_request_response.go deleted file mode 100644 index 633e990aa..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/rename_object_request_response.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// RenameObjectRequest wrapper for the RenameObject operation -type RenameObjectRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The sourceName and newName of rename operation. - RenameObjectDetails `contributesTo:"body"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request RenameObjectRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request RenameObjectRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request RenameObjectRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// RenameObjectResponse wrapper for the RenameObject operation -type RenameObjectResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The entity tag for the object. - ETag *string `presentIn:"header" name:"etag"` - - // The time the object was modified, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. - LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` -} - -func (response RenameObjectResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response RenameObjectResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_details.go deleted file mode 100644 index b7b41e704..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_details.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// RestoreObjectsDetails The representation of RestoreObjectsDetails -type RestoreObjectsDetails struct { - - // A object which was in an archived state and need to be restored. - ObjectName *string `mandatory:"true" json:"objectName"` - - // The number of hours for which this object will be restored. - // By default object will be restored for 24 hours.It can be configured using hours parameter. - Hours *int `mandatory:"false" json:"hours"` -} - -func (m RestoreObjectsDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_request_response.go deleted file mode 100644 index 413581b36..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/restore_objects_request_response.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// RestoreObjectsRequest wrapper for the RestoreObjects operation -type RestoreObjectsRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // Request to restore objects. - RestoreObjectsDetails `contributesTo:"body"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request RestoreObjectsRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request RestoreObjectsRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request RestoreObjectsRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// RestoreObjectsResponse wrapper for the RestoreObjects operation -type RestoreObjectsResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response RestoreObjectsResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response RestoreObjectsResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go deleted file mode 100644 index 1f778b7ba..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateBucketDetails To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, -// talk to an administrator. If you're an administrator who needs to write policies to give users access, see -// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). -type UpdateBucketDetails struct { - - // The namespace in which the bucket lives. - Namespace *string `mandatory:"false" json:"namespace"` - - // The compartmentId for the compartment to which the bucket is targeted to move to. - CompartmentId *string `mandatory:"false" json:"compartmentId"` - - // The name of the bucket. Avoid entering confidential information. - // Example: my-new-bucket1 - Name *string `mandatory:"false" json:"name"` - - // Arbitrary string, up to 4KB, of keys and values for user-defined metadata. - Metadata map[string]string `mandatory:"false" json:"metadata"` - - // The type of public access enabled on this bucket. A bucket is set to `NoPublicAccess` by default, which only allows an - // authenticated caller to access the bucket and its contents. When `ObjectRead` is enabled on the bucket, public access - // is allowed for the `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled - // on the bucket, public access is allowed for the `GetObject` and `HeadObject` operations. - PublicAccessType UpdateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` - - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Department": "Finance"}` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - - // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). - // Example: `{"Operations": {"CostCenter": "42"}} - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` -} - -func (m UpdateBucketDetails) String() string { - return common.PointerString(m) -} - -// UpdateBucketDetailsPublicAccessTypeEnum Enum with underlying type: string -type UpdateBucketDetailsPublicAccessTypeEnum string - -// Set of constants representing the allowable values for UpdateBucketDetailsPublicAccessType -const ( - UpdateBucketDetailsPublicAccessTypeNopublicaccess UpdateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" - UpdateBucketDetailsPublicAccessTypeObjectread UpdateBucketDetailsPublicAccessTypeEnum = "ObjectRead" - UpdateBucketDetailsPublicAccessTypeObjectreadwithoutlist UpdateBucketDetailsPublicAccessTypeEnum = "ObjectReadWithoutList" -) - -var mappingUpdateBucketDetailsPublicAccessType = map[string]UpdateBucketDetailsPublicAccessTypeEnum{ - "NoPublicAccess": UpdateBucketDetailsPublicAccessTypeNopublicaccess, - "ObjectRead": UpdateBucketDetailsPublicAccessTypeObjectread, - "ObjectReadWithoutList": UpdateBucketDetailsPublicAccessTypeObjectreadwithoutlist, -} - -// GetUpdateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for UpdateBucketDetailsPublicAccessType -func GetUpdateBucketDetailsPublicAccessTypeEnumValues() []UpdateBucketDetailsPublicAccessTypeEnum { - values := make([]UpdateBucketDetailsPublicAccessTypeEnum, 0) - for _, v := range mappingUpdateBucketDetailsPublicAccessType { - values = append(values, v) - } - return values -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go deleted file mode 100644 index cbc62a506..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateBucketRequest wrapper for the UpdateBucket operation -type UpdateBucketRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // Request object for updating a bucket. - UpdateBucketDetails `contributesTo:"body"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateBucketRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateBucketRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateBucketRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateBucketResponse wrapper for the UpdateBucket operation -type UpdateBucketResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The Bucket instance - Bucket `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The entity tag for the updated bucket. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response UpdateBucketResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateBucketResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_details.go deleted file mode 100644 index 967d993cc..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_details.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -// Object Storage Service API -// -// Common set of Object and Archive Storage APIs for managing buckets and objects. -// - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" -) - -// UpdateNamespaceMetadataDetails An UpdateNamespaceMetadataDetails is used for update NamespaceMetadata. To be able to upate the NamespaceMetadata, a user -// must have NAMESPACE_UPDATE permission. -type UpdateNamespaceMetadataDetails struct { - - // The update compartment id for an S3 client if this field is set. - DefaultS3CompartmentId *string `mandatory:"false" json:"defaultS3CompartmentId"` - - // The update compartment id for a Swift client if this field is set. - DefaultSwiftCompartmentId *string `mandatory:"false" json:"defaultSwiftCompartmentId"` -} - -func (m UpdateNamespaceMetadataDetails) String() string { - return common.PointerString(m) -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_request_response.go deleted file mode 100644 index 0af117c02..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_namespace_metadata_request_response.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "net/http" -) - -// UpdateNamespaceMetadataRequest wrapper for the UpdateNamespaceMetadata operation -type UpdateNamespaceMetadataRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // Request object for update NamespaceMetadata. - UpdateNamespaceMetadataDetails `contributesTo:"body"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateNamespaceMetadataRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateNamespaceMetadataRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateNamespaceMetadataRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UpdateNamespaceMetadataResponse wrapper for the UpdateNamespaceMetadata operation -type UpdateNamespaceMetadataResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The NamespaceMetadata instance - NamespaceMetadata `presentIn:"body"` - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` -} - -func (response UpdateNamespaceMetadataResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateNamespaceMetadataResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go deleted file mode 100644 index da83c4cca..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// Code generated. DO NOT EDIT. - -package objectstorage - -import ( - "github.com/oracle/oci-go-sdk/common" - "io" - "net/http" -) - -// UploadPartRequest wrapper for the UploadPart operation -type UploadPartRequest struct { - - // The top-level namespace used for the request. - NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` - - // The name of the bucket. Avoid entering confidential information. - // Example: `my-new-bucket1` - BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` - - // The name of the object. Avoid entering confidential information. - // Example: `test/object1.log` - ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` - - // The upload ID for a multipart upload. - UploadId *string `mandatory:"true" contributesTo:"query" name:"uploadId"` - - // The part number that identifies the object part currently being uploaded. - UploadPartNum *int `mandatory:"true" contributesTo:"query" name:"uploadPartNum"` - - // The content length of the body. - ContentLength *int `mandatory:"true" contributesTo:"header" name:"Content-Length"` - - // The part being uploaded to the Object Storage Service. - UploadPartBody io.ReadCloser `mandatory:"true" contributesTo:"body" encoding:"binary"` - - // The client request ID for tracing. - OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` - - // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - // For uploading a part, this is the entity tag of the target part. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. - // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` - - // 100-continue - Expect *string `mandatory:"false" contributesTo:"header" name:"Expect"` - - // The base-64 encoded MD5 hash of the body. - ContentMD5 *string `mandatory:"false" contributesTo:"header" name:"Content-MD5"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UploadPartRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UploadPartRequest) HTTPRequest(method, path string) (http.Request, error) { - return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UploadPartRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// UploadPartResponse wrapper for the UploadPart operation -type UploadPartResponse struct { - - // The underlying http response - RawResponse *http.Response - - // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. - OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` - - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - // request, provide this request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // The base64-encoded MD5 hash of the request body, as computed by the server. - OpcContentMd5 *string `presentIn:"header" name:"opc-content-md5"` - - // The entity tag for the object. - ETag *string `presentIn:"header" name:"etag"` -} - -func (response UploadPartResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UploadPartResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/vendor/github.com/oracle/oci-go-sdk/oci.go b/vendor/github.com/oracle/oci-go-sdk/oci.go deleted file mode 100644 index 396634535..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/oci.go +++ /dev/null @@ -1,260 +0,0 @@ -/* -This is the official Go SDK for Oracle Cloud Infrastructure - -Installation - -Refer to https://github.com/oracle/oci-go-sdk/blob/master/README.md#installing for installation instructions. - -Configuration - -Refer to https://github.com/oracle/oci-go-sdk/blob/master/README.md#configuring for configuration instructions. - -Quickstart - -The following example shows how to get started with the SDK. The example belows creates an identityClient -struct with the default configuration. It then utilizes the identityClient to list availability domains and prints -them out to stdout - - import ( - "context" - "fmt" - - "github.com/oracle/oci-go-sdk/common" - "github.com/oracle/oci-go-sdk/identity" - ) - - func main() { - c, err := identity.NewIdentityClientWithConfigurationProvider(common.DefaultConfigProvider()) - if err != nil { - fmt.Println("Error:", err) - return - } - - // The OCID of the tenancy containing the compartment. - tenancyID, err := common.DefaultConfigProvider().TenancyOCID() - if err != nil { - fmt.Println("Error:", err) - return - } - - request := identity.ListAvailabilityDomainsRequest{ - CompartmentId: &tenancyID, - } - - r, err := c.ListAvailabilityDomains(context.Background(), request) - if err != nil { - fmt.Println("Error:", err) - return - } - - fmt.Printf("List of available domains: %v", r.Items) - return - } - -More examples can be found in the SDK Github repo: https://github.com/oracle/oci-go-sdk/tree/master/example - -Optional fields in the SDK - -Optional fields are represented with the `mandatory:"false"` tag on input structs. The SDK will omit all optional fields that are nil when making requests. -In the case of enum-type fields, the SDK will omit fields whose value is an empty string. - -Helper functions - -The SDK uses pointers for primitive types in many input structs. To aid in the construction of such structs, the SDK provides -functions that return a pointer for a given value. For example: - - // Given the struct - type CreateVcnDetails struct { - - // Example: `172.16.0.0/16` - CidrBlock *string `mandatory:"true" json:"cidrBlock"` - - CompartmentId *string `mandatory:"true" json:"compartmentId"` - - DisplayName *string `mandatory:"false" json:"displayName"` - - } - - // We can use the helper functions to build the struct - details := core.CreateVcnDetails{ - CidrBlock: common.String("172.16.0.0/16"), - CompartmentId: common.String("someOcid"), - DisplayName: common.String("myVcn"), - } - - -Signing custom requests - -The SDK exposes a stand-alone signer that can be used to signing custom requests. Related code can be found here: -https://github.com/oracle/oci-go-sdk/blob/master/common/http_signer.go. - -The example below shows how to create a default signer. - - client := http.Client{} - var request http.Request - request = ... // some custom request - - // Set the Date header - request.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) - - // And a provider of cryptographic keys - provider := common.DefaultConfigProvider() - - // Build the signer - signer := common.DefaultSigner(provider) - - // Sign the request - signer.Sign(&request) - - // Execute the request - client.Do(request) - - - -The signer also allows more granular control on the headers used for signing. For example: - - client := http.Client{} - var request http.Request - request = ... // some custom request - - // Set the Date header - request.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) - - // Mandatory headers to be used in the sign process - defaultGenericHeaders = []string{"date", "(request-target)", "host"} - - // Optional headers - optionalHeaders = []string{"content-length", "content-type", "x-content-sha256"} - - // A predicate that specifies when to use the optional signing headers - optionalHeadersPredicate := func (r *http.Request) bool { - return r.Method == http.MethodPost - } - - // And a provider of cryptographic keys - provider := common.DefaultConfigProvider() - - // Build the signer - signer := common.RequestSigner(provider, defaultGenericHeaders, optionalHeaders, optionalHeadersPredicate) - - // Sign the request - signer.Sign(&request) - - // Execute the request - c.Do(request) - -For more information on the signing algorithm refer to: https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/signingrequests.htm - -Polymorphic json requests and responses - -Some operations accept or return polymorphic json objects. The SDK models such objects as interfaces. Further the SDK provides -structs that implement such interfaces. Thus, for all operations that expect interfaces as input, pass the struct in the SDK that satisfies -such interface. For example: - - c, err := identity.NewIdentityClientWithConfigurationProvider(common.DefaultConfigProvider()) - if err != nil { - panic(err) - } - - // The CreateIdentityProviderRequest takes a CreateIdentityProviderDetails interface as input - rCreate := identity.CreateIdentityProviderRequest{} - - // The CreateSaml2IdentityProviderDetails struct implements the CreateIdentityProviderDetails interface - details := identity.CreateSaml2IdentityProviderDetails{} - details.CompartmentId = common.String(getTenancyID()) - details.Name = common.String("someName") - //... more setup if needed - // Use the above struct - rCreate.CreateIdentityProviderDetails = details - - // Make the call - rspCreate, createErr := c.CreateIdentityProvider(context.Background(), rCreate) - -In the case of a polymorphic response you can type assert the interface to the expected type. For example: - - rRead := identity.GetIdentityProviderRequest{} - rRead.IdentityProviderId = common.String("aValidId") - response, err := c.GetIdentityProvider(context.Background(), rRead) - - provider := response.IdentityProvider.(identity.Saml2IdentityProvider) - -An example of polymorphic json request handling can be found here: https://github.com/oracle/oci-go-sdk/blob/master/example/example_core_test.go#L63 - - -Pagination - -When calling a list operation, the operation will retrieve a page of results. To retrieve more data, call the list operation again, -passing in the value of the most recent response's OpcNextPage as the value of Page in the next list operation call. -When there is no more data the OpcNextPage field will be nil. An example of pagination using this logic can be found here: https://github.com/oracle/oci-go-sdk/blob/master/example/example_core_pagination_test.go - -Logging and Debugging - -The SDK has a built-in logging mechanism used internally. The internal logging logic is used to record the raw http -requests, responses and potential errors when (un)marshalling request and responses. - -To expose debugging logs, set the environment variable "OCI_GO_SDK_DEBUG" to "1", or some other non empty string. - -Retry - -Sometimes you may need to wait until an attribute of a resource, such as an instance or a VCN, reaches a certain state. -An example of this would be launching an instance and then waiting for the instance to become available, or waiting until a subnet in a VCN has been terminated. -You might also want to retry the same operation again if there's network issue etc... -This can be accomplished by using the RequestMetadata.RetryPolicy. You can find the examples here: https://github.com/oracle/oci-go-sdk/blob/master/example/example_retry_test.go - -Using the SDK with a proxy server - -The GO SDK uses the net/http package to make calls to OCI services. If your environment requires you to use a proxy server for outgoing HTTP requests -then you can set this up in the following ways: - -1. Configuring environment variable as described here https://golang.org/pkg/net/http/#ProxyFromEnvironment -2. Modifying the underlying Transport struct for a service client - -In order to modify the underlying Transport struct in HttpClient, you can do something similar to (sample code for audit service client): - // create audit service client - client, clerr := audit.NewAuditClientWithConfigurationProvider(common.DefaultConfigProvider()) - - // create a proxy url - proxyURL, err := url.Parse("http(s)://[username]:[password]@[ip address]:[port]") - - client.HTTPClient = &http.Client{ - // adding the proxy settings to the http.Transport - Transport: &http.Transport{ - Proxy: http.ProxyURL(proxyURL), - }, - } - - -Forward Compatibility - -Some response fields are enum-typed. In the future, individual services may return values not covered by existing enums -for that field. To address this possibility, every enum-type response field is a modeled as a type that supports any string. -Thus if a service returns a value that is not recognized by your version of the SDK, then the response field will be set to this value. - -When individual services return a polymorphic json response not available as a concrete struct, the SDK will return an implementation that only satisfies -the interface modeling the polymorphic json response. - - -Contributions - -Got a fix for a bug, or a new feature you'd like to contribute? The SDK is open source and accepting pull requests on GitHub -https://github.com/oracle/oci-go-sdk - -License - -Licensing information available at: https://github.com/oracle/oci-go-sdk/blob/master/LICENSE.txt - -Notifications - -To be notified when a new version of the Go SDK is released, subscribe to the following feed: https://github.com/oracle/oci-go-sdk/releases.atom - -Questions or Feedback - -Please refer to this link: https://github.com/oracle/oci-go-sdk#help - - - - -*/ -package oci - -//go:generate go run cmd/genver/main.go cmd/genver/version_template.go --output common/version.go diff --git a/vendor/github.com/oracle/oci-go-sdk/wercker.yml b/vendor/github.com/oracle/oci-go-sdk/wercker.yml deleted file mode 100644 index 58255f22c..000000000 --- a/vendor/github.com/oracle/oci-go-sdk/wercker.yml +++ /dev/null @@ -1,26 +0,0 @@ -box: - id: golang - ports: - - "5000" - -build: - steps: - - script: - name: golint-prepare - code: | - go get github.com/golang/lint/golint - go install github.com/golang/lint/golint - - - script: - name: symlinking src code - code: | - mkdir -p $GOPATH/src/github.com/oracle - ln -s $WERCKER_SOURCE_DIR $GOPATH/src/github.com/oracle/oci-go-sdk - ls -al $GOPATH/src/github.com/oracle/oci-go-sdk - - - script: - name: make-build - code: | - make build - - diff --git a/vendor/github.com/pierrec/lz4/.gitignore b/vendor/github.com/pierrec/lz4/.gitignore new file mode 100644 index 000000000..e48bab32a --- /dev/null +++ b/vendor/github.com/pierrec/lz4/.gitignore @@ -0,0 +1,33 @@ +# Created by https://www.gitignore.io/api/macos + +### macOS ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# End of https://www.gitignore.io/api/macos + +lz4c/lz4c diff --git a/vendor/github.com/pierrec/lz4/.travis.yml b/vendor/github.com/pierrec/lz4/.travis.yml index 5fd623633..b2c806d57 100644 --- a/vendor/github.com/pierrec/lz4/.travis.yml +++ b/vendor/github.com/pierrec/lz4/.travis.yml @@ -1,9 +1,18 @@ language: go go: - - 1.4 - - 1.5 + - 1.8.x + - 1.9.x + - 1.10.x + - master + +matrix: + fast_finish: true + allow_failures: + - go: master + +sudo: false script: - - go test -cpu=2 - - go test -cpu=2 -race \ No newline at end of file + - go test -v -cpu=2 + - go test -v -cpu=2 -race diff --git a/vendor/github.com/pierrec/lz4/README.md b/vendor/github.com/pierrec/lz4/README.md index dd3c9d47e..50a10ee16 100644 --- a/vendor/github.com/pierrec/lz4/README.md +++ b/vendor/github.com/pierrec/lz4/README.md @@ -1,8 +1,7 @@ [![godoc](https://godoc.org/github.com/pierrec/lz4?status.png)](https://godoc.org/github.com/pierrec/lz4) -[![Build Status](https://travis-ci.org/pierrec/lz4.svg?branch=master)](https://travis-ci.org/pierrec/lz4) # lz4 -LZ4 compression and decompression in pure Go +LZ4 compression and decompression in pure Go. ## Usage @@ -11,21 +10,15 @@ import "github.com/pierrec/lz4" ``` ## Description - Package lz4 implements reading and writing lz4 compressed data (a frame), -as specified in http://fastcompression.blogspot.fr/2013/04/lz4-streaming-format-final.html, -using an io.Reader (decompression) and io.Writer (compression). -It is designed to minimize memory usage while maximizing throughput by being able to -[de]compress data concurrently. +as specified in http://fastcompression.blogspot.fr/2013/04/lz4-streaming-format-final.html. -The Reader and the Writer support concurrent processing provided the supplied buffers are -large enough (in multiples of BlockMaxSize) and there is no block dependency. -Reader.WriteTo and Writer.ReadFrom do leverage the concurrency transparently. -The runtime.GOMAXPROCS() value is used to apply concurrency or not. +This package is **compatible with the LZ4 frame format** although the block level compression +and decompression functions are exposed and are fully compatible with the lz4 block format +definition, they are low level and should not be used directly. -Although the block level compression and decompression functions are exposed and are fully compatible -with the lz4 block format definition, they are low level and should not be used directly. For a complete description of an lz4 compressed block, see: http://fastcompression.blogspot.fr/2011/05/lz4-explained.html See https://github.com/Cyan4973/lz4 for the reference C implementation. + diff --git a/vendor/github.com/pierrec/lz4/block.go b/vendor/github.com/pierrec/lz4/block.go index 145eec270..ef24f17e5 100644 --- a/vendor/github.com/pierrec/lz4/block.go +++ b/vendor/github.com/pierrec/lz4/block.go @@ -5,179 +5,164 @@ import ( "errors" ) -// block represents a frame data block. -// Used when compressing or decompressing frame blocks concurrently. -type block struct { - compressed bool - zdata []byte // compressed data - data []byte // decompressed data - offset int // offset within the data as with block dependency the 64Kb window is prepended to it - checksum uint32 // compressed data checksum - err error // error while [de]compressing -} - var ( - // ErrInvalidSource is returned by UncompressBlock when a compressed block is corrupted. - ErrInvalidSource = errors.New("lz4: invalid source") - // ErrShortBuffer is returned by UncompressBlock, CompressBlock or CompressBlockHC when - // the supplied buffer for [de]compression is too small. - ErrShortBuffer = errors.New("lz4: short buffer") + // ErrInvalidSourceShortBuffer is returned by UncompressBlock or CompressBLock when a compressed + // block is corrupted or the destination buffer is not large enough for the uncompressed data. + ErrInvalidSourceShortBuffer = errors.New("lz4: invalid source or destination buffer too short") + // ErrInvalid is returned when reading an invalid LZ4 archive. + ErrInvalid = errors.New("lz4: bad magic number") ) +// blockHash hashes 4 bytes into a value < winSize. +func blockHash(x uint32) uint32 { + const hasher uint32 = 2654435761 // Knuth multiplicative hash. + return x * hasher >> hashShift +} + // CompressBlockBound returns the maximum size of a given buffer of size n, when not compressible. func CompressBlockBound(n int) int { return n + n/255 + 16 } -// UncompressBlock decompresses the source buffer into the destination one, -// starting at the di index and returning the decompressed size. +// UncompressBlock uncompresses the source buffer into the destination one, +// and returns the uncompressed size. // // The destination buffer must be sized appropriately. // // An error is returned if the source data is invalid or the destination buffer is too small. -func UncompressBlock(src, dst []byte, di int) (int, error) { - si, sn, di0 := 0, len(src), di +func UncompressBlock(src, dst []byte) (si int, err error) { + defer func() { + // It is now faster to let the runtime panic and recover on out of bound slice access + // than checking indices as we go along. + if recover() != nil { + err = ErrInvalidSourceShortBuffer + } + }() + sn := len(src) if sn == 0 { return 0, nil } + var di int for { - // literals and match lengths (token) - lLen := int(src[si] >> 4) - mLen := int(src[si] & 0xF) - if si++; si == sn { - return di, ErrInvalidSource - } + // Literals and match lengths (token). + b := int(src[si]) + si++ - // literals - if lLen > 0 { + // Literals. + if lLen := b >> 4; lLen > 0 { if lLen == 0xF { for src[si] == 0xFF { lLen += 0xFF - if si++; si == sn { - return di - di0, ErrInvalidSource - } + si++ } lLen += int(src[si]) - if si++; si == sn { - return di - di0, ErrInvalidSource - } + si++ } - if len(dst)-di < lLen || si+lLen > sn { - return di - di0, ErrShortBuffer - } - di += copy(dst[di:], src[si:si+lLen]) + i := si + si += lLen + di += copy(dst[di:], src[i:si]) - if si += lLen; si >= sn { - return di - di0, nil + if si >= sn { + return di, nil } } - if si += 2; si >= sn { - return di, ErrInvalidSource - } - offset := int(src[si-2]) | int(src[si-1])<<8 - if di-offset < 0 || offset == 0 { - return di - di0, ErrInvalidSource - } + si++ + _ = src[si] // Bound check elimination. + offset := int(src[si-1]) | int(src[si])<<8 + si++ - // match + // Match. + mLen := b & 0xF if mLen == 0xF { for src[si] == 0xFF { mLen += 0xFF - if si++; si == sn { - return di - di0, ErrInvalidSource - } + si++ } mLen += int(src[si]) - if si++; si == sn { - return di - di0, ErrInvalidSource - } - } - // minimum match length is 4 - mLen += 4 - if len(dst)-di <= mLen { - return di - di0, ErrShortBuffer + si++ } + mLen += minMatch - // copy the match (NB. match is at least 4 bytes long) - // NB. past di, copy() would write old bytes instead of - // the ones we just copied, so split the work into the largest chunk. - for ; mLen >= offset; mLen -= offset { - di += copy(dst[di:], dst[di-offset:di]) + // Copy the match. + i := di - offset + if offset > 0 && mLen >= offset { + // Efficiently copy the match dst[di-offset:di] into the dst slice. + bytesToCopy := offset * (mLen / offset) + expanded := dst[i:] + for n := offset; n <= bytesToCopy+offset; n *= 2 { + copy(expanded[n:], expanded[:n]) + } + di += bytesToCopy + mLen -= bytesToCopy } - di += copy(dst[di:], dst[di-offset:di-offset+mLen]) + di += copy(dst[di:], dst[i:i+mLen]) } } -// CompressBlock compresses the source buffer starting at soffet into the destination one. +// CompressBlock compresses the source buffer into the destination one. // This is the fast version of LZ4 compression and also the default one. +// The size of hashTable must be at least 64Kb. // // The size of the compressed data is returned. If it is 0 and no error, then the data is incompressible. // // An error is returned if the destination buffer is too small. -func CompressBlock(src, dst []byte, soffset int) (int, error) { +func CompressBlock(src, dst []byte, hashTable []int) (di int, err error) { + defer func() { + if recover() != nil { + err = ErrInvalidSourceShortBuffer + } + }() + sn, dn := len(src)-mfLimit, len(dst) - if sn <= 0 || dn == 0 || soffset >= sn { + if sn <= 0 || dn == 0 { return 0, nil } - var si, di int + var si int - // fast scan strategy: - // we only need a hash table to store the last sequences (4 bytes) - var hashTable [1 << hashLog]int - var hashShift = uint((minMatch * 8) - hashLog) + // Fast scan strategy: the hash table only stores the last 4 bytes sequences. + // const accInit = 1 << skipStrength - // Initialise the hash table with the first 64Kb of the input buffer - // (used when compressing dependent blocks) - for si < soffset { - h := binary.LittleEndian.Uint32(src[si:]) * hasher >> hashShift - si++ + anchor := si // Position of the current literals. + // acc := accInit // Variable step: improves performance on non-compressible data. + + for si < sn { + // Hash the next 4 bytes (sequence)... + match := binary.LittleEndian.Uint32(src[si:]) + h := blockHash(match) + + ref := hashTable[h] hashTable[h] = si - } - - anchor := si - fma := 1 << skipStrength - for si < sn-minMatch { - // hash the next 4 bytes (sequence)... - h := binary.LittleEndian.Uint32(src[si:]) * hasher >> hashShift - // -1 to separate existing entries from new ones - ref := hashTable[h] - 1 - // ...and store the position of the hash in the hash table (+1 to compensate the -1 upon saving) - hashTable[h] = si + 1 - // no need to check the last 3 bytes in the first literal 4 bytes as - // this guarantees that the next match, if any, is compressed with - // a lower size, since to have some compression we must have: - // ll+ml-overlap > 1 + (ll-15)/255 + (ml-4-15)/255 + 2 (uncompressed size>compressed size) - // => ll+ml>3+2*overlap => ll+ml>= 4+2*overlap - // and by definition we do have: - // ll >= 1, ml >= 4 - // => ll+ml >= 5 - // => so overlap must be 0 - - // the sequence is new, out of bound (64kb) or not valid: try next sequence - if ref < 0 || fma&(1<>winSizeLog > 0 || - src[ref] != src[si] || - src[ref+1] != src[si+1] || - src[ref+2] != src[si+2] || - src[ref+3] != src[si+3] { - // variable step: improves performance on non-compressible data - si += fma >> skipStrength - fma++ + if ref >= sn { // Invalid reference (dirty hashtable). + si++ continue } - // match found - fma = 1 << skipStrength - lLen := si - anchor offset := si - ref + if offset <= 0 || offset >= winSize || // Out of window. + match != binary.LittleEndian.Uint32(src[ref:]) { // Hash collision on different matches. + // si += acc >> skipStrength + // acc++ + si++ + continue + } - // encode match length part 1 + // Match found. + // acc = accInit + lLen := si - anchor // Literal length. + + // Encode match length part 1. si += minMatch - mLen := si // match length has minMatch already - for si <= sn && src[si] == src[si-offset] { + mLen := si // Match length has minMatch already. + // Find the longest match, first looking by batches of 8 bytes. + for si < sn && binary.LittleEndian.Uint64(src[si:]) == binary.LittleEndian.Uint64(src[si-offset:]) { + si += 8 + } + // Then byte by byte. + for si < sn && src[si] == src[si-offset] { si++ } + mLen = si - mLen if mLen < 0xF { dst[di] = byte(mLen) @@ -185,169 +170,160 @@ func CompressBlock(src, dst []byte, soffset int) (int, error) { dst[di] = 0xF } - // encode literals length + // Encode literals length. if lLen < 0xF { dst[di] |= byte(lLen << 4) } else { dst[di] |= 0xF0 - if di++; di == dn { - return di, ErrShortBuffer - } + di++ l := lLen - 0xF for ; l >= 0xFF; l -= 0xFF { dst[di] = 0xFF - if di++; di == dn { - return di, ErrShortBuffer - } + di++ } dst[di] = byte(l) } - if di++; di == dn { - return di, ErrShortBuffer - } + di++ - // literals - if di+lLen >= dn { - return di, ErrShortBuffer - } - di += copy(dst[di:], src[anchor:anchor+lLen]) + // Literals. + copy(dst[di:], src[anchor:anchor+lLen]) + di += lLen + 2 anchor = si - // encode offset - if di += 2; di >= dn { - return di, ErrShortBuffer - } + // Encode offset. + _ = dst[di] // Bound check elimination. dst[di-2], dst[di-1] = byte(offset), byte(offset>>8) - // encode match length part 2 + // Encode match length part 2. if mLen >= 0xF { for mLen -= 0xF; mLen >= 0xFF; mLen -= 0xFF { dst[di] = 0xFF - if di++; di == dn { - return di, ErrShortBuffer - } + di++ } dst[di] = byte(mLen) - if di++; di == dn { - return di, ErrShortBuffer - } + di++ } } if anchor == 0 { - // incompressible + // Incompressible. return 0, nil } - // last literals + // Last literals. lLen := len(src) - anchor if lLen < 0xF { dst[di] = byte(lLen << 4) } else { dst[di] = 0xF0 - if di++; di == dn { - return di, ErrShortBuffer - } - lLen -= 0xF - for ; lLen >= 0xFF; lLen -= 0xFF { + di++ + for lLen -= 0xF; lLen >= 0xFF; lLen -= 0xFF { dst[di] = 0xFF - if di++; di == dn { - return di, ErrShortBuffer - } + di++ } dst[di] = byte(lLen) } - if di++; di == dn { - return di, ErrShortBuffer - } + di++ - // write literals - src = src[anchor:] - switch n := di + len(src); { - case n > dn: - return di, ErrShortBuffer - case n >= sn: - // incompressible + // Write the last literals. + if di >= anchor { + // Incompressible. return 0, nil } - di += copy(dst[di:], src) + di += copy(dst[di:], src[anchor:]) return di, nil } -// CompressBlockHC compresses the source buffer starting at soffet into the destination one. +// CompressBlockHC compresses the source buffer src into the destination dst +// with max search depth (use 0 or negative value for no max). +// // CompressBlockHC compression ratio is better than CompressBlock but it is also slower. // // The size of the compressed data is returned. If it is 0 and no error, then the data is not compressible. // // An error is returned if the destination buffer is too small. -func CompressBlockHC(src, dst []byte, soffset int) (int, error) { +func CompressBlockHC(src, dst []byte, depth int) (di int, err error) { + defer func() { + if recover() != nil { + err = ErrInvalidSourceShortBuffer + } + }() + sn, dn := len(src)-mfLimit, len(dst) - if sn <= 0 || dn == 0 || soffset >= sn { + if sn <= 0 || dn == 0 { return 0, nil } - var si, di int + var si int - // Hash Chain strategy: - // we need a hash table and a chain table - // the chain table cannot contain more entries than the window size (64Kb entries) - var hashTable [1 << hashLog]int - var chainTable [winSize]int - var hashShift = uint((minMatch * 8) - hashLog) + // hashTable: stores the last position found for a given hash + // chaingTable: stores previous positions for a given hash + var hashTable, chainTable [winSize]int - // Initialise the hash table with the first 64Kb of the input buffer - // (used when compressing dependent blocks) - for si < soffset { - h := binary.LittleEndian.Uint32(src[si:]) * hasher >> hashShift - chainTable[si&winMask] = hashTable[h] - si++ - hashTable[h] = si + if depth <= 0 { + depth = winSize } anchor := si - for si < sn-minMatch { - // hash the next 4 bytes (sequence)... - h := binary.LittleEndian.Uint32(src[si:]) * hasher >> hashShift + for si < sn { + // Hash the next 4 bytes (sequence). + match := binary.LittleEndian.Uint32(src[si:]) + h := blockHash(match) - // follow the chain until out of window and give the longest match + // Follow the chain until out of window and give the longest match. mLen := 0 offset := 0 - for next := hashTable[h] - 1; next > 0 && next > si-winSize; next = chainTable[next&winMask] - 1 { - // the first (mLen==0) or next byte (mLen>=minMatch) at current match length must match to improve on the match length - if src[next+mLen] == src[si+mLen] { - for ml := 0; ; ml++ { - if src[next+ml] != src[si+ml] || si+ml > sn { - // found a longer match, keep its position and length - if mLen < ml && ml >= minMatch { - mLen = ml - offset = si - next - } - break - } - } + for next, try := hashTable[h], depth; try > 0 && next > 0 && si-next < winSize; next = chainTable[next&winMask] { + // The first (mLen==0) or next byte (mLen>=minMatch) at current match length + // must match to improve on the match length. + if src[next+mLen] != src[si+mLen] { + continue } + ml := 0 + // Compare the current position with a previous with the same hash. + for ml < sn-si && binary.LittleEndian.Uint64(src[next+ml:]) == binary.LittleEndian.Uint64(src[si+ml:]) { + ml += 8 + } + for ml < sn-si && src[next+ml] == src[si+ml] { + ml++ + } + if ml+1 < minMatch || ml <= mLen { + // Match too small (> hashShift + // Match found. + // Update hash/chain tables with overlapping bytes: + // si already hashed, add everything from si+1 up to the match length. + winStart := si + 1 + if ws := si + mLen - winSize; ws > winStart { + winStart = ws + } + for si, ml := winStart, si+mLen; si < ml; { + match >>= 8 + match |= uint32(src[si+3]) << 24 + h := blockHash(match) chainTable[si&winMask] = hashTable[h] - si++ hashTable[h] = si + si++ } lLen := si - anchor si += mLen - mLen -= minMatch // match length does not include minMatch + mLen -= minMatch // Match length does not include minMatch. if mLen < 0xF { dst[di] = byte(mLen) @@ -355,91 +331,67 @@ func CompressBlockHC(src, dst []byte, soffset int) (int, error) { dst[di] = 0xF } - // encode literals length + // Encode literals length. if lLen < 0xF { dst[di] |= byte(lLen << 4) } else { dst[di] |= 0xF0 - if di++; di == dn { - return di, ErrShortBuffer - } + di++ l := lLen - 0xF for ; l >= 0xFF; l -= 0xFF { dst[di] = 0xFF - if di++; di == dn { - return di, ErrShortBuffer - } + di++ } dst[di] = byte(l) } - if di++; di == dn { - return di, ErrShortBuffer - } + di++ - // literals - if di+lLen >= dn { - return di, ErrShortBuffer - } - di += copy(dst[di:], src[anchor:anchor+lLen]) + // Literals. + copy(dst[di:], src[anchor:anchor+lLen]) + di += lLen anchor = si - // encode offset - if di += 2; di >= dn { - return di, ErrShortBuffer - } + // Encode offset. + di += 2 dst[di-2], dst[di-1] = byte(offset), byte(offset>>8) - // encode match length part 2 + // Encode match length part 2. if mLen >= 0xF { for mLen -= 0xF; mLen >= 0xFF; mLen -= 0xFF { dst[di] = 0xFF - if di++; di == dn { - return di, ErrShortBuffer - } + di++ } dst[di] = byte(mLen) - if di++; di == dn { - return di, ErrShortBuffer - } + di++ } } if anchor == 0 { - // incompressible + // Incompressible. return 0, nil } - // last literals + // Last literals. lLen := len(src) - anchor if lLen < 0xF { dst[di] = byte(lLen << 4) } else { dst[di] = 0xF0 - if di++; di == dn { - return di, ErrShortBuffer - } + di++ lLen -= 0xF for ; lLen >= 0xFF; lLen -= 0xFF { dst[di] = 0xFF - if di++; di == dn { - return di, ErrShortBuffer - } + di++ } dst[di] = byte(lLen) } - if di++; di == dn { - return di, ErrShortBuffer - } + di++ - // write literals - src = src[anchor:] - switch n := di + len(src); { - case n > dn: - return di, ErrShortBuffer - case n >= sn: - // incompressible + // Write the last literals. + if di >= anchor { + // Incompressible. return 0, nil } - di += copy(dst[di:], src) + di += copy(dst[di:], src[anchor:]) return di, nil } diff --git a/vendor/github.com/pierrec/lz4/debug.go b/vendor/github.com/pierrec/lz4/debug.go new file mode 100644 index 000000000..bc5e78d40 --- /dev/null +++ b/vendor/github.com/pierrec/lz4/debug.go @@ -0,0 +1,23 @@ +// +build lz4debug + +package lz4 + +import ( + "fmt" + "os" + "path/filepath" + "runtime" +) + +const debugFlag = true + +func debug(args ...interface{}) { + _, file, line, _ := runtime.Caller(1) + file = filepath.Base(file) + + f := fmt.Sprintf("LZ4: %s:%d %s", file, line, args[0]) + if f[len(f)-1] != '\n' { + f += "\n" + } + fmt.Fprintf(os.Stderr, f, args[1:]...) +} diff --git a/vendor/github.com/pierrec/lz4/debug_stub.go b/vendor/github.com/pierrec/lz4/debug_stub.go new file mode 100644 index 000000000..44211ad96 --- /dev/null +++ b/vendor/github.com/pierrec/lz4/debug_stub.go @@ -0,0 +1,7 @@ +// +build !lz4debug + +package lz4 + +const debugFlag = false + +func debug(args ...interface{}) {} diff --git a/vendor/github.com/pierrec/lz4/internal/xxh32/xxh32zero.go b/vendor/github.com/pierrec/lz4/internal/xxh32/xxh32zero.go new file mode 100644 index 000000000..850a6fdf6 --- /dev/null +++ b/vendor/github.com/pierrec/lz4/internal/xxh32/xxh32zero.go @@ -0,0 +1,222 @@ +// Package xxh32 implements the very fast XXH hashing algorithm (32 bits version). +// (https://github.com/Cyan4973/XXH/) +package xxh32 + +import ( + "encoding/binary" +) + +const ( + prime32_1 uint32 = 2654435761 + prime32_2 uint32 = 2246822519 + prime32_3 uint32 = 3266489917 + prime32_4 uint32 = 668265263 + prime32_5 uint32 = 374761393 + + prime32_1plus2 uint32 = 606290984 + prime32_minus1 uint32 = 1640531535 +) + +// XXHZero represents an xxhash32 object with seed 0. +type XXHZero struct { + v1 uint32 + v2 uint32 + v3 uint32 + v4 uint32 + totalLen uint64 + buf [16]byte + bufused int +} + +// Sum appends the current hash to b and returns the resulting slice. +// It does not change the underlying hash state. +func (xxh XXHZero) Sum(b []byte) []byte { + h32 := xxh.Sum32() + return append(b, byte(h32), byte(h32>>8), byte(h32>>16), byte(h32>>24)) +} + +// Reset resets the Hash to its initial state. +func (xxh *XXHZero) Reset() { + xxh.v1 = prime32_1plus2 + xxh.v2 = prime32_2 + xxh.v3 = 0 + xxh.v4 = prime32_minus1 + xxh.totalLen = 0 + xxh.bufused = 0 +} + +// Size returns the number of bytes returned by Sum(). +func (xxh *XXHZero) Size() int { + return 4 +} + +// BlockSize gives the minimum number of bytes accepted by Write(). +func (xxh *XXHZero) BlockSize() int { + return 1 +} + +// Write adds input bytes to the Hash. +// It never returns an error. +func (xxh *XXHZero) Write(input []byte) (int, error) { + if xxh.totalLen == 0 { + xxh.Reset() + } + n := len(input) + m := xxh.bufused + + xxh.totalLen += uint64(n) + + r := len(xxh.buf) - m + if n < r { + copy(xxh.buf[m:], input) + xxh.bufused += len(input) + return n, nil + } + + p := 0 + // Causes compiler to work directly from registers instead of stack: + v1, v2, v3, v4 := xxh.v1, xxh.v2, xxh.v3, xxh.v4 + if m > 0 { + // some data left from previous update + copy(xxh.buf[xxh.bufused:], input[:r]) + xxh.bufused += len(input) - r + + // fast rotl(13) + buf := xxh.buf[:16] // BCE hint. + v1 = rol13(v1+binary.LittleEndian.Uint32(buf[:])*prime32_2) * prime32_1 + v2 = rol13(v2+binary.LittleEndian.Uint32(buf[4:])*prime32_2) * prime32_1 + v3 = rol13(v3+binary.LittleEndian.Uint32(buf[8:])*prime32_2) * prime32_1 + v4 = rol13(v4+binary.LittleEndian.Uint32(buf[12:])*prime32_2) * prime32_1 + p = r + xxh.bufused = 0 + } + + for n := n - 16; p <= n; p += 16 { + sub := input[p:][:16] //BCE hint for compiler + v1 = rol13(v1+binary.LittleEndian.Uint32(sub[:])*prime32_2) * prime32_1 + v2 = rol13(v2+binary.LittleEndian.Uint32(sub[4:])*prime32_2) * prime32_1 + v3 = rol13(v3+binary.LittleEndian.Uint32(sub[8:])*prime32_2) * prime32_1 + v4 = rol13(v4+binary.LittleEndian.Uint32(sub[12:])*prime32_2) * prime32_1 + } + xxh.v1, xxh.v2, xxh.v3, xxh.v4 = v1, v2, v3, v4 + + copy(xxh.buf[xxh.bufused:], input[p:]) + xxh.bufused += len(input) - p + + return n, nil +} + +// Sum32 returns the 32 bits Hash value. +func (xxh *XXHZero) Sum32() uint32 { + h32 := uint32(xxh.totalLen) + if h32 >= 16 { + h32 += rol1(xxh.v1) + rol7(xxh.v2) + rol12(xxh.v3) + rol18(xxh.v4) + } else { + h32 += prime32_5 + } + + p := 0 + n := xxh.bufused + buf := xxh.buf + for n := n - 4; p <= n; p += 4 { + h32 += binary.LittleEndian.Uint32(buf[p:p+4]) * prime32_3 + h32 = rol17(h32) * prime32_4 + } + for ; p < n; p++ { + h32 += uint32(buf[p]) * prime32_5 + h32 = rol11(h32) * prime32_1 + } + + h32 ^= h32 >> 15 + h32 *= prime32_2 + h32 ^= h32 >> 13 + h32 *= prime32_3 + h32 ^= h32 >> 16 + + return h32 +} + +// ChecksumZero returns the 32bits Hash value. +func ChecksumZero(input []byte) uint32 { + n := len(input) + h32 := uint32(n) + + if n < 16 { + h32 += prime32_5 + } else { + v1 := prime32_1plus2 + v2 := prime32_2 + v3 := uint32(0) + v4 := prime32_minus1 + p := 0 + for n := n - 16; p <= n; p += 16 { + sub := input[p:][:16] //BCE hint for compiler + v1 = rol13(v1+binary.LittleEndian.Uint32(sub[:])*prime32_2) * prime32_1 + v2 = rol13(v2+binary.LittleEndian.Uint32(sub[4:])*prime32_2) * prime32_1 + v3 = rol13(v3+binary.LittleEndian.Uint32(sub[8:])*prime32_2) * prime32_1 + v4 = rol13(v4+binary.LittleEndian.Uint32(sub[12:])*prime32_2) * prime32_1 + } + input = input[p:] + n -= p + h32 += rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4) + } + + p := 0 + for n := n - 4; p <= n; p += 4 { + h32 += binary.LittleEndian.Uint32(input[p:p+4]) * prime32_3 + h32 = rol17(h32) * prime32_4 + } + for p < n { + h32 += uint32(input[p]) * prime32_5 + h32 = rol11(h32) * prime32_1 + p++ + } + + h32 ^= h32 >> 15 + h32 *= prime32_2 + h32 ^= h32 >> 13 + h32 *= prime32_3 + h32 ^= h32 >> 16 + + return h32 +} + +// Uint32Zero hashes x with seed 0. +func Uint32Zero(x uint32) uint32 { + h := prime32_5 + 4 + x*prime32_3 + h = rol17(h) * prime32_4 + h ^= h >> 15 + h *= prime32_2 + h ^= h >> 13 + h *= prime32_3 + h ^= h >> 16 + return h +} + +func rol1(u uint32) uint32 { + return u<<1 | u>>31 +} + +func rol7(u uint32) uint32 { + return u<<7 | u>>25 +} + +func rol11(u uint32) uint32 { + return u<<11 | u>>21 +} + +func rol12(u uint32) uint32 { + return u<<12 | u>>20 +} + +func rol13(u uint32) uint32 { + return u<<13 | u>>19 +} + +func rol17(u uint32) uint32 { + return u<<17 | u>>15 +} + +func rol18(u uint32) uint32 { + return u<<18 | u>>14 +} diff --git a/vendor/github.com/pierrec/lz4/lz4.go b/vendor/github.com/pierrec/lz4/lz4.go index bda675c78..35802756c 100644 --- a/vendor/github.com/pierrec/lz4/lz4.go +++ b/vendor/github.com/pierrec/lz4/lz4.go @@ -1,13 +1,5 @@ // Package lz4 implements reading and writing lz4 compressed data (a frame), -// as specified in http://fastcompression.blogspot.fr/2013/04/lz4-streaming-format-final.html, -// using an io.Reader (decompression) and io.Writer (compression). -// It is designed to minimize memory usage while maximizing throughput by being able to -// [de]compress data concurrently. -// -// The Reader and the Writer support concurrent processing provided the supplied buffers are -// large enough (in multiples of BlockMaxSize) and there is no block dependency. -// Reader.WriteTo and Writer.ReadFrom do leverage the concurrency transparently. -// The runtime.GOMAXPROCS() value is used to apply concurrency or not. +// as specified in http://fastcompression.blogspot.fr/2013/04/lz4-streaming-format-final.html. // // Although the block level compression and decompression functions are exposed and are fully compatible // with the lz4 block format definition, they are low level and should not be used directly. @@ -15,46 +7,43 @@ // http://fastcompression.blogspot.fr/2011/05/lz4-explained.html // // See https://github.com/Cyan4973/lz4 for the reference C implementation. +// package lz4 -import ( - "hash" - "sync" - - "github.com/pierrec/xxHash/xxHash32" -) - const ( // Extension is the LZ4 frame file name extension Extension = ".lz4" // Version is the LZ4 frame format version Version = 1 - frameMagic = uint32(0x184D2204) - frameSkipMagic = uint32(0x184D2A50) + frameMagic uint32 = 0x184D2204 + frameSkipMagic uint32 = 0x184D2A50 // The following constants are used to setup the compression algorithm. - minMatch = 4 // the minimum size of the match sequence size (4 bytes) - winSizeLog = 16 // LZ4 64Kb window size limit - winSize = 1 << winSizeLog - winMask = winSize - 1 // 64Kb window of previous data for dependent blocks + minMatch = 4 // the minimum size of the match sequence size (4 bytes) + winSizeLog = 16 // LZ4 64Kb window size limit + winSize = 1 << winSizeLog + winMask = winSize - 1 // 64Kb window of previous data for dependent blocks + compressedBlockFlag = 1 << 31 + compressedBlockMask = compressedBlockFlag - 1 // hashLog determines the size of the hash table used to quickly find a previous match position. // Its value influences the compression speed and memory usage, the lower the faster, // but at the expense of the compression ratio. // 16 seems to be the best compromise. - hashLog = 16 - hashShift = uint((minMatch * 8) - hashLog) + hashLog = 16 + hashTableSize = 1 << hashLog + hashShift = uint((minMatch * 8) - hashLog) mfLimit = 8 + minMatch // The last match cannot start within the last 12 bytes. skipStrength = 6 // variable step for fast scan - - hasher = uint32(2654435761) // prime number used to hash minMatch ) // map the block max size id with its value in bytes: 64Kb, 256Kb, 1Mb and 4Mb. -var bsMapID = map[byte]int{4: 64 << 10, 5: 256 << 10, 6: 1 << 20, 7: 4 << 20} -var bsMapValue = map[int]byte{} +var ( + bsMapID = map[byte]int{4: 64 << 10, 5: 256 << 10, 6: 1 << 20, 7: 4 << 20} + bsMapValue = make(map[int]byte, len(bsMapID)) +) // Reversed. func init() { @@ -64,41 +53,16 @@ func init() { } // Header describes the various flags that can be set on a Writer or obtained from a Reader. -// The default values match those of the LZ4 frame format definition (http://fastcompression.blogspot.com/2013/04/lz4-streaming-format-final.html). +// The default values match those of the LZ4 frame format definition +// (http://fastcompression.blogspot.com/2013/04/lz4-streaming-format-final.html). // // NB. in a Reader, in case of concatenated frames, the Header values may change between Read() calls. -// It is the caller responsibility to check them if necessary (typically when using the Reader concurrency). +// It is the caller responsibility to check them if necessary. type Header struct { - BlockDependency bool // compressed blocks are dependent (one block depends on the last 64Kb of the previous one) - BlockChecksum bool // compressed blocks are checksumed - NoChecksum bool // frame checksum - BlockMaxSize int // the size of the decompressed data block (one of [64KB, 256KB, 1MB, 4MB]). Default=4MB. - Size uint64 // the frame total size. It is _not_ computed by the Writer. - HighCompression bool // use high compression (only for the Writer) - done bool // whether the descriptor was processed (Read or Write and checked) - // Removed as not supported - // Dict bool // a dictionary id is to be used - // DictID uint32 // the dictionary id read from the frame, if any. -} - -// xxhPool wraps the standard pool for xxHash items. -// Putting items back in the pool automatically resets them. -type xxhPool struct { - sync.Pool -} - -func (p *xxhPool) Get() hash.Hash32 { - return p.Pool.Get().(hash.Hash32) -} - -func (p *xxhPool) Put(h hash.Hash32) { - h.Reset() - p.Pool.Put(h) -} - -// hashPool is used by readers and writers and contains xxHash items. -var hashPool = xxhPool{ - Pool: sync.Pool{ - New: func() interface{} { return xxHash32.New(0) }, - }, + BlockChecksum bool // Compressed blocks checksum flag. + NoChecksum bool // Frame checksum flag. + BlockMaxSize int // Size of the uncompressed data block (one of [64KB, 256KB, 1MB, 4MB]). Default=4MB. + Size uint64 // Frame total size. It is _not_ computed by the Writer. + CompressionLevel int // Compression level (higher is better, use 0 for fastest compression). + done bool // Header processed flag (Read or Write and checked). } diff --git a/vendor/github.com/pierrec/lz4/lz4_go1.10.go b/vendor/github.com/pierrec/lz4/lz4_go1.10.go new file mode 100644 index 000000000..9a0fb0070 --- /dev/null +++ b/vendor/github.com/pierrec/lz4/lz4_go1.10.go @@ -0,0 +1,29 @@ +//+build go1.10 + +package lz4 + +import ( + "fmt" + "strings" +) + +func (h Header) String() string { + var s strings.Builder + + s.WriteString(fmt.Sprintf("%T{", h)) + if h.BlockChecksum { + s.WriteString("BlockChecksum: true ") + } + if h.NoChecksum { + s.WriteString("NoChecksum: true ") + } + if bs := h.BlockMaxSize; bs != 0 && bs != 4<<20 { + s.WriteString(fmt.Sprintf("BlockMaxSize: %d ", bs)) + } + if l := h.CompressionLevel; l != 0 { + s.WriteString(fmt.Sprintf("CompressionLevel: %d ", l)) + } + s.WriteByte('}') + + return s.String() +} diff --git a/vendor/github.com/pierrec/lz4/lz4_notgo1.10.go b/vendor/github.com/pierrec/lz4/lz4_notgo1.10.go new file mode 100644 index 000000000..12c761a2e --- /dev/null +++ b/vendor/github.com/pierrec/lz4/lz4_notgo1.10.go @@ -0,0 +1,29 @@ +//+build !go1.10 + +package lz4 + +import ( + "bytes" + "fmt" +) + +func (h Header) String() string { + var s bytes.Buffer + + s.WriteString(fmt.Sprintf("%T{", h)) + if h.BlockChecksum { + s.WriteString("BlockChecksum: true ") + } + if h.NoChecksum { + s.WriteString("NoChecksum: true ") + } + if bs := h.BlockMaxSize; bs != 0 && bs != 4<<20 { + s.WriteString(fmt.Sprintf("BlockMaxSize: %d ", bs)) + } + if l := h.CompressionLevel; l != 0 { + s.WriteString(fmt.Sprintf("CompressionLevel: %d ", l)) + } + s.WriteByte('}') + + return s.String() +} diff --git a/vendor/github.com/pierrec/lz4/reader.go b/vendor/github.com/pierrec/lz4/reader.go index 9f7fd6042..f08db47df 100644 --- a/vendor/github.com/pierrec/lz4/reader.go +++ b/vendor/github.com/pierrec/lz4/reader.go @@ -2,44 +2,33 @@ package lz4 import ( "encoding/binary" - "errors" "fmt" - "hash" "io" "io/ioutil" - "runtime" - "sync" - "sync/atomic" + + "github.com/pierrec/lz4/internal/xxh32" ) -// ErrInvalid is returned when the data being read is not an LZ4 archive -// (LZ4 magic number detection failed). -var ErrInvalid = errors.New("invalid lz4 data") - -// errEndOfBlock is returned by readBlock when it has reached the last block of the frame. -// It is not an error. -var errEndOfBlock = errors.New("end of block") - // Reader implements the LZ4 frame decoder. // The Header is set after the first call to Read(). // The Header may change between Read() calls in case of concatenated frames. type Reader struct { - Pos int64 // position within the source Header - src io.Reader - checksum hash.Hash32 // frame hash - wg sync.WaitGroup // decompressing go routine wait group - data []byte // buffered decompressed data - window []byte // 64Kb decompressed data window + + buf [8]byte // Scrap buffer. + pos int64 // Current position in src. + src io.Reader // Source. + zdata []byte // Compressed data. + data []byte // Uncompressed data. + idx int // Index of unread bytes into data. + checksum xxh32.XXHZero // Frame hash. } // NewReader returns a new LZ4 frame decoder. // No access to the underlying io.Reader is performed. func NewReader(src io.Reader) *Reader { - return &Reader{ - src: src, - checksum: hashPool.Get(), - } + r := &Reader{src: src} + return r } // readHeader checks the frame magic number and parses the frame descriptoz. @@ -48,88 +37,95 @@ func NewReader(src io.Reader) *Reader { func (z *Reader) readHeader(first bool) error { defer z.checksum.Reset() + buf := z.buf[:] for { - var magic uint32 - if err := binary.Read(z.src, binary.LittleEndian, &magic); err != nil { + magic, err := z.readUint32() + if err != nil { + z.pos += 4 if !first && err == io.ErrUnexpectedEOF { return io.EOF } return err } - z.Pos += 4 - if magic>>8 == frameSkipMagic>>8 { - var skipSize uint32 - if err := binary.Read(z.src, binary.LittleEndian, &skipSize); err != nil { - return err - } - z.Pos += 4 - m, err := io.CopyN(ioutil.Discard, z.src, int64(skipSize)) - z.Pos += m - if err != nil { - return err - } - continue + if magic == frameMagic { + break } - if magic != frameMagic { + if magic>>8 != frameSkipMagic>>8 { return ErrInvalid } - break + skipSize, err := z.readUint32() + if err != nil { + return err + } + z.pos += 4 + m, err := io.CopyN(ioutil.Discard, z.src, int64(skipSize)) + if err != nil { + return err + } + z.pos += m } - // header - var buf [8]byte + // Header. if _, err := io.ReadFull(z.src, buf[:2]); err != nil { return err } - z.Pos += 2 + z.pos += 8 b := buf[0] - if b>>6 != Version { - return fmt.Errorf("lz4.Read: invalid version: got %d expected %d", b>>6, Version) + if v := b >> 6; v != Version { + return fmt.Errorf("lz4: invalid version: got %d; expected %d", v, Version) + } + if b>>5&1 == 0 { + return fmt.Errorf("lz4: block dependency not supported") } - z.BlockDependency = b>>5&1 == 0 z.BlockChecksum = b>>4&1 > 0 frameSize := b>>3&1 > 0 z.NoChecksum = b>>2&1 == 0 - // z.Dict = b&1 > 0 bmsID := buf[1] >> 4 & 0x7 bSize, ok := bsMapID[bmsID] if !ok { - return fmt.Errorf("lz4.Read: invalid block max size: %d", bmsID) + return fmt.Errorf("lz4: invalid block max size ID: %d", bmsID) } z.BlockMaxSize = bSize + // Allocate the compressed/uncompressed buffers. + // The compressed buffer cannot exceed the uncompressed one. + if n := 2 * bSize; cap(z.zdata) < n { + z.zdata = make([]byte, n, n) + } + if debugFlag { + debug("header block max size id=%d size=%d", bmsID, bSize) + } + z.zdata = z.zdata[:bSize] + z.data = z.zdata[:cap(z.zdata)][bSize:] + z.idx = len(z.data) + z.checksum.Write(buf[0:2]) if frameSize { - if err := binary.Read(z.src, binary.LittleEndian, &z.Size); err != nil { + buf := buf[:8] + if _, err := io.ReadFull(z.src, buf); err != nil { return err } - z.Pos += 8 - binary.LittleEndian.PutUint64(buf[:], z.Size) - z.checksum.Write(buf[0:8]) + z.Size = binary.LittleEndian.Uint64(buf) + z.pos += 8 + z.checksum.Write(buf) } - // if z.Dict { - // if err := binary.Read(z.src, binary.LittleEndian, &z.DictID); err != nil { - // return err - // } - // z.Pos += 4 - // binary.LittleEndian.PutUint32(buf[:], z.DictID) - // z.checksum.Write(buf[0:4]) - // } - - // header checksum + // Header checksum. if _, err := io.ReadFull(z.src, buf[:1]); err != nil { return err } - z.Pos++ + z.pos++ if h := byte(z.checksum.Sum32() >> 8 & 0xFF); h != buf[0] { - return fmt.Errorf("lz4.Read: invalid header checksum: got %v expected %v", buf[0], h) + return fmt.Errorf("lz4: invalid header checksum: got %x; expected %x", buf[0], h) } z.Header.done = true + if debugFlag { + debug("header read: %v", z.Header) + } return nil } @@ -139,177 +135,141 @@ func (z *Reader) readHeader(first bool) error { // Since there can be multiple streams concatenated, Header values may // change between calls to Read(). If that is the case, no data is actually read from // the underlying io.Reader, to allow for potential input buffer resizing. -// -// Data is buffered if the input buffer is too small, and exhausted upon successive calls. -// -// If the buffer is large enough (typically in multiples of BlockMaxSize) and there is -// no block dependency, then the data will be decompressed concurrently based on the GOMAXPROCS value. -func (z *Reader) Read(buf []byte) (n int, err error) { +func (z *Reader) Read(buf []byte) (int, error) { + if debugFlag { + debug("Read buf len=%d", len(buf)) + } if !z.Header.done { - if err = z.readHeader(true); err != nil { - return + if err := z.readHeader(true); err != nil { + return 0, err + } + if debugFlag { + debug("header read OK compressed buffer %d / %d uncompressed buffer %d : %d index=%d", + len(z.zdata), cap(z.zdata), len(z.data), cap(z.data), z.idx) } } if len(buf) == 0 { - return + return 0, nil } - // exhaust remaining data from previous Read() - if len(z.data) > 0 { - n = copy(buf, z.data) - z.data = z.data[n:] - if len(z.data) == 0 { - z.data = nil + if z.idx == len(z.data) { + // No data ready for reading, process the next block. + if debugFlag { + debug("reading block from writer") } - return - } - - // Break up the input buffer into BlockMaxSize blocks with at least one block. - // Then decompress into each of them concurrently if possible (no dependency). - // In case of dependency, the first block will be missing the window (except on the - // very first call), the rest will have it already since it comes from the previous block. - wbuf := buf - zn := (len(wbuf) + z.BlockMaxSize - 1) / z.BlockMaxSize - zblocks := make([]block, zn) - for zi, abort := 0, uint32(0); zi < zn && atomic.LoadUint32(&abort) == 0; zi++ { - zb := &zblocks[zi] - // last block may be too small - if len(wbuf) < z.BlockMaxSize+len(z.window) { - wbuf = make([]byte, z.BlockMaxSize+len(z.window)) - } - copy(wbuf, z.window) - if zb.err = z.readBlock(wbuf, zb); zb.err != nil { - break - } - wbuf = wbuf[z.BlockMaxSize:] - if !z.BlockDependency { - z.wg.Add(1) - go z.decompressBlock(zb, &abort) - continue - } - // cannot decompress concurrently when dealing with block dependency - z.decompressBlock(zb, nil) - // the last block may not contain enough data - if len(z.window) == 0 { - z.window = make([]byte, winSize) - } - if len(zb.data) >= winSize { - copy(z.window, zb.data[len(zb.data)-winSize:]) - } else { - copy(z.window, z.window[len(zb.data):]) - copy(z.window[len(zb.data)+1:], zb.data) - } - } - z.wg.Wait() - - // since a block size may be less then BlockMaxSize, trim the decompressed buffers - for _, zb := range zblocks { - if zb.err != nil { - if zb.err == errEndOfBlock { - return n, z.close() - } - return n, zb.err - } - bLen := len(zb.data) - if !z.NoChecksum { - z.checksum.Write(zb.data) - } - m := copy(buf[n:], zb.data) - // buffer the remaining data (this is necessarily the last block) - if m < bLen { - z.data = zb.data[m:] - } - n += m - } - - return -} - -// readBlock reads an entire frame block from the frame. -// The input buffer is the one that will receive the decompressed data. -// If the end of the frame is detected, it returns the errEndOfBlock error. -func (z *Reader) readBlock(buf []byte, b *block) error { - var bLen uint32 - if err := binary.Read(z.src, binary.LittleEndian, &bLen); err != nil { - return err - } - atomic.AddInt64(&z.Pos, 4) - - switch { - case bLen == 0: - return errEndOfBlock - case bLen&(1<<31) == 0: - b.compressed = true - b.data = buf - b.zdata = make([]byte, bLen) - default: - bLen = bLen & (1<<31 - 1) - if int(bLen) > len(buf) { - return fmt.Errorf("lz4.Read: invalid block size: %d", bLen) - } - b.data = buf[:bLen] - b.zdata = buf[:bLen] - } - if _, err := io.ReadFull(z.src, b.zdata); err != nil { - return err - } - - if z.BlockChecksum { - if err := binary.Read(z.src, binary.LittleEndian, &b.checksum); err != nil { - return err - } - xxh := hashPool.Get() - defer hashPool.Put(xxh) - xxh.Write(b.zdata) - if h := xxh.Sum32(); h != b.checksum { - return fmt.Errorf("lz4.Read: invalid block checksum: got %x expected %x", h, b.checksum) - } - } - - return nil -} - -// decompressBlock decompresses a frame block. -// In case of an error, the block err is set with it and abort is set to 1. -func (z *Reader) decompressBlock(b *block, abort *uint32) { - if abort != nil { - defer z.wg.Done() - } - if b.compressed { - n := len(z.window) - m, err := UncompressBlock(b.zdata, b.data, n) + // Block length: 0 = end of frame, highest bit set: uncompressed. + bLen, err := z.readUint32() if err != nil { - if abort != nil { - atomic.StoreUint32(abort, 1) + return 0, err + } + z.pos += 4 + + if bLen == 0 { + // End of frame reached. + if !z.NoChecksum { + // Validate the frame checksum. + checksum, err := z.readUint32() + if err != nil { + return 0, err + } + if debugFlag { + debug("frame checksum got=%x / want=%x", z.checksum.Sum32(), checksum) + } + z.pos += 4 + if h := z.checksum.Sum32(); checksum != h { + return 0, fmt.Errorf("lz4: invalid frame checksum: got %x; expected %x", h, checksum) + } } - b.err = err - return - } - b.data = b.data[n : n+m] - } - atomic.AddInt64(&z.Pos, int64(len(b.data))) -} -// close validates the frame checksum (if any) and checks the next frame (if any). -func (z *Reader) close() error { - if !z.NoChecksum { - var checksum uint32 - if err := binary.Read(z.src, binary.LittleEndian, &checksum); err != nil { - return err + // Get ready for the next concatenated frame and keep the position. + pos := z.pos + z.Reset(z.src) + z.pos = pos + + // Since multiple frames can be concatenated, check for more. + return 0, z.readHeader(false) } - if checksum != z.checksum.Sum32() { - return fmt.Errorf("lz4.Read: invalid frame checksum: got %x expected %x", z.checksum.Sum32(), checksum) + + if debugFlag { + debug("raw block size %d", bLen) } + if bLen&compressedBlockFlag > 0 { + // Uncompressed block. + bLen &= compressedBlockMask + if debugFlag { + debug("uncompressed block size %d", bLen) + } + if int(bLen) > cap(z.data) { + return 0, fmt.Errorf("lz4: invalid block size: %d", bLen) + } + z.data = z.data[:bLen] + if _, err := io.ReadFull(z.src, z.data); err != nil { + return 0, err + } + z.pos += int64(bLen) + + if z.BlockChecksum { + checksum, err := z.readUint32() + if err != nil { + return 0, err + } + z.pos += 4 + + if h := xxh32.ChecksumZero(z.data); h != checksum { + return 0, fmt.Errorf("lz4: invalid block checksum: got %x; expected %x", h, checksum) + } + } + + } else { + // Compressed block. + if debugFlag { + debug("compressed block size %d", bLen) + } + if int(bLen) > cap(z.data) { + return 0, fmt.Errorf("lz4: invalid block size: %d", bLen) + } + zdata := z.zdata[:bLen] + if _, err := io.ReadFull(z.src, zdata); err != nil { + return 0, err + } + z.pos += int64(bLen) + + if z.BlockChecksum { + checksum, err := z.readUint32() + if err != nil { + return 0, err + } + z.pos += 4 + + if h := xxh32.ChecksumZero(zdata); h != checksum { + return 0, fmt.Errorf("lz4: invalid block checksum: got %x; expected %x", h, checksum) + } + } + + n, err := UncompressBlock(zdata, z.data) + if err != nil { + return 0, err + } + z.data = z.data[:n] + } + + if !z.NoChecksum { + z.checksum.Write(z.data) + if debugFlag { + debug("current frame checksum %x", z.checksum.Sum32()) + } + } + z.idx = 0 } - // get ready for the next concatenated frame, but do not change the position - pos := z.Pos - z.Reset(z.src) - z.Pos = pos + n := copy(buf, z.data[z.idx:]) + z.idx += n + if debugFlag { + debug("copied %d bytes to input", n) + } - // since multiple frames can be concatenated, check for another one - return z.readHeader(false) + return n, nil } // Reset discards the Reader's state and makes it equivalent to the @@ -317,48 +277,19 @@ func (z *Reader) close() error { // This permits reusing a Reader rather than allocating a new one. func (z *Reader) Reset(r io.Reader) { z.Header = Header{} - z.Pos = 0 + z.pos = 0 z.src = r + z.zdata = z.zdata[:0] + z.data = z.data[:0] + z.idx = 0 z.checksum.Reset() - z.data = nil - z.window = nil } -// WriteTo decompresses the data from the underlying io.Reader and writes it to the io.Writer. -// Returns the number of bytes written. -func (z *Reader) WriteTo(w io.Writer) (n int64, err error) { - cpus := runtime.GOMAXPROCS(0) - var buf []byte - - // The initial buffer being nil, the first Read will be only read the compressed frame options. - // The buffer can then be sized appropriately to support maximum concurrency decompression. - // If multiple frames are concatenated, Read() will return with no data decompressed but with - // potentially changed options. The buffer will be resized accordingly, always trying to - // maximize concurrency. - for { - nsize := 0 - // the block max size can change if multiple streams are concatenated. - // Check it after every Read(). - if z.BlockDependency { - // in case of dependency, we cannot decompress concurrently, - // so allocate the minimum buffer + window size - nsize = len(z.window) + z.BlockMaxSize - } else { - // if no dependency, allocate a buffer large enough for concurrent decompression - nsize = cpus * z.BlockMaxSize - } - if nsize != len(buf) { - buf = make([]byte, nsize) - } - - m, er := z.Read(buf) - if er != nil && er != io.EOF { - return n, er - } - m, err = w.Write(buf[:m]) - n += int64(m) - if err != nil || er == io.EOF { - return - } - } +// readUint32 reads an uint32 into the supplied buffer. +// The idea is to make use of the already allocated buffers avoiding additional allocations. +func (z *Reader) readUint32() (uint32, error) { + buf := z.buf[:4] + _, err := io.ReadFull(z.src, buf) + x := binary.LittleEndian.Uint32(buf) + return x, err } diff --git a/vendor/github.com/pierrec/lz4/writer.go b/vendor/github.com/pierrec/lz4/writer.go index d400c6a73..012043802 100644 --- a/vendor/github.com/pierrec/lz4/writer.go +++ b/vendor/github.com/pierrec/lz4/writer.go @@ -3,20 +3,22 @@ package lz4 import ( "encoding/binary" "fmt" - "hash" "io" - "runtime" - "sync" + + "github.com/pierrec/lz4/internal/xxh32" ) // Writer implements the LZ4 frame encoder. type Writer struct { Header - dst io.Writer - checksum hash.Hash32 // frame checksum - wg sync.WaitGroup // decompressing go routine wait group - data []byte // data to be compressed, only used when dealing with block dependency as we need 64Kb to work with - window []byte // last 64KB of decompressed data (block dependency) + blockMaxSize buffer + + buf [19]byte // magic number(4) + header(flags(2)+[Size(8)+DictID(4)]+checksum(1)) does not exceed 19 bytes + dst io.Writer // Destination. + checksum xxh32.XXHZero // Frame checksum. + zdata []byte // Compressed data. + data []byte // Data to be compressed. + idx int // Index into data. + hashtable [winSize]int // Hash table used in CompressBlock(). } // NewWriter returns a new LZ4 frame encoder. @@ -24,37 +26,37 @@ type Writer struct { // The supplied Header is checked at the first Write. // It is ok to change it before the first Write but then not until a Reset() is performed. func NewWriter(dst io.Writer) *Writer { - return &Writer{ - dst: dst, - checksum: hashPool.Get(), - Header: Header{ - BlockMaxSize: 4 << 20, - }, - } + return &Writer{dst: dst} } // writeHeader builds and writes the header (magic+header) to the underlying io.Writer. func (z *Writer) writeHeader() error { - // Default to 4Mb if BlockMaxSize is not set + // Default to 4Mb if BlockMaxSize is not set. if z.Header.BlockMaxSize == 0 { - z.Header.BlockMaxSize = 4 << 20 + z.Header.BlockMaxSize = bsMapID[7] } - // the only option that need to be validated - bSize, ok := bsMapValue[z.Header.BlockMaxSize] + // The only option that needs to be validated. + bSize := z.Header.BlockMaxSize + bSizeID, ok := bsMapValue[bSize] if !ok { - return fmt.Errorf("lz4: invalid block max size: %d", z.Header.BlockMaxSize) + return fmt.Errorf("lz4: invalid block max size: %d", bSize) } + // Allocate the compressed/uncompressed buffers. + // The compressed buffer cannot exceed the uncompressed one. + if n := 2 * bSize; cap(z.zdata) < n { + z.zdata = make([]byte, n, n) + } + z.zdata = z.zdata[:bSize] + z.data = z.zdata[:cap(z.zdata)][bSize:] + z.idx = 0 - // magic number(4) + header(flags(2)+[Size(8)+DictID(4)]+checksum(1)) does not exceed 19 bytes - // Size and DictID are optional - var buf [19]byte + // Size is optional. + buf := z.buf[:] - // set the fixed size data: magic number, block max size and flags + // Set the fixed size data: magic number, block max size and flags. binary.LittleEndian.PutUint32(buf[0:], frameMagic) flg := byte(Version << 6) - if !z.Header.BlockDependency { - flg |= 1 << 5 - } + flg |= 1 << 5 // No block dependency. if z.Header.BlockChecksum { flg |= 1 << 4 } @@ -64,247 +66,154 @@ func (z *Writer) writeHeader() error { if !z.Header.NoChecksum { flg |= 1 << 2 } - // if z.Header.Dict { - // flg |= 1 - // } buf[4] = flg - buf[5] = bSize << 4 + buf[5] = bSizeID << 4 - // current buffer size: magic(4) + flags(1) + block max size (1) + // Current buffer size: magic(4) + flags(1) + block max size (1). n := 6 - // optional items + // Optional items. if z.Header.Size > 0 { binary.LittleEndian.PutUint64(buf[n:], z.Header.Size) n += 8 } - // if z.Header.Dict { - // binary.LittleEndian.PutUint32(buf[n:], z.Header.DictID) - // n += 4 - // } - // header checksum includes the flags, block max size and optional Size and DictID - z.checksum.Write(buf[4:n]) - buf[n] = byte(z.checksum.Sum32() >> 8 & 0xFF) + // The header checksum includes the flags, block max size and optional Size. + buf[n] = byte(xxh32.ChecksumZero(buf[4:n]) >> 8 & 0xFF) z.checksum.Reset() - // header ready, write it out + // Header ready, write it out. if _, err := z.dst.Write(buf[0 : n+1]); err != nil { return err } z.Header.done = true + if debugFlag { + debug("wrote header %v", z.Header) + } return nil } // Write compresses data from the supplied buffer into the underlying io.Writer. // Write does not return until the data has been written. -// -// If the input buffer is large enough (typically in multiples of BlockMaxSize) -// the data will be compressed concurrently. -// -// Write never buffers any data unless in BlockDependency mode where it may -// do so until it has 64Kb of data, after which it never buffers any. -func (z *Writer) Write(buf []byte) (n int, err error) { +func (z *Writer) Write(buf []byte) (int, error) { if !z.Header.done { - if err = z.writeHeader(); err != nil { - return + if err := z.writeHeader(); err != nil { + return 0, err } } - - if len(buf) == 0 { - return + if debugFlag { + debug("input buffer len=%d index=%d", len(buf), z.idx) } - if !z.NoChecksum { - z.wg.Add(1) - go func(b []byte) { - z.checksum.Write(b) - z.wg.Done() - }(buf) - } - - // with block dependency, require at least 64Kb of data to work with - // not having 64Kb only matters initially to setup the first window - bl := 0 - if z.BlockDependency && len(z.window) == 0 { - bl = len(z.data) - z.data = append(z.data, buf...) - if len(z.data) < winSize { - z.wg.Wait() - return len(buf), nil - } - buf = z.data - z.data = nil - } - - // Break up the input buffer into BlockMaxSize blocks, provisioning the left over block. - // Then compress into each of them concurrently if possible (no dependency). - wbuf := buf - zn := len(wbuf) / z.BlockMaxSize - zblocks := make([]block, zn, zn+1) - for zi := 0; zi < zn; zi++ { - zb := &zblocks[zi] - if z.BlockDependency { - if zi == 0 { - // first block does not have the window - zb.data = append(z.window, wbuf[:z.BlockMaxSize]...) - zb.offset = len(z.window) - wbuf = wbuf[z.BlockMaxSize-winSize:] - } else { - // set the uncompressed data including the window from previous block - zb.data = wbuf[:z.BlockMaxSize+winSize] - zb.offset = winSize - wbuf = wbuf[z.BlockMaxSize:] + zn := len(z.data) + var n int + for len(buf) > 0 { + if z.idx == 0 && len(buf) >= zn { + // Avoid a copy as there is enough data for a block. + if err := z.compressBlock(buf[:zn]); err != nil { + return n, err } - } else { - zb.data = wbuf[:z.BlockMaxSize] - wbuf = wbuf[z.BlockMaxSize:] + n += zn + buf = buf[zn:] + continue + } + // Accumulate the data to be compressed. + m := copy(z.data[z.idx:], buf) + n += m + z.idx += m + buf = buf[m:] + if debugFlag { + debug("%d bytes copied to buf, current index %d", n, z.idx) } - z.wg.Add(1) - go z.compressBlock(zb) - } - - // left over - if len(buf)%z.BlockMaxSize > 0 { - zblocks = append(zblocks, block{data: wbuf}) - zb := &zblocks[zn] - if z.BlockDependency { - if zn == 0 { - zb.data = append(z.window, zb.data...) - zb.offset = len(z.window) - } else { - zb.offset = winSize - } - } - z.wg.Add(1) - go z.compressBlock(zb) - } - z.wg.Wait() - - // outputs the compressed data - for zi, zb := range zblocks { - _, err = z.writeBlock(&zb) - - written := len(zb.data) - if bl > 0 { - if written >= bl { - written -= bl - bl = 0 - } else { - bl -= written - written = 0 + if z.idx < len(z.data) { + // Buffer not filled. + if debugFlag { + debug("need more data for compression") } + return n, nil } - n += written - // remove the window in zb.data - if z.BlockDependency { - if zi == 0 { - n -= len(z.window) - } else { - n -= winSize - } - } - if err != nil { - return - } - } - - if z.BlockDependency { - if len(z.window) == 0 { - z.window = make([]byte, winSize) - } - // last buffer may be shorter than the window - if len(buf) >= winSize { - copy(z.window, buf[len(buf)-winSize:]) - } else { - copy(z.window, z.window[len(buf):]) - copy(z.window[len(buf)+1:], buf) - } - } - - return -} - -// compressBlock compresses a block. -func (z *Writer) compressBlock(zb *block) { - // compressed block size cannot exceed the input's - zbuf := make([]byte, len(zb.data)-zb.offset) - var ( - n int - err error - ) - if z.HighCompression { - n, err = CompressBlockHC(zb.data, zbuf, zb.offset) - } else { - n, err = CompressBlock(zb.data, zbuf, zb.offset) - } - - // compressible and compressed size smaller than decompressed: ok! - if err == nil && n > 0 && len(zb.zdata) < len(zb.data) { - zb.compressed = true - zb.zdata = zbuf[:n] - } else { - zb.zdata = zb.data[zb.offset:] - } - - if z.BlockChecksum { - xxh := hashPool.Get() - xxh.Write(zb.zdata) - zb.checksum = xxh.Sum32() - hashPool.Put(xxh) - } - - z.wg.Done() -} - -// writeBlock writes a frame block to the underlying io.Writer (size, data). -func (z *Writer) writeBlock(zb *block) (int, error) { - bLen := uint32(len(zb.zdata)) - if !zb.compressed { - bLen |= 1 << 31 - } - - n := 0 - if err := binary.Write(z.dst, binary.LittleEndian, bLen); err != nil { - return n, err - } - n += 4 - - m, err := z.dst.Write(zb.zdata) - n += m - if err != nil { - return n, err - } - - if z.BlockChecksum { - if err := binary.Write(z.dst, binary.LittleEndian, zb.checksum); err != nil { + // Buffer full. + if err := z.compressBlock(z.data); err != nil { return n, err } - n += 4 + z.idx = 0 } return n, nil } +// compressBlock compresses a block. +func (z *Writer) compressBlock(data []byte) error { + if !z.NoChecksum { + z.checksum.Write(data) + } + + // The compressed block size cannot exceed the input's. + var zn int + var err error + + if level := z.Header.CompressionLevel; level != 0 { + zn, err = CompressBlockHC(data, z.zdata, level) + } else { + zn, err = CompressBlock(data, z.zdata, z.hashtable[:]) + } + + var zdata []byte + var bLen uint32 + if debugFlag { + debug("block compression %d => %d", len(data), zn) + } + if err == nil && zn > 0 && zn < len(data) { + // Compressible and compressed size smaller than uncompressed: ok! + bLen = uint32(zn) + zdata = z.zdata[:zn] + } else { + // Uncompressed block. + bLen = uint32(len(data)) | compressedBlockFlag + zdata = data + } + if debugFlag { + debug("block compression to be written len=%d data len=%d", bLen, len(zdata)) + } + + // Write the block. + if err := z.writeUint32(bLen); err != nil { + return err + } + if _, err := z.dst.Write(zdata); err != nil { + return err + } + + if z.BlockChecksum { + checksum := xxh32.ChecksumZero(zdata) + if debugFlag { + debug("block checksum %x", checksum) + } + if err := z.writeUint32(checksum); err != nil { + return err + } + } + if debugFlag { + debug("current frame checksum %x", z.checksum.Sum32()) + } + + return nil +} + // Flush flushes any pending compressed data to the underlying writer. // Flush does not return until the data has been written. // If the underlying writer returns an error, Flush returns that error. -// -// Flush is only required when in BlockDependency mode and the total of -// data written is less than 64Kb. func (z *Writer) Flush() error { - if len(z.data) == 0 { + if debugFlag { + debug("flush with index %d", z.idx) + } + if z.idx == 0 { return nil } - zb := block{data: z.data} - z.wg.Add(1) - z.compressBlock(&zb) - if _, err := z.writeBlock(&zb); err != nil { - return err - } - return nil + + return z.compressBlock(z.data[:z.idx]) } // Close closes the Writer, flushing any unwritten data to the underlying io.Writer, but does not close the underlying io.Writer. @@ -315,21 +224,22 @@ func (z *Writer) Close() error { } } - // buffered data for the block dependency window - if z.BlockDependency && len(z.data) > 0 { - zb := block{data: z.data} - z.wg.Add(1) - z.compressBlock(&zb) - if _, err := z.writeBlock(&zb); err != nil { - return err - } + if err := z.Flush(); err != nil { + return err } - if err := binary.Write(z.dst, binary.LittleEndian, uint32(0)); err != nil { + if debugFlag { + debug("writing last empty block") + } + if err := z.writeUint32(0); err != nil { return err } if !z.NoChecksum { - if err := binary.Write(z.dst, binary.LittleEndian, z.checksum.Sum32()); err != nil { + checksum := z.checksum.Sum32() + if debugFlag { + debug("stream checksum %x", checksum) + } + if err := z.writeUint32(checksum); err != nil { return err } } @@ -343,28 +253,15 @@ func (z *Writer) Reset(w io.Writer) { z.Header = Header{} z.dst = w z.checksum.Reset() - z.data = nil - z.window = nil + z.zdata = z.zdata[:0] + z.data = z.data[:0] + z.idx = 0 } -// ReadFrom compresses the data read from the io.Reader and writes it to the underlying io.Writer. -// Returns the number of bytes read. -// It does not close the Writer. -func (z *Writer) ReadFrom(r io.Reader) (n int64, err error) { - cpus := runtime.GOMAXPROCS(0) - buf := make([]byte, cpus*z.BlockMaxSize) - for { - m, er := io.ReadFull(r, buf) - n += int64(m) - if er == nil || er == io.ErrUnexpectedEOF || er == io.EOF { - if _, err = z.Write(buf[:m]); err != nil { - return - } - if er == nil { - continue - } - return - } - return n, er - } +// writeUint32 writes a uint32 to the underlying writer. +func (z *Writer) writeUint32(x uint32) error { + buf := z.buf[:4] + binary.LittleEndian.PutUint32(buf, x) + _, err := z.dst.Write(buf) + return err } diff --git a/vendor/github.com/pierrec/xxHash/LICENSE b/vendor/github.com/pierrec/xxHash/LICENSE deleted file mode 100644 index c1418f3f6..000000000 --- a/vendor/github.com/pierrec/xxHash/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2014, Pierre Curto -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of xxHash nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/github.com/pierrec/xxHash/xxHash32/xxHash32.go b/vendor/github.com/pierrec/xxHash/xxHash32/xxHash32.go deleted file mode 100644 index 411504e4b..000000000 --- a/vendor/github.com/pierrec/xxHash/xxHash32/xxHash32.go +++ /dev/null @@ -1,205 +0,0 @@ -// Package xxHash32 implements the very fast xxHash hashing algorithm (32 bits version). -// (https://github.com/Cyan4973/xxHash/) -package xxHash32 - -import "hash" - -const ( - prime32_1 = 2654435761 - prime32_2 = 2246822519 - prime32_3 = 3266489917 - prime32_4 = 668265263 - prime32_5 = 374761393 -) - -type xxHash struct { - seed uint32 - v1 uint32 - v2 uint32 - v3 uint32 - v4 uint32 - totalLen uint64 - buf [16]byte - bufused int -} - -// New returns a new Hash32 instance. -func New(seed uint32) hash.Hash32 { - xxh := &xxHash{seed: seed} - xxh.Reset() - return xxh -} - -// Sum appends the current hash to b and returns the resulting slice. -// It does not change the underlying hash state. -func (xxh xxHash) Sum(b []byte) []byte { - h32 := xxh.Sum32() - return append(b, byte(h32), byte(h32>>8), byte(h32>>16), byte(h32>>24)) -} - -// Reset resets the Hash to its initial state. -func (xxh *xxHash) Reset() { - xxh.v1 = xxh.seed + prime32_1 + prime32_2 - xxh.v2 = xxh.seed + prime32_2 - xxh.v3 = xxh.seed - xxh.v4 = xxh.seed - prime32_1 - xxh.totalLen = 0 - xxh.bufused = 0 -} - -// Size returns the number of bytes returned by Sum(). -func (xxh *xxHash) Size() int { - return 4 -} - -// BlockSize gives the minimum number of bytes accepted by Write(). -func (xxh *xxHash) BlockSize() int { - return 1 -} - -// Write adds input bytes to the Hash. -// It never returns an error. -func (xxh *xxHash) Write(input []byte) (int, error) { - n := len(input) - m := xxh.bufused - - xxh.totalLen += uint64(n) - - r := len(xxh.buf) - m - if n < r { - copy(xxh.buf[m:], input) - xxh.bufused += len(input) - return n, nil - } - - p := 0 - if m > 0 { - // some data left from previous update - copy(xxh.buf[xxh.bufused:], input[:r]) - xxh.bufused += len(input) - r - - // fast rotl(13) - p32 := xxh.v1 + (uint32(xxh.buf[p+3])<<24|uint32(xxh.buf[p+2])<<16|uint32(xxh.buf[p+1])<<8|uint32(xxh.buf[p]))*prime32_2 - xxh.v1 = (p32<<13 | p32>>19) * prime32_1 - p += 4 - p32 = xxh.v2 + (uint32(xxh.buf[p+3])<<24|uint32(xxh.buf[p+2])<<16|uint32(xxh.buf[p+1])<<8|uint32(xxh.buf[p]))*prime32_2 - xxh.v2 = (p32<<13 | p32>>19) * prime32_1 - p += 4 - p32 = xxh.v3 + (uint32(xxh.buf[p+3])<<24|uint32(xxh.buf[p+2])<<16|uint32(xxh.buf[p+1])<<8|uint32(xxh.buf[p]))*prime32_2 - xxh.v3 = (p32<<13 | p32>>19) * prime32_1 - p += 4 - p32 = xxh.v4 + (uint32(xxh.buf[p+3])<<24|uint32(xxh.buf[p+2])<<16|uint32(xxh.buf[p+1])<<8|uint32(xxh.buf[p]))*prime32_2 - xxh.v4 = (p32<<13 | p32>>19) * prime32_1 - - p = r - xxh.bufused = 0 - } - - for n := n - 16; p <= n; { - p32 := xxh.v1 + (uint32(input[p+3])<<24|uint32(input[p+2])<<16|uint32(input[p+1])<<8|uint32(input[p]))*prime32_2 - xxh.v1 = (p32<<13 | p32>>19) * prime32_1 - p += 4 - p32 = xxh.v2 + (uint32(input[p+3])<<24|uint32(input[p+2])<<16|uint32(input[p+1])<<8|uint32(input[p]))*prime32_2 - xxh.v2 = (p32<<13 | p32>>19) * prime32_1 - p += 4 - p32 = xxh.v3 + (uint32(input[p+3])<<24|uint32(input[p+2])<<16|uint32(input[p+1])<<8|uint32(input[p]))*prime32_2 - xxh.v3 = (p32<<13 | p32>>19) * prime32_1 - p += 4 - p32 = xxh.v4 + (uint32(input[p+3])<<24|uint32(input[p+2])<<16|uint32(input[p+1])<<8|uint32(input[p]))*prime32_2 - xxh.v4 = (p32<<13 | p32>>19) * prime32_1 - p += 4 - } - - copy(xxh.buf[xxh.bufused:], input[p:]) - xxh.bufused += len(input) - p - - return n, nil -} - -// Sum32 returns the 32 bits Hash value. -func (xxh *xxHash) Sum32() uint32 { - h32 := uint32(xxh.totalLen) - if xxh.totalLen >= 16 { - h32 += ((xxh.v1 << 1) | (xxh.v1 >> 31)) + - ((xxh.v2 << 7) | (xxh.v2 >> 25)) + - ((xxh.v3 << 12) | (xxh.v3 >> 20)) + - ((xxh.v4 << 18) | (xxh.v4 >> 14)) - } else { - h32 += xxh.seed + prime32_5 - } - - p := 0 - n := xxh.bufused - for n := n - 4; p <= n; p += 4 { - h32 += (uint32(xxh.buf[p+3])<<24 | uint32(xxh.buf[p+2])<<16 | uint32(xxh.buf[p+1])<<8 | uint32(xxh.buf[p])) * prime32_3 - h32 = ((h32 << 17) | (h32 >> 15)) * prime32_4 - } - for ; p < n; p++ { - h32 += uint32(xxh.buf[p]) * prime32_5 - h32 = ((h32 << 11) | (h32 >> 21)) * prime32_1 - } - - h32 ^= h32 >> 15 - h32 *= prime32_2 - h32 ^= h32 >> 13 - h32 *= prime32_3 - h32 ^= h32 >> 16 - - return h32 -} - -// Checksum returns the 32bits Hash value. -func Checksum(input []byte, seed uint32) uint32 { - n := len(input) - h32 := uint32(n) - - if n < 16 { - h32 += seed + prime32_5 - } else { - v1 := seed + prime32_1 + prime32_2 - v2 := seed + prime32_2 - v3 := seed - v4 := seed - prime32_1 - p := 0 - for p <= n-16 { - v1 += (uint32(input[p+3])<<24 | uint32(input[p+2])<<16 | uint32(input[p+1])<<8 | uint32(input[p])) * prime32_2 - v1 = (v1<<13 | v1>>19) * prime32_1 - p += 4 - v2 += (uint32(input[p+3])<<24 | uint32(input[p+2])<<16 | uint32(input[p+1])<<8 | uint32(input[p])) * prime32_2 - v2 = (v2<<13 | v2>>19) * prime32_1 - p += 4 - v3 += (uint32(input[p+3])<<24 | uint32(input[p+2])<<16 | uint32(input[p+1])<<8 | uint32(input[p])) * prime32_2 - v3 = (v3<<13 | v3>>19) * prime32_1 - p += 4 - v4 += (uint32(input[p+3])<<24 | uint32(input[p+2])<<16 | uint32(input[p+1])<<8 | uint32(input[p])) * prime32_2 - v4 = (v4<<13 | v4>>19) * prime32_1 - p += 4 - } - input = input[p:] - n -= p - h32 += ((v1 << 1) | (v1 >> 31)) + - ((v2 << 7) | (v2 >> 25)) + - ((v3 << 12) | (v3 >> 20)) + - ((v4 << 18) | (v4 >> 14)) - } - - p := 0 - for p <= n-4 { - h32 += (uint32(input[p+3])<<24 | uint32(input[p+2])<<16 | uint32(input[p+1])<<8 | uint32(input[p])) * prime32_3 - h32 = ((h32 << 17) | (h32 >> 15)) * prime32_4 - p += 4 - } - for p < n { - h32 += uint32(input[p]) * prime32_5 - h32 = ((h32 << 11) | (h32 >> 21)) * prime32_1 - p++ - } - - h32 ^= h32 >> 15 - h32 *= prime32_2 - h32 ^= h32 >> 13 - h32 *= prime32_3 - h32 ^= h32 >> 16 - - return h32 -} diff --git a/vendor/github.com/pkg/errors/.travis.yml b/vendor/github.com/pkg/errors/.travis.yml index 7ca408d1b..588ceca18 100644 --- a/vendor/github.com/pkg/errors/.travis.yml +++ b/vendor/github.com/pkg/errors/.travis.yml @@ -1,12 +1,10 @@ language: go go_import_path: github.com/pkg/errors go: - - 1.4.x - - 1.5.x - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x + - 1.4.3 + - 1.5.4 + - 1.6.2 + - 1.7.1 - tip script: diff --git a/vendor/github.com/pkg/errors/README.md b/vendor/github.com/pkg/errors/README.md index 6483ba2af..273db3c98 100644 --- a/vendor/github.com/pkg/errors/README.md +++ b/vendor/github.com/pkg/errors/README.md @@ -1,4 +1,4 @@ -# errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors) [![Sourcegraph](https://sourcegraph.com/github.com/pkg/errors/-/badge.svg)](https://sourcegraph.com/github.com/pkg/errors?badge) +# errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors) Package errors provides simple error handling primitives. @@ -47,6 +47,6 @@ We welcome pull requests, bug fixes and issue reports. With that said, the bar f Before proposing a change, please discuss your change by raising an issue. -## License +## Licence BSD-2-Clause diff --git a/vendor/github.com/pkg/errors/stack.go b/vendor/github.com/pkg/errors/stack.go index b485761a7..6b1f2891a 100644 --- a/vendor/github.com/pkg/errors/stack.go +++ b/vendor/github.com/pkg/errors/stack.go @@ -46,8 +46,7 @@ func (f Frame) line() int { // // Format accepts flags that alter the printing of some verbs, as follows: // -// %+s function name and path of source file relative to the compile time -// GOPATH separated by \n\t (\n\t) +// %+s path of source file relative to the compile time GOPATH // %+v equivalent to %+s:%d func (f Frame) Format(s fmt.State, verb rune) { switch verb { @@ -80,14 +79,6 @@ func (f Frame) Format(s fmt.State, verb rune) { // StackTrace is stack of Frames from innermost (newest) to outermost (oldest). type StackTrace []Frame -// Format formats the stack of Frames according to the fmt.Formatter interface. -// -// %s lists source files for each Frame in the stack -// %v lists the source file and line number for each Frame in the stack -// -// Format accepts flags that alter the printing of some verbs, as follows: -// -// %+v Prints filename, function, and line number for each Frame in the stack. func (st StackTrace) Format(s fmt.State, verb rune) { switch verb { case 'v': diff --git a/vendor/github.com/pkg/sftp/.gitignore b/vendor/github.com/pkg/sftp/.gitignore new file mode 100644 index 000000000..9fc1e3d24 --- /dev/null +++ b/vendor/github.com/pkg/sftp/.gitignore @@ -0,0 +1,8 @@ +.*.swo +.*.swp + +server_standalone/server_standalone + +examples/sftp-server/id_rsa +examples/sftp-server/id_rsa.pub +examples/sftp-server/sftp-server diff --git a/vendor/github.com/pkg/sftp/.travis.yml b/vendor/github.com/pkg/sftp/.travis.yml new file mode 100644 index 000000000..9ef70d869 --- /dev/null +++ b/vendor/github.com/pkg/sftp/.travis.yml @@ -0,0 +1,21 @@ +language: go +go_import_path: github.com/pkg/sftp +go: + - 1.5.2 + - 1.4.3 + - tip + +sudo: false + +addons: + ssh_known_hosts: + - bitbucket.org + +install: + - go get -t -v ./... + - ssh-keygen -t rsa -q -P "" -f /home/travis/.ssh/id_rsa + +script: + - go test -integration -v ./... + - go test -testserver -v ./... + - go test -integration -testserver -v ./... diff --git a/vendor/github.com/pkg/sftp/examples/buffered-read-benchmark/main.go b/vendor/github.com/pkg/sftp/examples/buffered-read-benchmark/main.go deleted file mode 100644 index 32c4d1f3b..000000000 --- a/vendor/github.com/pkg/sftp/examples/buffered-read-benchmark/main.go +++ /dev/null @@ -1,77 +0,0 @@ -// buffered-read-benchmark benchmarks the peformance of reading -// from /dev/zero on the server to a []byte on the client via io.Copy. -package main - -import ( - "flag" - "fmt" - "io" - "log" - "net" - "os" - "time" - - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/agent" - - "github.com/pkg/sftp" -) - -var ( - USER = flag.String("user", os.Getenv("USER"), "ssh username") - HOST = flag.String("host", "localhost", "ssh server hostname") - PORT = flag.Int("port", 22, "ssh server port") - PASS = flag.String("pass", os.Getenv("SOCKSIE_SSH_PASSWORD"), "ssh password") - SIZE = flag.Int("s", 1<<15, "set max packet size") -) - -func init() { - flag.Parse() -} - -func main() { - var auths []ssh.AuthMethod - if aconn, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK")); err == nil { - auths = append(auths, ssh.PublicKeysCallback(agent.NewClient(aconn).Signers)) - - } - if *PASS != "" { - auths = append(auths, ssh.Password(*PASS)) - } - - config := ssh.ClientConfig{ - User: *USER, - Auth: auths, - } - addr := fmt.Sprintf("%s:%d", *HOST, *PORT) - conn, err := ssh.Dial("tcp", addr, &config) - if err != nil { - log.Fatalf("unable to connect to [%s]: %v", addr, err) - } - defer conn.Close() - - c, err := sftp.NewClient(conn, sftp.MaxPacket(*SIZE)) - if err != nil { - log.Fatalf("unable to start sftp subsytem: %v", err) - } - defer c.Close() - - r, err := c.Open("/dev/zero") - if err != nil { - log.Fatal(err) - } - defer r.Close() - - const size = 1e9 - - log.Printf("reading %v bytes", size) - t1 := time.Now() - n, err := io.ReadFull(r, make([]byte, size)) - if err != nil { - log.Fatal(err) - } - if n != size { - log.Fatalf("copy: expected %v bytes, got %d", size, n) - } - log.Printf("read %v bytes in %s", size, time.Since(t1)) -} diff --git a/vendor/github.com/pkg/sftp/examples/buffered-write-benchmark/main.go b/vendor/github.com/pkg/sftp/examples/buffered-write-benchmark/main.go deleted file mode 100644 index 0c38db68c..000000000 --- a/vendor/github.com/pkg/sftp/examples/buffered-write-benchmark/main.go +++ /dev/null @@ -1,83 +0,0 @@ -// buffered-write-benchmark benchmarks the peformance of writing -// a single large []byte on the client to /dev/null on the server via io.Copy. -package main - -import ( - "flag" - "fmt" - "log" - "net" - "os" - "syscall" - "time" - - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/agent" - - "github.com/pkg/sftp" -) - -var ( - USER = flag.String("user", os.Getenv("USER"), "ssh username") - HOST = flag.String("host", "localhost", "ssh server hostname") - PORT = flag.Int("port", 22, "ssh server port") - PASS = flag.String("pass", os.Getenv("SOCKSIE_SSH_PASSWORD"), "ssh password") - SIZE = flag.Int("s", 1<<15, "set max packet size") -) - -func init() { - flag.Parse() -} - -func main() { - var auths []ssh.AuthMethod - if aconn, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK")); err == nil { - auths = append(auths, ssh.PublicKeysCallback(agent.NewClient(aconn).Signers)) - - } - if *PASS != "" { - auths = append(auths, ssh.Password(*PASS)) - } - - config := ssh.ClientConfig{ - User: *USER, - Auth: auths, - } - addr := fmt.Sprintf("%s:%d", *HOST, *PORT) - conn, err := ssh.Dial("tcp", addr, &config) - if err != nil { - log.Fatalf("unable to connect to [%s]: %v", addr, err) - } - defer conn.Close() - - c, err := sftp.NewClient(conn, sftp.MaxPacket(*SIZE)) - if err != nil { - log.Fatalf("unable to start sftp subsytem: %v", err) - } - defer c.Close() - - w, err := c.OpenFile("/dev/null", syscall.O_WRONLY) - if err != nil { - log.Fatal(err) - } - defer w.Close() - - f, err := os.Open("/dev/zero") - if err != nil { - log.Fatal(err) - } - defer f.Close() - - const size = 1e9 - - log.Printf("writing %v bytes", size) - t1 := time.Now() - n, err := w.Write(make([]byte, size)) - if err != nil { - log.Fatal(err) - } - if n != size { - log.Fatalf("copy: expected %v bytes, got %d", size, n) - } - log.Printf("wrote %v bytes in %s", size, time.Since(t1)) -} diff --git a/vendor/github.com/pkg/sftp/examples/sftp-server/README.md b/vendor/github.com/pkg/sftp/examples/sftp-server/README.md deleted file mode 100644 index bd96f2d8a..000000000 --- a/vendor/github.com/pkg/sftp/examples/sftp-server/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Example SFTP server implementation -=== - -In order to use this example you will need an RSA key. - -On linux-like systems with openssh installed, you can use the command: - -``` -ssh-keygen -t rsa -f id_rsa -``` - -Then you will be able to run the sftp-server command in the current directory. diff --git a/vendor/github.com/pkg/sftp/examples/sftp-server/main.go b/vendor/github.com/pkg/sftp/examples/sftp-server/main.go deleted file mode 100644 index 115d35c35..000000000 --- a/vendor/github.com/pkg/sftp/examples/sftp-server/main.go +++ /dev/null @@ -1,134 +0,0 @@ -// An example SFTP server implementation using the golang SSH package. -// Serves the whole filesystem visible to the user, and has a hard-coded username and password, -// so not for real use! -package main - -import ( - "flag" - "fmt" - "io/ioutil" - "log" - "net" - "os" - - "github.com/pkg/sftp" - "golang.org/x/crypto/ssh" -) - -// Based on example server code from golang.org/x/crypto/ssh and server_standalone -func main() { - - var ( - readOnly bool - debugStderr bool - ) - - flag.BoolVar(&readOnly, "R", false, "read-only server") - flag.BoolVar(&debugStderr, "e", false, "debug to stderr") - flag.Parse() - - debugStream := ioutil.Discard - if debugStderr { - debugStream = os.Stderr - } - - // An SSH server is represented by a ServerConfig, which holds - // certificate details and handles authentication of ServerConns. - config := &ssh.ServerConfig{ - PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) { - // Should use constant-time compare (or better, salt+hash) in - // a production setting. - fmt.Fprintf(debugStream, "Login: %s\n", c.User()) - if c.User() == "testuser" && string(pass) == "tiger" { - return nil, nil - } - return nil, fmt.Errorf("password rejected for %q", c.User()) - }, - } - - privateBytes, err := ioutil.ReadFile("id_rsa") - if err != nil { - log.Fatal("Failed to load private key", err) - } - - private, err := ssh.ParsePrivateKey(privateBytes) - if err != nil { - log.Fatal("Failed to parse private key", err) - } - - config.AddHostKey(private) - - // Once a ServerConfig has been configured, connections can be - // accepted. - listener, err := net.Listen("tcp", "0.0.0.0:2022") - if err != nil { - log.Fatal("failed to listen for connection", err) - } - fmt.Printf("Listening on %v\n", listener.Addr()) - - nConn, err := listener.Accept() - if err != nil { - log.Fatal("failed to accept incoming connection", err) - } - - // Before use, a handshake must be performed on the incoming - // net.Conn. - _, chans, reqs, err := ssh.NewServerConn(nConn, config) - if err != nil { - log.Fatal("failed to handshake", err) - } - fmt.Fprintf(debugStream, "SSH server established\n") - - // The incoming Request channel must be serviced. - go ssh.DiscardRequests(reqs) - - // Service the incoming Channel channel. - for newChannel := range chans { - // Channels have a type, depending on the application level - // protocol intended. In the case of an SFTP session, this is "subsystem" - // with a payload string of "sftp" - fmt.Fprintf(debugStream, "Incoming channel: %s\n", newChannel.ChannelType()) - if newChannel.ChannelType() != "session" { - newChannel.Reject(ssh.UnknownChannelType, "unknown channel type") - fmt.Fprintf(debugStream, "Unknown channel type: %s\n", newChannel.ChannelType()) - continue - } - channel, requests, err := newChannel.Accept() - if err != nil { - log.Fatal("could not accept channel.", err) - } - fmt.Fprintf(debugStream, "Channel accepted\n") - - // Sessions have out-of-band requests such as "shell", - // "pty-req" and "env". Here we handle only the - // "subsystem" request. - go func(in <-chan *ssh.Request) { - for req := range in { - fmt.Fprintf(debugStream, "Request: %v\n", req.Type) - ok := false - switch req.Type { - case "subsystem": - fmt.Fprintf(debugStream, "Subsystem: %s\n", req.Payload[4:]) - if string(req.Payload[4:]) == "sftp" { - ok = true - } - } - fmt.Fprintf(debugStream, " - accepted: %v\n", ok) - req.Reply(ok, nil) - } - }(requests) - - server, err := sftp.NewServer( - channel, - channel, - sftp.WithDebug(debugStream), - sftp.ReadOnly(), - ) - if err != nil { - log.Fatal(err) - } - if err := server.Serve(); err != nil { - log.Fatal("sftp server completed with error:", err) - } - } -} diff --git a/vendor/github.com/pkg/sftp/examples/streaming-read-benchmark/main.go b/vendor/github.com/pkg/sftp/examples/streaming-read-benchmark/main.go deleted file mode 100644 index dc901e976..000000000 --- a/vendor/github.com/pkg/sftp/examples/streaming-read-benchmark/main.go +++ /dev/null @@ -1,84 +0,0 @@ -// streaming-read-benchmark benchmarks the peformance of reading -// from /dev/zero on the server to /dev/null on the client via io.Copy. -package main - -import ( - "flag" - "fmt" - "io" - "log" - "net" - "os" - "syscall" - "time" - - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/agent" - - "github.com/pkg/sftp" -) - -var ( - USER = flag.String("user", os.Getenv("USER"), "ssh username") - HOST = flag.String("host", "localhost", "ssh server hostname") - PORT = flag.Int("port", 22, "ssh server port") - PASS = flag.String("pass", os.Getenv("SOCKSIE_SSH_PASSWORD"), "ssh password") - SIZE = flag.Int("s", 1<<15, "set max packet size") -) - -func init() { - flag.Parse() -} - -func main() { - var auths []ssh.AuthMethod - if aconn, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK")); err == nil { - auths = append(auths, ssh.PublicKeysCallback(agent.NewClient(aconn).Signers)) - - } - if *PASS != "" { - auths = append(auths, ssh.Password(*PASS)) - } - - config := ssh.ClientConfig{ - User: *USER, - Auth: auths, - } - addr := fmt.Sprintf("%s:%d", *HOST, *PORT) - conn, err := ssh.Dial("tcp", addr, &config) - if err != nil { - log.Fatalf("unable to connect to [%s]: %v", addr, err) - } - defer conn.Close() - - c, err := sftp.NewClient(conn, sftp.MaxPacket(*SIZE)) - if err != nil { - log.Fatalf("unable to start sftp subsytem: %v", err) - } - defer c.Close() - - r, err := c.Open("/dev/zero") - if err != nil { - log.Fatal(err) - } - defer r.Close() - - w, err := os.OpenFile("/dev/null", syscall.O_WRONLY, 0600) - if err != nil { - log.Fatal(err) - } - defer w.Close() - - const size int64 = 1e9 - - log.Printf("reading %v bytes", size) - t1 := time.Now() - n, err := io.Copy(w, io.LimitReader(r, size)) - if err != nil { - log.Fatal(err) - } - if n != size { - log.Fatalf("copy: expected %v bytes, got %d", size, n) - } - log.Printf("read %v bytes in %s", size, time.Since(t1)) -} diff --git a/vendor/github.com/pkg/sftp/examples/streaming-write-benchmark/main.go b/vendor/github.com/pkg/sftp/examples/streaming-write-benchmark/main.go deleted file mode 100644 index 07a9ddb7c..000000000 --- a/vendor/github.com/pkg/sftp/examples/streaming-write-benchmark/main.go +++ /dev/null @@ -1,84 +0,0 @@ -// streaming-write-benchmark benchmarks the peformance of writing -// from /dev/zero on the client to /dev/null on the server via io.Copy. -package main - -import ( - "flag" - "fmt" - "io" - "log" - "net" - "os" - "syscall" - "time" - - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/agent" - - "github.com/pkg/sftp" -) - -var ( - USER = flag.String("user", os.Getenv("USER"), "ssh username") - HOST = flag.String("host", "localhost", "ssh server hostname") - PORT = flag.Int("port", 22, "ssh server port") - PASS = flag.String("pass", os.Getenv("SOCKSIE_SSH_PASSWORD"), "ssh password") - SIZE = flag.Int("s", 1<<15, "set max packet size") -) - -func init() { - flag.Parse() -} - -func main() { - var auths []ssh.AuthMethod - if aconn, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK")); err == nil { - auths = append(auths, ssh.PublicKeysCallback(agent.NewClient(aconn).Signers)) - - } - if *PASS != "" { - auths = append(auths, ssh.Password(*PASS)) - } - - config := ssh.ClientConfig{ - User: *USER, - Auth: auths, - } - addr := fmt.Sprintf("%s:%d", *HOST, *PORT) - conn, err := ssh.Dial("tcp", addr, &config) - if err != nil { - log.Fatalf("unable to connect to [%s]: %v", addr, err) - } - defer conn.Close() - - c, err := sftp.NewClient(conn, sftp.MaxPacket(*SIZE)) - if err != nil { - log.Fatalf("unable to start sftp subsytem: %v", err) - } - defer c.Close() - - w, err := c.OpenFile("/dev/null", syscall.O_WRONLY) - if err != nil { - log.Fatal(err) - } - defer w.Close() - - f, err := os.Open("/dev/zero") - if err != nil { - log.Fatal(err) - } - defer f.Close() - - const size int64 = 1e9 - - log.Printf("writing %v bytes", size) - t1 := time.Now() - n, err := io.Copy(w, io.LimitReader(f, size)) - if err != nil { - log.Fatal(err) - } - if n != size { - log.Fatalf("copy: expected %v bytes, got %d", size, n) - } - log.Printf("wrote %v bytes in %s", size, time.Since(t1)) -} diff --git a/vendor/github.com/pkg/sftp/server_standalone/main.go b/vendor/github.com/pkg/sftp/server_standalone/main.go deleted file mode 100644 index f7fcccdee..000000000 --- a/vendor/github.com/pkg/sftp/server_standalone/main.go +++ /dev/null @@ -1,40 +0,0 @@ -package main - -// small wrapper around sftp server that allows it to be used as a separate process subsystem call by the ssh server. -// in practice this will statically link; however this allows unit testing from the sftp client. - -import ( - "flag" - "fmt" - "io/ioutil" - "os" - - "github.com/pkg/sftp" -) - -func main() { - var ( - readOnly bool - debugStderr bool - ) - - flag.BoolVar(&readOnly, "R", false, "read-only server") - flag.BoolVar(&debugStderr, "e", false, "debug to stderr") - flag.Parse() - - debugStream := ioutil.Discard - if debugStderr { - debugStream = os.Stderr - } - - svr, _ := sftp.NewServer( - os.Stdin, - os.Stdout, - sftp.WithDebug(debugStream), - sftp.ReadOnly(), - ) - if err := svr.Serve(); err != nil { - fmt.Fprintf(debugStream, "sftp server completed with error: %v", err) - os.Exit(1) - } -} diff --git a/vendor/github.com/posener/complete/.gitignore b/vendor/github.com/posener/complete/.gitignore new file mode 100644 index 000000000..136372081 --- /dev/null +++ b/vendor/github.com/posener/complete/.gitignore @@ -0,0 +1,2 @@ +.idea +coverage.txt diff --git a/vendor/github.com/posener/complete/.travis.yml b/vendor/github.com/posener/complete/.travis.yml new file mode 100644 index 000000000..c2798f8f3 --- /dev/null +++ b/vendor/github.com/posener/complete/.travis.yml @@ -0,0 +1,17 @@ +language: go +sudo: false +go: + - 1.9 + - 1.8 + +before_install: + - go get -u -t ./... + - go get -u gopkg.in/alecthomas/gometalinter.v1 + - gometalinter.v1 --install + +script: + - gometalinter.v1 --config metalinter.json ./... + - ./test.sh + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/posener/complete/args.go b/vendor/github.com/posener/complete/args.go index 73c356d76..1ba4d6919 100644 --- a/vendor/github.com/posener/complete/args.go +++ b/vendor/github.com/posener/complete/args.go @@ -3,6 +3,8 @@ package complete import ( "os" "path/filepath" + "strings" + "unicode" ) // Args describes command line arguments @@ -37,16 +39,41 @@ func (a Args) Directory() string { return fixPathForm(a.Last, dir) } -func newArgs(line []string) Args { - completed := removeLast(line[1:]) +func newArgs(line string) Args { + var ( + all []string + completed []string + ) + parts := splitFields(line) + if len(parts) > 0 { + all = parts[1:] + completed = removeLast(parts[1:]) + } return Args{ - All: line[1:], + All: all, Completed: completed, - Last: last(line), + Last: last(parts), LastCompleted: last(completed), } } +func splitFields(line string) []string { + parts := strings.Fields(line) + if len(line) > 0 && unicode.IsSpace(rune(line[len(line)-1])) { + parts = append(parts, "") + } + parts = splitLastEqual(parts) + return parts +} + +func splitLastEqual(line []string) []string { + if len(line) == 0 { + return line + } + parts := strings.Split(line[len(line)-1], "=") + return append(line[:len(line)-1], parts...) +} + func (a Args) from(i int) Args { if i > len(a.All) { i = len(a.All) @@ -67,9 +94,9 @@ func removeLast(a []string) []string { return a } -func last(args []string) (last string) { - if len(args) > 0 { - last = args[len(args)-1] +func last(args []string) string { + if len(args) == 0 { + return "" } - return + return args[len(args)-1] } diff --git a/vendor/github.com/posener/complete/cmd/install/fish.go b/vendor/github.com/posener/complete/cmd/install/fish.go new file mode 100644 index 000000000..f04e7c3ac --- /dev/null +++ b/vendor/github.com/posener/complete/cmd/install/fish.go @@ -0,0 +1,50 @@ +package install + +import ( + "bytes" + "fmt" + "os" + "path/filepath" + "text/template" +) + +// (un)install in fish + +type fish struct { + configDir string +} + +func (f fish) Install(cmd, bin string) error { + completionFile := filepath.Join(f.configDir, "completions", fmt.Sprintf("%s.fish", cmd)) + completeCmd := f.cmd(cmd, bin) + if _, err := os.Stat(completionFile); err == nil { + return fmt.Errorf("already installed at %s", completionFile) + } + + return createFile(completionFile, completeCmd) +} + +func (f fish) Uninstall(cmd, bin string) error { + completionFile := filepath.Join(f.configDir, "completions", fmt.Sprintf("%s.fish", cmd)) + if _, err := os.Stat(completionFile); err != nil { + return fmt.Errorf("does not installed in %s", f.configDir) + } + + return os.Remove(completionFile) +} + +func (f fish) cmd(cmd, bin string) string { + var buf bytes.Buffer + params := struct{ Cmd, Bin string }{cmd, bin} + template.Must(template.New("cmd").Parse(` +function __complete_{{.Cmd}} + set -lx COMP_LINE (string join ' ' (commandline -o)) + test (commandline -ct) = "" + and set COMP_LINE "$COMP_LINE " + {{.Bin}} +end +complete -c {{.Cmd}} -a "(__complete_{{.Cmd}})" +`)).Execute(&buf, params) + + return string(buf.Bytes()) +} diff --git a/vendor/github.com/posener/complete/cmd/install/install.go b/vendor/github.com/posener/complete/cmd/install/install.go index 644b40576..4a706242f 100644 --- a/vendor/github.com/posener/complete/cmd/install/install.go +++ b/vendor/github.com/posener/complete/cmd/install/install.go @@ -59,7 +59,7 @@ func Uninstall(cmd string) error { } func installers() (i []installer) { - for _, rc := range [...]string{".bashrc", ".bash_profile"} { + for _, rc := range [...]string{".bashrc", ".bash_profile", ".bash_login", ".profile"} { if f := rcFile(rc); f != "" { i = append(i, bash{f}) break @@ -68,9 +68,36 @@ func installers() (i []installer) { if f := rcFile(".zshrc"); f != "" { i = append(i, zsh{f}) } + if d := fishConfigDir(); d != "" { + i = append(i, fish{d}) + } return } +func fishConfigDir() string { + configDir := filepath.Join(getConfigHomePath(), "fish") + if configDir == "" { + return "" + } + if info, err := os.Stat(configDir); err != nil || !info.IsDir() { + return "" + } + return configDir +} + +func getConfigHomePath() string { + u, err := user.Current() + if err != nil { + return "" + } + + configHome := os.Getenv("XDG_CONFIG_HOME") + if configHome == "" { + return filepath.Join(u.HomeDir, ".config") + } + return configHome +} + func getBinaryPath() (string, error) { bin, err := os.Executable() if err != nil { diff --git a/vendor/github.com/posener/complete/cmd/install/utils.go b/vendor/github.com/posener/complete/cmd/install/utils.go index 2c8b44cab..bb709bc6c 100644 --- a/vendor/github.com/posener/complete/cmd/install/utils.go +++ b/vendor/github.com/posener/complete/cmd/install/utils.go @@ -6,6 +6,7 @@ import ( "io" "io/ioutil" "os" + "path/filepath" ) func lineInFile(name string, lookFor string) bool { @@ -36,6 +37,24 @@ func lineInFile(name string, lookFor string) bool { } } +func createFile(name string, content string) error { + // make sure file directory exists + if err := os.MkdirAll(filepath.Dir(name), 0775); err != nil { + return err + } + + // create the file + f, err := os.Create(name) + if err != nil { + return err + } + defer f.Close() + + // write file content + _, err = f.WriteString(fmt.Sprintf("%s\n", content)) + return err +} + func appendToFile(name string, content string) error { f, err := os.OpenFile(name, os.O_RDWR|os.O_APPEND, 0) if err != nil { diff --git a/vendor/github.com/posener/complete/command.go b/vendor/github.com/posener/complete/command.go index 6de48e960..82d37d529 100644 --- a/vendor/github.com/posener/complete/command.go +++ b/vendor/github.com/posener/complete/command.go @@ -1,7 +1,5 @@ package complete -import "github.com/posener/complete/match" - // Command represents a command line // It holds the data that enables auto completion of command line // Command can also be a sub command. @@ -25,9 +23,9 @@ type Command struct { } // Predict returns all possible predictions for args according to the command struct -func (c *Command) Predict(a Args) (predictions []string) { - predictions, _ = c.predict(a) - return +func (c *Command) Predict(a Args) []string { + options, _ := c.predict(a) + return options } // Commands is the type of Sub member, it maps a command name to a command struct @@ -36,9 +34,7 @@ type Commands map[string]Command // Predict completion of sub command names names according to command line arguments func (c Commands) Predict(a Args) (prediction []string) { for sub := range c { - if match.Prefix(sub, a.Last) { - prediction = append(prediction, sub) - } + prediction = append(prediction, sub) } return } @@ -56,10 +52,7 @@ func (f Flags) Predict(a Args) (prediction []string) { if flagHyphenStart && !lastHyphenStart { continue } - - if match.Prefix(flag, a.Last) { - prediction = append(prediction, flag) - } + prediction = append(prediction, flag) } return } diff --git a/vendor/github.com/posener/complete/complete.go b/vendor/github.com/posener/complete/complete.go index 1df66170b..185d1e8bd 100644 --- a/vendor/github.com/posener/complete/complete.go +++ b/vendor/github.com/posener/complete/complete.go @@ -8,10 +8,11 @@ package complete import ( "flag" "fmt" + "io" "os" - "strings" "github.com/posener/complete/cmd" + "github.com/posener/complete/match" ) const ( @@ -23,6 +24,7 @@ const ( type Complete struct { Command Command cmd.CLI + Out io.Writer } // New creates a new complete command. @@ -34,6 +36,7 @@ func New(name string, command Command) *Complete { return &Complete{ Command: command, CLI: cmd.CLI{Name: name}, + Out: os.Stdout, } } @@ -59,28 +62,34 @@ func (c *Complete) Complete() bool { return c.CLI.Run() } Log("Completing line: %s", line) - a := newArgs(line) - + Log("Completing last field: %s", a.Last) options := c.Command.Predict(a) + Log("Options: %s", options) - Log("Completion: %s", options) - output(options) + // filter only options that match the last argument + matches := []string{} + for _, option := range options { + if match.Prefix(option, a.Last) { + matches = append(matches, option) + } + } + Log("Matches: %s", matches) + c.output(matches) return true } -func getLine() ([]string, bool) { +func getLine() (string, bool) { line := os.Getenv(envComplete) if line == "" { - return nil, false + return "", false } - return strings.Split(line, " "), true + return line, true } -func output(options []string) { - Log("") +func (c *Complete) output(options []string) { // stdout of program defines the complete options for _, option := range options { - fmt.Println(option) + fmt.Fprintln(c.Out, option) } } diff --git a/vendor/github.com/posener/complete/predict_set.go b/vendor/github.com/posener/complete/predict_set.go index 8fc59d714..fa4a34ae4 100644 --- a/vendor/github.com/posener/complete/predict_set.go +++ b/vendor/github.com/posener/complete/predict_set.go @@ -1,7 +1,5 @@ package complete -import "github.com/posener/complete/match" - // PredictSet expects specific set of terms, given in the options argument. func PredictSet(options ...string) Predictor { return predictSet(options) @@ -9,11 +7,6 @@ func PredictSet(options ...string) Predictor { type predictSet []string -func (p predictSet) Predict(a Args) (prediction []string) { - for _, m := range p { - if match.Prefix(m, a.Last) { - prediction = append(prediction, m) - } - } - return +func (p predictSet) Predict(a Args) []string { + return p } diff --git a/vendor/github.com/posener/complete/readme.md b/vendor/github.com/posener/complete/readme.md index 74077e357..2a999ba76 100644 --- a/vendor/github.com/posener/complete/readme.md +++ b/vendor/github.com/posener/complete/readme.md @@ -1,12 +1,12 @@ # complete +A tool for bash writing bash completion in go, and bash completion for the go command line. + [![Build Status](https://travis-ci.org/posener/complete.svg?branch=master)](https://travis-ci.org/posener/complete) [![codecov](https://codecov.io/gh/posener/complete/branch/master/graph/badge.svg)](https://codecov.io/gh/posener/complete) [![GoDoc](https://godoc.org/github.com/posener/complete?status.svg)](http://godoc.org/github.com/posener/complete) [![Go Report Card](https://goreportcard.com/badge/github.com/posener/complete)](https://goreportcard.com/report/github.com/posener/complete) -A tool for bash writing bash completion in go. - Writing bash completion scripts is a hard work. This package provides an easy way to create bash completion scripts for any command, and also an easy way to install/uninstall the completion of the command. @@ -42,6 +42,7 @@ Supported shells: - [x] bash - [x] zsh +- [x] fish ### Usage diff --git a/vendor/github.com/posener/complete/test.sh b/vendor/github.com/posener/complete/test.sh old mode 100755 new mode 100644 diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore b/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore new file mode 100644 index 000000000..023e7eb07 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore @@ -0,0 +1,35 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof +/.idea/ +.idea/compiler.xml +.idea/copyright/ +.idea/encodings.xml +.idea/misc.xml +.idea/modules.xml +.idea/profitbricks-sdk-go.iml +.idea/vcs.xml +.idea/workspace.xml +/.idea/libraries/ +.DS_Store diff --git a/vendor/github.com/ryanuber/go-glob/.travis.yml b/vendor/github.com/ryanuber/go-glob/.travis.yml new file mode 100644 index 000000000..9d1ca3c37 --- /dev/null +++ b/vendor/github.com/ryanuber/go-glob/.travis.yml @@ -0,0 +1,5 @@ +language: go +go: + - tip +script: + - go test -v ./... diff --git a/vendor/github.com/satori/go.uuid/.travis.yml b/vendor/github.com/satori/go.uuid/.travis.yml new file mode 100644 index 000000000..20dd53b8d --- /dev/null +++ b/vendor/github.com/satori/go.uuid/.travis.yml @@ -0,0 +1,23 @@ +language: go +sudo: false +go: + - 1.2 + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - 1.7 + - 1.8 + - 1.9 + - tip +matrix: + allow_failures: + - go: tip + fast_finish: true +before_install: + - go get github.com/mattn/goveralls + - go get golang.org/x/tools/cmd/cover +script: + - $HOME/gopath/bin/goveralls -service=travis-ci +notifications: + email: false diff --git a/vendor/github.com/satori/go.uuid/LICENSE b/vendor/github.com/satori/go.uuid/LICENSE index 488357b8a..926d54987 100644 --- a/vendor/github.com/satori/go.uuid/LICENSE +++ b/vendor/github.com/satori/go.uuid/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2013-2016 by Maxim Bublis +Copyright (C) 2013-2018 by Maxim Bublis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/vendor/github.com/satori/go.uuid/README.md b/vendor/github.com/satori/go.uuid/README.md index b6aad1c81..7b1a722df 100644 --- a/vendor/github.com/satori/go.uuid/README.md +++ b/vendor/github.com/satori/go.uuid/README.md @@ -59,7 +59,7 @@ func main() { ## Copyright -Copyright (C) 2013-2016 by Maxim Bublis . +Copyright (C) 2013-2018 by Maxim Bublis . UUID package released under MIT License. See [LICENSE](https://github.com/satori/go.uuid/blob/master/LICENSE) for details. diff --git a/vendor/github.com/satori/go.uuid/codec.go b/vendor/github.com/satori/go.uuid/codec.go new file mode 100644 index 000000000..656892c53 --- /dev/null +++ b/vendor/github.com/satori/go.uuid/codec.go @@ -0,0 +1,206 @@ +// Copyright (C) 2013-2018 by Maxim Bublis +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +package uuid + +import ( + "bytes" + "encoding/hex" + "fmt" +) + +// FromBytes returns UUID converted from raw byte slice input. +// It will return error if the slice isn't 16 bytes long. +func FromBytes(input []byte) (u UUID, err error) { + err = u.UnmarshalBinary(input) + return +} + +// FromBytesOrNil returns UUID converted from raw byte slice input. +// Same behavior as FromBytes, but returns a Nil UUID on error. +func FromBytesOrNil(input []byte) UUID { + uuid, err := FromBytes(input) + if err != nil { + return Nil + } + return uuid +} + +// FromString returns UUID parsed from string input. +// Input is expected in a form accepted by UnmarshalText. +func FromString(input string) (u UUID, err error) { + err = u.UnmarshalText([]byte(input)) + return +} + +// FromStringOrNil returns UUID parsed from string input. +// Same behavior as FromString, but returns a Nil UUID on error. +func FromStringOrNil(input string) UUID { + uuid, err := FromString(input) + if err != nil { + return Nil + } + return uuid +} + +// MarshalText implements the encoding.TextMarshaler interface. +// The encoding is the same as returned by String. +func (u UUID) MarshalText() (text []byte, err error) { + text = []byte(u.String()) + return +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +// Following formats are supported: +// "6ba7b810-9dad-11d1-80b4-00c04fd430c8", +// "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}", +// "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8" +// "6ba7b8109dad11d180b400c04fd430c8" +// ABNF for supported UUID text representation follows: +// uuid := canonical | hashlike | braced | urn +// plain := canonical | hashlike +// canonical := 4hexoct '-' 2hexoct '-' 2hexoct '-' 6hexoct +// hashlike := 12hexoct +// braced := '{' plain '}' +// urn := URN ':' UUID-NID ':' plain +// URN := 'urn' +// UUID-NID := 'uuid' +// 12hexoct := 6hexoct 6hexoct +// 6hexoct := 4hexoct 2hexoct +// 4hexoct := 2hexoct 2hexoct +// 2hexoct := hexoct hexoct +// hexoct := hexdig hexdig +// hexdig := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | +// 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | +// 'A' | 'B' | 'C' | 'D' | 'E' | 'F' +func (u *UUID) UnmarshalText(text []byte) (err error) { + switch len(text) { + case 32: + return u.decodeHashLike(text) + case 36: + return u.decodeCanonical(text) + case 38: + return u.decodeBraced(text) + case 41: + fallthrough + case 45: + return u.decodeURN(text) + default: + return fmt.Errorf("uuid: incorrect UUID length: %s", text) + } +} + +// decodeCanonical decodes UUID string in format +// "6ba7b810-9dad-11d1-80b4-00c04fd430c8". +func (u *UUID) decodeCanonical(t []byte) (err error) { + if t[8] != '-' || t[13] != '-' || t[18] != '-' || t[23] != '-' { + return fmt.Errorf("uuid: incorrect UUID format %s", t) + } + + src := t[:] + dst := u[:] + + for i, byteGroup := range byteGroups { + if i > 0 { + src = src[1:] // skip dash + } + _, err = hex.Decode(dst[:byteGroup/2], src[:byteGroup]) + if err != nil { + return + } + src = src[byteGroup:] + dst = dst[byteGroup/2:] + } + + return +} + +// decodeHashLike decodes UUID string in format +// "6ba7b8109dad11d180b400c04fd430c8". +func (u *UUID) decodeHashLike(t []byte) (err error) { + src := t[:] + dst := u[:] + + if _, err = hex.Decode(dst, src); err != nil { + return err + } + return +} + +// decodeBraced decodes UUID string in format +// "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}" or in format +// "{6ba7b8109dad11d180b400c04fd430c8}". +func (u *UUID) decodeBraced(t []byte) (err error) { + l := len(t) + + if t[0] != '{' || t[l-1] != '}' { + return fmt.Errorf("uuid: incorrect UUID format %s", t) + } + + return u.decodePlain(t[1 : l-1]) +} + +// decodeURN decodes UUID string in format +// "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8" or in format +// "urn:uuid:6ba7b8109dad11d180b400c04fd430c8". +func (u *UUID) decodeURN(t []byte) (err error) { + total := len(t) + + urn_uuid_prefix := t[:9] + + if !bytes.Equal(urn_uuid_prefix, urnPrefix) { + return fmt.Errorf("uuid: incorrect UUID format: %s", t) + } + + return u.decodePlain(t[9:total]) +} + +// decodePlain decodes UUID string in canonical format +// "6ba7b810-9dad-11d1-80b4-00c04fd430c8" or in hash-like format +// "6ba7b8109dad11d180b400c04fd430c8". +func (u *UUID) decodePlain(t []byte) (err error) { + switch len(t) { + case 32: + return u.decodeHashLike(t) + case 36: + return u.decodeCanonical(t) + default: + return fmt.Errorf("uuid: incorrrect UUID length: %s", t) + } +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface. +func (u UUID) MarshalBinary() (data []byte, err error) { + data = u.Bytes() + return +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. +// It will return error if the slice isn't 16 bytes long. +func (u *UUID) UnmarshalBinary(data []byte) (err error) { + if len(data) != Size { + err = fmt.Errorf("uuid: UUID must be exactly 16 bytes long, got %d bytes", len(data)) + return + } + copy(u[:], data) + + return +} diff --git a/vendor/github.com/satori/go.uuid/generator.go b/vendor/github.com/satori/go.uuid/generator.go new file mode 100644 index 000000000..3f2f1da2d --- /dev/null +++ b/vendor/github.com/satori/go.uuid/generator.go @@ -0,0 +1,239 @@ +// Copyright (C) 2013-2018 by Maxim Bublis +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +package uuid + +import ( + "crypto/md5" + "crypto/rand" + "crypto/sha1" + "encoding/binary" + "hash" + "net" + "os" + "sync" + "time" +) + +// Difference in 100-nanosecond intervals between +// UUID epoch (October 15, 1582) and Unix epoch (January 1, 1970). +const epochStart = 122192928000000000 + +var ( + global = newDefaultGenerator() + + epochFunc = unixTimeFunc + posixUID = uint32(os.Getuid()) + posixGID = uint32(os.Getgid()) +) + +// NewV1 returns UUID based on current timestamp and MAC address. +func NewV1() UUID { + return global.NewV1() +} + +// NewV2 returns DCE Security UUID based on POSIX UID/GID. +func NewV2(domain byte) UUID { + return global.NewV2(domain) +} + +// NewV3 returns UUID based on MD5 hash of namespace UUID and name. +func NewV3(ns UUID, name string) UUID { + return global.NewV3(ns, name) +} + +// NewV4 returns random generated UUID. +func NewV4() UUID { + return global.NewV4() +} + +// NewV5 returns UUID based on SHA-1 hash of namespace UUID and name. +func NewV5(ns UUID, name string) UUID { + return global.NewV5(ns, name) +} + +// Generator provides interface for generating UUIDs. +type Generator interface { + NewV1() UUID + NewV2(domain byte) UUID + NewV3(ns UUID, name string) UUID + NewV4() UUID + NewV5(ns UUID, name string) UUID +} + +// Default generator implementation. +type generator struct { + storageOnce sync.Once + storageMutex sync.Mutex + + lastTime uint64 + clockSequence uint16 + hardwareAddr [6]byte +} + +func newDefaultGenerator() Generator { + return &generator{} +} + +// NewV1 returns UUID based on current timestamp and MAC address. +func (g *generator) NewV1() UUID { + u := UUID{} + + timeNow, clockSeq, hardwareAddr := g.getStorage() + + binary.BigEndian.PutUint32(u[0:], uint32(timeNow)) + binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32)) + binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48)) + binary.BigEndian.PutUint16(u[8:], clockSeq) + + copy(u[10:], hardwareAddr) + + u.SetVersion(V1) + u.SetVariant(VariantRFC4122) + + return u +} + +// NewV2 returns DCE Security UUID based on POSIX UID/GID. +func (g *generator) NewV2(domain byte) UUID { + u := UUID{} + + timeNow, clockSeq, hardwareAddr := g.getStorage() + + switch domain { + case DomainPerson: + binary.BigEndian.PutUint32(u[0:], posixUID) + case DomainGroup: + binary.BigEndian.PutUint32(u[0:], posixGID) + } + + binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32)) + binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48)) + binary.BigEndian.PutUint16(u[8:], clockSeq) + u[9] = domain + + copy(u[10:], hardwareAddr) + + u.SetVersion(V2) + u.SetVariant(VariantRFC4122) + + return u +} + +// NewV3 returns UUID based on MD5 hash of namespace UUID and name. +func (g *generator) NewV3(ns UUID, name string) UUID { + u := newFromHash(md5.New(), ns, name) + u.SetVersion(V3) + u.SetVariant(VariantRFC4122) + + return u +} + +// NewV4 returns random generated UUID. +func (g *generator) NewV4() UUID { + u := UUID{} + g.safeRandom(u[:]) + u.SetVersion(V4) + u.SetVariant(VariantRFC4122) + + return u +} + +// NewV5 returns UUID based on SHA-1 hash of namespace UUID and name. +func (g *generator) NewV5(ns UUID, name string) UUID { + u := newFromHash(sha1.New(), ns, name) + u.SetVersion(V5) + u.SetVariant(VariantRFC4122) + + return u +} + +func (g *generator) initStorage() { + g.initClockSequence() + g.initHardwareAddr() +} + +func (g *generator) initClockSequence() { + buf := make([]byte, 2) + g.safeRandom(buf) + g.clockSequence = binary.BigEndian.Uint16(buf) +} + +func (g *generator) initHardwareAddr() { + interfaces, err := net.Interfaces() + if err == nil { + for _, iface := range interfaces { + if len(iface.HardwareAddr) >= 6 { + copy(g.hardwareAddr[:], iface.HardwareAddr) + return + } + } + } + + // Initialize hardwareAddr randomly in case + // of real network interfaces absence + g.safeRandom(g.hardwareAddr[:]) + + // Set multicast bit as recommended in RFC 4122 + g.hardwareAddr[0] |= 0x01 +} + +func (g *generator) safeRandom(dest []byte) { + if _, err := rand.Read(dest); err != nil { + panic(err) + } +} + +// Returns UUID v1/v2 storage state. +// Returns epoch timestamp, clock sequence, and hardware address. +func (g *generator) getStorage() (uint64, uint16, []byte) { + g.storageOnce.Do(g.initStorage) + + g.storageMutex.Lock() + defer g.storageMutex.Unlock() + + timeNow := epochFunc() + // Clock changed backwards since last UUID generation. + // Should increase clock sequence. + if timeNow <= g.lastTime { + g.clockSequence++ + } + g.lastTime = timeNow + + return timeNow, g.clockSequence, g.hardwareAddr[:] +} + +// Returns difference in 100-nanosecond intervals between +// UUID epoch (October 15, 1582) and current time. +// This is default epoch calculation function. +func unixTimeFunc() uint64 { + return epochStart + uint64(time.Now().UnixNano()/100) +} + +// Returns UUID based on hashing of namespace UUID and name. +func newFromHash(h hash.Hash, ns UUID, name string) UUID { + u := UUID{} + h.Write(ns[:]) + h.Write([]byte(name)) + copy(u[:], h.Sum(nil)) + + return u +} diff --git a/vendor/github.com/satori/go.uuid/sql.go b/vendor/github.com/satori/go.uuid/sql.go new file mode 100644 index 000000000..56759d390 --- /dev/null +++ b/vendor/github.com/satori/go.uuid/sql.go @@ -0,0 +1,78 @@ +// Copyright (C) 2013-2018 by Maxim Bublis +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +package uuid + +import ( + "database/sql/driver" + "fmt" +) + +// Value implements the driver.Valuer interface. +func (u UUID) Value() (driver.Value, error) { + return u.String(), nil +} + +// Scan implements the sql.Scanner interface. +// A 16-byte slice is handled by UnmarshalBinary, while +// a longer byte slice or a string is handled by UnmarshalText. +func (u *UUID) Scan(src interface{}) error { + switch src := src.(type) { + case []byte: + if len(src) == Size { + return u.UnmarshalBinary(src) + } + return u.UnmarshalText(src) + + case string: + return u.UnmarshalText([]byte(src)) + } + + return fmt.Errorf("uuid: cannot convert %T to UUID", src) +} + +// NullUUID can be used with the standard sql package to represent a +// UUID value that can be NULL in the database +type NullUUID struct { + UUID UUID + Valid bool +} + +// Value implements the driver.Valuer interface. +func (u NullUUID) Value() (driver.Value, error) { + if !u.Valid { + return nil, nil + } + // Delegate to UUID Value function + return u.UUID.Value() +} + +// Scan implements the sql.Scanner interface. +func (u *NullUUID) Scan(src interface{}) error { + if src == nil { + u.UUID, u.Valid = Nil, false + return nil + } + + // Delegate to UUID Scan function + u.Valid = true + return u.UUID.Scan(src) +} diff --git a/vendor/github.com/satori/go.uuid/uuid.go b/vendor/github.com/satori/go.uuid/uuid.go index 295f3fc2c..a2b8e2ca2 100644 --- a/vendor/github.com/satori/go.uuid/uuid.go +++ b/vendor/github.com/satori/go.uuid/uuid.go @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2015 by Maxim Bublis +// Copyright (C) 2013-2018 by Maxim Bublis // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -26,23 +26,29 @@ package uuid import ( "bytes" - "crypto/md5" - "crypto/rand" - "crypto/sha1" - "database/sql/driver" - "encoding/binary" "encoding/hex" - "fmt" - "hash" - "net" - "os" - "sync" - "time" +) + +// Size of a UUID in bytes. +const Size = 16 + +// UUID representation compliant with specification +// described in RFC 4122. +type UUID [Size]byte + +// UUID versions +const ( + _ byte = iota + V1 + V2 + V3 + V4 + V5 ) // UUID layout variants. const ( - VariantNCS = iota + VariantNCS byte = iota VariantRFC4122 VariantMicrosoft VariantFuture @@ -55,136 +61,48 @@ const ( DomainOrg ) -// Difference in 100-nanosecond intervals between -// UUID epoch (October 15, 1582) and Unix epoch (January 1, 1970). -const epochStart = 122192928000000000 - -// Used in string method conversion -const dash byte = '-' - -// UUID v1/v2 storage. -var ( - storageMutex sync.Mutex - storageOnce sync.Once - epochFunc = unixTimeFunc - clockSequence uint16 - lastTime uint64 - hardwareAddr [6]byte - posixUID = uint32(os.Getuid()) - posixGID = uint32(os.Getgid()) -) - // String parse helpers. var ( urnPrefix = []byte("urn:uuid:") byteGroups = []int{8, 4, 4, 4, 12} ) -func initClockSequence() { - buf := make([]byte, 2) - safeRandom(buf) - clockSequence = binary.BigEndian.Uint16(buf) -} - -func initHardwareAddr() { - interfaces, err := net.Interfaces() - if err == nil { - for _, iface := range interfaces { - if len(iface.HardwareAddr) >= 6 { - copy(hardwareAddr[:], iface.HardwareAddr) - return - } - } - } - - // Initialize hardwareAddr randomly in case - // of real network interfaces absence - safeRandom(hardwareAddr[:]) - - // Set multicast bit as recommended in RFC 4122 - hardwareAddr[0] |= 0x01 -} - -func initStorage() { - initClockSequence() - initHardwareAddr() -} - -func safeRandom(dest []byte) { - if _, err := rand.Read(dest); err != nil { - panic(err) - } -} - -// Returns difference in 100-nanosecond intervals between -// UUID epoch (October 15, 1582) and current time. -// This is default epoch calculation function. -func unixTimeFunc() uint64 { - return epochStart + uint64(time.Now().UnixNano()/100) -} - -// UUID representation compliant with specification -// described in RFC 4122. -type UUID [16]byte - -// NullUUID can be used with the standard sql package to represent a -// UUID value that can be NULL in the database -type NullUUID struct { - UUID UUID - Valid bool -} - -// The nil UUID is special form of UUID that is specified to have all +// Nil is special form of UUID that is specified to have all // 128 bits set to zero. var Nil = UUID{} // Predefined namespace UUIDs. var ( - NamespaceDNS, _ = FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8") - NamespaceURL, _ = FromString("6ba7b811-9dad-11d1-80b4-00c04fd430c8") - NamespaceOID, _ = FromString("6ba7b812-9dad-11d1-80b4-00c04fd430c8") - NamespaceX500, _ = FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8") + NamespaceDNS = Must(FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8")) + NamespaceURL = Must(FromString("6ba7b811-9dad-11d1-80b4-00c04fd430c8")) + NamespaceOID = Must(FromString("6ba7b812-9dad-11d1-80b4-00c04fd430c8")) + NamespaceX500 = Must(FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8")) ) -// And returns result of binary AND of two UUIDs. -func And(u1 UUID, u2 UUID) UUID { - u := UUID{} - for i := 0; i < 16; i++ { - u[i] = u1[i] & u2[i] - } - return u -} - -// Or returns result of binary OR of two UUIDs. -func Or(u1 UUID, u2 UUID) UUID { - u := UUID{} - for i := 0; i < 16; i++ { - u[i] = u1[i] | u2[i] - } - return u -} - // Equal returns true if u1 and u2 equals, otherwise returns false. func Equal(u1 UUID, u2 UUID) bool { return bytes.Equal(u1[:], u2[:]) } // Version returns algorithm version used to generate UUID. -func (u UUID) Version() uint { - return uint(u[6] >> 4) +func (u UUID) Version() byte { + return u[6] >> 4 } // Variant returns UUID layout variant. -func (u UUID) Variant() uint { +func (u UUID) Variant() byte { switch { - case (u[8] & 0x80) == 0x00: + case (u[8] >> 7) == 0x00: return VariantNCS - case (u[8]&0xc0)|0x80 == 0x80: + case (u[8] >> 6) == 0x02: return VariantRFC4122 - case (u[8]&0xe0)|0xc0 == 0xc0: + case (u[8] >> 5) == 0x06: return VariantMicrosoft + case (u[8] >> 5) == 0x07: + fallthrough + default: + return VariantFuture } - return VariantFuture } // Bytes returns bytes slice representation of UUID. @@ -198,13 +116,13 @@ func (u UUID) String() string { buf := make([]byte, 36) hex.Encode(buf[0:8], u[0:4]) - buf[8] = dash + buf[8] = '-' hex.Encode(buf[9:13], u[4:6]) - buf[13] = dash + buf[13] = '-' hex.Encode(buf[14:18], u[6:8]) - buf[18] = dash + buf[18] = '-' hex.Encode(buf[19:23], u[8:10]) - buf[23] = dash + buf[23] = '-' hex.Encode(buf[24:], u[10:]) return string(buf) @@ -215,267 +133,29 @@ func (u *UUID) SetVersion(v byte) { u[6] = (u[6] & 0x0f) | (v << 4) } -// SetVariant sets variant bits as described in RFC 4122. -func (u *UUID) SetVariant() { - u[8] = (u[8] & 0xbf) | 0x80 -} - -// MarshalText implements the encoding.TextMarshaler interface. -// The encoding is the same as returned by String. -func (u UUID) MarshalText() (text []byte, err error) { - text = []byte(u.String()) - return -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -// Following formats are supported: -// "6ba7b810-9dad-11d1-80b4-00c04fd430c8", -// "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}", -// "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8" -func (u *UUID) UnmarshalText(text []byte) (err error) { - if len(text) < 32 { - err = fmt.Errorf("uuid: UUID string too short: %s", text) - return +// SetVariant sets variant bits. +func (u *UUID) SetVariant(v byte) { + switch v { + case VariantNCS: + u[8] = (u[8]&(0xff>>1) | (0x00 << 7)) + case VariantRFC4122: + u[8] = (u[8]&(0xff>>2) | (0x02 << 6)) + case VariantMicrosoft: + u[8] = (u[8]&(0xff>>3) | (0x06 << 5)) + case VariantFuture: + fallthrough + default: + u[8] = (u[8]&(0xff>>3) | (0x07 << 5)) } - - t := text[:] - braced := false - - if bytes.Equal(t[:9], urnPrefix) { - t = t[9:] - } else if t[0] == '{' { - braced = true - t = t[1:] - } - - b := u[:] - - for i, byteGroup := range byteGroups { - if i > 0 { - if t[0] != '-' { - err = fmt.Errorf("uuid: invalid string format") - return - } - t = t[1:] - } - - if len(t) < byteGroup { - err = fmt.Errorf("uuid: UUID string too short: %s", text) - return - } - - if i == 4 && len(t) > byteGroup && - ((braced && t[byteGroup] != '}') || len(t[byteGroup:]) > 1 || !braced) { - err = fmt.Errorf("uuid: UUID string too long: %s", text) - return - } - - _, err = hex.Decode(b[:byteGroup/2], t[:byteGroup]) - if err != nil { - return - } - - t = t[byteGroup:] - b = b[byteGroup/2:] - } - - return } -// MarshalBinary implements the encoding.BinaryMarshaler interface. -func (u UUID) MarshalBinary() (data []byte, err error) { - data = u.Bytes() - return -} - -// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. -// It will return error if the slice isn't 16 bytes long. -func (u *UUID) UnmarshalBinary(data []byte) (err error) { - if len(data) != 16 { - err = fmt.Errorf("uuid: UUID must be exactly 16 bytes long, got %d bytes", len(data)) - return - } - copy(u[:], data) - - return -} - -// Value implements the driver.Valuer interface. -func (u UUID) Value() (driver.Value, error) { - return u.String(), nil -} - -// Scan implements the sql.Scanner interface. -// A 16-byte slice is handled by UnmarshalBinary, while -// a longer byte slice or a string is handled by UnmarshalText. -func (u *UUID) Scan(src interface{}) error { - switch src := src.(type) { - case []byte: - if len(src) == 16 { - return u.UnmarshalBinary(src) - } - return u.UnmarshalText(src) - - case string: - return u.UnmarshalText([]byte(src)) - } - - return fmt.Errorf("uuid: cannot convert %T to UUID", src) -} - -// Value implements the driver.Valuer interface. -func (u NullUUID) Value() (driver.Value, error) { - if !u.Valid { - return nil, nil - } - // Delegate to UUID Value function - return u.UUID.Value() -} - -// Scan implements the sql.Scanner interface. -func (u *NullUUID) Scan(src interface{}) error { - if src == nil { - u.UUID, u.Valid = Nil, false - return nil - } - - // Delegate to UUID Scan function - u.Valid = true - return u.UUID.Scan(src) -} - -// FromBytes returns UUID converted from raw byte slice input. -// It will return error if the slice isn't 16 bytes long. -func FromBytes(input []byte) (u UUID, err error) { - err = u.UnmarshalBinary(input) - return -} - -// FromBytesOrNil returns UUID converted from raw byte slice input. -// Same behavior as FromBytes, but returns a Nil UUID on error. -func FromBytesOrNil(input []byte) UUID { - uuid, err := FromBytes(input) +// Must is a helper that wraps a call to a function returning (UUID, error) +// and panics if the error is non-nil. It is intended for use in variable +// initializations such as +// var packageUUID = uuid.Must(uuid.FromString("123e4567-e89b-12d3-a456-426655440000")); +func Must(u UUID, err error) UUID { if err != nil { - return Nil + panic(err) } - return uuid -} - -// FromString returns UUID parsed from string input. -// Input is expected in a form accepted by UnmarshalText. -func FromString(input string) (u UUID, err error) { - err = u.UnmarshalText([]byte(input)) - return -} - -// FromStringOrNil returns UUID parsed from string input. -// Same behavior as FromString, but returns a Nil UUID on error. -func FromStringOrNil(input string) UUID { - uuid, err := FromString(input) - if err != nil { - return Nil - } - return uuid -} - -// Returns UUID v1/v2 storage state. -// Returns epoch timestamp, clock sequence, and hardware address. -func getStorage() (uint64, uint16, []byte) { - storageOnce.Do(initStorage) - - storageMutex.Lock() - defer storageMutex.Unlock() - - timeNow := epochFunc() - // Clock changed backwards since last UUID generation. - // Should increase clock sequence. - if timeNow <= lastTime { - clockSequence++ - } - lastTime = timeNow - - return timeNow, clockSequence, hardwareAddr[:] -} - -// NewV1 returns UUID based on current timestamp and MAC address. -func NewV1() UUID { - u := UUID{} - - timeNow, clockSeq, hardwareAddr := getStorage() - - binary.BigEndian.PutUint32(u[0:], uint32(timeNow)) - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32)) - binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48)) - binary.BigEndian.PutUint16(u[8:], clockSeq) - - copy(u[10:], hardwareAddr) - - u.SetVersion(1) - u.SetVariant() - - return u -} - -// NewV2 returns DCE Security UUID based on POSIX UID/GID. -func NewV2(domain byte) UUID { - u := UUID{} - - timeNow, clockSeq, hardwareAddr := getStorage() - - switch domain { - case DomainPerson: - binary.BigEndian.PutUint32(u[0:], posixUID) - case DomainGroup: - binary.BigEndian.PutUint32(u[0:], posixGID) - } - - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32)) - binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48)) - binary.BigEndian.PutUint16(u[8:], clockSeq) - u[9] = domain - - copy(u[10:], hardwareAddr) - - u.SetVersion(2) - u.SetVariant() - - return u -} - -// NewV3 returns UUID based on MD5 hash of namespace UUID and name. -func NewV3(ns UUID, name string) UUID { - u := newFromHash(md5.New(), ns, name) - u.SetVersion(3) - u.SetVariant() - - return u -} - -// NewV4 returns random generated UUID. -func NewV4() UUID { - u := UUID{} - safeRandom(u[:]) - u.SetVersion(4) - u.SetVariant() - - return u -} - -// NewV5 returns UUID based on SHA-1 hash of namespace UUID and name. -func NewV5(ns UUID, name string) UUID { - u := newFromHash(sha1.New(), ns, name) - u.SetVersion(5) - u.SetVariant() - - return u -} - -// Returns UUID based on hashing of namespace UUID and name. -func newFromHash(h hash.Hash, ns UUID, name string) UUID { - u := UUID{} - h.Write(ns[:]) - h.Write([]byte(name)) - copy(u[:], h.Sum(nil)) - return u } diff --git a/vendor/github.com/satori/uuid/LICENSE b/vendor/github.com/satori/uuid/LICENSE deleted file mode 100644 index 488357b8a..000000000 --- a/vendor/github.com/satori/uuid/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (C) 2013-2016 by Maxim Bublis - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/satori/uuid/README.md b/vendor/github.com/satori/uuid/README.md deleted file mode 100644 index b6aad1c81..000000000 --- a/vendor/github.com/satori/uuid/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# UUID package for Go language - -[![Build Status](https://travis-ci.org/satori/go.uuid.png?branch=master)](https://travis-ci.org/satori/go.uuid) -[![Coverage Status](https://coveralls.io/repos/github/satori/go.uuid/badge.svg?branch=master)](https://coveralls.io/github/satori/go.uuid) -[![GoDoc](http://godoc.org/github.com/satori/go.uuid?status.png)](http://godoc.org/github.com/satori/go.uuid) - -This package provides pure Go implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs. - -With 100% test coverage and benchmarks out of box. - -Supported versions: -* Version 1, based on timestamp and MAC address (RFC 4122) -* Version 2, based on timestamp, MAC address and POSIX UID/GID (DCE 1.1) -* Version 3, based on MD5 hashing (RFC 4122) -* Version 4, based on random numbers (RFC 4122) -* Version 5, based on SHA-1 hashing (RFC 4122) - -## Installation - -Use the `go` command: - - $ go get github.com/satori/go.uuid - -## Requirements - -UUID package requires Go >= 1.2. - -## Example - -```go -package main - -import ( - "fmt" - "github.com/satori/go.uuid" -) - -func main() { - // Creating UUID Version 4 - u1 := uuid.NewV4() - fmt.Printf("UUIDv4: %s\n", u1) - - // Parsing UUID from string input - u2, err := uuid.FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8") - if err != nil { - fmt.Printf("Something gone wrong: %s", err) - } - fmt.Printf("Successfully parsed: %s", u2) -} -``` - -## Documentation - -[Documentation](http://godoc.org/github.com/satori/go.uuid) is hosted at GoDoc project. - -## Links -* [RFC 4122](http://tools.ietf.org/html/rfc4122) -* [DCE 1.1: Authentication and Security Services](http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01) - -## Copyright - -Copyright (C) 2013-2016 by Maxim Bublis . - -UUID package released under MIT License. -See [LICENSE](https://github.com/satori/go.uuid/blob/master/LICENSE) for details. diff --git a/vendor/github.com/satori/uuid/uuid.go b/vendor/github.com/satori/uuid/uuid.go deleted file mode 100644 index 295f3fc2c..000000000 --- a/vendor/github.com/satori/uuid/uuid.go +++ /dev/null @@ -1,481 +0,0 @@ -// Copyright (C) 2013-2015 by Maxim Bublis -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -// Package uuid provides implementation of Universally Unique Identifier (UUID). -// Supported versions are 1, 3, 4 and 5 (as specified in RFC 4122) and -// version 2 (as specified in DCE 1.1). -package uuid - -import ( - "bytes" - "crypto/md5" - "crypto/rand" - "crypto/sha1" - "database/sql/driver" - "encoding/binary" - "encoding/hex" - "fmt" - "hash" - "net" - "os" - "sync" - "time" -) - -// UUID layout variants. -const ( - VariantNCS = iota - VariantRFC4122 - VariantMicrosoft - VariantFuture -) - -// UUID DCE domains. -const ( - DomainPerson = iota - DomainGroup - DomainOrg -) - -// Difference in 100-nanosecond intervals between -// UUID epoch (October 15, 1582) and Unix epoch (January 1, 1970). -const epochStart = 122192928000000000 - -// Used in string method conversion -const dash byte = '-' - -// UUID v1/v2 storage. -var ( - storageMutex sync.Mutex - storageOnce sync.Once - epochFunc = unixTimeFunc - clockSequence uint16 - lastTime uint64 - hardwareAddr [6]byte - posixUID = uint32(os.Getuid()) - posixGID = uint32(os.Getgid()) -) - -// String parse helpers. -var ( - urnPrefix = []byte("urn:uuid:") - byteGroups = []int{8, 4, 4, 4, 12} -) - -func initClockSequence() { - buf := make([]byte, 2) - safeRandom(buf) - clockSequence = binary.BigEndian.Uint16(buf) -} - -func initHardwareAddr() { - interfaces, err := net.Interfaces() - if err == nil { - for _, iface := range interfaces { - if len(iface.HardwareAddr) >= 6 { - copy(hardwareAddr[:], iface.HardwareAddr) - return - } - } - } - - // Initialize hardwareAddr randomly in case - // of real network interfaces absence - safeRandom(hardwareAddr[:]) - - // Set multicast bit as recommended in RFC 4122 - hardwareAddr[0] |= 0x01 -} - -func initStorage() { - initClockSequence() - initHardwareAddr() -} - -func safeRandom(dest []byte) { - if _, err := rand.Read(dest); err != nil { - panic(err) - } -} - -// Returns difference in 100-nanosecond intervals between -// UUID epoch (October 15, 1582) and current time. -// This is default epoch calculation function. -func unixTimeFunc() uint64 { - return epochStart + uint64(time.Now().UnixNano()/100) -} - -// UUID representation compliant with specification -// described in RFC 4122. -type UUID [16]byte - -// NullUUID can be used with the standard sql package to represent a -// UUID value that can be NULL in the database -type NullUUID struct { - UUID UUID - Valid bool -} - -// The nil UUID is special form of UUID that is specified to have all -// 128 bits set to zero. -var Nil = UUID{} - -// Predefined namespace UUIDs. -var ( - NamespaceDNS, _ = FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8") - NamespaceURL, _ = FromString("6ba7b811-9dad-11d1-80b4-00c04fd430c8") - NamespaceOID, _ = FromString("6ba7b812-9dad-11d1-80b4-00c04fd430c8") - NamespaceX500, _ = FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8") -) - -// And returns result of binary AND of two UUIDs. -func And(u1 UUID, u2 UUID) UUID { - u := UUID{} - for i := 0; i < 16; i++ { - u[i] = u1[i] & u2[i] - } - return u -} - -// Or returns result of binary OR of two UUIDs. -func Or(u1 UUID, u2 UUID) UUID { - u := UUID{} - for i := 0; i < 16; i++ { - u[i] = u1[i] | u2[i] - } - return u -} - -// Equal returns true if u1 and u2 equals, otherwise returns false. -func Equal(u1 UUID, u2 UUID) bool { - return bytes.Equal(u1[:], u2[:]) -} - -// Version returns algorithm version used to generate UUID. -func (u UUID) Version() uint { - return uint(u[6] >> 4) -} - -// Variant returns UUID layout variant. -func (u UUID) Variant() uint { - switch { - case (u[8] & 0x80) == 0x00: - return VariantNCS - case (u[8]&0xc0)|0x80 == 0x80: - return VariantRFC4122 - case (u[8]&0xe0)|0xc0 == 0xc0: - return VariantMicrosoft - } - return VariantFuture -} - -// Bytes returns bytes slice representation of UUID. -func (u UUID) Bytes() []byte { - return u[:] -} - -// Returns canonical string representation of UUID: -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. -func (u UUID) String() string { - buf := make([]byte, 36) - - hex.Encode(buf[0:8], u[0:4]) - buf[8] = dash - hex.Encode(buf[9:13], u[4:6]) - buf[13] = dash - hex.Encode(buf[14:18], u[6:8]) - buf[18] = dash - hex.Encode(buf[19:23], u[8:10]) - buf[23] = dash - hex.Encode(buf[24:], u[10:]) - - return string(buf) -} - -// SetVersion sets version bits. -func (u *UUID) SetVersion(v byte) { - u[6] = (u[6] & 0x0f) | (v << 4) -} - -// SetVariant sets variant bits as described in RFC 4122. -func (u *UUID) SetVariant() { - u[8] = (u[8] & 0xbf) | 0x80 -} - -// MarshalText implements the encoding.TextMarshaler interface. -// The encoding is the same as returned by String. -func (u UUID) MarshalText() (text []byte, err error) { - text = []byte(u.String()) - return -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -// Following formats are supported: -// "6ba7b810-9dad-11d1-80b4-00c04fd430c8", -// "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}", -// "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8" -func (u *UUID) UnmarshalText(text []byte) (err error) { - if len(text) < 32 { - err = fmt.Errorf("uuid: UUID string too short: %s", text) - return - } - - t := text[:] - braced := false - - if bytes.Equal(t[:9], urnPrefix) { - t = t[9:] - } else if t[0] == '{' { - braced = true - t = t[1:] - } - - b := u[:] - - for i, byteGroup := range byteGroups { - if i > 0 { - if t[0] != '-' { - err = fmt.Errorf("uuid: invalid string format") - return - } - t = t[1:] - } - - if len(t) < byteGroup { - err = fmt.Errorf("uuid: UUID string too short: %s", text) - return - } - - if i == 4 && len(t) > byteGroup && - ((braced && t[byteGroup] != '}') || len(t[byteGroup:]) > 1 || !braced) { - err = fmt.Errorf("uuid: UUID string too long: %s", text) - return - } - - _, err = hex.Decode(b[:byteGroup/2], t[:byteGroup]) - if err != nil { - return - } - - t = t[byteGroup:] - b = b[byteGroup/2:] - } - - return -} - -// MarshalBinary implements the encoding.BinaryMarshaler interface. -func (u UUID) MarshalBinary() (data []byte, err error) { - data = u.Bytes() - return -} - -// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. -// It will return error if the slice isn't 16 bytes long. -func (u *UUID) UnmarshalBinary(data []byte) (err error) { - if len(data) != 16 { - err = fmt.Errorf("uuid: UUID must be exactly 16 bytes long, got %d bytes", len(data)) - return - } - copy(u[:], data) - - return -} - -// Value implements the driver.Valuer interface. -func (u UUID) Value() (driver.Value, error) { - return u.String(), nil -} - -// Scan implements the sql.Scanner interface. -// A 16-byte slice is handled by UnmarshalBinary, while -// a longer byte slice or a string is handled by UnmarshalText. -func (u *UUID) Scan(src interface{}) error { - switch src := src.(type) { - case []byte: - if len(src) == 16 { - return u.UnmarshalBinary(src) - } - return u.UnmarshalText(src) - - case string: - return u.UnmarshalText([]byte(src)) - } - - return fmt.Errorf("uuid: cannot convert %T to UUID", src) -} - -// Value implements the driver.Valuer interface. -func (u NullUUID) Value() (driver.Value, error) { - if !u.Valid { - return nil, nil - } - // Delegate to UUID Value function - return u.UUID.Value() -} - -// Scan implements the sql.Scanner interface. -func (u *NullUUID) Scan(src interface{}) error { - if src == nil { - u.UUID, u.Valid = Nil, false - return nil - } - - // Delegate to UUID Scan function - u.Valid = true - return u.UUID.Scan(src) -} - -// FromBytes returns UUID converted from raw byte slice input. -// It will return error if the slice isn't 16 bytes long. -func FromBytes(input []byte) (u UUID, err error) { - err = u.UnmarshalBinary(input) - return -} - -// FromBytesOrNil returns UUID converted from raw byte slice input. -// Same behavior as FromBytes, but returns a Nil UUID on error. -func FromBytesOrNil(input []byte) UUID { - uuid, err := FromBytes(input) - if err != nil { - return Nil - } - return uuid -} - -// FromString returns UUID parsed from string input. -// Input is expected in a form accepted by UnmarshalText. -func FromString(input string) (u UUID, err error) { - err = u.UnmarshalText([]byte(input)) - return -} - -// FromStringOrNil returns UUID parsed from string input. -// Same behavior as FromString, but returns a Nil UUID on error. -func FromStringOrNil(input string) UUID { - uuid, err := FromString(input) - if err != nil { - return Nil - } - return uuid -} - -// Returns UUID v1/v2 storage state. -// Returns epoch timestamp, clock sequence, and hardware address. -func getStorage() (uint64, uint16, []byte) { - storageOnce.Do(initStorage) - - storageMutex.Lock() - defer storageMutex.Unlock() - - timeNow := epochFunc() - // Clock changed backwards since last UUID generation. - // Should increase clock sequence. - if timeNow <= lastTime { - clockSequence++ - } - lastTime = timeNow - - return timeNow, clockSequence, hardwareAddr[:] -} - -// NewV1 returns UUID based on current timestamp and MAC address. -func NewV1() UUID { - u := UUID{} - - timeNow, clockSeq, hardwareAddr := getStorage() - - binary.BigEndian.PutUint32(u[0:], uint32(timeNow)) - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32)) - binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48)) - binary.BigEndian.PutUint16(u[8:], clockSeq) - - copy(u[10:], hardwareAddr) - - u.SetVersion(1) - u.SetVariant() - - return u -} - -// NewV2 returns DCE Security UUID based on POSIX UID/GID. -func NewV2(domain byte) UUID { - u := UUID{} - - timeNow, clockSeq, hardwareAddr := getStorage() - - switch domain { - case DomainPerson: - binary.BigEndian.PutUint32(u[0:], posixUID) - case DomainGroup: - binary.BigEndian.PutUint32(u[0:], posixGID) - } - - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32)) - binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48)) - binary.BigEndian.PutUint16(u[8:], clockSeq) - u[9] = domain - - copy(u[10:], hardwareAddr) - - u.SetVersion(2) - u.SetVariant() - - return u -} - -// NewV3 returns UUID based on MD5 hash of namespace UUID and name. -func NewV3(ns UUID, name string) UUID { - u := newFromHash(md5.New(), ns, name) - u.SetVersion(3) - u.SetVariant() - - return u -} - -// NewV4 returns random generated UUID. -func NewV4() UUID { - u := UUID{} - safeRandom(u[:]) - u.SetVersion(4) - u.SetVariant() - - return u -} - -// NewV5 returns UUID based on SHA-1 hash of namespace UUID and name. -func NewV5(ns UUID, name string) UUID { - u := newFromHash(sha1.New(), ns, name) - u.SetVersion(5) - u.SetVariant() - - return u -} - -// Returns UUID based on hashing of namespace UUID and name. -func newFromHash(h hash.Hash, ns UUID, name string) UUID { - u := UUID{} - h.Write(ns[:]) - h.Write([]byte(name)) - copy(u[:], h.Sum(nil)) - - return u -} diff --git a/vendor/github.com/scaleway/scaleway-cli/pkg/sshcommand/sshcommand.go b/vendor/github.com/scaleway/scaleway-cli/pkg/sshcommand/sshcommand.go index 676b2f976..7852ca0be 100644 --- a/vendor/github.com/scaleway/scaleway-cli/pkg/sshcommand/sshcommand.go +++ b/vendor/github.com/scaleway/scaleway-cli/pkg/sshcommand/sshcommand.go @@ -51,9 +51,7 @@ func (c *Command) applyDefaults() { func (c *Command) Slice() []string { c.applyDefaults() - slice := []string{} - - slice = append(slice, "ssh") + slice := []string{"ssh"} if c.EnableSSHKeyForwarding { slice = append(slice, "-A") diff --git a/vendor/github.com/sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore new file mode 100644 index 000000000..6b7d7d1e8 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.gitignore @@ -0,0 +1,2 @@ +logrus +vendor diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml new file mode 100644 index 000000000..1f953bebd --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.travis.yml @@ -0,0 +1,51 @@ +language: go +env: + - GOMAXPROCS=4 GORACE=halt_on_error=1 +matrix: + include: + - go: 1.10.x + install: + - go get github.com/stretchr/testify/assert + - go get golang.org/x/crypto/ssh/terminal + - go get golang.org/x/sys/unix + - go get golang.org/x/sys/windows + script: + - go test -race -v ./... + - go: 1.11.x + env: GO111MODULE=on + install: + - go mod download + script: + - go test -race -v ./... + - go: 1.11.x + env: GO111MODULE=off + install: + - go get github.com/stretchr/testify/assert + - go get golang.org/x/crypto/ssh/terminal + - go get golang.org/x/sys/unix + - go get golang.org/x/sys/windows + script: + - go test -race -v ./... + - go: 1.10.x + install: + - go get github.com/stretchr/testify/assert + - go get golang.org/x/crypto/ssh/terminal + - go get golang.org/x/sys/unix + - go get golang.org/x/sys/windows + script: + - go test -race -v -tags appengine ./... + - go: 1.11.x + env: GO111MODULE=on + install: + - go mod download + script: + - go test -race -v -tags appengine ./... + - go: 1.11.x + env: GO111MODULE=off + install: + - go get github.com/stretchr/testify/assert + - go get golang.org/x/crypto/ssh/terminal + - go get golang.org/x/sys/unix + - go get golang.org/x/sys/windows + script: + - go test -race -v -tags appengine ./... diff --git a/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md index 1bd1deb29..cb85d9f9f 100644 --- a/vendor/github.com/sirupsen/logrus/CHANGELOG.md +++ b/vendor/github.com/sirupsen/logrus/CHANGELOG.md @@ -1,3 +1,45 @@ +# 1.2.0 +This new release introduces: + * A new method `SetReportCaller` in the `Logger` to enable the file, line and calling function from which the trace has been issued + * A new trace level named `Trace` whose level is below `Debug` + * A configurable exit function to be called upon a Fatal trace + * The `Level` object now implements `encoding.TextUnmarshaler` interface + +# 1.1.1 +This is a bug fix release. + * fix the build break on Solaris + * don't drop a whole trace in JSONFormatter when a field param is a function pointer which can not be serialized + +# 1.1.0 +This new release introduces: + * several fixes: + * a fix for a race condition on entry formatting + * proper cleanup of previously used entries before putting them back in the pool + * the extra new line at the end of message in text formatter has been removed + * a new global public API to check if a level is activated: IsLevelEnabled + * the following methods have been added to the Logger object + * IsLevelEnabled + * SetFormatter + * SetOutput + * ReplaceHooks + * introduction of go module + * an indent configuration for the json formatter + * output colour support for windows + * the field sort function is now configurable for text formatter + * the CLICOLOR and CLICOLOR\_FORCE environment variable support in text formater + +# 1.0.6 + +This new release introduces: + * a new api WithTime which allows to easily force the time of the log entry + which is mostly useful for logger wrapper + * a fix reverting the immutability of the entry given as parameter to the hooks + a new configuration field of the json formatter in order to put all the fields + in a nested dictionnary + * a new SetOutput method in the Logger + * a new configuration of the textformatter to configure the name of the default keys + * a new configuration of the text formatter to disable the level truncation + # 1.0.5 * Fix hooks race (#707) diff --git a/vendor/github.com/sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md index 9751da1bf..093bb13f8 100644 --- a/vendor/github.com/sirupsen/logrus/README.md +++ b/vendor/github.com/sirupsen/logrus/README.md @@ -56,8 +56,39 @@ time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4 time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009 time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true -exit status 1 ``` +To ensure this behaviour even if a TTY is attached, set your formatter as follows: + +```go + log.SetFormatter(&log.TextFormatter{ + DisableColors: true, + FullTimestamp: true, + }) +``` + +#### Logging Method Name + +If you wish to add the calling method as a field, instruct the logger via: +```go +log.SetReportCaller(true) +``` +This adds the caller as 'method' like so: + +```json +{"animal":"penguin","level":"fatal","method":"github.com/sirupsen/arcticcreatures.migrate","msg":"a penguin swims by", +"time":"2014-03-10 19:57:38.562543129 -0400 EDT"} +``` + +```text +time="2015-03-26T01:27:38-04:00" level=fatal method=github.com/sirupsen/arcticcreatures.migrate msg="a penguin swims by" animal=penguin +``` +Note that this does add measurable overhead - the cost will depend on the version of Go, but is +between 20 and 40% in recent tests with 1.6 and 1.7. You can validate this in your +environment via benchmarks: +``` +go test -bench=.*CallerTracing +``` + #### Case-sensitivity @@ -241,67 +272,15 @@ func init() { ``` Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md). -| Hook | Description | -| ----- | ----------- | -| [Airbrake "legacy"](https://github.com/gemnasium/logrus-airbrake-legacy-hook) | Send errors to an exception tracking service compatible with the Airbrake API V2. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. | -| [Airbrake](https://github.com/gemnasium/logrus-airbrake-hook) | Send errors to the Airbrake API V3. Uses the official [`gobrake`](https://github.com/airbrake/gobrake) behind the scenes. | -| [Amazon Kinesis](https://github.com/evalphobia/logrus_kinesis) | Hook for logging to [Amazon Kinesis](https://aws.amazon.com/kinesis/) | -| [Amqp-Hook](https://github.com/vladoatanasov/logrus_amqp) | Hook for logging to Amqp broker (Like RabbitMQ) | -| [Application Insights](https://github.com/jjcollinge/logrus-appinsights) | Hook for logging to [Application Insights](https://azure.microsoft.com/en-us/services/application-insights/) -| [AzureTableHook](https://github.com/kpfaulkner/azuretablehook/) | Hook for logging to Azure Table Storage| -| [Bugsnag](https://github.com/Shopify/logrus-bugsnag/blob/master/bugsnag.go) | Send errors to the Bugsnag exception tracking service. | -| [ClickHouse](https://github.com/oxgrouby/logrus-clickhouse-hook) | Send logs to [ClickHouse](https://clickhouse.yandex/) | -| [DeferPanic](https://github.com/deferpanic/dp-logrus) | Hook for logging to DeferPanic | -| [Discordrus](https://github.com/kz/discordrus) | Hook for logging to [Discord](https://discordapp.com/) | -| [ElasticSearch](https://github.com/sohlich/elogrus) | Hook for logging to ElasticSearch| -| [Firehose](https://github.com/beaubrewer/logrus_firehose) | Hook for logging to [Amazon Firehose](https://aws.amazon.com/kinesis/firehose/) -| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd | -| [Go-Slack](https://github.com/multiplay/go-slack) | Hook for logging to [Slack](https://slack.com) | -| [Graylog](https://github.com/gemnasium/logrus-graylog-hook) | Hook for logging to [Graylog](http://graylog2.org/) | -| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. | -| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger | -| [InfluxDB](https://github.com/Abramovic/logrus_influxdb) | Hook for logging to influxdb | -| [Influxus](http://github.com/vlad-doru/influxus) | Hook for concurrently logging to [InfluxDB](http://influxdata.com/) | -| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` | -| [KafkaLogrus](https://github.com/tracer0tong/kafkalogrus) | Hook for logging to Kafka | -| [Kafka REST Proxy](https://github.com/Nordstrom/logrus-kafka-rest-proxy) | Hook for logging to [Kafka REST Proxy](https://docs.confluent.io/current/kafka-rest/docs) | -| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem | -| [Logbeat](https://github.com/macandmia/logbeat) | Hook for logging to [Opbeat](https://opbeat.com/) | -| [Logentries](https://github.com/jcftang/logentriesrus) | Hook for logging to [Logentries](https://logentries.com/) | -| [Logentrus](https://github.com/puddingfactory/logentrus) | Hook for logging to [Logentries](https://logentries.com/) | -| [Logmatic.io](https://github.com/logmatic/logmatic-go) | Hook for logging to [Logmatic.io](http://logmatic.io/) | -| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) | -| [Logstash](https://github.com/bshuster-repo/logrus-logstash-hook) | Hook for logging to [Logstash](https://www.elastic.co/products/logstash) | -| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail | -| [Mattermost](https://github.com/shuLhan/mattermost-integration/tree/master/hooks/logrus) | Hook for logging to [Mattermost](https://mattermost.com/) | -| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb | -| [NATS-Hook](https://github.com/rybit/nats_logrus_hook) | Hook for logging to [NATS](https://nats.io) | -| [Octokit](https://github.com/dorajistyle/logrus-octokit-hook) | Hook for logging to github via octokit | -| [Papertrail](https://github.com/polds/logrus-papertrail-hook) | Send errors to the [Papertrail](https://papertrailapp.com) hosted logging service via UDP. | -| [PostgreSQL](https://github.com/gemnasium/logrus-postgresql-hook) | Send logs to [PostgreSQL](http://postgresql.org) | -| [Promrus](https://github.com/weaveworks/promrus) | Expose number of log messages as [Prometheus](https://prometheus.io/) metrics | -| [Pushover](https://github.com/toorop/logrus_pushover) | Send error via [Pushover](https://pushover.net) | -| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) | -| [Redis-Hook](https://github.com/rogierlommers/logrus-redis-hook) | Hook for logging to a ELK stack (through Redis) | -| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar | -| [Scribe](https://github.com/sagar8192/logrus-scribe-hook) | Hook for logging to [Scribe](https://github.com/facebookarchive/scribe)| -| [Sentry](https://github.com/evalphobia/logrus_sentry) | Send errors to the Sentry error logging and aggregation service. | -| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. | -| [Stackdriver](https://github.com/knq/sdhook) | Hook for logging to [Google Stackdriver](https://cloud.google.com/logging/) | -| [Sumorus](https://github.com/doublefree/sumorus) | Hook for logging to [SumoLogic](https://www.sumologic.com/)| -| [Syslog](https://github.com/sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. | -| [Syslog TLS](https://github.com/shinji62/logrus-syslog-ng) | Send errors to remote syslog server with TLS support. | -| [Telegram](https://github.com/rossmcdonald/telegram_hook) | Hook for logging errors to [Telegram](https://telegram.org/) | -| [TraceView](https://github.com/evalphobia/logrus_appneta) | Hook for logging to [AppNeta TraceView](https://www.appneta.com/products/traceview/) | -| [Typetalk](https://github.com/dragon3/logrus-typetalk-hook) | Hook for logging to [Typetalk](https://www.typetalk.in/) | -| [logz.io](https://github.com/ripcurld00d/logrus-logzio-hook) | Hook for logging to [logz.io](https://logz.io), a Log as a Service using Logstash | -| [SQS-Hook](https://github.com/tsarpaul/logrus_sqs) | Hook for logging to [Amazon Simple Queue Service (SQS)](https://aws.amazon.com/sqs/) | +A list of currently known of service hook can be found in this wiki [page](https://github.com/sirupsen/logrus/wiki/Hooks) + #### Level logging -Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic. +Logrus has seven logging levels: Trace, Debug, Info, Warning, Error, Fatal and Panic. ```go +log.Trace("Something very low level.") log.Debug("Useful debugging information.") log.Info("Something noteworthy happened!") log.Warn("You should probably take a look at this.") @@ -373,6 +352,8 @@ The built-in logging formatters are: field to `true`. To force no colored output even if there is a TTY set the `DisableColors` field to `true`. For Windows, see [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable). + * When colors are enabled, levels are truncated to 4 characters by default. To disable + truncation set the `DisableLevelTruncation` field to `true`. * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter). * `logrus.JSONFormatter`. Logs fields as JSON. * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter). @@ -496,7 +477,7 @@ logrus.RegisterExitHandler(handler) #### Thread safety -By default Logger is protected by mutex for concurrent writes, this mutex is invoked when calling hooks and writing logs. +By default, Logger is protected by a mutex for concurrent writes. The mutex is held when calling hooks and writing logs. If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking. Situation when locking is not needed includes: diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go index 778f4c9f0..cc85d3aab 100644 --- a/vendor/github.com/sirupsen/logrus/entry.go +++ b/vendor/github.com/sirupsen/logrus/entry.go @@ -4,11 +4,30 @@ import ( "bytes" "fmt" "os" + "reflect" + "runtime" + "strings" "sync" "time" ) -var bufferPool *sync.Pool +var ( + bufferPool *sync.Pool + + // qualified package name, cached at first use + logrusPackage string + + // Positions in the call stack when tracing to report the calling method + minimumCallerDepth int + + // Used for caller information initialisation + callerInitOnce sync.Once +) + +const ( + maximumCallerDepth int = 25 + knownLogrusFrames int = 4 +) func init() { bufferPool = &sync.Pool{ @@ -16,15 +35,18 @@ func init() { return new(bytes.Buffer) }, } + + // start at the bottom of the stack before the package-name cache is primed + minimumCallerDepth = 1 } // Defines the key when adding errors using WithError. var ErrorKey = "error" // An entry is the final or intermediate Logrus logging entry. It contains all -// the fields passed with WithField{,s}. It's finally logged when Debug, Info, -// Warn, Error, Fatal or Panic is called on it. These objects can be reused and -// passed around as much as you wish to avoid field duplication. +// the fields passed with WithField{,s}. It's finally logged when Trace, Debug, +// Info, Warn, Error, Fatal or Panic is called on it. These objects can be +// reused and passed around as much as you wish to avoid field duplication. type Entry struct { Logger *Logger @@ -34,22 +56,28 @@ type Entry struct { // Time at which the log entry was created Time time.Time - // Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic + // Level the log entry was logged at: Trace, Debug, Info, Warn, Error, Fatal or Panic // This field will be set on entry firing and the value will be equal to the one in Logger struct field. Level Level - // Message passed to Debug, Info, Warn, Error, Fatal or Panic + // Calling method, with package name + Caller *runtime.Frame + + // Message passed to Trace, Debug, Info, Warn, Error, Fatal or Panic Message string - // When formatter is called in entry.log(), an Buffer may be set to entry + // When formatter is called in entry.log(), a Buffer may be set to entry Buffer *bytes.Buffer + + // err may contain a field formatting error + err string } func NewEntry(logger *Logger) *Entry { return &Entry{ Logger: logger, - // Default is three fields, give a little extra room - Data: make(Fields, 5), + // Default is three fields, plus one optional. Give a little extra room. + Data: make(Fields, 6), } } @@ -80,19 +108,95 @@ func (entry *Entry) WithFields(fields Fields) *Entry { for k, v := range entry.Data { data[k] = v } + var field_err string for k, v := range fields { - data[k] = v + if t := reflect.TypeOf(v); t != nil && t.Kind() == reflect.Func { + field_err = fmt.Sprintf("can not add field %q", k) + if entry.err != "" { + field_err = entry.err + ", " + field_err + } + } else { + data[k] = v + } } - return &Entry{Logger: entry.Logger, Data: data} + return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, err: field_err} +} + +// Overrides the time of the Entry. +func (entry *Entry) WithTime(t time.Time) *Entry { + return &Entry{Logger: entry.Logger, Data: entry.Data, Time: t} +} + +// getPackageName reduces a fully qualified function name to the package name +// There really ought to be to be a better way... +func getPackageName(f string) string { + for { + lastPeriod := strings.LastIndex(f, ".") + lastSlash := strings.LastIndex(f, "/") + if lastPeriod > lastSlash { + f = f[:lastPeriod] + } else { + break + } + } + + return f +} + +// getCaller retrieves the name of the first non-logrus calling function +func getCaller() *runtime.Frame { + // Restrict the lookback frames to avoid runaway lookups + pcs := make([]uintptr, maximumCallerDepth) + depth := runtime.Callers(minimumCallerDepth, pcs) + frames := runtime.CallersFrames(pcs[:depth]) + + // cache this package's fully-qualified name + callerInitOnce.Do(func() { + logrusPackage = getPackageName(runtime.FuncForPC(pcs[0]).Name()) + + // now that we have the cache, we can skip a minimum count of known-logrus functions + // XXX this is dubious, the number of frames may vary store an entry in a logger interface + minimumCallerDepth = knownLogrusFrames + }) + + for f, again := frames.Next(); again; f, again = frames.Next() { + pkg := getPackageName(f.Function) + + // If the caller isn't part of this package, we're done + if pkg != logrusPackage { + return &f + } + } + + // if we got here, we failed to find the caller's context + return nil +} + +func (entry Entry) HasCaller() (has bool) { + return entry.Logger != nil && + entry.Logger.ReportCaller && + entry.Caller != nil } // This function is not declared with a pointer value because otherwise // race conditions will occur when using multiple goroutines func (entry Entry) log(level Level, msg string) { var buffer *bytes.Buffer - entry.Time = time.Now() + + // Default to now, but allow users to override if they want. + // + // We don't have to worry about polluting future calls to Entry#log() + // with this assignment because this function is declared with a + // non-pointer receiver. + if entry.Time.IsZero() { + entry.Time = time.Now() + } + entry.Level = level entry.Message = msg + if entry.Logger.ReportCaller { + entry.Caller = getCaller() + } entry.fireHooks() @@ -113,21 +217,19 @@ func (entry Entry) log(level Level, msg string) { } } -// This function is not declared with a pointer value because otherwise -// race conditions will occur when using multiple goroutines -func (entry Entry) fireHooks() { +func (entry *Entry) fireHooks() { entry.Logger.mu.Lock() defer entry.Logger.mu.Unlock() - err := entry.Logger.Hooks.Fire(entry.Level, &entry) + err := entry.Logger.Hooks.Fire(entry.Level, entry) if err != nil { fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err) } } func (entry *Entry) write() { - serialized, err := entry.Logger.Formatter.Format(entry) entry.Logger.mu.Lock() defer entry.Logger.mu.Unlock() + serialized, err := entry.Logger.Formatter.Format(entry) if err != nil { fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) } else { @@ -138,8 +240,14 @@ func (entry *Entry) write() { } } +func (entry *Entry) Trace(args ...interface{}) { + if entry.Logger.IsLevelEnabled(TraceLevel) { + entry.log(TraceLevel, fmt.Sprint(args...)) + } +} + func (entry *Entry) Debug(args ...interface{}) { - if entry.Logger.level() >= DebugLevel { + if entry.Logger.IsLevelEnabled(DebugLevel) { entry.log(DebugLevel, fmt.Sprint(args...)) } } @@ -149,13 +257,13 @@ func (entry *Entry) Print(args ...interface{}) { } func (entry *Entry) Info(args ...interface{}) { - if entry.Logger.level() >= InfoLevel { + if entry.Logger.IsLevelEnabled(InfoLevel) { entry.log(InfoLevel, fmt.Sprint(args...)) } } func (entry *Entry) Warn(args ...interface{}) { - if entry.Logger.level() >= WarnLevel { + if entry.Logger.IsLevelEnabled(WarnLevel) { entry.log(WarnLevel, fmt.Sprint(args...)) } } @@ -165,20 +273,20 @@ func (entry *Entry) Warning(args ...interface{}) { } func (entry *Entry) Error(args ...interface{}) { - if entry.Logger.level() >= ErrorLevel { + if entry.Logger.IsLevelEnabled(ErrorLevel) { entry.log(ErrorLevel, fmt.Sprint(args...)) } } func (entry *Entry) Fatal(args ...interface{}) { - if entry.Logger.level() >= FatalLevel { + if entry.Logger.IsLevelEnabled(FatalLevel) { entry.log(FatalLevel, fmt.Sprint(args...)) } - Exit(1) + entry.Logger.Exit(1) } func (entry *Entry) Panic(args ...interface{}) { - if entry.Logger.level() >= PanicLevel { + if entry.Logger.IsLevelEnabled(PanicLevel) { entry.log(PanicLevel, fmt.Sprint(args...)) } panic(fmt.Sprint(args...)) @@ -186,14 +294,20 @@ func (entry *Entry) Panic(args ...interface{}) { // Entry Printf family functions +func (entry *Entry) Tracef(format string, args ...interface{}) { + if entry.Logger.IsLevelEnabled(TraceLevel) { + entry.Trace(fmt.Sprintf(format, args...)) + } +} + func (entry *Entry) Debugf(format string, args ...interface{}) { - if entry.Logger.level() >= DebugLevel { + if entry.Logger.IsLevelEnabled(DebugLevel) { entry.Debug(fmt.Sprintf(format, args...)) } } func (entry *Entry) Infof(format string, args ...interface{}) { - if entry.Logger.level() >= InfoLevel { + if entry.Logger.IsLevelEnabled(InfoLevel) { entry.Info(fmt.Sprintf(format, args...)) } } @@ -203,7 +317,7 @@ func (entry *Entry) Printf(format string, args ...interface{}) { } func (entry *Entry) Warnf(format string, args ...interface{}) { - if entry.Logger.level() >= WarnLevel { + if entry.Logger.IsLevelEnabled(WarnLevel) { entry.Warn(fmt.Sprintf(format, args...)) } } @@ -213,34 +327,40 @@ func (entry *Entry) Warningf(format string, args ...interface{}) { } func (entry *Entry) Errorf(format string, args ...interface{}) { - if entry.Logger.level() >= ErrorLevel { + if entry.Logger.IsLevelEnabled(ErrorLevel) { entry.Error(fmt.Sprintf(format, args...)) } } func (entry *Entry) Fatalf(format string, args ...interface{}) { - if entry.Logger.level() >= FatalLevel { + if entry.Logger.IsLevelEnabled(FatalLevel) { entry.Fatal(fmt.Sprintf(format, args...)) } - Exit(1) + entry.Logger.Exit(1) } func (entry *Entry) Panicf(format string, args ...interface{}) { - if entry.Logger.level() >= PanicLevel { + if entry.Logger.IsLevelEnabled(PanicLevel) { entry.Panic(fmt.Sprintf(format, args...)) } } // Entry Println family functions +func (entry *Entry) Traceln(args ...interface{}) { + if entry.Logger.IsLevelEnabled(TraceLevel) { + entry.Trace(entry.sprintlnn(args...)) + } +} + func (entry *Entry) Debugln(args ...interface{}) { - if entry.Logger.level() >= DebugLevel { + if entry.Logger.IsLevelEnabled(DebugLevel) { entry.Debug(entry.sprintlnn(args...)) } } func (entry *Entry) Infoln(args ...interface{}) { - if entry.Logger.level() >= InfoLevel { + if entry.Logger.IsLevelEnabled(InfoLevel) { entry.Info(entry.sprintlnn(args...)) } } @@ -250,7 +370,7 @@ func (entry *Entry) Println(args ...interface{}) { } func (entry *Entry) Warnln(args ...interface{}) { - if entry.Logger.level() >= WarnLevel { + if entry.Logger.IsLevelEnabled(WarnLevel) { entry.Warn(entry.sprintlnn(args...)) } } @@ -260,20 +380,20 @@ func (entry *Entry) Warningln(args ...interface{}) { } func (entry *Entry) Errorln(args ...interface{}) { - if entry.Logger.level() >= ErrorLevel { + if entry.Logger.IsLevelEnabled(ErrorLevel) { entry.Error(entry.sprintlnn(args...)) } } func (entry *Entry) Fatalln(args ...interface{}) { - if entry.Logger.level() >= FatalLevel { + if entry.Logger.IsLevelEnabled(FatalLevel) { entry.Fatal(entry.sprintlnn(args...)) } - Exit(1) + entry.Logger.Exit(1) } func (entry *Entry) Panicln(args ...interface{}) { - if entry.Logger.level() >= PanicLevel { + if entry.Logger.IsLevelEnabled(PanicLevel) { entry.Panic(entry.sprintlnn(args...)) } } diff --git a/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go index 013183eda..7342613c3 100644 --- a/vendor/github.com/sirupsen/logrus/exported.go +++ b/vendor/github.com/sirupsen/logrus/exported.go @@ -2,6 +2,7 @@ package logrus import ( "io" + "time" ) var ( @@ -15,37 +16,38 @@ func StandardLogger() *Logger { // SetOutput sets the standard logger output. func SetOutput(out io.Writer) { - std.mu.Lock() - defer std.mu.Unlock() - std.Out = out + std.SetOutput(out) } // SetFormatter sets the standard logger formatter. func SetFormatter(formatter Formatter) { - std.mu.Lock() - defer std.mu.Unlock() - std.Formatter = formatter + std.SetFormatter(formatter) +} + +// SetReportCaller sets whether the standard logger will include the calling +// method as a field. +func SetReportCaller(include bool) { + std.SetReportCaller(include) } // SetLevel sets the standard logger level. func SetLevel(level Level) { - std.mu.Lock() - defer std.mu.Unlock() std.SetLevel(level) } // GetLevel returns the standard logger level. func GetLevel() Level { - std.mu.Lock() - defer std.mu.Unlock() - return std.level() + return std.GetLevel() +} + +// IsLevelEnabled checks if the log level of the standard logger is greater than the level param +func IsLevelEnabled(level Level) bool { + return std.IsLevelEnabled(level) } // AddHook adds a hook to the standard logger hooks. func AddHook(hook Hook) { - std.mu.Lock() - defer std.mu.Unlock() - std.Hooks.Add(hook) + std.AddHook(hook) } // WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key. @@ -72,6 +74,20 @@ func WithFields(fields Fields) *Entry { return std.WithFields(fields) } +// WithTime creats an entry from the standard logger and overrides the time of +// logs generated with it. +// +// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal +// or Panic on the Entry it returns. +func WithTime(t time.Time) *Entry { + return std.WithTime(t) +} + +// Trace logs a message at level Trace on the standard logger. +func Trace(args ...interface{}) { + std.Trace(args...) +} + // Debug logs a message at level Debug on the standard logger. func Debug(args ...interface{}) { std.Debug(args...) @@ -107,11 +123,16 @@ func Panic(args ...interface{}) { std.Panic(args...) } -// Fatal logs a message at level Fatal on the standard logger. +// Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1. func Fatal(args ...interface{}) { std.Fatal(args...) } +// Tracef logs a message at level Trace on the standard logger. +func Tracef(format string, args ...interface{}) { + std.Tracef(format, args...) +} + // Debugf logs a message at level Debug on the standard logger. func Debugf(format string, args ...interface{}) { std.Debugf(format, args...) @@ -147,11 +168,16 @@ func Panicf(format string, args ...interface{}) { std.Panicf(format, args...) } -// Fatalf logs a message at level Fatal on the standard logger. +// Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1. func Fatalf(format string, args ...interface{}) { std.Fatalf(format, args...) } +// Traceln logs a message at level Trace on the standard logger. +func Traceln(args ...interface{}) { + std.Traceln(args...) +} + // Debugln logs a message at level Debug on the standard logger. func Debugln(args ...interface{}) { std.Debugln(args...) @@ -187,7 +213,7 @@ func Panicln(args ...interface{}) { std.Panicln(args...) } -// Fatalln logs a message at level Fatal on the standard logger. +// Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1. func Fatalln(args ...interface{}) { std.Fatalln(args...) } diff --git a/vendor/github.com/sirupsen/logrus/formatter.go b/vendor/github.com/sirupsen/logrus/formatter.go index b183ff5b1..408883773 100644 --- a/vendor/github.com/sirupsen/logrus/formatter.go +++ b/vendor/github.com/sirupsen/logrus/formatter.go @@ -2,7 +2,16 @@ package logrus import "time" -const defaultTimestampFormat = time.RFC3339 +// Default key names for the default fields +const ( + defaultTimestampFormat = time.RFC3339 + FieldKeyMsg = "msg" + FieldKeyLevel = "level" + FieldKeyTime = "time" + FieldKeyLogrusError = "logrus_error" + FieldKeyFunc = "func" + FieldKeyFile = "file" +) // The Formatter interface is used to implement a custom Formatter. It takes an // `Entry`. It exposes all the fields, including the default ones: @@ -18,7 +27,7 @@ type Formatter interface { Format(*Entry) ([]byte, error) } -// This is to not silently overwrite `time`, `msg` and `level` fields when +// This is to not silently overwrite `time`, `msg`, `func` and `level` fields when // dumping it. If this code wasn't there doing: // // logrus.WithField("level", 1).Info("hello") @@ -30,16 +39,40 @@ type Formatter interface { // // It's not exported because it's still using Data in an opinionated way. It's to // avoid code duplication between the two default formatters. -func prefixFieldClashes(data Fields) { - if t, ok := data["time"]; ok { - data["fields.time"] = t +func prefixFieldClashes(data Fields, fieldMap FieldMap, reportCaller bool) { + timeKey := fieldMap.resolve(FieldKeyTime) + if t, ok := data[timeKey]; ok { + data["fields."+timeKey] = t + delete(data, timeKey) } - if m, ok := data["msg"]; ok { - data["fields.msg"] = m + msgKey := fieldMap.resolve(FieldKeyMsg) + if m, ok := data[msgKey]; ok { + data["fields."+msgKey] = m + delete(data, msgKey) } - if l, ok := data["level"]; ok { - data["fields.level"] = l + levelKey := fieldMap.resolve(FieldKeyLevel) + if l, ok := data[levelKey]; ok { + data["fields."+levelKey] = l + delete(data, levelKey) + } + + logrusErrKey := fieldMap.resolve(FieldKeyLogrusError) + if l, ok := data[logrusErrKey]; ok { + data["fields."+logrusErrKey] = l + delete(data, logrusErrKey) + } + + // If reportCaller is not set, 'func' will not conflict. + if reportCaller { + funcKey := fieldMap.resolve(FieldKeyFunc) + if l, ok := data[funcKey]; ok { + data["fields."+funcKey] = l + } + fileKey := fieldMap.resolve(FieldKeyFile) + if l, ok := data[fileKey]; ok { + data["fields."+fileKey] = l + } } } diff --git a/vendor/github.com/sirupsen/logrus/go.mod b/vendor/github.com/sirupsen/logrus/go.mod new file mode 100644 index 000000000..94574cc63 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/go.mod @@ -0,0 +1,11 @@ +module github.com/sirupsen/logrus + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/konsorten/go-windows-terminal-sequences v1.0.1 + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/objx v0.1.1 // indirect + github.com/stretchr/testify v1.2.2 + golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 + golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 +) diff --git a/vendor/github.com/sirupsen/logrus/go.sum b/vendor/github.com/sirupsen/logrus/go.sum new file mode 100644 index 000000000..133d34ae1 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/go.sum @@ -0,0 +1,15 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe h1:CHRGQ8V7OlCYtwaKPJi3iA7J+YdNKdo8j7nG5IgDhjs= +github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go index fb01c1b10..260575359 100644 --- a/vendor/github.com/sirupsen/logrus/json_formatter.go +++ b/vendor/github.com/sirupsen/logrus/json_formatter.go @@ -1,6 +1,7 @@ package logrus import ( + "bytes" "encoding/json" "fmt" ) @@ -10,13 +11,6 @@ type fieldKey string // FieldMap allows customization of the key names for default fields. type FieldMap map[fieldKey]string -// Default key names for the default fields -const ( - FieldKeyMsg = "msg" - FieldKeyLevel = "level" - FieldKeyTime = "time" -) - func (f FieldMap) resolve(key fieldKey) string { if k, ok := f[key]; ok { return k @@ -33,21 +27,28 @@ type JSONFormatter struct { // DisableTimestamp allows disabling automatic timestamps in output DisableTimestamp bool + // DataKey allows users to put all the log entry parameters into a nested dictionary at a given key. + DataKey string + // FieldMap allows users to customize the names of keys for default fields. // As an example: // formatter := &JSONFormatter{ // FieldMap: FieldMap{ - // FieldKeyTime: "@timestamp", + // FieldKeyTime: "@timestamp", // FieldKeyLevel: "@level", - // FieldKeyMsg: "@message", + // FieldKeyMsg: "@message", + // FieldKeyFunc: "@caller", // }, // } FieldMap FieldMap + + // PrettyPrint will indent all json logs + PrettyPrint bool } // Format renders a single log entry func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { - data := make(Fields, len(entry.Data)+3) + data := make(Fields, len(entry.Data)+4) for k, v := range entry.Data { switch v := v.(type) { case error: @@ -58,22 +59,47 @@ func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { data[k] = v } } - prefixFieldClashes(data) + + if f.DataKey != "" { + newData := make(Fields, 4) + newData[f.DataKey] = data + data = newData + } + + prefixFieldClashes(data, f.FieldMap, entry.HasCaller()) timestampFormat := f.TimestampFormat if timestampFormat == "" { timestampFormat = defaultTimestampFormat } + if entry.err != "" { + data[f.FieldMap.resolve(FieldKeyLogrusError)] = entry.err + } if !f.DisableTimestamp { data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat) } data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String() + if entry.HasCaller() { + data[f.FieldMap.resolve(FieldKeyFunc)] = entry.Caller.Function + data[f.FieldMap.resolve(FieldKeyFile)] = fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) + } - serialized, err := json.Marshal(data) - if err != nil { + var b *bytes.Buffer + if entry.Buffer != nil { + b = entry.Buffer + } else { + b = &bytes.Buffer{} + } + + encoder := json.NewEncoder(b) + if f.PrettyPrint { + encoder.SetIndent("", " ") + } + if err := encoder.Encode(data); err != nil { return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) } - return append(serialized, '\n'), nil + + return b.Bytes(), nil } diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go index fdaf8a653..5ceca0eab 100644 --- a/vendor/github.com/sirupsen/logrus/logger.go +++ b/vendor/github.com/sirupsen/logrus/logger.go @@ -5,12 +5,13 @@ import ( "os" "sync" "sync/atomic" + "time" ) type Logger struct { // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a // file, or leave it default which is `os.Stderr`. You can also set this to - // something more adventorous, such as logging to Kafka. + // something more adventurous, such as logging to Kafka. Out io.Writer // Hooks for the logger instance. These allow firing events based on logging // levels and log entries. For example, to send errors to an error tracking @@ -23,6 +24,10 @@ type Logger struct { // own that implements the `Formatter` interface, see the `README` or included // formatters for examples. Formatter Formatter + + // Flag for whether to log caller info (off by default) + ReportCaller bool + // The logging level the logger should log at. This is typically (and defaults // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be // logged. @@ -31,8 +36,12 @@ type Logger struct { mu MutexWrap // Reusable empty entry entryPool sync.Pool + // Function to exit the application, defaults to `os.Exit()` + ExitFunc exitFunc } +type exitFunc func(int) + type MutexWrap struct { lock sync.Mutex disabled bool @@ -68,10 +77,12 @@ func (mw *MutexWrap) Disable() { // It's recommended to make this a global instance called `log`. func New() *Logger { return &Logger{ - Out: os.Stderr, - Formatter: new(TextFormatter), - Hooks: make(LevelHooks), - Level: InfoLevel, + Out: os.Stderr, + Formatter: new(TextFormatter), + Hooks: make(LevelHooks), + Level: InfoLevel, + ExitFunc: os.Exit, + ReportCaller: false, } } @@ -84,11 +95,12 @@ func (logger *Logger) newEntry() *Entry { } func (logger *Logger) releaseEntry(entry *Entry) { + entry.Data = map[string]interface{}{} logger.entryPool.Put(entry) } // Adds a field to the log entry, note that it doesn't log until you call -// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry. +// Debug, Print, Info, Warn, Error, Fatal or Panic. It only creates a log entry. // If you want multiple fields, use `WithFields`. func (logger *Logger) WithField(key string, value interface{}) *Entry { entry := logger.newEntry() @@ -112,8 +124,23 @@ func (logger *Logger) WithError(err error) *Entry { return entry.WithError(err) } +// Overrides the time of the log entry. +func (logger *Logger) WithTime(t time.Time) *Entry { + entry := logger.newEntry() + defer logger.releaseEntry(entry) + return entry.WithTime(t) +} + +func (logger *Logger) Tracef(format string, args ...interface{}) { + if logger.IsLevelEnabled(TraceLevel) { + entry := logger.newEntry() + entry.Tracef(format, args...) + logger.releaseEntry(entry) + } +} + func (logger *Logger) Debugf(format string, args ...interface{}) { - if logger.level() >= DebugLevel { + if logger.IsLevelEnabled(DebugLevel) { entry := logger.newEntry() entry.Debugf(format, args...) logger.releaseEntry(entry) @@ -121,7 +148,7 @@ func (logger *Logger) Debugf(format string, args ...interface{}) { } func (logger *Logger) Infof(format string, args ...interface{}) { - if logger.level() >= InfoLevel { + if logger.IsLevelEnabled(InfoLevel) { entry := logger.newEntry() entry.Infof(format, args...) logger.releaseEntry(entry) @@ -135,7 +162,7 @@ func (logger *Logger) Printf(format string, args ...interface{}) { } func (logger *Logger) Warnf(format string, args ...interface{}) { - if logger.level() >= WarnLevel { + if logger.IsLevelEnabled(WarnLevel) { entry := logger.newEntry() entry.Warnf(format, args...) logger.releaseEntry(entry) @@ -143,7 +170,7 @@ func (logger *Logger) Warnf(format string, args ...interface{}) { } func (logger *Logger) Warningf(format string, args ...interface{}) { - if logger.level() >= WarnLevel { + if logger.IsLevelEnabled(WarnLevel) { entry := logger.newEntry() entry.Warnf(format, args...) logger.releaseEntry(entry) @@ -151,7 +178,7 @@ func (logger *Logger) Warningf(format string, args ...interface{}) { } func (logger *Logger) Errorf(format string, args ...interface{}) { - if logger.level() >= ErrorLevel { + if logger.IsLevelEnabled(ErrorLevel) { entry := logger.newEntry() entry.Errorf(format, args...) logger.releaseEntry(entry) @@ -159,24 +186,32 @@ func (logger *Logger) Errorf(format string, args ...interface{}) { } func (logger *Logger) Fatalf(format string, args ...interface{}) { - if logger.level() >= FatalLevel { + if logger.IsLevelEnabled(FatalLevel) { entry := logger.newEntry() entry.Fatalf(format, args...) logger.releaseEntry(entry) } - Exit(1) + logger.Exit(1) } func (logger *Logger) Panicf(format string, args ...interface{}) { - if logger.level() >= PanicLevel { + if logger.IsLevelEnabled(PanicLevel) { entry := logger.newEntry() entry.Panicf(format, args...) logger.releaseEntry(entry) } } +func (logger *Logger) Trace(args ...interface{}) { + if logger.IsLevelEnabled(TraceLevel) { + entry := logger.newEntry() + entry.Trace(args...) + logger.releaseEntry(entry) + } +} + func (logger *Logger) Debug(args ...interface{}) { - if logger.level() >= DebugLevel { + if logger.IsLevelEnabled(DebugLevel) { entry := logger.newEntry() entry.Debug(args...) logger.releaseEntry(entry) @@ -184,7 +219,7 @@ func (logger *Logger) Debug(args ...interface{}) { } func (logger *Logger) Info(args ...interface{}) { - if logger.level() >= InfoLevel { + if logger.IsLevelEnabled(InfoLevel) { entry := logger.newEntry() entry.Info(args...) logger.releaseEntry(entry) @@ -198,7 +233,7 @@ func (logger *Logger) Print(args ...interface{}) { } func (logger *Logger) Warn(args ...interface{}) { - if logger.level() >= WarnLevel { + if logger.IsLevelEnabled(WarnLevel) { entry := logger.newEntry() entry.Warn(args...) logger.releaseEntry(entry) @@ -206,7 +241,7 @@ func (logger *Logger) Warn(args ...interface{}) { } func (logger *Logger) Warning(args ...interface{}) { - if logger.level() >= WarnLevel { + if logger.IsLevelEnabled(WarnLevel) { entry := logger.newEntry() entry.Warn(args...) logger.releaseEntry(entry) @@ -214,7 +249,7 @@ func (logger *Logger) Warning(args ...interface{}) { } func (logger *Logger) Error(args ...interface{}) { - if logger.level() >= ErrorLevel { + if logger.IsLevelEnabled(ErrorLevel) { entry := logger.newEntry() entry.Error(args...) logger.releaseEntry(entry) @@ -222,24 +257,32 @@ func (logger *Logger) Error(args ...interface{}) { } func (logger *Logger) Fatal(args ...interface{}) { - if logger.level() >= FatalLevel { + if logger.IsLevelEnabled(FatalLevel) { entry := logger.newEntry() entry.Fatal(args...) logger.releaseEntry(entry) } - Exit(1) + logger.Exit(1) } func (logger *Logger) Panic(args ...interface{}) { - if logger.level() >= PanicLevel { + if logger.IsLevelEnabled(PanicLevel) { entry := logger.newEntry() entry.Panic(args...) logger.releaseEntry(entry) } } +func (logger *Logger) Traceln(args ...interface{}) { + if logger.IsLevelEnabled(TraceLevel) { + entry := logger.newEntry() + entry.Traceln(args...) + logger.releaseEntry(entry) + } +} + func (logger *Logger) Debugln(args ...interface{}) { - if logger.level() >= DebugLevel { + if logger.IsLevelEnabled(DebugLevel) { entry := logger.newEntry() entry.Debugln(args...) logger.releaseEntry(entry) @@ -247,7 +290,7 @@ func (logger *Logger) Debugln(args ...interface{}) { } func (logger *Logger) Infoln(args ...interface{}) { - if logger.level() >= InfoLevel { + if logger.IsLevelEnabled(InfoLevel) { entry := logger.newEntry() entry.Infoln(args...) logger.releaseEntry(entry) @@ -261,7 +304,7 @@ func (logger *Logger) Println(args ...interface{}) { } func (logger *Logger) Warnln(args ...interface{}) { - if logger.level() >= WarnLevel { + if logger.IsLevelEnabled(WarnLevel) { entry := logger.newEntry() entry.Warnln(args...) logger.releaseEntry(entry) @@ -269,7 +312,7 @@ func (logger *Logger) Warnln(args ...interface{}) { } func (logger *Logger) Warningln(args ...interface{}) { - if logger.level() >= WarnLevel { + if logger.IsLevelEnabled(WarnLevel) { entry := logger.newEntry() entry.Warnln(args...) logger.releaseEntry(entry) @@ -277,7 +320,7 @@ func (logger *Logger) Warningln(args ...interface{}) { } func (logger *Logger) Errorln(args ...interface{}) { - if logger.level() >= ErrorLevel { + if logger.IsLevelEnabled(ErrorLevel) { entry := logger.newEntry() entry.Errorln(args...) logger.releaseEntry(entry) @@ -285,22 +328,30 @@ func (logger *Logger) Errorln(args ...interface{}) { } func (logger *Logger) Fatalln(args ...interface{}) { - if logger.level() >= FatalLevel { + if logger.IsLevelEnabled(FatalLevel) { entry := logger.newEntry() entry.Fatalln(args...) logger.releaseEntry(entry) } - Exit(1) + logger.Exit(1) } func (logger *Logger) Panicln(args ...interface{}) { - if logger.level() >= PanicLevel { + if logger.IsLevelEnabled(PanicLevel) { entry := logger.newEntry() entry.Panicln(args...) logger.releaseEntry(entry) } } +func (logger *Logger) Exit(code int) { + runHandlers() + if logger.ExitFunc == nil { + logger.ExitFunc = os.Exit + } + logger.ExitFunc(code) +} + //When file is opened with appending mode, it's safe to //write concurrently to a file (within 4k message on Linux). //In these cases user can choose to disable the lock. @@ -312,12 +363,53 @@ func (logger *Logger) level() Level { return Level(atomic.LoadUint32((*uint32)(&logger.Level))) } +// SetLevel sets the logger level. func (logger *Logger) SetLevel(level Level) { atomic.StoreUint32((*uint32)(&logger.Level), uint32(level)) } +// GetLevel returns the logger level. +func (logger *Logger) GetLevel() Level { + return logger.level() +} + +// AddHook adds a hook to the logger hooks. func (logger *Logger) AddHook(hook Hook) { logger.mu.Lock() defer logger.mu.Unlock() logger.Hooks.Add(hook) } + +// IsLevelEnabled checks if the log level of the logger is greater than the level param +func (logger *Logger) IsLevelEnabled(level Level) bool { + return logger.level() >= level +} + +// SetFormatter sets the logger formatter. +func (logger *Logger) SetFormatter(formatter Formatter) { + logger.mu.Lock() + defer logger.mu.Unlock() + logger.Formatter = formatter +} + +// SetOutput sets the logger output. +func (logger *Logger) SetOutput(output io.Writer) { + logger.mu.Lock() + defer logger.mu.Unlock() + logger.Out = output +} + +func (logger *Logger) SetReportCaller(reportCaller bool) { + logger.mu.Lock() + defer logger.mu.Unlock() + logger.ReportCaller = reportCaller +} + +// ReplaceHooks replaces the logger hooks and returns the old ones +func (logger *Logger) ReplaceHooks(hooks LevelHooks) LevelHooks { + logger.mu.Lock() + oldHooks := logger.Hooks + logger.Hooks = hooks + logger.mu.Unlock() + return oldHooks +} diff --git a/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go index dd3899974..4ef451866 100644 --- a/vendor/github.com/sirupsen/logrus/logrus.go +++ b/vendor/github.com/sirupsen/logrus/logrus.go @@ -15,6 +15,8 @@ type Level uint32 // Convert the Level to a string. E.g. PanicLevel becomes "panic". func (level Level) String() string { switch level { + case TraceLevel: + return "trace" case DebugLevel: return "debug" case InfoLevel: @@ -47,12 +49,26 @@ func ParseLevel(lvl string) (Level, error) { return InfoLevel, nil case "debug": return DebugLevel, nil + case "trace": + return TraceLevel, nil } var l Level return l, fmt.Errorf("not a valid logrus Level: %q", lvl) } +// UnmarshalText implements encoding.TextUnmarshaler. +func (level *Level) UnmarshalText(text []byte) error { + l, err := ParseLevel(string(text)) + if err != nil { + return err + } + + *level = Level(l) + + return nil +} + // A constant exposing all logging levels var AllLevels = []Level{ PanicLevel, @@ -61,6 +77,7 @@ var AllLevels = []Level{ WarnLevel, InfoLevel, DebugLevel, + TraceLevel, } // These are the different logging levels. You can set the logging level to log @@ -69,7 +86,7 @@ const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel Level = iota - // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the + // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. @@ -82,6 +99,8 @@ const ( InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel + // TraceLevel level. Designates finer-grained informational events than the Debug. + TraceLevel ) // Won't compile if StdLogger can't be realized by a log.Logger @@ -140,4 +159,20 @@ type FieldLogger interface { Errorln(args ...interface{}) Fatalln(args ...interface{}) Panicln(args ...interface{}) + + // IsDebugEnabled() bool + // IsInfoEnabled() bool + // IsWarnEnabled() bool + // IsErrorEnabled() bool + // IsFatalEnabled() bool + // IsPanicEnabled() bool +} + +// Ext1FieldLogger (the first extension to FieldLogger) is superfluous, it is +// here for consistancy. Do not use. Use Logger or Entry instead. +type Ext1FieldLogger interface { + FieldLogger + Tracef(format string, args ...interface{}) + Trace(args ...interface{}) + Traceln(args ...interface{}) } diff --git a/vendor/github.com/sirupsen/logrus/terminal_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_bsd.go deleted file mode 100644 index 4880d13d2..000000000 --- a/vendor/github.com/sirupsen/logrus/terminal_bsd.go +++ /dev/null @@ -1,10 +0,0 @@ -// +build darwin freebsd openbsd netbsd dragonfly -// +build !appengine,!gopherjs - -package logrus - -import "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TIOCGETA - -type Termios unix.Termios diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go index 3de08e802..2403de981 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go @@ -1,4 +1,4 @@ -// +build appengine gopherjs +// +build appengine package logrus diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_js.go b/vendor/github.com/sirupsen/logrus/terminal_check_js.go new file mode 100644 index 000000000..0c209750a --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_js.go @@ -0,0 +1,11 @@ +// +build js + +package logrus + +import ( + "io" +) + +func checkIfTerminal(w io.Writer) bool { + return false +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go index 067047a12..cf309d6fb 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go @@ -1,4 +1,4 @@ -// +build !appengine,!gopherjs +// +build !appengine,!js,!windows package logrus diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go new file mode 100644 index 000000000..3b9d2864c --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go @@ -0,0 +1,20 @@ +// +build !appengine,!js,windows + +package logrus + +import ( + "io" + "os" + "syscall" +) + +func checkIfTerminal(w io.Writer) bool { + switch v := w.(type) { + case *os.File: + var mode uint32 + err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode) + return err == nil + default: + return false + } +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_notwindows.go b/vendor/github.com/sirupsen/logrus/terminal_notwindows.go new file mode 100644 index 000000000..3dbd23720 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_notwindows.go @@ -0,0 +1,8 @@ +// +build !windows + +package logrus + +import "io" + +func initTerminal(w io.Writer) { +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_windows.go b/vendor/github.com/sirupsen/logrus/terminal_windows.go new file mode 100644 index 000000000..b4ef5286c --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_windows.go @@ -0,0 +1,18 @@ +// +build !appengine,!js,windows + +package logrus + +import ( + "io" + "os" + "syscall" + + sequences "github.com/konsorten/go-windows-terminal-sequences" +) + +func initTerminal(w io.Writer) { + switch v := w.(type) { + case *os.File: + sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true) + } +} diff --git a/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go index 61b21caea..49ec92f17 100644 --- a/vendor/github.com/sirupsen/logrus/text_formatter.go +++ b/vendor/github.com/sirupsen/logrus/text_formatter.go @@ -3,6 +3,7 @@ package logrus import ( "bytes" "fmt" + "os" "sort" "strings" "sync" @@ -20,6 +21,7 @@ const ( var ( baseTimestamp time.Time + emptyFieldMap FieldMap ) func init() { @@ -34,6 +36,9 @@ type TextFormatter struct { // Force disabling colors. DisableColors bool + // Override coloring based on CLICOLOR and CLICOLOR_FORCE. - https://bixense.com/clicolors/ + EnvironmentOverrideColors bool + // Disable timestamp logging. useful when output is redirected to logging // system that already adds timestamps. DisableTimestamp bool @@ -50,60 +55,132 @@ type TextFormatter struct { // be desired. DisableSorting bool + // The keys sorting function, when uninitialized it uses sort.Strings. + SortingFunc func([]string) + + // Disables the truncation of the level text to 4 characters. + DisableLevelTruncation bool + // QuoteEmptyFields will wrap empty fields in quotes if true QuoteEmptyFields bool // Whether the logger's out is to a terminal isTerminal bool - sync.Once + // FieldMap allows users to customize the names of keys for default fields. + // As an example: + // formatter := &TextFormatter{ + // FieldMap: FieldMap{ + // FieldKeyTime: "@timestamp", + // FieldKeyLevel: "@level", + // FieldKeyMsg: "@message"}} + FieldMap FieldMap + + terminalInitOnce sync.Once } func (f *TextFormatter) init(entry *Entry) { if entry.Logger != nil { f.isTerminal = checkIfTerminal(entry.Logger.Out) + + if f.isTerminal { + initTerminal(entry.Logger.Out) + } } } +func (f *TextFormatter) isColored() bool { + isColored := f.ForceColors || f.isTerminal + + if f.EnvironmentOverrideColors { + if force, ok := os.LookupEnv("CLICOLOR_FORCE"); ok && force != "0" { + isColored = true + } else if ok && force == "0" { + isColored = false + } else if os.Getenv("CLICOLOR") == "0" { + isColored = false + } + } + + return isColored && !f.DisableColors +} + // Format renders a single log entry func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { - var b *bytes.Buffer + prefixFieldClashes(entry.Data, f.FieldMap, entry.HasCaller()) + keys := make([]string, 0, len(entry.Data)) for k := range entry.Data { keys = append(keys, k) } - if !f.DisableSorting { - sort.Strings(keys) + fixedKeys := make([]string, 0, 4+len(entry.Data)) + if !f.DisableTimestamp { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyTime)) } + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLevel)) + if entry.Message != "" { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyMsg)) + } + if entry.err != "" { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLogrusError)) + } + if entry.HasCaller() { + fixedKeys = append(fixedKeys, + f.FieldMap.resolve(FieldKeyFunc), f.FieldMap.resolve(FieldKeyFile)) + } + + if !f.DisableSorting { + if f.SortingFunc == nil { + sort.Strings(keys) + fixedKeys = append(fixedKeys, keys...) + } else { + if !f.isColored() { + fixedKeys = append(fixedKeys, keys...) + f.SortingFunc(fixedKeys) + } else { + f.SortingFunc(keys) + } + } + } else { + fixedKeys = append(fixedKeys, keys...) + } + + var b *bytes.Buffer if entry.Buffer != nil { b = entry.Buffer } else { b = &bytes.Buffer{} } - prefixFieldClashes(entry.Data) - - f.Do(func() { f.init(entry) }) - - isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors + f.terminalInitOnce.Do(func() { f.init(entry) }) timestampFormat := f.TimestampFormat if timestampFormat == "" { timestampFormat = defaultTimestampFormat } - if isColored { + if f.isColored() { f.printColored(b, entry, keys, timestampFormat) } else { - if !f.DisableTimestamp { - f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat)) - } - f.appendKeyValue(b, "level", entry.Level.String()) - if entry.Message != "" { - f.appendKeyValue(b, "msg", entry.Message) - } - for _, key := range keys { - f.appendKeyValue(b, key, entry.Data[key]) + for _, key := range fixedKeys { + var value interface{} + switch { + case key == f.FieldMap.resolve(FieldKeyTime): + value = entry.Time.Format(timestampFormat) + case key == f.FieldMap.resolve(FieldKeyLevel): + value = entry.Level.String() + case key == f.FieldMap.resolve(FieldKeyMsg): + value = entry.Message + case key == f.FieldMap.resolve(FieldKeyLogrusError): + value = entry.err + case key == f.FieldMap.resolve(FieldKeyFunc) && entry.HasCaller(): + value = entry.Caller.Function + case key == f.FieldMap.resolve(FieldKeyFile) && entry.HasCaller(): + value = fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) + default: + value = entry.Data[key] + } + f.appendKeyValue(b, key, value) } } @@ -114,7 +191,7 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) { var levelColor int switch entry.Level { - case DebugLevel: + case DebugLevel, TraceLevel: levelColor = gray case WarnLevel: levelColor = yellow @@ -124,14 +201,28 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin levelColor = blue } - levelText := strings.ToUpper(entry.Level.String())[0:4] + levelText := strings.ToUpper(entry.Level.String()) + if !f.DisableLevelTruncation { + levelText = levelText[0:4] + } + + // Remove a single newline if it already exists in the message to keep + // the behavior of logrus text_formatter the same as the stdlib log package + entry.Message = strings.TrimSuffix(entry.Message, "\n") + + caller := "" + + if entry.HasCaller() { + caller = fmt.Sprintf("%s:%d %s()", + entry.Caller.File, entry.Caller.Line, entry.Caller.Function) + } if f.DisableTimestamp { - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m %-44s ", levelColor, levelText, entry.Message) + fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m%s %-44s ", levelColor, levelText, caller, entry.Message) } else if !f.FullTimestamp { - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), entry.Message) + fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d]%s %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), caller, entry.Message) } else { - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message) + fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s]%s %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), caller, entry.Message) } for _, k := range keys { v := entry.Data[k] diff --git a/vendor/github.com/sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go index 7bdebedc6..9e1f75135 100644 --- a/vendor/github.com/sirupsen/logrus/writer.go +++ b/vendor/github.com/sirupsen/logrus/writer.go @@ -24,6 +24,8 @@ func (entry *Entry) WriterLevel(level Level) *io.PipeWriter { var printFunc func(args ...interface{}) switch level { + case TraceLevel: + printFunc = entry.Trace case DebugLevel: printFunc = entry.Debug case InfoLevel: diff --git a/vendor/github.com/stretchr/objx/Gopkg.lock b/vendor/github.com/stretchr/objx/Gopkg.lock deleted file mode 100644 index 1f5739c91..000000000 --- a/vendor/github.com/stretchr/objx/Gopkg.lock +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - name = "github.com/stretchr/testify" - packages = ["assert"] - revision = "b91bfb9ebec76498946beb6af7c0230c7cc7ba6c" - version = "v1.2.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "50e2495ec1af6e2f7ffb2f3551e4300d30357d7c7fe38ff6056469fa9cfb3673" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/github.com/stretchr/objx/Gopkg.toml b/vendor/github.com/stretchr/objx/Gopkg.toml deleted file mode 100644 index f87e18eb5..000000000 --- a/vendor/github.com/stretchr/objx/Gopkg.toml +++ /dev/null @@ -1,3 +0,0 @@ -[[constraint]] - name = "github.com/stretchr/testify" - version = "~1.2.0" diff --git a/vendor/github.com/stretchr/objx/README.md b/vendor/github.com/stretchr/objx/README.md deleted file mode 100644 index 4e2400eb1..000000000 --- a/vendor/github.com/stretchr/objx/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# Objx -[![Build Status](https://travis-ci.org/stretchr/objx.svg?branch=master)](https://travis-ci.org/stretchr/objx) -[![Go Report Card](https://goreportcard.com/badge/github.com/stretchr/objx)](https://goreportcard.com/report/github.com/stretchr/objx) -[![Sourcegraph](https://sourcegraph.com/github.com/stretchr/objx/-/badge.svg)](https://sourcegraph.com/github.com/stretchr/objx) -[![GoDoc](https://godoc.org/github.com/stretchr/objx?status.svg)](https://godoc.org/github.com/stretchr/objx) - -Objx - Go package for dealing with maps, slices, JSON and other data. - -Get started: - -- Install Objx with [one line of code](#installation), or [update it with another](#staying-up-to-date) -- Check out the API Documentation http://godoc.org/github.com/stretchr/objx - -## Overview -Objx provides the `objx.Map` type, which is a `map[string]interface{}` that exposes a powerful `Get` method (among others) that allows you to easily and quickly get access to data within the map, without having to worry too much about type assertions, missing data, default values etc. - -### Pattern -Objx uses a preditable pattern to make access data from within `map[string]interface{}` easy. Call one of the `objx.` functions to create your `objx.Map` to get going: - - m, err := objx.FromJSON(json) - -NOTE: Any methods or functions with the `Must` prefix will panic if something goes wrong, the rest will be optimistic and try to figure things out without panicking. - -Use `Get` to access the value you're interested in. You can use dot and array -notation too: - - m.Get("places[0].latlng") - -Once you have sought the `Value` you're interested in, you can use the `Is*` methods to determine its type. - - if m.Get("code").IsStr() { // Your code... } - -Or you can just assume the type, and use one of the strong type methods to extract the real value: - - m.Get("code").Int() - -If there's no value there (or if it's the wrong type) then a default value will be returned, or you can be explicit about the default value. - - Get("code").Int(-1) - -If you're dealing with a slice of data as a value, Objx provides many useful methods for iterating, manipulating and selecting that data. You can find out more by exploring the index below. - -### Reading data -A simple example of how to use Objx: - - // Use MustFromJSON to make an objx.Map from some JSON - m := objx.MustFromJSON(`{"name": "Mat", "age": 30}`) - - // Get the details - name := m.Get("name").Str() - age := m.Get("age").Int() - - // Get their nickname (or use their name if they don't have one) - nickname := m.Get("nickname").Str(name) - -### Ranging -Since `objx.Map` is a `map[string]interface{}` you can treat it as such. For example, to `range` the data, do what you would expect: - - m := objx.MustFromJSON(json) - for key, value := range m { - // Your code... - } - -## Installation -To install Objx, use go get: - - go get github.com/stretchr/objx - -### Staying up to date -To update Objx to the latest version, run: - - go get -u github.com/stretchr/objx - -### Supported go versions -We support the lastest two major Go versions, which are 1.8 and 1.9 at the moment. - -## Contributing -Please feel free to submit issues, fork the repository and send pull requests! diff --git a/vendor/github.com/stretchr/objx/Taskfile.yml b/vendor/github.com/stretchr/objx/Taskfile.yml deleted file mode 100644 index 403b5f06e..000000000 --- a/vendor/github.com/stretchr/objx/Taskfile.yml +++ /dev/null @@ -1,26 +0,0 @@ -default: - deps: [test] - -dl-deps: - desc: Downloads cli dependencies - cmds: - - go get -u github.com/golang/lint/golint - - go get -u github.com/golang/dep/cmd/dep - -update-deps: - desc: Updates dependencies - cmds: - - dep ensure - - dep ensure -update - - dep prune - -lint: - desc: Runs golint - cmds: - - golint $(ls *.go | grep -v "doc.go") - silent: true - -test: - desc: Runs go tests - cmds: - - go test -race . diff --git a/vendor/github.com/stretchr/objx/accessors.go b/vendor/github.com/stretchr/objx/accessors.go deleted file mode 100644 index d95be0ca9..000000000 --- a/vendor/github.com/stretchr/objx/accessors.go +++ /dev/null @@ -1,171 +0,0 @@ -package objx - -import ( - "fmt" - "regexp" - "strconv" - "strings" -) - -// arrayAccesRegexString is the regex used to extract the array number -// from the access path -const arrayAccesRegexString = `^(.+)\[([0-9]+)\]$` - -// arrayAccesRegex is the compiled arrayAccesRegexString -var arrayAccesRegex = regexp.MustCompile(arrayAccesRegexString) - -// Get gets the value using the specified selector and -// returns it inside a new Obj object. -// -// If it cannot find the value, Get will return a nil -// value inside an instance of Obj. -// -// Get can only operate directly on map[string]interface{} and []interface. -// -// Example -// -// To access the title of the third chapter of the second book, do: -// -// o.Get("books[1].chapters[2].title") -func (m Map) Get(selector string) *Value { - rawObj := access(m, selector, nil, false, false) - return &Value{data: rawObj} -} - -// Set sets the value using the specified selector and -// returns the object on which Set was called. -// -// Set can only operate directly on map[string]interface{} and []interface -// -// Example -// -// To set the title of the third chapter of the second book, do: -// -// o.Set("books[1].chapters[2].title","Time to Go") -func (m Map) Set(selector string, value interface{}) Map { - access(m, selector, value, true, false) - return m -} - -// access accesses the object using the selector and performs the -// appropriate action. -func access(current, selector, value interface{}, isSet, panics bool) interface{} { - - switch selector.(type) { - case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - - if array, ok := current.([]interface{}); ok { - index := intFromInterface(selector) - - if index >= len(array) { - if panics { - panic(fmt.Sprintf("objx: Index %d is out of range. Slice only contains %d items.", index, len(array))) - } - return nil - } - - return array[index] - } - - return nil - - case string: - - selStr := selector.(string) - selSegs := strings.SplitN(selStr, PathSeparator, 2) - thisSel := selSegs[0] - index := -1 - var err error - - if strings.Contains(thisSel, "[") { - arrayMatches := arrayAccesRegex.FindStringSubmatch(thisSel) - - if len(arrayMatches) > 0 { - // Get the key into the map - thisSel = arrayMatches[1] - - // Get the index into the array at the key - index, err = strconv.Atoi(arrayMatches[2]) - - if err != nil { - // This should never happen. If it does, something has gone - // seriously wrong. Panic. - panic("objx: Array index is not an integer. Must use array[int].") - } - } - } - - if curMap, ok := current.(Map); ok { - current = map[string]interface{}(curMap) - } - - // get the object in question - switch current.(type) { - case map[string]interface{}: - curMSI := current.(map[string]interface{}) - if len(selSegs) <= 1 && isSet { - curMSI[thisSel] = value - return nil - } - current = curMSI[thisSel] - default: - current = nil - } - - if current == nil && panics { - panic(fmt.Sprintf("objx: '%v' invalid on object.", selector)) - } - - // do we need to access the item of an array? - if index > -1 { - if array, ok := current.([]interface{}); ok { - if index < len(array) { - current = array[index] - } else { - if panics { - panic(fmt.Sprintf("objx: Index %d is out of range. Slice only contains %d items.", index, len(array))) - } - current = nil - } - } - } - - if len(selSegs) > 1 { - current = access(current, selSegs[1], value, isSet, panics) - } - - } - return current -} - -// intFromInterface converts an interface object to the largest -// representation of an unsigned integer using a type switch and -// assertions -func intFromInterface(selector interface{}) int { - var value int - switch selector.(type) { - case int: - value = selector.(int) - case int8: - value = int(selector.(int8)) - case int16: - value = int(selector.(int16)) - case int32: - value = int(selector.(int32)) - case int64: - value = int(selector.(int64)) - case uint: - value = int(selector.(uint)) - case uint8: - value = int(selector.(uint8)) - case uint16: - value = int(selector.(uint16)) - case uint32: - value = int(selector.(uint32)) - case uint64: - value = int(selector.(uint64)) - default: - panic("objx: array access argument is not an integer type (this should never happen)") - } - return value -} diff --git a/vendor/github.com/stretchr/objx/constants.go b/vendor/github.com/stretchr/objx/constants.go deleted file mode 100644 index f9eb42a25..000000000 --- a/vendor/github.com/stretchr/objx/constants.go +++ /dev/null @@ -1,13 +0,0 @@ -package objx - -const ( - // PathSeparator is the character used to separate the elements - // of the keypath. - // - // For example, `location.address.city` - PathSeparator string = "." - - // SignatureSeparator is the character that is used to - // separate the Base64 string from the security signature. - SignatureSeparator = "_" -) diff --git a/vendor/github.com/stretchr/objx/conversions.go b/vendor/github.com/stretchr/objx/conversions.go deleted file mode 100644 index 5e020f310..000000000 --- a/vendor/github.com/stretchr/objx/conversions.go +++ /dev/null @@ -1,108 +0,0 @@ -package objx - -import ( - "bytes" - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "net/url" -) - -// JSON converts the contained object to a JSON string -// representation -func (m Map) JSON() (string, error) { - result, err := json.Marshal(m) - if err != nil { - err = errors.New("objx: JSON encode failed with: " + err.Error()) - } - return string(result), err -} - -// MustJSON converts the contained object to a JSON string -// representation and panics if there is an error -func (m Map) MustJSON() string { - result, err := m.JSON() - if err != nil { - panic(err.Error()) - } - return result -} - -// Base64 converts the contained object to a Base64 string -// representation of the JSON string representation -func (m Map) Base64() (string, error) { - var buf bytes.Buffer - - jsonData, err := m.JSON() - if err != nil { - return "", err - } - - encoder := base64.NewEncoder(base64.StdEncoding, &buf) - _, err = encoder.Write([]byte(jsonData)) - if err != nil { - return "", err - } - _ = encoder.Close() - - return buf.String(), nil -} - -// MustBase64 converts the contained object to a Base64 string -// representation of the JSON string representation and panics -// if there is an error -func (m Map) MustBase64() string { - result, err := m.Base64() - if err != nil { - panic(err.Error()) - } - return result -} - -// SignedBase64 converts the contained object to a Base64 string -// representation of the JSON string representation and signs it -// using the provided key. -func (m Map) SignedBase64(key string) (string, error) { - base64, err := m.Base64() - if err != nil { - return "", err - } - - sig := HashWithKey(base64, key) - return base64 + SignatureSeparator + sig, nil -} - -// MustSignedBase64 converts the contained object to a Base64 string -// representation of the JSON string representation and signs it -// using the provided key and panics if there is an error -func (m Map) MustSignedBase64(key string) string { - result, err := m.SignedBase64(key) - if err != nil { - panic(err.Error()) - } - return result -} - -/* - URL Query - ------------------------------------------------ -*/ - -// URLValues creates a url.Values object from an Obj. This -// function requires that the wrapped object be a map[string]interface{} -func (m Map) URLValues() url.Values { - vals := make(url.Values) - for k, v := range m { - //TODO: can this be done without sprintf? - vals.Set(k, fmt.Sprintf("%v", v)) - } - return vals -} - -// URLQuery gets an encoded URL query representing the given -// Obj. This function requires that the wrapped object be a -// map[string]interface{} -func (m Map) URLQuery() (string, error) { - return m.URLValues().Encode(), nil -} diff --git a/vendor/github.com/stretchr/objx/doc.go b/vendor/github.com/stretchr/objx/doc.go deleted file mode 100644 index 6d6af1a83..000000000 --- a/vendor/github.com/stretchr/objx/doc.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Objx - Go package for dealing with maps, slices, JSON and other data. - -Overview - -Objx provides the `objx.Map` type, which is a `map[string]interface{}` that exposes -a powerful `Get` method (among others) that allows you to easily and quickly get -access to data within the map, without having to worry too much about type assertions, -missing data, default values etc. - -Pattern - -Objx uses a preditable pattern to make access data from within `map[string]interface{}` easy. -Call one of the `objx.` functions to create your `objx.Map` to get going: - - m, err := objx.FromJSON(json) - -NOTE: Any methods or functions with the `Must` prefix will panic if something goes wrong, -the rest will be optimistic and try to figure things out without panicking. - -Use `Get` to access the value you're interested in. You can use dot and array -notation too: - - m.Get("places[0].latlng") - -Once you have sought the `Value` you're interested in, you can use the `Is*` methods to determine its type. - - if m.Get("code").IsStr() { // Your code... } - -Or you can just assume the type, and use one of the strong type methods to extract the real value: - - m.Get("code").Int() - -If there's no value there (or if it's the wrong type) then a default value will be returned, -or you can be explicit about the default value. - - Get("code").Int(-1) - -If you're dealing with a slice of data as a value, Objx provides many useful methods for iterating, -manipulating and selecting that data. You can find out more by exploring the index below. - -Reading data - -A simple example of how to use Objx: - - // Use MustFromJSON to make an objx.Map from some JSON - m := objx.MustFromJSON(`{"name": "Mat", "age": 30}`) - - // Get the details - name := m.Get("name").Str() - age := m.Get("age").Int() - - // Get their nickname (or use their name if they don't have one) - nickname := m.Get("nickname").Str(name) - -Ranging - -Since `objx.Map` is a `map[string]interface{}` you can treat it as such. -For example, to `range` the data, do what you would expect: - - m := objx.MustFromJSON(json) - for key, value := range m { - // Your code... - } -*/ -package objx diff --git a/vendor/github.com/stretchr/objx/map.go b/vendor/github.com/stretchr/objx/map.go deleted file mode 100644 index 7e9389a20..000000000 --- a/vendor/github.com/stretchr/objx/map.go +++ /dev/null @@ -1,193 +0,0 @@ -package objx - -import ( - "encoding/base64" - "encoding/json" - "errors" - "io/ioutil" - "net/url" - "strings" -) - -// MSIConvertable is an interface that defines methods for converting your -// custom types to a map[string]interface{} representation. -type MSIConvertable interface { - // MSI gets a map[string]interface{} (msi) representing the - // object. - MSI() map[string]interface{} -} - -// Map provides extended functionality for working with -// untyped data, in particular map[string]interface (msi). -type Map map[string]interface{} - -// Value returns the internal value instance -func (m Map) Value() *Value { - return &Value{data: m} -} - -// Nil represents a nil Map. -var Nil = New(nil) - -// New creates a new Map containing the map[string]interface{} in the data argument. -// If the data argument is not a map[string]interface, New attempts to call the -// MSI() method on the MSIConvertable interface to create one. -func New(data interface{}) Map { - if _, ok := data.(map[string]interface{}); !ok { - if converter, ok := data.(MSIConvertable); ok { - data = converter.MSI() - } else { - return nil - } - } - return Map(data.(map[string]interface{})) -} - -// MSI creates a map[string]interface{} and puts it inside a new Map. -// -// The arguments follow a key, value pattern. -// -// Panics -// -// Panics if any key argument is non-string or if there are an odd number of arguments. -// -// Example -// -// To easily create Maps: -// -// m := objx.MSI("name", "Mat", "age", 29, "subobj", objx.MSI("active", true)) -// -// // creates an Map equivalent to -// m := objx.New(map[string]interface{}{"name": "Mat", "age": 29, "subobj": map[string]interface{}{"active": true}}) -func MSI(keyAndValuePairs ...interface{}) Map { - newMap := make(map[string]interface{}) - keyAndValuePairsLen := len(keyAndValuePairs) - if keyAndValuePairsLen%2 != 0 { - panic("objx: MSI must have an even number of arguments following the 'key, value' pattern.") - } - - for i := 0; i < keyAndValuePairsLen; i = i + 2 { - key := keyAndValuePairs[i] - value := keyAndValuePairs[i+1] - - // make sure the key is a string - keyString, keyStringOK := key.(string) - if !keyStringOK { - panic("objx: MSI must follow 'string, interface{}' pattern. " + keyString + " is not a valid key.") - } - newMap[keyString] = value - } - return New(newMap) -} - -// ****** Conversion Constructors - -// MustFromJSON creates a new Map containing the data specified in the -// jsonString. -// -// Panics if the JSON is invalid. -func MustFromJSON(jsonString string) Map { - o, err := FromJSON(jsonString) - if err != nil { - panic("objx: MustFromJSON failed with error: " + err.Error()) - } - return o -} - -// FromJSON creates a new Map containing the data specified in the -// jsonString. -// -// Returns an error if the JSON is invalid. -func FromJSON(jsonString string) (Map, error) { - var data interface{} - err := json.Unmarshal([]byte(jsonString), &data) - if err != nil { - return Nil, err - } - return New(data), nil -} - -// FromBase64 creates a new Obj containing the data specified -// in the Base64 string. -// -// The string is an encoded JSON string returned by Base64 -func FromBase64(base64String string) (Map, error) { - decoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(base64String)) - decoded, err := ioutil.ReadAll(decoder) - if err != nil { - return nil, err - } - return FromJSON(string(decoded)) -} - -// MustFromBase64 creates a new Obj containing the data specified -// in the Base64 string and panics if there is an error. -// -// The string is an encoded JSON string returned by Base64 -func MustFromBase64(base64String string) Map { - result, err := FromBase64(base64String) - if err != nil { - panic("objx: MustFromBase64 failed with error: " + err.Error()) - } - return result -} - -// FromSignedBase64 creates a new Obj containing the data specified -// in the Base64 string. -// -// The string is an encoded JSON string returned by SignedBase64 -func FromSignedBase64(base64String, key string) (Map, error) { - parts := strings.Split(base64String, SignatureSeparator) - if len(parts) != 2 { - return nil, errors.New("objx: Signed base64 string is malformed") - } - - sig := HashWithKey(parts[0], key) - if parts[1] != sig { - return nil, errors.New("objx: Signature for base64 data does not match") - } - return FromBase64(parts[0]) -} - -// MustFromSignedBase64 creates a new Obj containing the data specified -// in the Base64 string and panics if there is an error. -// -// The string is an encoded JSON string returned by Base64 -func MustFromSignedBase64(base64String, key string) Map { - result, err := FromSignedBase64(base64String, key) - if err != nil { - panic("objx: MustFromSignedBase64 failed with error: " + err.Error()) - } - return result -} - -// FromURLQuery generates a new Obj by parsing the specified -// query. -// -// For queries with multiple values, the first value is selected. -func FromURLQuery(query string) (Map, error) { - vals, err := url.ParseQuery(query) - if err != nil { - return nil, err - } - - m := make(map[string]interface{}) - for k, vals := range vals { - m[k] = vals[0] - } - return New(m), nil -} - -// MustFromURLQuery generates a new Obj by parsing the specified -// query. -// -// For queries with multiple values, the first value is selected. -// -// Panics if it encounters an error -func MustFromURLQuery(query string) Map { - o, err := FromURLQuery(query) - if err != nil { - panic("objx: MustFromURLQuery failed with error: " + err.Error()) - } - return o -} diff --git a/vendor/github.com/stretchr/objx/mutations.go b/vendor/github.com/stretchr/objx/mutations.go deleted file mode 100644 index e7b8eb794..000000000 --- a/vendor/github.com/stretchr/objx/mutations.go +++ /dev/null @@ -1,74 +0,0 @@ -package objx - -// Exclude returns a new Map with the keys in the specified []string -// excluded. -func (m Map) Exclude(exclude []string) Map { - excluded := make(Map) - for k, v := range m { - var shouldInclude = true - for _, toExclude := range exclude { - if k == toExclude { - shouldInclude = false - break - } - } - if shouldInclude { - excluded[k] = v - } - } - return excluded -} - -// Copy creates a shallow copy of the Obj. -func (m Map) Copy() Map { - copied := make(map[string]interface{}) - for k, v := range m { - copied[k] = v - } - return New(copied) -} - -// Merge blends the specified map with a copy of this map and returns the result. -// -// Keys that appear in both will be selected from the specified map. -// This method requires that the wrapped object be a map[string]interface{} -func (m Map) Merge(merge Map) Map { - return m.Copy().MergeHere(merge) -} - -// MergeHere blends the specified map with this map and returns the current map. -// -// Keys that appear in both will be selected from the specified map. The original map -// will be modified. This method requires that -// the wrapped object be a map[string]interface{} -func (m Map) MergeHere(merge Map) Map { - for k, v := range merge { - m[k] = v - } - return m -} - -// Transform builds a new Obj giving the transformer a chance -// to change the keys and values as it goes. This method requires that -// the wrapped object be a map[string]interface{} -func (m Map) Transform(transformer func(key string, value interface{}) (string, interface{})) Map { - newMap := make(map[string]interface{}) - for k, v := range m { - modifiedKey, modifiedVal := transformer(k, v) - newMap[modifiedKey] = modifiedVal - } - return New(newMap) -} - -// TransformKeys builds a new map using the specified key mapping. -// -// Unspecified keys will be unaltered. -// This method requires that the wrapped object be a map[string]interface{} -func (m Map) TransformKeys(mapping map[string]string) Map { - return m.Transform(func(key string, value interface{}) (string, interface{}) { - if newKey, ok := mapping[key]; ok { - return newKey, value - } - return key, value - }) -} diff --git a/vendor/github.com/stretchr/objx/security.go b/vendor/github.com/stretchr/objx/security.go deleted file mode 100644 index e052ff890..000000000 --- a/vendor/github.com/stretchr/objx/security.go +++ /dev/null @@ -1,17 +0,0 @@ -package objx - -import ( - "crypto/sha1" - "encoding/hex" -) - -// HashWithKey hashes the specified string using the security -// key. -func HashWithKey(data, key string) string { - hash := sha1.New() - _, err := hash.Write([]byte(data + ":" + key)) - if err != nil { - return "" - } - return hex.EncodeToString(hash.Sum(nil)) -} diff --git a/vendor/github.com/stretchr/objx/tests.go b/vendor/github.com/stretchr/objx/tests.go deleted file mode 100644 index d9e0b479a..000000000 --- a/vendor/github.com/stretchr/objx/tests.go +++ /dev/null @@ -1,17 +0,0 @@ -package objx - -// Has gets whether there is something at the specified selector -// or not. -// -// If m is nil, Has will always return false. -func (m Map) Has(selector string) bool { - if m == nil { - return false - } - return !m.Get(selector).IsNil() -} - -// IsNil gets whether the data is nil or not. -func (v *Value) IsNil() bool { - return v == nil || v.data == nil -} diff --git a/vendor/github.com/stretchr/objx/type_specific_codegen.go b/vendor/github.com/stretchr/objx/type_specific_codegen.go deleted file mode 100644 index 202a91f8c..000000000 --- a/vendor/github.com/stretchr/objx/type_specific_codegen.go +++ /dev/null @@ -1,2501 +0,0 @@ -package objx - -/* - Inter (interface{} and []interface{}) -*/ - -// Inter gets the value as a interface{}, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Inter(optionalDefault ...interface{}) interface{} { - if s, ok := v.data.(interface{}); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustInter gets the value as a interface{}. -// -// Panics if the object is not a interface{}. -func (v *Value) MustInter() interface{} { - return v.data.(interface{}) -} - -// InterSlice gets the value as a []interface{}, returns the optionalDefault -// value or nil if the value is not a []interface{}. -func (v *Value) InterSlice(optionalDefault ...[]interface{}) []interface{} { - if s, ok := v.data.([]interface{}); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustInterSlice gets the value as a []interface{}. -// -// Panics if the object is not a []interface{}. -func (v *Value) MustInterSlice() []interface{} { - return v.data.([]interface{}) -} - -// IsInter gets whether the object contained is a interface{} or not. -func (v *Value) IsInter() bool { - _, ok := v.data.(interface{}) - return ok -} - -// IsInterSlice gets whether the object contained is a []interface{} or not. -func (v *Value) IsInterSlice() bool { - _, ok := v.data.([]interface{}) - return ok -} - -// EachInter calls the specified callback for each object -// in the []interface{}. -// -// Panics if the object is the wrong type. -func (v *Value) EachInter(callback func(int, interface{}) bool) *Value { - for index, val := range v.MustInterSlice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereInter uses the specified decider function to select items -// from the []interface{}. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereInter(decider func(int, interface{}) bool) *Value { - var selected []interface{} - v.EachInter(func(index int, val interface{}) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupInter uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]interface{}. -func (v *Value) GroupInter(grouper func(int, interface{}) string) *Value { - groups := make(map[string][]interface{}) - v.EachInter(func(index int, val interface{}) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]interface{}, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceInter uses the specified function to replace each interface{}s -// by iterating each item. The data in the returned result will be a -// []interface{} containing the replaced items. -func (v *Value) ReplaceInter(replacer func(int, interface{}) interface{}) *Value { - arr := v.MustInterSlice() - replaced := make([]interface{}, len(arr)) - v.EachInter(func(index int, val interface{}) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectInter uses the specified collector function to collect a value -// for each of the interface{}s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectInter(collector func(int, interface{}) interface{}) *Value { - arr := v.MustInterSlice() - collected := make([]interface{}, len(arr)) - v.EachInter(func(index int, val interface{}) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - MSI (map[string]interface{} and []map[string]interface{}) -*/ - -// MSI gets the value as a map[string]interface{}, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) MSI(optionalDefault ...map[string]interface{}) map[string]interface{} { - if s, ok := v.data.(map[string]interface{}); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustMSI gets the value as a map[string]interface{}. -// -// Panics if the object is not a map[string]interface{}. -func (v *Value) MustMSI() map[string]interface{} { - return v.data.(map[string]interface{}) -} - -// MSISlice gets the value as a []map[string]interface{}, returns the optionalDefault -// value or nil if the value is not a []map[string]interface{}. -func (v *Value) MSISlice(optionalDefault ...[]map[string]interface{}) []map[string]interface{} { - if s, ok := v.data.([]map[string]interface{}); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustMSISlice gets the value as a []map[string]interface{}. -// -// Panics if the object is not a []map[string]interface{}. -func (v *Value) MustMSISlice() []map[string]interface{} { - return v.data.([]map[string]interface{}) -} - -// IsMSI gets whether the object contained is a map[string]interface{} or not. -func (v *Value) IsMSI() bool { - _, ok := v.data.(map[string]interface{}) - return ok -} - -// IsMSISlice gets whether the object contained is a []map[string]interface{} or not. -func (v *Value) IsMSISlice() bool { - _, ok := v.data.([]map[string]interface{}) - return ok -} - -// EachMSI calls the specified callback for each object -// in the []map[string]interface{}. -// -// Panics if the object is the wrong type. -func (v *Value) EachMSI(callback func(int, map[string]interface{}) bool) *Value { - for index, val := range v.MustMSISlice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereMSI uses the specified decider function to select items -// from the []map[string]interface{}. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereMSI(decider func(int, map[string]interface{}) bool) *Value { - var selected []map[string]interface{} - v.EachMSI(func(index int, val map[string]interface{}) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupMSI uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]map[string]interface{}. -func (v *Value) GroupMSI(grouper func(int, map[string]interface{}) string) *Value { - groups := make(map[string][]map[string]interface{}) - v.EachMSI(func(index int, val map[string]interface{}) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]map[string]interface{}, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceMSI uses the specified function to replace each map[string]interface{}s -// by iterating each item. The data in the returned result will be a -// []map[string]interface{} containing the replaced items. -func (v *Value) ReplaceMSI(replacer func(int, map[string]interface{}) map[string]interface{}) *Value { - arr := v.MustMSISlice() - replaced := make([]map[string]interface{}, len(arr)) - v.EachMSI(func(index int, val map[string]interface{}) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectMSI uses the specified collector function to collect a value -// for each of the map[string]interface{}s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectMSI(collector func(int, map[string]interface{}) interface{}) *Value { - arr := v.MustMSISlice() - collected := make([]interface{}, len(arr)) - v.EachMSI(func(index int, val map[string]interface{}) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - ObjxMap ((Map) and [](Map)) -*/ - -// ObjxMap gets the value as a (Map), returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) ObjxMap(optionalDefault ...(Map)) Map { - if s, ok := v.data.((Map)); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return New(nil) -} - -// MustObjxMap gets the value as a (Map). -// -// Panics if the object is not a (Map). -func (v *Value) MustObjxMap() Map { - return v.data.((Map)) -} - -// ObjxMapSlice gets the value as a [](Map), returns the optionalDefault -// value or nil if the value is not a [](Map). -func (v *Value) ObjxMapSlice(optionalDefault ...[](Map)) [](Map) { - if s, ok := v.data.([](Map)); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustObjxMapSlice gets the value as a [](Map). -// -// Panics if the object is not a [](Map). -func (v *Value) MustObjxMapSlice() [](Map) { - return v.data.([](Map)) -} - -// IsObjxMap gets whether the object contained is a (Map) or not. -func (v *Value) IsObjxMap() bool { - _, ok := v.data.((Map)) - return ok -} - -// IsObjxMapSlice gets whether the object contained is a [](Map) or not. -func (v *Value) IsObjxMapSlice() bool { - _, ok := v.data.([](Map)) - return ok -} - -// EachObjxMap calls the specified callback for each object -// in the [](Map). -// -// Panics if the object is the wrong type. -func (v *Value) EachObjxMap(callback func(int, Map) bool) *Value { - for index, val := range v.MustObjxMapSlice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereObjxMap uses the specified decider function to select items -// from the [](Map). The object contained in the result will contain -// only the selected items. -func (v *Value) WhereObjxMap(decider func(int, Map) bool) *Value { - var selected [](Map) - v.EachObjxMap(func(index int, val Map) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupObjxMap uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][](Map). -func (v *Value) GroupObjxMap(grouper func(int, Map) string) *Value { - groups := make(map[string][](Map)) - v.EachObjxMap(func(index int, val Map) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([](Map), 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceObjxMap uses the specified function to replace each (Map)s -// by iterating each item. The data in the returned result will be a -// [](Map) containing the replaced items. -func (v *Value) ReplaceObjxMap(replacer func(int, Map) Map) *Value { - arr := v.MustObjxMapSlice() - replaced := make([](Map), len(arr)) - v.EachObjxMap(func(index int, val Map) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectObjxMap uses the specified collector function to collect a value -// for each of the (Map)s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectObjxMap(collector func(int, Map) interface{}) *Value { - arr := v.MustObjxMapSlice() - collected := make([]interface{}, len(arr)) - v.EachObjxMap(func(index int, val Map) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Bool (bool and []bool) -*/ - -// Bool gets the value as a bool, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Bool(optionalDefault ...bool) bool { - if s, ok := v.data.(bool); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return false -} - -// MustBool gets the value as a bool. -// -// Panics if the object is not a bool. -func (v *Value) MustBool() bool { - return v.data.(bool) -} - -// BoolSlice gets the value as a []bool, returns the optionalDefault -// value or nil if the value is not a []bool. -func (v *Value) BoolSlice(optionalDefault ...[]bool) []bool { - if s, ok := v.data.([]bool); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustBoolSlice gets the value as a []bool. -// -// Panics if the object is not a []bool. -func (v *Value) MustBoolSlice() []bool { - return v.data.([]bool) -} - -// IsBool gets whether the object contained is a bool or not. -func (v *Value) IsBool() bool { - _, ok := v.data.(bool) - return ok -} - -// IsBoolSlice gets whether the object contained is a []bool or not. -func (v *Value) IsBoolSlice() bool { - _, ok := v.data.([]bool) - return ok -} - -// EachBool calls the specified callback for each object -// in the []bool. -// -// Panics if the object is the wrong type. -func (v *Value) EachBool(callback func(int, bool) bool) *Value { - for index, val := range v.MustBoolSlice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereBool uses the specified decider function to select items -// from the []bool. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereBool(decider func(int, bool) bool) *Value { - var selected []bool - v.EachBool(func(index int, val bool) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupBool uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]bool. -func (v *Value) GroupBool(grouper func(int, bool) string) *Value { - groups := make(map[string][]bool) - v.EachBool(func(index int, val bool) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]bool, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceBool uses the specified function to replace each bools -// by iterating each item. The data in the returned result will be a -// []bool containing the replaced items. -func (v *Value) ReplaceBool(replacer func(int, bool) bool) *Value { - arr := v.MustBoolSlice() - replaced := make([]bool, len(arr)) - v.EachBool(func(index int, val bool) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectBool uses the specified collector function to collect a value -// for each of the bools in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectBool(collector func(int, bool) interface{}) *Value { - arr := v.MustBoolSlice() - collected := make([]interface{}, len(arr)) - v.EachBool(func(index int, val bool) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Str (string and []string) -*/ - -// Str gets the value as a string, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Str(optionalDefault ...string) string { - if s, ok := v.data.(string); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return "" -} - -// MustStr gets the value as a string. -// -// Panics if the object is not a string. -func (v *Value) MustStr() string { - return v.data.(string) -} - -// StrSlice gets the value as a []string, returns the optionalDefault -// value or nil if the value is not a []string. -func (v *Value) StrSlice(optionalDefault ...[]string) []string { - if s, ok := v.data.([]string); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustStrSlice gets the value as a []string. -// -// Panics if the object is not a []string. -func (v *Value) MustStrSlice() []string { - return v.data.([]string) -} - -// IsStr gets whether the object contained is a string or not. -func (v *Value) IsStr() bool { - _, ok := v.data.(string) - return ok -} - -// IsStrSlice gets whether the object contained is a []string or not. -func (v *Value) IsStrSlice() bool { - _, ok := v.data.([]string) - return ok -} - -// EachStr calls the specified callback for each object -// in the []string. -// -// Panics if the object is the wrong type. -func (v *Value) EachStr(callback func(int, string) bool) *Value { - for index, val := range v.MustStrSlice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereStr uses the specified decider function to select items -// from the []string. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereStr(decider func(int, string) bool) *Value { - var selected []string - v.EachStr(func(index int, val string) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupStr uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]string. -func (v *Value) GroupStr(grouper func(int, string) string) *Value { - groups := make(map[string][]string) - v.EachStr(func(index int, val string) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]string, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceStr uses the specified function to replace each strings -// by iterating each item. The data in the returned result will be a -// []string containing the replaced items. -func (v *Value) ReplaceStr(replacer func(int, string) string) *Value { - arr := v.MustStrSlice() - replaced := make([]string, len(arr)) - v.EachStr(func(index int, val string) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectStr uses the specified collector function to collect a value -// for each of the strings in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectStr(collector func(int, string) interface{}) *Value { - arr := v.MustStrSlice() - collected := make([]interface{}, len(arr)) - v.EachStr(func(index int, val string) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Int (int and []int) -*/ - -// Int gets the value as a int, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Int(optionalDefault ...int) int { - if s, ok := v.data.(int); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustInt gets the value as a int. -// -// Panics if the object is not a int. -func (v *Value) MustInt() int { - return v.data.(int) -} - -// IntSlice gets the value as a []int, returns the optionalDefault -// value or nil if the value is not a []int. -func (v *Value) IntSlice(optionalDefault ...[]int) []int { - if s, ok := v.data.([]int); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustIntSlice gets the value as a []int. -// -// Panics if the object is not a []int. -func (v *Value) MustIntSlice() []int { - return v.data.([]int) -} - -// IsInt gets whether the object contained is a int or not. -func (v *Value) IsInt() bool { - _, ok := v.data.(int) - return ok -} - -// IsIntSlice gets whether the object contained is a []int or not. -func (v *Value) IsIntSlice() bool { - _, ok := v.data.([]int) - return ok -} - -// EachInt calls the specified callback for each object -// in the []int. -// -// Panics if the object is the wrong type. -func (v *Value) EachInt(callback func(int, int) bool) *Value { - for index, val := range v.MustIntSlice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereInt uses the specified decider function to select items -// from the []int. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereInt(decider func(int, int) bool) *Value { - var selected []int - v.EachInt(func(index int, val int) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupInt uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]int. -func (v *Value) GroupInt(grouper func(int, int) string) *Value { - groups := make(map[string][]int) - v.EachInt(func(index int, val int) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]int, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceInt uses the specified function to replace each ints -// by iterating each item. The data in the returned result will be a -// []int containing the replaced items. -func (v *Value) ReplaceInt(replacer func(int, int) int) *Value { - arr := v.MustIntSlice() - replaced := make([]int, len(arr)) - v.EachInt(func(index int, val int) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectInt uses the specified collector function to collect a value -// for each of the ints in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectInt(collector func(int, int) interface{}) *Value { - arr := v.MustIntSlice() - collected := make([]interface{}, len(arr)) - v.EachInt(func(index int, val int) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Int8 (int8 and []int8) -*/ - -// Int8 gets the value as a int8, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Int8(optionalDefault ...int8) int8 { - if s, ok := v.data.(int8); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustInt8 gets the value as a int8. -// -// Panics if the object is not a int8. -func (v *Value) MustInt8() int8 { - return v.data.(int8) -} - -// Int8Slice gets the value as a []int8, returns the optionalDefault -// value or nil if the value is not a []int8. -func (v *Value) Int8Slice(optionalDefault ...[]int8) []int8 { - if s, ok := v.data.([]int8); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustInt8Slice gets the value as a []int8. -// -// Panics if the object is not a []int8. -func (v *Value) MustInt8Slice() []int8 { - return v.data.([]int8) -} - -// IsInt8 gets whether the object contained is a int8 or not. -func (v *Value) IsInt8() bool { - _, ok := v.data.(int8) - return ok -} - -// IsInt8Slice gets whether the object contained is a []int8 or not. -func (v *Value) IsInt8Slice() bool { - _, ok := v.data.([]int8) - return ok -} - -// EachInt8 calls the specified callback for each object -// in the []int8. -// -// Panics if the object is the wrong type. -func (v *Value) EachInt8(callback func(int, int8) bool) *Value { - for index, val := range v.MustInt8Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereInt8 uses the specified decider function to select items -// from the []int8. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereInt8(decider func(int, int8) bool) *Value { - var selected []int8 - v.EachInt8(func(index int, val int8) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupInt8 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]int8. -func (v *Value) GroupInt8(grouper func(int, int8) string) *Value { - groups := make(map[string][]int8) - v.EachInt8(func(index int, val int8) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]int8, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceInt8 uses the specified function to replace each int8s -// by iterating each item. The data in the returned result will be a -// []int8 containing the replaced items. -func (v *Value) ReplaceInt8(replacer func(int, int8) int8) *Value { - arr := v.MustInt8Slice() - replaced := make([]int8, len(arr)) - v.EachInt8(func(index int, val int8) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectInt8 uses the specified collector function to collect a value -// for each of the int8s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectInt8(collector func(int, int8) interface{}) *Value { - arr := v.MustInt8Slice() - collected := make([]interface{}, len(arr)) - v.EachInt8(func(index int, val int8) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Int16 (int16 and []int16) -*/ - -// Int16 gets the value as a int16, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Int16(optionalDefault ...int16) int16 { - if s, ok := v.data.(int16); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustInt16 gets the value as a int16. -// -// Panics if the object is not a int16. -func (v *Value) MustInt16() int16 { - return v.data.(int16) -} - -// Int16Slice gets the value as a []int16, returns the optionalDefault -// value or nil if the value is not a []int16. -func (v *Value) Int16Slice(optionalDefault ...[]int16) []int16 { - if s, ok := v.data.([]int16); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustInt16Slice gets the value as a []int16. -// -// Panics if the object is not a []int16. -func (v *Value) MustInt16Slice() []int16 { - return v.data.([]int16) -} - -// IsInt16 gets whether the object contained is a int16 or not. -func (v *Value) IsInt16() bool { - _, ok := v.data.(int16) - return ok -} - -// IsInt16Slice gets whether the object contained is a []int16 or not. -func (v *Value) IsInt16Slice() bool { - _, ok := v.data.([]int16) - return ok -} - -// EachInt16 calls the specified callback for each object -// in the []int16. -// -// Panics if the object is the wrong type. -func (v *Value) EachInt16(callback func(int, int16) bool) *Value { - for index, val := range v.MustInt16Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereInt16 uses the specified decider function to select items -// from the []int16. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereInt16(decider func(int, int16) bool) *Value { - var selected []int16 - v.EachInt16(func(index int, val int16) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupInt16 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]int16. -func (v *Value) GroupInt16(grouper func(int, int16) string) *Value { - groups := make(map[string][]int16) - v.EachInt16(func(index int, val int16) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]int16, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceInt16 uses the specified function to replace each int16s -// by iterating each item. The data in the returned result will be a -// []int16 containing the replaced items. -func (v *Value) ReplaceInt16(replacer func(int, int16) int16) *Value { - arr := v.MustInt16Slice() - replaced := make([]int16, len(arr)) - v.EachInt16(func(index int, val int16) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectInt16 uses the specified collector function to collect a value -// for each of the int16s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectInt16(collector func(int, int16) interface{}) *Value { - arr := v.MustInt16Slice() - collected := make([]interface{}, len(arr)) - v.EachInt16(func(index int, val int16) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Int32 (int32 and []int32) -*/ - -// Int32 gets the value as a int32, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Int32(optionalDefault ...int32) int32 { - if s, ok := v.data.(int32); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustInt32 gets the value as a int32. -// -// Panics if the object is not a int32. -func (v *Value) MustInt32() int32 { - return v.data.(int32) -} - -// Int32Slice gets the value as a []int32, returns the optionalDefault -// value or nil if the value is not a []int32. -func (v *Value) Int32Slice(optionalDefault ...[]int32) []int32 { - if s, ok := v.data.([]int32); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustInt32Slice gets the value as a []int32. -// -// Panics if the object is not a []int32. -func (v *Value) MustInt32Slice() []int32 { - return v.data.([]int32) -} - -// IsInt32 gets whether the object contained is a int32 or not. -func (v *Value) IsInt32() bool { - _, ok := v.data.(int32) - return ok -} - -// IsInt32Slice gets whether the object contained is a []int32 or not. -func (v *Value) IsInt32Slice() bool { - _, ok := v.data.([]int32) - return ok -} - -// EachInt32 calls the specified callback for each object -// in the []int32. -// -// Panics if the object is the wrong type. -func (v *Value) EachInt32(callback func(int, int32) bool) *Value { - for index, val := range v.MustInt32Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereInt32 uses the specified decider function to select items -// from the []int32. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereInt32(decider func(int, int32) bool) *Value { - var selected []int32 - v.EachInt32(func(index int, val int32) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupInt32 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]int32. -func (v *Value) GroupInt32(grouper func(int, int32) string) *Value { - groups := make(map[string][]int32) - v.EachInt32(func(index int, val int32) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]int32, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceInt32 uses the specified function to replace each int32s -// by iterating each item. The data in the returned result will be a -// []int32 containing the replaced items. -func (v *Value) ReplaceInt32(replacer func(int, int32) int32) *Value { - arr := v.MustInt32Slice() - replaced := make([]int32, len(arr)) - v.EachInt32(func(index int, val int32) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectInt32 uses the specified collector function to collect a value -// for each of the int32s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectInt32(collector func(int, int32) interface{}) *Value { - arr := v.MustInt32Slice() - collected := make([]interface{}, len(arr)) - v.EachInt32(func(index int, val int32) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Int64 (int64 and []int64) -*/ - -// Int64 gets the value as a int64, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Int64(optionalDefault ...int64) int64 { - if s, ok := v.data.(int64); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustInt64 gets the value as a int64. -// -// Panics if the object is not a int64. -func (v *Value) MustInt64() int64 { - return v.data.(int64) -} - -// Int64Slice gets the value as a []int64, returns the optionalDefault -// value or nil if the value is not a []int64. -func (v *Value) Int64Slice(optionalDefault ...[]int64) []int64 { - if s, ok := v.data.([]int64); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustInt64Slice gets the value as a []int64. -// -// Panics if the object is not a []int64. -func (v *Value) MustInt64Slice() []int64 { - return v.data.([]int64) -} - -// IsInt64 gets whether the object contained is a int64 or not. -func (v *Value) IsInt64() bool { - _, ok := v.data.(int64) - return ok -} - -// IsInt64Slice gets whether the object contained is a []int64 or not. -func (v *Value) IsInt64Slice() bool { - _, ok := v.data.([]int64) - return ok -} - -// EachInt64 calls the specified callback for each object -// in the []int64. -// -// Panics if the object is the wrong type. -func (v *Value) EachInt64(callback func(int, int64) bool) *Value { - for index, val := range v.MustInt64Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereInt64 uses the specified decider function to select items -// from the []int64. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereInt64(decider func(int, int64) bool) *Value { - var selected []int64 - v.EachInt64(func(index int, val int64) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupInt64 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]int64. -func (v *Value) GroupInt64(grouper func(int, int64) string) *Value { - groups := make(map[string][]int64) - v.EachInt64(func(index int, val int64) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]int64, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceInt64 uses the specified function to replace each int64s -// by iterating each item. The data in the returned result will be a -// []int64 containing the replaced items. -func (v *Value) ReplaceInt64(replacer func(int, int64) int64) *Value { - arr := v.MustInt64Slice() - replaced := make([]int64, len(arr)) - v.EachInt64(func(index int, val int64) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectInt64 uses the specified collector function to collect a value -// for each of the int64s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectInt64(collector func(int, int64) interface{}) *Value { - arr := v.MustInt64Slice() - collected := make([]interface{}, len(arr)) - v.EachInt64(func(index int, val int64) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Uint (uint and []uint) -*/ - -// Uint gets the value as a uint, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Uint(optionalDefault ...uint) uint { - if s, ok := v.data.(uint); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustUint gets the value as a uint. -// -// Panics if the object is not a uint. -func (v *Value) MustUint() uint { - return v.data.(uint) -} - -// UintSlice gets the value as a []uint, returns the optionalDefault -// value or nil if the value is not a []uint. -func (v *Value) UintSlice(optionalDefault ...[]uint) []uint { - if s, ok := v.data.([]uint); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustUintSlice gets the value as a []uint. -// -// Panics if the object is not a []uint. -func (v *Value) MustUintSlice() []uint { - return v.data.([]uint) -} - -// IsUint gets whether the object contained is a uint or not. -func (v *Value) IsUint() bool { - _, ok := v.data.(uint) - return ok -} - -// IsUintSlice gets whether the object contained is a []uint or not. -func (v *Value) IsUintSlice() bool { - _, ok := v.data.([]uint) - return ok -} - -// EachUint calls the specified callback for each object -// in the []uint. -// -// Panics if the object is the wrong type. -func (v *Value) EachUint(callback func(int, uint) bool) *Value { - for index, val := range v.MustUintSlice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereUint uses the specified decider function to select items -// from the []uint. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereUint(decider func(int, uint) bool) *Value { - var selected []uint - v.EachUint(func(index int, val uint) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupUint uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]uint. -func (v *Value) GroupUint(grouper func(int, uint) string) *Value { - groups := make(map[string][]uint) - v.EachUint(func(index int, val uint) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]uint, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceUint uses the specified function to replace each uints -// by iterating each item. The data in the returned result will be a -// []uint containing the replaced items. -func (v *Value) ReplaceUint(replacer func(int, uint) uint) *Value { - arr := v.MustUintSlice() - replaced := make([]uint, len(arr)) - v.EachUint(func(index int, val uint) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectUint uses the specified collector function to collect a value -// for each of the uints in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectUint(collector func(int, uint) interface{}) *Value { - arr := v.MustUintSlice() - collected := make([]interface{}, len(arr)) - v.EachUint(func(index int, val uint) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Uint8 (uint8 and []uint8) -*/ - -// Uint8 gets the value as a uint8, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Uint8(optionalDefault ...uint8) uint8 { - if s, ok := v.data.(uint8); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustUint8 gets the value as a uint8. -// -// Panics if the object is not a uint8. -func (v *Value) MustUint8() uint8 { - return v.data.(uint8) -} - -// Uint8Slice gets the value as a []uint8, returns the optionalDefault -// value or nil if the value is not a []uint8. -func (v *Value) Uint8Slice(optionalDefault ...[]uint8) []uint8 { - if s, ok := v.data.([]uint8); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustUint8Slice gets the value as a []uint8. -// -// Panics if the object is not a []uint8. -func (v *Value) MustUint8Slice() []uint8 { - return v.data.([]uint8) -} - -// IsUint8 gets whether the object contained is a uint8 or not. -func (v *Value) IsUint8() bool { - _, ok := v.data.(uint8) - return ok -} - -// IsUint8Slice gets whether the object contained is a []uint8 or not. -func (v *Value) IsUint8Slice() bool { - _, ok := v.data.([]uint8) - return ok -} - -// EachUint8 calls the specified callback for each object -// in the []uint8. -// -// Panics if the object is the wrong type. -func (v *Value) EachUint8(callback func(int, uint8) bool) *Value { - for index, val := range v.MustUint8Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereUint8 uses the specified decider function to select items -// from the []uint8. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereUint8(decider func(int, uint8) bool) *Value { - var selected []uint8 - v.EachUint8(func(index int, val uint8) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupUint8 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]uint8. -func (v *Value) GroupUint8(grouper func(int, uint8) string) *Value { - groups := make(map[string][]uint8) - v.EachUint8(func(index int, val uint8) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]uint8, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceUint8 uses the specified function to replace each uint8s -// by iterating each item. The data in the returned result will be a -// []uint8 containing the replaced items. -func (v *Value) ReplaceUint8(replacer func(int, uint8) uint8) *Value { - arr := v.MustUint8Slice() - replaced := make([]uint8, len(arr)) - v.EachUint8(func(index int, val uint8) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectUint8 uses the specified collector function to collect a value -// for each of the uint8s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectUint8(collector func(int, uint8) interface{}) *Value { - arr := v.MustUint8Slice() - collected := make([]interface{}, len(arr)) - v.EachUint8(func(index int, val uint8) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Uint16 (uint16 and []uint16) -*/ - -// Uint16 gets the value as a uint16, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Uint16(optionalDefault ...uint16) uint16 { - if s, ok := v.data.(uint16); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustUint16 gets the value as a uint16. -// -// Panics if the object is not a uint16. -func (v *Value) MustUint16() uint16 { - return v.data.(uint16) -} - -// Uint16Slice gets the value as a []uint16, returns the optionalDefault -// value or nil if the value is not a []uint16. -func (v *Value) Uint16Slice(optionalDefault ...[]uint16) []uint16 { - if s, ok := v.data.([]uint16); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustUint16Slice gets the value as a []uint16. -// -// Panics if the object is not a []uint16. -func (v *Value) MustUint16Slice() []uint16 { - return v.data.([]uint16) -} - -// IsUint16 gets whether the object contained is a uint16 or not. -func (v *Value) IsUint16() bool { - _, ok := v.data.(uint16) - return ok -} - -// IsUint16Slice gets whether the object contained is a []uint16 or not. -func (v *Value) IsUint16Slice() bool { - _, ok := v.data.([]uint16) - return ok -} - -// EachUint16 calls the specified callback for each object -// in the []uint16. -// -// Panics if the object is the wrong type. -func (v *Value) EachUint16(callback func(int, uint16) bool) *Value { - for index, val := range v.MustUint16Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereUint16 uses the specified decider function to select items -// from the []uint16. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereUint16(decider func(int, uint16) bool) *Value { - var selected []uint16 - v.EachUint16(func(index int, val uint16) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupUint16 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]uint16. -func (v *Value) GroupUint16(grouper func(int, uint16) string) *Value { - groups := make(map[string][]uint16) - v.EachUint16(func(index int, val uint16) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]uint16, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceUint16 uses the specified function to replace each uint16s -// by iterating each item. The data in the returned result will be a -// []uint16 containing the replaced items. -func (v *Value) ReplaceUint16(replacer func(int, uint16) uint16) *Value { - arr := v.MustUint16Slice() - replaced := make([]uint16, len(arr)) - v.EachUint16(func(index int, val uint16) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectUint16 uses the specified collector function to collect a value -// for each of the uint16s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectUint16(collector func(int, uint16) interface{}) *Value { - arr := v.MustUint16Slice() - collected := make([]interface{}, len(arr)) - v.EachUint16(func(index int, val uint16) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Uint32 (uint32 and []uint32) -*/ - -// Uint32 gets the value as a uint32, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Uint32(optionalDefault ...uint32) uint32 { - if s, ok := v.data.(uint32); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustUint32 gets the value as a uint32. -// -// Panics if the object is not a uint32. -func (v *Value) MustUint32() uint32 { - return v.data.(uint32) -} - -// Uint32Slice gets the value as a []uint32, returns the optionalDefault -// value or nil if the value is not a []uint32. -func (v *Value) Uint32Slice(optionalDefault ...[]uint32) []uint32 { - if s, ok := v.data.([]uint32); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustUint32Slice gets the value as a []uint32. -// -// Panics if the object is not a []uint32. -func (v *Value) MustUint32Slice() []uint32 { - return v.data.([]uint32) -} - -// IsUint32 gets whether the object contained is a uint32 or not. -func (v *Value) IsUint32() bool { - _, ok := v.data.(uint32) - return ok -} - -// IsUint32Slice gets whether the object contained is a []uint32 or not. -func (v *Value) IsUint32Slice() bool { - _, ok := v.data.([]uint32) - return ok -} - -// EachUint32 calls the specified callback for each object -// in the []uint32. -// -// Panics if the object is the wrong type. -func (v *Value) EachUint32(callback func(int, uint32) bool) *Value { - for index, val := range v.MustUint32Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereUint32 uses the specified decider function to select items -// from the []uint32. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereUint32(decider func(int, uint32) bool) *Value { - var selected []uint32 - v.EachUint32(func(index int, val uint32) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupUint32 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]uint32. -func (v *Value) GroupUint32(grouper func(int, uint32) string) *Value { - groups := make(map[string][]uint32) - v.EachUint32(func(index int, val uint32) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]uint32, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceUint32 uses the specified function to replace each uint32s -// by iterating each item. The data in the returned result will be a -// []uint32 containing the replaced items. -func (v *Value) ReplaceUint32(replacer func(int, uint32) uint32) *Value { - arr := v.MustUint32Slice() - replaced := make([]uint32, len(arr)) - v.EachUint32(func(index int, val uint32) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectUint32 uses the specified collector function to collect a value -// for each of the uint32s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectUint32(collector func(int, uint32) interface{}) *Value { - arr := v.MustUint32Slice() - collected := make([]interface{}, len(arr)) - v.EachUint32(func(index int, val uint32) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Uint64 (uint64 and []uint64) -*/ - -// Uint64 gets the value as a uint64, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Uint64(optionalDefault ...uint64) uint64 { - if s, ok := v.data.(uint64); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustUint64 gets the value as a uint64. -// -// Panics if the object is not a uint64. -func (v *Value) MustUint64() uint64 { - return v.data.(uint64) -} - -// Uint64Slice gets the value as a []uint64, returns the optionalDefault -// value or nil if the value is not a []uint64. -func (v *Value) Uint64Slice(optionalDefault ...[]uint64) []uint64 { - if s, ok := v.data.([]uint64); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustUint64Slice gets the value as a []uint64. -// -// Panics if the object is not a []uint64. -func (v *Value) MustUint64Slice() []uint64 { - return v.data.([]uint64) -} - -// IsUint64 gets whether the object contained is a uint64 or not. -func (v *Value) IsUint64() bool { - _, ok := v.data.(uint64) - return ok -} - -// IsUint64Slice gets whether the object contained is a []uint64 or not. -func (v *Value) IsUint64Slice() bool { - _, ok := v.data.([]uint64) - return ok -} - -// EachUint64 calls the specified callback for each object -// in the []uint64. -// -// Panics if the object is the wrong type. -func (v *Value) EachUint64(callback func(int, uint64) bool) *Value { - for index, val := range v.MustUint64Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereUint64 uses the specified decider function to select items -// from the []uint64. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereUint64(decider func(int, uint64) bool) *Value { - var selected []uint64 - v.EachUint64(func(index int, val uint64) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupUint64 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]uint64. -func (v *Value) GroupUint64(grouper func(int, uint64) string) *Value { - groups := make(map[string][]uint64) - v.EachUint64(func(index int, val uint64) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]uint64, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceUint64 uses the specified function to replace each uint64s -// by iterating each item. The data in the returned result will be a -// []uint64 containing the replaced items. -func (v *Value) ReplaceUint64(replacer func(int, uint64) uint64) *Value { - arr := v.MustUint64Slice() - replaced := make([]uint64, len(arr)) - v.EachUint64(func(index int, val uint64) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectUint64 uses the specified collector function to collect a value -// for each of the uint64s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectUint64(collector func(int, uint64) interface{}) *Value { - arr := v.MustUint64Slice() - collected := make([]interface{}, len(arr)) - v.EachUint64(func(index int, val uint64) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Uintptr (uintptr and []uintptr) -*/ - -// Uintptr gets the value as a uintptr, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Uintptr(optionalDefault ...uintptr) uintptr { - if s, ok := v.data.(uintptr); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustUintptr gets the value as a uintptr. -// -// Panics if the object is not a uintptr. -func (v *Value) MustUintptr() uintptr { - return v.data.(uintptr) -} - -// UintptrSlice gets the value as a []uintptr, returns the optionalDefault -// value or nil if the value is not a []uintptr. -func (v *Value) UintptrSlice(optionalDefault ...[]uintptr) []uintptr { - if s, ok := v.data.([]uintptr); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustUintptrSlice gets the value as a []uintptr. -// -// Panics if the object is not a []uintptr. -func (v *Value) MustUintptrSlice() []uintptr { - return v.data.([]uintptr) -} - -// IsUintptr gets whether the object contained is a uintptr or not. -func (v *Value) IsUintptr() bool { - _, ok := v.data.(uintptr) - return ok -} - -// IsUintptrSlice gets whether the object contained is a []uintptr or not. -func (v *Value) IsUintptrSlice() bool { - _, ok := v.data.([]uintptr) - return ok -} - -// EachUintptr calls the specified callback for each object -// in the []uintptr. -// -// Panics if the object is the wrong type. -func (v *Value) EachUintptr(callback func(int, uintptr) bool) *Value { - for index, val := range v.MustUintptrSlice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereUintptr uses the specified decider function to select items -// from the []uintptr. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereUintptr(decider func(int, uintptr) bool) *Value { - var selected []uintptr - v.EachUintptr(func(index int, val uintptr) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupUintptr uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]uintptr. -func (v *Value) GroupUintptr(grouper func(int, uintptr) string) *Value { - groups := make(map[string][]uintptr) - v.EachUintptr(func(index int, val uintptr) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]uintptr, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceUintptr uses the specified function to replace each uintptrs -// by iterating each item. The data in the returned result will be a -// []uintptr containing the replaced items. -func (v *Value) ReplaceUintptr(replacer func(int, uintptr) uintptr) *Value { - arr := v.MustUintptrSlice() - replaced := make([]uintptr, len(arr)) - v.EachUintptr(func(index int, val uintptr) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectUintptr uses the specified collector function to collect a value -// for each of the uintptrs in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectUintptr(collector func(int, uintptr) interface{}) *Value { - arr := v.MustUintptrSlice() - collected := make([]interface{}, len(arr)) - v.EachUintptr(func(index int, val uintptr) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Float32 (float32 and []float32) -*/ - -// Float32 gets the value as a float32, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Float32(optionalDefault ...float32) float32 { - if s, ok := v.data.(float32); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustFloat32 gets the value as a float32. -// -// Panics if the object is not a float32. -func (v *Value) MustFloat32() float32 { - return v.data.(float32) -} - -// Float32Slice gets the value as a []float32, returns the optionalDefault -// value or nil if the value is not a []float32. -func (v *Value) Float32Slice(optionalDefault ...[]float32) []float32 { - if s, ok := v.data.([]float32); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustFloat32Slice gets the value as a []float32. -// -// Panics if the object is not a []float32. -func (v *Value) MustFloat32Slice() []float32 { - return v.data.([]float32) -} - -// IsFloat32 gets whether the object contained is a float32 or not. -func (v *Value) IsFloat32() bool { - _, ok := v.data.(float32) - return ok -} - -// IsFloat32Slice gets whether the object contained is a []float32 or not. -func (v *Value) IsFloat32Slice() bool { - _, ok := v.data.([]float32) - return ok -} - -// EachFloat32 calls the specified callback for each object -// in the []float32. -// -// Panics if the object is the wrong type. -func (v *Value) EachFloat32(callback func(int, float32) bool) *Value { - for index, val := range v.MustFloat32Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereFloat32 uses the specified decider function to select items -// from the []float32. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereFloat32(decider func(int, float32) bool) *Value { - var selected []float32 - v.EachFloat32(func(index int, val float32) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupFloat32 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]float32. -func (v *Value) GroupFloat32(grouper func(int, float32) string) *Value { - groups := make(map[string][]float32) - v.EachFloat32(func(index int, val float32) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]float32, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceFloat32 uses the specified function to replace each float32s -// by iterating each item. The data in the returned result will be a -// []float32 containing the replaced items. -func (v *Value) ReplaceFloat32(replacer func(int, float32) float32) *Value { - arr := v.MustFloat32Slice() - replaced := make([]float32, len(arr)) - v.EachFloat32(func(index int, val float32) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectFloat32 uses the specified collector function to collect a value -// for each of the float32s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectFloat32(collector func(int, float32) interface{}) *Value { - arr := v.MustFloat32Slice() - collected := make([]interface{}, len(arr)) - v.EachFloat32(func(index int, val float32) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Float64 (float64 and []float64) -*/ - -// Float64 gets the value as a float64, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Float64(optionalDefault ...float64) float64 { - if s, ok := v.data.(float64); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustFloat64 gets the value as a float64. -// -// Panics if the object is not a float64. -func (v *Value) MustFloat64() float64 { - return v.data.(float64) -} - -// Float64Slice gets the value as a []float64, returns the optionalDefault -// value or nil if the value is not a []float64. -func (v *Value) Float64Slice(optionalDefault ...[]float64) []float64 { - if s, ok := v.data.([]float64); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustFloat64Slice gets the value as a []float64. -// -// Panics if the object is not a []float64. -func (v *Value) MustFloat64Slice() []float64 { - return v.data.([]float64) -} - -// IsFloat64 gets whether the object contained is a float64 or not. -func (v *Value) IsFloat64() bool { - _, ok := v.data.(float64) - return ok -} - -// IsFloat64Slice gets whether the object contained is a []float64 or not. -func (v *Value) IsFloat64Slice() bool { - _, ok := v.data.([]float64) - return ok -} - -// EachFloat64 calls the specified callback for each object -// in the []float64. -// -// Panics if the object is the wrong type. -func (v *Value) EachFloat64(callback func(int, float64) bool) *Value { - for index, val := range v.MustFloat64Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereFloat64 uses the specified decider function to select items -// from the []float64. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereFloat64(decider func(int, float64) bool) *Value { - var selected []float64 - v.EachFloat64(func(index int, val float64) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupFloat64 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]float64. -func (v *Value) GroupFloat64(grouper func(int, float64) string) *Value { - groups := make(map[string][]float64) - v.EachFloat64(func(index int, val float64) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]float64, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceFloat64 uses the specified function to replace each float64s -// by iterating each item. The data in the returned result will be a -// []float64 containing the replaced items. -func (v *Value) ReplaceFloat64(replacer func(int, float64) float64) *Value { - arr := v.MustFloat64Slice() - replaced := make([]float64, len(arr)) - v.EachFloat64(func(index int, val float64) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectFloat64 uses the specified collector function to collect a value -// for each of the float64s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectFloat64(collector func(int, float64) interface{}) *Value { - arr := v.MustFloat64Slice() - collected := make([]interface{}, len(arr)) - v.EachFloat64(func(index int, val float64) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Complex64 (complex64 and []complex64) -*/ - -// Complex64 gets the value as a complex64, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Complex64(optionalDefault ...complex64) complex64 { - if s, ok := v.data.(complex64); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustComplex64 gets the value as a complex64. -// -// Panics if the object is not a complex64. -func (v *Value) MustComplex64() complex64 { - return v.data.(complex64) -} - -// Complex64Slice gets the value as a []complex64, returns the optionalDefault -// value or nil if the value is not a []complex64. -func (v *Value) Complex64Slice(optionalDefault ...[]complex64) []complex64 { - if s, ok := v.data.([]complex64); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustComplex64Slice gets the value as a []complex64. -// -// Panics if the object is not a []complex64. -func (v *Value) MustComplex64Slice() []complex64 { - return v.data.([]complex64) -} - -// IsComplex64 gets whether the object contained is a complex64 or not. -func (v *Value) IsComplex64() bool { - _, ok := v.data.(complex64) - return ok -} - -// IsComplex64Slice gets whether the object contained is a []complex64 or not. -func (v *Value) IsComplex64Slice() bool { - _, ok := v.data.([]complex64) - return ok -} - -// EachComplex64 calls the specified callback for each object -// in the []complex64. -// -// Panics if the object is the wrong type. -func (v *Value) EachComplex64(callback func(int, complex64) bool) *Value { - for index, val := range v.MustComplex64Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereComplex64 uses the specified decider function to select items -// from the []complex64. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereComplex64(decider func(int, complex64) bool) *Value { - var selected []complex64 - v.EachComplex64(func(index int, val complex64) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupComplex64 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]complex64. -func (v *Value) GroupComplex64(grouper func(int, complex64) string) *Value { - groups := make(map[string][]complex64) - v.EachComplex64(func(index int, val complex64) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]complex64, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceComplex64 uses the specified function to replace each complex64s -// by iterating each item. The data in the returned result will be a -// []complex64 containing the replaced items. -func (v *Value) ReplaceComplex64(replacer func(int, complex64) complex64) *Value { - arr := v.MustComplex64Slice() - replaced := make([]complex64, len(arr)) - v.EachComplex64(func(index int, val complex64) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectComplex64 uses the specified collector function to collect a value -// for each of the complex64s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectComplex64(collector func(int, complex64) interface{}) *Value { - arr := v.MustComplex64Slice() - collected := make([]interface{}, len(arr)) - v.EachComplex64(func(index int, val complex64) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} - -/* - Complex128 (complex128 and []complex128) -*/ - -// Complex128 gets the value as a complex128, returns the optionalDefault -// value or a system default object if the value is the wrong type. -func (v *Value) Complex128(optionalDefault ...complex128) complex128 { - if s, ok := v.data.(complex128); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return 0 -} - -// MustComplex128 gets the value as a complex128. -// -// Panics if the object is not a complex128. -func (v *Value) MustComplex128() complex128 { - return v.data.(complex128) -} - -// Complex128Slice gets the value as a []complex128, returns the optionalDefault -// value or nil if the value is not a []complex128. -func (v *Value) Complex128Slice(optionalDefault ...[]complex128) []complex128 { - if s, ok := v.data.([]complex128); ok { - return s - } - if len(optionalDefault) == 1 { - return optionalDefault[0] - } - return nil -} - -// MustComplex128Slice gets the value as a []complex128. -// -// Panics if the object is not a []complex128. -func (v *Value) MustComplex128Slice() []complex128 { - return v.data.([]complex128) -} - -// IsComplex128 gets whether the object contained is a complex128 or not. -func (v *Value) IsComplex128() bool { - _, ok := v.data.(complex128) - return ok -} - -// IsComplex128Slice gets whether the object contained is a []complex128 or not. -func (v *Value) IsComplex128Slice() bool { - _, ok := v.data.([]complex128) - return ok -} - -// EachComplex128 calls the specified callback for each object -// in the []complex128. -// -// Panics if the object is the wrong type. -func (v *Value) EachComplex128(callback func(int, complex128) bool) *Value { - for index, val := range v.MustComplex128Slice() { - carryon := callback(index, val) - if !carryon { - break - } - } - return v -} - -// WhereComplex128 uses the specified decider function to select items -// from the []complex128. The object contained in the result will contain -// only the selected items. -func (v *Value) WhereComplex128(decider func(int, complex128) bool) *Value { - var selected []complex128 - v.EachComplex128(func(index int, val complex128) bool { - shouldSelect := decider(index, val) - if !shouldSelect { - selected = append(selected, val) - } - return true - }) - return &Value{data: selected} -} - -// GroupComplex128 uses the specified grouper function to group the items -// keyed by the return of the grouper. The object contained in the -// result will contain a map[string][]complex128. -func (v *Value) GroupComplex128(grouper func(int, complex128) string) *Value { - groups := make(map[string][]complex128) - v.EachComplex128(func(index int, val complex128) bool { - group := grouper(index, val) - if _, ok := groups[group]; !ok { - groups[group] = make([]complex128, 0) - } - groups[group] = append(groups[group], val) - return true - }) - return &Value{data: groups} -} - -// ReplaceComplex128 uses the specified function to replace each complex128s -// by iterating each item. The data in the returned result will be a -// []complex128 containing the replaced items. -func (v *Value) ReplaceComplex128(replacer func(int, complex128) complex128) *Value { - arr := v.MustComplex128Slice() - replaced := make([]complex128, len(arr)) - v.EachComplex128(func(index int, val complex128) bool { - replaced[index] = replacer(index, val) - return true - }) - return &Value{data: replaced} -} - -// CollectComplex128 uses the specified collector function to collect a value -// for each of the complex128s in the slice. The data returned will be a -// []interface{}. -func (v *Value) CollectComplex128(collector func(int, complex128) interface{}) *Value { - arr := v.MustComplex128Slice() - collected := make([]interface{}, len(arr)) - v.EachComplex128(func(index int, val complex128) bool { - collected[index] = collector(index, val) - return true - }) - return &Value{data: collected} -} diff --git a/vendor/github.com/stretchr/objx/value.go b/vendor/github.com/stretchr/objx/value.go deleted file mode 100644 index 956a2211d..000000000 --- a/vendor/github.com/stretchr/objx/value.go +++ /dev/null @@ -1,56 +0,0 @@ -package objx - -import ( - "fmt" - "strconv" -) - -// Value provides methods for extracting interface{} data in various -// types. -type Value struct { - // data contains the raw data being managed by this Value - data interface{} -} - -// Data returns the raw data contained by this Value -func (v *Value) Data() interface{} { - return v.data -} - -// String returns the value always as a string -func (v *Value) String() string { - switch { - case v.IsStr(): - return v.Str() - case v.IsBool(): - return strconv.FormatBool(v.Bool()) - case v.IsFloat32(): - return strconv.FormatFloat(float64(v.Float32()), 'f', -1, 32) - case v.IsFloat64(): - return strconv.FormatFloat(v.Float64(), 'f', -1, 64) - case v.IsInt(): - return strconv.FormatInt(int64(v.Int()), 10) - case v.IsInt(): - return strconv.FormatInt(int64(v.Int()), 10) - case v.IsInt8(): - return strconv.FormatInt(int64(v.Int8()), 10) - case v.IsInt16(): - return strconv.FormatInt(int64(v.Int16()), 10) - case v.IsInt32(): - return strconv.FormatInt(int64(v.Int32()), 10) - case v.IsInt64(): - return strconv.FormatInt(v.Int64(), 10) - case v.IsUint(): - return strconv.FormatUint(uint64(v.Uint()), 10) - case v.IsUint8(): - return strconv.FormatUint(uint64(v.Uint8()), 10) - case v.IsUint16(): - return strconv.FormatUint(uint64(v.Uint16()), 10) - case v.IsUint32(): - return strconv.FormatUint(uint64(v.Uint32()), 10) - case v.IsUint64(): - return strconv.FormatUint(v.Uint64(), 10) - } - - return fmt.Sprintf("%#v", v.Data()) -} diff --git a/vendor/github.com/stretchr/testify/Godeps/Godeps.json b/vendor/github.com/stretchr/testify/Godeps/Godeps.json deleted file mode 100644 index 5069ce03d..000000000 --- a/vendor/github.com/stretchr/testify/Godeps/Godeps.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "ImportPath": "github.com/stretchr/testify", - "GoVersion": "go1.5", - "Packages": [ - "./..." - ], - "Deps": [ - { - "ImportPath": "github.com/davecgh/go-spew/spew", - "Rev": "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d" - }, - { - "ImportPath": "github.com/pmezard/go-difflib/difflib", - "Rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d" - }, - { - "ImportPath": "github.com/stretchr/objx", - "Rev": "cbeaeb16a013161a98496fad62933b1d21786672" - } - ] -} diff --git a/vendor/github.com/stretchr/testify/Godeps/Readme b/vendor/github.com/stretchr/testify/Godeps/Readme deleted file mode 100644 index 4cdaa53d5..000000000 --- a/vendor/github.com/stretchr/testify/Godeps/Readme +++ /dev/null @@ -1,5 +0,0 @@ -This directory tree is generated automatically by godep. - -Please do not edit. - -See https://github.com/tools/godep for more information. diff --git a/vendor/github.com/stretchr/testify/LICENSE b/vendor/github.com/stretchr/testify/LICENSE index 473b670a7..f38ec5956 100644 --- a/vendor/github.com/stretchr/testify/LICENSE +++ b/vendor/github.com/stretchr/testify/LICENSE @@ -1,22 +1,21 @@ -Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell +MIT License -Please consider promoting this project if you find it useful. +Copyright (c) 2012-2018 Mat Ryer and Tyler Bunnell -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT -OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/stretchr/testify/_codegen/main.go b/vendor/github.com/stretchr/testify/_codegen/main.go deleted file mode 100644 index 328009f84..000000000 --- a/vendor/github.com/stretchr/testify/_codegen/main.go +++ /dev/null @@ -1,287 +0,0 @@ -// This program reads all assertion functions from the assert package and -// automatically generates the corersponding requires and forwarded assertions - -package main - -import ( - "bytes" - "flag" - "fmt" - "go/ast" - "go/build" - "go/doc" - "go/importer" - "go/parser" - "go/token" - "go/types" - "io" - "io/ioutil" - "log" - "os" - "path" - "strings" - "text/template" - - "github.com/ernesto-jimenez/gogen/imports" -) - -var ( - pkg = flag.String("assert-path", "github.com/stretchr/testify/assert", "Path to the assert package") - outputPkg = flag.String("output-package", "", "package for the resulting code") - tmplFile = flag.String("template", "", "What file to load the function template from") - out = flag.String("out", "", "What file to write the source code to") -) - -func main() { - flag.Parse() - - scope, docs, err := parsePackageSource(*pkg) - if err != nil { - log.Fatal(err) - } - - importer, funcs, err := analyzeCode(scope, docs) - if err != nil { - log.Fatal(err) - } - - if err := generateCode(importer, funcs); err != nil { - log.Fatal(err) - } -} - -func generateCode(importer imports.Importer, funcs []testFunc) error { - buff := bytes.NewBuffer(nil) - - tmplHead, tmplFunc, err := parseTemplates() - if err != nil { - return err - } - - // Generate header - if err := tmplHead.Execute(buff, struct { - Name string - Imports map[string]string - }{ - *outputPkg, - importer.Imports(), - }); err != nil { - return err - } - - // Generate funcs - for _, fn := range funcs { - buff.Write([]byte("\n\n")) - if err := tmplFunc.Execute(buff, &fn); err != nil { - return err - } - } - - // Write file - output, err := outputFile() - if err != nil { - return err - } - defer output.Close() - _, err = io.Copy(output, buff) - return err -} - -func parseTemplates() (*template.Template, *template.Template, error) { - tmplHead, err := template.New("header").Parse(headerTemplate) - if err != nil { - return nil, nil, err - } - if *tmplFile != "" { - f, err := ioutil.ReadFile(*tmplFile) - if err != nil { - return nil, nil, err - } - funcTemplate = string(f) - } - tmpl, err := template.New("function").Parse(funcTemplate) - if err != nil { - return nil, nil, err - } - return tmplHead, tmpl, nil -} - -func outputFile() (*os.File, error) { - filename := *out - if filename == "-" || (filename == "" && *tmplFile == "") { - return os.Stdout, nil - } - if filename == "" { - filename = strings.TrimSuffix(strings.TrimSuffix(*tmplFile, ".tmpl"), ".go") + ".go" - } - return os.Create(filename) -} - -// analyzeCode takes the types scope and the docs and returns the import -// information and information about all the assertion functions. -func analyzeCode(scope *types.Scope, docs *doc.Package) (imports.Importer, []testFunc, error) { - testingT := scope.Lookup("TestingT").Type().Underlying().(*types.Interface) - - importer := imports.New(*outputPkg) - var funcs []testFunc - // Go through all the top level functions - for _, fdocs := range docs.Funcs { - // Find the function - obj := scope.Lookup(fdocs.Name) - - fn, ok := obj.(*types.Func) - if !ok { - continue - } - // Check function signatuer has at least two arguments - sig := fn.Type().(*types.Signature) - if sig.Params().Len() < 2 { - continue - } - // Check first argument is of type testingT - first, ok := sig.Params().At(0).Type().(*types.Named) - if !ok { - continue - } - firstType, ok := first.Underlying().(*types.Interface) - if !ok { - continue - } - if !types.Implements(firstType, testingT) { - continue - } - - funcs = append(funcs, testFunc{*outputPkg, fdocs, fn}) - importer.AddImportsFrom(sig.Params()) - } - return importer, funcs, nil -} - -// parsePackageSource returns the types scope and the package documentation from the pa -func parsePackageSource(pkg string) (*types.Scope, *doc.Package, error) { - pd, err := build.Import(pkg, ".", 0) - if err != nil { - return nil, nil, err - } - - fset := token.NewFileSet() - files := make(map[string]*ast.File) - fileList := make([]*ast.File, len(pd.GoFiles)) - for i, fname := range pd.GoFiles { - src, err := ioutil.ReadFile(path.Join(pd.SrcRoot, pd.ImportPath, fname)) - if err != nil { - return nil, nil, err - } - f, err := parser.ParseFile(fset, fname, src, parser.ParseComments|parser.AllErrors) - if err != nil { - return nil, nil, err - } - files[fname] = f - fileList[i] = f - } - - cfg := types.Config{ - Importer: importer.Default(), - } - info := types.Info{ - Defs: make(map[*ast.Ident]types.Object), - } - tp, err := cfg.Check(pkg, fset, fileList, &info) - if err != nil { - return nil, nil, err - } - - scope := tp.Scope() - - ap, _ := ast.NewPackage(fset, files, nil, nil) - docs := doc.New(ap, pkg, 0) - - return scope, docs, nil -} - -type testFunc struct { - CurrentPkg string - DocInfo *doc.Func - TypeInfo *types.Func -} - -func (f *testFunc) Qualifier(p *types.Package) string { - if p == nil || p.Name() == f.CurrentPkg { - return "" - } - return p.Name() -} - -func (f *testFunc) Params() string { - sig := f.TypeInfo.Type().(*types.Signature) - params := sig.Params() - p := "" - comma := "" - to := params.Len() - var i int - - if sig.Variadic() { - to-- - } - for i = 1; i < to; i++ { - param := params.At(i) - p += fmt.Sprintf("%s%s %s", comma, param.Name(), types.TypeString(param.Type(), f.Qualifier)) - comma = ", " - } - if sig.Variadic() { - param := params.At(params.Len() - 1) - p += fmt.Sprintf("%s%s ...%s", comma, param.Name(), types.TypeString(param.Type().(*types.Slice).Elem(), f.Qualifier)) - } - return p -} - -func (f *testFunc) ForwardedParams() string { - sig := f.TypeInfo.Type().(*types.Signature) - params := sig.Params() - p := "" - comma := "" - to := params.Len() - var i int - - if sig.Variadic() { - to-- - } - for i = 1; i < to; i++ { - param := params.At(i) - p += fmt.Sprintf("%s%s", comma, param.Name()) - comma = ", " - } - if sig.Variadic() { - param := params.At(params.Len() - 1) - p += fmt.Sprintf("%s%s...", comma, param.Name()) - } - return p -} - -func (f *testFunc) Comment() string { - return "// " + strings.Replace(strings.TrimSpace(f.DocInfo.Doc), "\n", "\n// ", -1) -} - -func (f *testFunc) CommentWithoutT(receiver string) string { - search := fmt.Sprintf("assert.%s(t, ", f.DocInfo.Name) - replace := fmt.Sprintf("%s.%s(", receiver, f.DocInfo.Name) - return strings.Replace(f.Comment(), search, replace, -1) -} - -var headerTemplate = `/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND -*/ - -package {{.Name}} - -import ( -{{range $path, $name := .Imports}} - {{$name}} "{{$path}}"{{end}} -) -` - -var funcTemplate = `{{.Comment}} -func (fwd *AssertionsForwarder) {{.DocInfo.Name}}({{.Params}}) bool { - return assert.{{.DocInfo.Name}}({{.ForwardedParams}}) -}` diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/testify/assert/assertion_format.go index ae06a54e2..aa1c2b95c 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_format.go @@ -13,6 +13,9 @@ import ( // Conditionf uses a Comparison to assert a complex condition. func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Condition(t, comp, append([]interface{}{msg}, args...)...) } @@ -23,11 +26,17 @@ func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bo // assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") // assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Contains(t, s, contains, append([]interface{}{msg}, args...)...) } // DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return DirExists(t, path, append([]interface{}{msg}, args...)...) } @@ -37,6 +46,9 @@ func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { // // assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return ElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...) } @@ -45,6 +57,9 @@ func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string // // assert.Emptyf(t, obj, "error message %s", "formatted") func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Empty(t, object, append([]interface{}{msg}, args...)...) } @@ -56,6 +71,9 @@ func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) boo // referenced values (as opposed to the memory addresses). Function equality // cannot be determined and will always fail. func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Equal(t, expected, actual, append([]interface{}{msg}, args...)...) } @@ -65,6 +83,9 @@ func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, ar // actualObj, err := SomeFunction() // assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return EqualError(t, theError, errString, append([]interface{}{msg}, args...)...) } @@ -73,6 +94,9 @@ func EqualErrorf(t TestingT, theError error, errString string, msg string, args // // assert.EqualValuesf(t, uint32(123, "error message %s", "formatted"), int32(123)) func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return EqualValues(t, expected, actual, append([]interface{}{msg}, args...)...) } @@ -83,6 +107,9 @@ func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg stri // assert.Equal(t, expectedErrorf, err) // } func Errorf(t TestingT, err error, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Error(t, err, append([]interface{}{msg}, args...)...) } @@ -90,16 +117,25 @@ func Errorf(t TestingT, err error, msg string, args ...interface{}) bool { // // assert.Exactlyf(t, int32(123, "error message %s", "formatted"), int64(123)) func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Exactly(t, expected, actual, append([]interface{}{msg}, args...)...) } // Failf reports a failure through func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Fail(t, failureMessage, append([]interface{}{msg}, args...)...) } // FailNowf fails test func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return FailNow(t, failureMessage, append([]interface{}{msg}, args...)...) } @@ -107,31 +143,43 @@ func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{} // // assert.Falsef(t, myBool, "error message %s", "formatted") func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return False(t, value, append([]interface{}{msg}, args...)...) } // FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return FileExists(t, path, append([]interface{}{msg}, args...)...) } // HTTPBodyContainsf asserts that a specified handler returns a // body that contains a string. // -// assert.HTTPBodyContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return HTTPBodyContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) } // HTTPBodyNotContainsf asserts that a specified handler returns a // body that does not contain a string. // -// assert.HTTPBodyNotContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// assert.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return HTTPBodyNotContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) } @@ -141,6 +189,9 @@ func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, u // // Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return HTTPError(t, handler, method, url, values, append([]interface{}{msg}, args...)...) } @@ -150,6 +201,9 @@ func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, // // Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return HTTPRedirect(t, handler, method, url, values, append([]interface{}{msg}, args...)...) } @@ -159,6 +213,9 @@ func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url stri // // Returns whether the assertion was successful (true) or not (false). func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return HTTPSuccess(t, handler, method, url, values, append([]interface{}{msg}, args...)...) } @@ -166,6 +223,9 @@ func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url strin // // assert.Implementsf(t, (*MyInterface, "error message %s", "formatted")(nil), new(MyObject)) func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Implements(t, interfaceObject, object, append([]interface{}{msg}, args...)...) } @@ -173,31 +233,49 @@ func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, ms // // assert.InDeltaf(t, math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01) func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return InDelta(t, expected, actual, delta, append([]interface{}{msg}, args...)...) } // InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return InDeltaMapValues(t, expected, actual, delta, append([]interface{}{msg}, args...)...) } // InDeltaSlicef is the same as InDelta, except it compares two slices. func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return InDeltaSlice(t, expected, actual, delta, append([]interface{}{msg}, args...)...) } // InEpsilonf asserts that expected and actual have a relative error less than epsilon func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return InEpsilon(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) } // InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return InEpsilonSlice(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) } // IsTypef asserts that the specified objects are of the same type. func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return IsType(t, expectedType, object, append([]interface{}{msg}, args...)...) } @@ -205,6 +283,9 @@ func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg strin // // assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return JSONEq(t, expected, actual, append([]interface{}{msg}, args...)...) } @@ -213,6 +294,9 @@ func JSONEqf(t TestingT, expected string, actual string, msg string, args ...int // // assert.Lenf(t, mySlice, 3, "error message %s", "formatted") func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Len(t, object, length, append([]interface{}{msg}, args...)...) } @@ -220,6 +304,9 @@ func Lenf(t TestingT, object interface{}, length int, msg string, args ...interf // // assert.Nilf(t, err, "error message %s", "formatted") func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Nil(t, object, append([]interface{}{msg}, args...)...) } @@ -230,6 +317,9 @@ func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool // assert.Equal(t, expectedObj, actualObj) // } func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return NoError(t, err, append([]interface{}{msg}, args...)...) } @@ -240,6 +330,9 @@ func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool { // assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") // assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return NotContains(t, s, contains, append([]interface{}{msg}, args...)...) } @@ -250,6 +343,9 @@ func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, a // assert.Equal(t, "two", obj[1]) // } func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return NotEmpty(t, object, append([]interface{}{msg}, args...)...) } @@ -260,6 +356,9 @@ func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return NotEqual(t, expected, actual, append([]interface{}{msg}, args...)...) } @@ -267,6 +366,9 @@ func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, // // assert.NotNilf(t, err, "error message %s", "formatted") func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return NotNil(t, object, append([]interface{}{msg}, args...)...) } @@ -274,6 +376,9 @@ func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bo // // assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return NotPanics(t, f, append([]interface{}{msg}, args...)...) } @@ -282,6 +387,9 @@ func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bo // assert.NotRegexpf(t, regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting") // assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return NotRegexp(t, rx, str, append([]interface{}{msg}, args...)...) } @@ -290,11 +398,17 @@ func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args .. // // assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return NotSubset(t, list, subset, append([]interface{}{msg}, args...)...) } // NotZerof asserts that i is not the zero value for its type. func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return NotZero(t, i, append([]interface{}{msg}, args...)...) } @@ -302,6 +416,9 @@ func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { // // assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Panics(t, f, append([]interface{}{msg}, args...)...) } @@ -310,6 +427,9 @@ func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool // // assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return PanicsWithValue(t, expected, f, append([]interface{}{msg}, args...)...) } @@ -318,6 +438,9 @@ func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg str // assert.Regexpf(t, regexp.MustCompile("start", "error message %s", "formatted"), "it's starting") // assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Regexp(t, rx, str, append([]interface{}{msg}, args...)...) } @@ -326,6 +449,9 @@ func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...in // // assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Subset(t, list, subset, append([]interface{}{msg}, args...)...) } @@ -333,6 +459,9 @@ func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args // // assert.Truef(t, myBool, "error message %s", "formatted") func Truef(t TestingT, value bool, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return True(t, value, append([]interface{}{msg}, args...)...) } @@ -340,10 +469,16 @@ func Truef(t TestingT, value bool, msg string, args ...interface{}) bool { // // assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...) } // Zerof asserts that i is the zero value for its type. func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } return Zero(t, i, append([]interface{}{msg}, args...)...) } diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl index c5cc66f43..d2bb0b817 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl +++ b/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl @@ -1,4 +1,5 @@ {{.CommentFormat}} func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { + if h, ok := t.(tHelper); ok { h.Helper() } return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) } diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/testify/assert/assertion_forward.go index ffa5428f3..de39f794e 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_forward.go @@ -13,11 +13,17 @@ import ( // Condition uses a Comparison to assert a complex condition. func (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Condition(a.t, comp, msgAndArgs...) } // Conditionf uses a Comparison to assert a complex condition. func (a *Assertions) Conditionf(comp Comparison, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Conditionf(a.t, comp, msg, args...) } @@ -28,6 +34,9 @@ func (a *Assertions) Conditionf(comp Comparison, msg string, args ...interface{} // a.Contains(["Hello", "World"], "World") // a.Contains({"Hello": "World"}, "Hello") func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Contains(a.t, s, contains, msgAndArgs...) } @@ -38,16 +47,25 @@ func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs .. // a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") // a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Containsf(a.t, s, contains, msg, args...) } // DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return DirExists(a.t, path, msgAndArgs...) } // DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return DirExistsf(a.t, path, msg, args...) } @@ -57,6 +75,9 @@ func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bo // // a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]) func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return ElementsMatch(a.t, listA, listB, msgAndArgs...) } @@ -66,6 +87,9 @@ func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndA // // a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return ElementsMatchf(a.t, listA, listB, msg, args...) } @@ -74,6 +98,9 @@ func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg st // // a.Empty(obj) func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Empty(a.t, object, msgAndArgs...) } @@ -82,6 +109,9 @@ func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { // // a.Emptyf(obj, "error message %s", "formatted") func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Emptyf(a.t, object, msg, args...) } @@ -93,6 +123,9 @@ func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) // referenced values (as opposed to the memory addresses). Function equality // cannot be determined and will always fail. func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Equal(a.t, expected, actual, msgAndArgs...) } @@ -102,6 +135,9 @@ func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs // actualObj, err := SomeFunction() // a.EqualError(err, expectedErrorString) func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return EqualError(a.t, theError, errString, msgAndArgs...) } @@ -111,6 +147,9 @@ func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ... // actualObj, err := SomeFunction() // a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return EqualErrorf(a.t, theError, errString, msg, args...) } @@ -119,6 +158,9 @@ func (a *Assertions) EqualErrorf(theError error, errString string, msg string, a // // a.EqualValues(uint32(123), int32(123)) func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return EqualValues(a.t, expected, actual, msgAndArgs...) } @@ -127,6 +169,9 @@ func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAn // // a.EqualValuesf(uint32(123, "error message %s", "formatted"), int32(123)) func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return EqualValuesf(a.t, expected, actual, msg, args...) } @@ -138,6 +183,9 @@ func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg // referenced values (as opposed to the memory addresses). Function equality // cannot be determined and will always fail. func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Equalf(a.t, expected, actual, msg, args...) } @@ -148,6 +196,9 @@ func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string // assert.Equal(t, expectedError, err) // } func (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Error(a.t, err, msgAndArgs...) } @@ -158,6 +209,9 @@ func (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool { // assert.Equal(t, expectedErrorf, err) // } func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Errorf(a.t, err, msg, args...) } @@ -165,6 +219,9 @@ func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool { // // a.Exactly(int32(123), int64(123)) func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Exactly(a.t, expected, actual, msgAndArgs...) } @@ -172,26 +229,41 @@ func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArg // // a.Exactlyf(int32(123, "error message %s", "formatted"), int64(123)) func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Exactlyf(a.t, expected, actual, msg, args...) } // Fail reports a failure through func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Fail(a.t, failureMessage, msgAndArgs...) } // FailNow fails test func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return FailNow(a.t, failureMessage, msgAndArgs...) } // FailNowf fails test func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return FailNowf(a.t, failureMessage, msg, args...) } // Failf reports a failure through func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Failf(a.t, failureMessage, msg, args...) } @@ -199,6 +271,9 @@ func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{ // // a.False(myBool) func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return False(a.t, value, msgAndArgs...) } @@ -206,56 +281,77 @@ func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool { // // a.Falsef(myBool, "error message %s", "formatted") func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Falsef(a.t, value, msg, args...) } // FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return FileExists(a.t, path, msgAndArgs...) } // FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return FileExistsf(a.t, path, msg, args...) } // HTTPBodyContains asserts that a specified handler returns a // body that contains a string. // -// a.HTTPBodyContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky") +// a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) } // HTTPBodyContainsf asserts that a specified handler returns a // body that contains a string. // -// a.HTTPBodyContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...) } // HTTPBodyNotContains asserts that a specified handler returns a // body that does not contain a string. // -// a.HTTPBodyNotContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky") +// a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...) } // HTTPBodyNotContainsf asserts that a specified handler returns a // body that does not contain a string. // -// a.HTTPBodyNotContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// a.HTTPBodyNotContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...) } @@ -265,6 +361,9 @@ func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method strin // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPError(a.t, handler, method, url, values, msgAndArgs...) } @@ -274,6 +373,9 @@ func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url stri // // Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPErrorf(a.t, handler, method, url, values, msg, args...) } @@ -283,6 +385,9 @@ func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url str // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...) } @@ -292,6 +397,9 @@ func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url s // // Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPRedirectf(a.t, handler, method, url, values, msg, args...) } @@ -301,6 +409,9 @@ func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...) } @@ -310,6 +421,9 @@ func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url st // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return HTTPSuccessf(a.t, handler, method, url, values, msg, args...) } @@ -317,6 +431,9 @@ func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url s // // a.Implements((*MyInterface)(nil), new(MyObject)) func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Implements(a.t, interfaceObject, object, msgAndArgs...) } @@ -324,6 +441,9 @@ func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, // // a.Implementsf((*MyInterface, "error message %s", "formatted")(nil), new(MyObject)) func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Implementsf(a.t, interfaceObject, object, msg, args...) } @@ -331,26 +451,41 @@ func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{} // // a.InDelta(math.Pi, (22 / 7.0), 0.01) func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InDelta(a.t, expected, actual, delta, msgAndArgs...) } // InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...) } // InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...) } // InDeltaSlice is the same as InDelta, except it compares two slices. func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...) } // InDeltaSlicef is the same as InDelta, except it compares two slices. func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InDeltaSlicef(a.t, expected, actual, delta, msg, args...) } @@ -358,36 +493,57 @@ func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, del // // a.InDeltaf(math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01) func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InDeltaf(a.t, expected, actual, delta, msg, args...) } // InEpsilon asserts that expected and actual have a relative error less than epsilon func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...) } // InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...) } // InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...) } // InEpsilonf asserts that expected and actual have a relative error less than epsilon func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return InEpsilonf(a.t, expected, actual, epsilon, msg, args...) } // IsType asserts that the specified objects are of the same type. func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return IsType(a.t, expectedType, object, msgAndArgs...) } // IsTypef asserts that the specified objects are of the same type. func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return IsTypef(a.t, expectedType, object, msg, args...) } @@ -395,6 +551,9 @@ func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg s // // a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return JSONEq(a.t, expected, actual, msgAndArgs...) } @@ -402,6 +561,9 @@ func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interf // // a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return JSONEqf(a.t, expected, actual, msg, args...) } @@ -410,6 +572,9 @@ func (a *Assertions) JSONEqf(expected string, actual string, msg string, args .. // // a.Len(mySlice, 3) func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Len(a.t, object, length, msgAndArgs...) } @@ -418,6 +583,9 @@ func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface // // a.Lenf(mySlice, 3, "error message %s", "formatted") func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Lenf(a.t, object, length, msg, args...) } @@ -425,6 +593,9 @@ func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...in // // a.Nil(err) func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Nil(a.t, object, msgAndArgs...) } @@ -432,6 +603,9 @@ func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { // // a.Nilf(err, "error message %s", "formatted") func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Nilf(a.t, object, msg, args...) } @@ -442,6 +616,9 @@ func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) b // assert.Equal(t, expectedObj, actualObj) // } func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NoError(a.t, err, msgAndArgs...) } @@ -452,6 +629,9 @@ func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool { // assert.Equal(t, expectedObj, actualObj) // } func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NoErrorf(a.t, err, msg, args...) } @@ -462,6 +642,9 @@ func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool { // a.NotContains(["Hello", "World"], "Earth") // a.NotContains({"Hello": "World"}, "Earth") func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotContains(a.t, s, contains, msgAndArgs...) } @@ -472,6 +655,9 @@ func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs // a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") // a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotContainsf(a.t, s, contains, msg, args...) } @@ -482,6 +668,9 @@ func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg strin // assert.Equal(t, "two", obj[1]) // } func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotEmpty(a.t, object, msgAndArgs...) } @@ -492,6 +681,9 @@ func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) boo // assert.Equal(t, "two", obj[1]) // } func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotEmptyf(a.t, object, msg, args...) } @@ -502,6 +694,9 @@ func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotEqual(a.t, expected, actual, msgAndArgs...) } @@ -512,6 +707,9 @@ func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndAr // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotEqualf(a.t, expected, actual, msg, args...) } @@ -519,6 +717,9 @@ func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg str // // a.NotNil(err) func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotNil(a.t, object, msgAndArgs...) } @@ -526,6 +727,9 @@ func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool // // a.NotNilf(err, "error message %s", "formatted") func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotNilf(a.t, object, msg, args...) } @@ -533,6 +737,9 @@ func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{} // // a.NotPanics(func(){ RemainCalm() }) func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotPanics(a.t, f, msgAndArgs...) } @@ -540,6 +747,9 @@ func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool // // a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") func (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotPanicsf(a.t, f, msg, args...) } @@ -548,6 +758,9 @@ func (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{} // a.NotRegexp(regexp.MustCompile("starts"), "it's starting") // a.NotRegexp("^start", "it's not starting") func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotRegexp(a.t, rx, str, msgAndArgs...) } @@ -556,6 +769,9 @@ func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...in // a.NotRegexpf(regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting") // a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotRegexpf(a.t, rx, str, msg, args...) } @@ -564,6 +780,9 @@ func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, arg // // a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotSubset(a.t, list, subset, msgAndArgs...) } @@ -572,16 +791,25 @@ func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs // // a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotSubsetf(a.t, list, subset, msg, args...) } // NotZero asserts that i is not the zero value for its type. func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotZero(a.t, i, msgAndArgs...) } // NotZerof asserts that i is not the zero value for its type. func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return NotZerof(a.t, i, msg, args...) } @@ -589,6 +817,9 @@ func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bo // // a.Panics(func(){ GoCrazy() }) func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Panics(a.t, f, msgAndArgs...) } @@ -597,6 +828,9 @@ func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { // // a.PanicsWithValue("crazy error", func(){ GoCrazy() }) func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return PanicsWithValue(a.t, expected, f, msgAndArgs...) } @@ -605,6 +839,9 @@ func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgA // // a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return PanicsWithValuef(a.t, expected, f, msg, args...) } @@ -612,6 +849,9 @@ func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg // // a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") func (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Panicsf(a.t, f, msg, args...) } @@ -620,6 +860,9 @@ func (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) b // a.Regexp(regexp.MustCompile("start"), "it's starting") // a.Regexp("start...$", "it's not starting") func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Regexp(a.t, rx, str, msgAndArgs...) } @@ -628,6 +871,9 @@ func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...inter // a.Regexpf(regexp.MustCompile("start", "error message %s", "formatted"), "it's starting") // a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Regexpf(a.t, rx, str, msg, args...) } @@ -636,6 +882,9 @@ func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args . // // a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Subset(a.t, list, subset, msgAndArgs...) } @@ -644,6 +893,9 @@ func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ... // // a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Subsetf(a.t, list, subset, msg, args...) } @@ -651,6 +903,9 @@ func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, a // // a.True(myBool) func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return True(a.t, value, msgAndArgs...) } @@ -658,6 +913,9 @@ func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { // // a.Truef(myBool, "error message %s", "formatted") func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Truef(a.t, value, msg, args...) } @@ -665,6 +923,9 @@ func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool { // // a.WithinDuration(time.Now(), time.Now(), 10*time.Second) func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return WithinDuration(a.t, expected, actual, delta, msgAndArgs...) } @@ -672,15 +933,24 @@ func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta // // a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return WithinDurationf(a.t, expected, actual, delta, msg, args...) } // Zero asserts that i is the zero value for its type. func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Zero(a.t, i, msgAndArgs...) } // Zerof asserts that i is the zero value for its type. func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } return Zerof(a.t, i, msg, args...) } diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl index 99f9acfbb..188bb9e17 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl +++ b/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl @@ -1,4 +1,5 @@ {{.CommentWithoutT "a"}} func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { + if h, ok := a.t.(tHelper); ok { h.Helper() } return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) } diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go index 47bda7786..9bd4a80e4 100644 --- a/vendor/github.com/stretchr/testify/assert/assertions.go +++ b/vendor/github.com/stretchr/testify/assert/assertions.go @@ -27,6 +27,22 @@ type TestingT interface { Errorf(format string, args ...interface{}) } +// ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful +// for table driven tests. +type ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{}) bool + +// ValueAssertionFunc is a common function prototype when validating a single value. Can be useful +// for table driven tests. +type ValueAssertionFunc func(TestingT, interface{}, ...interface{}) bool + +// BoolAssertionFunc is a common function prototype when validating a bool value. Can be useful +// for table driven tests. +type BoolAssertionFunc func(TestingT, bool, ...interface{}) bool + +// ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful +// for table driven tests. +type ErrorAssertionFunc func(TestingT, error, ...interface{}) bool + // Comparison a custom function that returns true on success and false on failure type Comparison func() (success bool) @@ -38,21 +54,23 @@ type Comparison func() (success bool) // // This function does no assertion of any kind. func ObjectsAreEqual(expected, actual interface{}) bool { - if expected == nil || actual == nil { return expected == actual } - if exp, ok := expected.([]byte); ok { - act, ok := actual.([]byte) - if !ok { - return false - } else if exp == nil || act == nil { - return exp == nil && act == nil - } - return bytes.Equal(exp, act) - } - return reflect.DeepEqual(expected, actual) + exp, ok := expected.([]byte) + if !ok { + return reflect.DeepEqual(expected, actual) + } + + act, ok := actual.([]byte) + if !ok { + return false + } + if exp == nil || act == nil { + return exp == nil && act == nil + } + return bytes.Equal(exp, act) } // ObjectsAreEqualValues gets whether two objects are equal, or if their @@ -156,27 +174,16 @@ func isTest(name, prefix string) bool { return !unicode.IsLower(rune) } -// getWhitespaceString returns a string that is long enough to overwrite the default -// output from the go testing framework. -func getWhitespaceString() string { - - _, file, line, ok := runtime.Caller(1) - if !ok { - return "" - } - parts := strings.Split(file, "/") - file = parts[len(parts)-1] - - return strings.Repeat(" ", len(fmt.Sprintf("%s:%d: ", file, line))) - -} - func messageFromMsgAndArgs(msgAndArgs ...interface{}) string { if len(msgAndArgs) == 0 || msgAndArgs == nil { return "" } if len(msgAndArgs) == 1 { - return msgAndArgs[0].(string) + msg := msgAndArgs[0] + if msgAsStr, ok := msg.(string); ok { + return msgAsStr + } + return fmt.Sprintf("%+v", msg) } if len(msgAndArgs) > 1 { return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) @@ -195,7 +202,7 @@ func indentMessageLines(message string, longestLabelLen int) string { // no need to align first line because it starts at the correct location (after the label) if i != 0 { // append alignLen+1 spaces to align with "{{longestLabel}}:" before adding tab - outBuf.WriteString("\n\r\t" + strings.Repeat(" ", longestLabelLen+1) + "\t") + outBuf.WriteString("\n\t" + strings.Repeat(" ", longestLabelLen+1) + "\t") } outBuf.WriteString(scanner.Text()) } @@ -209,6 +216,9 @@ type failNower interface { // FailNow fails test func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } Fail(t, failureMessage, msgAndArgs...) // We cannot extend TestingT with FailNow() and @@ -227,8 +237,11 @@ func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool // Fail reports a failure through func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } content := []labeledContent{ - {"Error Trace", strings.Join(CallerInfo(), "\n\r\t\t\t")}, + {"Error Trace", strings.Join(CallerInfo(), "\n\t\t\t")}, {"Error", failureMessage}, } @@ -244,7 +257,7 @@ func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { content = append(content, labeledContent{"Messages", message}) } - t.Errorf("%s", "\r"+getWhitespaceString()+labeledOutput(content...)) + t.Errorf("\n%s", ""+labeledOutput(content...)) return false } @@ -256,7 +269,7 @@ type labeledContent struct { // labeledOutput returns a string consisting of the provided labeledContent. Each labeled output is appended in the following manner: // -// \r\t{{label}}:{{align_spaces}}\t{{content}}\n +// \t{{label}}:{{align_spaces}}\t{{content}}\n // // The initial carriage return is required to undo/erase any padding added by testing.T.Errorf. The "\t{{label}}:" is for the label. // If a label is shorter than the longest label provided, padding spaces are added to make all the labels match in length. Once this @@ -272,7 +285,7 @@ func labeledOutput(content ...labeledContent) string { } var output string for _, v := range content { - output += "\r\t" + v.label + ":" + strings.Repeat(" ", longestLabel-len(v.label)) + "\t" + indentMessageLines(v.content, longestLabel) + "\n" + output += "\t" + v.label + ":" + strings.Repeat(" ", longestLabel-len(v.label)) + "\t" + indentMessageLines(v.content, longestLabel) + "\n" } return output } @@ -281,6 +294,9 @@ func labeledOutput(content ...labeledContent) string { // // assert.Implements(t, (*MyInterface)(nil), new(MyObject)) func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } interfaceType := reflect.TypeOf(interfaceObject).Elem() if object == nil { @@ -295,6 +311,9 @@ func Implements(t TestingT, interfaceObject interface{}, object interface{}, msg // IsType asserts that the specified objects are of the same type. func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if !ObjectsAreEqual(reflect.TypeOf(object), reflect.TypeOf(expectedType)) { return Fail(t, fmt.Sprintf("Object expected to be of type %v, but was %v", reflect.TypeOf(expectedType), reflect.TypeOf(object)), msgAndArgs...) @@ -311,6 +330,9 @@ func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs // referenced values (as opposed to the memory addresses). Function equality // cannot be determined and will always fail. func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if err := validateEqualArgs(expected, actual); err != nil { return Fail(t, fmt.Sprintf("Invalid operation: %#v == %#v (%s)", expected, actual, err), msgAndArgs...) @@ -349,6 +371,9 @@ func formatUnequalValues(expected, actual interface{}) (e string, a string) { // // assert.EqualValues(t, uint32(123), int32(123)) func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if !ObjectsAreEqualValues(expected, actual) { diff := diff(expected, actual) @@ -366,12 +391,15 @@ func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interfa // // assert.Exactly(t, int32(123), int64(123)) func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } aType := reflect.TypeOf(expected) bType := reflect.TypeOf(actual) if aType != bType { - return Fail(t, fmt.Sprintf("Types expected to match exactly\n\r\t%v != %v", aType, bType), msgAndArgs...) + return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) } return Equal(t, expected, actual, msgAndArgs...) @@ -382,12 +410,26 @@ func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{} // // assert.NotNil(t, err) func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if !isNil(object) { return true } return Fail(t, "Expected value not to be nil.", msgAndArgs...) } +// containsKind checks if a specified kind in the slice of kinds. +func containsKind(kinds []reflect.Kind, kind reflect.Kind) bool { + for i := 0; i < len(kinds); i++ { + if kind == kinds[i] { + return true + } + } + + return false +} + // isNil checks if a specified object is nil or not, without Failing. func isNil(object interface{}) bool { if object == nil { @@ -396,7 +438,14 @@ func isNil(object interface{}) bool { value := reflect.ValueOf(object) kind := value.Kind() - if kind >= reflect.Chan && kind <= reflect.Slice && value.IsNil() { + isNilableKind := containsKind( + []reflect.Kind{ + reflect.Chan, reflect.Func, + reflect.Interface, reflect.Map, + reflect.Ptr, reflect.Slice}, + kind) + + if isNilableKind && value.IsNil() { return true } @@ -407,6 +456,9 @@ func isNil(object interface{}) bool { // // assert.Nil(t, err) func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if isNil(object) { return true } @@ -446,6 +498,9 @@ func isEmpty(object interface{}) bool { // // assert.Empty(t, obj) func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } pass := isEmpty(object) if !pass { @@ -463,6 +518,9 @@ func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { // assert.Equal(t, "two", obj[1]) // } func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } pass := !isEmpty(object) if !pass { @@ -490,6 +548,9 @@ func getLen(x interface{}) (ok bool, length int) { // // assert.Len(t, mySlice, 3) func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } ok, l := getLen(object) if !ok { return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", object), msgAndArgs...) @@ -505,6 +566,14 @@ func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) // // assert.True(t, myBool) func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + if h, ok := t.(interface { + Helper() + }); ok { + h.Helper() + } if value != true { return Fail(t, "Should be true", msgAndArgs...) @@ -518,6 +587,9 @@ func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { // // assert.False(t, myBool) func False(t TestingT, value bool, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if value != false { return Fail(t, "Should be false", msgAndArgs...) @@ -534,6 +606,9 @@ func False(t TestingT, value bool, msgAndArgs ...interface{}) bool { // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if err := validateEqualArgs(expected, actual); err != nil { return Fail(t, fmt.Sprintf("Invalid operation: %#v != %#v (%s)", expected, actual, err), msgAndArgs...) @@ -592,6 +667,9 @@ func includeElement(list interface{}, element interface{}) (ok, found bool) { // assert.Contains(t, ["Hello", "World"], "World") // assert.Contains(t, {"Hello": "World"}, "Hello") func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } ok, found := includeElement(s, contains) if !ok { @@ -612,6 +690,9 @@ func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bo // assert.NotContains(t, ["Hello", "World"], "Earth") // assert.NotContains(t, {"Hello": "World"}, "Earth") func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } ok, found := includeElement(s, contains) if !ok { @@ -630,6 +711,9 @@ func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) // // assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { + if h, ok := t.(tHelper); ok { + h.Helper() + } if subset == nil { return true // we consider nil to be equal to the nil set } @@ -671,6 +755,9 @@ func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok // // assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { + if h, ok := t.(tHelper); ok { + h.Helper() + } if subset == nil { return Fail(t, fmt.Sprintf("nil is the empty set which is a subset of every set"), msgAndArgs...) } @@ -713,6 +800,9 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) // // assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]) func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) { + if h, ok := t.(tHelper); ok { + h.Helper() + } if isEmpty(listA) && isEmpty(listB) { return true } @@ -763,6 +853,9 @@ func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface // Condition uses a Comparison to assert a complex condition. func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } result := comp() if !result { Fail(t, "Condition failed!", msgAndArgs...) @@ -800,9 +893,12 @@ func didPanic(f PanicTestFunc) (bool, interface{}) { // // assert.Panics(t, func(){ GoCrazy() }) func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if funcDidPanic, panicValue := didPanic(f); !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\r\tPanic value:\t%v", f, panicValue), msgAndArgs...) + return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) } return true @@ -813,13 +909,16 @@ func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { // // assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } funcDidPanic, panicValue := didPanic(f) if !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\r\tPanic value:\t%v", f, panicValue), msgAndArgs...) + return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) } if panicValue != expected { - return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%v\n\r\tPanic value:\t%v", f, expected, panicValue), msgAndArgs...) + return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%#v\n\tPanic value:\t%#v", f, expected, panicValue), msgAndArgs...) } return true @@ -829,9 +928,12 @@ func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndAr // // assert.NotPanics(t, func(){ RemainCalm() }) func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if funcDidPanic, panicValue := didPanic(f); funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should not panic\n\r\tPanic value:\t%v", f, panicValue), msgAndArgs...) + return Fail(t, fmt.Sprintf("func %#v should not panic\n\tPanic value:\t%v", f, panicValue), msgAndArgs...) } return true @@ -841,6 +943,9 @@ func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { // // assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } dt := expected.Sub(actual) if dt < -delta || dt > delta { @@ -890,6 +995,9 @@ func toFloat(x interface{}) (float64, bool) { // // assert.InDelta(t, math.Pi, (22 / 7.0), 0.01) func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } af, aok := toFloat(expected) bf, bok := toFloat(actual) @@ -916,6 +1024,9 @@ func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs // InDeltaSlice is the same as InDelta, except it compares two slices. func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if expected == nil || actual == nil || reflect.TypeOf(actual).Kind() != reflect.Slice || reflect.TypeOf(expected).Kind() != reflect.Slice { @@ -937,6 +1048,9 @@ func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAn // InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. func InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if expected == nil || actual == nil || reflect.TypeOf(actual).Kind() != reflect.Map || reflect.TypeOf(expected).Kind() != reflect.Map { @@ -994,6 +1108,9 @@ func calcRelativeError(expected, actual interface{}) (float64, error) { // InEpsilon asserts that expected and actual have a relative error less than epsilon func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } actualEpsilon, err := calcRelativeError(expected, actual) if err != nil { return Fail(t, err.Error(), msgAndArgs...) @@ -1008,6 +1125,9 @@ func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAnd // InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if expected == nil || actual == nil || reflect.TypeOf(actual).Kind() != reflect.Slice || reflect.TypeOf(expected).Kind() != reflect.Slice { @@ -1038,6 +1158,9 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m // assert.Equal(t, expectedObj, actualObj) // } func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if err != nil { return Fail(t, fmt.Sprintf("Received unexpected error:\n%+v", err), msgAndArgs...) } @@ -1052,6 +1175,9 @@ func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { // assert.Equal(t, expectedError, err) // } func Error(t TestingT, err error, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if err == nil { return Fail(t, "An error is expected but got nil.", msgAndArgs...) @@ -1066,6 +1192,9 @@ func Error(t TestingT, err error, msgAndArgs ...interface{}) bool { // actualObj, err := SomeFunction() // assert.EqualError(t, err, expectedErrorString) func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if !Error(t, theError, msgAndArgs...) { return false } @@ -1099,6 +1228,9 @@ func matchRegexp(rx interface{}, str interface{}) bool { // assert.Regexp(t, regexp.MustCompile("start"), "it's starting") // assert.Regexp(t, "start...$", "it's not starting") func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } match := matchRegexp(rx, str) @@ -1114,6 +1246,9 @@ func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface // assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") // assert.NotRegexp(t, "^start", "it's not starting") func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } match := matchRegexp(rx, str) if match { @@ -1126,6 +1261,9 @@ func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interf // Zero asserts that i is the zero value for its type. func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if i != nil && !reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { return Fail(t, fmt.Sprintf("Should be zero, but was %v", i), msgAndArgs...) } @@ -1134,6 +1272,9 @@ func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { // NotZero asserts that i is not the zero value for its type. func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } if i == nil || reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { return Fail(t, fmt.Sprintf("Should not be zero, but was %v", i), msgAndArgs...) } @@ -1142,6 +1283,9 @@ func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { // FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } info, err := os.Lstat(path) if err != nil { if os.IsNotExist(err) { @@ -1157,6 +1301,9 @@ func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { // DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } info, err := os.Lstat(path) if err != nil { if os.IsNotExist(err) { @@ -1174,6 +1321,9 @@ func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { // // assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } var expectedJSONAsInterface, actualJSONAsInterface interface{} if err := json.Unmarshal([]byte(expected), &expectedJSONAsInterface); err != nil { @@ -1199,7 +1349,7 @@ func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) { } // diff returns a diff of both values as long as both are of the same type and -// are a struct, map, slice or array. Otherwise it returns an empty string. +// are a struct, map, slice, array or string. Otherwise it returns an empty string. func diff(expected interface{}, actual interface{}) string { if expected == nil || actual == nil { return "" @@ -1212,12 +1362,18 @@ func diff(expected interface{}, actual interface{}) string { return "" } - if ek != reflect.Struct && ek != reflect.Map && ek != reflect.Slice && ek != reflect.Array { + if ek != reflect.Struct && ek != reflect.Map && ek != reflect.Slice && ek != reflect.Array && ek != reflect.String { return "" } - e := spewConfig.Sdump(expected) - a := spewConfig.Sdump(actual) + var e, a string + if et != reflect.TypeOf("") { + e = spewConfig.Sdump(expected) + a = spewConfig.Sdump(actual) + } else { + e = expected.(string) + a = actual.(string) + } diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{ A: difflib.SplitLines(e), @@ -1254,3 +1410,7 @@ var spewConfig = spew.ConfigState{ DisableCapacities: true, SortKeys: true, } + +type tHelper interface { + Helper() +} diff --git a/vendor/github.com/stretchr/testify/assert/http_assertions.go b/vendor/github.com/stretchr/testify/assert/http_assertions.go index 3101e78dd..df46fa777 100644 --- a/vendor/github.com/stretchr/testify/assert/http_assertions.go +++ b/vendor/github.com/stretchr/testify/assert/http_assertions.go @@ -12,10 +12,11 @@ import ( // an error if building a new request fails. func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) { w := httptest.NewRecorder() - req, err := http.NewRequest(method, url+"?"+values.Encode(), nil) + req, err := http.NewRequest(method, url, nil) if err != nil { return -1, err } + req.URL.RawQuery = values.Encode() handler(w, req) return w.Code, nil } @@ -26,6 +27,9 @@ func httpCode(handler http.HandlerFunc, method, url string, values url.Values) ( // // Returns whether the assertion was successful (true) or not (false). func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } code, err := httpCode(handler, method, url, values) if err != nil { Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) @@ -46,6 +50,9 @@ func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, value // // Returns whether the assertion was successful (true) or not (false). func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } code, err := httpCode(handler, method, url, values) if err != nil { Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) @@ -66,6 +73,9 @@ func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, valu // // Returns whether the assertion was successful (true) or not (false). func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } code, err := httpCode(handler, method, url, values) if err != nil { Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) @@ -95,10 +105,13 @@ func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) s // HTTPBodyContains asserts that a specified handler returns a // body that contains a string. // -// assert.HTTPBodyContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") +// assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } body := HTTPBody(handler, method, url, values) contains := strings.Contains(body, fmt.Sprint(str)) @@ -112,10 +125,13 @@ func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, // HTTPBodyNotContains asserts that a specified handler returns a // body that does not contain a string. // -// assert.HTTPBodyNotContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") +// assert.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } body := HTTPBody(handler, method, url, values) contains := strings.Contains(body, fmt.Sprint(str)) diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go index 78f3ce7c7..48bc5bcb5 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go @@ -26,6 +26,11 @@ func (c *Client) Send(request tchttp.Request, response tchttp.Response) (err err } request.SetDomain(domain) } + + if request.GetHttpMethod() == "" { + request.SetHttpMethod(c.httpProfile.ReqMethod) + } + err = tchttp.ConstructParams(request) if err != nil { return @@ -69,6 +74,11 @@ func (c *Client) WithSecretId(secretId, secretKey string) *Client { return c } +func (c *Client) WithCredential(cred *Credential) *Client { + c.credential = cred + return c +} + func (c *Client) WithProfile(clientProfile *profile.ClientProfile) *Client { c.signMethod = clientProfile.SignMethod c.httpProfile = clientProfile.HttpProfile diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go index 19f0722de..b734c1373 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go @@ -3,6 +3,7 @@ package common type Credential struct { SecretId string SecretKey string + Token string } func NewCredential(secretId, secretKey string) *Credential { @@ -12,29 +13,46 @@ func NewCredential(secretId, secretKey string) *Credential { } } -func (c *Credential) GetCredentialParams() map[string]string { - return map[string]string{ - "SecretId": c.SecretId, - } -} - -type TokenCredential struct { - SecretId string - SecretKey string - Token string -} - -func NewTokenCredential(secretId, secretKey, token string) *TokenCredential { - return &TokenCredential{ +func NewTokenCredential(secretId, secretKey, token string) *Credential { + return &Credential{ SecretId: secretId, SecretKey: secretKey, Token: token, } } -func (c *TokenCredential) GetCredentialParams() map[string]string { - return map[string]string{ +func (c *Credential) GetCredentialParams() map[string]string { + p := map[string]string{ "SecretId": c.SecretId, - "Token": c.Token, } + if c.Token != "" { + p["Token"] = c.Token + } + return p } + +// Nowhere use them and we haven't well designed these structures and +// underlying method, which leads to the situation that it is hard to +// refactor it to interfaces. +// Hence they are removed and merged into Credential. + +//type TokenCredential struct { +// SecretId string +// SecretKey string +// Token string +//} + +//func NewTokenCredential(secretId, secretKey, token string) *TokenCredential { +// return &TokenCredential{ +// SecretId: secretId, +// SecretKey: secretKey, +// Token: token, +// } +//} + +//func (c *TokenCredential) GetCredentialParams() map[string]string { +// return map[string]string{ +// "SecretId": c.SecretId, +// "Token": c.Token, +// } +//} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index a092a7f72..160cfe162 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -125,7 +125,6 @@ func (r *BaseRequest) GetBodyReader() io.Reader { } func (r *BaseRequest) Init() *BaseRequest { - r.httpMethod = GET r.domain = "" r.path = Path r.params = make(map[string]string) @@ -154,7 +153,7 @@ func CompleteCommonParams(request Request, region string) { params["Action"] = request.GetAction() params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) params["Nonce"] = strconv.Itoa(rand.Int()) - params["RequestClient"] = "SDK_GO_3.0.26" + params["RequestClient"] = "SDK_GO_3.0.42" } func ConstructParams(req Request) (err error) { diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go index 100fca110..8b9282a10 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go @@ -2,8 +2,9 @@ package common import ( "encoding/json" + "fmt" "io/ioutil" - // "log" + //"log" "net/http" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" @@ -59,6 +60,9 @@ func ParseFromHttpResponse(hr *http.Response, response Response) (err error) { if err != nil { return } + if hr.StatusCode != 200 { + return fmt.Errorf("Request fail with status: %s, with body: %s", hr.Status, body) + } //log.Printf("[DEBUG] Response Body=%s", body) err = response.ParseErrorFromHTTPResponse(body) if err != nil { diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go index b7585cbf5..8ec7096b1 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go @@ -26,6 +26,7 @@ type Client struct { common.Client } +// Deprecated func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { cpf := profile.NewClientProfile() client = &Client{} @@ -36,7 +37,7 @@ func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { client = &Client{} client.Init(region). - WithSecretId(credential.SecretId, credential.SecretKey). + WithCredential(credential). WithProfile(clientProfile) return } @@ -98,6 +99,31 @@ func (c *Client) AssociateInstancesKeyPairs(request *AssociateInstancesKeyPairsR return } +func NewAssociateSecurityGroupsRequest() (request *AssociateSecurityGroupsRequest) { + request = &AssociateSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "AssociateSecurityGroups") + return +} + +func NewAssociateSecurityGroupsResponse() (response *AssociateSecurityGroupsResponse) { + response = &AssociateSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (AssociateSecurityGroups) 用于绑定安全组到指定实例。 +func (c *Client) AssociateSecurityGroups(request *AssociateSecurityGroupsRequest) (response *AssociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewAssociateSecurityGroupsRequest() + } + response = NewAssociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + func NewCreateDisasterRecoverGroupRequest() (request *CreateDisasterRecoverGroupRequest) { request = &CreateDisasterRecoverGroupRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -770,6 +796,31 @@ func (c *Client) DisassociateInstancesKeyPairs(request *DisassociateInstancesKey return } +func NewDisassociateSecurityGroupsRequest() (request *DisassociateSecurityGroupsRequest) { + request = &DisassociateSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DisassociateSecurityGroups") + return +} + +func NewDisassociateSecurityGroupsResponse() (response *DisassociateSecurityGroupsResponse) { + response = &DisassociateSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口 (DisassociateSecurityGroups) 用于解绑实例的指定安全组。 +func (c *Client) DisassociateSecurityGroups(request *DisassociateSecurityGroupsRequest) (response *DisassociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateSecurityGroupsRequest() + } + response = NewDisassociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + func NewImportImageRequest() (request *ImportImageRequest) { request = &ImportImageRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1141,10 +1192,11 @@ func NewModifyInstancesAttributeResponse() (response *ModifyInstancesAttributeRe return } -// 本接口 (ModifyInstancesAttribute) 用于修改实例的属性(目前只支持修改实例的名称)。 +// 本接口 (ModifyInstancesAttribute) 用于修改实例的属性(目前只支持修改实例的名称和关联的安全组)。 // // * “实例名称”仅为方便用户自己管理之用,腾讯云并不以此名称作为提交工单或是进行实例管理操作的依据。 // * 支持批量操作。每次请求批量实例的上限为100。 +// * 修改关联安全组时,子机原来关联的安全组会被解绑。 func (c *Client) ModifyInstancesAttribute(request *ModifyInstancesAttributeRequest) (response *ModifyInstancesAttributeResponse, err error) { if request == nil { request = NewModifyInstancesAttributeRequest() diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go index d204279d9..5c0b9e030 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go @@ -21,26 +21,35 @@ import ( ) type ActionTimer struct { + // 扩展数据 Externals *Externals `json:"Externals" name:"Externals"` + // 定时器名称,目前仅支持销毁一个值:TerminateInstances。 TimerAction *string `json:"TimerAction" name:"TimerAction"` + // 执行时间,格式形如:2018-5-29 11:26:40,执行时间必须大于当前时间5分钟。 ActionTime *string `json:"ActionTime" name:"ActionTime"` } type AllocateHostsRequest struct { *tchttp.BaseRequest + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目等属性。 Placement *Placement `json:"Placement" name:"Placement"` + // 用于保证请求幂等性的字符串。 ClientToken *string `json:"ClientToken" name:"ClientToken"` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 HostChargePrepaid *ChargePrepaid `json:"HostChargePrepaid" name:"HostChargePrepaid"` + // 实例计费类型。目前仅支持:PREPAID(预付费,即包年包月模式)。 HostChargeType *string `json:"HostChargeType" name:"HostChargeType"` + // CDH实例机型,默认为:'HS1'。 HostType *string `json:"HostType" name:"HostType"` + // 购买CDH实例数量。 HostCount *uint64 `json:"HostCount" name:"HostCount"` } @@ -57,9 +66,11 @@ func (r *AllocateHostsRequest) FromJsonString(s string) error { type AllocateHostsResponse struct { *tchttp.BaseResponse Response *struct { + // 新创建云子机的实例id列表。 HostIdSet []*string `json:"HostIdSet" name:"HostIdSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -75,11 +86,14 @@ func (r *AllocateHostsResponse) FromJsonString(s string) error { type AssociateInstancesKeyPairsRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID,每次请求批量实例的上限为100。
可以通过以下方式获取可用的实例ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/index)查询实例ID。
  • 通过调用接口 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) ,取返回信息中的`InstanceId`获取实例ID。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 一个或多个待操作的密钥对ID,每次请求批量密钥对的上限为100。密钥对ID形如:`skey-3glfot13`。
    可以通过以下方式获取可用的密钥ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥ID。
  • 通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699) ,取返回信息中的`KeyId`获取密钥对ID。 KeyIds []*string `json:"KeyIds" name:"KeyIds" list` - // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机。
  • FALSE:表示在正常关机失败后不进行强制关机。
    默认取值:FALSE。 + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再绑定密钥。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机。
  • FALSE:表示在正常关机失败后不进行强制关机。
    默认取值:FALSE。 ForceStop *bool `json:"ForceStop" name:"ForceStop"` } @@ -95,7 +109,8 @@ func (r *AssociateInstancesKeyPairsRequest) FromJsonString(s string) error { type AssociateInstancesKeyPairsResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -109,19 +124,61 @@ func (r *AssociateInstancesKeyPairsResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type AssociateSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 要绑定的`安全组ID`,类似sg-efil73jd,只支持绑定单个安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds" name:"SecurityGroupIds" list` + + // 被绑定的`实例ID`,类似ins-lesecurk,支持指定多个实例。 + InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` +} + +func (r *AssociateSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *AssociateSecurityGroupsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *AssociateSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type ChargePrepaid struct { + // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36。 Period *uint64 `json:"Period" name:"Period"` + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费

    默认取值:NOTIFY_AND_AUTO_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 RenewFlag *string `json:"RenewFlag" name:"RenewFlag"` } type CreateDisasterRecoverGroupRequest struct { *tchttp.BaseRequest + // 分散置放群组名称,长度1-60个字符,支持中、英文。 Name *string `json:"Name" name:"Name"` + // 分散置放群组类型,取值范围:
  • HOST:物理机
  • SW:交换机
  • RACK:机架 Type *string `json:"Type" name:"Type"` + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
    更多详细信息请参阅:如何保证幂等性。 ClientToken *string `json:"ClientToken" name:"ClientToken"` } @@ -138,19 +195,26 @@ func (r *CreateDisasterRecoverGroupRequest) FromJsonString(s string) error { type CreateDisasterRecoverGroupResponse struct { *tchttp.BaseResponse Response *struct { + // 分散置放群组ID列表。 DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId" name:"DisasterRecoverGroupId"` + // 分散置放群组类型,取值范围:
  • HOST:物理机
  • SW:交换机
  • RACK:机架 Type *string `json:"Type" name:"Type"` + // 分散置放群组名称,长度1-60个字符,支持中、英文。 Name *string `json:"Name" name:"Name"` + // 置放群组内可容纳的云主机数量。 CvmQuotaTotal *int64 `json:"CvmQuotaTotal" name:"CvmQuotaTotal"` + // 置放群组内已有的云主机数量。 CurrentNum *int64 `json:"CurrentNum" name:"CurrentNum"` + // 置放群组创建时间。 CreateTime *string `json:"CreateTime" name:"CreateTime"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -166,18 +230,33 @@ func (r *CreateDisasterRecoverGroupResponse) FromJsonString(s string) error { type CreateImageRequest struct { *tchttp.BaseRequest - // 需要制作镜像的实例ID - InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 镜像名称 ImageName *string `json:"ImageName" name:"ImageName"` + + // 需要制作镜像的实例ID + InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 镜像描述 ImageDescription *string `json:"ImageDescription" name:"ImageDescription"` + // 软关机失败时是否执行强制关机以制作镜像 ForcePoweroff *string `json:"ForcePoweroff" name:"ForcePoweroff"` + // 创建Windows镜像时是否启用Sysprep Sysprep *string `json:"Sysprep" name:"Sysprep"` + // 实例处于运行中时,是否允许关机执行制作镜像任务。 Reboot *string `json:"Reboot" name:"Reboot"` + + // 实例需要制作镜像的数据盘Id + DataDiskIds []*string `json:"DataDiskIds" name:"DataDiskIds" list` + + // 需要制作镜像的快照Id,必须包含一个系统盘快照 + SnapshotIds []*string `json:"SnapshotIds" name:"SnapshotIds" list` + + // DryRun + DryRun *bool `json:"DryRun" name:"DryRun"` } func (r *CreateImageRequest) ToJsonString() string { @@ -192,7 +271,8 @@ func (r *CreateImageRequest) FromJsonString(s string) error { type CreateImageResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -208,8 +288,10 @@ func (r *CreateImageResponse) FromJsonString(s string) error { type CreateKeyPairRequest struct { *tchttp.BaseRequest + // 密钥对名称,可由数字,字母和下划线组成,长度不超过25个字符。 KeyName *string `json:"KeyName" name:"KeyName"` + // 密钥对创建后所属的项目ID。 // 可以通过以下方式获取项目ID: //
  • 通过项目列表查询项目ID。 @@ -229,9 +311,11 @@ func (r *CreateKeyPairRequest) FromJsonString(s string) error { type CreateKeyPairResponse struct { *tchttp.BaseResponse Response *struct { + // 密钥对信息。 KeyPair *KeyPair `json:"KeyPair" name:"KeyPair"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -246,12 +330,16 @@ func (r *CreateKeyPairResponse) FromJsonString(s string) error { } type DataDisk struct { + // 数据盘大小,单位:GB。最小调整步长为10G,不同数据盘类型取值范围不同,具体限制详见:[CVM实例配置](/document/product/213/2177)。默认值为0,表示不购买数据盘。更多限制详见产品文档。 DiskSize *int64 `json:"DiskSize" name:"DiskSize"` + // 数据盘类型。数据盘类型限制详见[CVM实例配置](/document/product/213/2177)。取值范围:
  • LOCAL_BASIC:本地硬盘
  • LOCAL_SSD:本地SSD硬盘
  • CLOUD_BASIC:普通云硬盘
  • CLOUD_PREMIUM:高性能云硬盘
  • CLOUD_SSD:SSD云硬盘

    默认取值:LOCAL_BASIC。

    该参数对`ResizeInstanceDisk`接口无效。 DiskType *string `json:"DiskType" name:"DiskType"` + // 数据盘ID。LOCAL_BASIC 和 LOCAL_SSD 类型没有ID。暂时不支持该参数。 DiskId *string `json:"DiskId" name:"DiskId"` + // 数据盘是否随子机销毁。取值范围: //
  • TRUE:子机销毁时,销毁数据盘 //
  • FALSE:子机销毁时,保留数据盘
    @@ -262,6 +350,7 @@ type DataDisk struct { type DeleteDisasterRecoverGroupsRequest struct { *tchttp.BaseRequest + // 分散置放群组ID列表,可通过[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。 DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds" name:"DisasterRecoverGroupIds" list` } @@ -278,7 +367,8 @@ func (r *DeleteDisasterRecoverGroupsRequest) FromJsonString(s string) error { type DeleteDisasterRecoverGroupsResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -294,6 +384,7 @@ func (r *DeleteDisasterRecoverGroupsResponse) FromJsonString(s string) error { type DeleteImagesRequest struct { *tchttp.BaseRequest + // 准备删除的镜像Id列表 ImageIds []*string `json:"ImageIds" name:"ImageIds" list` } @@ -310,7 +401,8 @@ func (r *DeleteImagesRequest) FromJsonString(s string) error { type DeleteImagesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -326,6 +418,7 @@ func (r *DeleteImagesResponse) FromJsonString(s string) error { type DeleteKeyPairsRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的密钥对ID。每次请求批量密钥对的上限为100。
    可以通过以下方式获取可用的密钥ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥ID。
  • 通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699) ,取返回信息中的 `KeyId` 获取密钥对ID。 KeyIds []*string `json:"KeyIds" name:"KeyIds" list` } @@ -342,7 +435,8 @@ func (r *DeleteKeyPairsRequest) FromJsonString(s string) error { type DeleteKeyPairsResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -372,17 +466,23 @@ func (r *DescribeDisasterRecoverGroupQuotaRequest) FromJsonString(s string) erro type DescribeDisasterRecoverGroupQuotaResponse struct { *tchttp.BaseResponse Response *struct { + // 可创建置放群组数量的上限。 GroupQuota *int64 `json:"GroupQuota" name:"GroupQuota"` + // 当前用户已经创建的置放群组数量。 CurrentNum *int64 `json:"CurrentNum" name:"CurrentNum"` + // 物理机类型容灾组内实例的配额数。 CvmInHostGroupQuota *int64 `json:"CvmInHostGroupQuota" name:"CvmInHostGroupQuota"` + // 交换机类型容灾组内实例的配额数。 CvmInSwGroupQuota *int64 `json:"CvmInSwGroupQuota" name:"CvmInSwGroupQuota"` + // 机架类型容灾组内实例的配额数。 CvmInRackGroupQuota *int64 `json:"CvmInRackGroupQuota" name:"CvmInRackGroupQuota"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -398,12 +498,16 @@ func (r *DescribeDisasterRecoverGroupQuotaResponse) FromJsonString(s string) err type DescribeDisasterRecoverGroupsRequest struct { *tchttp.BaseRequest + // 分散置放群组ID列表。 DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds" name:"DisasterRecoverGroupIds" list` + // 分散置放群组名称,支持模糊匹配。 Name *string `json:"Name" name:"Name"` + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Offset *int64 `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Limit *int64 `json:"Limit" name:"Limit"` } @@ -420,11 +524,14 @@ func (r *DescribeDisasterRecoverGroupsRequest) FromJsonString(s string) error { type DescribeDisasterRecoverGroupsResponse struct { *tchttp.BaseResponse Response *struct { + // 分散置放群组信息列表。 DisasterRecoverGroupSet []*DisasterRecoverGroup `json:"DisasterRecoverGroupSet" name:"DisasterRecoverGroupSet" list` + // 用户置放群组总量。 TotalCount *int64 `json:"TotalCount" name:"TotalCount"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -440,6 +547,7 @@ func (r *DescribeDisasterRecoverGroupsResponse) FromJsonString(s string) error { type DescribeHostsRequest struct { *tchttp.BaseRequest + // 过滤条件。 //
  • zone - String - 是否必填:否 - (过滤条件)按照可用区过滤。
  • //
  • project-id - Integer - 是否必填:否 - (过滤条件)按照项目ID过滤。可通过调用 DescribeProject 查询已创建的项目列表或登录控制台进行查看;也可以调用 AddProject 创建新的项目。
  • @@ -447,8 +555,10 @@ type DescribeHostsRequest struct { //
  • host-name - String - 是否必填:否 - (过滤条件)按照CDH实例名称过滤。
  • //
  • host-state - String - 是否必填:否 - (过滤条件)按照CDH实例状态进行过滤。(PENDING:创建中|LAUNCH_FAILURE:创建失败|RUNNING:运行中|EXPIRED:已过期)
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。 Offset *uint64 `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。 Limit *uint64 `json:"Limit" name:"Limit"` } @@ -465,11 +575,14 @@ func (r *DescribeHostsRequest) FromJsonString(s string) error { type DescribeHostsResponse struct { *tchttp.BaseResponse Response *struct { + // 符合查询条件的cdh实例总数 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // cdh实例详细信息列表 HostSet []*HostItem `json:"HostSet" name:"HostSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -499,9 +612,11 @@ func (r *DescribeImageQuotaRequest) FromJsonString(s string) error { type DescribeImageQuotaResponse struct { *tchttp.BaseResponse Response *struct { + // 账户的镜像配额 ImageNumQuota *int64 `json:"ImageNumQuota" name:"ImageNumQuota"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -517,6 +632,7 @@ func (r *DescribeImageQuotaResponse) FromJsonString(s string) error { type DescribeImageSharePermissionRequest struct { *tchttp.BaseRequest + // 需要共享的镜像Id ImageId *string `json:"ImageId" name:"ImageId"` } @@ -533,9 +649,11 @@ func (r *DescribeImageSharePermissionRequest) FromJsonString(s string) error { type DescribeImageSharePermissionResponse struct { *tchttp.BaseResponse Response *struct { + // 镜像共享信息 SharePermissionSet []*SharePermission `json:"SharePermissionSet" name:"SharePermissionSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -551,17 +669,22 @@ func (r *DescribeImageSharePermissionResponse) FromJsonString(s string) error { type DescribeImagesRequest struct { *tchttp.BaseRequest + // 镜像ID列表 。镜像ID如:`img-gvbnzy6f`。array型参数的格式可以参考[API简介](https://cloud.tencent.com/document/api/213/15688)。镜像ID可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。 ImageIds []*string `json:"ImageIds" name:"ImageIds" list` + // 过滤条件,每次请求的`Filters`的上限为0,`Filters.Values`的上限为5。参数不可以同时指定`ImageIds`和`Filters`。详细的过滤条件如下: //
  • image-id - String - 是否必填: 否 - (过滤条件)按照镜像ID进行过滤
  • //
  • image-type - String - 是否必填: 否 - (过滤条件)按照镜像类型进行过滤。取值范围:详见[镜像类型](https://cloud.tencent.com/document/product/213/9452#image_type)。
  • //
  • image-state - String - 是否必填: 否 - (过滤条件)按照镜像状态进行过滤。取值范围:详见[镜像状态](https://cloud.tencent.com/document/product/213/9452#image_state)。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。关于Offset详见[API简介](/document/api/213/568#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89)。 Offset *uint64 `json:"Offset" name:"Offset"` + // 数量限制,默认为20,最大值为100。关于Limit详见[API简介](/document/api/213/568#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89)。 Limit *uint64 `json:"Limit" name:"Limit"` + // 实例类型,如 `S1.SMALL1` InstanceType *string `json:"InstanceType" name:"InstanceType"` } @@ -578,11 +701,14 @@ func (r *DescribeImagesRequest) FromJsonString(s string) error { type DescribeImagesResponse struct { *tchttp.BaseResponse Response *struct { + // 一个关于镜像详细信息的结构体,主要包括镜像的主要状态与属性。 ImageSet []*Image `json:"ImageSet" name:"ImageSet" list` + // 符合要求的镜像数量。 TotalCount *int64 `json:"TotalCount" name:"TotalCount"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -612,11 +738,14 @@ func (r *DescribeImportImageOsRequest) FromJsonString(s string) error { type DescribeImportImageOsResponse struct { *tchttp.BaseResponse Response *struct { + // 支持的导入镜像的操作系统类型。 ImportImageOsListSupported *ImageOsList `json:"ImportImageOsListSupported" name:"ImportImageOsListSupported"` + // 支持的导入镜像的操作系统版本。 ImportImageOsVersionSet []*OsVersion `json:"ImportImageOsVersionSet" name:"ImportImageOsVersionSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -646,9 +775,11 @@ func (r *DescribeInstanceFamilyConfigsRequest) FromJsonString(s string) error { type DescribeInstanceFamilyConfigsResponse struct { *tchttp.BaseResponse Response *struct { + // 实例机型组配置的列表信息 InstanceFamilyConfigSet []*InstanceFamilyConfig `json:"InstanceFamilyConfigSet" name:"InstanceFamilyConfigSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -664,6 +795,7 @@ func (r *DescribeInstanceFamilyConfigsResponse) FromJsonString(s string) error { type DescribeInstanceInternetBandwidthConfigsRequest struct { *tchttp.BaseRequest + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 InstanceId *string `json:"InstanceId" name:"InstanceId"` } @@ -680,9 +812,11 @@ func (r *DescribeInstanceInternetBandwidthConfigsRequest) FromJsonString(s strin type DescribeInstanceInternetBandwidthConfigsResponse struct { *tchttp.BaseResponse Response *struct { + // 带宽配置信息列表。 InternetBandwidthConfigSet []*InternetBandwidthConfig `json:"InternetBandwidthConfigSet" name:"InternetBandwidthConfigSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -698,6 +832,7 @@ func (r *DescribeInstanceInternetBandwidthConfigsResponse) FromJsonString(s stri type DescribeInstanceTypeConfigsRequest struct { *tchttp.BaseRequest + // 过滤条件。 //
  • zone - String - 是否必填:否 -(过滤条件)按照[可用区](https://cloud.tencent.com/document/api/213/9452#zone)过滤。
  • //
  • instance-family - String - 是否必填:否 -(过滤条件)按照实例机型系列过滤。实例机型系列形如:S1、I1、M1等。
  • @@ -717,9 +852,11 @@ func (r *DescribeInstanceTypeConfigsRequest) FromJsonString(s string) error { type DescribeInstanceTypeConfigsResponse struct { *tchttp.BaseResponse Response *struct { + // 实例机型配置列表。 InstanceTypeConfigSet []*InstanceTypeConfig `json:"InstanceTypeConfigSet" name:"InstanceTypeConfigSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -735,6 +872,7 @@ func (r *DescribeInstanceTypeConfigsResponse) FromJsonString(s string) error { type DescribeInstanceVncUrlRequest struct { *tchttp.BaseRequest + // 一个操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。 InstanceId *string `json:"InstanceId" name:"InstanceId"` } @@ -751,9 +889,11 @@ func (r *DescribeInstanceVncUrlRequest) FromJsonString(s string) error { type DescribeInstanceVncUrlResponse struct { *tchttp.BaseResponse Response *struct { + // 实例的管理终端地址。 InstanceVncUrl *string `json:"InstanceVncUrl" name:"InstanceVncUrl"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -769,13 +909,16 @@ func (r *DescribeInstanceVncUrlResponse) FromJsonString(s string) error { type DescribeInstancesRequest struct { *tchttp.BaseRequest + // 按照一个或者多个实例ID查询。实例ID形如:`ins-xxxxxxxx`。(此参数的具体格式可参考API[简介](https://cloud.tencent.com/document/api/213/15688)的`id.N`一节)。每次请求的实例的上限为100。参数不支持同时指定`InstanceIds`和`Filters`。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 过滤条件。 //
  • zone - String - 是否必填:否 -(过滤条件)按照可用区过滤。
  • //
  • project-id - Integer - 是否必填:否 -(过滤条件)按照项目ID过滤。可通过调用[DescribeProject](https://cloud.tencent.com/document/api/378/4400)查询已创建的项目列表或登录[控制台](https://console.cloud.tencent.com/cvm/index)进行查看;也可以调用[AddProject](https://cloud.tencent.com/document/api/378/4398)创建新的项目。
  • //
  • host-id - String - 是否必填:否 - (过滤条件)按照[CDH](https://cloud.tencent.com/document/product/416) ID过滤。[CDH](https://cloud.tencent.com/document/product/416) ID形如:host-xxxxxxxx。
  • //
  • vpc-id - String - 是否必填:否 - (过滤条件)按照VPC ID进行过滤。VPC ID形如:vpc-xxxxxxxx。
  • + //
  • subnet-id - String - 是否必填:否 - (过滤条件)按照子网ID进行过滤。子网ID形如:subnet-xxxxxxxx。
  • //
  • instance-id - String - 是否必填:否 - (过滤条件)按照实例ID过滤。实例ID形如:ins-xxxxxxxx。
  • //
  • security-group-id - String - 是否必填:否 - (过滤条件)按照安全组ID过滤,安全组ID形如: sg-8jlk3f3r。
  • //
  • instance-name - String - 是否必填:否 - (过滤条件)按照实例名称过滤。
  • @@ -787,8 +930,10 @@ type DescribeInstancesRequest struct { //
  • tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。使用请参考示例2。
  • // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`InstanceIds`和`Filters`。 Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Offset *int64 `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Limit *int64 `json:"Limit" name:"Limit"` } @@ -805,11 +950,14 @@ func (r *DescribeInstancesRequest) FromJsonString(s string) error { type DescribeInstancesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *int64 `json:"TotalCount" name:"TotalCount"` + // 实例详细信息列表。 InstanceSet []*Instance `json:"InstanceSet" name:"InstanceSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -825,10 +973,13 @@ func (r *DescribeInstancesResponse) FromJsonString(s string) error { type DescribeInstancesStatusRequest struct { *tchttp.BaseRequest + // 按照一个或者多个实例ID查询。实例ID形如:`ins-11112222`。此参数的具体格式可参考API[简介](https://cloud.tencent.com/document/api/213/15688)的`id.N`一节)。每次请求的实例的上限为100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Offset *int64 `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Limit *int64 `json:"Limit" name:"Limit"` } @@ -845,11 +996,14 @@ func (r *DescribeInstancesStatusRequest) FromJsonString(s string) error { type DescribeInstancesStatusResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例状态数量。 TotalCount *int64 `json:"TotalCount" name:"TotalCount"` + // [实例状态](https://cloud.tencent.com/document/api/213/15738) 列表。 InstanceStatusSet []*InstanceStatus `json:"InstanceStatusSet" name:"InstanceStatusSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -879,9 +1033,11 @@ func (r *DescribeInternetChargeTypeConfigsRequest) FromJsonString(s string) erro type DescribeInternetChargeTypeConfigsResponse struct { *tchttp.BaseResponse Response *struct { + // 网络计费类型配置。 InternetChargeTypeConfigSet []*InternetChargeTypeConfig `json:"InternetChargeTypeConfigSet" name:"InternetChargeTypeConfigSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -897,14 +1053,18 @@ func (r *DescribeInternetChargeTypeConfigsResponse) FromJsonString(s string) err type DescribeKeyPairsRequest struct { *tchttp.BaseRequest + // 密钥对ID,密钥对ID形如:`skey-11112222`(此接口支持同时传入多个ID进行过滤。此参数的具体格式可参考 API [简介](https://cloud.tencent.com/document/api/213/15688)的 `id.N` 一节)。参数不支持同时指定 `KeyIds` 和 `Filters`。密钥对ID可以通过登录[控制台](https://console.cloud.tencent.com/cvm/index)查询。 KeyIds []*string `json:"KeyIds" name:"KeyIds" list` + // 过滤条件。 //
  • project-id - Integer - 是否必填:否 -(过滤条件)按照项目ID过滤。可以通过[项目列表](https://console.cloud.tencent.com/project)查询项目ID,或者调用接口 [DescribeProject](https://cloud.tencent.com/document/api/378/4400),取返回信息中的projectId获取项目ID。
  • //
  • key-name - String - 是否必填:否 -(过滤条件)按照密钥对名称过滤。
  • 参数不支持同时指定 `KeyIds` 和 `Filters`。 Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。关于 `Offset` 的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。返回数量,默认为20,最大值为100。关于 `Limit` 的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Offset *int64 `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。关于 `Limit` 的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 Limit *int64 `json:"Limit" name:"Limit"` } @@ -921,11 +1081,14 @@ func (r *DescribeKeyPairsRequest) FromJsonString(s string) error { type DescribeKeyPairsResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的密钥对数量。 TotalCount *int64 `json:"TotalCount" name:"TotalCount"` + // 密钥对详细信息列表。 KeyPairSet []*KeyPair `json:"KeyPairSet" name:"KeyPairSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -955,11 +1118,14 @@ func (r *DescribeRegionsRequest) FromJsonString(s string) error { type DescribeRegionsResponse struct { *tchttp.BaseResponse Response *struct { + // 地域数量 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // 地域列表信息 RegionSet []*RegionInfo `json:"RegionSet" name:"RegionSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -975,6 +1141,7 @@ func (r *DescribeRegionsResponse) FromJsonString(s string) error { type DescribeZoneInstanceConfigInfosRequest struct { *tchttp.BaseRequest + // 过滤条件。 // //
  • zone - String - 是否必填:否 -(过滤条件)按照可用区过滤。
  • @@ -999,9 +1166,11 @@ func (r *DescribeZoneInstanceConfigInfosRequest) FromJsonString(s string) error type DescribeZoneInstanceConfigInfosResponse struct { *tchttp.BaseResponse Response *struct { + // 可用区机型配置列表。 InstanceTypeQuotaSet []*InstanceTypeQuotaItem `json:"InstanceTypeQuotaSet" name:"InstanceTypeQuotaSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1031,11 +1200,14 @@ func (r *DescribeZonesRequest) FromJsonString(s string) error { type DescribeZonesResponse struct { *tchttp.BaseResponse Response *struct { - // 可用区数量 + + // 可用区数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` - // 可用区列表信息 + + // 可用区列表信息。 ZoneSet []*ZoneInfo `json:"ZoneSet" name:"ZoneSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1051,11 +1223,14 @@ func (r *DescribeZonesResponse) FromJsonString(s string) error { type DisassociateInstancesKeyPairsRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID,每次请求批量实例的上限为100。

    可以通过以下方式获取可用的实例ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/index)查询实例ID。
  • 通过调用接口 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) ,取返回信息中的 `InstanceId` 获取实例ID。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 密钥对ID列表,每次请求批量密钥对的上限为100。密钥对ID形如:`skey-11112222`。

    可以通过以下方式获取可用的密钥ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥ID。
  • 通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699) ,取返回信息中的 `KeyId` 获取密钥对ID。 KeyIds []*string `json:"KeyIds" name:"KeyIds" list` - // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机。
  • FALSE:表示在正常关机失败后不进行强制关机。

    默认取值:FALSE。 + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再解绑密钥。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机。
  • FALSE:表示在正常关机失败后不进行强制关机。

    默认取值:FALSE。 ForceStop *bool `json:"ForceStop" name:"ForceStop"` } @@ -1071,7 +1246,8 @@ func (r *DisassociateInstancesKeyPairsRequest) FromJsonString(s string) error { type DisassociateInstancesKeyPairsResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1085,142 +1261,235 @@ func (r *DisassociateInstancesKeyPairsResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DisassociateSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 要解绑的`安全组ID`,类似sg-efil73jd,只支持解绑单个安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds" name:"SecurityGroupIds" list` + + // 被解绑的`实例ID`,类似ins-lesecurk,支持指定多个实例 。 + InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` +} + +func (r *DisassociateSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DisassociateSecurityGroupsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DisassociateSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DisasterRecoverGroup struct { + // 分散置放群组id。 DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId" name:"DisasterRecoverGroupId"` + // 分散置放群组名称,长度1-60个字符。 Name *string `json:"Name" name:"Name"` + // 分散置放群组类型,取值范围:
  • HOST:物理机
  • SW:交换机
  • RACK:机架 Type *string `json:"Type" name:"Type"` + // 分散置放群组内最大容纳云主机数量。 CvmQuotaTotal *int64 `json:"CvmQuotaTotal" name:"CvmQuotaTotal"` + // 分散置放群组内云主机当前数量。 CurrentNum *int64 `json:"CurrentNum" name:"CurrentNum"` + // 分散置放群组内,云主机id列表。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 分散置放群组创建时间。 CreateTime *string `json:"CreateTime" name:"CreateTime"` } type EnhancedService struct { + // 开启云安全服务。若不指定该参数,则默认开启云安全服务。 SecurityService *RunSecurityServiceEnabled `json:"SecurityService" name:"SecurityService"` + // 开启云监控服务。若不指定该参数,则默认开启云监控服务。 MonitorService *RunMonitorServiceEnabled `json:"MonitorService" name:"MonitorService"` } type Externals struct { + // 释放地址 ReleaseAddress *bool `json:"ReleaseAddress" name:"ReleaseAddress"` + // 不支持的网络类型 UnsupportNetworks []*string `json:"UnsupportNetworks" name:"UnsupportNetworks" list` + // HDD本地存储属性 StorageBlockAttr *StorageBlock `json:"StorageBlockAttr" name:"StorageBlockAttr"` } type Filter struct { + // 需要过滤的字段。 Name *string `json:"Name" name:"Name"` + // 字段的过滤值。 Values []*string `json:"Values" name:"Values" list` } type HostItem struct { + // cdh实例所在的位置。通过该参数可以指定实例所属可用区,所属项目等属性。 Placement *Placement `json:"Placement" name:"Placement"` + // cdh实例id HostId *string `json:"HostId" name:"HostId"` + // cdh实例类型 HostType *string `json:"HostType" name:"HostType"` + // cdh实例名称 HostName *string `json:"HostName" name:"HostName"` + // cdh实例付费模式 HostChargeType *string `json:"HostChargeType" name:"HostChargeType"` + // cdh实例自动续费标记 RenewFlag *string `json:"RenewFlag" name:"RenewFlag"` + // cdh实例创建时间 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // cdh实例过期时间 ExpiredTime *string `json:"ExpiredTime" name:"ExpiredTime"` + // cdh实例上已创建云子机的实例id列表 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // cdh实例状态 HostState *string `json:"HostState" name:"HostState"` + // cdh实例ip HostIp *string `json:"HostIp" name:"HostIp"` + // cdh实例资源信息 HostResource *HostResource `json:"HostResource" name:"HostResource"` } type HostResource struct { + // cdh实例总cpu核数 CpuTotal *uint64 `json:"CpuTotal" name:"CpuTotal"` + // cdh实例可用cpu核数 CpuAvailable *uint64 `json:"CpuAvailable" name:"CpuAvailable"` + // cdh实例总内存大小(单位为:GiB) MemTotal *float64 `json:"MemTotal" name:"MemTotal"` + // cdh实例可用内存大小(单位为:GiB) MemAvailable *float64 `json:"MemAvailable" name:"MemAvailable"` + // cdh实例总磁盘大小(单位为:GiB) DiskTotal *uint64 `json:"DiskTotal" name:"DiskTotal"` + // cdh实例可用磁盘大小(单位为:GiB) DiskAvailable *uint64 `json:"DiskAvailable" name:"DiskAvailable"` } type Image struct { + // 镜像ID ImageId *string `json:"ImageId" name:"ImageId"` + // 镜像操作系统 OsName *string `json:"OsName" name:"OsName"` + // 镜像类型 ImageType *string `json:"ImageType" name:"ImageType"` + // 镜像创建时间 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // 镜像名称 ImageName *string `json:"ImageName" name:"ImageName"` + // 镜像描述 ImageDescription *string `json:"ImageDescription" name:"ImageDescription"` + // 镜像大小 ImageSize *int64 `json:"ImageSize" name:"ImageSize"` + // 镜像架构 Architecture *string `json:"Architecture" name:"Architecture"` + // 镜像状态 ImageState *string `json:"ImageState" name:"ImageState"` + // 镜像来源平台 Platform *string `json:"Platform" name:"Platform"` + // 镜像创建者 ImageCreator *string `json:"ImageCreator" name:"ImageCreator"` + // 镜像来源 ImageSource *string `json:"ImageSource" name:"ImageSource"` + // 同步百分比 SyncPercent *int64 `json:"SyncPercent" name:"SyncPercent"` + // 镜像是否支持cloud-init IsSupportCloudinit *bool `json:"IsSupportCloudinit" name:"IsSupportCloudinit"` } type ImageOsList struct { + // 支持的windows操作系统。 Windows []*string `json:"Windows" name:"Windows" list` + // 支持的linux操作系统 Linux []*string `json:"Linux" name:"Linux" list` } type ImportImageRequest struct { *tchttp.BaseRequest + // 导入镜像的操作系统架构,`x86_64` 或 `i386` Architecture *string `json:"Architecture" name:"Architecture"` + // 导入镜像的操作系统类型,通过`DescribeImportImageOs`获取 OsType *string `json:"OsType" name:"OsType"` + // 导入镜像的操作系统版本,通过`DescribeImportImageOs`获取 OsVersion *string `json:"OsVersion" name:"OsVersion"` + // 导入镜像存放的cos地址 ImageUrl *string `json:"ImageUrl" name:"ImageUrl"` + // 镜像名称 ImageName *string `json:"ImageName" name:"ImageName"` + // 镜像描述 ImageDescription *string `json:"ImageDescription" name:"ImageDescription"` + // 只检查参数,不执行任务 DryRun *bool `json:"DryRun" name:"DryRun"` + // 是否强制导入,参考[强制导入镜像](https://cloud.tencent.com/document/product/213/12849) Force *bool `json:"Force" name:"Force"` } @@ -1237,7 +1506,8 @@ func (r *ImportImageRequest) FromJsonString(s string) error { type ImportImageResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1253,12 +1523,15 @@ func (r *ImportImageResponse) FromJsonString(s string) error { type ImportKeyPairRequest struct { *tchttp.BaseRequest + // 密钥对名称,可由数字,字母和下划线组成,长度不超过25个字符。 KeyName *string `json:"KeyName" name:"KeyName"` + // 密钥对创建后所属的[项目](/document/product/378/10863)ID。

    可以通过以下方式获取项目ID:
  • 通过[项目列表](https://console.cloud.tencent.com/project)查询项目ID。
  • 通过调用接口 [DescribeProject](https://cloud.tencent.com/document/api/378/4400),取返回信息中的 `projectId ` 获取项目ID。 // // 如果是默认项目,直接填0就可以。 ProjectId *int64 `json:"ProjectId" name:"ProjectId"` + // 密钥对的公钥内容,`OpenSSH RSA` 格式。 PublicKey *string `json:"PublicKey" name:"PublicKey"` } @@ -1275,9 +1548,11 @@ func (r *ImportKeyPairRequest) FromJsonString(s string) error { type ImportKeyPairResponse struct { *tchttp.BaseResponse Response *struct { + // 密钥对ID。 KeyId *string `json:"KeyId" name:"KeyId"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1293,10 +1568,13 @@ func (r *ImportKeyPairResponse) FromJsonString(s string) error { type InquiryPriceModifyInstancesChargeTypeRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。
  • PREPAID:预付费,即包年包月。 InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的续费时长、是否设置自动续费等属性。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` } @@ -1313,9 +1591,11 @@ func (r *InquiryPriceModifyInstancesChargeTypeRequest) FromJsonString(s string) type InquiryPriceModifyInstancesChargeTypeResponse struct { *tchttp.BaseResponse Response *struct { + // 该参数表示对应配置实例转换计费模式的价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1331,12 +1611,16 @@ func (r *InquiryPriceModifyInstancesChargeTypeResponse) FromJsonString(s string) type InquiryPriceRenewInstancesRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的续费时长、是否设置自动续费等属性。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` + // 试运行。 DryRun *bool `json:"DryRun" name:"DryRun"` + // 是否续费弹性数据盘。取值范围:
  • TRUE:表示续费包年包月实例同时续费其挂载的弹性数据盘
  • FALSE:表示续费包年包月实例同时不再续费其挂载的弹性数据盘

    默认取值:TRUE。 RenewPortableDataDisk *bool `json:"RenewPortableDataDisk" name:"RenewPortableDataDisk"` } @@ -1353,9 +1637,11 @@ func (r *InquiryPriceRenewInstancesRequest) FromJsonString(s string) error { type InquiryPriceRenewInstancesResponse struct { *tchttp.BaseResponse Response *struct { + // 该参数表示对应配置实例的价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1371,14 +1657,19 @@ func (r *InquiryPriceRenewInstancesResponse) FromJsonString(s string) error { type InquiryPriceResetInstanceRequest struct { *tchttp.BaseRequest + // 实例ID。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。 InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 指定有效的[镜像](/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:
  • 公共镜像
  • 自定义镜像
  • 共享镜像
  • 服务市场镜像

  • 可通过以下方式获取可用的镜像ID:
  • `公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。
  • 通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。
  • ImageId *string `json:"ImageId" name:"ImageId"` + // 实例系统盘配置信息。系统盘为云盘的实例可以通过该参数指定重装后的系统盘大小来实现对系统盘的扩容操作,若不指定则默认系统盘大小保持不变。系统盘大小只支持扩容不支持缩容;重装只支持修改系统盘的大小,不能修改系统盘的类型。 SystemDisk *SystemDisk `json:"SystemDisk" name:"SystemDisk"` + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 LoginSettings *LoginSettings `json:"LoginSettings" name:"LoginSettings"` + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 EnhancedService *EnhancedService `json:"EnhancedService" name:"EnhancedService"` } @@ -1395,9 +1686,11 @@ func (r *InquiryPriceResetInstanceRequest) FromJsonString(s string) error { type InquiryPriceResetInstanceResponse struct { *tchttp.BaseResponse Response *struct { + // 该参数表示重装成对应配置实例的价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1413,12 +1706,16 @@ func (r *InquiryPriceResetInstanceResponse) FromJsonString(s string) error { type InquiryPriceResetInstancesInternetMaxBandwidthRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。当调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽时,只支持一个实例。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 公网出带宽配置。不同机型带宽上限范围不一致,具体限制详见带宽限制对账表。暂时只支持`InternetMaxBandwidthOut`参数。 InternetAccessible *InternetAccessible `json:"InternetAccessible" name:"InternetAccessible"` + // 带宽生效的起始时间。格式:`YYYY-MM-DD`,例如:`2016-10-30`。起始时间不能早于当前时间。如果起始时间是今天则新设置的带宽立即生效。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 StartTime *string `json:"StartTime" name:"StartTime"` + // 带宽生效的终止时间。格式:`YYYY-MM-DD`,例如:`2016-10-30`。新设置的带宽的有效期包含终止时间此日期。终止时间不能晚于包年包月实例的到期时间。实例的到期时间可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`ExpiredTime`获取。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 EndTime *string `json:"EndTime" name:"EndTime"` } @@ -1435,9 +1732,11 @@ func (r *InquiryPriceResetInstancesInternetMaxBandwidthRequest) FromJsonString(s type InquiryPriceResetInstancesInternetMaxBandwidthResponse struct { *tchttp.BaseResponse Response *struct { + // 该参数表示带宽调整为对应大小之后的价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1453,10 +1752,13 @@ func (r *InquiryPriceResetInstancesInternetMaxBandwidthResponse) FromJsonString( type InquiryPriceResetInstancesTypeRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为1。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可参见附表实例资源规格对照表,也可以调用查询实例资源规格列表接口获得最新的规格表。 InstanceType *string `json:"InstanceType" name:"InstanceType"` + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机
  • FALSE:表示在正常关机失败后不进行强制关机

    默认取值:FALSE。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 ForceStop *bool `json:"ForceStop" name:"ForceStop"` } @@ -1473,9 +1775,11 @@ func (r *InquiryPriceResetInstancesTypeRequest) FromJsonString(s string) error { type InquiryPriceResetInstancesTypeResponse struct { *tchttp.BaseResponse Response *struct { + // 该参数表示调整成对应机型实例的价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1491,10 +1795,13 @@ func (r *InquiryPriceResetInstancesTypeResponse) FromJsonString(s string) error type InquiryPriceResizeInstanceDisksRequest struct { *tchttp.BaseRequest + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 待扩容的数据盘配置信息。只支持扩容随实例购买的数据盘,且[数据盘类型](/document/api/213/9452#block_device)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。数据盘容量单位:GB。最小扩容步长:10G。关于数据盘类型的选择请参考硬盘产品简介。可选数据盘类型受到实例类型`InstanceType`限制。另外允许扩容的最大容量也因数据盘类型的不同而有所差异。 DataDisks []*DataDisk `json:"DataDisks" name:"DataDisks" list` + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机
  • FALSE:表示在正常关机失败后不进行强制关机

    默认取值:FALSE。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 ForceStop *bool `json:"ForceStop" name:"ForceStop"` } @@ -1511,9 +1818,11 @@ func (r *InquiryPriceResizeInstanceDisksRequest) FromJsonString(s string) error type InquiryPriceResizeInstanceDisksResponse struct { *tchttp.BaseResponse Response *struct { + // 该参数表示磁盘扩容成对应配置的价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1529,40 +1838,58 @@ func (r *InquiryPriceResizeInstanceDisksResponse) FromJsonString(s string) error type InquiryPriceRunInstancesRequest struct { *tchttp.BaseRequest + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目等属性。 Placement *Placement `json:"Placement" name:"Placement"` + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:
  • 公共镜像
  • 自定义镜像
  • 共享镜像
  • 服务市场镜像

  • 可通过以下方式获取可用的镜像ID:
  • `公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。
  • 通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。
  • ImageId *string `json:"ImageId" name:"ImageId"` + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。
  • PREPAID:预付费,即包年包月
  • POSTPAID_BY_HOUR:按小时后付费
    默认值:POSTPAID_BY_HOUR。 InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[CVM实例配置](https://cloud.tencent.com/document/product/213/2177)描述。若不指定该参数,则默认机型为S1.SMALL1。 InstanceType *string `json:"InstanceType" name:"InstanceType"` + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 SystemDisk *SystemDisk `json:"SystemDisk" name:"SystemDisk"` + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定11块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含10块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。 DataDisks []*DataDisk `json:"DataDisks" name:"DataDisks" list` + // 私有网络相关信息配置。通过该参数可以指定私有网络的ID,子网ID等信息。若不指定该参数,则默认使用基础网络。若在此参数中指定了私有网络ip,那么InstanceCount参数只能为1。 VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud" name:"VirtualPrivateCloud"` + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 InternetAccessible *InternetAccessible `json:"InternetAccessible" name:"InternetAccessible"` + // 购买实例数量。取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount" name:"InstanceCount"` + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。 InstanceName *string `json:"InstanceName" name:"InstanceName"` + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 LoginSettings *LoginSettings `json:"LoginSettings" name:"LoginSettings"` + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则默认不绑定安全组。 SecurityGroupIds []*string `json:"SecurityGroupIds" name:"SecurityGroupIds" list` + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 EnhancedService *EnhancedService `json:"EnhancedService" name:"EnhancedService"` + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
    更多详细信息请参阅:如何保证幂等性。 ClientToken *string `json:"ClientToken" name:"ClientToken"` + // 云服务器的主机名。
  • 点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。
  • Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。
  • 其他类型(Linux 等)实例:字符长度为[2, 30],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。 HostName *string `json:"HostName" name:"HostName"` + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到云主机实例。 TagSpecification []*TagSpecification `json:"TagSpecification" name:"TagSpecification" list` + // 实例的市场相关选项,如竞价实例相关参数 InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions" name:"InstanceMarketOptions"` } @@ -1579,9 +1906,11 @@ func (r *InquiryPriceRunInstancesRequest) FromJsonString(s string) error { type InquiryPriceRunInstancesResponse struct { *tchttp.BaseResponse Response *struct { + // 该参数表示对应配置实例的价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1596,72 +1925,105 @@ func (r *InquiryPriceRunInstancesResponse) FromJsonString(s string) error { } type Instance struct { + // 实例所在的位置。 Placement *Placement `json:"Placement" name:"Placement"` + // 实例`ID`。 InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 实例机型。 InstanceType *string `json:"InstanceType" name:"InstanceType"` + // 实例的CPU核数,单位:核。 CPU *int64 `json:"CPU" name:"CPU"` + // 实例内存容量,单位:`GB`。 Memory *int64 `json:"Memory" name:"Memory"` + // 实例业务状态。取值范围:
  • NORMAL:表示正常状态的实例
  • EXPIRED:表示过期的实例
  • PROTECTIVELY_ISOLATED:表示被安全隔离的实例。 RestrictState *string `json:"RestrictState" name:"RestrictState"` + // 实例名称。 InstanceName *string `json:"InstanceName" name:"InstanceName"` + // 实例计费模式。取值范围:
  • `PREPAID`:表示预付费,即包年包月
  • `POSTPAID_BY_HOUR`:表示后付费,即按量计费
  • `CDHPAID`:`CDH`付费,即只对`CDH`计费,不对`CDH`上的实例计费。 InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` + // 实例系统盘信息。 SystemDisk *SystemDisk `json:"SystemDisk" name:"SystemDisk"` + // 实例数据盘信息。只包含随实例购买的数据盘。 DataDisks []*DataDisk `json:"DataDisks" name:"DataDisks" list` + // 实例主网卡的内网`IP`列表。 PrivateIpAddresses []*string `json:"PrivateIpAddresses" name:"PrivateIpAddresses" list` + // 实例主网卡的公网`IP`列表。 PublicIpAddresses []*string `json:"PublicIpAddresses" name:"PublicIpAddresses" list` + // 实例带宽信息。 InternetAccessible *InternetAccessible `json:"InternetAccessible" name:"InternetAccessible"` + // 实例所属虚拟私有网络信息。 VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud" name:"VirtualPrivateCloud"` + // 生产实例所使用的镜像`ID`。 ImageId *string `json:"ImageId" name:"ImageId"` + // 自动续费标识。取值范围:
  • `NOTIFY_AND_MANUAL_RENEW`:表示通知即将过期,但不自动续费
  • `NOTIFY_AND_AUTO_RENEW`:表示通知即将过期,而且自动续费
  • `DISABLE_NOTIFY_AND_MANUAL_RENEW`:表示不通知即将过期,也不自动续费。 RenewFlag *string `json:"RenewFlag" name:"RenewFlag"` + // 创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // 到期时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 ExpiredTime *string `json:"ExpiredTime" name:"ExpiredTime"` + // 操作系统名称。 OsName *string `json:"OsName" name:"OsName"` + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。 SecurityGroupIds []*string `json:"SecurityGroupIds" name:"SecurityGroupIds" list` + // 实例登录设置。目前只返回实例所关联的密钥。 LoginSettings *LoginSettings `json:"LoginSettings" name:"LoginSettings"` + // 实例状态。取值范围:
  • PENDING:表示创建中
  • LAUNCH_FAILED:表示创建失败
  • RUNNING:表示运行中
  • STOPPED:表示关机
  • STARTING:表示开机中
  • STOPPING:表示关机中
  • REBOOTING:表示重启中
  • SHUTDOWN:表示停止待销毁
  • TERMINATING:表示销毁中。
  • InstanceState *string `json:"InstanceState" name:"InstanceState"` + // 实例关联的标签列表。 Tags []*Tag `json:"Tags" name:"Tags" list` + + // 实例的关机计费模式。 + // 取值范围:
  • KEEP_CHARGING:关机继续收费
  • STOP_CHARGING:关机停止收费
  • NOT_APPLICABLE:实例处于非关机状态或者不适用关机停止计费的条件
    + StopChargingMode *string `json:"StopChargingMode" name:"StopChargingMode"` } type InstanceChargePrepaid struct { + // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36。 Period *int64 `json:"Period" name:"Period"` + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费

    默认取值:NOTIFY_AND_MANUAL_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 RenewFlag *string `json:"RenewFlag" name:"RenewFlag"` } type InstanceFamilyConfig struct { + // 机型族名称的中文全称。 InstanceFamilyName *string `json:"InstanceFamilyName" name:"InstanceFamilyName"` + // 机型族名称的英文简称。 InstanceFamily *string `json:"InstanceFamily" name:"InstanceFamily"` } type InstanceMarketOptionsRequest struct { *tchttp.BaseRequest + // 市场选项类型,当前只支持取值:spot MarketType *string `json:"MarketType" name:"MarketType"` + // 竞价相关选项 SpotOptions *SpotMarketOptions `json:"SpotOptions" name:"SpotOptions"` } @@ -1676,137 +2038,182 @@ func (r *InstanceMarketOptionsRequest) FromJsonString(s string) error { } type InstanceStatus struct { + // 实例`ID`。 InstanceId *string `json:"InstanceId" name:"InstanceId"` + // [实例状态](/document/api/213/9452#INSTANCE_STATE)。 InstanceState *string `json:"InstanceState" name:"InstanceState"` } type InstanceTypeConfig struct { + // 可用区。 Zone *string `json:"Zone" name:"Zone"` + // 实例机型。 InstanceType *string `json:"InstanceType" name:"InstanceType"` + // 实例机型系列。 InstanceFamily *string `json:"InstanceFamily" name:"InstanceFamily"` + // GPU核数,单位:核。 GPU *int64 `json:"GPU" name:"GPU"` + // CPU核数,单位:核。 CPU *int64 `json:"CPU" name:"CPU"` + // 内存容量,单位:`GB`。 Memory *int64 `json:"Memory" name:"Memory"` - // 是否支持云硬盘。取值范围:
  • `TRUE`:表示支持云硬盘;
  • `FALSE`:表示不支持云硬盘。 - CbsSupport *string `json:"CbsSupport" name:"CbsSupport"` - // 机型状态。取值范围:
  • `AVAILABLE`:表示机型可用;
  • `UNAVAILABLE`:表示机型不可用。 - InstanceTypeState *string `json:"InstanceTypeState" name:"InstanceTypeState"` } type InstanceTypeQuotaItem struct { + // 可用区。 Zone *string `json:"Zone" name:"Zone"` + // 实例机型。 InstanceType *string `json:"InstanceType" name:"InstanceType"` + // 实例计费模式。取值范围:
  • PREPAID:表示预付费,即包年包月
  • POSTPAID_BY_HOUR:表示后付费,即按量计费
  • CDHPAID:表示[CDH](https://cloud.tencent.com/document/product/416)付费,即只对CDH计费,不对CDH上的实例计费。 InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` + // 网卡类型,例如:25代表25G网卡 NetworkCard *int64 `json:"NetworkCard" name:"NetworkCard"` + // 扩展属性。 Externals *Externals `json:"Externals" name:"Externals"` + // 实例的CPU核数,单位:核。 Cpu *int64 `json:"Cpu" name:"Cpu"` + // 实例内存容量,单位:`GB`。 Memory *int64 `json:"Memory" name:"Memory"` + // 实例机型系列。 InstanceFamily *string `json:"InstanceFamily" name:"InstanceFamily"` + // 机型名称。 TypeName *string `json:"TypeName" name:"TypeName"` + // 本地磁盘规格列表。 LocalDiskTypeList []*LocalDiskType `json:"LocalDiskTypeList" name:"LocalDiskTypeList" list` - // 实例是否售卖。 + + // 实例是否售卖。取值范围:
  • SELL:表示实例可购买
  • SOLD_OUT:表示实例已售罄。 Status *string `json:"Status" name:"Status"` + // 实例的售卖价格。 Price *ItemPrice `json:"Price" name:"Price"` } type InternetAccessible struct { + // 网络计费类型。取值范围:
  • BANDWIDTH_PREPAID:预付费按带宽结算
  • TRAFFIC_POSTPAID_BY_HOUR:流量按小时后付费
  • BANDWIDTH_POSTPAID_BY_HOUR:带宽按小时后付费
  • BANDWIDTH_PACKAGE:带宽包用户
    默认取值:非带宽包用户默认与子机付费类型保持一致。 InternetChargeType *string `json:"InternetChargeType" name:"InternetChargeType"` + // 公网出带宽上限,单位:Mbps。默认值:0Mbps。不同机型带宽上限范围不一致,具体限制详见[购买网络带宽](/document/product/213/509)。 InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut" name:"InternetMaxBandwidthOut"` + // 是否分配公网IP。取值范围:
  • TRUE:表示分配公网IP
  • FALSE:表示不分配公网IP

    当公网带宽大于0Mbps时,可自由选择开通与否,默认开通公网IP;当公网带宽为0,则不允许分配公网IP。 PublicIpAssigned *bool `json:"PublicIpAssigned" name:"PublicIpAssigned"` } type InternetBandwidthConfig struct { + // 开始时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 StartTime *string `json:"StartTime" name:"StartTime"` + // 结束时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 EndTime *string `json:"EndTime" name:"EndTime"` + // 实例带宽信息。 InternetAccessible *InternetAccessible `json:"InternetAccessible" name:"InternetAccessible"` } type InternetChargeTypeConfig struct { + // 网络计费模式。 InternetChargeType *string `json:"InternetChargeType" name:"InternetChargeType"` + // 网络计费模式描述信息。 Description *string `json:"Description" name:"Description"` } type ItemPrice struct { + // 后续单价,单位:元。 UnitPrice *float64 `json:"UnitPrice" name:"UnitPrice"` + // 后续计价单元,可取值范围:
  • HOUR:表示计价单元是按每小时来计算。当前涉及该计价单元的场景有:实例按小时后付费(POSTPAID_BY_HOUR)、带宽按小时后付费(BANDWIDTH_POSTPAID_BY_HOUR):
  • GB:表示计价单元是按每GB来计算。当前涉及该计价单元的场景有:流量按小时后付费(TRAFFIC_POSTPAID_BY_HOUR)。 ChargeUnit *string `json:"ChargeUnit" name:"ChargeUnit"` + // 预支费用的原价,单位:元。 OriginalPrice *float64 `json:"OriginalPrice" name:"OriginalPrice"` + // 预支费用的折扣价,单位:元。 DiscountPrice *float64 `json:"DiscountPrice" name:"DiscountPrice"` } type KeyPair struct { + // 密钥对的`ID`,是密钥对的唯一标识。 KeyId *string `json:"KeyId" name:"KeyId"` + // 密钥对名称。 KeyName *string `json:"KeyName" name:"KeyName"` + // 密钥对所属的项目`ID`。 ProjectId *int64 `json:"ProjectId" name:"ProjectId"` + // 密钥对描述信息。 Description *string `json:"Description" name:"Description"` + // 密钥对的纯文本公钥。 PublicKey *string `json:"PublicKey" name:"PublicKey"` + // 密钥对的纯文本私钥。腾讯云不会保管私钥,请用户自行妥善保存。 PrivateKey *string `json:"PrivateKey" name:"PrivateKey"` + // 密钥关联的实例`ID`列表。 AssociatedInstanceIds []*string `json:"AssociatedInstanceIds" name:"AssociatedInstanceIds" list` + // 创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` } type LocalDiskType struct { + // 本地磁盘类型。 Type *string `json:"Type" name:"Type"` + // 本地磁盘属性。 PartitionType *string `json:"PartitionType" name:"PartitionType"` + // 本地磁盘最小值。 MinSize *int64 `json:"MinSize" name:"MinSize"` + // 本地磁盘最大值。 MaxSize *int64 `json:"MaxSize" name:"MaxSize"` } type LoginSettings struct { + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:
  • Linux实例密码必须8到16位,至少包括两项[a-z,A-Z]、[0-9] 和 [( ) ` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。
  • Windows实例密码必须12到16位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) ` ~ ! @ # $ % ^ & * - + = { } [ ] : ; ' , . ? /]中的特殊符号。

    若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。 Password *string `json:"Password" name:"Password"` + // 密钥ID列表。关联密钥后,就可以通过对应的私钥来访问实例;KeyId可通过接口DescribeKeyPairs获取,密钥与密码不能同时指定,同时Windows操作系统不支持指定密钥。当前仅支持购买的时候指定一个密钥。 KeyIds []*string `json:"KeyIds" name:"KeyIds" list` + // 保持镜像的原始设置。该参数与Password或KeyIds.N不能同时指定。只有使用自定义镜像、共享镜像或外部导入镜像创建实例时才能指定该参数为TRUE。取值范围:
  • TRUE:表示保持镜像的登录设置
  • FALSE:表示不保持镜像的登录设置

    默认取值:FALSE。 KeepImageLogin *string `json:"KeepImageLogin" name:"KeepImageLogin"` } type ModifyDisasterRecoverGroupAttributeRequest struct { *tchttp.BaseRequest + // 分散置放群组ID,可使用[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。 DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId" name:"DisasterRecoverGroupId"` + // 分散置放群组名称,长度1-60个字符,支持中、英文。 Name *string `json:"Name" name:"Name"` } @@ -1823,7 +2230,8 @@ func (r *ModifyDisasterRecoverGroupAttributeRequest) FromJsonString(s string) er type ModifyDisasterRecoverGroupAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1839,10 +2247,13 @@ func (r *ModifyDisasterRecoverGroupAttributeResponse) FromJsonString(s string) e type ModifyHostsAttributeRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的CDH实例ID。 HostIds []*string `json:"HostIds" name:"HostIds" list` + // CDH实例显示名称。可任意命名,但不得超过60个字符。 HostName *string `json:"HostName" name:"HostName"` + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费

    若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 RenewFlag *string `json:"RenewFlag" name:"RenewFlag"` } @@ -1859,7 +2270,8 @@ func (r *ModifyHostsAttributeRequest) FromJsonString(s string) error { type ModifyHostsAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1875,10 +2287,13 @@ func (r *ModifyHostsAttributeResponse) FromJsonString(s string) error { type ModifyImageAttributeRequest struct { *tchttp.BaseRequest + // 镜像ID,形如`img-gvbnzy6f`。镜像ID可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。 ImageId *string `json:"ImageId" name:"ImageId"` + // 设置新的镜像名称;必须满足下列限制:
  • 不得超过20个字符。
  • 镜像名称不能与已有镜像重复。 ImageName *string `json:"ImageName" name:"ImageName"` + // 设置新的镜像描述;必须满足下列限制:
  • 不得超过60个字符。 ImageDescription *string `json:"ImageDescription" name:"ImageDescription"` } @@ -1895,7 +2310,8 @@ func (r *ModifyImageAttributeRequest) FromJsonString(s string) error { type ModifyImageAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1911,10 +2327,13 @@ func (r *ModifyImageAttributeResponse) FromJsonString(s string) error { type ModifyImageSharePermissionRequest struct { *tchttp.BaseRequest + // 镜像ID,形如`img-gvbnzy6f`。镜像Id可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。
    镜像ID必须指定为状态为`NORMAL`的镜像。镜像状态请参考[镜像数据表](/document/api/213/9452#image_state)。 ImageId *string `json:"ImageId" name:"ImageId"` + // 接收分享镜像的账号Id列表,array型参数的格式可以参考[API简介](/document/api/213/568)。帐号ID不同于QQ号,查询用户帐号ID请查看[帐号信息](https://console.cloud.tencent.com/developer)中的帐号ID栏。 AccountIds []*string `json:"AccountIds" name:"AccountIds" list` + // 操作,包括 `SHARE`,`CANCEL`。其中`SHARE`代表分享操作,`CANCEL`代表取消分享操作。 Permission *string `json:"Permission" name:"Permission"` } @@ -1931,7 +2350,8 @@ func (r *ModifyImageSharePermissionRequest) FromJsonString(s string) error { type ModifyImageSharePermissionResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1947,11 +2367,14 @@ func (r *ModifyImageSharePermissionResponse) FromJsonString(s string) error { type ModifyInstancesAttributeRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 实例名称。可任意命名,但不得超过60个字符。 InstanceName *string `json:"InstanceName" name:"InstanceName"` - // 指定实例的安全组Id列表。 + + // 指定实例的安全组Id列表,子机将重新关联指定列表的安全组,原本关联的安全组会被解绑。 SecurityGroups []*string `json:"SecurityGroups" name:"SecurityGroups" list` } @@ -1967,7 +2390,8 @@ func (r *ModifyInstancesAttributeRequest) FromJsonString(s string) error { type ModifyInstancesAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1983,10 +2407,13 @@ func (r *ModifyInstancesAttributeResponse) FromJsonString(s string) error { type ModifyInstancesChargeTypeRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。
  • PREPAID:预付费,即包年包月。 InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` } @@ -2003,7 +2430,8 @@ func (r *ModifyInstancesChargeTypeRequest) FromJsonString(s string) error { type ModifyInstancesChargeTypeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2019,8 +2447,10 @@ func (r *ModifyInstancesChargeTypeResponse) FromJsonString(s string) error { type ModifyInstancesProjectRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 项目ID。项目可以使用[AddProject](https://cloud.tencent.com/doc/api/403/4398)接口创建。后续使用[DescribeInstances](https://cloud.tencent.com/document/api/213/9388)接口查询实例时,项目ID可用于过滤结果。 ProjectId *int64 `json:"ProjectId" name:"ProjectId"` } @@ -2037,7 +2467,8 @@ func (r *ModifyInstancesProjectRequest) FromJsonString(s string) error { type ModifyInstancesProjectResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2053,8 +2484,10 @@ func (r *ModifyInstancesProjectResponse) FromJsonString(s string) error { type ModifyInstancesRenewFlagRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费

    若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 RenewFlag *string `json:"RenewFlag" name:"RenewFlag"` } @@ -2071,7 +2504,8 @@ func (r *ModifyInstancesRenewFlagRequest) FromJsonString(s string) error { type ModifyInstancesRenewFlagResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2087,10 +2521,13 @@ func (r *ModifyInstancesRenewFlagResponse) FromJsonString(s string) error { type ModifyInstancesVpcAttributeRequest struct { *tchttp.BaseRequest - // 待操作的实例ID数组。可通过[`DescribeInstances`](document/api/213/9388)接口返回值中的`InstanceId`获取。 + + // 待操作的实例ID数组。可通过[`DescribeInstances`](document/api/213/15728)接口返回值中的`InstanceId`获取。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 私有网络相关信息配置。通过该参数指定私有网络的ID,子网ID,私有网络ip等信息。当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。可通过`PrivateIpAddresses`指定私有网络子网IP,若需指定则所有已指定的实例均需要指定子网IP,此时`InstanceIds`与`PrivateIpAddresses`一一对应。不指定`PrivateIpAddresses`时随机分配私有网络子网IP。 VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud" name:"VirtualPrivateCloud"` + // 是否对运行中的实例选择强制关机。默认为TRUE。 ForceStop *bool `json:"ForceStop" name:"ForceStop"` } @@ -2107,7 +2544,8 @@ func (r *ModifyInstancesVpcAttributeRequest) FromJsonString(s string) error { type ModifyInstancesVpcAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2123,10 +2561,13 @@ func (r *ModifyInstancesVpcAttributeResponse) FromJsonString(s string) error { type ModifyKeyPairAttributeRequest struct { *tchttp.BaseRequest + // 密钥对ID,密钥对ID形如:`skey-xxxxxxxx`。

    可以通过以下方式获取可用的密钥 ID:
  • 通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥 ID。
  • 通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/9403) ,取返回信息中的 `KeyId` 获取密钥对 ID。 KeyId *string `json:"KeyId" name:"KeyId"` + // 修改后的密钥对名称,可由数字,字母和下划线组成,长度不超过25个字符。 KeyName *string `json:"KeyName" name:"KeyName"` + // 修改后的密钥对描述信息。可任意命名,但不得超过60个字符。 Description *string `json:"Description" name:"Description"` } @@ -2143,7 +2584,8 @@ func (r *ModifyKeyPairAttributeRequest) FromJsonString(s string) error { type ModifyKeyPairAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2158,34 +2600,44 @@ func (r *ModifyKeyPairAttributeResponse) FromJsonString(s string) error { } type OsVersion struct { + // 操作系统类型 OsName *string `json:"OsName" name:"OsName"` + // 支持的操作系统版本 OsVersions []*string `json:"OsVersions" name:"OsVersions" list` + // 支持的操作系统架构 Architecture []*string `json:"Architecture" name:"Architecture" list` } type Placement struct { + // 实例所属的[可用区](/document/product/213/9452#zone)ID。该参数也可以通过调用 [DescribeZones](/document/api/213/9455) 的返回值中的Zone字段来获取。 Zone *string `json:"Zone" name:"Zone"` + // 实例所属项目ID。该参数可以通过调用 [DescribeProject](/document/api/378/4400) 的返回值中的 projectId 字段来获取。不填为默认项目。 ProjectId *int64 `json:"ProjectId" name:"ProjectId"` + // 实例所属的专用宿主机ID列表。如果您有购买专用宿主机并且指定了该参数,则您购买的实例就会随机的部署在这些专用宿主机上。 HostIds []*string `json:"HostIds" name:"HostIds" list` } type Price struct { + // 描述了实例价格。 InstancePrice *ItemPrice `json:"InstancePrice" name:"InstancePrice"` + // 描述了网络价格。 BandwidthPrice *ItemPrice `json:"BandwidthPrice" name:"BandwidthPrice"` } type RebootInstancesRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 是否在正常重启失败后选择强制重启实例。取值范围:
  • TRUE:表示在正常重启失败后进行强制重启
  • FALSE:表示在正常重启失败后不进行强制重启

    默认取值:FALSE。 ForceReboot *bool `json:"ForceReboot" name:"ForceReboot"` } @@ -2202,7 +2654,8 @@ func (r *RebootInstancesRequest) FromJsonString(s string) error { type RebootInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2217,18 +2670,23 @@ func (r *RebootInstancesResponse) FromJsonString(s string) error { } type RegionInfo struct { + // 地域名称,例如,ap-guangzhou Region *string `json:"Region" name:"Region"` + // 地域描述,例如,华南地区(广州) RegionName *string `json:"RegionName" name:"RegionName"` + // 地域是否可用状态 RegionState *string `json:"RegionState" name:"RegionState"` } type RenewHostsRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的CDH实例ID。 HostIds []*string `json:"HostIds" name:"HostIds" list` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 HostChargePrepaid *ChargePrepaid `json:"HostChargePrepaid" name:"HostChargePrepaid"` } @@ -2245,7 +2703,8 @@ func (r *RenewHostsRequest) FromJsonString(s string) error { type RenewHostsResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2261,10 +2720,13 @@ func (r *RenewHostsResponse) FromJsonString(s string) error { type RenewInstancesRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的续费时长、是否设置自动续费等属性。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` + // 是否续费弹性数据盘。取值范围:
  • TRUE:表示续费包年包月实例同时续费其挂载的弹性数据盘
  • FALSE:表示续费包年包月实例同时不再续费其挂载的弹性数据盘

    默认取值:TRUE。 RenewPortableDataDisk *bool `json:"RenewPortableDataDisk" name:"RenewPortableDataDisk"` } @@ -2281,7 +2743,8 @@ func (r *RenewInstancesRequest) FromJsonString(s string) error { type RenewInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2297,14 +2760,19 @@ func (r *RenewInstancesResponse) FromJsonString(s string) error { type ResetInstanceRequest struct { *tchttp.BaseRequest + // 实例ID。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/9388) API返回值中的`InstanceId`获取。 InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:
  • 公共镜像
  • 自定义镜像
  • 共享镜像
  • 服务市场镜像

  • 可通过以下方式获取可用的镜像ID:
  • `公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。
  • 通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/9418) ,取返回信息中的`ImageId`字段。
  • ImageId *string `json:"ImageId" name:"ImageId"` + // 实例系统盘配置信息。系统盘为云盘的实例可以通过该参数指定重装后的系统盘大小来实现对系统盘的扩容操作,若不指定则默认系统盘大小保持不变。系统盘大小只支持扩容不支持缩容;重装只支持修改系统盘的大小,不能修改系统盘的类型。 SystemDisk *SystemDisk `json:"SystemDisk" name:"SystemDisk"` + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 LoginSettings *LoginSettings `json:"LoginSettings" name:"LoginSettings"` + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 EnhancedService *EnhancedService `json:"EnhancedService" name:"EnhancedService"` } @@ -2321,7 +2789,8 @@ func (r *ResetInstanceRequest) FromJsonString(s string) error { type ResetInstanceResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2337,12 +2806,16 @@ func (r *ResetInstanceResponse) FromJsonString(s string) error { type ResetInstancesInternetMaxBandwidthRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的 `InstanceId` 获取。 每次请求批量实例的上限为100。当调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽时,只支持一个实例。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 公网出带宽配置。不同机型带宽上限范围不一致,具体限制详见带宽限制对账表。暂时只支持 `InternetMaxBandwidthOut` 参数。 InternetAccessible *InternetAccessible `json:"InternetAccessible" name:"InternetAccessible"` + // 带宽生效的起始时间。格式:`YYYY-MM-DD`,例如:`2016-10-30`。起始时间不能早于当前时间。如果起始时间是今天则新设置的带宽立即生效。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 StartTime *string `json:"StartTime" name:"StartTime"` + // 带宽生效的终止时间。格式: `YYYY-MM-DD` ,例如:`2016-10-30` 。新设置的带宽的有效期包含终止时间此日期。终止时间不能晚于包年包月实例的到期时间。实例的到期时间可通过 [`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`ExpiredTime`获取。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 EndTime *string `json:"EndTime" name:"EndTime"` } @@ -2359,7 +2832,8 @@ func (r *ResetInstancesInternetMaxBandwidthRequest) FromJsonString(s string) err type ResetInstancesInternetMaxBandwidthResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2375,12 +2849,16 @@ func (r *ResetInstancesInternetMaxBandwidthResponse) FromJsonString(s string) er type ResetInstancesPasswordRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:
  • `Linux`实例密码必须8到16位,至少包括两项`[a-z,A-Z]、[0-9]`和`[( ) ~ ~ ! @ # $ % ^ & * - + = _ | { } [ ] : ; ' < > , . ? /]`中的符号。密码不允许以`/`符号开头。
  • `Windows`实例密码必须12到16位,至少包括三项`[a-z],[A-Z],[0-9]`和`[( ) ~ ~ ! @ # $ % ^ & * - + = _ | { } [ ] : ; ' < > , . ? /]`中的符号。密码不允许以`/`符号开头。
  • 如果实例即包含`Linux`实例又包含`Windows`实例,则密码复杂度限制按照`Windows`实例的限制。 Password *string `json:"Password" name:"Password"` + // 待重置密码的实例操作系统用户名。不得超过64个字符。 UserName *string `json:"UserName" name:"UserName"` + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机
  • FALSE:表示在正常关机失败后不进行强制关机

    默认取值:FALSE。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 ForceStop *bool `json:"ForceStop" name:"ForceStop"` } @@ -2397,7 +2875,8 @@ func (r *ResetInstancesPasswordRequest) FromJsonString(s string) error { type ResetInstancesPasswordResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2413,10 +2892,13 @@ func (r *ResetInstancesPasswordResponse) FromJsonString(s string) error { type ResetInstancesTypeRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为1。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口[`DescribeInstanceTypeConfigs`](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。 InstanceType *string `json:"InstanceType" name:"InstanceType"` + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机
  • FALSE:表示在正常关机失败后不进行强制关机

    默认取值:FALSE。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 ForceStop *bool `json:"ForceStop" name:"ForceStop"` } @@ -2433,7 +2915,8 @@ func (r *ResetInstancesTypeRequest) FromJsonString(s string) error { type ResetInstancesTypeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2449,10 +2932,13 @@ func (r *ResetInstancesTypeResponse) FromJsonString(s string) error { type ResizeInstanceDisksRequest struct { *tchttp.BaseRequest + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 待扩容的数据盘配置信息。只支持扩容随实例购买的数据盘,且[数据盘类型](/document/api/213/9452#block_device)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。数据盘容量单位:GB。最小扩容步长:10G。关于数据盘类型的选择请参考硬盘产品简介。可选数据盘类型受到实例类型`InstanceType`限制。另外允许扩容的最大容量也因数据盘类型的不同而有所差异。 DataDisks []*DataDisk `json:"DataDisks" name:"DataDisks" list` + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:
  • TRUE:表示在正常关机失败后进行强制关机
  • FALSE:表示在正常关机失败后不进行强制关机

    默认取值:FALSE。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 ForceStop *bool `json:"ForceStop" name:"ForceStop"` } @@ -2469,7 +2955,8 @@ func (r *ResizeInstanceDisksRequest) FromJsonString(s string) error { type ResizeInstanceDisksResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2485,47 +2972,68 @@ func (r *ResizeInstanceDisksResponse) FromJsonString(s string) error { type RunInstancesRequest struct { *tchttp.BaseRequest - // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目,专用宿主机(对于独享母机付费模式的实例创建)等属性。 + + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目,所属宿主机(在专用宿主机上创建子机时指定)等属性。 Placement *Placement `json:"Placement" name:"Placement"` + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:
  • 公共镜像
  • 自定义镜像
  • 共享镜像
  • 服务市场镜像

  • 可通过以下方式获取可用的镜像ID:
  • `公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。
  • 通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。
  • ImageId *string `json:"ImageId" name:"ImageId"` - // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。
  • PREPAID:预付费,即包年包月
  • POSTPAID_BY_HOUR:按小时后付费
  • CDHPAID:独享母机付费(基于专用宿主机创建,宿主机部分的资源不收费)
  • SPOTPAID:竞价付费
    默认值:POSTPAID_BY_HOUR。 + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。
  • PREPAID:预付费,即包年包月
  • POSTPAID_BY_HOUR:按小时后付费
  • CDHPAID:独享子机(基于专用宿主机创建,宿主机部分的资源不收费)
  • SPOTPAID:竞价付费
    默认值:POSTPAID_BY_HOUR。 InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` + // 实例机型。不同实例机型指定了不同的资源规格。 //
  • 对于付费模式为PREPAID或POSTPAID\_BY\_HOUR的实例创建,具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。若不指定该参数,则默认机型为S1.SMALL1。
  • 对于付费模式为CDHPAID的实例创建,该参数以"CDH_"为前缀,根据cpu和内存配置生成,具体形式为:CDH_XCXG,例如对于创建cpu为1核,内存为1G大小的专用宿主机的实例,该参数应该为CDH_1C1G。 InstanceType *string `json:"InstanceType" name:"InstanceType"` + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 SystemDisk *SystemDisk `json:"SystemDisk" name:"SystemDisk"` + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定11块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含10块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。 DataDisks []*DataDisk `json:"DataDisks" name:"DataDisks" list` + // 私有网络相关信息配置。通过该参数可以指定私有网络的ID,子网ID等信息。若不指定该参数,则默认使用基础网络。若在此参数中指定了私有网络ip,表示每个实例的主网卡ip,而且InstanceCount参数必须与私有网络ip的个数一致。 VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud" name:"VirtualPrivateCloud"` + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 InternetAccessible *InternetAccessible `json:"InternetAccessible" name:"InternetAccessible"` - // 购买实例数量。取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 + + // 购买实例数量。包年包月实例取值范围:[1,300],按量计费实例取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount" name:"InstanceCount"` + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。 InstanceName *string `json:"InstanceName" name:"InstanceName"` + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 LoginSettings *LoginSettings `json:"LoginSettings" name:"LoginSettings"` - // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则默认不绑定安全组。 + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 SecurityGroupIds []*string `json:"SecurityGroupIds" name:"SecurityGroupIds" list` + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 EnhancedService *EnhancedService `json:"EnhancedService" name:"EnhancedService"` + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
    更多详细信息请参阅:如何保证幂等性。 ClientToken *string `json:"ClientToken" name:"ClientToken"` + // 云服务器的主机名。
  • 点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。
  • Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。
  • 其他类型(Linux 等)实例:字符长度为[2, 60],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。 HostName *string `json:"HostName" name:"HostName"` + // 定时任务。通过该参数可以为实例指定定时任务,目前仅支持定时销毁。 ActionTimer *ActionTimer `json:"ActionTimer" name:"ActionTimer"` + // 容灾组id,仅支持指定一个。 DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds" name:"DisasterRecoverGroupIds" list` + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到云主机实例。 TagSpecification []*TagSpecification `json:"TagSpecification" name:"TagSpecification" list` + // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。 InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions" name:"InstanceMarketOptions"` + // 提供给实例使用的用户数据,需要以 base64 方式编码,支持的最大数据大小为 16KB。关于获取此参数的详细介绍,请参阅[Windows](https://cloud.tencent.com/document/product/213/17526)和[Linux](https://cloud.tencent.com/document/product/213/17525)启动时运行命令。 UserData *string `json:"UserData" name:"UserData"` } @@ -2542,9 +3050,11 @@ func (r *RunInstancesRequest) FromJsonString(s string) error { type RunInstancesResponse struct { *tchttp.BaseResponse Response *struct { + // 当通过本接口来创建实例时会返回该参数,表示一个或多个实例`ID`。返回实例`ID`列表并不代表实例创建成功,可根据 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口查询返回的InstancesSet中对应实例的`ID`的状态来判断创建是否完成;如果实例状态由“准备中”变为“正在运行”,则为创建成功。 InstanceIdSet []*string `json:"InstanceIdSet" name:"InstanceIdSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2559,31 +3069,38 @@ func (r *RunInstancesResponse) FromJsonString(s string) error { } type RunMonitorServiceEnabled struct { + // 是否开启[云监控](/document/product/248)服务。取值范围:
  • TRUE:表示开启云监控服务
  • FALSE:表示不开启云监控服务

    默认取值:TRUE。 Enabled *bool `json:"Enabled" name:"Enabled"` } type RunSecurityServiceEnabled struct { + // 是否开启[云安全](/document/product/296)服务。取值范围:
  • TRUE:表示开启云安全服务
  • FALSE:表示不开启云安全服务

    默认取值:TRUE。 Enabled *bool `json:"Enabled" name:"Enabled"` } type SharePermission struct { + // 镜像分享时间 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // 镜像分享的账户ID AccountId *string `json:"AccountId" name:"AccountId"` } type SpotMarketOptions struct { + // 竞价出价 MaxPrice *string `json:"MaxPrice" name:"MaxPrice"` + // 竞价请求类型,当前仅支持类型:one-time SpotInstanceType *string `json:"SpotInstanceType" name:"SpotInstanceType"` } type StartInstancesRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` } @@ -2600,7 +3117,8 @@ func (r *StartInstancesRequest) FromJsonString(s string) error { type StartInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2616,12 +3134,20 @@ func (r *StartInstancesResponse) FromJsonString(s string) error { type StopInstancesRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` + // 是否在正常关闭失败后选择强制关闭实例。取值范围:
  • TRUE:表示在正常关闭失败后进行强制关闭
  • FALSE:表示在正常关闭失败后不进行强制关闭

    默认取值:FALSE。 ForceStop *bool `json:"ForceStop" name:"ForceStop"` + // 实例的关闭模式。取值范围:
  • SOFT_FIRST:表示在正常关闭失败后进行强制关闭
  • HARD:直接强制关闭
  • SOFT:仅软关机
    默认取值:SOFT。 StopType *string `json:"StopType" name:"StopType"` + + // 按量计费实例关机收费模式。 + // 取值范围:
  • KEEP_CHARGING:关机继续收费
  • STOP_CHARGING:关机停止收费
    默认取值:KEEP_CHARGING。 + // 该参数只针对部分按量计费云硬盘实例生效,详情参考[按量计费实例关机不收费说明](https://cloud.tencent.com/document/product/213/19918) + StoppedMode *string `json:"StoppedMode" name:"StoppedMode"` } func (r *StopInstancesRequest) ToJsonString() string { @@ -2636,7 +3162,8 @@ func (r *StopInstancesRequest) FromJsonString(s string) error { type StopInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2651,18 +3178,23 @@ func (r *StopInstancesResponse) FromJsonString(s string) error { } type StorageBlock struct { + // HDD本地存储类型,值为:LOCAL_PRO. Type *string `json:"Type" name:"Type"` + // HDD本地存储的最小容量 MinSize *int64 `json:"MinSize" name:"MinSize"` + // HDD本地存储的最大容量 MaxSize *int64 `json:"MaxSize" name:"MaxSize"` } type SyncImagesRequest struct { *tchttp.BaseRequest + // 镜像ID列表 ,镜像ID可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。
    镜像ID必须满足限制:
  • 镜像ID对应的镜像状态必须为`NORMAL`。
  • 镜像大小小于50GB。
    镜像状态请参考[镜像数据表](/document/api/213/9452#image_state)。 ImageIds []*string `json:"ImageIds" name:"ImageIds" list` + // 目的同步地域列表;必须满足限制:
  • 不能为源地域,
  • 必须是一个合法的Region。
  • 暂不支持部分地域同步。
    具体地域参数请参考[Region](https://cloud.tencent.com/document/product/213/6091)。 DestinationRegions []*string `json:"DestinationRegions" name:"DestinationRegions" list` } @@ -2679,7 +3211,8 @@ func (r *SyncImagesRequest) FromJsonString(s string) error { type SyncImagesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2694,30 +3227,38 @@ func (r *SyncImagesResponse) FromJsonString(s string) error { } type SystemDisk struct { + // 系统盘类型。系统盘类型限制详见[CVM实例配置](/document/product/213/2177)。取值范围:
  • LOCAL_BASIC:本地硬盘
  • LOCAL_SSD:本地SSD硬盘
  • CLOUD_BASIC:普通云硬盘
  • CLOUD_SSD:SSD云硬盘
  • CLOUD_PREMIUM:高性能云硬盘

    默认取值:CLOUD_BASIC。 DiskType *string `json:"DiskType" name:"DiskType"` + // 系统盘ID。LOCAL_BASIC 和 LOCAL_SSD 类型没有ID。暂时不支持该参数。 DiskId *string `json:"DiskId" name:"DiskId"` + // 系统盘大小,单位:GB。默认值为 50 DiskSize *int64 `json:"DiskSize" name:"DiskSize"` } type Tag struct { + // 标签键 Key *string `json:"Key" name:"Key"` + // 标签值 Value *string `json:"Value" name:"Value"` } type TagSpecification struct { + // 标签绑定的资源类型,当前仅支持类型:"instance" ResourceType *string `json:"ResourceType" name:"ResourceType"` + // 标签对列表 Tags []*Tag `json:"Tags" name:"Tags" list` } type TerminateInstancesRequest struct { *tchttp.BaseRequest + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` } @@ -2734,7 +3275,8 @@ func (r *TerminateInstancesRequest) FromJsonString(s string) error { type TerminateInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2749,23 +3291,31 @@ func (r *TerminateInstancesResponse) FromJsonString(s string) error { } type VirtualPrivateCloud struct { - // 私有网络ID,形如`vpc-xxx`。有效的VpcId可通过登录[控制台](https://console.cloud.tencent.com/vpc/vpc?rid=1)查询;也可以调用接口 [DescribeVpcEx](/document/api/215/1372) ,从接口返回中的`unVpcId`字段获取。 + + // 私有网络ID,形如`vpc-xxx`。有效的VpcId可通过登录[控制台](https://console.cloud.tencent.com/vpc/vpc?rid=1)查询;也可以调用接口 [DescribeVpcEx](/document/api/215/1372) ,从接口返回中的`unVpcId`字段获取。若在创建子机时VpcId与SubnetId同时传入`DEFAULT`,则强制使用默认vpc网络。 VpcId *string `json:"VpcId" name:"VpcId"` - // 私有网络子网ID,形如`subnet-xxx`。有效的私有网络子网ID可通过登录[控制台](https://console.cloud.tencent.com/vpc/subnet?rid=1)查询;也可以调用接口 [DescribeSubnets](/document/api/215/15784) ,从接口返回中的`unSubnetId`字段获取。 + + // 私有网络子网ID,形如`subnet-xxx`。有效的私有网络子网ID可通过登录[控制台](https://console.cloud.tencent.com/vpc/subnet?rid=1)查询;也可以调用接口 [DescribeSubnets](/document/api/215/15784) ,从接口返回中的`unSubnetId`字段获取。若在创建子机时SubnetId与VpcId同时传入`DEFAULT`,则强制使用默认vpc网络。 SubnetId *string `json:"SubnetId" name:"SubnetId"` + // 是否用作公网网关。公网网关只有在实例拥有公网IP以及处于私有网络下时才能正常使用。取值范围:
  • TRUE:表示用作公网网关
  • FALSE:表示不用作公网网关

    默认取值:FALSE。 AsVpcGateway *bool `json:"AsVpcGateway" name:"AsVpcGateway"` + // 私有网络子网 IP 数组,在创建实例、修改实例vpc属性操作中可使用此参数。当前仅批量创建多台实例时支持传入相同子网的多个 IP。 PrivateIpAddresses []*string `json:"PrivateIpAddresses" name:"PrivateIpAddresses" list` } type ZoneInfo struct { + // 可用区名称,例如,ap-guangzhou-3 Zone *string `json:"Zone" name:"Zone"` + // 可用区描述,例如,广州三区 ZoneName *string `json:"ZoneName" name:"ZoneName"` + // 可用区ID ZoneId *string `json:"ZoneId" name:"ZoneId"` + // 可用区状态 ZoneState *string `json:"ZoneState" name:"ZoneState"` } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go index ae8b6cb13..1d31c3d95 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go @@ -26,6 +26,7 @@ type Client struct { common.Client } +// Deprecated func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { cpf := profile.NewClientProfile() client = &Client{} @@ -36,7 +37,7 @@ func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { client = &Client{} client.Init(region). - WithSecretId(credential.SecretId, credential.SecretKey). + WithCredential(credential). WithProfile(clientProfile) return } @@ -136,7 +137,7 @@ func NewAssignPrivateIpAddressesResponse() (response *AssignPrivateIpAddressesRe } // 本接口(AssignPrivateIpAddresses)用于弹性网卡申请内网 IP。 -// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见弹性网卡使用限制。 +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见弹性网卡使用限制。 // * 可以指定内网IP地址申请,内网IP地址类型不能为主IP,主IP已存在,不能修改,内网IP必须要弹性网卡所在子网内,而且不能被占用。 // * 在弹性网卡上申请一个到多个辅助内网IP,接口会在弹性网卡所在子网网段内返回指定数量的辅助内网IP。 func (c *Client) AssignPrivateIpAddresses(request *AssignPrivateIpAddressesRequest) (response *AssignPrivateIpAddressesResponse, err error) { @@ -469,6 +470,31 @@ func (c *Client) CreateDirectConnectGatewayCcnRoutes(request *CreateDirectConnec return } +func NewCreateHaVipRequest() (request *CreateHaVipRequest) { + request = &CreateHaVipRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateHaVip") + return +} + +func NewCreateHaVipResponse() (response *CreateHaVipResponse) { + response = &CreateHaVipResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(CreateHaVip)用于创建高可用虚拟IP(HAVIP) +func (c *Client) CreateHaVip(request *CreateHaVipRequest) (response *CreateHaVipResponse, err error) { + if request == nil { + request = NewCreateHaVipRequest() + } + response = NewCreateHaVipResponse() + err = c.Send(request, response) + return +} + func NewCreateNetworkInterfaceRequest() (request *CreateNetworkInterfaceRequest) { request = &CreateNetworkInterfaceRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -487,6 +513,7 @@ func NewCreateNetworkInterfaceResponse() (response *CreateNetworkInterfaceRespon // 本接口(CreateNetworkInterface)用于创建弹性网卡。 // * 创建弹性网卡时可以指定内网IP,并且可以指定一个主IP,指定的内网IP必须在弹性网卡所在子网内,而且不能被占用。 // * 创建弹性网卡时可以指定需要申请的内网IP数量,系统会随机生成内网IP地址。 +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见弹性网卡使用限制。 // * 创建弹性网卡同时可以绑定已有安全组。 func (c *Client) CreateNetworkInterface(request *CreateNetworkInterfaceRequest) (response *CreateNetworkInterfaceResponse, err error) { if request == nil { @@ -894,6 +921,34 @@ func (c *Client) DeleteCustomerGateway(request *DeleteCustomerGatewayRequest) (r return } +func NewDeleteDirectConnectGatewayRequest() (request *DeleteDirectConnectGatewayRequest) { + request = &DeleteDirectConnectGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteDirectConnectGateway") + return +} + +func NewDeleteDirectConnectGatewayResponse() (response *DeleteDirectConnectGatewayResponse) { + response = &DeleteDirectConnectGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DeleteDirectConnectGateway)用于删除专线网关。 +//
  • 如果是 NAT 网关,删除专线网关后,NAT 规则以及 ACL 策略都被清理了。
  • +//
  • 删除专线网关后,系统会删除路由表中跟该专线网关相关的路由策略。
  • +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`QueryTask`接口 +func (c *Client) DeleteDirectConnectGateway(request *DeleteDirectConnectGatewayRequest) (response *DeleteDirectConnectGatewayResponse, err error) { + if request == nil { + request = NewDeleteDirectConnectGatewayRequest() + } + response = NewDeleteDirectConnectGatewayResponse() + err = c.Send(request, response) + return +} + func NewDeleteDirectConnectGatewayCcnRoutesRequest() (request *DeleteDirectConnectGatewayCcnRoutesRequest) { request = &DeleteDirectConnectGatewayCcnRoutesRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -919,6 +974,32 @@ func (c *Client) DeleteDirectConnectGatewayCcnRoutes(request *DeleteDirectConnec return } +func NewDeleteHaVipRequest() (request *DeleteHaVipRequest) { + request = &DeleteHaVipRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteHaVip") + return +} + +func NewDeleteHaVipResponse() (response *DeleteHaVipResponse) { + response = &DeleteHaVipResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DeleteHaVip)用于删除高可用虚拟IP(HAVIP)
    +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`QueryTask`接口 +func (c *Client) DeleteHaVip(request *DeleteHaVipRequest) (response *DeleteHaVipResponse, err error) { + if request == nil { + request = NewDeleteHaVipRequest() + } + response = NewDeleteHaVipResponse() + err = c.Send(request, response) + return +} + func NewDeleteNetworkInterfaceRequest() (request *DeleteNetworkInterfaceRequest) { request = &DeleteNetworkInterfaceRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -934,7 +1015,7 @@ func NewDeleteNetworkInterfaceResponse() (response *DeleteNetworkInterfaceRespon return } -// 本接口(DeleteNetworkInterface)用于创建弹性网卡。 +// 本接口(DeleteNetworkInterface)用于删除弹性网卡。 // * 弹性网卡上绑定了云主机时,不能被删除。 // * 删除指定弹性网卡,弹性网卡必须先和子机解绑才能删除。删除之后弹性网卡上所有内网IP都将被退还。 func (c *Client) DeleteNetworkInterface(request *DeleteNetworkInterfaceRequest) (response *DeleteNetworkInterfaceResponse, err error) { @@ -1579,6 +1660,56 @@ func (c *Client) DescribeDirectConnectGatewayCcnRoutes(request *DescribeDirectCo return } +func NewDescribeDirectConnectGatewaysRequest() (request *DescribeDirectConnectGatewaysRequest) { + request = &DescribeDirectConnectGatewaysRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeDirectConnectGateways") + return +} + +func NewDescribeDirectConnectGatewaysResponse() (response *DescribeDirectConnectGatewaysResponse) { + response = &DescribeDirectConnectGatewaysResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeDirectConnectGateways)用于查询专线网关。 +func (c *Client) DescribeDirectConnectGateways(request *DescribeDirectConnectGatewaysRequest) (response *DescribeDirectConnectGatewaysResponse, err error) { + if request == nil { + request = NewDescribeDirectConnectGatewaysRequest() + } + response = NewDescribeDirectConnectGatewaysResponse() + err = c.Send(request, response) + return +} + +func NewDescribeHaVipsRequest() (request *DescribeHaVipsRequest) { + request = &DescribeHaVipsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeHaVips") + return +} + +func NewDescribeHaVipsResponse() (response *DescribeHaVipsResponse) { + response = &DescribeHaVipsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(DescribeHaVips)用于查询高可用虚拟IP(HAVIP)列表。 +func (c *Client) DescribeHaVips(request *DescribeHaVipsRequest) (response *DescribeHaVipsResponse, err error) { + if request == nil { + request = NewDescribeHaVipsRequest() + } + response = NewDescribeHaVipsResponse() + err = c.Send(request, response) + return +} + func NewDescribeNetworkInterfacesRequest() (request *DescribeNetworkInterfacesRequest) { request = &DescribeNetworkInterfacesRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2109,6 +2240,58 @@ func (c *Client) EnableRoutes(request *EnableRoutesRequest) (response *EnableRou return } +func NewHaVipAssociateAddressIpRequest() (request *HaVipAssociateAddressIpRequest) { + request = &HaVipAssociateAddressIpRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "HaVipAssociateAddressIp") + return +} + +func NewHaVipAssociateAddressIpResponse() (response *HaVipAssociateAddressIpResponse) { + response = &HaVipAssociateAddressIpResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(HaVipAssociateAddressIp)用于高可用虚拟IP(HAVIP)绑定弹性公网IP(EIP)
    +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`QueryTask`接口 +func (c *Client) HaVipAssociateAddressIp(request *HaVipAssociateAddressIpRequest) (response *HaVipAssociateAddressIpResponse, err error) { + if request == nil { + request = NewHaVipAssociateAddressIpRequest() + } + response = NewHaVipAssociateAddressIpResponse() + err = c.Send(request, response) + return +} + +func NewHaVipDisassociateAddressIpRequest() (request *HaVipDisassociateAddressIpRequest) { + request = &HaVipDisassociateAddressIpRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "HaVipDisassociateAddressIp") + return +} + +func NewHaVipDisassociateAddressIpResponse() (response *HaVipDisassociateAddressIpResponse) { + response = &HaVipDisassociateAddressIpResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(HaVipDisassociateAddressIp)用于将高可用虚拟IP(HAVIP)已绑定的弹性公网IP(EIP)解除绑定
    +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`QueryTask`接口 +func (c *Client) HaVipDisassociateAddressIp(request *HaVipDisassociateAddressIpRequest) (response *HaVipDisassociateAddressIpResponse, err error) { + if request == nil { + request = NewHaVipDisassociateAddressIpRequest() + } + response = NewHaVipDisassociateAddressIpResponse() + err = c.Send(request, response) + return +} + func NewInquiryPriceCreateVpnGatewayRequest() (request *InquiryPriceCreateVpnGatewayRequest) { request = &InquiryPriceCreateVpnGatewayRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2412,6 +2595,56 @@ func (c *Client) ModifyCustomerGatewayAttribute(request *ModifyCustomerGatewayAt return } +func NewModifyDirectConnectGatewayAttributeRequest() (request *ModifyDirectConnectGatewayAttributeRequest) { + request = &ModifyDirectConnectGatewayAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyDirectConnectGatewayAttribute") + return +} + +func NewModifyDirectConnectGatewayAttributeResponse() (response *ModifyDirectConnectGatewayAttributeResponse) { + response = &ModifyDirectConnectGatewayAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(ModifyDirectConnectGatewayAttribute)用于修改专线网关属性 +func (c *Client) ModifyDirectConnectGatewayAttribute(request *ModifyDirectConnectGatewayAttributeRequest) (response *ModifyDirectConnectGatewayAttributeResponse, err error) { + if request == nil { + request = NewModifyDirectConnectGatewayAttributeRequest() + } + response = NewModifyDirectConnectGatewayAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyHaVipAttributeRequest() (request *ModifyHaVipAttributeRequest) { + request = &ModifyHaVipAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyHaVipAttribute") + return +} + +func NewModifyHaVipAttributeResponse() (response *ModifyHaVipAttributeResponse) { + response = &ModifyHaVipAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// 本接口(ModifyHaVipAttribute)用于修改高可用虚拟IP(HAVIP)属性 +func (c *Client) ModifyHaVipAttribute(request *ModifyHaVipAttributeRequest) (response *ModifyHaVipAttributeResponse, err error) { + if request == nil { + request = NewModifyHaVipAttributeRequest() + } + response = NewModifyHaVipAttributeResponse() + err = c.Send(request, response) + return +} + func NewModifyNetworkInterfaceAttributeRequest() (request *ModifyNetworkInterfaceAttributeRequest) { request = &ModifyNetworkInterfaceAttributeRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go index 8ee915479..b1428ff58 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go @@ -22,8 +22,10 @@ import ( type AcceptAttachCcnInstancesRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` + // 接受关联实例列表。 Instances []*CcnInstance `json:"Instances" name:"Instances" list` } @@ -40,7 +42,8 @@ func (r *AcceptAttachCcnInstancesRequest) FromJsonString(s string) error { type AcceptAttachCcnInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -55,20 +58,26 @@ func (r *AcceptAttachCcnInstancesResponse) FromJsonString(s string) error { } type AccountAttribute struct { + // 属性名 AttributeName *string `json:"AttributeName" name:"AttributeName"` + // 属性值 AttributeValues []*string `json:"AttributeValues" name:"AttributeValues" list` } type AddBandwidthPackageResourcesRequest struct { *tchttp.BaseRequest + // 资源Id,形如'eip-xxxx', 'lb-xxxx' ResourceIds []*string `json:"ResourceIds" name:"ResourceIds" list` + // 带宽包唯一标识ID,形如'bwp-xxxx' BandwidthPackageId *string `json:"BandwidthPackageId" name:"BandwidthPackageId"` + // 带宽包类型,包括'BGP', 'SINGLEISP', 'ANYCAST' NetworkType *string `json:"NetworkType" name:"NetworkType"` + // 资源类型,包括'Address', 'LoadBalance' ResourceType *string `json:"ResourceType" name:"ResourceType"` } @@ -85,7 +94,8 @@ func (r *AddBandwidthPackageResourcesRequest) FromJsonString(s string) error { type AddBandwidthPackageResourcesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -100,65 +110,89 @@ func (r *AddBandwidthPackageResourcesResponse) FromJsonString(s string) error { } type Address struct { + // `EIP`的`ID`,是`EIP`的唯一标识。 AddressId *string `json:"AddressId" name:"AddressId"` + // `EIP`名称。 AddressName *string `json:"AddressName" name:"AddressName"` + // `EIP`状态。 AddressStatus *string `json:"AddressStatus" name:"AddressStatus"` + // 外网IP地址 AddressIp *string `json:"AddressIp" name:"AddressIp"` + // 绑定的资源实例`ID`。可能是一个`CVM`,`NAT`。 InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // 绑定的弹性网卡ID NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` + // 绑定的资源内网ip PrivateAddressIp *string `json:"PrivateAddressIp" name:"PrivateAddressIp"` + // 资源隔离状态。true表示eip处于隔离状态,false表示资源处于未隔离装填 IsArrears *bool `json:"IsArrears" name:"IsArrears"` + // 资源封堵状态。true表示eip处于封堵状态,false表示eip处于未封堵状态 IsBlocked *bool `json:"IsBlocked" name:"IsBlocked"` + // eip是否支持直通模式。true表示eip支持直通模式,false表示资源不支持直通模式 IsEipDirectConnection *bool `json:"IsEipDirectConnection" name:"IsEipDirectConnection"` + // eip资源类型,包括"CalcIP","WanIP","EIP","AnycastEIP"。其中"CalcIP"表示设备ip,“WanIP”表示普通公网ip,“EIP”表示弹性公网ip,“AnycastEip”表示加速EIP AddressType *string `json:"AddressType" name:"AddressType"` + // eip是否在解绑后自动释放。true表示eip将会在解绑后自动释放,false表示eip在解绑后不会自动释放 CascadeRelease *bool `json:"CascadeRelease" name:"CascadeRelease"` } type AddressTemplate struct { + // IP地址模板名称。 AddressTemplateName *string `json:"AddressTemplateName" name:"AddressTemplateName"` + // IP地址模板实例唯一ID。 AddressTemplateId *string `json:"AddressTemplateId" name:"AddressTemplateId"` + // IP地址信息。 AddressSet []*string `json:"AddressSet" name:"AddressSet" list` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` } type AddressTemplateGroup struct { + // IP地址模板集合名称。 AddressTemplateGroupName *string `json:"AddressTemplateGroupName" name:"AddressTemplateGroupName"` + // IP地址模板集合实例ID,例如:ipmg-dih8xdbq。 AddressTemplateGroupId *string `json:"AddressTemplateGroupId" name:"AddressTemplateGroupId"` + // IP地址模板ID。 AddressTemplateIdSet []*string `json:"AddressTemplateIdSet" name:"AddressTemplateIdSet" list` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` } type AddressTemplateSpecification struct { + // IP地址ID,例如:ipm-2uw6ujo6。 AddressId *string `json:"AddressId" name:"AddressId"` + // IP地址组ID,例如:ipmg-2uw6ujo6。 AddressGroupId *string `json:"AddressGroupId" name:"AddressGroupId"` } type AllocateAddressesRequest struct { *tchttp.BaseRequest + // 申请 EIP 数量,默认值为1。 AddressCount *int64 `json:"AddressCount" name:"AddressCount"` } @@ -175,9 +209,11 @@ func (r *AllocateAddressesRequest) FromJsonString(s string) error { type AllocateAddressesResponse struct { *tchttp.BaseResponse Response *struct { + // 申请到的 EIP 的唯一 ID 列表。 AddressSet []*string `json:"AddressSet" name:"AddressSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -193,11 +229,14 @@ func (r *AllocateAddressesResponse) FromJsonString(s string) error { type AssignPrivateIpAddressesRequest struct { *tchttp.BaseRequest + // 弹性网卡实例ID,例如:eni-m6dyj72l。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` - // 指定的内网IP信息。 + + // 指定的内网IP信息,单次最多指定10个。 PrivateIpAddresses []*PrivateIpAddressSpecification `json:"PrivateIpAddresses" name:"PrivateIpAddresses" list` - // 新申请的内网IP地址个数。 + + // 新申请的内网IP地址个数,内网IP地址个数总和不能超过配数。 SecondaryPrivateIpAddressCount *uint64 `json:"SecondaryPrivateIpAddressCount" name:"SecondaryPrivateIpAddressCount"` } @@ -213,9 +252,11 @@ func (r *AssignPrivateIpAddressesRequest) FromJsonString(s string) error { type AssignPrivateIpAddressesResponse struct { *tchttp.BaseResponse Response *struct { + // 内网IP详细信息。 PrivateIpAddressSet []*PrivateIpAddressSpecification `json:"PrivateIpAddressSet" name:"PrivateIpAddressSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -231,13 +272,17 @@ func (r *AssignPrivateIpAddressesResponse) FromJsonString(s string) error { type AssociateAddressRequest struct { *tchttp.BaseRequest + // 标识 EIP 的唯一 ID。EIP 唯一 ID 形如:`eip-11112222`。 AddressId *string `json:"AddressId" name:"AddressId"` - // 要绑定的实例 ID。实例 ID 形如:`ins-11112222`。可通过登录[控制台](https://console.cloud.tencent.com/cvm)查询,也可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/9389) 接口返回值中的`InstanceId`获取。 + + // 要绑定的实例 ID。实例 ID 形如:`ins-11112222`。可通过登录[控制台](https://console.cloud.tencent.com/cvm)查询,也可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口返回值中的`InstanceId`获取。 InstanceId *string `json:"InstanceId" name:"InstanceId"` - // 要绑定的弹性网卡 ID。 弹性网卡 ID 形如:`eni-11112222`。`NetworkInterfaceId` 与 `InstanceId` 不可同时指定。弹性网卡 ID 可通过登录[控制台](https://console.cloud.tencent.com/vpc/eni)查询,也可通过[DescribeNetworkInterfaces](https://cloud.tencent.com/document/api/215/4814)接口返回值中的`networkInterfaceId`获取。 + + // 要绑定的弹性网卡 ID。 弹性网卡 ID 形如:`eni-11112222`。`NetworkInterfaceId` 与 `InstanceId` 不可同时指定。弹性网卡 ID 可通过登录[控制台](https://console.cloud.tencent.com/vpc/eni)查询,也可通过[DescribeNetworkInterfaces](https://cloud.tencent.com/document/api/215/15817)接口返回值中的`networkInterfaceId`获取。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` - // 要绑定的内网 IP。如果指定了 `NetworkInterfaceId` 则也必须指定 `PrivateIpAddress` ,表示将 EIP 绑定到指定弹性网卡的指定内网 IP 上。同时要确保指定的 `PrivateIpAddress` 是指定的 `NetworkInterfaceId` 上的一个内网 IP。指定弹性网卡的内网 IP 可通过登录[控制台](https://console.cloud.tencent.com/vpc/eni)查询,也可通过[DescribeNetworkInterfaces](https://cloud.tencent.com/document/api/215/4814)接口返回值中的`privateIpAddress`获取。 + + // 要绑定的内网 IP。如果指定了 `NetworkInterfaceId` 则也必须指定 `PrivateIpAddress` ,表示将 EIP 绑定到指定弹性网卡的指定内网 IP 上。同时要确保指定的 `PrivateIpAddress` 是指定的 `NetworkInterfaceId` 上的一个内网 IP。指定弹性网卡的内网 IP 可通过登录[控制台](https://console.cloud.tencent.com/vpc/eni)查询,也可通过[DescribeNetworkInterfaces](https://cloud.tencent.com/document/api/215/15817)接口返回值中的`privateIpAddress`获取。 PrivateIpAddress *string `json:"PrivateIpAddress" name:"PrivateIpAddress"` } @@ -253,7 +298,8 @@ func (r *AssociateAddressRequest) FromJsonString(s string) error { type AssociateAddressResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -269,10 +315,13 @@ func (r *AssociateAddressResponse) FromJsonString(s string) error { type AttachCcnInstancesRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` + // 关联网络实例列表 Instances []*CcnInstance `json:"Instances" name:"Instances" list` + // CCN所属UIN(根账号),默认当前账号所属UIN CcnUin *string `json:"CcnUin" name:"CcnUin"` } @@ -289,7 +338,8 @@ func (r *AttachCcnInstancesRequest) FromJsonString(s string) error { type AttachCcnInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -305,8 +355,10 @@ func (r *AttachCcnInstancesResponse) FromJsonString(s string) error { type AttachClassicLinkVpcRequest struct { *tchttp.BaseRequest + // VPC实例ID VpcId *string `json:"VpcId" name:"VpcId"` + // CVM实例ID InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` } @@ -323,7 +375,8 @@ func (r *AttachClassicLinkVpcRequest) FromJsonString(s string) error { type AttachClassicLinkVpcResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -339,8 +392,10 @@ func (r *AttachClassicLinkVpcResponse) FromJsonString(s string) error { type AttachNetworkInterfaceRequest struct { *tchttp.BaseRequest + // 弹性网卡实例ID,例如:eni-m6dyj72l。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` + // CVM实例ID。形如:ins-r8hr2upy。 InstanceId *string `json:"InstanceId" name:"InstanceId"` } @@ -357,7 +412,8 @@ func (r *AttachNetworkInterfaceRequest) FromJsonString(s string) error { type AttachNetworkInterfaceResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -372,113 +428,168 @@ func (r *AttachNetworkInterfaceResponse) FromJsonString(s string) error { } type BandwidthPackage struct { + // 带宽包唯一标识Id BandwidthPackageId *string `json:"BandwidthPackageId" name:"BandwidthPackageId"` + // 带宽包类型,包括'BGP','SINGLEISP','ANYCAST' NetworkType *string `json:"NetworkType" name:"NetworkType"` + // 带宽包计费类型,包括'TOP5_POSTPAID_BY_MONTH'和'PERCENT95_POSTPAID_BY_MONTH' ChargeType *string `json:"ChargeType" name:"ChargeType"` + // 带宽包名称 BandwidthPackageName *string `json:"BandwidthPackageName" name:"BandwidthPackageName"` + // 带宽包创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // 带宽包状态,包括'CREATING','CREATED','DELETING','DELETED' Status *string `json:"Status" name:"Status"` + // 带宽包资源信息 ResourceSet []*Resource `json:"ResourceSet" name:"ResourceSet" list` + + // 带宽包限速大小。单位:Mbps,-1表示不限速。 + Bandwidth *int64 `json:"Bandwidth" name:"Bandwidth"` } type CCN struct { + // 云联网唯一ID CcnId *string `json:"CcnId" name:"CcnId"` + // 云联网名称 CcnName *string `json:"CcnName" name:"CcnName"` + // 云联网描述信息 CcnDescription *string `json:"CcnDescription" name:"CcnDescription"` + // 关联实例数量 InstanceCount *uint64 `json:"InstanceCount" name:"InstanceCount"` + // 创建时间 CreateTime *string `json:"CreateTime" name:"CreateTime"` + // 实例状态, 'ISOLATED': 隔离中(欠费停服),'AVAILABLE':运行中。 State *string `json:"State" name:"State"` + + // 实例服务质量,’PT’:白金,'AU':金,'AG':银。 + QosLevel *string `json:"QosLevel" name:"QosLevel"` } type CcnAttachedInstance struct { - // 云联网实例ID + + // 云联网实例ID。 CcnId *string `json:"CcnId" name:"CcnId"` - // 关联实例类型,可选值:VPC、DIRECTCONNECT + + // 关联实例类型: + //
  • `VPC`:私有网络
  • + //
  • `DIRECTCONNECT`:专线网关
  • + //
  • `BMVPC`:黑石私有网络
  • InstanceType *string `json:"InstanceType" name:"InstanceType"` - // 关联实例ID + + // 关联实例ID。 InstanceId *string `json:"InstanceId" name:"InstanceId"` - // 关联实例名称 + + // 关联实例名称。 InstanceName *string `json:"InstanceName" name:"InstanceName"` - // 关联实例所属大区,例如:ap-guangzhou + + // 关联实例所属大区,例如:ap-guangzhou。 InstanceRegion *string `json:"InstanceRegion" name:"InstanceRegion"` - // 关联实例所属UIN(根账号) + + // 关联实例所属UIN(根账号)。 InstanceUin *string `json:"InstanceUin" name:"InstanceUin"` - // 关联实例CIDR + + // 关联实例CIDR。 CidrBlock []*string `json:"CidrBlock" name:"CidrBlock" list` + // 关联实例状态: - // PENDING:申请中 - // ACTIVE:已连接 - // EXPIRED:已过期 - // REJECTED:已拒绝 - // DELETED:已删除 + //
  • `PENDING`:申请中
  • + //
  • `ACTIVE`:已连接
  • + //
  • `EXPIRED`:已过期
  • + //
  • `REJECTED`:已拒绝
  • + //
  • `DELETED`:已删除
  • + //
  • `ATTACHING`:关联中
  • + //
  • `DETACHING`:解关联中
  • State *string `json:"State" name:"State"` - // 关联时间 + + // 关联时间。 AttachedTime *string `json:"AttachedTime" name:"AttachedTime"` - // 云联网所属UIN(根账号) + + // 云联网所属UIN(根账号)。 CcnUin *string `json:"CcnUin" name:"CcnUin"` } type CcnInstance struct { - // 关联实例ID + + // 关联实例ID。 InstanceId *string `json:"InstanceId" name:"InstanceId"` - // 关联实例ID所属大区,例如:ap-guangzhou + + // 关联实例ID所属大区,例如:ap-guangzhou。 InstanceRegion *string `json:"InstanceRegion" name:"InstanceRegion"` - // 关联实例类型,可选值:VPC、DIRECTCONNECT + + // 关联实例类型,可选值: + //
  • `VPC`:私有网络
  • + //
  • `DIRECTCONNECT`:专线网关
  • + //
  • `BMVPC`:黑石私有网络
  • InstanceType *string `json:"InstanceType" name:"InstanceType"` } type CcnRegionBandwidthLimit struct { + // 地域,例如:ap-guangzhou Region *string `json:"Region" name:"Region"` + // 出带宽上限,单位:Mbps BandwidthLimit *uint64 `json:"BandwidthLimit" name:"BandwidthLimit"` } type CcnRoute struct { + // 路由策略ID RouteId *string `json:"RouteId" name:"RouteId"` + // 目的端 DestinationCidrBlock *string `json:"DestinationCidrBlock" name:"DestinationCidrBlock"` + // 下一跳类型(关联实例类型),所有类型:VPC、DIRECTCONNECT InstanceType *string `json:"InstanceType" name:"InstanceType"` + // 下一跳(关联实例) InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 下一跳名称(关联实例名称) InstanceName *string `json:"InstanceName" name:"InstanceName"` + // 下一跳所属地域(关联实例所属地域) InstanceRegion *string `json:"InstanceRegion" name:"InstanceRegion"` + // 更新时间 UpdateTime *string `json:"UpdateTime" name:"UpdateTime"` + // 路由是否启用 Enabled *bool `json:"Enabled" name:"Enabled"` + // 关联实例所属UIN(根账号) InstanceUin *string `json:"InstanceUin" name:"InstanceUin"` } type ClassicLinkInstance struct { + // VPC实例ID VpcId *string `json:"VpcId" name:"VpcId"` + // 云服务器实例唯一ID InstanceId *string `json:"InstanceId" name:"InstanceId"` } type CreateAddressTemplateGroupRequest struct { *tchttp.BaseRequest + // IP地址模版集合名称。 AddressTemplateGroupName *string `json:"AddressTemplateGroupName" name:"AddressTemplateGroupName"` + // IP地址模版实例ID,例如:ipm-mdunqeb6。 AddressTemplateIds []*string `json:"AddressTemplateIds" name:"AddressTemplateIds" list` } @@ -495,9 +606,11 @@ func (r *CreateAddressTemplateGroupRequest) FromJsonString(s string) error { type CreateAddressTemplateGroupResponse struct { *tchttp.BaseResponse Response *struct { + // IP地址模板集合对象。 AddressTemplateGroup *AddressTemplateGroup `json:"AddressTemplateGroup" name:"AddressTemplateGroup"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -513,8 +626,10 @@ func (r *CreateAddressTemplateGroupResponse) FromJsonString(s string) error { type CreateAddressTemplateRequest struct { *tchttp.BaseRequest + // IP地址模版名称 AddressTemplateName *string `json:"AddressTemplateName" name:"AddressTemplateName"` + // 地址信息,支持 IP、CIDR、IP 范围。 Addresses []*string `json:"Addresses" name:"Addresses" list` } @@ -531,9 +646,11 @@ func (r *CreateAddressTemplateRequest) FromJsonString(s string) error { type CreateAddressTemplateResponse struct { *tchttp.BaseResponse Response *struct { + // IP地址模板对象。 AddressTemplate *AddressTemplate `json:"AddressTemplate" name:"AddressTemplate"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -549,14 +666,21 @@ func (r *CreateAddressTemplateResponse) FromJsonString(s string) error { type CreateBandwidthPackageRequest struct { *tchttp.BaseRequest + // 带宽包类型,包括'BGP','SINGLEISP','ANYCAST' NetworkType *string `json:"NetworkType" name:"NetworkType"` + // 带宽包计费类型,包括‘TOP5_POSTPAID_BY_MONTH’,‘PERCENT95_POSTPAID_BY_MONTH’ ChargeType *string `json:"ChargeType" name:"ChargeType"` + // 带宽包名字 BandwidthPackageName *string `json:"BandwidthPackageName" name:"BandwidthPackageName"` + // 带宽包数量(非上移账户只能填1) BandwidthPackageCount *uint64 `json:"BandwidthPackageCount" name:"BandwidthPackageCount"` + + // 带宽包限速大小。单位:Mbps,-1表示不限速。 + InternetMaxBandwidth *int64 `json:"InternetMaxBandwidth" name:"InternetMaxBandwidth"` } func (r *CreateBandwidthPackageRequest) ToJsonString() string { @@ -571,11 +695,14 @@ func (r *CreateBandwidthPackageRequest) FromJsonString(s string) error { type CreateBandwidthPackageResponse struct { *tchttp.BaseResponse Response *struct { + // 带宽包Id BandwidthPackageId *string `json:"BandwidthPackageId" name:"BandwidthPackageId"` + // 带宽包Ids(申请数量大于1时有效) BandwidthPackageIds []*string `json:"BandwidthPackageIds" name:"BandwidthPackageIds" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -591,8 +718,10 @@ func (r *CreateBandwidthPackageResponse) FromJsonString(s string) error { type CreateCcnRequest struct { *tchttp.BaseRequest + // CCN名称,最大长度不能超过60个字节。 CcnName *string `json:"CcnName" name:"CcnName"` + // CCN描述信息,最大长度不能超过100个字节。 CcnDescription *string `json:"CcnDescription" name:"CcnDescription"` } @@ -609,9 +738,11 @@ func (r *CreateCcnRequest) FromJsonString(s string) error { type CreateCcnResponse struct { *tchttp.BaseResponse Response *struct { + // 云联网(CCN)对象。 Ccn *CCN `json:"Ccn" name:"Ccn"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -627,8 +758,10 @@ func (r *CreateCcnResponse) FromJsonString(s string) error { type CreateCustomerGatewayRequest struct { *tchttp.BaseRequest + // 对端网关名称,可任意命名,但不得超过60个字符。 CustomerGatewayName *string `json:"CustomerGatewayName" name:"CustomerGatewayName"` + // 对端网关公网IP。 IpAddress *string `json:"IpAddress" name:"IpAddress"` } @@ -645,9 +778,11 @@ func (r *CreateCustomerGatewayRequest) FromJsonString(s string) error { type CreateCustomerGatewayResponse struct { *tchttp.BaseResponse Response *struct { + // 对端网关对象 CustomerGateway *CustomerGateway `json:"CustomerGateway" name:"CustomerGateway"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -663,8 +798,10 @@ func (r *CreateCustomerGatewayResponse) FromJsonString(s string) error { type CreateDefaultVpcRequest struct { *tchttp.BaseRequest + // 子网所在的可用区ID,不指定将随机选择可用区 Zone *string `json:"Zone" name:"Zone"` + // 是否强制返回默认VPC Force *bool `json:"Force" name:"Force"` } @@ -681,9 +818,11 @@ func (r *CreateDefaultVpcRequest) FromJsonString(s string) error { type CreateDefaultVpcResponse struct { *tchttp.BaseResponse Response *struct { + // 默认VPC和子网ID Vpc *DefaultVpcSubnet `json:"Vpc" name:"Vpc"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -699,8 +838,10 @@ func (r *CreateDefaultVpcResponse) FromJsonString(s string) error { type CreateDirectConnectGatewayCcnRoutesRequest struct { *tchttp.BaseRequest + // 专线网关ID,形如:dcg-prpqlmg1 DirectConnectGatewayId *string `json:"DirectConnectGatewayId" name:"DirectConnectGatewayId"` + // 需要连通的IDC网段列表 Routes []*DirectConnectGatewayCcnRoute `json:"Routes" name:"Routes" list` } @@ -717,7 +858,8 @@ func (r *CreateDirectConnectGatewayCcnRoutesRequest) FromJsonString(s string) er type CreateDirectConnectGatewayCcnRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -733,15 +875,19 @@ func (r *CreateDirectConnectGatewayCcnRoutesResponse) FromJsonString(s string) e type CreateDirectConnectGatewayRequest struct { *tchttp.BaseRequest + // 专线网关名称 DirectConnectGatewayName *string `json:"DirectConnectGatewayName" name:"DirectConnectGatewayName"` + // 关联网络类型,可选值: //
  • VPC - 私有网络
  • //
  • CCN - 云联网
  • NetworkType *string `json:"NetworkType" name:"NetworkType"` + //
  • NetworkType 为 VPC 时,这里传值为私有网络实例ID
  • //
  • NetworkType 为 NAT 时,这里传值为云联网实例ID
  • NetworkInstanceId *string `json:"NetworkInstanceId" name:"NetworkInstanceId"` + // 网关类型,可选值: //
  • NORMAL - (默认)标准型,注:云联网只支持标准型
  • //
  • NAT - NAT型
  • NAT类型支持网络地址转换配置,类型确定后不能修改;一个私有网络可以创建一个NAT类型的专线网关和一个非NAT类型的专线网关 @@ -760,9 +906,11 @@ func (r *CreateDirectConnectGatewayRequest) FromJsonString(s string) error { type CreateDirectConnectGatewayResponse struct { *tchttp.BaseResponse Response *struct { + // 专线网关对象。 DirectConnectGateway *DirectConnectGateway `json:"DirectConnectGateway" name:"DirectConnectGateway"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -776,21 +924,74 @@ func (r *CreateDirectConnectGatewayResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type CreateHaVipRequest struct { + *tchttp.BaseRequest + + // `HAVIP`所在私有网络`ID`。 + VpcId *string `json:"VpcId" name:"VpcId"` + + // `HAVIP`所在子网`ID`。 + SubnetId *string `json:"SubnetId" name:"SubnetId"` + + // `HAVIP`名称。 + HaVipName *string `json:"HaVipName" name:"HaVipName"` + + // 指定虚拟IP地址,必须在`VPC`网段内且未被占用。不指定则自动分配。 + Vip *string `json:"Vip" name:"Vip"` +} + +func (r *CreateHaVipRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *CreateHaVipRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateHaVipResponse struct { + *tchttp.BaseResponse + Response *struct { + + // `HAVIP`对象。 + HaVip *HaVip `json:"HaVip" name:"HaVip"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateHaVipResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *CreateHaVipResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type CreateNetworkInterfaceRequest struct { *tchttp.BaseRequest + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 VpcId *string `json:"VpcId" name:"VpcId"` + // 弹性网卡名称,最大长度不能超过60个字节。 NetworkInterfaceName *string `json:"NetworkInterfaceName" name:"NetworkInterfaceName"` + // 弹性网卡所在的子网实例ID,例如:subnet-0ap8nwca。 SubnetId *string `json:"SubnetId" name:"SubnetId"` + // 弹性网卡描述,可任意命名,但不得超过60个字符。 NetworkInterfaceDescription *string `json:"NetworkInterfaceDescription" name:"NetworkInterfaceDescription"` - // 新申请的内网IP地址个数。 + + // 新申请的内网IP地址个数,内网IP地址个数总和不能超过配数。 SecondaryPrivateIpAddressCount *uint64 `json:"SecondaryPrivateIpAddressCount" name:"SecondaryPrivateIpAddressCount"` + // 指定绑定的安全组,例如:['sg-1dd51d']。 SecurityGroupIds []*string `json:"SecurityGroupIds" name:"SecurityGroupIds" list` - // 指定内网IP信息。 + + // 指定的内网IP信息,单次最多指定10个。 PrivateIpAddresses []*PrivateIpAddressSpecification `json:"PrivateIpAddresses" name:"PrivateIpAddresses" list` } @@ -806,9 +1007,11 @@ func (r *CreateNetworkInterfaceRequest) FromJsonString(s string) error { type CreateNetworkInterfaceResponse struct { *tchttp.BaseResponse Response *struct { + // 弹性网卡实例。 NetworkInterface *NetworkInterface `json:"NetworkInterface" name:"NetworkInterface"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -824,8 +1027,10 @@ func (r *CreateNetworkInterfaceResponse) FromJsonString(s string) error { type CreateRouteTableRequest struct { *tchttp.BaseRequest + // 待操作的VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 VpcId *string `json:"VpcId" name:"VpcId"` + // 路由表名称,最大长度不能超过60个字节。 RouteTableName *string `json:"RouteTableName" name:"RouteTableName"` } @@ -842,9 +1047,11 @@ func (r *CreateRouteTableRequest) FromJsonString(s string) error { type CreateRouteTableResponse struct { *tchttp.BaseResponse Response *struct { + // 路由表对象。 RouteTable *RouteTable `json:"RouteTable" name:"RouteTable"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -860,8 +1067,10 @@ func (r *CreateRouteTableResponse) FromJsonString(s string) error { type CreateRoutesRequest struct { *tchttp.BaseRequest + // 路由表实例ID。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 路由策略对象。 Routes []*Route `json:"Routes" name:"Routes" list` } @@ -878,7 +1087,8 @@ func (r *CreateRoutesRequest) FromJsonString(s string) error { type CreateRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -894,8 +1104,10 @@ func (r *CreateRoutesResponse) FromJsonString(s string) error { type CreateSecurityGroupPoliciesRequest struct { *tchttp.BaseRequest + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` + // 安全组规则集合。 SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet" name:"SecurityGroupPolicySet"` } @@ -912,7 +1124,8 @@ func (r *CreateSecurityGroupPoliciesRequest) FromJsonString(s string) error { type CreateSecurityGroupPoliciesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -928,10 +1141,13 @@ func (r *CreateSecurityGroupPoliciesResponse) FromJsonString(s string) error { type CreateSecurityGroupRequest struct { *tchttp.BaseRequest + // 安全组名称,可任意命名,但不得超过60个字符。 GroupName *string `json:"GroupName" name:"GroupName"` + // 安全组备注,最多100个字符。 GroupDescription *string `json:"GroupDescription" name:"GroupDescription"` + // 项目id,默认0。可在qcloud控制台项目管理页面查询到。 ProjectId *string `json:"ProjectId" name:"ProjectId"` } @@ -948,9 +1164,11 @@ func (r *CreateSecurityGroupRequest) FromJsonString(s string) error { type CreateSecurityGroupResponse struct { *tchttp.BaseResponse Response *struct { + // 安全组对象。 SecurityGroup *SecurityGroup `json:"SecurityGroup" name:"SecurityGroup"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -966,8 +1184,10 @@ func (r *CreateSecurityGroupResponse) FromJsonString(s string) error { type CreateServiceTemplateGroupRequest struct { *tchttp.BaseRequest + // 协议端口模板集合名称 ServiceTemplateGroupName *string `json:"ServiceTemplateGroupName" name:"ServiceTemplateGroupName"` + // 协议端口模板实例ID,例如:ppm-4dw6agho。 ServiceTemplateIds []*string `json:"ServiceTemplateIds" name:"ServiceTemplateIds" list` } @@ -984,9 +1204,11 @@ func (r *CreateServiceTemplateGroupRequest) FromJsonString(s string) error { type CreateServiceTemplateGroupResponse struct { *tchttp.BaseResponse Response *struct { + // 协议端口模板集合对象。 ServiceTemplateGroup *ServiceTemplateGroup `json:"ServiceTemplateGroup" name:"ServiceTemplateGroup"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1002,8 +1224,10 @@ func (r *CreateServiceTemplateGroupResponse) FromJsonString(s string) error { type CreateServiceTemplateRequest struct { *tchttp.BaseRequest + // 协议端口模板名称 ServiceTemplateName *string `json:"ServiceTemplateName" name:"ServiceTemplateName"` + // 支持单个端口、多个端口、连续端口及所有端口,协议支持:TCP、UDP、ICMP、GRE 协议。 Services []*string `json:"Services" name:"Services" list` } @@ -1020,9 +1244,11 @@ func (r *CreateServiceTemplateRequest) FromJsonString(s string) error { type CreateServiceTemplateResponse struct { *tchttp.BaseResponse Response *struct { + // 协议端口模板对象。 ServiceTemplate *ServiceTemplate `json:"ServiceTemplate" name:"ServiceTemplate"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1038,12 +1264,16 @@ func (r *CreateServiceTemplateResponse) FromJsonString(s string) error { type CreateSubnetRequest struct { *tchttp.BaseRequest + // 待操作的VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 VpcId *string `json:"VpcId" name:"VpcId"` + // 子网名称,最大长度不能超过60个字节。 SubnetName *string `json:"SubnetName" name:"SubnetName"` + // 子网网段,子网网段必须在VPC网段内,相同VPC内子网网段不能重叠。 CidrBlock *string `json:"CidrBlock" name:"CidrBlock"` + // 子网所在的可用区ID,不同子网选择不同可用区可以做跨可用区灾备。 Zone *string `json:"Zone" name:"Zone"` } @@ -1060,9 +1290,11 @@ func (r *CreateSubnetRequest) FromJsonString(s string) error { type CreateSubnetResponse struct { *tchttp.BaseResponse Response *struct { + // 子网对象。 Subnet *Subnet `json:"Subnet" name:"Subnet"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1078,14 +1310,19 @@ func (r *CreateSubnetResponse) FromJsonString(s string) error { type CreateVpcRequest struct { *tchttp.BaseRequest + // vpc名称,最大长度不能超过60个字节。 VpcName *string `json:"VpcName" name:"VpcName"` + // vpc的cidr,只能为10.0.0.0/16,172.16.0.0/12,192.168.0.0/16这三个内网网段内。 CidrBlock *string `json:"CidrBlock" name:"CidrBlock"` + // 是否开启组播。true: 开启, false: 不开启。 EnableMulticast *string `json:"EnableMulticast" name:"EnableMulticast"` + // DNS地址,最多支持4个 DnsServers []*string `json:"DnsServers" name:"DnsServers" list` + // 域名 DomainName *string `json:"DomainName" name:"DomainName"` } @@ -1102,9 +1339,11 @@ func (r *CreateVpcRequest) FromJsonString(s string) error { type CreateVpcResponse struct { *tchttp.BaseResponse Response *struct { + // Vpc对象。 Vpc *Vpc `json:"Vpc" name:"Vpc"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1120,20 +1359,28 @@ func (r *CreateVpcResponse) FromJsonString(s string) error { type CreateVpnConnectionRequest struct { *tchttp.BaseRequest + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 VpcId *string `json:"VpcId" name:"VpcId"` + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // 对端网关ID,例如:cgw-2wqq41m9,可通过DescribeCustomerGateways接口查询对端网关。 CustomerGatewayId *string `json:"CustomerGatewayId" name:"CustomerGatewayId"` + // 通道名称,可任意命名,但不得超过60个字符。 VpnConnectionName *string `json:"VpnConnectionName" name:"VpnConnectionName"` + // 预共享密钥。 PreShareKey *string `json:"PreShareKey" name:"PreShareKey"` + // SPD策略组,例如:{"10.0.0.5/24":["172.123.10.5/16"]},10.0.0.5/24是vpc内网段172.123.10.5/16是IDC网段。用户指定VPC内哪些网段可以和您IDC中哪些网段通信。 SecurityPolicyDatabases []*SecurityPolicyDatabase `json:"SecurityPolicyDatabases" name:"SecurityPolicyDatabases" list` + // IKE配置(Internet Key Exchange,因特网密钥交换),IKE具有一套自保护机制,用户配置网络安全协议 IKEOptionsSpecification *IKEOptionsSpecification `json:"IKEOptionsSpecification" name:"IKEOptionsSpecification"` + // IPSec配置,腾讯云提供IPSec安全会话设置 IPSECOptionsSpecification *IPSECOptionsSpecification `json:"IPSECOptionsSpecification" name:"IPSECOptionsSpecification"` } @@ -1150,9 +1397,11 @@ func (r *CreateVpnConnectionRequest) FromJsonString(s string) error { type CreateVpnConnectionResponse struct { *tchttp.BaseResponse Response *struct { + // 通道实例对象。 VpnConnection *VpnConnection `json:"VpnConnection" name:"VpnConnection"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1168,16 +1417,22 @@ func (r *CreateVpnConnectionResponse) FromJsonString(s string) error { type CreateVpnGatewayRequest struct { *tchttp.BaseRequest + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 VpcId *string `json:"VpcId" name:"VpcId"` + // VPN网关名称,最大长度不能超过60个字节。 VpnGatewayName *string `json:"VpnGatewayName" name:"VpnGatewayName"` + // 公网带宽设置。可选带宽规格:5, 10, 20, 50, 100;单位:Mbps InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut" name:"InternetMaxBandwidthOut"` + // VPN网关计费模式,PREPAID:表示预付费,即包年包月,POSTPAID_BY_HOUR:表示后付费,即按量计费。默认:POSTPAID_BY_HOUR,如果指定预付费模式,参数InstanceChargePrepaid必填。 InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` + // 可用区,如:ap-guangzhou-2。 Zone *string `json:"Zone" name:"Zone"` } @@ -1194,9 +1449,11 @@ func (r *CreateVpnGatewayRequest) FromJsonString(s string) error { type CreateVpnGatewayResponse struct { *tchttp.BaseResponse Response *struct { + // VPN网关对象 VpnGateway *VpnGateway `json:"VpnGateway" name:"VpnGateway"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1211,34 +1468,44 @@ func (r *CreateVpnGatewayResponse) FromJsonString(s string) error { } type CustomerGateway struct { + // 用户网关唯一ID CustomerGatewayId *string `json:"CustomerGatewayId" name:"CustomerGatewayId"` + // 网关名称 CustomerGatewayName *string `json:"CustomerGatewayName" name:"CustomerGatewayName"` + // 公网地址 IpAddress *string `json:"IpAddress" name:"IpAddress"` + // 创建时间 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` } type CustomerGatewayVendor struct { + // 平台。 Platform *string `json:"Platform" name:"Platform"` + // 软件版本。 SoftwareVersion *string `json:"SoftwareVersion" name:"SoftwareVersion"` + // 供应商名称。 VendorName *string `json:"VendorName" name:"VendorName"` } type DefaultVpcSubnet struct { + // 默认VpcId VpcId *string `json:"VpcId" name:"VpcId"` + // 默认SubnetId SubnetId *string `json:"SubnetId" name:"SubnetId"` } type DeleteAddressTemplateGroupRequest struct { *tchttp.BaseRequest + // IP地址模板集合实例ID,例如:ipmg-90cex8mq。 AddressTemplateGroupId *string `json:"AddressTemplateGroupId" name:"AddressTemplateGroupId"` } @@ -1255,7 +1522,8 @@ func (r *DeleteAddressTemplateGroupRequest) FromJsonString(s string) error { type DeleteAddressTemplateGroupResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1271,6 +1539,7 @@ func (r *DeleteAddressTemplateGroupResponse) FromJsonString(s string) error { type DeleteAddressTemplateRequest struct { *tchttp.BaseRequest + // IP地址模板实例ID,例如:ipm-09o5m8kc。 AddressTemplateId *string `json:"AddressTemplateId" name:"AddressTemplateId"` } @@ -1287,7 +1556,8 @@ func (r *DeleteAddressTemplateRequest) FromJsonString(s string) error { type DeleteAddressTemplateResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1303,6 +1573,7 @@ func (r *DeleteAddressTemplateResponse) FromJsonString(s string) error { type DeleteBandwidthPackageRequest struct { *tchttp.BaseRequest + // 待删除带宽包bwpId BandwidthPackageId *string `json:"BandwidthPackageId" name:"BandwidthPackageId"` } @@ -1319,7 +1590,8 @@ func (r *DeleteBandwidthPackageRequest) FromJsonString(s string) error { type DeleteBandwidthPackageResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1335,6 +1607,7 @@ func (r *DeleteBandwidthPackageResponse) FromJsonString(s string) error { type DeleteCcnRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` } @@ -1351,7 +1624,8 @@ func (r *DeleteCcnRequest) FromJsonString(s string) error { type DeleteCcnResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1367,6 +1641,7 @@ func (r *DeleteCcnResponse) FromJsonString(s string) error { type DeleteCustomerGatewayRequest struct { *tchttp.BaseRequest + // 对端网关ID,例如:cgw-2wqq41m9,可通过DescribeCustomerGateways接口查询对端网关。 CustomerGatewayId *string `json:"CustomerGatewayId" name:"CustomerGatewayId"` } @@ -1383,7 +1658,8 @@ func (r *DeleteCustomerGatewayRequest) FromJsonString(s string) error { type DeleteCustomerGatewayResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1399,8 +1675,10 @@ func (r *DeleteCustomerGatewayResponse) FromJsonString(s string) error { type DeleteDirectConnectGatewayCcnRoutesRequest struct { *tchttp.BaseRequest + // 专线网关ID,形如:dcg-prpqlmg1 DirectConnectGatewayId *string `json:"DirectConnectGatewayId" name:"DirectConnectGatewayId"` + // 路由ID。形如:ccnr-f49l6u0z。 RouteIds []*string `json:"RouteIds" name:"RouteIds" list` } @@ -1417,7 +1695,8 @@ func (r *DeleteDirectConnectGatewayCcnRoutesRequest) FromJsonString(s string) er type DeleteDirectConnectGatewayCcnRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1431,8 +1710,77 @@ func (r *DeleteDirectConnectGatewayCcnRoutesResponse) FromJsonString(s string) e return json.Unmarshal([]byte(s), &r) } +type DeleteDirectConnectGatewayRequest struct { + *tchttp.BaseRequest + + // 专线网关唯一`ID`,形如:`dcg-9o233uri`。 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId" name:"DirectConnectGatewayId"` +} + +func (r *DeleteDirectConnectGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteDirectConnectGatewayRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteDirectConnectGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteDirectConnectGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteDirectConnectGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteHaVipRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。 + HaVipId *string `json:"HaVipId" name:"HaVipId"` +} + +func (r *DeleteHaVipRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteHaVipRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteHaVipResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteHaVipResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DeleteHaVipResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DeleteNetworkInterfaceRequest struct { *tchttp.BaseRequest + // 弹性网卡实例ID,例如:eni-m6dyj72l。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` } @@ -1449,7 +1797,8 @@ func (r *DeleteNetworkInterfaceRequest) FromJsonString(s string) error { type DeleteNetworkInterfaceResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1465,6 +1814,7 @@ func (r *DeleteNetworkInterfaceResponse) FromJsonString(s string) error { type DeleteRouteTableRequest struct { *tchttp.BaseRequest + // 路由表实例ID,例如:rtb-azd4dt1c。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` } @@ -1481,7 +1831,8 @@ func (r *DeleteRouteTableRequest) FromJsonString(s string) error { type DeleteRouteTableResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1497,8 +1848,10 @@ func (r *DeleteRouteTableResponse) FromJsonString(s string) error { type DeleteRoutesRequest struct { *tchttp.BaseRequest + // 路由表实例ID。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 路由策略对象。 Routes []*Route `json:"Routes" name:"Routes" list` } @@ -1515,7 +1868,8 @@ func (r *DeleteRoutesRequest) FromJsonString(s string) error { type DeleteRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1531,8 +1885,10 @@ func (r *DeleteRoutesResponse) FromJsonString(s string) error { type DeleteSecurityGroupPoliciesRequest struct { *tchttp.BaseRequest + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` + // 安全组规则集合。一个请求中只能删除单个方向的一条或多条规则。支持指定索引(PolicyIndex) 匹配删除和安全组规则匹配删除两种方式,一个请求中只能使用一种匹配方式。 SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet" name:"SecurityGroupPolicySet"` } @@ -1549,7 +1905,8 @@ func (r *DeleteSecurityGroupPoliciesRequest) FromJsonString(s string) error { type DeleteSecurityGroupPoliciesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1565,6 +1922,7 @@ func (r *DeleteSecurityGroupPoliciesResponse) FromJsonString(s string) error { type DeleteSecurityGroupRequest struct { *tchttp.BaseRequest + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` } @@ -1581,7 +1939,8 @@ func (r *DeleteSecurityGroupRequest) FromJsonString(s string) error { type DeleteSecurityGroupResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1597,6 +1956,7 @@ func (r *DeleteSecurityGroupResponse) FromJsonString(s string) error { type DeleteServiceTemplateGroupRequest struct { *tchttp.BaseRequest + // 协议端口模板集合实例ID,例如:ppmg-n17uxvve。 ServiceTemplateGroupId *string `json:"ServiceTemplateGroupId" name:"ServiceTemplateGroupId"` } @@ -1613,7 +1973,8 @@ func (r *DeleteServiceTemplateGroupRequest) FromJsonString(s string) error { type DeleteServiceTemplateGroupResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1629,6 +1990,7 @@ func (r *DeleteServiceTemplateGroupResponse) FromJsonString(s string) error { type DeleteServiceTemplateRequest struct { *tchttp.BaseRequest + // 协议端口模板实例ID,例如:ppm-e6dy460g。 ServiceTemplateId *string `json:"ServiceTemplateId" name:"ServiceTemplateId"` } @@ -1645,7 +2007,8 @@ func (r *DeleteServiceTemplateRequest) FromJsonString(s string) error { type DeleteServiceTemplateResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1661,6 +2024,7 @@ func (r *DeleteServiceTemplateResponse) FromJsonString(s string) error { type DeleteSubnetRequest struct { *tchttp.BaseRequest + // 子网实例ID。可通过DescribeSubnets接口返回值中的SubnetId获取。 SubnetId *string `json:"SubnetId" name:"SubnetId"` } @@ -1677,7 +2041,8 @@ func (r *DeleteSubnetRequest) FromJsonString(s string) error { type DeleteSubnetResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1693,6 +2058,7 @@ func (r *DeleteSubnetResponse) FromJsonString(s string) error { type DeleteVpcRequest struct { *tchttp.BaseRequest + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 VpcId *string `json:"VpcId" name:"VpcId"` } @@ -1709,7 +2075,8 @@ func (r *DeleteVpcRequest) FromJsonString(s string) error { type DeleteVpcResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1725,8 +2092,10 @@ func (r *DeleteVpcResponse) FromJsonString(s string) error { type DeleteVpnConnectionRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // VPN通道实例ID。形如:vpnx-f49l6u0z。 VpnConnectionId *string `json:"VpnConnectionId" name:"VpnConnectionId"` } @@ -1743,7 +2112,8 @@ func (r *DeleteVpnConnectionRequest) FromJsonString(s string) error { type DeleteVpnConnectionResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1759,6 +2129,7 @@ func (r *DeleteVpnConnectionResponse) FromJsonString(s string) error { type DeleteVpnGatewayRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` } @@ -1775,7 +2146,8 @@ func (r *DeleteVpnGatewayRequest) FromJsonString(s string) error { type DeleteVpnGatewayResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1805,9 +2177,11 @@ func (r *DescribeAccountAttributesRequest) FromJsonString(s string) error { type DescribeAccountAttributesResponse struct { *tchttp.BaseResponse Response *struct { + // 用户账号属性对象 AccountAttributeSet []*AccountAttribute `json:"AccountAttributeSet" name:"AccountAttributeSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1837,9 +2211,11 @@ func (r *DescribeAddressQuotaRequest) FromJsonString(s string) error { type DescribeAddressQuotaResponse struct { *tchttp.BaseResponse Response *struct { + // 账户 EIP 配额信息。 QuotaSet []*Quota `json:"QuotaSet" name:"QuotaSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1855,12 +2231,15 @@ func (r *DescribeAddressQuotaResponse) FromJsonString(s string) error { type DescribeAddressTemplateGroupsRequest struct { *tchttp.BaseRequest + // 过滤条件。 //
  • address-template-group-name - String - (过滤条件)IP地址模板集合名称。
  • //
  • address-template-group-id - String - (过滤条件)IP地址模板实集合例ID,例如:ipmg-mdunqeb6。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。 Offset *string `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。 Limit *string `json:"Limit" name:"Limit"` } @@ -1877,11 +2256,14 @@ func (r *DescribeAddressTemplateGroupsRequest) FromJsonString(s string) error { type DescribeAddressTemplateGroupsResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // IP地址模板。 AddressTemplateGroupSet []*AddressTemplateGroup `json:"AddressTemplateGroupSet" name:"AddressTemplateGroupSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1897,12 +2279,15 @@ func (r *DescribeAddressTemplateGroupsResponse) FromJsonString(s string) error { type DescribeAddressTemplatesRequest struct { *tchttp.BaseRequest + // 过滤条件。 //
  • address-template-name - String - (过滤条件)IP地址模板名称。
  • //
  • address-template-id - String - (过滤条件)IP地址模板实例ID,例如:ipm-mdunqeb6。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。 Offset *string `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。 Limit *string `json:"Limit" name:"Limit"` } @@ -1919,11 +2304,14 @@ func (r *DescribeAddressTemplatesRequest) FromJsonString(s string) error { type DescribeAddressTemplatesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // IP地址模版。 AddressTemplateSet []*AddressTemplate `json:"AddressTemplateSet" name:"AddressTemplateSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -1939,8 +2327,10 @@ func (r *DescribeAddressTemplatesResponse) FromJsonString(s string) error { type DescribeAddressesRequest struct { *tchttp.BaseRequest + // 标识 EIP 的唯一 ID 列表。EIP 唯一 ID 形如:`eip-11112222`。参数不支持同时指定`AddressIds`和`Filters`。 AddressIds []*string `json:"AddressIds" name:"AddressIds" list` + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`AddressIds`和`Filters`。详细的过滤条件如下: //
  • address-id - String - 是否必填:否 - (过滤条件)按照 EIP 的唯一 ID 过滤。EIP 唯一 ID 形如:eip-11112222。
  • //
  • address-name - String - 是否必填:否 - (过滤条件)按照 EIP 名称过滤。不支持模糊过滤。
  • @@ -1951,8 +2341,10 @@ type DescribeAddressesRequest struct { //
  • network-interface-id - String - 是否必填:否 - (过滤条件)按照 EIP 绑定的弹性网卡 ID 过滤。弹性网卡 ID 形如:eni-11112222。
  • //
  • is-arrears - String - 是否必填:否 - (过滤条件)按照 EIP 是否欠费进行过滤。(TRUE:EIP 处于欠费状态|FALSE:EIP 费用状态正常)
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 Offset *int64 `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 Limit *int64 `json:"Limit" name:"Limit"` } @@ -1969,11 +2361,14 @@ func (r *DescribeAddressesRequest) FromJsonString(s string) error { type DescribeAddressesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的 EIP 数量。 TotalCount *int64 `json:"TotalCount" name:"TotalCount"` + // EIP 详细信息列表。 AddressSet []*Address `json:"AddressSet" name:"AddressSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2003,9 +2398,11 @@ func (r *DescribeBandwidthPackageQuotaRequest) FromJsonString(s string) error { type DescribeBandwidthPackageQuotaResponse struct { *tchttp.BaseResponse Response *struct { + // 带宽包配额数据结构 QuotaSet []*Quota `json:"QuotaSet" name:"QuotaSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2021,8 +2418,10 @@ func (r *DescribeBandwidthPackageQuotaResponse) FromJsonString(s string) error { type DescribeBandwidthPackagesRequest struct { *tchttp.BaseRequest + // 带宽包Id,支持批量 BandwidthPackageIds []*string `json:"BandwidthPackageIds" name:"BandwidthPackageIds" list` + // 每次请求的`Filters`的上限为10。参数不支持同时指定`BandwidthPackageIds`和`Filters`。详细的过滤条件如下: //
  • bandwidth-package_id - String - 是否必填:否 - (过滤条件)按照带宽包的唯一标识ID过滤。
  • //
  • bandwidth-package-name - String - 是否必填:否 - (过滤条件)按照 带宽包名称过滤。不支持模糊过滤。
  • @@ -2032,8 +2431,10 @@ type DescribeBandwidthPackagesRequest struct { //
  • resource.resource-id - String - 是否必填:否 - (过滤条件)按照带宽包资源Id过滤。资源Id形如'eip-xxxx','lb-xxxx'
  • //
  • resource.address-ip - String - 是否必填:否 - (过滤条件)按照带宽包资源Ip过滤。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 查询带宽包偏移量 Offset *uint64 `json:"Offset" name:"Offset"` + // 查询带宽包数量限制 Limit *uint64 `json:"Limit" name:"Limit"` } @@ -2050,11 +2451,14 @@ func (r *DescribeBandwidthPackagesRequest) FromJsonString(s string) error { type DescribeBandwidthPackagesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的带宽包数量 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // 描述带宽包详细信息 BandwidthPackageSet []*BandwidthPackage `json:"BandwidthPackageSet" name:"BandwidthPackageSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2070,16 +2474,20 @@ func (r *DescribeBandwidthPackagesResponse) FromJsonString(s string) error { type DescribeCcnAttachedInstancesRequest struct { *tchttp.BaseRequest + // 偏移量 Offset *uint64 `json:"Offset" name:"Offset"` + // 返回数量 Limit *uint64 `json:"Limit" name:"Limit"` + // 过滤条件: //
  • ccn-id - String -(过滤条件)CCN实例ID。
  • //
  • instance-type - String -(过滤条件)关联实例类型。
  • //
  • instance-region - String -(过滤条件)关联实例所属地域。
  • //
  • instance-id - String -(过滤条件)关联实例实例ID。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 云联网实例ID CcnId *string `json:"CcnId" name:"CcnId"` } @@ -2096,11 +2504,14 @@ func (r *DescribeCcnAttachedInstancesRequest) FromJsonString(s string) error { type DescribeCcnAttachedInstancesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的对象数。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // 关联实例列表。 InstanceSet []*CcnAttachedInstance `json:"InstanceSet" name:"InstanceSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2116,6 +2527,7 @@ func (r *DescribeCcnAttachedInstancesResponse) FromJsonString(s string) error { type DescribeCcnRegionBandwidthLimitsRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` } @@ -2132,9 +2544,11 @@ func (r *DescribeCcnRegionBandwidthLimitsRequest) FromJsonString(s string) error type DescribeCcnRegionBandwidthLimitsResponse struct { *tchttp.BaseResponse Response *struct { + // 云联网(CCN)各地域出带宽上限 CcnRegionBandwidthLimitSet []*CcnRegionBandwidthLimit `json:"CcnRegionBandwidthLimitSet" name:"CcnRegionBandwidthLimitSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2150,10 +2564,13 @@ func (r *DescribeCcnRegionBandwidthLimitsResponse) FromJsonString(s string) erro type DescribeCcnRoutesRequest struct { *tchttp.BaseRequest + // CCN实例ID,形如:ccn-gree226l。 CcnId *string `json:"CcnId" name:"CcnId"` + // CCN路由策略唯一ID。形如:ccnr-f49l6u0z。 RouteIds []*string `json:"RouteIds" name:"RouteIds" list` + // 过滤条件,参数不支持同时指定RouteIds和Filters。 //
  • ccn-id - String -(过滤条件)CCN实例ID。
  • //
  • route-id - String -(过滤条件)路由策略ID。
  • @@ -2162,8 +2579,10 @@ type DescribeCcnRoutesRequest struct { //
  • instance-region - String -(过滤条件)下一跳所属地域。
  • //
  • instance-id - String -(过滤条件)下一跳实例ID。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量 Offset *uint64 `json:"Offset" name:"Offset"` + // 返回数量 Limit *uint64 `json:"Limit" name:"Limit"` } @@ -2180,11 +2599,14 @@ func (r *DescribeCcnRoutesRequest) FromJsonString(s string) error { type DescribeCcnRoutesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的对象数。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // CCN路由策略对象。 RouteSet []*CcnRoute `json:"RouteSet" name:"RouteSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2200,16 +2622,20 @@ func (r *DescribeCcnRoutesResponse) FromJsonString(s string) error { type DescribeCcnsRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定CcnIds和Filters。 CcnIds []*string `json:"CcnIds" name:"CcnIds" list` + // 过滤条件,参数不支持同时指定CcnIds和Filters。 //
  • ccn-id - String - (过滤条件)CCN唯一ID,形如:vpc-f49l6u0z。
  • //
  • ccn-name - String - (过滤条件)CCN名称。
  • //
  • ccn-description - String - (过滤条件)CCN描述。
  • //
  • state - String - (过滤条件)实例状态, 'ISOLATED': 隔离中(欠费停服),'AVAILABLE':运行中。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量 Offset *uint64 `json:"Offset" name:"Offset"` + // 返回数量 Limit *uint64 `json:"Limit" name:"Limit"` } @@ -2226,11 +2652,14 @@ func (r *DescribeCcnsRequest) FromJsonString(s string) error { type DescribeCcnsResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的对象数。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // CCN对象。 CcnSet []*CCN `json:"CcnSet" name:"CcnSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2246,12 +2675,15 @@ func (r *DescribeCcnsResponse) FromJsonString(s string) error { type DescribeClassicLinkInstancesRequest struct { *tchttp.BaseRequest + // 过滤条件。 //
  • vpc-id - String - (过滤条件)VPC实例ID。
  • //
  • vm-ip - String - (过滤条件)基础网络云主机IP。
  • Filters []*FilterObject `json:"Filters" name:"Filters" list` + // 偏移量 Offset *string `json:"Offset" name:"Offset"` + // 返回数量 Limit *string `json:"Limit" name:"Limit"` } @@ -2268,11 +2700,14 @@ func (r *DescribeClassicLinkInstancesRequest) FromJsonString(s string) error { type DescribeClassicLinkInstancesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // 私有网络和基础网络互通设备。 ClassicLinkInstanceSet []*ClassicLinkInstance `json:"ClassicLinkInstanceSet" name:"ClassicLinkInstanceSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2302,9 +2737,11 @@ func (r *DescribeCustomerGatewayVendorsRequest) FromJsonString(s string) error { type DescribeCustomerGatewayVendorsResponse struct { *tchttp.BaseResponse Response *struct { + // 对端网关厂商信息对象。 CustomerGatewayVendorSet []*CustomerGatewayVendor `json:"CustomerGatewayVendorSet" name:"CustomerGatewayVendorSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2320,12 +2757,16 @@ func (r *DescribeCustomerGatewayVendorsResponse) FromJsonString(s string) error type DescribeCustomerGatewaysRequest struct { *tchttp.BaseRequest + // 对端网关ID,例如:cgw-2wqq41m9。每次请求的实例的上限为100。参数不支持同时指定CustomerGatewayIds和Filters。 CustomerGatewayIds []*string `json:"CustomerGatewayIds" name:"CustomerGatewayIds" list` + // 过滤条件,详见下表:实例过滤条件表。每次请求的Filters的上限为10,Filter.Values的上限为5。参数不支持同时指定CustomerGatewayIds和Filters。 Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API 简介中的相关小节。 Offset *uint64 `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。 Limit *uint64 `json:"Limit" name:"Limit"` } @@ -2342,11 +2783,14 @@ func (r *DescribeCustomerGatewaysRequest) FromJsonString(s string) error { type DescribeCustomerGatewaysResponse struct { *tchttp.BaseResponse Response *struct { + // 对端网关对象列表 CustomerGatewaySet []*CustomerGateway `json:"CustomerGatewaySet" name:"CustomerGatewaySet" list` + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2362,8 +2806,20 @@ func (r *DescribeCustomerGatewaysResponse) FromJsonString(s string) error { type DescribeDirectConnectGatewayCcnRoutesRequest struct { *tchttp.BaseRequest - // 专线网关ID,形如:dcg-prpqlmg1 + + // 专线网关ID,形如:`dcg-prpqlmg1`。 DirectConnectGatewayId *string `json:"DirectConnectGatewayId" name:"DirectConnectGatewayId"` + + // 云联网路由学习类型,可选值: + //
  • `BGP` - 自动学习。
  • + //
  • `STATIC` - 静态,即用户配置,默认值。
  • + CcnRouteType *string `json:"CcnRouteType" name:"CcnRouteType"` + + // 偏移量。 + Offset *uint64 `json:"Offset" name:"Offset"` + + // 返回数量。 + Limit *uint64 `json:"Limit" name:"Limit"` } func (r *DescribeDirectConnectGatewayCcnRoutesRequest) ToJsonString() string { @@ -2378,11 +2834,14 @@ func (r *DescribeDirectConnectGatewayCcnRoutesRequest) FromJsonString(s string) type DescribeDirectConnectGatewayCcnRoutesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的对象数。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // 云联网路由(IDC网段)列表。 RouteSet []*DirectConnectGatewayCcnRoute `json:"RouteSet" name:"RouteSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2396,10 +2855,122 @@ func (r *DescribeDirectConnectGatewayCcnRoutesResponse) FromJsonString(s string) return json.Unmarshal([]byte(s), &r) } +type DescribeDirectConnectGatewaysRequest struct { + *tchttp.BaseRequest + + // 专线网关唯一`ID`,形如:`dcg-9o233uri`。 + DirectConnectGatewayIds []*string `json:"DirectConnectGatewayIds" name:"DirectConnectGatewayIds" list` + + // 过滤条件,参数不支持同时指定`DirectConnectGatewayIds`和`Filters`。 + //
  • direct-connect-gateway-id - String - 专线网关唯一`ID`,形如:`dcg-9o233uri`。
  • + //
  • direct-connect-gateway-name - String - 专线网关名称,默认模糊查询。
  • + //
  • direct-connect-gateway-ip - String - 专线网关`IP`。
  • + //
  • gateway-type - String - 网关类型,可选值:`NORMAL`(普通型)、`NAT`(NAT型)。
  • + //
  • network-type- String - 网络类型,可选值:`VPC`(私有网络类型)、`CCN`(云联网类型)。
  • + //
  • ccn-id - String - 专线网关所在私有网络`ID`。
  • + //
  • vpc-id - String - 专线网关所在云联网`ID`。
  • + Filters []*Filter `json:"Filters" name:"Filters" list` + + // 偏移量。 + Offset *uint64 `json:"Offset" name:"Offset"` + + // 返回数量。 + Limit *uint64 `json:"Limit" name:"Limit"` +} + +func (r *DescribeDirectConnectGatewaysRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeDirectConnectGatewaysRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDirectConnectGatewaysResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + + // 专线网关对象数组。 + DirectConnectGatewaySet []*DirectConnectGateway `json:"DirectConnectGatewaySet" name:"DirectConnectGatewaySet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDirectConnectGatewaysResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeDirectConnectGatewaysResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeHaVipsRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。 + HaVipIds []*string `json:"HaVipIds" name:"HaVipIds" list` + + // 过滤条件,参数不支持同时指定`HaVipIds`和`Filters`。 + //
  • havip-id - String - `HAVIP`唯一`ID`,形如:`havip-9o233uri`。
  • + //
  • havip-name - String - `HAVIP`名称。
  • + //
  • vpc-id - String - `HAVIP`所在私有网络`ID`。
  • + //
  • subnet-id - String - `HAVIP`所在子网`ID`。
  • + //
  • address-ip - String - `HAVIP`绑定的弹性公网`IP`。
  • + Filters []*Filter `json:"Filters" name:"Filters" list` + + // 偏移量 + Offset *uint64 `json:"Offset" name:"Offset"` + + // 返回数量 + Limit *uint64 `json:"Limit" name:"Limit"` +} + +func (r *DescribeHaVipsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeHaVipsRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeHaVipsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + + // `HAVIP`对象数组。 + HaVipSet []*HaVip `json:"HaVipSet" name:"HaVipSet" list` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeHaVipsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *DescribeHaVipsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DescribeNetworkInterfacesRequest struct { *tchttp.BaseRequest + // 弹性网卡实例ID查询。形如:eni-pxir56ns。每次请求的实例的上限为100。参数不支持同时指定NetworkInterfaceIds和Filters。 NetworkInterfaceIds []*string `json:"NetworkInterfaceIds" name:"NetworkInterfaceIds" list` + // 过滤条件,参数不支持同时指定NetworkInterfaceIds和Filters。 //
  • vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-f49l6u0z。
  • //
  • subnet-id - String - (过滤条件)所属子网实例ID,形如:subnet-f49l6u0z。
  • @@ -2409,8 +2980,10 @@ type DescribeNetworkInterfacesRequest struct { //
  • network-interface-name - String - (过滤条件)网卡实例名称。
  • //
  • network-interface-description - String - (过滤条件)网卡实例描述。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。 Offset *uint64 `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。 Limit *uint64 `json:"Limit" name:"Limit"` } @@ -2427,11 +3000,14 @@ func (r *DescribeNetworkInterfacesRequest) FromJsonString(s string) error { type DescribeNetworkInterfacesResponse struct { *tchttp.BaseResponse Response *struct { + // 实例详细信息列表。 NetworkInterfaceSet []*NetworkInterface `json:"NetworkInterfaceSet" name:"NetworkInterfaceSet" list` + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2447,8 +3023,10 @@ func (r *DescribeNetworkInterfacesResponse) FromJsonString(s string) error { type DescribeRouteConflictsRequest struct { *tchttp.BaseRequest + // 路由表实例ID,例如:rtb-azd4dt1c。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 要检查的与之冲突的目的端列表 DestinationCidrBlocks []*string `json:"DestinationCidrBlocks" name:"DestinationCidrBlocks" list` } @@ -2465,9 +3043,11 @@ func (r *DescribeRouteConflictsRequest) FromJsonString(s string) error { type DescribeRouteConflictsResponse struct { *tchttp.BaseResponse Response *struct { + // 路由策略冲突列表 RouteConflictSet []*RouteConflict `json:"RouteConflictSet" name:"RouteConflictSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2483,16 +3063,20 @@ func (r *DescribeRouteConflictsResponse) FromJsonString(s string) error { type DescribeRouteTablesRequest struct { *tchttp.BaseRequest + // 路由表实例ID,例如:rtb-azd4dt1c。 RouteTableIds []*string `json:"RouteTableIds" name:"RouteTableIds" list` + // 过滤条件,参数不支持同时指定RouteTableIds和Filters。 //
  • route-table-id - String - (过滤条件)路由表实例ID。
  • //
  • route-table-name - String - (过滤条件)路由表名称。
  • //
  • vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-f49l6u0z。
  • //
  • association.main - String - (过滤条件)是否主路由表。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量。 Offset *string `json:"Offset" name:"Offset"` + // 请求对象个数。 Limit *string `json:"Limit" name:"Limit"` } @@ -2509,11 +3093,14 @@ func (r *DescribeRouteTablesRequest) FromJsonString(s string) error { type DescribeRouteTablesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // 路由表对象。 RouteTableSet []*RouteTable `json:"RouteTableSet" name:"RouteTableSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2529,6 +3116,7 @@ func (r *DescribeRouteTablesResponse) FromJsonString(s string) error { type DescribeSecurityGroupAssociationStatisticsRequest struct { *tchttp.BaseRequest + // 安全实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 SecurityGroupIds []*string `json:"SecurityGroupIds" name:"SecurityGroupIds" list` } @@ -2545,9 +3133,11 @@ func (r *DescribeSecurityGroupAssociationStatisticsRequest) FromJsonString(s str type DescribeSecurityGroupAssociationStatisticsResponse struct { *tchttp.BaseResponse Response *struct { + // 安全组关联实例统计。 SecurityGroupAssociationStatisticsSet []*SecurityGroupAssociationStatistics `json:"SecurityGroupAssociationStatisticsSet" name:"SecurityGroupAssociationStatisticsSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2563,6 +3153,7 @@ func (r *DescribeSecurityGroupAssociationStatisticsResponse) FromJsonString(s st type DescribeSecurityGroupPoliciesRequest struct { *tchttp.BaseRequest + // 安全组实例ID,例如:sg-33ocnj9n,可通过DescribeSecurityGroups获取。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` } @@ -2579,9 +3170,11 @@ func (r *DescribeSecurityGroupPoliciesRequest) FromJsonString(s string) error { type DescribeSecurityGroupPoliciesResponse struct { *tchttp.BaseResponse Response *struct { + // 安全组规则集合。 SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet" name:"SecurityGroupPolicySet"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2597,14 +3190,18 @@ func (r *DescribeSecurityGroupPoliciesResponse) FromJsonString(s string) error { type DescribeSecurityGroupsRequest struct { *tchttp.BaseRequest + // 安全组实例ID,例如:sg-33ocnj9n,可通过DescribeSecurityGroups获取。每次请求的实例的上限为100。参数不支持同时指定SecurityGroupIds和Filters。 SecurityGroupIds []*string `json:"SecurityGroupIds" name:"SecurityGroupIds" list` + // 过滤条件,参数不支持同时指定SecurityGroupIds和Filters。 //
  • project-id - Integer - (过滤条件)项目id。
  • //
  • security-group-name - String - (过滤条件)安全组名称。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量。 Offset *string `json:"Offset" name:"Offset"` + // 返回数量。 Limit *string `json:"Limit" name:"Limit"` } @@ -2621,11 +3218,14 @@ func (r *DescribeSecurityGroupsRequest) FromJsonString(s string) error { type DescribeSecurityGroupsResponse struct { *tchttp.BaseResponse Response *struct { + // 安全组对象。 SecurityGroupSet []*SecurityGroup `json:"SecurityGroupSet" name:"SecurityGroupSet" list` + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2641,12 +3241,15 @@ func (r *DescribeSecurityGroupsResponse) FromJsonString(s string) error { type DescribeServiceTemplateGroupsRequest struct { *tchttp.BaseRequest + // 过滤条件。 //
  • service-template-group-name - String - (过滤条件)协议端口模板集合名称。
  • //
  • service-template-group-id - String - (过滤条件)协议端口模板集合实例ID,例如:ppmg-e6dy460g。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。 Offset *string `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。 Limit *string `json:"Limit" name:"Limit"` } @@ -2663,11 +3266,14 @@ func (r *DescribeServiceTemplateGroupsRequest) FromJsonString(s string) error { type DescribeServiceTemplateGroupsResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // 协议端口模板集合。 ServiceTemplateGroupSet []*ServiceTemplateGroup `json:"ServiceTemplateGroupSet" name:"ServiceTemplateGroupSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2683,12 +3289,15 @@ func (r *DescribeServiceTemplateGroupsResponse) FromJsonString(s string) error { type DescribeServiceTemplatesRequest struct { *tchttp.BaseRequest + // 过滤条件。 //
  • service-template-name - String - (过滤条件)协议端口模板名称。
  • //
  • service-template-id - String - (过滤条件)协议端口模板实例ID,例如:ppm-e6dy460g。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。 Offset *string `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。 Limit *string `json:"Limit" name:"Limit"` } @@ -2705,11 +3314,14 @@ func (r *DescribeServiceTemplatesRequest) FromJsonString(s string) error { type DescribeServiceTemplatesResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // 协议端口模板对象。 ServiceTemplateSet []*ServiceTemplate `json:"ServiceTemplateSet" name:"ServiceTemplateSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2725,8 +3337,10 @@ func (r *DescribeServiceTemplatesResponse) FromJsonString(s string) error { type DescribeSubnetsRequest struct { *tchttp.BaseRequest + // 子网实例ID查询。形如:subnet-pxir56ns。每次请求的实例的上限为100。参数不支持同时指定SubnetIds和Filters。 SubnetIds []*string `json:"SubnetIds" name:"SubnetIds" list` + // 过滤条件,参数不支持同时指定SubnetIds和Filters。 //
  • subnet-id - String - (过滤条件)Subnet实例名称。
  • //
  • vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-f49l6u0z。
  • @@ -2735,8 +3349,10 @@ type DescribeSubnetsRequest struct { //
  • subnet-name - String - (过滤条件)子网名称。
  • //
  • zone - String - (过滤条件)可用区。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量 Offset *string `json:"Offset" name:"Offset"` + // 返回数量 Limit *string `json:"Limit" name:"Limit"` } @@ -2753,11 +3369,14 @@ func (r *DescribeSubnetsRequest) FromJsonString(s string) error { type DescribeSubnetsResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // 子网对象。 SubnetSet []*Subnet `json:"SubnetSet" name:"SubnetSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2773,16 +3392,20 @@ func (r *DescribeSubnetsResponse) FromJsonString(s string) error { type DescribeVpcsRequest struct { *tchttp.BaseRequest + // VPC实例ID。形如:vpc-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定VpcIds和Filters。 VpcIds []*string `json:"VpcIds" name:"VpcIds" list` + // 过滤条件,参数不支持同时指定VpcIds和Filters。 //
  • vpc-name - String - (过滤条件)VPC实例名称。
  • //
  • is-default - String - (过滤条件)是否默认VPC。
  • //
  • vpc-id - String - (过滤条件)VPC实例ID形如:vpc-f49l6u0z。
  • //
  • cidr-block - String - (过滤条件)vpc的cidr。
  • Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量 Offset *string `json:"Offset" name:"Offset"` + // 返回数量 Limit *string `json:"Limit" name:"Limit"` } @@ -2799,11 +3422,14 @@ func (r *DescribeVpcsRequest) FromJsonString(s string) error { type DescribeVpcsResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的对象数。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // VPC对象。 VpcSet []*Vpc `json:"VpcSet" name:"VpcSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2819,12 +3445,16 @@ func (r *DescribeVpcsResponse) FromJsonString(s string) error { type DescribeVpnConnectionsRequest struct { *tchttp.BaseRequest + // VPN通道实例ID。形如:vpnx-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定VpnConnectionIds和Filters。 VpnConnectionIds []*string `json:"VpnConnectionIds" name:"VpnConnectionIds" list` + // 过滤条件,详见下表:实例过滤条件表。每次请求的Filters的上限为10,Filter.Values的上限为5。参数不支持同时指定VpnConnectionIds和Filters。 Filters []*Filter `json:"Filters" name:"Filters" list` + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API 简介中的相关小节。 Offset *uint64 `json:"Offset" name:"Offset"` + // 返回数量,默认为20,最大值为100。 Limit *uint64 `json:"Limit" name:"Limit"` } @@ -2841,11 +3471,14 @@ func (r *DescribeVpnConnectionsRequest) FromJsonString(s string) error { type DescribeVpnConnectionsResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // VPN通道实例。 VpnConnectionSet []*VpnConnection `json:"VpnConnectionSet" name:"VpnConnectionSet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2861,8 +3494,10 @@ func (r *DescribeVpnConnectionsResponse) FromJsonString(s string) error { type DescribeVpnGatewaysRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。形如:vpngw-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定VpnGatewayIds和Filters。 VpnGatewayIds []*string `json:"VpnGatewayIds" name:"VpnGatewayIds" list` + // 过滤条件,参数不支持同时指定VpnGatewayIds和Filters。 //
  • vpc-id - String - (过滤条件)VPC实例ID形如:vpc-f49l6u0z。
  • //
  • vpn-gateway-id - String - (过滤条件)VPN实例ID形如:vpngw-5aluhh9t。
  • @@ -2872,8 +3507,10 @@ type DescribeVpnGatewaysRequest struct { //
  • renew-flag - String - (过滤条件)网关续费类型,手动续费:'NOTIFY_AND_MANUAL_RENEW'、自动续费:'NOTIFY_AND_AUTO_RENEW'。
  • //
  • zone - String - (过滤条件)VPN所在可用区,形如:ap-guangzhou-2。
  • Filters []*FilterObject `json:"Filters" name:"Filters" list` + // 偏移量 Offset *uint64 `json:"Offset" name:"Offset"` + // 请求对象个数 Limit *uint64 `json:"Limit" name:"Limit"` } @@ -2890,11 +3527,14 @@ func (r *DescribeVpnGatewaysRequest) FromJsonString(s string) error { type DescribeVpnGatewaysResponse struct { *tchttp.BaseResponse Response *struct { + // 符合条件的实例数量。 TotalCount *uint64 `json:"TotalCount" name:"TotalCount"` + // VPN网关实例详细信息列表。 VpnGatewaySet []*VpnGateway `json:"VpnGatewaySet" name:"VpnGatewaySet" list` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2910,8 +3550,10 @@ func (r *DescribeVpnGatewaysResponse) FromJsonString(s string) error { type DetachCcnInstancesRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` + // 要解关联网络实例列表 Instances []*CcnInstance `json:"Instances" name:"Instances" list` } @@ -2928,7 +3570,8 @@ func (r *DetachCcnInstancesRequest) FromJsonString(s string) error { type DetachCcnInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2944,8 +3587,10 @@ func (r *DetachCcnInstancesResponse) FromJsonString(s string) error { type DetachClassicLinkVpcRequest struct { *tchttp.BaseRequest + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 VpcId *string `json:"VpcId" name:"VpcId"` + // CVM实例ID查询。形如:ins-r8hr2upy。 InstanceIds []*string `json:"InstanceIds" name:"InstanceIds" list` } @@ -2962,7 +3607,8 @@ func (r *DetachClassicLinkVpcRequest) FromJsonString(s string) error { type DetachClassicLinkVpcResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -2978,8 +3624,10 @@ func (r *DetachClassicLinkVpcResponse) FromJsonString(s string) error { type DetachNetworkInterfaceRequest struct { *tchttp.BaseRequest + // 弹性网卡实例ID,例如:eni-m6dyj72l。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` + // CVM实例ID。形如:ins-r8hr2upy。 InstanceId *string `json:"InstanceId" name:"InstanceId"` } @@ -2996,7 +3644,8 @@ func (r *DetachNetworkInterfaceRequest) FromJsonString(s string) error { type DetachNetworkInterfaceResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3011,40 +3660,68 @@ func (r *DetachNetworkInterfaceResponse) FromJsonString(s string) error { } type DirectConnectGateway struct { - // 专线网关ID + + // 专线网关`ID`。 DirectConnectGatewayId *string `json:"DirectConnectGatewayId" name:"DirectConnectGatewayId"` - // 专线网关名称 + + // 专线网关名称。 DirectConnectGatewayName *string `json:"DirectConnectGatewayName" name:"DirectConnectGatewayName"` - // VPC实例ID + + // 专线网关关联`VPC`实例`ID`。 VpcId *string `json:"VpcId" name:"VpcId"` - // 关联网络类型,可选值: - //
  • VPC - 私有网络
  • - //
  • CCN - 云联网
  • + + // 关联网络类型: + //
  • `VPC` - 私有网络
  • + //
  • `CCN` - 云联网
  • NetworkType *string `json:"NetworkType" name:"NetworkType"` - //
  • NetworkType 为 VPC 时,这里传值为私有网络实例ID
  • - //
  • NetworkType 为 NAT 时,这里传值为云联网实例ID
  • + + // 关联网络实例`ID`: + //
  • `NetworkType`为`VPC`时,这里为私有网络实例`ID`
  • + //
  • `NetworkType`为`CCN`时,这里为云联网实例`ID`
  • NetworkInstanceId *string `json:"NetworkInstanceId" name:"NetworkInstanceId"` - // 网关类型,可选值: - //
  • NORMAL - (默认)标准型,注:云联网只支持标准型
  • - //
  • NAT - NAT型
  • NAT类型支持网络地址转换配置,类型确定后不能修改;一个私有网络可以创建一个NAT类型的专线网关和一个非NAT类型的专线网关 + + // 网关类型: + //
  • NORMAL - 标准型,注:云联网只支持标准型
  • + //
  • NAT - NAT型
  • + // NAT类型支持网络地址转换配置,类型确定后不能修改;一个私有网络可以创建一个NAT类型的专线网关和一个非NAT类型的专线网关 GatewayType *string `json:"GatewayType" name:"GatewayType"` - // 专线通道数 - DirectConnectTunnelCount *uint64 `json:"DirectConnectTunnelCount" name:"DirectConnectTunnelCount"` - // 创建时间 + + // 创建时间。 CreateTime *string `json:"CreateTime" name:"CreateTime"` + + // 专线网关IP。 + DirectConnectGatewayIp *string `json:"DirectConnectGatewayIp" name:"DirectConnectGatewayIp"` + + // 专线网关关联`CCN`实例`ID`。 + CcnId *string `json:"CcnId" name:"CcnId"` + + // 云联网路由学习类型: + //
  • `BGP` - 自动学习。
  • + //
  • `STATIC` - 静态,即用户配置。
  • + CcnRouteType *string `json:"CcnRouteType" name:"CcnRouteType"` + + // 是否启用BGP。 + EnableBGP *bool `json:"EnableBGP" name:"EnableBGP"` } type DirectConnectGatewayCcnRoute struct { - // 路由ID + + // 路由ID。 RouteId *string `json:"RouteId" name:"RouteId"` - // IDC网段 + + // IDC网段。 DestinationCidrBlock *string `json:"DestinationCidrBlock" name:"DestinationCidrBlock"` + + // `BGP`的`AS-Path`属性。 + ASPath []*string `json:"ASPath" name:"ASPath" list` } type DisableCcnRoutesRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` + // CCN路由策略唯一ID。形如:ccnr-f49l6u0z。 RouteIds []*string `json:"RouteIds" name:"RouteIds" list` } @@ -3061,7 +3738,8 @@ func (r *DisableCcnRoutesRequest) FromJsonString(s string) error { type DisableCcnRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3077,8 +3755,10 @@ func (r *DisableCcnRoutesResponse) FromJsonString(s string) error { type DisableRoutesRequest struct { *tchttp.BaseRequest + // 路由表唯一ID。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 路由策略唯一ID。 RouteIds []*uint64 `json:"RouteIds" name:"RouteIds" list` } @@ -3095,7 +3775,8 @@ func (r *DisableRoutesRequest) FromJsonString(s string) error { type DisableRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3111,8 +3792,10 @@ func (r *DisableRoutesResponse) FromJsonString(s string) error { type DisassociateAddressRequest struct { *tchttp.BaseRequest + // 标识 EIP 的唯一 ID。EIP 唯一 ID 形如:`eip-11112222`。 AddressId *string `json:"AddressId" name:"AddressId"` + // 表示解绑 EIP 之后是否分配普通公网 IP。取值范围:
  • TRUE:表示解绑 EIP 之后分配普通公网 IP。
  • FALSE:表示解绑 EIP 之后不分配普通公网 IP。
    默认取值:FALSE。

    只有满足以下条件时才能指定该参数:
  • 只有在解绑主网卡的主内网 IP 上的 EIP 时才能指定该参数。
  • 解绑 EIP 后重新分配普通公网 IP 操作一个账号每天最多操作 10 次;详情可通过 [DescribeAddressQuota](https://cloud.tencent.com/document/api/213/1378) 接口获取。 ReallocateNormalPublicIp *bool `json:"ReallocateNormalPublicIp" name:"ReallocateNormalPublicIp"` } @@ -3129,7 +3812,8 @@ func (r *DisassociateAddressRequest) FromJsonString(s string) error { type DisassociateAddressResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3145,12 +3829,16 @@ func (r *DisassociateAddressResponse) FromJsonString(s string) error { type DownloadCustomerGatewayConfigurationRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // VPN通道实例ID。形如:vpnx-f49l6u0z。 VpnConnectionId *string `json:"VpnConnectionId" name:"VpnConnectionId"` + // 对端网关厂商信息对象,可通过DescribeCustomerGatewayVendors获取。 CustomerGatewayVendor *CustomerGatewayVendor `json:"CustomerGatewayVendor" name:"CustomerGatewayVendor"` + // 通道接入设备物理接口名称。 InterfaceName *string `json:"InterfaceName" name:"InterfaceName"` } @@ -3167,9 +3855,11 @@ func (r *DownloadCustomerGatewayConfigurationRequest) FromJsonString(s string) e type DownloadCustomerGatewayConfigurationResponse struct { *tchttp.BaseResponse Response *struct { + // XML格式配置信息。 CustomerGatewayConfiguration *string `json:"CustomerGatewayConfiguration" name:"CustomerGatewayConfiguration"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3185,8 +3875,10 @@ func (r *DownloadCustomerGatewayConfigurationResponse) FromJsonString(s string) type EnableCcnRoutesRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` + // CCN路由策略唯一ID。形如:ccnr-f49l6u0z。 RouteIds []*string `json:"RouteIds" name:"RouteIds" list` } @@ -3203,7 +3895,8 @@ func (r *EnableCcnRoutesRequest) FromJsonString(s string) error { type EnableCcnRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3219,8 +3912,10 @@ func (r *EnableCcnRoutesResponse) FromJsonString(s string) error { type EnableRoutesRequest struct { *tchttp.BaseRequest + // 路由表唯一ID。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 路由策略唯一ID。 RouteIds []*uint64 `json:"RouteIds" name:"RouteIds" list` } @@ -3237,7 +3932,8 @@ func (r *EnableRoutesRequest) FromJsonString(s string) error { type EnableRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3252,65 +3948,195 @@ func (r *EnableRoutesResponse) FromJsonString(s string) error { } type Filter struct { + // 属性名称, 若存在多个Filter时,Filter间的关系为逻辑与(AND)关系。 Name *string `json:"Name" name:"Name"` + // 属性值, 若同一个Filter存在多个Values,同一Filter下Values间的关系为逻辑或(OR)关系。 Values []*string `json:"Values" name:"Values" list` } type FilterObject struct { + // 属性名称, 若存在多个Filter时,Filter间的关系为逻辑与(AND)关系。 Name *string `json:"Name" name:"Name"` + // 属性值, 若同一个Filter存在多个Values,同一Filter下Values间的关系为逻辑或(OR)关系。 Values []*string `json:"Values" name:"Values" list` } +type HaVip struct { + + // `HAVIP`的`ID`,是`HAVIP`的唯一标识。 + HaVipId *string `json:"HaVipId" name:"HaVipId"` + + // `HAVIP`名称。 + HaVipName *string `json:"HaVipName" name:"HaVipName"` + + // 虚拟IP地址。 + Vip *string `json:"Vip" name:"Vip"` + + // `HAVIP`所在私有网络`ID`。 + VpcId *string `json:"VpcId" name:"VpcId"` + + // `HAVIP`所在子网`ID`。 + SubnetId *string `json:"SubnetId" name:"SubnetId"` + + // `HAVIP`关联弹性网卡`ID`。 + NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` + + // 被绑定的实例`ID`。 + InstanceId *string `json:"InstanceId" name:"InstanceId"` + + // 绑定`EIP`。 + AddressIp *string `json:"AddressIp" name:"AddressIp"` + + // 状态: + //
  • `AVAILABLE`:运行中
  • + //
  • `UNBIND`:未绑定
  • + State *string `json:"State" name:"State"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` +} + +type HaVipAssociateAddressIpRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。必须是没有绑定`EIP`的`HAVIP` + HaVipId *string `json:"HaVipId" name:"HaVipId"` + + // 弹性公网`IP`。必须是没有绑定`HAVIP`的`EIP` + AddressIp *string `json:"AddressIp" name:"AddressIp"` +} + +func (r *HaVipAssociateAddressIpRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *HaVipAssociateAddressIpRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type HaVipAssociateAddressIpResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *HaVipAssociateAddressIpResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *HaVipAssociateAddressIpResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type HaVipDisassociateAddressIpRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。必须是已绑定`EIP`的`HAVIP`。 + HaVipId *string `json:"HaVipId" name:"HaVipId"` +} + +func (r *HaVipDisassociateAddressIpRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *HaVipDisassociateAddressIpRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type HaVipDisassociateAddressIpResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *HaVipDisassociateAddressIpResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *HaVipDisassociateAddressIpResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type IKEOptionsSpecification struct { + // 加密算法,可选值:'3DES-CBC', 'AES-CBC-128', 'AES-CBS-192', 'AES-CBC-256', 'DES-CBC',默认为3DES-CBC PropoEncryAlgorithm *string `json:"PropoEncryAlgorithm" name:"PropoEncryAlgorithm"` + // 认证算法:可选值:'MD5', 'SHA1',默认为MD5 PropoAuthenAlgorithm *string `json:"PropoAuthenAlgorithm" name:"PropoAuthenAlgorithm"` + // 协商模式:可选值:'AGGRESSIVE', 'MAIN',默认为MAIN ExchangeMode *string `json:"ExchangeMode" name:"ExchangeMode"` + // 本端标识类型:可选值:'ADDRESS', 'FQDN',默认为ADDRESS LocalIdentity *string `json:"LocalIdentity" name:"LocalIdentity"` + // 对端标识类型:可选值:'ADDRESS', 'FQDN',默认为ADDRESS RemoteIdentity *string `json:"RemoteIdentity" name:"RemoteIdentity"` + // 本端标识,当LocalIdentity选为ADDRESS时,LocalAddress必填。localAddress默认为vpn网关公网IP LocalAddress *string `json:"LocalAddress" name:"LocalAddress"` + // 对端标识,当RemoteIdentity选为ADDRESS时,RemoteAddress必填 RemoteAddress *string `json:"RemoteAddress" name:"RemoteAddress"` + // 本端标识,当LocalIdentity选为FQDN时,LocalFqdnName必填 LocalFqdnName *string `json:"LocalFqdnName" name:"LocalFqdnName"` + // 对端标识,当remoteIdentity选为FQDN时,RemoteFqdnName必填 RemoteFqdnName *string `json:"RemoteFqdnName" name:"RemoteFqdnName"` + // DH group,指定IKE交换密钥时使用的DH组,可选值:'GROUP1', 'GROUP2', 'GROUP5', 'GROUP14', 'GROUP24', DhGroupName *string `json:"DhGroupName" name:"DhGroupName"` + // IKE SA Lifetime,单位:秒,设置IKE SA的生存周期,取值范围:60-604800 IKESaLifetimeSeconds *uint64 `json:"IKESaLifetimeSeconds" name:"IKESaLifetimeSeconds"` + // IKE版本 IKEVersion *string `json:"IKEVersion" name:"IKEVersion"` } type IPSECOptionsSpecification struct { + // 加密算法,可选值:'3DES-CBC', 'AES-CBC-128', 'AES-CBC-192', 'AES-CBC-256', 'DES-CBC', 'NULL', 默认为AES-CBC-128 EncryptAlgorithm *string `json:"EncryptAlgorithm" name:"EncryptAlgorithm"` + // 认证算法:可选值:'MD5', 'SHA1',默认为 IntegrityAlgorith *string `json:"IntegrityAlgorith" name:"IntegrityAlgorith"` + // IPsec SA lifetime(s):单位秒,取值范围:180-604800 IPSECSaLifetimeSeconds *uint64 `json:"IPSECSaLifetimeSeconds" name:"IPSECSaLifetimeSeconds"` + // PFS:可选值:'NULL', 'DH-GROUP1', 'DH-GROUP2', 'DH-GROUP5', 'DH-GROUP14', 'DH-GROUP24',默认为NULL PfsDhGroup *string `json:"PfsDhGroup" name:"PfsDhGroup"` + // IPsec SA lifetime(KB):单位KB,取值范围:2560-604800 IPSECSaLifetimeTraffic *uint64 `json:"IPSECSaLifetimeTraffic" name:"IPSECSaLifetimeTraffic"` } type InquiryPriceCreateVpnGatewayRequest struct { *tchttp.BaseRequest + // 公网带宽设置。可选带宽规格:5, 10, 20, 50, 100;单位:Mbps。 InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut" name:"InternetMaxBandwidthOut"` + // VPN网关计费模式,PREPAID:表示预付费,即包年包月,POSTPAID_BY_HOUR:表示后付费,即按量计费。默认:POSTPAID_BY_HOUR,如果指定预付费模式,参数InstanceChargePrepaid必填。 InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` } @@ -3327,9 +4153,11 @@ func (r *InquiryPriceCreateVpnGatewayRequest) FromJsonString(s string) error { type InquiryPriceCreateVpnGatewayResponse struct { *tchttp.BaseResponse Response *struct { + // 商品价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3345,8 +4173,10 @@ func (r *InquiryPriceCreateVpnGatewayResponse) FromJsonString(s string) error { type InquiryPriceRenewVpnGatewayRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` } @@ -3363,9 +4193,11 @@ func (r *InquiryPriceRenewVpnGatewayRequest) FromJsonString(s string) error { type InquiryPriceRenewVpnGatewayResponse struct { *tchttp.BaseResponse Response *struct { + // 商品价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3381,8 +4213,10 @@ func (r *InquiryPriceRenewVpnGatewayResponse) FromJsonString(s string) error { type InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // 公网带宽设置。可选带宽规格:5, 10, 20, 50, 100;单位:Mbps。 InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut" name:"InternetMaxBandwidthOut"` } @@ -3399,9 +4233,11 @@ func (r *InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest) FromJsonString( type InquiryPriceResetVpnGatewayInternetMaxBandwidthResponse struct { *tchttp.BaseResponse Response *struct { + // 商品价格。 Price *Price `json:"Price" name:"Price"` - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3416,29 +4252,38 @@ func (r *InquiryPriceResetVpnGatewayInternetMaxBandwidthResponse) FromJsonString } type InstanceChargePrepaid struct { + // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36。 Period *uint64 `json:"Period" name:"Period"` + // 自动续费标识。取值范围: NOTIFY_AND_AUTO_RENEW:通知过期且自动续费, NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费。默认:NOTIFY_AND_MANUAL_RENEW RenewFlag *string `json:"RenewFlag" name:"RenewFlag"` } type ItemPrice struct { + // 按量计费后付费单价,单位:元。 UnitPrice *float64 `json:"UnitPrice" name:"UnitPrice"` + // 按量计费后付费计价单元,可取值范围: HOUR:表示计价单元是按每小时来计算。当前涉及该计价单元的场景有:实例按小时后付费(POSTPAID_BY_HOUR)、带宽按小时后付费(BANDWIDTH_POSTPAID_BY_HOUR): GB:表示计价单元是按每GB来计算。当前涉及该计价单元的场景有:流量按小时后付费(TRAFFIC_POSTPAID_BY_HOUR)。 ChargeUnit *string `json:"ChargeUnit" name:"ChargeUnit"` + // 预付费商品的原价,单位:元。 OriginalPrice *float64 `json:"OriginalPrice" name:"OriginalPrice"` + // 预付费商品的折扣价,单位:元。 DiscountPrice *float64 `json:"DiscountPrice" name:"DiscountPrice"` } type MigrateNetworkInterfaceRequest struct { *tchttp.BaseRequest + // 弹性网卡实例ID,例如:eni-m6dyj72l。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` + // 弹性网卡当前绑定的CVM实例ID。形如:ins-r8hr2upy。 SourceInstanceId *string `json:"SourceInstanceId" name:"SourceInstanceId"` + // 待迁移的目的CVM实例ID。 DestinationInstanceId *string `json:"DestinationInstanceId" name:"DestinationInstanceId"` } @@ -3455,7 +4300,8 @@ func (r *MigrateNetworkInterfaceRequest) FromJsonString(s string) error { type MigrateNetworkInterfaceResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3471,10 +4317,13 @@ func (r *MigrateNetworkInterfaceResponse) FromJsonString(s string) error { type MigratePrivateIpAddressRequest struct { *tchttp.BaseRequest + // 当内网IP绑定的弹性网卡实例ID,例如:eni-m6dyj72l。 SourceNetworkInterfaceId *string `json:"SourceNetworkInterfaceId" name:"SourceNetworkInterfaceId"` + // 待迁移的目的弹性网卡实例ID。 DestinationNetworkInterfaceId *string `json:"DestinationNetworkInterfaceId" name:"DestinationNetworkInterfaceId"` + // 迁移的内网IP地址,例如:10.0.0.6。 PrivateIpAddress *string `json:"PrivateIpAddress" name:"PrivateIpAddress"` } @@ -3491,7 +4340,8 @@ func (r *MigratePrivateIpAddressRequest) FromJsonString(s string) error { type MigratePrivateIpAddressResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3507,8 +4357,10 @@ func (r *MigratePrivateIpAddressResponse) FromJsonString(s string) error { type ModifyAddressAttributeRequest struct { *tchttp.BaseRequest + // 标识 EIP 的唯一 ID。EIP 唯一 ID 形如:`eip-11112222`。 AddressId *string `json:"AddressId" name:"AddressId"` + // 修改后的 EIP 名称。长度上限为20个字符。 AddressName *string `json:"AddressName" name:"AddressName"` } @@ -3525,7 +4377,8 @@ func (r *ModifyAddressAttributeRequest) FromJsonString(s string) error { type ModifyAddressAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3541,10 +4394,13 @@ func (r *ModifyAddressAttributeResponse) FromJsonString(s string) error { type ModifyAddressTemplateAttributeRequest struct { *tchttp.BaseRequest + // IP地址模板实例ID,例如:ipm-mdunqeb6。 AddressTemplateId *string `json:"AddressTemplateId" name:"AddressTemplateId"` + // IP地址模板名称。 AddressTemplateName *string `json:"AddressTemplateName" name:"AddressTemplateName"` + // 地址信息,支持 IP、CIDR、IP 范围。 Addresses []*string `json:"Addresses" name:"Addresses" list` } @@ -3561,7 +4417,8 @@ func (r *ModifyAddressTemplateAttributeRequest) FromJsonString(s string) error { type ModifyAddressTemplateAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3577,10 +4434,13 @@ func (r *ModifyAddressTemplateAttributeResponse) FromJsonString(s string) error type ModifyAddressTemplateGroupAttributeRequest struct { *tchttp.BaseRequest + // IP地址模板集合实例ID,例如:ipmg-2uw6ujo6。 AddressTemplateGroupId *string `json:"AddressTemplateGroupId" name:"AddressTemplateGroupId"` + // IP地址模板集合名称。 AddressTemplateGroupName *string `json:"AddressTemplateGroupName" name:"AddressTemplateGroupName"` + // IP地址模板实例ID, 例如:ipm-mdunqeb6。 AddressTemplateIds []*string `json:"AddressTemplateIds" name:"AddressTemplateIds" list` } @@ -3597,7 +4457,8 @@ func (r *ModifyAddressTemplateGroupAttributeRequest) FromJsonString(s string) er type ModifyAddressTemplateGroupAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3613,12 +4474,16 @@ func (r *ModifyAddressTemplateGroupAttributeResponse) FromJsonString(s string) e type ModifyAddressesBandwidthRequest struct { *tchttp.BaseRequest + // EIP唯一标识id,形如'eip-xxxx' AddressIds []*string `json:"AddressIds" name:"AddressIds" list` + // 调整带宽目标值 InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut" name:"InternetMaxBandwidthOut"` + // 包月带宽起始时间 StartTime *string `json:"StartTime" name:"StartTime"` + // 包月带宽结束时间 EndTime *string `json:"EndTime" name:"EndTime"` } @@ -3635,7 +4500,8 @@ func (r *ModifyAddressesBandwidthRequest) FromJsonString(s string) error { type ModifyAddressesBandwidthResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3651,8 +4517,10 @@ func (r *ModifyAddressesBandwidthResponse) FromJsonString(s string) error { type ModifyBandwidthPackageAttributeRequest struct { *tchttp.BaseRequest + // 带宽包唯一标识ID BandwidthPackageId *string `json:"BandwidthPackageId" name:"BandwidthPackageId"` + // 带宽包名称 BandwidthPackageName *string `json:"BandwidthPackageName" name:"BandwidthPackageName"` } @@ -3669,7 +4537,8 @@ func (r *ModifyBandwidthPackageAttributeRequest) FromJsonString(s string) error type ModifyBandwidthPackageAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3685,10 +4554,13 @@ func (r *ModifyBandwidthPackageAttributeResponse) FromJsonString(s string) error type ModifyCcnAttributeRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` + // CCN名称,最大长度不能超过60个字节。 CcnName *string `json:"CcnName" name:"CcnName"` + // CCN描述信息,最大长度不能超过100个字节。 CcnDescription *string `json:"CcnDescription" name:"CcnDescription"` } @@ -3705,7 +4577,8 @@ func (r *ModifyCcnAttributeRequest) FromJsonString(s string) error { type ModifyCcnAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3721,8 +4594,10 @@ func (r *ModifyCcnAttributeResponse) FromJsonString(s string) error { type ModifyCustomerGatewayAttributeRequest struct { *tchttp.BaseRequest + // 对端网关ID,例如:cgw-2wqq41m9,可通过DescribeCustomerGateways接口查询对端网关。 CustomerGatewayId *string `json:"CustomerGatewayId" name:"CustomerGatewayId"` + // 对端网关名称,可任意命名,但不得超过60个字符。 CustomerGatewayName *string `json:"CustomerGatewayName" name:"CustomerGatewayName"` } @@ -3739,7 +4614,8 @@ func (r *ModifyCustomerGatewayAttributeRequest) FromJsonString(s string) error { type ModifyCustomerGatewayAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3753,14 +4629,95 @@ func (r *ModifyCustomerGatewayAttributeResponse) FromJsonString(s string) error return json.Unmarshal([]byte(s), &r) } +type ModifyDirectConnectGatewayAttributeRequest struct { + *tchttp.BaseRequest + + // 专线网关唯一`ID`,形如:`dcg-9o233uri`。 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId" name:"DirectConnectGatewayId"` + + // 专线网关名称,可任意命名,但不得超过60个字符。 + DirectConnectGatewayName *string `json:"DirectConnectGatewayName" name:"DirectConnectGatewayName"` + + // 云联网路由学习类型,可选值:`BGP`(自动学习)、`STATIC`(静态,即用户配置)。只有云联网类型专线网关且开启了BGP功能才支持修改`CcnRouteType`。 + CcnRouteType *string `json:"CcnRouteType" name:"CcnRouteType"` +} + +func (r *ModifyDirectConnectGatewayAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyDirectConnectGatewayAttributeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDirectConnectGatewayAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyDirectConnectGatewayAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyDirectConnectGatewayAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyHaVipAttributeRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。 + HaVipId *string `json:"HaVipId" name:"HaVipId"` + + // `HAVIP`名称,可任意命名,但不得超过60个字符。 + HaVipName *string `json:"HaVipName" name:"HaVipName"` +} + +func (r *ModifyHaVipAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyHaVipAttributeRequest) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyHaVipAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyHaVipAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +func (r *ModifyHaVipAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type ModifyNetworkInterfaceAttributeRequest struct { *tchttp.BaseRequest + // 弹性网卡实例ID,例如:eni-pxir56ns。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` + // 弹性网卡名称,最大长度不能超过60个字节。 NetworkInterfaceName *string `json:"NetworkInterfaceName" name:"NetworkInterfaceName"` + // 弹性网卡描述,可任意命名,但不得超过60个字符。 NetworkInterfaceDescription *string `json:"NetworkInterfaceDescription" name:"NetworkInterfaceDescription"` + // 指定绑定的安全组,例如:['sg-1dd51d']。 SecurityGroupIds []*string `json:"SecurityGroupIds" name:"SecurityGroupIds" list` } @@ -3777,7 +4734,8 @@ func (r *ModifyNetworkInterfaceAttributeRequest) FromJsonString(s string) error type ModifyNetworkInterfaceAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3793,8 +4751,10 @@ func (r *ModifyNetworkInterfaceAttributeResponse) FromJsonString(s string) error type ModifyPrivateIpAddressesAttributeRequest struct { *tchttp.BaseRequest + // 弹性网卡实例ID,例如:eni-m6dyj72l。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` + // 指定的内网IP信息。 PrivateIpAddresses []*PrivateIpAddressSpecification `json:"PrivateIpAddresses" name:"PrivateIpAddresses" list` } @@ -3811,7 +4771,8 @@ func (r *ModifyPrivateIpAddressesAttributeRequest) FromJsonString(s string) erro type ModifyPrivateIpAddressesAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3827,8 +4788,10 @@ func (r *ModifyPrivateIpAddressesAttributeResponse) FromJsonString(s string) err type ModifyRouteTableAttributeRequest struct { *tchttp.BaseRequest + // 路由表实例ID,例如:rtb-azd4dt1c。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 路由表名称。 RouteTableName *string `json:"RouteTableName" name:"RouteTableName"` } @@ -3845,7 +4808,8 @@ func (r *ModifyRouteTableAttributeRequest) FromJsonString(s string) error { type ModifyRouteTableAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3861,10 +4825,13 @@ func (r *ModifyRouteTableAttributeResponse) FromJsonString(s string) error { type ModifySecurityGroupAttributeRequest struct { *tchttp.BaseRequest + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` + // 安全组名称,可任意命名,但不得超过60个字符。 GroupName *string `json:"GroupName" name:"GroupName"` + // 安全组备注,最多100个字符。 GroupDescription *string `json:"GroupDescription" name:"GroupDescription"` } @@ -3881,7 +4848,8 @@ func (r *ModifySecurityGroupAttributeRequest) FromJsonString(s string) error { type ModifySecurityGroupAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3897,8 +4865,10 @@ func (r *ModifySecurityGroupAttributeResponse) FromJsonString(s string) error { type ModifySecurityGroupPoliciesRequest struct { *tchttp.BaseRequest + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` + // 安全组规则集合。 SecurityGroupPolicySet对象必须同时指定新的出(Egress)入(Ingress)站规则。 SecurityGroupPolicy对象不支持自定义索引(PolicyIndex)。 SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet" name:"SecurityGroupPolicySet"` } @@ -3915,7 +4885,8 @@ func (r *ModifySecurityGroupPoliciesRequest) FromJsonString(s string) error { type ModifySecurityGroupPoliciesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3931,10 +4902,13 @@ func (r *ModifySecurityGroupPoliciesResponse) FromJsonString(s string) error { type ModifyServiceTemplateAttributeRequest struct { *tchttp.BaseRequest + // 协议端口模板实例ID,例如:ppm-529nwwj8。 ServiceTemplateId *string `json:"ServiceTemplateId" name:"ServiceTemplateId"` + // 协议端口模板名称。 ServiceTemplateName *string `json:"ServiceTemplateName" name:"ServiceTemplateName"` + // 支持单个端口、多个端口、连续端口及所有端口,协议支持:TCP、UDP、ICMP、GRE 协议。 Services []*string `json:"Services" name:"Services" list` } @@ -3951,7 +4925,8 @@ func (r *ModifyServiceTemplateAttributeRequest) FromJsonString(s string) error { type ModifyServiceTemplateAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -3967,10 +4942,13 @@ func (r *ModifyServiceTemplateAttributeResponse) FromJsonString(s string) error type ModifyServiceTemplateGroupAttributeRequest struct { *tchttp.BaseRequest + // 协议端口模板集合实例ID,例如:ppmg-ei8hfd9a。 ServiceTemplateGroupId *string `json:"ServiceTemplateGroupId" name:"ServiceTemplateGroupId"` + // 协议端口模板集合名称。 ServiceTemplateGroupName *string `json:"ServiceTemplateGroupName" name:"ServiceTemplateGroupName"` + // 协议端口模板实例ID,例如:ppm-4dw6agho。 ServiceTemplateIds []*string `json:"ServiceTemplateIds" name:"ServiceTemplateIds" list` } @@ -3987,7 +4965,8 @@ func (r *ModifyServiceTemplateGroupAttributeRequest) FromJsonString(s string) er type ModifyServiceTemplateGroupAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4003,10 +4982,13 @@ func (r *ModifyServiceTemplateGroupAttributeResponse) FromJsonString(s string) e type ModifySubnetAttributeRequest struct { *tchttp.BaseRequest + // 子网实例ID。形如:subnet-pxir56ns。 SubnetId *string `json:"SubnetId" name:"SubnetId"` + // 子网名称,最大长度不能超过60个字节。 SubnetName *string `json:"SubnetName" name:"SubnetName"` + // 子网是否开启广播。 EnableBroadcast *string `json:"EnableBroadcast" name:"EnableBroadcast"` } @@ -4023,7 +5005,8 @@ func (r *ModifySubnetAttributeRequest) FromJsonString(s string) error { type ModifySubnetAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4039,14 +5022,19 @@ func (r *ModifySubnetAttributeResponse) FromJsonString(s string) error { type ModifyVpcAttributeRequest struct { *tchttp.BaseRequest + // VPC实例ID。形如:vpc-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定VpcIds和Filters。 VpcId *string `json:"VpcId" name:"VpcId"` + // 私有网络名称,可任意命名,但不得超过60个字符。 VpcName *string `json:"VpcName" name:"VpcName"` + // 是否开启组播。true: 开启, false: 关闭。 EnableMulticast *string `json:"EnableMulticast" name:"EnableMulticast"` + // DNS地址,最多支持4个,第1个默认为主,其余为备 DnsServers []*string `json:"DnsServers" name:"DnsServers" list` + // 域名 DomainName *string `json:"DomainName" name:"DomainName"` } @@ -4063,7 +5051,8 @@ func (r *ModifyVpcAttributeRequest) FromJsonString(s string) error { type ModifyVpcAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4079,16 +5068,22 @@ func (r *ModifyVpcAttributeResponse) FromJsonString(s string) error { type ModifyVpnConnectionAttributeRequest struct { *tchttp.BaseRequest + // VPN通道实例ID。形如:vpnx-f49l6u0z。 VpnConnectionId *string `json:"VpnConnectionId" name:"VpnConnectionId"` + // VPN通道名称,可任意命名,但不得超过60个字符。 VpnConnectionName *string `json:"VpnConnectionName" name:"VpnConnectionName"` + // 预共享密钥。 PreShareKey *string `json:"PreShareKey" name:"PreShareKey"` + // SPD策略组,例如:{"10.0.0.5/24":["172.123.10.5/16"]},10.0.0.5/24是vpc内网段172.123.10.5/16是IDC网段。用户指定VPC内哪些网段可以和您IDC中哪些网段通信。 SecurityPolicyDatabases []*SecurityPolicyDatabase `json:"SecurityPolicyDatabases" name:"SecurityPolicyDatabases" list` + // IKE配置(Internet Key Exchange,因特网密钥交换),IKE具有一套自保护机制,用户配置网络安全协议。 IKEOptionsSpecification *IKEOptionsSpecification `json:"IKEOptionsSpecification" name:"IKEOptionsSpecification"` + // IPSec配置,腾讯云提供IPSec安全会话设置。 IPSECOptionsSpecification *IPSECOptionsSpecification `json:"IPSECOptionsSpecification" name:"IPSECOptionsSpecification"` } @@ -4105,7 +5100,8 @@ func (r *ModifyVpnConnectionAttributeRequest) FromJsonString(s string) error { type ModifyVpnConnectionAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4121,10 +5117,13 @@ func (r *ModifyVpnConnectionAttributeResponse) FromJsonString(s string) error { type ModifyVpnGatewayAttributeRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // VPN网关名称,最大长度不能超过60个字节。 VpnGatewayName *string `json:"VpnGatewayName" name:"VpnGatewayName"` + // VPN网关计费模式,目前只支持预付费(即包年包月)到后付费(即按量计费)的转换。即参数只支持:POSTPAID_BY_HOUR。 InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` } @@ -4141,7 +5140,8 @@ func (r *ModifyVpnGatewayAttributeRequest) FromJsonString(s string) error { type ModifyVpnGatewayAttributeResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4156,65 +5156,96 @@ func (r *ModifyVpnGatewayAttributeResponse) FromJsonString(s string) error { } type NetworkInterface struct { + // 弹性网卡实例ID,例如:eni-f1xjkw1b。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` + // 弹性网卡名称。 NetworkInterfaceName *string `json:"NetworkInterfaceName" name:"NetworkInterfaceName"` + // 弹性网卡描述。 NetworkInterfaceDescription *string `json:"NetworkInterfaceDescription" name:"NetworkInterfaceDescription"` + // 子网实例ID。 SubnetId *string `json:"SubnetId" name:"SubnetId"` + // VPC实例ID。 VpcId *string `json:"VpcId" name:"VpcId"` + // 绑定的安全组。 GroupSet []*string `json:"GroupSet" name:"GroupSet" list` + // 是否是主网卡。 Primary *bool `json:"Primary" name:"Primary"` + // MAC地址。 MacAddress *string `json:"MacAddress" name:"MacAddress"` - // 取值范围:PENDING|AVAILABLE|ATTACHING|DETACHING|DELETING。 + + // 弹性网卡状态: + //
  • `PENDING`:创建中
  • + //
  • `AVAILABLE`:可用的
  • + //
  • `ATTACHING`:绑定中
  • + //
  • `DETACHING`:解绑中
  • + //
  • `DELETING`:删除中
  • State *string `json:"State" name:"State"` + // 内网IP信息。 PrivateIpAddressSet []*PrivateIpAddressSpecification `json:"PrivateIpAddressSet" name:"PrivateIpAddressSet" list` + // 绑定的云服务器对象。 Attachment *NetworkInterfaceAttachment `json:"Attachment" name:"Attachment"` + // 可用区。 Zone *string `json:"Zone" name:"Zone"` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` } type NetworkInterfaceAttachment struct { + // 云主机实例ID。 InstanceId *string `json:"InstanceId" name:"InstanceId"` + // 网卡在云主机实例内的序号。 DeviceIndex *uint64 `json:"DeviceIndex" name:"DeviceIndex"` + // 云主机所有者账户信息。 InstanceAccountId *string `json:"InstanceAccountId" name:"InstanceAccountId"` + // 绑定时间。 AttachTime *string `json:"AttachTime" name:"AttachTime"` } type Price struct { + // 实例价格。 InstancePrice *ItemPrice `json:"InstancePrice" name:"InstancePrice"` + // 网络价格。 BandwidthPrice *ItemPrice `json:"BandwidthPrice" name:"BandwidthPrice"` } type PrivateIpAddressSpecification struct { + // 内网IP地址。 PrivateIpAddress *string `json:"PrivateIpAddress" name:"PrivateIpAddress"` + // 是否是主IP。 Primary *bool `json:"Primary" name:"Primary"` + // 公网IP地址。 PublicIpAddress *string `json:"PublicIpAddress" name:"PublicIpAddress"` + // EIP实例ID,例如:eip-11112222。 AddressId *string `json:"AddressId" name:"AddressId"` + // 内网IP描述信息。 Description *string `json:"Description" name:"Description"` + // 公网IP是否被封堵。 IsWanIpBlocked *bool `json:"IsWanIpBlocked" name:"IsWanIpBlocked"` + // IP状态: // PENDING:生产中 // MIGRATING:迁移中 @@ -4224,18 +5255,23 @@ type PrivateIpAddressSpecification struct { } type Quota struct { + // 配额名称,取值范围:
  • `TOTAL_EIP_QUOTA`:用户当前地域下EIP的配额数;
  • `DAILY_EIP_APPLY`:用户当前地域下今日申购次数;
  • `DAILY_PUBLIC_IP_ASSIGN`:用户当前地域下,重新分配公网 IP次数。 QuotaId *string `json:"QuotaId" name:"QuotaId"` + // 当前数量 QuotaCurrent *int64 `json:"QuotaCurrent" name:"QuotaCurrent"` + // 配额数量 QuotaLimit *int64 `json:"QuotaLimit" name:"QuotaLimit"` } type RejectAttachCcnInstancesRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` + // 拒绝关联实例列表。 Instances []*CcnInstance `json:"Instances" name:"Instances" list` } @@ -4252,7 +5288,8 @@ func (r *RejectAttachCcnInstancesRequest) FromJsonString(s string) error { type RejectAttachCcnInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4268,6 +5305,7 @@ func (r *RejectAttachCcnInstancesResponse) FromJsonString(s string) error { type ReleaseAddressesRequest struct { *tchttp.BaseRequest + // 标识 EIP 的唯一 ID 列表。EIP 唯一 ID 形如:`eip-11112222`。 AddressIds []*string `json:"AddressIds" name:"AddressIds" list` } @@ -4284,7 +5322,8 @@ func (r *ReleaseAddressesRequest) FromJsonString(s string) error { type ReleaseAddressesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4300,10 +5339,13 @@ func (r *ReleaseAddressesResponse) FromJsonString(s string) error { type RemoveBandwidthPackageResourcesRequest struct { *tchttp.BaseRequest + // 带宽包唯一标识ID,形如'bwp-xxxx' BandwidthPackageId *string `json:"BandwidthPackageId" name:"BandwidthPackageId"` + // 资源类型,包括‘Address’, ‘LoadBalance’ ResourceType *string `json:"ResourceType" name:"ResourceType"` + // 资源Id,形如'eip-xxxx', 'lb-xxxx' ResourceIds []*string `json:"ResourceIds" name:"ResourceIds" list` } @@ -4320,7 +5362,8 @@ func (r *RemoveBandwidthPackageResourcesRequest) FromJsonString(s string) error type RemoveBandwidthPackageResourcesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4336,8 +5379,10 @@ func (r *RemoveBandwidthPackageResourcesResponse) FromJsonString(s string) error type RenewVpnGatewayRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // 预付费计费模式。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid" name:"InstanceChargePrepaid"` } @@ -4354,7 +5399,8 @@ func (r *RenewVpnGatewayRequest) FromJsonString(s string) error { type RenewVpnGatewayResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4370,8 +5416,10 @@ func (r *RenewVpnGatewayResponse) FromJsonString(s string) error { type ReplaceDirectConnectGatewayCcnRoutesRequest struct { *tchttp.BaseRequest + // 专线网关ID,形如:dcg-prpqlmg1 DirectConnectGatewayId *string `json:"DirectConnectGatewayId" name:"DirectConnectGatewayId"` + // 需要连通的IDC网段列表 Routes []*DirectConnectGatewayCcnRoute `json:"Routes" name:"Routes" list` } @@ -4388,7 +5436,8 @@ func (r *ReplaceDirectConnectGatewayCcnRoutesRequest) FromJsonString(s string) e type ReplaceDirectConnectGatewayCcnRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4404,8 +5453,10 @@ func (r *ReplaceDirectConnectGatewayCcnRoutesResponse) FromJsonString(s string) type ReplaceRouteTableAssociationRequest struct { *tchttp.BaseRequest + // 子网实例ID,例如:subnet-3x5lf5q0。可通过DescribeSubnets接口查询。 SubnetId *string `json:"SubnetId" name:"SubnetId"` + // 路由表实例ID,例如:rtb-azd4dt1c。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` } @@ -4422,7 +5473,8 @@ func (r *ReplaceRouteTableAssociationRequest) FromJsonString(s string) error { type ReplaceRouteTableAssociationResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4438,8 +5490,10 @@ func (r *ReplaceRouteTableAssociationResponse) FromJsonString(s string) error { type ReplaceRoutesRequest struct { *tchttp.BaseRequest + // 路由表实例ID,例如:rtb-azd4dt1c。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 路由策略对象。只需要指定路由策略ID(RouteId)。 Routes []*Route `json:"Routes" name:"Routes" list` } @@ -4456,7 +5510,8 @@ func (r *ReplaceRoutesRequest) FromJsonString(s string) error { type ReplaceRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4472,8 +5527,10 @@ func (r *ReplaceRoutesResponse) FromJsonString(s string) error { type ReplaceSecurityGroupPolicyRequest struct { *tchttp.BaseRequest + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` + // 安全组规则集合对象。 SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet" name:"SecurityGroupPolicySet"` } @@ -4490,7 +5547,8 @@ func (r *ReplaceSecurityGroupPolicyRequest) FromJsonString(s string) error { type ReplaceSecurityGroupPolicyResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4506,10 +5564,13 @@ func (r *ReplaceSecurityGroupPolicyResponse) FromJsonString(s string) error { type ResetAttachCcnInstancesRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` + // CCN所属UIN(根账号)。 CcnUin *string `json:"CcnUin" name:"CcnUin"` + // 重新申请关联网络实例列表。 Instances []*CcnInstance `json:"Instances" name:"Instances" list` } @@ -4526,7 +5587,8 @@ func (r *ResetAttachCcnInstancesRequest) FromJsonString(s string) error { type ResetAttachCcnInstancesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4542,10 +5604,13 @@ func (r *ResetAttachCcnInstancesResponse) FromJsonString(s string) error { type ResetRoutesRequest struct { *tchttp.BaseRequest + // 路由表实例ID,例如:rtb-azd4dt1c。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 路由表名称,最大长度不能超过60个字节。 RouteTableName *string `json:"RouteTableName" name:"RouteTableName"` + // 路由策略。 Routes []*Route `json:"Routes" name:"Routes" list` } @@ -4562,7 +5627,8 @@ func (r *ResetRoutesRequest) FromJsonString(s string) error { type ResetRoutesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4578,8 +5644,10 @@ func (r *ResetRoutesResponse) FromJsonString(s string) error { type ResetVpnConnectionRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // VPN通道实例ID。形如:vpnx-f49l6u0z。 VpnConnectionId *string `json:"VpnConnectionId" name:"VpnConnectionId"` } @@ -4596,7 +5664,8 @@ func (r *ResetVpnConnectionRequest) FromJsonString(s string) error { type ResetVpnConnectionResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4612,8 +5681,10 @@ func (r *ResetVpnConnectionResponse) FromJsonString(s string) error { type ResetVpnGatewayInternetMaxBandwidthRequest struct { *tchttp.BaseRequest + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // 公网带宽设置。可选带宽规格:5, 10, 20, 50, 100;单位:Mbps。 InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut" name:"InternetMaxBandwidthOut"` } @@ -4630,7 +5701,8 @@ func (r *ResetVpnGatewayInternetMaxBandwidthRequest) FromJsonString(s string) er type ResetVpnGatewayInternetMaxBandwidthResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4645,17 +5717,22 @@ func (r *ResetVpnGatewayInternetMaxBandwidthResponse) FromJsonString(s string) e } type Resource struct { + // 带宽包资源类型,包括'Address'和'LoadBalance' ResourceType *string `json:"ResourceType" name:"ResourceType"` + // 带宽包资源Id,形如'eip-xxxx', 'lb-xxxx' ResourceId *string `json:"ResourceId" name:"ResourceId"` + // 带宽包资源Ip AddressIp *string `json:"AddressIp" name:"AddressIp"` } type Route struct { + // 目的网段,取值不能在私有网络网段内,例如:112.20.51.0/24。 DestinationCidrBlock *string `json:"DestinationCidrBlock" name:"DestinationCidrBlock"` + // 下一跳类型,目前我们支持的类型有: // CVM:公网网关类型的云主机; // VPN:VPN网关; @@ -4667,15 +5744,20 @@ type Route struct { // EIP:云主机的公网IP; // CCN:云联网。 GatewayType *string `json:"GatewayType" name:"GatewayType"` + // 下一跳地址,这里只需要指定不同下一跳类型的网关ID,系统会自动匹配到下一跳地址。 // 特别注意:当 GatewayType 为 EIP 时,GatewayId 固定值 '0' GatewayId *string `json:"GatewayId" name:"GatewayId"` + // 路由策略ID。 RouteId *uint64 `json:"RouteId" name:"RouteId"` + // 路由策略描述。 RouteDescription *string `json:"RouteDescription" name:"RouteDescription"` + // 是否启用 Enabled *bool `json:"Enabled" name:"Enabled"` + // 路由类型,目前我们支持的类型有: // USER:用户路由; // NETD:网络探测路由,创建网络探测实例时,系统默认下发,不可编辑与删除; @@ -4685,138 +5767,188 @@ type Route struct { } type RouteConflict struct { + // 路由表实例ID,例如:rtb-azd4dt1c。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 要检查的与之冲突的目的端 DestinationCidrBlock *string `json:"DestinationCidrBlock" name:"DestinationCidrBlock"` + // 冲突的路由策略列表 ConflictSet []*Route `json:"ConflictSet" name:"ConflictSet" list` } type RouteTable struct { + // VPC实例ID。 VpcId *string `json:"VpcId" name:"VpcId"` + // 路由表实例ID,例如:rtb-azd4dt1c。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 路由表名称。 RouteTableName *string `json:"RouteTableName" name:"RouteTableName"` + // 路由表关联关系。 AssociationSet []*RouteTableAssociation `json:"AssociationSet" name:"AssociationSet" list` + // 路由表策略集合。 RouteSet []*Route `json:"RouteSet" name:"RouteSet" list` + // 是否默认路由表。 Main *bool `json:"Main" name:"Main"` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` } type RouteTableAssociation struct { + // 子网实例ID。 SubnetId *string `json:"SubnetId" name:"SubnetId"` + // 路由表实例ID。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` } type SecurityGroup struct { + // 安全组实例ID,例如:sg-ohuuioma。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` + // 安全组名称,可任意命名,但不得超过60个字符。 SecurityGroupName *string `json:"SecurityGroupName" name:"SecurityGroupName"` + // 安全组备注,最多100个字符。 SecurityGroupDesc *string `json:"SecurityGroupDesc" name:"SecurityGroupDesc"` + // 项目id,默认0。可在qcloud控制台项目管理页面查询到。 ProjectId *string `json:"ProjectId" name:"ProjectId"` + // 是否是默认安全组,默认安全组不支持删除。 IsDefault *bool `json:"IsDefault" name:"IsDefault"` + // 安全组创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` } type SecurityGroupAssociationStatistics struct { + // 安全组实例ID。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` + // 云主机实例数。 CVM *uint64 `json:"CVM" name:"CVM"` + // 数据库实例数。 CDB *uint64 `json:"CDB" name:"CDB"` + // 弹性网卡实例数。 ENI *uint64 `json:"ENI" name:"ENI"` + // 被安全组引用数。 SG *uint64 `json:"SG" name:"SG"` + // 负载均衡实例数。 CLB *uint64 `json:"CLB" name:"CLB"` } type SecurityGroupPolicy struct { + // 安全组规则索引号。 PolicyIndex *int64 `json:"PolicyIndex" name:"PolicyIndex"` + // 协议, 取值: TCP,UDP, ICMP。 Protocol *string `json:"Protocol" name:"Protocol"` + // 端口(all, 离散port, range)。 Port *string `json:"Port" name:"Port"` + // 协议端口ID或者协议端口组ID。ServiceTemplate和Protocol+Port互斥。 ServiceTemplate *ServiceTemplateSpecification `json:"ServiceTemplate" name:"ServiceTemplate"` + // 网段或IP(互斥)。 CidrBlock *string `json:"CidrBlock" name:"CidrBlock"` - // 已绑定安全组的网段或IP。 + + // 安全组实例ID,例如:sg-ohuuioma。 SecurityGroupId *string `json:"SecurityGroupId" name:"SecurityGroupId"` + // IP地址ID或者ID地址组ID。 AddressTemplate *AddressTemplateSpecification `json:"AddressTemplate" name:"AddressTemplate"` + // ACCEPT 或 DROP。 Action *string `json:"Action" name:"Action"` + // 安全组规则描述。 PolicyDescription *string `json:"PolicyDescription" name:"PolicyDescription"` } type SecurityGroupPolicySet struct { + // 安全组规则当前版本。用户每次更新安全规则版本会自动加1,防止更新的路由规则已过期,不填不考虑冲突。 Version *string `json:"Version" name:"Version"` + // 出站规则。 Egress []*SecurityGroupPolicy `json:"Egress" name:"Egress" list` + // 入站规则。 Ingress []*SecurityGroupPolicy `json:"Ingress" name:"Ingress" list` } type SecurityPolicyDatabase struct { + // 本端网段 LocalCidrBlock *string `json:"LocalCidrBlock" name:"LocalCidrBlock"` + // 对端网段 RemoteCidrBlock []*string `json:"RemoteCidrBlock" name:"RemoteCidrBlock" list` } type ServiceTemplate struct { + // 协议端口实例ID,例如:ppm-f5n1f8da。 ServiceTemplateId *string `json:"ServiceTemplateId" name:"ServiceTemplateId"` + // 模板名称。 ServiceTemplateName *string `json:"ServiceTemplateName" name:"ServiceTemplateName"` + // 协议端口信息。 ServiceSet []*string `json:"ServiceSet" name:"ServiceSet" list` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` } type ServiceTemplateGroup struct { + // 协议端口模板集合实例ID,例如:ppmg-2klmrefu。 ServiceTemplateGroupId *string `json:"ServiceTemplateGroupId" name:"ServiceTemplateGroupId"` + // 协议端口模板集合名称。 ServiceTemplateGroupName *string `json:"ServiceTemplateGroupName" name:"ServiceTemplateGroupName"` + // 协议端口模板实例ID。 ServiceTemplateIdSet []*string `json:"ServiceTemplateIdSet" name:"ServiceTemplateIdSet" list` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` } type ServiceTemplateSpecification struct { + // 协议端口ID,例如:ppm-f5n1f8da。 ServiceId *string `json:"ServiceId" name:"ServiceId"` + // 协议端口组ID,例如:ppmg-f5n1f8da。 ServiceGroupId *string `json:"ServiceGroupId" name:"ServiceGroupId"` } type SetCcnRegionBandwidthLimitsRequest struct { *tchttp.BaseRequest + // CCN实例ID。形如:ccn-f49l6u0z。 CcnId *string `json:"CcnId" name:"CcnId"` + // 云联网(CCN)各地域出带宽上限。 CcnRegionBandwidthLimits []*CcnRegionBandwidthLimit `json:"CcnRegionBandwidthLimits" name:"CcnRegionBandwidthLimits" list` } @@ -4833,7 +5965,8 @@ func (r *SetCcnRegionBandwidthLimitsRequest) FromJsonString(s string) error { type SetCcnRegionBandwidthLimitsResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4848,30 +5981,41 @@ func (r *SetCcnRegionBandwidthLimitsResponse) FromJsonString(s string) error { } type Subnet struct { + // VPC实例ID。 VpcId *string `json:"VpcId" name:"VpcId"` + // 子网实例ID,例如:subnet-bthucmmy。 SubnetId *string `json:"SubnetId" name:"SubnetId"` + // 子网名称。 SubnetName *string `json:"SubnetName" name:"SubnetName"` + // 子网的CIDR。 CidrBlock *string `json:"CidrBlock" name:"CidrBlock"` + // 是否默认子网。 IsDefault *bool `json:"IsDefault" name:"IsDefault"` + // 是否开启广播。 EnableBroadcast *bool `json:"EnableBroadcast" name:"EnableBroadcast"` + // 可用区。 Zone *string `json:"Zone" name:"Zone"` + // 路由表实例ID,例如:rtb-l2h8d7c2。 RouteTableId *string `json:"RouteTableId" name:"RouteTableId"` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // 可用IP数。 AvailableIpAddressCount *uint64 `json:"AvailableIpAddressCount" name:"AvailableIpAddressCount"` } type TransformAddressRequest struct { *tchttp.BaseRequest + // 待操作有普通公网 IP 的实例 ID。实例 ID 形如:`ins-11112222`。可通过登录[控制台](https://console.cloud.tencent.com/cvm)查询,也可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/9389) 接口返回值中的`InstanceId`获取。 InstanceId *string `json:"InstanceId" name:"InstanceId"` } @@ -4888,7 +6032,8 @@ func (r *TransformAddressRequest) FromJsonString(s string) error { type TransformAddressResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4904,9 +6049,11 @@ func (r *TransformAddressResponse) FromJsonString(s string) error { type UnassignPrivateIpAddressesRequest struct { *tchttp.BaseRequest + // 弹性网卡实例ID,例如:eni-m6dyj72l。 NetworkInterfaceId *string `json:"NetworkInterfaceId" name:"NetworkInterfaceId"` - // 指定的内网IP信息。 + + // 指定的内网IP信息,单次最多指定10个。 PrivateIpAddresses []*PrivateIpAddressSpecification `json:"PrivateIpAddresses" name:"PrivateIpAddresses" list` } @@ -4922,7 +6069,8 @@ func (r *UnassignPrivateIpAddressesRequest) FromJsonString(s string) error { type UnassignPrivateIpAddressesResponse struct { *tchttp.BaseResponse Response *struct { - // 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId" name:"RequestId"` } `json:"Response"` } @@ -4937,88 +6085,127 @@ func (r *UnassignPrivateIpAddressesResponse) FromJsonString(s string) error { } type Vpc struct { + // Vpc名称。 VpcName *string `json:"VpcName" name:"VpcName"` + // VPC实例ID,例如:vpc-azd4dt1c。 VpcId *string `json:"VpcId" name:"VpcId"` + // VPC的cidr,只能为10.0.0.0/16,172.16.0.0/12,192.168.0.0/16这三个内网网段内。 CidrBlock *string `json:"CidrBlock" name:"CidrBlock"` + // 是否默认VPC。 IsDefault *bool `json:"IsDefault" name:"IsDefault"` + // 是否开启组播。 EnableMulticast *bool `json:"EnableMulticast" name:"EnableMulticast"` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // DNS列表 DnsServerSet []*string `json:"DnsServerSet" name:"DnsServerSet" list` + // DHCP域名选项值 DomainName *string `json:"DomainName" name:"DomainName"` + // DHCP选项集ID DhcpOptionsId *string `json:"DhcpOptionsId" name:"DhcpOptionsId"` } type VpnConnection struct { + // 通道实例ID。 VpnConnectionId *string `json:"VpnConnectionId" name:"VpnConnectionId"` + // 通道名称。 VpnConnectionName *string `json:"VpnConnectionName" name:"VpnConnectionName"` + // VPC实例ID。 VpcId *string `json:"VpcId" name:"VpcId"` + // VPN网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // 对端网关实例ID。 CustomerGatewayId *string `json:"CustomerGatewayId" name:"CustomerGatewayId"` + // 预共享密钥。 PreShareKey *string `json:"PreShareKey" name:"PreShareKey"` + // 通道传输协议。 VpnProto *string `json:"VpnProto" name:"VpnProto"` + // 通道加密协议。 EncryptProto *string `json:"EncryptProto" name:"EncryptProto"` + // 路由类型。 RouteType *string `json:"RouteType" name:"RouteType"` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // 通道的生产状态,PENDING:生产中,AVAILABLE:运行中,DELETING:删除中。 State *string `json:"State" name:"State"` + // 通道连接状态,AVAILABLE:已连接。 NetStatus *string `json:"NetStatus" name:"NetStatus"` + // SPD。 SecurityPolicyDatabaseSet []*SecurityPolicyDatabase `json:"SecurityPolicyDatabaseSet" name:"SecurityPolicyDatabaseSet" list` + // IKE选项。 IKEOptionsSpecification *IKEOptionsSpecification `json:"IKEOptionsSpecification" name:"IKEOptionsSpecification"` + // IPSEC选择。 IPSECOptionsSpecification *IPSECOptionsSpecification `json:"IPSECOptionsSpecification" name:"IPSECOptionsSpecification"` } type VpnGateway struct { + // 网关实例ID。 VpnGatewayId *string `json:"VpnGatewayId" name:"VpnGatewayId"` + // VPC实例ID。 VpcId *string `json:"VpcId" name:"VpcId"` + // 网关实例名称。 VpnGatewayName *string `json:"VpnGatewayName" name:"VpnGatewayName"` + // 网关实例类型:'IPSEC', 'SSL'。 Type *string `json:"Type" name:"Type"` + // 网关实例状态, 'PENDING':生产中,'DELETING':删除中,'AVAILABLE':运行中。 State *string `json:"State" name:"State"` + // 网关公网IP。 PublicIpAddress *string `json:"PublicIpAddress" name:"PublicIpAddress"` + // 网关续费类型:'NOTIFY_AND_MANUAL_RENEW':手动续费,'NOTIFY_AND_AUTO_RENEW':自动续费 RenewFlag *string `json:"RenewFlag" name:"RenewFlag"` + // 网关付费类型:POSTPAID_BY_HOUR:按小时后付费,PREPAID:包年包月预付费, InstanceChargeType *string `json:"InstanceChargeType" name:"InstanceChargeType"` + // 网关出带宽。 InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut" name:"InternetMaxBandwidthOut"` + // 创建时间。 CreatedTime *string `json:"CreatedTime" name:"CreatedTime"` + // 预付费网关过期时间。 ExpiredTime *string `json:"ExpiredTime" name:"ExpiredTime"` + // 公网IP是否被封堵。 IsAddressBlocked *bool `json:"IsAddressBlocked" name:"IsAddressBlocked"` + // 计费模式变更,PREPAID_TO_POSTPAID:包年包月预付费到期转按小时后付费。 NewPurchasePlan *string `json:"NewPurchasePlan" name:"NewPurchasePlan"` + // 网关计费装,PROTECTIVELY_ISOLATED:被安全隔离的实例,NORMAL:正常。 RestrictState *string `json:"RestrictState" name:"RestrictState"` + // 可用区,如:ap-guangzhou-2 Zone *string `json:"Zone" name:"Zone"` } diff --git a/vendor/github.com/tent/http-link-go/LICENSE b/vendor/github.com/tent/http-link-go/LICENSE deleted file mode 100644 index 88dcd4afd..000000000 --- a/vendor/github.com/tent/http-link-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 Tent.is, LLC. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Tent.is, LLC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/tent/http-link-go/README.md b/vendor/github.com/tent/http-link-go/README.md deleted file mode 100644 index 07d470e4d..000000000 --- a/vendor/github.com/tent/http-link-go/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# http-link-go [![Build Status](https://travis-ci.org/tent/http-link-go.png?branch=master)](https://travis-ci.org/tent/http-link-go) - -http-link-go implements parsing and serialization of Link header values as -defined in [RFC 5988](https://tools.ietf.org/html/rfc5988). - -[**Documentation**](http://godoc.org/github.com/tent/http-link-go) - -## Installation - -```text -go get github.com/tent/http-link-go -``` diff --git a/vendor/github.com/tent/http-link-go/link.go b/vendor/github.com/tent/http-link-go/link.go deleted file mode 100644 index 584dfd051..000000000 --- a/vendor/github.com/tent/http-link-go/link.go +++ /dev/null @@ -1,185 +0,0 @@ -// Package link implements parsing and serialization of Link header values as -// defined in RFC 5988. -package link - -import ( - "bytes" - "errors" - "sort" - "unicode" -) - -type Link struct { - URI string - Rel string - Params map[string]string -} - -// Format serializes a slice of Links into a header value. It does not currently -// implement RFC 2231 handling of non-ASCII character encoding and language -// information. -func Format(links []Link) string { - buf := &bytes.Buffer{} - for i, link := range links { - if i > 0 { - buf.Write([]byte(", ")) - } - buf.WriteByte('<') - buf.WriteString(link.URI) - buf.WriteByte('>') - - writeParam(buf, "rel", link.Rel) - - keys := make([]string, 0, len(link.Params)) - for k := range link.Params { - keys = append(keys, k) - } - sort.Strings(keys) - - for _, k := range keys { - writeParam(buf, k, link.Params[k]) - } - } - - return buf.String() -} - -func writeParam(buf *bytes.Buffer, key, value string) { - buf.Write([]byte("; ")) - buf.WriteString(key) - buf.Write([]byte(`="`)) - buf.WriteString(value) - buf.WriteByte('"') -} - -// Parse parses a Link header value into a slice of Links. It does not currently -// implement RFC 2231 handling of non-ASCII character encoding and language -// information. -func Parse(l string) ([]Link, error) { - v := []byte(l) - v = bytes.TrimSpace(v) - if len(v) == 0 { - return nil, nil - } - - links := make([]Link, 0, 1) - for len(v) > 0 { - if v[0] != '<' { - return nil, errors.New("link: does not start with <") - } - lend := bytes.IndexByte(v, '>') - if lend == -1 { - return nil, errors.New("link: does not contain ending >") - } - - params := make(map[string]string) - link := Link{URI: string(v[1:lend]), Params: params} - links = append(links, link) - - // trim off parsed url - v = v[lend+1:] - if len(v) == 0 { - break - } - v = bytes.TrimLeftFunc(v, unicode.IsSpace) - - for len(v) > 0 { - if v[0] != ';' && v[0] != ',' { - return nil, errors.New(`link: expected ";" or "'", got "` + string(v[0:1]) + `"`) - } - var next bool - if v[0] == ',' { - next = true - } - v = bytes.TrimLeftFunc(v[1:], unicode.IsSpace) - if next || len(v) == 0 { - break - } - var key, value []byte - key, value, v = consumeParam(v) - if key == nil || value == nil { - return nil, errors.New("link: malformed param") - } - if k := string(key); k == "rel" { - if links[len(links)-1].Rel == "" { - links[len(links)-1].Rel = string(value) - } - } else { - params[k] = string(value) - } - v = bytes.TrimLeftFunc(v, unicode.IsSpace) - } - } - - return links, nil -} - -func isTokenChar(r rune) bool { - return r > 0x20 && r < 0x7f && r != '"' && r != ',' && r != '=' && r != ';' -} - -func isNotTokenChar(r rune) bool { return !isTokenChar(r) } - -func consumeToken(v []byte) (token, rest []byte) { - notPos := bytes.IndexFunc(v, isNotTokenChar) - if notPos == -1 { - return v, nil - } - if notPos == 0 { - return nil, v - } - return v[0:notPos], v[notPos:] -} - -func consumeValue(v []byte) (value, rest []byte) { - if v[0] != '"' { - return nil, v - } - - rest = v[1:] - buffer := &bytes.Buffer{} - var nextIsLiteral bool - for idx, r := range string(rest) { - switch { - case nextIsLiteral: - buffer.WriteRune(r) - nextIsLiteral = false - case r == '"': - return buffer.Bytes(), rest[idx+1:] - case r == '\\': - nextIsLiteral = true - case r != '\r' && r != '\n': - buffer.WriteRune(r) - default: - return nil, v - } - } - return nil, v -} - -func consumeParam(v []byte) (param, value, rest []byte) { - param, rest = consumeToken(v) - param = bytes.ToLower(param) - if param == nil { - return nil, nil, v - } - - rest = bytes.TrimLeftFunc(rest, unicode.IsSpace) - if len(rest) == 0 || rest[0] != '=' { - return nil, nil, v - } - rest = rest[1:] // consume equals sign - rest = bytes.TrimLeftFunc(rest, unicode.IsSpace) - if len(rest) == 0 { - return nil, nil, v - } - if rest[0] != '"' { - value, rest = consumeToken(rest) - } else { - value, rest = consumeValue(rest) - } - if value == nil { - return nil, nil, v - } - return param, value, rest -} diff --git a/vendor/github.com/ugorji/go/codec/codecgen/README.md b/vendor/github.com/ugorji/go/codec/codecgen/README.md deleted file mode 100644 index 3ae8a056f..000000000 --- a/vendor/github.com/ugorji/go/codec/codecgen/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# codecgen tool - -Generate is given a list of *.go files to parse, and an output file (fout), -codecgen will create an output file __file.go__ which -contains `codec.Selfer` implementations for the named types found -in the files parsed. - -Using codecgen is very straightforward. - -**Download and install the tool** - -`go get -u github.com/ugorji/go/codec/codecgen` - -**Run the tool on your files** - -The command line format is: - -`codecgen [options] (-o outfile) (infile ...)` - -```sh -% codecgen -? -Usage of codecgen: - -c="github.com/ugorji/go/codec": codec path - -o="": out file - -r=".*": regex for type name to match - -rt="": tags for go run - -t="": build tag to put in file - -u=false: Use unsafe, e.g. to avoid unnecessary allocation on []byte->string - -x=false: keep temp file - -% codecgen -o values_codecgen.go values.go values2.go moretypedefs.go -``` - -Please see the [blog article](http://ugorji.net/blog/go-codecgen) -for more information on how to use the tool. - diff --git a/vendor/github.com/ugorji/go/codec/codecgen/gen.go b/vendor/github.com/ugorji/go/codec/codecgen/gen.go deleted file mode 100644 index f370b4c79..000000000 --- a/vendor/github.com/ugorji/go/codec/codecgen/gen.go +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -// codecgen generates codec.Selfer implementations for a set of types. -package main - -import ( - "bufio" - "bytes" - "errors" - "flag" - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "math/rand" - "os" - "os/exec" - "path/filepath" - "regexp" - "strconv" - "text/template" - "time" -) - -const genCodecPkg = "codec1978" // keep this in sync with codec.genCodecPkg - -const genFrunMainTmpl = `//+build ignore - -package main -{{ if .Types }}import "{{ .ImportPath }}"{{ end }} -func main() { - {{ $.PackageName }}.CodecGenTempWrite{{ .RandString }}() -} -` - -// const genFrunPkgTmpl = `//+build codecgen -const genFrunPkgTmpl = ` -package {{ $.PackageName }} - -import ( - {{ if not .CodecPkgFiles }}{{ .CodecPkgName }} "{{ .CodecImportPath }}"{{ end }} - "os" - "reflect" - "bytes" - "strings" - "go/format" -) - -func CodecGenTempWrite{{ .RandString }}() { - fout, err := os.Create("{{ .OutFile }}") - if err != nil { - panic(err) - } - defer fout.Close() - var out bytes.Buffer - - var typs []reflect.Type -{{ range $index, $element := .Types }} - var t{{ $index }} {{ . }} - typs = append(typs, reflect.TypeOf(t{{ $index }})) -{{ end }} - {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ .UseUnsafe }}, {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}NewTypeInfos(strings.Split("{{ .StructTags }}", ",")), typs...) - bout, err := format.Source(out.Bytes()) - if err != nil { - fout.Write(out.Bytes()) - panic(err) - } - fout.Write(bout) -} - -` - -// Generate is given a list of *.go files to parse, and an output file (fout). -// -// It finds all types T in the files, and it creates 2 tmp files (frun). -// - main package file passed to 'go run' -// - package level file which calls *genRunner.Selfer to write Selfer impls for each T. -// We use a package level file so that it can reference unexported types in the package being worked on. -// Tool then executes: "go run __frun__" which creates fout. -// fout contains Codec(En|De)codeSelf implementations for every type T. -// -func Generate(outfile, buildTag, codecPkgPath string, uid int64, useUnsafe bool, goRunTag string, - st string, regexName *regexp.Regexp, deleteTempFile bool, infiles ...string) (err error) { - // For each file, grab AST, find each type, and write a call to it. - if len(infiles) == 0 { - return - } - if outfile == "" || codecPkgPath == "" { - err = errors.New("outfile and codec package path cannot be blank") - return - } - if uid < 0 { - uid = -uid - } - if uid == 0 { - rr := rand.New(rand.NewSource(time.Now().UnixNano())) - uid = 101 + rr.Int63n(9777) - } - // We have to parse dir for package, before opening the temp file for writing (else ImportDir fails). - // Also, ImportDir(...) must take an absolute path. - lastdir := filepath.Dir(outfile) - absdir, err := filepath.Abs(lastdir) - if err != nil { - return - } - pkg, err := build.Default.ImportDir(absdir, build.AllowBinary) - if err != nil { - return - } - type tmplT struct { - CodecPkgName string - CodecImportPath string - ImportPath string - OutFile string - PackageName string - RandString string - BuildTag string - StructTags string - Types []string - CodecPkgFiles bool - UseUnsafe bool - } - tv := tmplT{ - CodecPkgName: genCodecPkg, - OutFile: outfile, - CodecImportPath: codecPkgPath, - BuildTag: buildTag, - UseUnsafe: useUnsafe, - RandString: strconv.FormatInt(uid, 10), - StructTags: st, - } - tv.ImportPath = pkg.ImportPath - if tv.ImportPath == tv.CodecImportPath { - tv.CodecPkgFiles = true - tv.CodecPkgName = "codec" - } - astfiles := make([]*ast.File, len(infiles)) - for i, infile := range infiles { - if filepath.Dir(infile) != lastdir { - err = errors.New("in files must all be in same directory as outfile") - return - } - fset := token.NewFileSet() - astfiles[i], err = parser.ParseFile(fset, infile, nil, 0) - if err != nil { - return - } - if i == 0 { - tv.PackageName = astfiles[i].Name.Name - if tv.PackageName == "main" { - // codecgen cannot be run on types in the 'main' package. - // A temporary 'main' package must be created, and should reference the fully built - // package containing the types. - // Also, the temporary main package will conflict with the main package which already has a main method. - err = errors.New("codecgen cannot be run on types in the 'main' package") - return - } - } - } - - for _, f := range astfiles { - for _, d := range f.Decls { - if gd, ok := d.(*ast.GenDecl); ok { - for _, dd := range gd.Specs { - if td, ok := dd.(*ast.TypeSpec); ok { - // if len(td.Name.Name) == 0 || td.Name.Name[0] > 'Z' || td.Name.Name[0] < 'A' { - if len(td.Name.Name) == 0 { - continue - } - - // only generate for: - // struct: StructType - // primitives (numbers, bool, string): Ident - // map: MapType - // slice, array: ArrayType - // chan: ChanType - // do not generate: - // FuncType, InterfaceType, StarExpr (ptr), etc - switch td.Type.(type) { - case *ast.StructType, *ast.Ident, *ast.MapType, *ast.ArrayType, *ast.ChanType: - if regexName.FindStringIndex(td.Name.Name) != nil { - tv.Types = append(tv.Types, td.Name.Name) - } - } - } - } - } - } - } - - if len(tv.Types) == 0 { - return - } - - // we cannot use ioutil.TempFile, because we cannot guarantee the file suffix (.go). - // Also, we cannot create file in temp directory, - // because go run will not work (as it needs to see the types here). - // Consequently, create the temp file in the current directory, and remove when done. - - // frun, err = ioutil.TempFile("", "codecgen-") - // frunName := filepath.Join(os.TempDir(), "codecgen-"+strconv.FormatInt(time.Now().UnixNano(), 10)+".go") - - frunMainName := "codecgen-main-" + tv.RandString + ".generated.go" - frunPkgName := "codecgen-pkg-" + tv.RandString + ".generated.go" - if deleteTempFile { - defer os.Remove(frunMainName) - defer os.Remove(frunPkgName) - } - // var frunMain, frunPkg *os.File - if _, err = gen1(frunMainName, genFrunMainTmpl, &tv); err != nil { - return - } - if _, err = gen1(frunPkgName, genFrunPkgTmpl, &tv); err != nil { - return - } - - // remove outfile, so "go run ..." will not think that types in outfile already exist. - os.Remove(outfile) - - // execute go run frun - cmd := exec.Command("go", "run", "-tags="+goRunTag, frunMainName) //, frunPkg.Name()) - var buf bytes.Buffer - cmd.Stdout = &buf - cmd.Stderr = &buf - if err = cmd.Run(); err != nil { - err = fmt.Errorf("error running 'go run %s': %v, console: %s", - frunMainName, err, buf.Bytes()) - return - } - os.Stdout.Write(buf.Bytes()) - return -} - -func gen1(frunName, tmplStr string, tv interface{}) (frun *os.File, err error) { - os.Remove(frunName) - if frun, err = os.Create(frunName); err != nil { - return - } - defer frun.Close() - - t := template.New("") - if t, err = t.Parse(tmplStr); err != nil { - return - } - bw := bufio.NewWriter(frun) - if err = t.Execute(bw, tv); err != nil { - return - } - if err = bw.Flush(); err != nil { - return - } - return -} - -func main() { - o := flag.String("o", "", "out file") - c := flag.String("c", genCodecPath, "codec path") - t := flag.String("t", "", "build tag to put in file") - r := flag.String("r", ".*", "regex for type name to match") - rt := flag.String("rt", "", "tags for go run") - st := flag.String("st", "codec,json", "struct tag keys to introspect") - x := flag.Bool("x", false, "keep temp file") - u := flag.Bool("u", false, "Use unsafe, e.g. to avoid unnecessary allocation on []byte->string") - d := flag.Int64("d", 0, "random identifier for use in generated code") - flag.Parse() - if err := Generate(*o, *t, *c, *d, *u, *rt, *st, - regexp.MustCompile(*r), !*x, flag.Args()...); err != nil { - fmt.Fprintf(os.Stderr, "codecgen error: %v\n", err) - os.Exit(1) - } -} diff --git a/vendor/github.com/ugorji/go/codec/codecgen/z.go b/vendor/github.com/ugorji/go/codec/codecgen/z.go deleted file mode 100644 index e120a4eb9..000000000 --- a/vendor/github.com/ugorji/go/codec/codecgen/z.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -const genCodecPath = "github.com/ugorji/go/codec" diff --git a/vendor/github.com/ugorji/go/codec/prebuild.sh b/vendor/github.com/ugorji/go/codec/prebuild.sh old mode 100755 new mode 100644 diff --git a/vendor/github.com/ugorji/go/codec/test.py b/vendor/github.com/ugorji/go/codec/test.py old mode 100755 new mode 100644 diff --git a/vendor/github.com/ugorji/go/codec/tests.sh b/vendor/github.com/ugorji/go/codec/tests.sh old mode 100755 new mode 100644 diff --git a/vendor/github.com/vmware/govmomi/.drone.sec b/vendor/github.com/vmware/govmomi/.drone.sec new file mode 100644 index 000000000..ad52e59ac --- /dev/null +++ b/vendor/github.com/vmware/govmomi/.drone.sec @@ -0,0 +1 @@ +eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.kK6pryC8R-O1R0Gj9ydLvQuIZlcYLGze23WdW7xbpiEEKdz6nweJrMm7ysy8lgu1tM47JVo19p2_b26bNKSQshCUOETvd7Hb2UMZOjnyUnqdyAAyoi6UkIquXfUUbHTNS0iMxwSxxW9KMp2GXNq8-o6T8xQZTDirBJFKKd8ZNUasTaoa5j8U9IfdR1aCavTBuOhvk8IVs-jSbY5TVJMJiE0IOPXois7aRJ6uAiANQBk9VKLegEcZD_qAewecXHDsHi-u0jbmg3o3PPaJaK_Qv5dsPlR2M-E2kE3AGUn0-zn5zYRngoAZ8WZr2O4GvLdltJKq9i2z7jOrdOzzRcDRow.96qvwl_E1Hj15u7Q.hWs-jQ8FsqQFD7pE9N-UEP1BWQ9rsJIcCaPvQRIp8Fukm_vvlw9YEaEq0ERLrsUWsJWpd1ca8_h8x7xD6f_d5YppwRqRHIeGIsdBOTMhNs0lG8ikkQXLat-UroCpy8EC17nuUtDE2E2Kdxrk4Cdd6Bk-dKk0Ta4w3Ud0YBKa.P8zrO7xizgv0i98eVWWzEg \ No newline at end of file diff --git a/vendor/github.com/vmware/govmomi/.drone.yml b/vendor/github.com/vmware/govmomi/.drone.yml new file mode 100644 index 000000000..dee4bf5b3 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/.drone.yml @@ -0,0 +1,17 @@ +clone: + tags: true + path: github.com/vmware/govmomi +build: + image: golang:1.7 + pull: true + environment: + - GOVC_TEST_URL=$$GOVC_TEST_URL + - GOVC_INSECURE=1 + - VCA=1 + commands: + - make all install + - git clone https://github.com/sstephenson/bats.git /tmp/bats + - /tmp/bats/install.sh /usr/local + - apt-get -qq update && apt-get install -yqq uuid-runtime bsdmainutils jq + - govc/test/images/update.sh + - bats govc/test diff --git a/vendor/github.com/vmware/govmomi/.gitignore b/vendor/github.com/vmware/govmomi/.gitignore new file mode 100644 index 000000000..769c24400 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/.gitignore @@ -0,0 +1 @@ +secrets.yml diff --git a/vendor/github.com/vmware/govmomi/.mailmap b/vendor/github.com/vmware/govmomi/.mailmap new file mode 100644 index 000000000..b6f07fac3 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/.mailmap @@ -0,0 +1,17 @@ +Amit Bathla +Bruce Downs +Bruce Downs +Clint Greenwood +Cédric Blomart +Cédric Blomart cedric +David Stark +Eric Gray +Eric Yutao eric +Henrik Hodne +Jeremy Canady +Pieter Noordhuis +Takaaki Furukawa takaaki.furukawa +Takaaki Furukawa tkak +Vadim Egorov +Zach Tucker +Zee Yang diff --git a/vendor/github.com/vmware/govmomi/.travis.yml b/vendor/github.com/vmware/govmomi/.travis.yml new file mode 100644 index 000000000..23798f283 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/.travis.yml @@ -0,0 +1,12 @@ +sudo: false + +language: go + +go: + - 1.8 + +before_install: + - make vendor + +script: + - make check test diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index 122c03e70..e86e89661 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -484,6 +484,7 @@ userAuthLoop: // sig.Format. This is usually the same, but // for certs, the names differ. if !isAcceptableAlgo(sig.Format) { + authErr = fmt.Errorf("ssh: algorithm %q not accepted", sig.Format) break } signedData := buildDataSignedForAuth(sessionID, userAuthReq, algoBytes, pubKeyData) diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util.go b/vendor/golang.org/x/crypto/ssh/terminal/util.go index 731c89a28..391104084 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd +// +build aix darwin dragonfly freebsd linux,!appengine netbsd openbsd // Package terminal provides support functions for dealing with terminals, as // commonly found on UNIX systems. @@ -25,7 +25,7 @@ type State struct { termios unix.Termios } -// IsTerminal returns true if the given file descriptor is a terminal. +// IsTerminal returns whether the given file descriptor is a terminal. func IsTerminal(fd int) bool { _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) return err == nil diff --git a/vendor/github.com/sirupsen/logrus/terminal_linux.go b/vendor/golang.org/x/crypto/ssh/terminal/util_aix.go similarity index 53% rename from vendor/github.com/sirupsen/logrus/terminal_linux.go rename to vendor/golang.org/x/crypto/ssh/terminal/util_aix.go index f29a0097c..dfcd62785 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_linux.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_aix.go @@ -1,14 +1,12 @@ -// Based on ssh/terminal: -// Copyright 2013 The Go Authors. All rights reserved. +// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !appengine,!gopherjs +// +build aix -package logrus +package terminal import "golang.org/x/sys/unix" const ioctlReadTermios = unix.TCGETS - -type Termios unix.Termios +const ioctlWriteTermios = unix.TCSETS diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go b/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go index 799f049f0..9317ac7ed 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go @@ -21,7 +21,7 @@ import ( type State struct{} -// IsTerminal returns true if the given file descriptor is a terminal. +// IsTerminal returns whether the given file descriptor is a terminal. func IsTerminal(fd int) bool { return false } diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go index 9e41b9f43..3d5f06a9f 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go @@ -17,7 +17,7 @@ type State struct { termios unix.Termios } -// IsTerminal returns true if the given file descriptor is a terminal. +// IsTerminal returns whether the given file descriptor is a terminal. func IsTerminal(fd int) bool { _, err := unix.IoctlGetTermio(fd, unix.TCGETA) return err == nil diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go b/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go index 8618955df..6cb8a9503 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go @@ -26,7 +26,7 @@ type State struct { mode uint32 } -// IsTerminal returns true if the given file descriptor is a terminal. +// IsTerminal returns whether the given file descriptor is a terminal. func IsTerminal(fd int) bool { var st uint32 err := windows.GetConsoleMode(windows.Handle(fd), &st) diff --git a/vendor/gopkg.in/yaml.v2/.travis.yml b/vendor/gopkg.in/yaml.v2/.travis.yml new file mode 100644 index 000000000..9f556934d --- /dev/null +++ b/vendor/gopkg.in/yaml.v2/.travis.yml @@ -0,0 +1,12 @@ +language: go + +go: + - 1.4 + - 1.5 + - 1.6 + - 1.7 + - 1.8 + - 1.9 + - tip + +go_import_path: gopkg.in/yaml.v2 diff --git a/vendor/gopkg.in/yaml.v2/encode.go b/vendor/gopkg.in/yaml.v2/encode.go index a14435e82..0ee738e11 100644 --- a/vendor/gopkg.in/yaml.v2/encode.go +++ b/vendor/gopkg.in/yaml.v2/encode.go @@ -13,6 +13,19 @@ import ( "unicode/utf8" ) +// jsonNumber is the interface of the encoding/json.Number datatype. +// Repeating the interface here avoids a dependency on encoding/json, and also +// supports other libraries like jsoniter, which use a similar datatype with +// the same interface. Detecting this interface is useful when dealing with +// structures containing json.Number, which is a string under the hood. The +// encoder should prefer the use of Int64(), Float64() and string(), in that +// order, when encoding this type. +type jsonNumber interface { + Float64() (float64, error) + Int64() (int64, error) + String() string +} + type encoder struct { emitter yaml_emitter_t event yaml_event_t @@ -89,6 +102,21 @@ func (e *encoder) marshal(tag string, in reflect.Value) { } iface := in.Interface() switch m := iface.(type) { + case jsonNumber: + integer, err := m.Int64() + if err == nil { + // In this case the json.Number is a valid int64 + in = reflect.ValueOf(integer) + break + } + float, err := m.Float64() + if err == nil { + // In this case the json.Number is a valid float64 + in = reflect.ValueOf(float) + break + } + // fallback case - no number could be obtained + in = reflect.ValueOf(m.String()) case time.Time, *time.Time: // Although time.Time implements TextMarshaler, // we don't want to treat it as a string for YAML diff --git a/vendor/modules.txt b/vendor/modules.txt new file mode 100644 index 000000000..bc658b7dc --- /dev/null +++ b/vendor/modules.txt @@ -0,0 +1,527 @@ +# cloud.google.com/go v0.36.0 +cloud.google.com/go/compute/metadata +cloud.google.com/go/storage +cloud.google.com/go/iam +cloud.google.com/go/internal +cloud.google.com/go/internal/optional +cloud.google.com/go/internal/trace +cloud.google.com/go/internal/version +# github.com/1and1/oneandone-cloudserver-sdk-go v1.0.1 +github.com/1and1/oneandone-cloudserver-sdk-go +# github.com/Azure/azure-sdk-for-go v17.3.1+incompatible +github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute +github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network +github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources +github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage +github.com/Azure/azure-sdk-for-go/storage +github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions +github.com/Azure/azure-sdk-for-go/version +# github.com/Azure/go-autorest v10.12.0+incompatible +github.com/Azure/go-autorest/autorest +github.com/Azure/go-autorest/autorest/adal +github.com/Azure/go-autorest/autorest/azure +github.com/Azure/go-autorest/autorest/to +github.com/Azure/go-autorest/autorest/date +github.com/Azure/go-autorest/autorest/validation +# github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4 +github.com/Azure/go-ntlmssp +# github.com/ChrisTrenkamp/goxpath v0.0.0-20170625215350-4fe035839290 +github.com/ChrisTrenkamp/goxpath +github.com/ChrisTrenkamp/goxpath/tree/xmltree +github.com/ChrisTrenkamp/goxpath/tree +github.com/ChrisTrenkamp/goxpath/internal/execxp +github.com/ChrisTrenkamp/goxpath/internal/parser +github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlbuilder +github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele +github.com/ChrisTrenkamp/goxpath/internal/lexer +github.com/ChrisTrenkamp/goxpath/internal/parser/findutil +github.com/ChrisTrenkamp/goxpath/internal/parser/intfns +github.com/ChrisTrenkamp/goxpath/internal/parser/pathexpr +github.com/ChrisTrenkamp/goxpath/internal/xconst +github.com/ChrisTrenkamp/goxpath/internal/xsort +github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlnode +# github.com/NaverCloudPlatform/ncloud-sdk-go v0.0.0-20180110055012-c2e73f942591 +github.com/NaverCloudPlatform/ncloud-sdk-go/sdk +github.com/NaverCloudPlatform/ncloud-sdk-go/common +github.com/NaverCloudPlatform/ncloud-sdk-go/request +github.com/NaverCloudPlatform/ncloud-sdk-go/oauth +# github.com/Telmate/proxmox-api-go v0.0.0-20190410200643-f08824d5082d +github.com/Telmate/proxmox-api-go/proxmox +# github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f +github.com/aliyun/aliyun-oss-go-sdk/oss +# github.com/antchfx/xpath v0.0.0-20170728053731-b5c552e1acbd +github.com/antchfx/xpath +# github.com/antchfx/xquery v0.0.0-20170730121040-eb8c3c172607 +github.com/antchfx/xquery/xml +# github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 +github.com/antihax/optional +# github.com/approvals/go-approval-tests v0.0.0-20160714161514-ad96e53bea43 +github.com/approvals/go-approval-tests +github.com/approvals/go-approval-tests/reporters +github.com/approvals/go-approval-tests/utils +# github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da +github.com/armon/go-metrics +# github.com/armon/go-radix v1.0.0 +github.com/armon/go-radix +# github.com/aws/aws-sdk-go v1.16.24 +github.com/aws/aws-sdk-go/aws +github.com/aws/aws-sdk-go/aws/ec2metadata +github.com/aws/aws-sdk-go/aws/session +github.com/aws/aws-sdk-go/service/ec2 +github.com/aws/aws-sdk-go/aws/awserr +github.com/aws/aws-sdk-go/aws/credentials +github.com/aws/aws-sdk-go/aws/request +github.com/aws/aws-sdk-go/service/ec2/ec2iface +github.com/aws/aws-sdk-go/service/sts +github.com/aws/aws-sdk-go/service/ecr +github.com/aws/aws-sdk-go/service/s3 +github.com/aws/aws-sdk-go/service/s3/s3manager +github.com/aws/aws-sdk-go/aws/endpoints +github.com/aws/aws-sdk-go/internal/sdkio +github.com/aws/aws-sdk-go/aws/client +github.com/aws/aws-sdk-go/aws/client/metadata +github.com/aws/aws-sdk-go/aws/corehandlers +github.com/aws/aws-sdk-go/internal/sdkuri +github.com/aws/aws-sdk-go/aws/credentials/processcreds +github.com/aws/aws-sdk-go/aws/credentials/stscreds +github.com/aws/aws-sdk-go/aws/csm +github.com/aws/aws-sdk-go/aws/defaults +github.com/aws/aws-sdk-go/internal/ini +github.com/aws/aws-sdk-go/internal/shareddefaults +github.com/aws/aws-sdk-go/aws/awsutil +github.com/aws/aws-sdk-go/aws/signer/v4 +github.com/aws/aws-sdk-go/internal/sdkrand +github.com/aws/aws-sdk-go/private/protocol +github.com/aws/aws-sdk-go/private/protocol/ec2query +github.com/aws/aws-sdk-go/private/protocol/query +github.com/aws/aws-sdk-go/private/protocol/jsonrpc +github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds +github.com/aws/aws-sdk-go/internal/s3err +github.com/aws/aws-sdk-go/private/protocol/eventstream +github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi +github.com/aws/aws-sdk-go/private/protocol/rest +github.com/aws/aws-sdk-go/private/protocol/restxml +github.com/aws/aws-sdk-go/service/s3/s3iface +github.com/aws/aws-sdk-go/aws/credentials/endpointcreds +github.com/aws/aws-sdk-go/private/protocol/query/queryutil +github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil +github.com/aws/aws-sdk-go/private/protocol/json/jsonutil +# github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d +github.com/bgentry/go-netrc/netrc +# github.com/bgentry/speakeasy v0.1.0 +github.com/bgentry/speakeasy +# github.com/biogo/hts v0.0.0-20160420073057-50da7d4131a3 +github.com/biogo/hts/bgzf +# github.com/cheggaaa/pb v1.0.27 +github.com/cheggaaa/pb +# github.com/creack/goselect v0.0.0-20180210034346-528c74964609 +github.com/creack/goselect +# github.com/davecgh/go-spew v1.1.1 +github.com/davecgh/go-spew/spew +# github.com/denverdino/aliyungo v0.0.0-20190220033614-36e2ae938978 +github.com/denverdino/aliyungo/common +github.com/denverdino/aliyungo/ecs +github.com/denverdino/aliyungo/ram +github.com/denverdino/aliyungo/util +# github.com/dgrijalva/jwt-go v3.2.0+incompatible +github.com/dgrijalva/jwt-go +# github.com/digitalocean/godo v1.11.1 +github.com/digitalocean/godo +# github.com/docker/docker v0.0.0-20180422163414-57142e89befe +github.com/docker/docker/pkg/namesgenerator +# github.com/dustin/go-humanize v1.0.0 +github.com/dustin/go-humanize +# github.com/dylanmei/iso8601 v0.1.0 +github.com/dylanmei/iso8601 +# github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 +github.com/dylanmei/winrmtest +# github.com/fatih/color v1.7.0 +github.com/fatih/color +# github.com/go-ini/ini v1.25.4 +github.com/go-ini/ini +# github.com/gofrs/flock v0.7.1 +github.com/gofrs/flock +# github.com/golang/protobuf v1.2.0 +github.com/golang/protobuf/proto +github.com/golang/protobuf/ptypes +github.com/golang/protobuf/protoc-gen-go/descriptor +github.com/golang/protobuf/ptypes/any +github.com/golang/protobuf/ptypes/duration +github.com/golang/protobuf/ptypes/timestamp +# github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db +github.com/golang/snappy +# github.com/google/go-cmp v0.2.0 +github.com/google/go-cmp/cmp +github.com/google/go-cmp/cmp/internal/diff +github.com/google/go-cmp/cmp/internal/function +github.com/google/go-cmp/cmp/internal/value +# github.com/google/go-querystring v1.0.0 +github.com/google/go-querystring/query +# github.com/google/shlex v0.0.0-20150127133951-6f45313302b9 +github.com/google/shlex +# github.com/google/uuid v1.0.0 +github.com/google/uuid +# github.com/googleapis/gax-go/v2 v2.0.3 +github.com/googleapis/gax-go/v2 +# github.com/gophercloud/gophercloud v0.0.0-20180903124057-ea7289ebdf06 +github.com/gophercloud/gophercloud +github.com/gophercloud/gophercloud/openstack +github.com/gophercloud/gophercloud/openstack/blockstorage/extensions/volumeactions +github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes +github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces +github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/bootfromvolume +github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/keypairs +github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/startstop +github.com/gophercloud/gophercloud/openstack/compute/v2/flavors +github.com/gophercloud/gophercloud/openstack/compute/v2/servers +github.com/gophercloud/gophercloud/openstack/imageservice/v2/images +github.com/gophercloud/gophercloud/openstack/imageservice/v2/members +github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external +github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips +github.com/gophercloud/gophercloud/openstack/networking/v2/networks +github.com/gophercloud/gophercloud/pagination +github.com/gophercloud/gophercloud/openstack/identity/v2/tokens +github.com/gophercloud/gophercloud/openstack/identity/v3/tokens +github.com/gophercloud/gophercloud/openstack/utils +github.com/gophercloud/gophercloud/openstack/compute/v2/images +github.com/gophercloud/gophercloud/internal +github.com/gophercloud/gophercloud/openstack/identity/v2/tenants +# github.com/gophercloud/utils v0.0.0-20190124192022-a5c25e7a53a6 +github.com/gophercloud/utils/openstack/clientconfig +# github.com/gorilla/websocket v0.0.0-20170319172727-a91eba7f9777 +github.com/gorilla/websocket +# github.com/hashicorp/consul v1.4.0 +github.com/hashicorp/consul/api +# github.com/hashicorp/errwrap v1.0.0 +github.com/hashicorp/errwrap +# github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de +github.com/hashicorp/go-checkpoint +# github.com/hashicorp/go-cleanhttp v0.5.0 +github.com/hashicorp/go-cleanhttp +# github.com/hashicorp/go-getter v1.2.0 +github.com/hashicorp/go-getter +github.com/hashicorp/go-getter/helper/url +# github.com/hashicorp/go-immutable-radix v1.0.0 +github.com/hashicorp/go-immutable-radix +# github.com/hashicorp/go-multierror v1.0.0 +github.com/hashicorp/go-multierror +# github.com/hashicorp/go-oracle-terraform v0.0.0-20181016190316-007121241b79 +github.com/hashicorp/go-oracle-terraform/compute +github.com/hashicorp/go-oracle-terraform/opc +github.com/hashicorp/go-oracle-terraform/client +# github.com/hashicorp/go-retryablehttp v0.5.2 +github.com/hashicorp/go-retryablehttp +# github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 +github.com/hashicorp/go-rootcerts +# github.com/hashicorp/go-safetemp v1.0.0 +github.com/hashicorp/go-safetemp +# github.com/hashicorp/go-sockaddr v1.0.0 +github.com/hashicorp/go-sockaddr +# github.com/hashicorp/go-uuid v1.0.1 +github.com/hashicorp/go-uuid +# github.com/hashicorp/go-version v1.1.0 +github.com/hashicorp/go-version +# github.com/hashicorp/golang-lru v0.5.0 +github.com/hashicorp/golang-lru/simplelru +# github.com/hashicorp/hcl v1.0.0 +github.com/hashicorp/hcl +github.com/hashicorp/hcl/hcl/ast +github.com/hashicorp/hcl/hcl/parser +github.com/hashicorp/hcl/hcl/token +github.com/hashicorp/hcl/json/parser +github.com/hashicorp/hcl/hcl/scanner +github.com/hashicorp/hcl/hcl/strconv +github.com/hashicorp/hcl/json/scanner +github.com/hashicorp/hcl/json/token +# github.com/hashicorp/serf v0.8.2 +github.com/hashicorp/serf/coordinate +# github.com/hashicorp/vault v1.1.0 +github.com/hashicorp/vault/api +github.com/hashicorp/vault/helper/consts +github.com/hashicorp/vault/helper/hclutil +github.com/hashicorp/vault/helper/jsonutil +github.com/hashicorp/vault/helper/parseutil +github.com/hashicorp/vault/helper/compressutil +github.com/hashicorp/vault/helper/strutil +# github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d +github.com/hashicorp/yamux +# github.com/hetznercloud/hcloud-go v1.12.0 +github.com/hetznercloud/hcloud-go/hcloud +github.com/hetznercloud/hcloud-go/hcloud/schema +# github.com/hyperonecom/h1-client-go v0.0.0-20190122232013-cf38e8387775 +github.com/hyperonecom/h1-client-go +# github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af +github.com/jmespath/go-jmespath +# github.com/joyent/triton-go v0.0.0-20180116165742-545edbe0d564 +github.com/joyent/triton-go +github.com/joyent/triton-go/authentication +github.com/joyent/triton-go/compute +github.com/joyent/triton-go/errors +github.com/joyent/triton-go/network +github.com/joyent/triton-go/client +# github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 +github.com/kardianos/osext +# github.com/klauspost/compress v0.0.0-20160131094358-f86d2e6d8a77 +github.com/klauspost/compress/flate +# github.com/klauspost/cpuid v0.0.0-20160106104451-349c67577817 +github.com/klauspost/cpuid +# github.com/klauspost/crc32 v0.0.0-20160114101742-999f3125931f +github.com/klauspost/crc32 +# github.com/klauspost/pgzip v0.0.0-20151221113845-47f36e165cec +github.com/klauspost/pgzip +# github.com/konsorten/go-windows-terminal-sequences v1.0.1 +github.com/konsorten/go-windows-terminal-sequences +# github.com/kr/fs v0.0.0-20131111012553-2788f0dbd169 +github.com/kr/fs +# github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c +github.com/marstr/guid +# github.com/masterzen/azure-sdk-for-go v0.0.0-20161014135628-ee4f0065d00c +github.com/masterzen/azure-sdk-for-go/core/http +github.com/masterzen/azure-sdk-for-go/core/tls +# github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 +github.com/masterzen/simplexml/dom +# github.com/masterzen/winrm v0.0.0-20180224160350-7e40f93ae939 +github.com/masterzen/winrm +github.com/masterzen/winrm/soap +# github.com/mattn/go-colorable v0.0.9 +github.com/mattn/go-colorable +# github.com/mattn/go-isatty v0.0.4 +github.com/mattn/go-isatty +# github.com/mattn/go-runewidth v0.0.4 +github.com/mattn/go-runewidth +# github.com/mattn/go-tty v0.0.0-20190407112021-83fae09cc007 +github.com/mattn/go-tty +# github.com/mitchellh/cli v1.0.0 +github.com/mitchellh/cli +# github.com/mitchellh/go-fs v0.0.0-20180402234041-7b48fa161ea7 +github.com/mitchellh/go-fs +github.com/mitchellh/go-fs/fat +# github.com/mitchellh/go-homedir v1.0.0 +github.com/mitchellh/go-homedir +# github.com/mitchellh/go-testing-interface v1.0.0 +github.com/mitchellh/go-testing-interface +# github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed +github.com/mitchellh/go-vnc +# github.com/mitchellh/iochan v1.0.1-0.20190408094311-e9f5309a3061 +github.com/mitchellh/iochan +# github.com/mitchellh/mapstructure v0.0.0-20180111000720-b4575eea38cc +github.com/mitchellh/mapstructure +# github.com/mitchellh/panicwrap v0.0.0-20170106182340-fce601fe5557 +github.com/mitchellh/panicwrap +# github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784 +github.com/mitchellh/prefixedio +# github.com/mitchellh/reflectwalk v1.0.0 +github.com/mitchellh/reflectwalk +# github.com/moul/anonuuid v0.0.0-20160222162117-609b752a95ef +github.com/moul/anonuuid +# github.com/moul/gotty-client v0.0.0-20180327180212-b26a57ebc215 +github.com/moul/gotty-client +# github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d +github.com/nu7hatch/gouuid +# github.com/olekukonko/tablewriter v0.0.0-20180105111133-96aac992fc8b +github.com/olekukonko/tablewriter +# github.com/oracle/oci-go-sdk v1.8.0 +github.com/oracle/oci-go-sdk/common +github.com/oracle/oci-go-sdk/core +# github.com/packer-community/winrmcp v0.0.0-20180921204643-0fd363d6159a +github.com/packer-community/winrmcp/winrmcp +# github.com/pierrec/lz4 v2.0.5+incompatible +github.com/pierrec/lz4 +github.com/pierrec/lz4/internal/xxh32 +# github.com/pkg/errors v0.8.0 +github.com/pkg/errors +# github.com/pkg/sftp v0.0.0-20160118190721-e84cc8c755ca +github.com/pkg/sftp +# github.com/pmezard/go-difflib v1.0.0 +github.com/pmezard/go-difflib/difflib +# github.com/posener/complete v1.1.1 +github.com/posener/complete +github.com/posener/complete/cmd/install +github.com/posener/complete/cmd +github.com/posener/complete/match +# github.com/profitbricks/profitbricks-sdk-go v4.0.2+incompatible +github.com/profitbricks/profitbricks-sdk-go +# github.com/renstrom/fuzzysearch v0.0.0-20160331204855-2d205ac6ec17 +github.com/renstrom/fuzzysearch/fuzzy +# github.com/rwtodd/Go.Sed v0.0.0-20170507045331-d6d5d585814e +github.com/rwtodd/Go.Sed/sed +# github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 +github.com/ryanuber/go-glob +# github.com/satori/go.uuid v1.2.0 +github.com/satori/go.uuid +# github.com/scaleway/scaleway-cli v0.0.0-20180921094345-7b12c9699d70 +github.com/scaleway/scaleway-cli/pkg/api +github.com/scaleway/scaleway-cli/pkg/utils +github.com/scaleway/scaleway-cli/pkg/sshcommand +# github.com/sirupsen/logrus v1.2.0 +github.com/sirupsen/logrus +# github.com/stretchr/testify v1.3.0 +github.com/stretchr/testify/assert +# github.com/tencentcloud/tencentcloud-sdk-go v0.0.0-20181220135002-f1744d40d346 +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312 +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312 +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors +# github.com/ugorji/go v0.0.0-20151218193438-646ae4a518c1 +github.com/ugorji/go/codec +# github.com/ulikunitz/xz v0.5.5 +github.com/ulikunitz/xz +github.com/ulikunitz/xz/internal/xlog +github.com/ulikunitz/xz/lzma +github.com/ulikunitz/xz/internal/hash +# github.com/vmware/govmomi v0.0.0-20170707011325-c2105a174311 +github.com/vmware/govmomi +github.com/vmware/govmomi/find +github.com/vmware/govmomi/object +github.com/vmware/govmomi/vim25/types +github.com/vmware/govmomi/property +github.com/vmware/govmomi/session +github.com/vmware/govmomi/vim25 +github.com/vmware/govmomi/vim25/soap +github.com/vmware/govmomi/list +github.com/vmware/govmomi/vim25/mo +github.com/vmware/govmomi/task +github.com/vmware/govmomi/vim25/methods +github.com/vmware/govmomi/vim25/progress +github.com/vmware/govmomi/vim25/debug +github.com/vmware/govmomi/vim25/xml +# github.com/xanzy/go-cloudstack v2.4.1+incompatible +github.com/xanzy/go-cloudstack/cloudstack +# go.opencensus.io v0.18.0 +go.opencensus.io/trace +go.opencensus.io/plugin/ochttp +go.opencensus.io/exemplar +go.opencensus.io/internal +go.opencensus.io/trace/internal +go.opencensus.io/trace/tracestate +go.opencensus.io/plugin/ochttp/propagation/b3 +go.opencensus.io/stats +go.opencensus.io/stats/view +go.opencensus.io/tag +go.opencensus.io/trace/propagation +go.opencensus.io +go.opencensus.io/stats/internal +go.opencensus.io/internal/tagencoding +# golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 +golang.org/x/crypto/ssh +golang.org/x/crypto/ssh/agent +golang.org/x/crypto/curve25519 +golang.org/x/crypto/ed25519 +golang.org/x/crypto/internal/chacha20 +golang.org/x/crypto/poly1305 +golang.org/x/crypto/md4 +golang.org/x/crypto/ed25519/internal/edwards25519 +golang.org/x/crypto/internal/subtle +golang.org/x/crypto/ssh/terminal +# golang.org/x/net v0.0.0-20190213061140-3a22650c66bd +golang.org/x/net/proxy +golang.org/x/net/http2 +golang.org/x/net/html/charset +golang.org/x/net/internal/socks +golang.org/x/net/http/httpguts +golang.org/x/net/http2/hpack +golang.org/x/net/idna +golang.org/x/net/context/ctxhttp +golang.org/x/net/context +golang.org/x/net/html +golang.org/x/net/html/atom +golang.org/x/net/trace +golang.org/x/net/internal/timeseries +# golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 +golang.org/x/oauth2 +golang.org/x/oauth2/google +golang.org/x/oauth2/jwt +golang.org/x/oauth2/internal +golang.org/x/oauth2/jws +# golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 +golang.org/x/sync/errgroup +# golang.org/x/sys v0.0.0-20181218192612-074acd46bca6 +golang.org/x/sys/unix +golang.org/x/sys/windows +# golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 +golang.org/x/text/encoding +golang.org/x/text/encoding/charmap +golang.org/x/text/encoding/htmlindex +golang.org/x/text/transform +golang.org/x/text/secure/bidirule +golang.org/x/text/unicode/bidi +golang.org/x/text/unicode/norm +golang.org/x/text/language +golang.org/x/text/encoding/internal/identifier +golang.org/x/text/encoding/internal +golang.org/x/text/encoding/japanese +golang.org/x/text/encoding/korean +golang.org/x/text/encoding/simplifiedchinese +golang.org/x/text/encoding/traditionalchinese +golang.org/x/text/encoding/unicode +golang.org/x/text/internal/language +golang.org/x/text/internal/language/compact +golang.org/x/text/internal/utf8internal +golang.org/x/text/runes +golang.org/x/text/internal/tag +# golang.org/x/time v0.0.0-20181108054448-85acf8d2951c +golang.org/x/time/rate +# google.golang.org/api v0.1.0 +google.golang.org/api/compute/v1 +google.golang.org/api/storage/v1 +google.golang.org/api/gensupport +google.golang.org/api/googleapi +google.golang.org/api/iterator +google.golang.org/api/googleapi/internal/uritemplates +google.golang.org/api/option +google.golang.org/api/transport/http +google.golang.org/api/internal +google.golang.org/api/googleapi/transport +google.golang.org/api/transport/http/internal/propagation +# google.golang.org/appengine v1.4.0 +google.golang.org/appengine +google.golang.org/appengine/urlfetch +google.golang.org/appengine/internal +google.golang.org/appengine/internal/app_identity +google.golang.org/appengine/internal/modules +google.golang.org/appengine/internal/urlfetch +google.golang.org/appengine/internal/base +google.golang.org/appengine/internal/datastore +google.golang.org/appengine/internal/log +google.golang.org/appengine/internal/remote_api +# google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922 +google.golang.org/genproto/googleapis/iam/v1 +google.golang.org/genproto/googleapis/rpc/code +google.golang.org/genproto/googleapis/api/annotations +google.golang.org/genproto/googleapis/rpc/status +# google.golang.org/grpc v1.17.0 +google.golang.org/grpc +google.golang.org/grpc/codes +google.golang.org/grpc/metadata +google.golang.org/grpc/status +google.golang.org/grpc/balancer +google.golang.org/grpc/balancer/roundrobin +google.golang.org/grpc/connectivity +google.golang.org/grpc/credentials +google.golang.org/grpc/encoding +google.golang.org/grpc/encoding/proto +google.golang.org/grpc/grpclog +google.golang.org/grpc/internal +google.golang.org/grpc/internal/backoff +google.golang.org/grpc/internal/binarylog +google.golang.org/grpc/internal/channelz +google.golang.org/grpc/internal/envconfig +google.golang.org/grpc/internal/grpcrand +google.golang.org/grpc/internal/grpcsync +google.golang.org/grpc/internal/transport +google.golang.org/grpc/keepalive +google.golang.org/grpc/naming +google.golang.org/grpc/peer +google.golang.org/grpc/resolver +google.golang.org/grpc/resolver/dns +google.golang.org/grpc/resolver/passthrough +google.golang.org/grpc/stats +google.golang.org/grpc/tap +google.golang.org/grpc/balancer/base +google.golang.org/grpc/credentials/internal +google.golang.org/grpc/binarylog/grpc_binarylog_v1 +google.golang.org/grpc/internal/syscall +# gopkg.in/yaml.v2 v2.2.2 +gopkg.in/yaml.v2 diff --git a/vendor/vendor.json b/vendor/vendor.json deleted file mode 100644 index 738aef533..000000000 --- a/vendor/vendor.json +++ /dev/null @@ -1,2127 +0,0 @@ -{ - "comment": "", - "ignore": "test appengine", - "package": [ - { - "checksumSHA1": "aABATU51PlDHfGeSe5cc9udwSXg=", - "path": "github.com/1and1/oneandone-cloudserver-sdk-go", - "revision": "5678f03fc801525df794f953aa82f5ad7555a2ef", - "revisionTime": "2016-08-11T22:04:02Z" - }, - { - "checksumSHA1": "TY1n3V3oj1YcvXPTUVnlRlNfGow=", - "path": "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute", - "revision": "ef33a0a23b66ba5e81f699d03dc48b723c1bad50", - "revisionTime": "2018-06-15T22:13:27Z", - "version": "v17.3.1", - "versionExact": "v17.3.1" - }, - { - "checksumSHA1": "qzopX7CTZDrbARD7A8DBBbevmyM=", - "path": "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network", - "revision": "ef33a0a23b66ba5e81f699d03dc48b723c1bad50", - "revisionTime": "2018-06-15T22:13:27Z", - "version": "v17.3.1", - "versionExact": "v17.3.1" - }, - { - "checksumSHA1": "DJY5zDEcGa82/Hbfud8lgHCuvU4=", - "path": "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions", - "revision": "ef33a0a23b66ba5e81f699d03dc48b723c1bad50", - "revisionTime": "2018-06-15T22:13:27Z", - "version": "v17.3.1", - "versionExact": "v17.3.1" - }, - { - "checksumSHA1": "928vJH7PbmZ6/3pG5GIlaw+h7B4=", - "path": "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources", - "revision": "ef33a0a23b66ba5e81f699d03dc48b723c1bad50", - "revisionTime": "2018-06-15T22:13:27Z", - "version": "v17.3.1", - "versionExact": "v17.3.1" - }, - { - "checksumSHA1": "ySkjHczHi2zN8B1TuWfvKVLGetw=", - "path": "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage", - "revision": "ef33a0a23b66ba5e81f699d03dc48b723c1bad50", - "revisionTime": "2018-06-15T22:13:27Z", - "version": "v17.3.1", - "versionExact": "v17.3.1" - }, - { - "checksumSHA1": "m3K3q/zhkmRtlIGWqMWgqzWR6C4=", - "path": "github.com/Azure/azure-sdk-for-go/storage", - "revision": "ef33a0a23b66ba5e81f699d03dc48b723c1bad50", - "revisionTime": "2018-06-15T22:13:27Z", - "version": "v17.3.1", - "versionExact": "v17.3.1" - }, - { - "checksumSHA1": "Zl5uxmDmvXF6ADQsggG50XCiWmY=", - "path": "github.com/Azure/azure-sdk-for-go/version", - "revision": "ef33a0a23b66ba5e81f699d03dc48b723c1bad50", - "revisionTime": "2018-06-15T22:13:27Z", - "version": "v17.3.1", - "versionExact": "v17.3.1" - }, - { - "checksumSHA1": "4Ba4uKXCFYkXa54FD7NyI8EsXG4=", - "comment": "v7.0.7", - "path": "github.com/Azure/go-autorest/autorest", - "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", - "revisionTime": "2018-06-28T21:22:21Z", - "version": "v10.12.0", - "versionExact": "v10.12.0" - }, - { - "checksumSHA1": "dMSqbz496pHMUGW8ID67vpafGto=", - "path": "github.com/Azure/go-autorest/autorest/adal", - "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", - "revisionTime": "2018-06-28T21:22:21Z", - "version": "v10.12.0", - "versionExact": "v10.12.0" - }, - { - "checksumSHA1": "NT4tlDNlszWmb7gCXnYCkcvQxhs=", - "comment": "v7.0.7", - "path": "github.com/Azure/go-autorest/autorest/azure", - "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", - "revisionTime": "2018-06-28T21:22:21Z", - "version": "v10.12.0", - "versionExact": "v10.12.0" - }, - { - "checksumSHA1": "9nXCi9qQsYjxCeajJKWttxgEt0I=", - "comment": "v7.0.7", - "path": "github.com/Azure/go-autorest/autorest/date", - "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", - "revisionTime": "2018-06-28T21:22:21Z", - "version": "v10.12.0", - "versionExact": "v10.12.0" - }, - { - "checksumSHA1": "SbBb2GcJNm5GjuPKGL2777QywR4=", - "comment": "v7.0.7", - "path": "github.com/Azure/go-autorest/autorest/to", - "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", - "revisionTime": "2018-06-28T21:22:21Z", - "version": "v10.12.0", - "versionExact": "v10.12.0" - }, - { - "checksumSHA1": "HjdLfAF3oA2In8F3FKh/Y+BPyXk=", - "path": "github.com/Azure/go-autorest/autorest/validation", - "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", - "revisionTime": "2018-06-28T21:22:21Z", - "version": "v10.12.0", - "versionExact": "v10.12.0" - }, - { - "checksumSHA1": "4LNEtQCFSZ/NbHBdkB7XPrwO+kI=", - "path": "github.com/Azure/go-ntlmssp", - "revision": "4a21cbd618b459155f8b8ee7f4491cd54f5efa77", - "revisionTime": "2018-08-10T17:55:52Z" - }, - { - "checksumSHA1": "++XyYR/ZfYoCxGn5vTlXzQZ9eo0=", - "path": "github.com/ChrisTrenkamp/goxpath", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "1+6R+HYdVVS4O8VOqVCIqSKi+oY=", - "path": "github.com/ChrisTrenkamp/goxpath/internal/execxp", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "71fcaKxTSwiQzcTFTyCiqdd/8EU=", - "path": "github.com/ChrisTrenkamp/goxpath/internal/lexer", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "BjldQE0Gsl7CbqFa4wLQpzhmX64=", - "path": "github.com/ChrisTrenkamp/goxpath/internal/parser", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "Use9Tov7dtRIy/gv3GixcpEX5iA=", - "path": "github.com/ChrisTrenkamp/goxpath/internal/parser/findutil", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "s2jqwMBbEzDDUQrEYZF++NzQ+7I=", - "path": "github.com/ChrisTrenkamp/goxpath/internal/parser/intfns", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "zpOX2X+RjsnqZSmz3GWFq1lzOrU=", - "path": "github.com/ChrisTrenkamp/goxpath/internal/parser/pathexpr", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "ujivLLH1kuIm2qom2NFTSH5OUvQ=", - "path": "github.com/ChrisTrenkamp/goxpath/internal/xconst", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "wlR2+4lvPs2YWYZAkBrSA0gKe9I=", - "path": "github.com/ChrisTrenkamp/goxpath/internal/xsort", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "krxNPvjZJdXdhUGNkGW8JhOcT/c=", - "path": "github.com/ChrisTrenkamp/goxpath/tree", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "5XIJCUHiiwINtP9GrIs4wx+KSGA=", - "path": "github.com/ChrisTrenkamp/goxpath/tree/xmltree", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "6Lbaq/4cANAcTffrBEuNvCi2msA=", - "path": "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlbuilder", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "KsQub+ZaW39dp9tDTYNKXlxaZgk=", - "path": "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "2ZSbmMkCfHuLQanoHtVD7/kTygs=", - "path": "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlnode", - "revision": "4fe03583929022c9c96829401ffabc755e69782e", - "revisionTime": "2017-06-25T21:53:50Z" - }, - { - "checksumSHA1": "N0jIjg2HeB8fM7dt8OED2BiRZz0=", - "path": "github.com/NaverCloudPlatform/ncloud-sdk-go/common", - "revision": "c2e73f942591b0f033a3c6df00f44badb2347c38", - "revisionTime": "2018-01-10T05:50:12Z" - }, - { - "checksumSHA1": "7lT5Xmeo2MhE6CJvIInZyLBu6S8=", - "path": "github.com/NaverCloudPlatform/ncloud-sdk-go/oauth", - "revision": "c2e73f942591b0f033a3c6df00f44badb2347c38", - "revisionTime": "2018-01-10T05:50:12Z" - }, - { - "checksumSHA1": "DpfU1gyyhIc1BuKZUZDRVDBkeSc=", - "path": "github.com/NaverCloudPlatform/ncloud-sdk-go/request", - "revision": "c2e73f942591b0f033a3c6df00f44badb2347c38", - "revisionTime": "2018-01-10T05:50:12Z" - }, - { - "checksumSHA1": "QnZ2RMlms/zYbD8jg+lyS8ncQOY=", - "path": "github.com/NaverCloudPlatform/ncloud-sdk-go/sdk", - "revision": "c2e73f942591b0f033a3c6df00f44badb2347c38", - "revisionTime": "2018-01-10T05:50:12Z" - }, - { - "checksumSHA1": "xp5QPaPy/Viwiv5P8lsJVYlaQ+U=", - "path": "github.com/Telmate/proxmox-api-go/proxmox", - "revision": "7402b5d3034a3e4dea5af6afdfd106a2e353f2da", - "revisionTime": "2019-03-16T14:21:38Z" - }, - { - "checksumSHA1": "HttiPj314X1a0i2Jen1p6lRH/vE=", - "path": "github.com/aliyun/aliyun-oss-go-sdk/oss", - "revision": "e6dbea820a9f304b43d3b357dd48ced23b86df72", - "revisionTime": "2017-01-13T02:27:42Z" - }, - { - "checksumSHA1": "taUAhOa8gx2Hxqo32pXQWhi7Bhg=", - "path": "github.com/antchfx/xpath", - "revision": "b5c552e1acbdd77b5e369eab0efd1e0f9d7090e4", - "revisionTime": "2017-07-28T05:37:31Z" - }, - { - "checksumSHA1": "4X1rYuDMZj8Bkr1LcEzigyKGrwQ=", - "path": "github.com/antchfx/xquery/xml", - "revision": "eb8c3c17260731e52f9420af1508a47bfaf217a8", - "revisionTime": "2017-07-30T11:54:35Z" - }, - { - "checksumSHA1": "gc98KRYAAiw4g1FrSTsuggSNv8k=", - "path": "github.com/approvals/go-approval-tests", - "revision": "ad96e53bea43a905c17beeb983a0f9ce087dc48d" - }, - { - "checksumSHA1": "lujk/sNRt+ReyrD1Xrly9nCLR5o=", - "path": "github.com/approvals/go-approval-tests/reporters", - "revision": "ad96e53bea43a905c17beeb983a0f9ce087dc48d" - }, - { - "checksumSHA1": "J9S0x28/Ac9yamzXDEA5ZVB2SwI=", - "path": "github.com/approvals/go-approval-tests/utils", - "revision": "ad96e53bea43a905c17beeb983a0f9ce087dc48d" - }, - { - "checksumSHA1": "DUX4pOK9NKSAzC6RRXniLviyByA=", - "path": "github.com/armon/go-metrics", - "revision": "3c58d8115a78a6879e5df75ae900846768d36895", - "revisionTime": "2018-07-13T14:52:31Z" - }, - { - "checksumSHA1": "gNO0JNpLzYOdInGeq7HqMZUzx9M=", - "path": "github.com/armon/go-radix", - "revision": "4239b77079c7b5d1243b7b4736304ce8ddb6f0f2" - }, - { - "checksumSHA1": "EhKIcRUPV5xm+STIe6Jxtt5djOo=", - "path": "github.com/aws/aws-sdk-go", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "lIggV53V3S5sKtmhIZvsIApmm3o=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "I87y3G8r14yKZQ5NlkupFUJ5jW0=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "JTilCBYWVAfhbKSnrxCNhE8IFns=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "1pENtl2K9hG7qoB7R6J7dAHa82g=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "KZylhHa5CQP8deDHphHMU2tUr3o=", - "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "7AmyyJXVkMdmy8dphC3Nalx5XkI=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "mYqgKOMSGvLmrt0CoBNbqdcTM3c=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "WGg5z1n2JGCf7YIwtwlhn30svbo=", - "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "n3O/1QM1Da3Dx3GPL6iwIyhRPnM=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "Y7aklChDDsoRKhEIX/ACPnarw28=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "gQ1sGIVnPqvvxa9Ww2g/PGkk16M=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "QvKGojx+wCHTDfXQ1aoOYzH3Y88=", - "path": "github.com/aws/aws-sdk-go/internal/s3err", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", - "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", - "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "tQVg7Sz2zv+KkhbiXxPH0mh9spg=", - "path": "github.com/aws/aws-sdk-go/internal/sdkuri", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "LjfJ5ydXdiSuQixC+HrmSZjW3NU=", - "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "NHfa9brYkChSmKiBcKe+xMaJzlc=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "0cZnOaE1EcFUuiu4bdHV2k7slQg=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", - "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", - "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "tXRIRarT7qepHconxydtO7mXod4=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "v2c4B7IgTyjl7ShytqbTOqhCIoM=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "lj56XJFI2OSp+hEOrFZ+eiEi/yM=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "+O6A945eTP9plLpkEMZB0lwBAcg=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "uRvmEPKcEdv7qc0Ep2zn0E3Xumc=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "ZZgzuZoMphxAf8wwz9QqpSQdBGc=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "soXVJWQ/xvEB72Mo6FresaQIxLg=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "Eo9yODN5U99BK0pMzoqnBm7PCrY=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/private/waiter", - "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915", - "revisionTime": "2017-02-24T22:28:38Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "Cr+HUNBOotDvCYRZOjQJl/vg0yg=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "rxE/r/mGpulVQVBVmJSrsvhvPgc=", - "path": "github.com/aws/aws-sdk-go/service/ec2/ec2iface", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "Ib0Plp1+0bdv4RlTvyTjJY38drE=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "yDbIw+lVcsmjyom0xI+8khZNy6o=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "sEjQjy4nIGc5X07ds4TuYkkw6Ro=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/service/s3/s3iface", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "n642iHX42dolne0hXQqcr1cEImQ=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/service/s3/s3manager", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "35a/vm5R/P68l/hQD55GqviO6bg=", - "comment": "v1.7.1", - "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "bf8067ceb6e7f51e150c218972dccfeeed892b85", - "revisionTime": "2018-10-12T21:50:02Z", - "version": "v1.15.54", - "versionExact": "v1.15.54" - }, - { - "checksumSHA1": "7SbTaY0kaYxgQrG3/9cjrI+BcyU=", - "path": "github.com/bgentry/speakeasy", - "revision": "36e9cfdd690967f4f690c6edcc9ffacd006014a0" - }, - { - "checksumSHA1": "twtRfb6484vfr2qqjiFkLThTjcQ=", - "path": "github.com/bgentry/speakeasy/example", - "revision": "36e9cfdd690967f4f690c6edcc9ffacd006014a0" - }, - { - "checksumSHA1": "Xmg1VzD2h0CmuRbN66dj+1IF7rc=", - "path": "github.com/biogo/hts/bgzf", - "revision": "50da7d4131a3b5c9d063932461cab4d1fafb20b0" - }, - { - "checksumSHA1": "UBznrWrDuttNZf56nubBl2nG4Ws=", - "path": "github.com/cheggaaa/pb", - "revision": "007b75a044e968336a69a6c0c617251ab62ac14c", - "revisionTime": "2018-10-16T15:56:12Z", - "version": "v1.0.26", - "versionExact": "v1.0.26" - }, - { - "checksumSHA1": "X2/71FBrn4pA3WcA620ySVO0uHU=", - "path": "github.com/creack/goselect", - "revision": "528c74964609a58f7c17471525659c9b71cd499b", - "revisionTime": "2018-02-10T03:43:46Z" - }, - { - "checksumSHA1": "/5cvgU+J4l7EhMXTK76KaCAfOuU=", - "comment": "v1.0.0-3-g6d21280", - "path": "github.com/davecgh/go-spew/spew", - "revision": "346938d642f2ec3594ed81d874461961cd0faa76", - "revisionTime": "2016-10-29T20:57:26Z", - "version": "v1.1.0", - "versionExact": "v1.1.0" - }, - { - "checksumSHA1": "5k4kiVJsn0CilLDx+gMjglXY6vs=", - "path": "github.com/denverdino/aliyungo/common", - "revision": "ebad04655e0385f021ed264c89ef4b93958e7204", - "revisionTime": "2018-04-17T07:55:37Z" - }, - { - "checksumSHA1": "y4Ay4E5HqT25sweC/Bl9/odNWaI=", - "path": "github.com/denverdino/aliyungo/ecs", - "revision": "ec0e57291175fc9b06c62977f384756642285aab", - "revisionTime": "2017-11-27T16:20:29Z" - }, - { - "checksumSHA1": "sievsBvgtVF2iZ2FjmDZppH3+Ro=", - "path": "github.com/denverdino/aliyungo/ram", - "revision": "ec0e57291175fc9b06c62977f384756642285aab", - "revisionTime": "2017-11-27T16:20:29Z" - }, - { - "checksumSHA1": "pQHH9wpyS0e4wpW0erxe3D7OILM=", - "path": "github.com/denverdino/aliyungo/slb", - "revision": "ec0e57291175fc9b06c62977f384756642285aab", - "revisionTime": "2017-11-27T16:20:29Z" - }, - { - "checksumSHA1": "cKVBRn7GKT+0IqfGUc/NnKDWzCw=", - "path": "github.com/denverdino/aliyungo/util", - "revision": "ec0e57291175fc9b06c62977f384756642285aab", - "revisionTime": "2017-11-27T16:20:29Z" - }, - { - "checksumSHA1": "4772zXrOaPVeDeSgdiV7Vp4KEjk=", - "comment": "v3.2.0", - "path": "github.com/dgrijalva/jwt-go", - "revision": "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e", - "revisionTime": "2018-03-08T23:13:08Z" - }, - { - "checksumSHA1": "u6kWbz1BRsZT433AooftjLNNtdw=", - "comment": "v0.9.0-24-g6ca5b77", - "path": "github.com/digitalocean/godo", - "revision": "c4ae66932b5d6fb727d54e9ded9ee722f67f3ca9", - "revisionTime": "2018-11-13T19:55:25Z" - }, - { - "checksumSHA1": "1n5MBJthemxmfqU2gN3qLCd8s04=", - "path": "github.com/docker/docker/pkg/namesgenerator", - "revision": "fa3e2d5ab9b577cecd24201902bbe72b3f1b851c", - "revisionTime": "2017-04-06T12:40:27Z" - }, - { - "checksumSHA1": "lThih54jzz9A4zHKEFb9SIV3Ed0=", - "path": "github.com/docker/docker/pkg/random", - "revision": "fa3e2d5ab9b577cecd24201902bbe72b3f1b851c", - "revisionTime": "2017-04-06T12:40:27Z" - }, - { - "checksumSHA1": "rhLUtXvcmouYuBwOq9X/nYKzvNg=", - "path": "github.com/dustin/go-humanize", - "revision": "259d2a102b871d17f30e3cd9881a642961a1e486", - "revisionTime": "2017-02-28T07:34:54Z" - }, - { - "checksumSHA1": "GCskdwYAPW2S34918Z5CgNMJ2Wc=", - "path": "github.com/dylanmei/iso8601", - "revision": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4" - }, - { - "checksumSHA1": "RNNn+CRYa4KxYIbs6W83JvMpZhw=", - "path": "github.com/dylanmei/winrmtest", - "revision": "c2fbb09e6c084fe3ebe95fce0f1cc5297c152026", - "revisionTime": "2017-08-19T15:36:34Z" - }, - { - "checksumSHA1": "PkPgpx/FYoIJCbihlRZEp7oHG9Q=", - "comment": "v1.8.6", - "path": "github.com/go-ini/ini", - "revision": "afbd495e5aaea13597b5e14fe514ddeaa4d76fc3" - }, - { - "checksumSHA1": "GhvPGgDUBDSANMWJJLFfGbcR4C4=", - "path": "github.com/golang/protobuf/proto", - "revision": "b982704f8bb716bb608144408cff30e15fbde841" - }, - { - "checksumSHA1": "h1d2lPZf6j2dW/mIqVnd1RdykDo=", - "path": "github.com/golang/snappy", - "revision": "2e65f85255dbc3072edf28d6b5b8efc472979f5a", - "revisionTime": "2018-05-18T05:39:59Z" - }, - { - "checksumSHA1": "sOd6u/eTkieb8AgKxnXZ/C9/FhI=", - "path": "github.com/google/go-cmp/cmp", - "revision": "5411ab924f9ffa6566244a9e504bc347edacffd3", - "revisionTime": "2018-03-28T20:15:12Z" - }, - { - "checksumSHA1": "oLBV7th4sxzxzmf1b91NVVbdOfI=", - "path": "github.com/google/go-cmp/cmp/internal/diff", - "revision": "5411ab924f9ffa6566244a9e504bc347edacffd3", - "revisionTime": "2018-03-28T20:15:12Z" - }, - { - "checksumSHA1": "kYtvRhMjM0X4bvEjR3pqEHLw1qo=", - "path": "github.com/google/go-cmp/cmp/internal/function", - "revision": "5411ab924f9ffa6566244a9e504bc347edacffd3", - "revisionTime": "2018-03-28T20:15:12Z" - }, - { - "checksumSHA1": "OQQ56f38ikfmG2Zd3lUlk4LUBIw=", - "path": "github.com/google/go-cmp/cmp/internal/value", - "revision": "5411ab924f9ffa6566244a9e504bc347edacffd3", - "revisionTime": "2018-03-28T20:15:12Z" - }, - { - "checksumSHA1": "Evpv9y6iPdy+8FeAVDmKrqV1sqo=", - "path": "github.com/google/go-querystring/query", - "revision": "2a60fc2ba6c19de80291203597d752e9ba58e4c0" - }, - { - "checksumSHA1": "e/Kc2UOy1lKAy31xWlK37M1r2e8=", - "path": "github.com/google/shlex", - "revision": "6f45313302b9c56850fc17f99e40caebce98c716", - "revisionTime": "2015-01-27T13:39:51Z" - }, - { - "checksumSHA1": "uFNLkTxk8BkHTk0Jcub2lj2BX4M=", - "path": "github.com/google/uuid", - "revision": "dec09d789f3dba190787f8b4454c7d3c936fed9e", - "revisionTime": "2017-11-29T19:10:14Z" - }, - { - "checksumSHA1": "90HfuOdlP9yK6xUnJCAnCrL73DQ=", - "path": "github.com/gophercloud/gophercloud", - "revision": "ea7289ebdf06687b792c087e2516317579d3003b", - "revisionTime": "2018-09-03T13:40:57Z" - }, - { - "checksumSHA1": "b7g9TcU1OmW7e2UySYeOAmcfHpY=", - "path": "github.com/gophercloud/gophercloud/internal", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "YDNvjFNQS+UxqZMLm/shFs7aLNU=", - "path": "github.com/gophercloud/gophercloud/openstack", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "8YtBD+Um7I8ee1Xf1ZAWu74eP7w=", - "path": "github.com/gophercloud/gophercloud/openstack/blockstorage/extensions/volumeactions", - "revision": "282f25e4025de0a42015d2e2b5faef1d920aad3c", - "revisionTime": "2018-05-15T01:47:05Z" - }, - { - "checksumSHA1": "vqXNCd2My0y/5tPC/Bs79uf6Q4E=", - "path": "github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes", - "revision": "282f25e4025de0a42015d2e2b5faef1d920aad3c", - "revisionTime": "2018-05-15T01:47:05Z" - }, - { - "checksumSHA1": "Au6MAsI90lewLByg9n+Yjtdqdh8=", - "path": "github.com/gophercloud/gophercloud/openstack/common/extensions", - "revision": "95a28eb606def6aaaed082b6b82d3244b0552184", - "revisionTime": "2017-06-23T01:44:30Z" - }, - { - "checksumSHA1": "4XWDCGMYqipwJymi9xJo9UffD7g=", - "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions", - "revision": "95a28eb606def6aaaed082b6b82d3244b0552184", - "revisionTime": "2017-06-23T01:44:30Z" - }, - { - "checksumSHA1": "lW+ldKF07Zz/C7WYPTchfr1USrQ=", - "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces", - "revision": "00dcc07f1071d5f96520fac7a2b9a30eabccf879", - "revisionTime": "2018-06-10T02:06:14Z" - }, - { - "checksumSHA1": "kCHEEeRVZeR1LhbvNP+WyvB8z2s=", - "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/bootfromvolume", - "revision": "282f25e4025de0a42015d2e2b5faef1d920aad3c", - "revisionTime": "2018-05-15T01:47:05Z" - }, - { - "checksumSHA1": "vFS5BwnCdQIfKm1nNWrR+ijsAZA=", - "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "lAQuKIqTuQ9JuMgN0pPkNtRH2RM=", - "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/keypairs", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "qfVZltu1fYTYXS97WbjeLuLPgUc=", - "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/startstop", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "1/1G6O0CUVYyTFF/IqzWThGyuPQ=", - "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/flavors", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "CSnfH01hSas0bdc/3m/f5Rt6SFY=", - "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/images", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "FKVrvZnE/223fpKVGPqaIX4JP9I=", - "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "oOJkelRgWx0NzUmxuI3kTS27gM0=", - "path": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "z5NsqMZX3TLMzpmwzOOXE4M5D9w=", - "path": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "2PYxD2MOrbp4JCWy5794sEtDYD4=", - "path": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "Pop8rylL583hCZ0RjO+9TkrScCo=", - "path": "github.com/gophercloud/gophercloud/openstack/imageservice/v2/images", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "GFqX1Y5SpZvvyx0LPaP9D9Xp5k0=", - "path": "github.com/gophercloud/gophercloud/openstack/imageservice/v2/members", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "x6lD4wQOZc1rtm6kMaUBMwLxAlA=", - "path": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external", - "revision": "00dcc07f1071d5f96520fac7a2b9a30eabccf879", - "revisionTime": "2018-06-10T02:06:14Z" - }, - { - "checksumSHA1": "K4VAatvB/jywsU+g/mU7bnSaVaI=", - "path": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips", - "revision": "83835c772d1adf71e8df7440d5da9ad039dc049e", - "revisionTime": "2018-08-15T02:05:10Z" - }, - { - "checksumSHA1": "XEVvG2f/dqATN4aCluZlPylW+9A=", - "path": "github.com/gophercloud/gophercloud/openstack/networking/v2/networks", - "revision": "00dcc07f1071d5f96520fac7a2b9a30eabccf879", - "revisionTime": "2018-06-10T02:06:14Z" - }, - { - "checksumSHA1": "8KE4bJzhbFZKsYMxcRg6xLqqfTg=", - "path": "github.com/gophercloud/gophercloud/openstack/utils", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "jWdt1lN75UC0GrLG5Tmng+qP+ZI=", - "path": "github.com/gophercloud/gophercloud/pagination", - "revision": "7112fcd50da4ea27e8d4d499b30f04eea143bec2", - "revisionTime": "2018-05-31T02:06:30Z" - }, - { - "checksumSHA1": "df+06zNEC3V7qgnTaVLtH0uktmI=", - "path": "github.com/gophercloud/utils", - "revision": "a5c25e7a53a63b89622852e35d7200c85f7cbe56", - "revisionTime": "2019-01-24T19:20:22Z" - }, - { - "checksumSHA1": "+lG+bluykADYk0Zzq8sdh7KIyxY=", - "path": "github.com/gophercloud/utils/openstack/clientconfig", - "revision": "a5c25e7a53a63b89622852e35d7200c85f7cbe56", - "revisionTime": "2019-01-24T19:20:22Z" - }, - { - "checksumSHA1": "xSmii71kfQASGNG2C8ttmHx9KTE=", - "path": "github.com/gorilla/websocket", - "revision": "a91eba7f97777409bc2c443f5534d41dd20c5720", - "revisionTime": "2017-03-19T17:27:27Z" - }, - { - "checksumSHA1": "izBSRxLAHN+a/XpAku0in05UzlY=", - "comment": "20141209094003-92-g95fa852", - "path": "github.com/hashicorp/atlas-go/archive", - "revision": "17522f63497eefcffc90d528ca1eeaded2b529d3", - "revisionTime": "2017-08-08T16:18:53Z" - }, - { - "checksumSHA1": "IR7S+SOsSUnPnLxgRrfemXfCqNM=", - "comment": "20141209094003-92-g95fa852", - "path": "github.com/hashicorp/atlas-go/v1", - "revision": "0885342d5643b7a412026596f2f3ebb3c9b4c190", - "revisionTime": "2017-06-08T19:44:05Z" - }, - { - "checksumSHA1": "GDon57l3Km8hqUlE7GU6mTyyBEY=", - "path": "github.com/hashicorp/consul/api", - "revision": "3e6313bebbf087129c35fb1f93b4f69ec48fd91d", - "revisionTime": "2018-08-07T17:45:50Z" - }, - { - "checksumSHA1": "cdOCt0Yb+hdErz8NAQqayxPmRsY=", - "path": "github.com/hashicorp/errwrap", - "revision": "7554cd9344cec97297fa6649b055a8c98c2a1e55" - }, - { - "checksumSHA1": "D267IUMW2rcb+vNe3QU+xhfSrgY=", - "path": "github.com/hashicorp/go-checkpoint", - "revision": "1545e56e46dec3bba264e41fde2c1e2aa65b5dd4", - "revisionTime": "2017-10-09T17:35:28Z" - }, - { - "checksumSHA1": "fSe5y1UgTDeYlnFfUcDA1zzcw+U=", - "path": "github.com/hashicorp/go-cleanhttp", - "revision": "875fb671b3ddc66f8e2f0acc33829c8cb989a38d" - }, - { - "checksumSHA1": "QFCuUCYWt0PS9AozJX58VE0DEZU=", - "path": "github.com/hashicorp/go-getter", - "revision": "90f6e2cd3577ebfd1df3553ac6cfff560a061376", - "revisionTime": "2019-01-09T11:19:00Z" - }, - { - "checksumSHA1": "y+AeKVZoX0gB+DZW4Arzkb3tTVc=", - "path": "github.com/hashicorp/go-immutable-radix", - "revision": "7f3cd4390caab3250a57f30efdb2a65dd7649ecf", - "revisionTime": "2018-01-29T17:09:00Z" - }, - { - "checksumSHA1": "lrSl49G23l6NhfilxPM0XFs5rZo=", - "path": "github.com/hashicorp/go-multierror", - "revision": "d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5" - }, - { - "checksumSHA1": "2HXZQWsVNPQme21DBmz9P3n9NNc=", - "path": "github.com/hashicorp/go-oracle-terraform/client", - "revision": "007121241b797759456e4cdcb8ae98f431fdb7e0", - "revisionTime": "2018-10-15T20:29:09Z" - }, - { - "checksumSHA1": "+7uE289ixv+xwEk99EiXKecZt5k=", - "path": "github.com/hashicorp/go-oracle-terraform/compute", - "revision": "007121241b797759456e4cdcb8ae98f431fdb7e0", - "revisionTime": "2018-10-15T20:29:09Z" - }, - { - "checksumSHA1": "aeXObRk6gAfuvnT+puKaEib7dm0=", - "path": "github.com/hashicorp/go-oracle-terraform/opc", - "revision": "007121241b797759456e4cdcb8ae98f431fdb7e0", - "revisionTime": "2018-10-15T20:29:09Z" - }, - { - "checksumSHA1": "/yKfFSspjuDzyOe/bBslrPzyfYM=", - "path": "github.com/hashicorp/go-retryablehttp", - "revision": "e651d75abec6fbd4f2c09508f72ae7af8a8b7171", - "revisionTime": "2018-07-18T19:50:05Z" - }, - { - "checksumSHA1": "A1PcINvF3UiwHRKn8UcgARgvGRs=", - "path": "github.com/hashicorp/go-rootcerts", - "revision": "6bb64b370b90e7ef1fa532be9e591a81c3493e00" - }, - { - "checksumSHA1": "J47ySO1q0gcnmoMnir1q1loKzCk=", - "path": "github.com/hashicorp/go-sockaddr", - "revision": "6d291a969b86c4b633730bfc6b8b9d64c3aafed9", - "revisionTime": "2018-03-20T11:50:54Z" - }, - { - "checksumSHA1": "mAkPa/RLuIwN53GbwIEMATexams=", - "path": "github.com/hashicorp/go-uuid", - "revision": "73d19cdc2bf00788cc25f7d5fd74347d48ada9ac" - }, - { - "checksumSHA1": "9nNGCY0dWyRDEm7xb57BzV0AKeA=", - "path": "github.com/hashicorp/go-version", - "revision": "7e3c02b30806fa5779d3bdfc152ce4c6f40e7b38" - }, - { - "checksumSHA1": "8Z637dcPkbR5HdLQQBp/9jTbx9Y=", - "path": "github.com/hashicorp/golang-lru/simplelru", - "revision": "0fb14efe8c47ae851c0034ed7a448854d3d34cf3", - "revisionTime": "2018-02-01T23:52:37Z" - }, - { - "checksumSHA1": "HtpYAWHvd9mq+mHkpo7z8PGzMik=", - "path": "github.com/hashicorp/hcl", - "revision": "ef8a98b0bbce4a65b5aa4c368430a80ddc533168", - "revisionTime": "2018-04-04T17:41:02Z" - }, - { - "checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=", - "path": "github.com/hashicorp/hcl/hcl/ast", - "revision": "ef8a98b0bbce4a65b5aa4c368430a80ddc533168", - "revisionTime": "2018-04-04T17:41:02Z" - }, - { - "checksumSHA1": "1GmX7G0Pgf5XprOh+T3zXMXX0dc=", - "path": "github.com/hashicorp/hcl/hcl/parser", - "revision": "ef8a98b0bbce4a65b5aa4c368430a80ddc533168", - "revisionTime": "2018-04-04T17:41:02Z" - }, - { - "checksumSHA1": "+qJTCxhkwC7r+VZlPlZz8S74KmU=", - "path": "github.com/hashicorp/hcl/hcl/scanner", - "revision": "ef8a98b0bbce4a65b5aa4c368430a80ddc533168", - "revisionTime": "2018-04-04T17:41:02Z" - }, - { - "checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=", - "path": "github.com/hashicorp/hcl/hcl/strconv", - "revision": "ef8a98b0bbce4a65b5aa4c368430a80ddc533168", - "revisionTime": "2018-04-04T17:41:02Z" - }, - { - "checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=", - "path": "github.com/hashicorp/hcl/hcl/token", - "revision": "ef8a98b0bbce4a65b5aa4c368430a80ddc533168", - "revisionTime": "2018-04-04T17:41:02Z" - }, - { - "checksumSHA1": "PwlfXt7mFS8UYzWxOK5DOq0yxS0=", - "path": "github.com/hashicorp/hcl/json/parser", - "revision": "ef8a98b0bbce4a65b5aa4c368430a80ddc533168", - "revisionTime": "2018-04-04T17:41:02Z" - }, - { - "checksumSHA1": "afrZ8VmAwfTdDAYVgNSXbxa4GsA=", - "path": "github.com/hashicorp/hcl/json/scanner", - "revision": "ef8a98b0bbce4a65b5aa4c368430a80ddc533168", - "revisionTime": "2018-04-04T17:41:02Z" - }, - { - "checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=", - "path": "github.com/hashicorp/hcl/json/token", - "revision": "ef8a98b0bbce4a65b5aa4c368430a80ddc533168", - "revisionTime": "2018-04-04T17:41:02Z" - }, - { - "checksumSHA1": "0PeWsO2aI+2PgVYlYlDPKfzCLEQ=", - "path": "github.com/hashicorp/serf/coordinate", - "revision": "984a73625de3138f44deb38d00878fab39eb6447", - "revisionTime": "2018-05-30T15:59:58Z" - }, - { - "checksumSHA1": "oi8fnfAPPTf2nN7zptlyu/EsMMs=", - "path": "github.com/hashicorp/vault/api", - "revision": "6a610778bfc491412365bca2e129f627b39a2e02", - "revisionTime": "2018-07-24T14:10:31Z" - }, - { - "checksumSHA1": "bSdPFOHaTwEvM4PIvn0PZfn75jM=", - "path": "github.com/hashicorp/vault/helper/compressutil", - "revision": "b9adaf9c695966639d4c358efe2d132f5ff232ab", - "revisionTime": "2018-07-24T21:50:49Z" - }, - { - "checksumSHA1": "RlqPBLOexQ0jj6jomhiompWKaUg=", - "path": "github.com/hashicorp/vault/helper/hclutil", - "revision": "00acb896a87a16e8b7463094b45e0a5b97388f18", - "revisionTime": "2018-07-24T18:27:01Z" - }, - { - "checksumSHA1": "POgkM3GrjRFw6H3sw95YNEs552A=", - "path": "github.com/hashicorp/vault/helper/jsonutil", - "revision": "b9adaf9c695966639d4c358efe2d132f5ff232ab", - "revisionTime": "2018-07-24T21:50:49Z" - }, - { - "checksumSHA1": "HA2MV/2XI0HcoThSRxQCaBZR2ps=", - "path": "github.com/hashicorp/vault/helper/parseutil", - "revision": "b9adaf9c695966639d4c358efe2d132f5ff232ab", - "revisionTime": "2018-07-24T21:50:49Z" - }, - { - "checksumSHA1": "iwXQDzHqTFsjJW2ehYae0oLo2Ts=", - "path": "github.com/hashicorp/vault/helper/strutil", - "revision": "b9adaf9c695966639d4c358efe2d132f5ff232ab", - "revisionTime": "2018-07-24T21:50:49Z" - }, - { - "checksumSHA1": "Gm2k+46HxKqsjI8lCWBp/jRaPrM=", - "path": "github.com/hashicorp/yamux", - "revision": "df949784da9ed028ee76df44652e42d37a09d7e4" - }, - { - "checksumSHA1": "lMvR+qhQWll2pXPY3GmJbKqgkUc=", - "path": "github.com/hetznercloud/hcloud-go/hcloud", - "revision": "eaf050e4f37028d2ca5f99a2fb38ead2c9b293d3", - "revisionTime": "2018-10-16T09:48:19Z" - }, - { - "checksumSHA1": "3/Bhy+ua/DCv2ElMD5GzOYSGN6g=", - "comment": "0.2.2-2-gc01cf91", - "path": "github.com/jmespath/go-jmespath", - "revision": "c01cf91b011868172fdcd9f41838e80c9d716264" - }, - { - "checksumSHA1": "Lg8OHK87XRGCaipG+5+zFyN8OMw=", - "path": "github.com/joyent/triton-go", - "revision": "545edbe0d564f075ac576f1ad177f4ff39c9adaf", - "revisionTime": "2018-01-16T16:57:42Z" - }, - { - "checksumSHA1": "Y03+L+I0FVZ2bMGWt1MHTDEyWM4=", - "path": "github.com/joyent/triton-go/authentication", - "revision": "545edbe0d564f075ac576f1ad177f4ff39c9adaf", - "revisionTime": "2018-01-16T16:57:42Z" - }, - { - "checksumSHA1": "MuJsGBr6HlXQYxZY9cM5rBk+Lns=", - "path": "github.com/joyent/triton-go/client", - "revision": "545edbe0d564f075ac576f1ad177f4ff39c9adaf", - "revisionTime": "2018-01-16T16:57:42Z" - }, - { - "checksumSHA1": "A+YGcdf/qfac1gqK8QY1F5+pYGA=", - "path": "github.com/joyent/triton-go/compute", - "revision": "545edbe0d564f075ac576f1ad177f4ff39c9adaf", - "revisionTime": "2018-01-16T16:57:42Z" - }, - { - "checksumSHA1": "d/Py6j/uMgOAFNFGpsQrNnSsO+k=", - "path": "github.com/joyent/triton-go/errors", - "revision": "545edbe0d564f075ac576f1ad177f4ff39c9adaf", - "revisionTime": "2018-01-16T16:57:42Z" - }, - { - "checksumSHA1": "MIrIeqiPmw66cko+gzk7Cht2SLE=", - "path": "github.com/joyent/triton-go/network", - "revision": "545edbe0d564f075ac576f1ad177f4ff39c9adaf", - "revisionTime": "2018-01-16T16:57:42Z" - }, - { - "checksumSHA1": "gEjGS03N1eysvpQ+FCHTxPcbxXc=", - "path": "github.com/kardianos/osext", - "revision": "ae77be60afb1dcacde03767a8c37337fad28ac14", - "revisionTime": "2017-05-10T13:15:34Z" - }, - { - "checksumSHA1": "yIeeBxrnquUChoE+Rpz7qU6WygQ=", - "path": "github.com/klauspost/compress/flate", - "revision": "f86d2e6d8a77c6a2c4e42a87ded21c6422f7557e" - }, - { - "checksumSHA1": "+5TWJZm/cHHsQ5YHy644Ila4+io=", - "path": "github.com/klauspost/cpuid", - "revision": "349c675778172472f5e8f3a3e0fe187e302e5a10" - }, - { - "checksumSHA1": "FvkAYJ7xe6/MaU6F5TWJP7/Qfw0=", - "path": "github.com/klauspost/crc32", - "revision": "999f3125931f6557b991b2f8472172bdfa578d38" - }, - { - "checksumSHA1": "UAlXIIZhzWRslIC+4KLowB6Y/YM=", - "path": "github.com/klauspost/pgzip", - "revision": "47f36e165cecae5382ecf1ec28ebf7d4679e307d" - }, - { - "checksumSHA1": "KQhA4EQp4Ldwj9nJZnEURlE6aQw=", - "path": "github.com/kr/fs", - "revision": "2788f0dbd16903de03cb8186e5c7d97b69ad387b" - }, - { - "checksumSHA1": "T9E+5mKBQ/BX4wlNxgaPfetxdeI=", - "path": "github.com/marstr/guid", - "revision": "8bdf7d1a087ccc975cf37dd6507da50698fd19ca", - "revisionTime": "2017-04-27T23:51:15Z" - }, - { - "checksumSHA1": "t7hEeujQesCSzjZIPcE80XgQ9M0=", - "path": "github.com/masterzen/azure-sdk-for-go/core/http", - "revision": "ee4f0065d00cd12b542f18f5bc45799e88163b12", - "revisionTime": "2016-10-14T13:56:28Z" - }, - { - "checksumSHA1": "xJVMikTtYbfI2KqKeUXaO4292JU=", - "path": "github.com/masterzen/azure-sdk-for-go/core/tls", - "revision": "ee4f0065d00cd12b542f18f5bc45799e88163b12", - "revisionTime": "2016-10-14T13:56:28Z" - }, - { - "checksumSHA1": "yg57Q4J8Ob0LoYvqDxsWZ6AHffE=", - "path": "github.com/masterzen/simplexml/dom", - "revision": "95ba30457eb1121fa27753627c774c7cd4e90083" - }, - { - "checksumSHA1": "dVQEUn5TxdIAXczK7rh6qUrq44Q=", - "path": "github.com/masterzen/winrm", - "revision": "7e40f93ae939004a1ef3bd5ff5c88c756ee762bb", - "revisionTime": "2018-02-24T16:03:50Z" - }, - { - "checksumSHA1": "XFSXma+KmkhkIPsh4dTd/eyja5s=", - "path": "github.com/masterzen/winrm/soap", - "revision": "7e40f93ae939004a1ef3bd5ff5c88c756ee762bb", - "revisionTime": "2018-02-24T16:03:50Z" - }, - { - "checksumSHA1": "NkbetqlpWBi3gP08JDneC+axTKw=", - "path": "github.com/mattn/go-isatty", - "revision": "56b76bdf51f7708750eac80fa38b952bb9f32639" - }, - { - "checksumSHA1": "cJE7dphDlam/i7PhnsyosNWtbd4=", - "path": "github.com/mattn/go-runewidth", - "revision": "97311d9f7767e3d6f422ea06661bc2c7a19e8a5d", - "revisionTime": "2017-05-10T07:48:58Z" - }, - { - "checksumSHA1": "UIqCj7qI0hhIMpAhS9YYqs2jD48=", - "path": "github.com/mitchellh/cli", - "revision": "65fcae5817c8600da98ada9d7edf26dd1a84837b", - "revisionTime": "2017-09-08T18:10:43Z" - }, - { - "checksumSHA1": "mVqDwKcibat0IKAdzAhfGIHPwI8=", - "path": "github.com/mitchellh/go-fs", - "revision": "7b48fa161ea73ce54566b233d6fba8750b2faf47", - "revisionTime": "2018-04-02T23:40:41Z" - }, - { - "checksumSHA1": "i+3acspzTbQODW3dWX2JKydHVAo=", - "path": "github.com/mitchellh/go-fs/fat", - "revision": "7b48fa161ea73ce54566b233d6fba8750b2faf47", - "revisionTime": "2018-04-02T23:40:41Z" - }, - { - "checksumSHA1": "z235fRXw4+SW4xWgLTYc8SwkM2M=", - "path": "github.com/mitchellh/go-homedir", - "revision": "d682a8f0cf139663a984ff12528da460ca963de9" - }, - { - "checksumSHA1": "SJOpcDnBxxKHq146atZmumzST3A=", - "path": "github.com/mitchellh/go-vnc", - "revision": "723ed9867aed0f3209a81151e52ddc61681f0b01" - }, - { - "checksumSHA1": "v9y1OJ6NpBUhK4U8V4mmYUFBU4Q=", - "path": "github.com/mitchellh/iochan", - "revision": "87b45ffd0e9581375c491fef3d32130bb15c5bd7" - }, - { - "checksumSHA1": "1JtAhgmRN0x794LRNhs0DJ5t8io=", - "path": "github.com/mitchellh/mapstructure", - "revision": "b4575eea38cca1123ec2dc90c26529b5c5acfcff", - "revisionTime": "2018-01-11T00:07:20Z" - }, - { - "checksumSHA1": "m2L8ohfZiFRsMW3iynaH/TWgnSY=", - "path": "github.com/mitchellh/panicwrap", - "revision": "fce601fe55579125e1b3cb0b992287e7290f7b83", - "revisionTime": "2017-01-06T18:23:40Z" - }, - { - "checksumSHA1": "h+ODp7a8Vj8XMUsORLbhtQMWOO4=", - "path": "github.com/mitchellh/prefixedio", - "revision": "6e6954073784f7ee67b28f2d22749d6479151ed7" - }, - { - "checksumSHA1": "mrqMlK6gqe//WsJSrJ1HgkPM0lM=", - "path": "github.com/mitchellh/reflectwalk", - "revision": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6" - }, - { - "checksumSHA1": "KhOVzKefFYORHdIVe+/gNAHB23A=", - "path": "github.com/moul/anonuuid", - "revision": "609b752a95effbbef26d134ac18ed6f57e01b98e", - "revisionTime": "2016-02-22T16:21:17Z" - }, - { - "checksumSHA1": "nlJWlZ8NlDeKDaXoSFq1UM56RCs=", - "path": "github.com/moul/gotty-client", - "revision": "b26a57ebc215d2d68945184bb7e88886dfd9c66c", - "revisionTime": "2018-03-27T18:02:12Z" - }, - { - "checksumSHA1": "gcLub3oB+u4QrOJZcYmk/y2AP4k=", - "path": "github.com/nu7hatch/gouuid", - "revision": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3" - }, - { - "checksumSHA1": "WY8p2ZNGyl69P1tcVc5HFal/Ng0=", - "path": "github.com/olekukonko/tablewriter", - "revision": "96aac992fc8b1a4c83841a6c3e7178d20d989625", - "revisionTime": "2018-01-05T11:11:33Z" - }, - { - "checksumSHA1": "UZa8q/rQfhBJLutg8KA7Sq9H2S8=", - "path": "github.com/oracle/oci-go-sdk", - "revision": "a2ded717dc4bb4916c0416ec79f81718b576dbc4", - "revisionTime": "2018-06-28T21:12:36Z", - "tree": true, - "version": "v2.0.0", - "versionExact": "v2.0.0" - }, - { - "checksumSHA1": "qDOL2Q0BzBA5WwQN06a5/MbEGFQ=", - "path": "github.com/packer-community/winrmcp/winrmcp", - "revision": "0fd363d6159ae26cd0be16262941301e69461641", - "revisionTime": "2018-09-21T17:45:48Z" - }, - { - "checksumSHA1": "oaXvjFg802gS/wx1bx2gAQwa7XQ=", - "path": "github.com/pierrec/lz4", - "revision": "383c0d87b5dd7c090d3cddefe6ff0c2ffbb88470" - }, - { - "checksumSHA1": "0VCCUEQ1c6RMbxpu2zTa/ee1+i8=", - "path": "github.com/pierrec/lz4/lz4c", - "revision": "383c0d87b5dd7c090d3cddefe6ff0c2ffbb88470" - }, - { - "checksumSHA1": "IT4sX58d+e8osXHV5U6YCSdB/uE=", - "path": "github.com/pierrec/xxHash/xxHash32", - "revision": "5a004441f897722c627870a981d02b29924215fa" - }, - { - "checksumSHA1": "xCv4GBFyw07vZkVtKF/XrUnkHRk=", - "path": "github.com/pkg/errors", - "revision": "e881fd58d78e04cf6d0de1217f8707c8cc2249bc", - "revisionTime": "2017-12-16T07:03:16Z" - }, - { - "checksumSHA1": "Mud+5WNq90BFb4gTeM5AByN8f2Y=", - "path": "github.com/pkg/sftp", - "revision": "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5" - }, - { - "checksumSHA1": "oc9mSRm9gzVfAQ0yq1NmXoxBslY=", - "path": "github.com/pkg/sftp/examples/buffered-read-benchmark", - "revision": "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5" - }, - { - "checksumSHA1": "JtaB+rTpNCOP1408oh4CrPlr4PI=", - "path": "github.com/pkg/sftp/examples/buffered-write-benchmark", - "revision": "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5" - }, - { - "checksumSHA1": "APWx2BdLbrOd0E/zwlssSY0BTIw=", - "path": "github.com/pkg/sftp/examples/sftp-server", - "revision": "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5" - }, - { - "checksumSHA1": "q27nlLSr5icub5Fg99UCx04hIPg=", - "path": "github.com/pkg/sftp/examples/streaming-read-benchmark", - "revision": "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5" - }, - { - "checksumSHA1": "mwao6A83g6t+lUI1oFfjg7n9Juo=", - "path": "github.com/pkg/sftp/examples/streaming-write-benchmark", - "revision": "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5" - }, - { - "checksumSHA1": "YqBYled6dGradvCCOvby1IYawiY=", - "path": "github.com/pkg/sftp/server_standalone", - "revision": "e84cc8c755ca39b7b64f510fe1fffc1b51f210a5" - }, - { - "checksumSHA1": "LuFv4/jlrmFNnDb/5SCSEPAM9vU=", - "comment": "v1.0.0", - "path": "github.com/pmezard/go-difflib/difflib", - "revision": "792786c7400a136282c1664665ae0a8db921c6c2" - }, - { - "checksumSHA1": "rTNABfFJ9wtLQRH8uYNkEZGQOrY=", - "path": "github.com/posener/complete", - "revision": "88e59760adaddb8276c9b15511302890690e2dae", - "revisionTime": "2017-09-08T12:52:45Z" - }, - { - "checksumSHA1": "NB7uVS0/BJDmNu68vPAlbrq4TME=", - "path": "github.com/posener/complete/cmd", - "revision": "88e59760adaddb8276c9b15511302890690e2dae", - "revisionTime": "2017-09-08T12:52:45Z" - }, - { - "checksumSHA1": "Hwojin3GxRyKwPAiz5r7UszqkPc=", - "path": "github.com/posener/complete/cmd/install", - "revision": "88e59760adaddb8276c9b15511302890690e2dae", - "revisionTime": "2017-09-08T12:52:45Z" - }, - { - "checksumSHA1": "DMo94FwJAm9ZCYCiYdJU2+bh4no=", - "path": "github.com/posener/complete/match", - "revision": "88e59760adaddb8276c9b15511302890690e2dae", - "revisionTime": "2017-09-08T12:52:45Z" - }, - { - "checksumSHA1": "Kq0fF7R65dDcGReuhf47O3LQgrY=", - "path": "github.com/profitbricks/profitbricks-sdk-go", - "revision": "7bdb11aecb0e457ea23c86898c6b49bfc0eb4bb1", - "revisionTime": "2017-08-01T13:52:49Z" - }, - { - "checksumSHA1": "DF3jZEw4lCq/SEaC7DIl/R+7S70=", - "path": "github.com/renstrom/fuzzysearch/fuzzy", - "revision": "2d205ac6ec17a839a94bdbfd16d2fa6c6dada2e0", - "revisionTime": "2016-03-31T20:48:55Z" - }, - { - "checksumSHA1": "4gVuzkHbQoznf+lCSJhIJnvS5tc=", - "path": "github.com/rwtodd/Go.Sed/sed", - "revision": "d6d5d585814e4c3560c684f52e3d8aeed721313d", - "revisionTime": "2017-05-07T04:53:31Z" - }, - { - "checksumSHA1": "6JP37UqrI0H80Gpk0Y2P+KXgn5M=", - "path": "github.com/ryanuber/go-glob", - "revision": "256dc444b735e061061cf46c809487313d5b0065", - "revisionTime": "2017-01-28T01:21:29Z" - }, - { - "checksumSHA1": "zmC8/3V4ls53DJlNTKDZwPSC/dA=", - "path": "github.com/satori/go.uuid", - "revision": "5bf94b69c6b68ee1b541973bb8e1144db23a194b", - "revisionTime": "2017-03-21T23:07:31Z" - }, - { - "checksumSHA1": "iqUXcP3VA+G1/gVLRpQpBUt/BuA=", - "path": "github.com/satori/uuid", - "revision": "5bf94b69c6b68ee1b541973bb8e1144db23a194b", - "revisionTime": "2017-03-21T23:07:31Z" - }, - { - "checksumSHA1": "17M5pJv8Wr4lIxmINnba9vTozR8=", - "path": "github.com/scaleway/scaleway-cli/pkg/api", - "revision": "7b12c9699d70d4ca06140b7d829d09b6a1c8f6f5", - "revisionTime": "2018-09-21T09:43:45Z" - }, - { - "checksumSHA1": "kveaAmNlnvmIIuEkFcMlB+N7TqY=", - "path": "github.com/scaleway/scaleway-cli/pkg/sshcommand", - "revision": "51d0290d9434dc6139dd89001236cfd989521a79", - "revisionTime": "2018-03-05T22:44:21Z" - }, - { - "checksumSHA1": "elO1R+B5Ym3ZNA5Zht4cIE/8b0c=", - "path": "github.com/scaleway/scaleway-cli/pkg/utils", - "revision": "51d0290d9434dc6139dd89001236cfd989521a79", - "revisionTime": "2018-03-05T22:44:21Z" - }, - { - "checksumSHA1": "ByFN6xh/YGP/D3DM9c8p0D9D1XM=", - "path": "github.com/sirupsen/logrus", - "revision": "90150a8ed11b6ce285e77e8af2b0109559ce4777", - "revisionTime": "2018-03-15T01:07:03Z" - }, - { - "checksumSHA1": "xqtDGN726+wHn43myII/VQ4vQn8=", - "path": "github.com/stretchr/objx", - "revision": "facf9a85c22f48d2f52f2380e4efce1768749a89", - "revisionTime": "2018-01-06T01:13:53Z", - "version": "v0.1", - "versionExact": "v0.1" - }, - { - "checksumSHA1": "pbq5LYckA7/rqe03l9MtXDekmRg=", - "comment": "v1.1.4-4-g976c720", - "path": "github.com/stretchr/testify/assert", - "revision": "12b6f73e6084dad08a7c6e575284b177ecafbc71", - "revisionTime": "2018-01-31T22:23:50Z", - "version": "v1.2.1", - "versionExact": "v1.2.1" - }, - { - "checksumSHA1": "Tq2BiJUqHH6rryU5xGdD/WQlxSk=", - "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common", - "revision": "649583d76d09eff104d18aae17490d2cbf01b373", - "revisionTime": "2018-10-19T12:31:15Z" - }, - { - "checksumSHA1": "q+o6CYdmE6zUexIu50LJ8m5V9M8=", - "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors", - "revision": "649583d76d09eff104d18aae17490d2cbf01b373", - "revisionTime": "2018-10-19T12:31:15Z" - }, - { - "checksumSHA1": "0ZnDtNVslrK0P9j01yquQ0qg4rs=", - "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http", - "revision": "649583d76d09eff104d18aae17490d2cbf01b373", - "revisionTime": "2018-10-19T12:31:15Z" - }, - { - "checksumSHA1": "C2Ft9SlvvWAuKTymaJxyphqlTY0=", - "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile", - "revision": "649583d76d09eff104d18aae17490d2cbf01b373", - "revisionTime": "2018-10-19T12:31:15Z" - }, - { - "checksumSHA1": "HtMaGZy24OmXN85TYpsLpfWFNr0=", - "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312", - "revision": "649583d76d09eff104d18aae17490d2cbf01b373", - "revisionTime": "2018-10-19T12:31:15Z" - }, - { - "checksumSHA1": "Maw/I5DN4rRUO4WEenrg4hgPDJA=", - "path": "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312", - "revision": "649583d76d09eff104d18aae17490d2cbf01b373", - "revisionTime": "2018-10-19T12:31:15Z" - }, - { - "checksumSHA1": "GQ9bu6PuydK3Yor1JgtVKUfEJm8=", - "path": "github.com/tent/http-link-go", - "revision": "ac974c61c2f990f4115b119354b5e0b47550e888" - }, - { - "checksumSHA1": "kHoPkdkwngiWKB27/uwq+T/3qv4=", - "path": "github.com/ugorji/go/codec", - "revision": "646ae4a518c1c3be0739df898118d9bccf993858" - }, - { - "checksumSHA1": "bEYlrTiz/7JbUiJgxEIkHynxO2s=", - "path": "github.com/ugorji/go/codec/codecgen", - "revision": "646ae4a518c1c3be0739df898118d9bccf993858" - }, - { - "checksumSHA1": "amJo1E3F0QxcfxSt+FxDiQbR1wU=", - "path": "github.com/ulikunitz/xz", - "revision": "636d36a76670e6c700f22fd5f4588679ff2896c4", - "revisionTime": "2018-07-03T11:21:13Z" - }, - { - "checksumSHA1": "vjnTkzNrMs5Xj6so/fq0mQ6dT1c=", - "path": "github.com/ulikunitz/xz/internal/hash", - "revision": "636d36a76670e6c700f22fd5f4588679ff2896c4", - "revisionTime": "2018-07-03T11:21:13Z" - }, - { - "checksumSHA1": "m0pm57ASBK/CTdmC0ppRHO17mBs=", - "path": "github.com/ulikunitz/xz/internal/xlog", - "revision": "636d36a76670e6c700f22fd5f4588679ff2896c4", - "revisionTime": "2018-07-03T11:21:13Z" - }, - { - "checksumSHA1": "2vZw6zc8xuNlyVz2QKvdlNSZQ1U=", - "path": "github.com/ulikunitz/xz/lzma", - "revision": "636d36a76670e6c700f22fd5f4588679ff2896c4", - "revisionTime": "2018-07-03T11:21:13Z" - }, - { - "checksumSHA1": "AGBqaHqBx5wJdVRsQt4GeawjbXA=", - "path": "github.com/vmware/govmomi", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "hb70n+hgA6nsrZWYQQT+aRgvye0=", - "path": "github.com/vmware/govmomi/find", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "J3JrwZagGYMX6oNMkdsUFf8hHo8=", - "path": "github.com/vmware/govmomi/list", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "19WR4gS1r3wGL6jAL9g624scugo=", - "path": "github.com/vmware/govmomi/object", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "f9sokKYs210zdH/VVF0ycBUO9cc=", - "path": "github.com/vmware/govmomi/property", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "eqoHqcnyVN3klOJ89N7xmJhRgu0=", - "path": "github.com/vmware/govmomi/session", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "FQR3yNgiShaqUiJREkeqQCKYJ84=", - "path": "github.com/vmware/govmomi/task", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "zLg5y/6xx/yr8swoqdyxISyQfoU=", - "path": "github.com/vmware/govmomi/vim25", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "xLvppq0NUD6Hv2GIx1gh75xUzyM=", - "path": "github.com/vmware/govmomi/vim25/debug", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "FIwHoeb/lzICWAoECQkmKLJg4PE=", - "path": "github.com/vmware/govmomi/vim25/methods", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "kiVMrAiW8EBFQvhDMHdE9SFe3N4=", - "path": "github.com/vmware/govmomi/vim25/mo", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "tN9fHudMKhR3LjGw/V0fM4xXUJw=", - "path": "github.com/vmware/govmomi/vim25/progress", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "c/IZCAPYN0p+ODQ/o/1vmfOgz6M=", - "path": "github.com/vmware/govmomi/vim25/soap", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "zthVYB/EefaNfVGrhBluqkd8ZyE=", - "path": "github.com/vmware/govmomi/vim25/types", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "6XLRzLEvncx5ORtvBjp41KfRTjc=", - "path": "github.com/vmware/govmomi/vim25/xml", - "revision": "c2105a174311351d7b23833ba22f65c374be0ce4", - "revisionTime": "2017-07-07T01:13:25Z" - }, - { - "checksumSHA1": "mWcSPrZfr9TKc4aoQEPlZ7fBdp0=", - "path": "github.com/xanzy/go-cloudstack/cloudstack", - "revision": "7d6a4449b586546246087e96e5c97dbc450f4917", - "revisionTime": "2016-09-28T15:38:44Z" - }, - { - "checksumSHA1": "h+pFYiRHBogczS8/F1NoN3Ata44=", - "path": "golang.org/x/crypto/curve25519", - "revision": "1f22c0103821b9390939b6776727195525381532" - }, - { - "checksumSHA1": "wGb//LjBPNxYHqk+dcLo7BjPXK8=", - "path": "golang.org/x/crypto/ed25519", - "revision": "7682e7e3945130cf3cde089834664f68afdd1523", - "revisionTime": "2016-10-03T20:54:26Z" - }, - { - "checksumSHA1": "LXFcVx8I587SnWmKycSDEq9yvK8=", - "path": "golang.org/x/crypto/ed25519/internal/edwards25519", - "revision": "7682e7e3945130cf3cde089834664f68afdd1523", - "revisionTime": "2016-10-03T20:54:26Z" - }, - { - "checksumSHA1": "MCeXr2RNeiG1XG6V+er1OR0qyeo=", - "path": "golang.org/x/crypto/md4", - "revision": "1f22c0103821b9390939b6776727195525381532" - }, - { - "checksumSHA1": "comxRp9FBqgZMXW1ZJjxkGw9VwA=", - "path": "golang.org/x/crypto/ssh", - "revision": "0fe963104e9d1877082f8fb38f816fcd97eb1d10", - "revisionTime": "2017-05-16T11:44:04Z" - }, - { - "checksumSHA1": "SJ3Ma3Ozavxpbh1usZWBCnzMKIc=", - "path": "golang.org/x/crypto/ssh/agent", - "revision": "453249f01cfeb54c3d549ddb75ff152ca243f9d8", - "revisionTime": "2017-02-08T20:51:15Z" - }, - { - "checksumSHA1": "BGm8lKZmvJbf/YOJLeL1rw2WVjA=", - "path": "golang.org/x/crypto/ssh/terminal", - "revision": "88942b9c40a4c9d203b82b3731787b672d6e809b", - "revisionTime": "2018-03-21T23:38:19Z" - }, - { - "checksumSHA1": "GtamqiJoL7PGHsN454AoffBFMa8=", - "path": "golang.org/x/net/context", - "revision": "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec", - "revisionTime": "2018-01-12T01:53:59Z" - }, - { - "checksumSHA1": "WHc3uByvGaMcnSoI21fhzYgbOgg=", - "path": "golang.org/x/net/context/ctxhttp", - "revision": "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec", - "revisionTime": "2018-01-12T01:53:59Z" - }, - { - "checksumSHA1": "vqc3a+oTUGX8PmD0TS+qQ7gmN8I=", - "path": "golang.org/x/net/html", - "revision": "1c05540f6879653db88113bc4a2b70aec4bd491f", - "revisionTime": "2017-08-04T00:04:37Z" - }, - { - "checksumSHA1": "z79z5msRzgU48FCZxSuxfU8b4rs=", - "path": "golang.org/x/net/html/atom", - "revision": "1c05540f6879653db88113bc4a2b70aec4bd491f", - "revisionTime": "2017-08-04T00:04:37Z" - }, - { - "checksumSHA1": "barUU39reQ7LdgYLA323hQ/UGy4=", - "path": "golang.org/x/net/html/charset", - "revision": "1c05540f6879653db88113bc4a2b70aec4bd491f", - "revisionTime": "2017-08-04T00:04:37Z" - }, - { - "checksumSHA1": "pCY4YtdNKVBYRbNvODjx8hj0hIs=", - "path": "golang.org/x/net/http/httpguts", - "revision": "a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1", - "revisionTime": "2018-07-19T17:54:20Z" - }, - { - "checksumSHA1": "BkaTIhCkwomEzE4+ZqvQqQkVP8A=", - "path": "golang.org/x/net/http2", - "revision": "a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1", - "revisionTime": "2018-07-19T17:54:20Z" - }, - { - "checksumSHA1": "leSW9aM30mATlWs/eeqhQQh/3eo=", - "path": "golang.org/x/net/http2/hpack", - "revision": "a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1", - "revisionTime": "2018-07-19T17:54:20Z" - }, - { - "checksumSHA1": "RcrB7tgYS/GMW4QrwVdMOTNqIU8=", - "path": "golang.org/x/net/idna", - "revision": "a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1", - "revisionTime": "2018-07-19T17:54:20Z" - }, - { - "checksumSHA1": "S4QRxs3K4notNO97Um4sA2IvHaM=", - "path": "golang.org/x/net/proxy", - "revision": "a04bdaca5b32abe1c069418fb7088ae607de5bd0", - "revisionTime": "2017-10-03T05:09:24Z" - }, - { - "checksumSHA1": "mktBVED98G2vv+OKcSgtnFVZC1Y=", - "path": "golang.org/x/oauth2", - "revision": "8a57ed94ffd43444c0879fe75701732a38afc985" - }, - { - "checksumSHA1": "HSRFs3mt2eHJBaK+6HEEv66xKyA=", - "path": "golang.org/x/oauth2/google", - "revision": "8a57ed94ffd43444c0879fe75701732a38afc985" - }, - { - "checksumSHA1": "st9F4RETvsjcEHmnMvF9XvlAxDE=", - "path": "golang.org/x/oauth2/internal", - "revision": "8a57ed94ffd43444c0879fe75701732a38afc985" - }, - { - "checksumSHA1": "4GaanJZHtrkglrx6a585C3I07+s=", - "path": "golang.org/x/oauth2/jws", - "revision": "8a57ed94ffd43444c0879fe75701732a38afc985" - }, - { - "checksumSHA1": "xifBSq0Pn6pIoPA/o3tyzq8X4Ds=", - "path": "golang.org/x/oauth2/jwt", - "revision": "8a57ed94ffd43444c0879fe75701732a38afc985" - }, - { - "checksumSHA1": "S0DP7Pn7sZUmXc55IzZnNvERu6s=", - "path": "golang.org/x/sync/errgroup", - "revision": "5a06fca2c336a4b2b2fcb45702e8c47621b2aa2c", - "revisionTime": "2017-03-17T17:13:11Z" - }, - { - "checksumSHA1": "HUsOCUBC1i9oPZo0VvmawbuhGa4=", - "path": "golang.org/x/sys/unix", - "revision": "13d03a9a82fba647c21a0ef8fba44a795d0f0835", - "revisionTime": "2018-03-26T12:16:02Z" - }, - { - "checksumSHA1": "Dfz4tGItokMvHZENCsBmPPB8FGQ=", - "path": "golang.org/x/sys/windows", - "revision": "13d03a9a82fba647c21a0ef8fba44a795d0f0835", - "revisionTime": "2018-03-26T12:16:02Z" - }, - { - "checksumSHA1": "Mr4ur60bgQJnQFfJY0dGtwWwMPE=", - "path": "golang.org/x/text/encoding", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "DSdlK4MKI/a3U8Zaee2XKBe01Fo=", - "path": "golang.org/x/text/encoding/charmap", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "4G6XCBh9Pf3zXDWr/4+P4/BlrSg=", - "path": "golang.org/x/text/encoding/htmlindex", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "zeHyHebIZl1tGuwGllIhjfci+wI=", - "path": "golang.org/x/text/encoding/internal", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "7kYqxy64WhMjFIFZgN7tJ3lbKxM=", - "path": "golang.org/x/text/encoding/internal/identifier", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "2YqVpmvjWGEBATyUphTP1MS34JE=", - "path": "golang.org/x/text/encoding/japanese", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "+ErWCAdaMwO4PLtrk9D/Hh+7oQM=", - "path": "golang.org/x/text/encoding/korean", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "mTuZi5urYwgDIO8+Gfql2pv8Vwg=", - "path": "golang.org/x/text/encoding/simplifiedchinese", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "D+VI4j0Wjzr8SeupWdOB5KBdFOw=", - "path": "golang.org/x/text/encoding/traditionalchinese", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "G9LfJI9gySazd+MyyC6QbTHx4to=", - "path": "golang.org/x/text/encoding/unicode", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "hyNCcTwMQnV6/MK8uUW9E5H0J0M=", - "path": "golang.org/x/text/internal/tag", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "Qk7dljcrEK1BJkAEZguxAbG9dSo=", - "path": "golang.org/x/text/internal/utf8internal", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "SymSEo6vQqD+yGDQ1eOmZywzybs=", - "path": "golang.org/x/text/language", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "IV4MN7KGBSocu/5NR3le3sxup4Y=", - "path": "golang.org/x/text/runes", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "CbpjEkkOeh0fdM/V8xKDdI0AA88=", - "path": "golang.org/x/text/secure/bidirule", - "revision": "0605a8320aceb4207a5fb3521281e17ec2075476", - "revisionTime": "2018-07-08T16:53:44Z" - }, - { - "checksumSHA1": "ziMb9+ANGRJSSIuxYdRbA+cDRBQ=", - "path": "golang.org/x/text/transform", - "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b", - "revisionTime": "2017-07-04T19:41:35Z" - }, - { - "checksumSHA1": "w8kDfZ1Ug+qAcVU0v8obbu3aDOY=", - "path": "golang.org/x/text/unicode/bidi", - "revision": "0605a8320aceb4207a5fb3521281e17ec2075476", - "revisionTime": "2018-07-08T16:53:44Z" - }, - { - "checksumSHA1": "BCNYmf4Ek93G4lk5x3ucNi/lTwA=", - "path": "golang.org/x/text/unicode/norm", - "revision": "0605a8320aceb4207a5fb3521281e17ec2075476", - "revisionTime": "2018-07-08T16:53:44Z" - }, - { - "checksumSHA1": "HoCvrd3hEhsFeBOdEw7cbcfyk50=", - "path": "golang.org/x/time/rate", - "revision": "fbb02b2291d28baffd63558aa44b4b56f178d650", - "revisionTime": "2018-04-12T16:56:04Z" - }, - { - "checksumSHA1": "oK9IOgVH0CByZ8YSAswfZT7StuE=", - "path": "google.golang.org/api/compute/v1", - "revision": "e21acd801f91da814261b938941d193bb036441a", - "revisionTime": "2018-08-18T00:05:03Z" - }, - { - "checksumSHA1": "EooPqEpEyY/7NCRwHDMWhhlkQNw=", - "path": "google.golang.org/api/gensupport", - "revision": "9c79deebf7496e355d7e95d82d4af1fe4e769b2f", - "revisionTime": "2018-04-16T00:04:00Z" - }, - { - "checksumSHA1": "yQREK/OWrz9PLljbr127+xFk6J0=", - "path": "google.golang.org/api/googleapi", - "revision": "ff0a1ff302946b997eb1832381419d1f95143483" - }, - { - "checksumSHA1": "ii4ET3JHk3vkMUEcg+9t/1RZSUU=", - "path": "google.golang.org/api/googleapi/internal/uritemplates", - "revision": "ff0a1ff302946b997eb1832381419d1f95143483" - }, - { - "checksumSHA1": "Zpu9YB1omKr0VhFb8iycN1u+42Y=", - "path": "google.golang.org/api/storage/v1", - "revision": "9c79deebf7496e355d7e95d82d4af1fe4e769b2f", - "revisionTime": "2018-04-16T00:04:00Z" - }, - { - "checksumSHA1": "SSYsrizGeHQRKn/S7j5CQu86egU=", - "path": "google.golang.org/appengine", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "AlZOauBtUhymDxEOxlfKN9111aI=", - "path": "google.golang.org/appengine/cmd/aebundler", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "vVXUSf9nSmmjYXcQHnrBXIf/RTY=", - "path": "google.golang.org/appengine/cmd/aedeploy", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "VvslAadlHQLVoBi7H2tAJFuIhPY=", - "path": "google.golang.org/appengine/datastore", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "ClI914FfJcioPLxuJoefqxdw2Ho=", - "path": "google.golang.org/appengine/demos/guestbook", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "MvaATTS7BF6npf0VpAN/qmfjJhU=", - "path": "google.golang.org/appengine/demos/helloworld", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "kfslaLecTWjN5Nrm/RqxgwXvgeY=", - "path": "google.golang.org/appengine/internal", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "x6Thdfyasqd68dWZWqzWWeIfAfI=", - "path": "google.golang.org/appengine/internal/app_identity", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "TsNO8P0xUlLNyh3Ic/tzSp/fDWM=", - "path": "google.golang.org/appengine/internal/base", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "5QsV5oLGSfKZqTCVXP6NRz5T4Tw=", - "path": "google.golang.org/appengine/internal/datastore", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "Gep2T9zmVYV8qZfK2gu3zrmG6QE=", - "path": "google.golang.org/appengine/internal/log", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "eLZVX1EHLclFtQnjDIszsdyWRHo=", - "path": "google.golang.org/appengine/internal/modules", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "a1XY7rz3BieOVqVI2Et6rKiwQCk=", - "path": "google.golang.org/appengine/internal/remote_api", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "g85w5xA09gP549b5BnCSYK23kAU=", - "path": "google.golang.org/appengine/internal/user", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "piNG4dTjR7jcimOvvnZhXXPMGzQ=", - "path": "google.golang.org/appengine/log", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "PnGkXjb1s3lGfbSBkAn5mRDXeiI=", - "path": "google.golang.org/appengine/user", - "revision": "6bde959377a90acb53366051d7d587bfd7171354" - }, - { - "checksumSHA1": "SszVm8jmAyX2M3WgXcmnXLnxQiA=", - "path": "google.golang.org/cloud/compute/metadata", - "revision": "5a3b06f8b5da3b7c3a93da43163b872c86c509ef" - }, - { - "checksumSHA1": "U7dGDNwEHORvJFMoNSXErKE7ITg=", - "path": "google.golang.org/cloud/internal", - "revision": "5a3b06f8b5da3b7c3a93da43163b872c86c509ef" - }, - { - "checksumSHA1": "ZSWoOPUNRr5+3dhkLK3C4cZAQPk=", - "path": "gopkg.in/yaml.v2", - "revision": "5420a8b6744d3b0345ab293f6fcba19c978f1183", - "revisionTime": "2018-03-28T19:50:20Z" - } - ], - "rootPath": "github.com/hashicorp/packer" -}