vault/api
Christopher Swenson 961bf20bdb
Use enumer to generate String() methods for most enums (#25705)
We have many hand-written String() methods (and similar) for enums.
These require more maintenance and are more error-prone than using
automatically generated methods. In addition, the auto-generated
versions can be more efficient.

Here, we switch to using https://github.com/loggerhead/enumer, itself
a fork of https://github.com/diegostamigni/enumer, no longer maintained,
and a fork of the mostly standard tool
https://pkg.go.dev/golang.org/x/tools/cmd/stringer.
We use this fork of enumer for Go 1.20+ compatibility and because
we require the `-transform` flag to be able to generate
constants that match our current code base.

Some enums were not targeted for this change:
2024-04-17 11:14:14 -07:00
..
auth Update Vault auth submodule API versions for 1.16 (#25290) 2024-02-08 10:46:33 -05:00
cliconfig Move CLI token helper to api module (#25744) 2024-03-04 18:29:20 +00:00
test-fixtures adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
tokenhelper Move CLI token helper to api module (#25744) 2024-03-04 18:29:20 +00:00
.copywrite.hcl [DO NOT MERGE UNTIL EOY] update year in LICENSE and copywrite files (#24368) 2024-01-02 13:22:15 -08:00
api_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
auth.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
auth_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
auth_token.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
client.go ParseAddress test fix (#17382) 2024-01-10 15:35:23 +00:00
client_test.go Move wg.Add outside of goroutine (#25104) 2024-01-26 19:01:54 +00:00
go.mod Bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3 in /api (#25841) 2024-03-15 17:52:57 +00:00
go.sum Bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3 in /api (#25841) 2024-03-15 17:52:57 +00:00
help.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
kv.go docs: Update outdated vaultproject.io/docs/ links (#22162) 2023-08-15 12:59:34 -04:00
kv_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
kv_v1.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
kv_v2.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
LICENSE [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
lifetime_watcher.go Use enumer to generate String() methods for most enums (#25705) 2024-04-17 11:14:14 -07:00
logical.go Add WriteRaw to client api and new PKI test helper (#24818) 2024-01-11 13:51:42 -05:00
output_policy.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
output_policy_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
output_string.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
plugin_helpers.go add gosimport to make fmt and run it (#25383) 2024-02-13 14:07:02 -08:00
plugin_runtime_types.go Use enumer to generate String() methods for most enums (#25705) 2024-04-17 11:14:14 -07:00
plugin_types.go New root namespace plugin reload API sys/plugins/reload/:type/:name (#24878) 2024-01-17 15:46:27 +00:00
plugin_types_test.go New root namespace plugin reload API sys/plugins/reload/:type/:name (#24878) 2024-01-17 15:46:27 +00:00
pluginruntimetype_enumer.go Use enumer to generate String() methods for most enums (#25705) 2024-04-17 11:14:14 -07:00
README.md docs: Update outdated vaultproject.io/docs/ links (#22162) 2023-08-15 12:59:34 -04:00
renewbehavior_enumer.go Use enumer to generate String() methods for most enums (#25705) 2024-04-17 11:14:14 -07:00
renewer_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
replication_status.go CE part of https://github.com/hashicorp/vault-enterprise/pull/4269 (#26406) 2024-04-15 20:08:57 +00:00
request.go Add HCP subcommand -- integrate with HCP library (#23897) 2024-01-09 15:29:30 +01:00
request_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
response.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
secret.go VAULT-19237 Add mount_type to secret response (#23047) 2023-09-20 09:28:52 -04:00
secret_test.go Relplat 897 copywrite fixes for mutliple licenses (#23722) 2023-10-20 08:40:43 -07:00
ssh.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
ssh_agent.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
ssh_agent_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sudo_paths.go add plugin runtime API (#22469) 2023-08-31 13:37:04 -07:00
sudo_paths_test.go add plugin runtime API (#22469) 2023-08-31 13:37:04 -07:00
sys.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_audit.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_auth.go api: do not require sudo for GetAuth wrapper (#25968) 2024-03-15 14:40:22 -07:00
sys_capabilities.go Command: token capabilities using accessor (#24479) 2023-12-13 11:15:21 -05:00
sys_config_cors.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_generate_root.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_hastatus.go CE part of https://github.com/hashicorp/vault-enterprise/pull/4269 (#26406) 2024-04-15 20:08:57 +00:00
sys_health.go CE part of https://github.com/hashicorp/vault-enterprise/pull/4269 (#26406) 2024-04-15 20:08:57 +00:00
sys_init.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_leader.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_leases.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_mfa.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_monitor.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_mounts.go api: add wrapper functions for GET auth and mount (#25499) 2024-02-20 10:31:08 -06:00
sys_mounts_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_plugins.go New root namespace plugin reload API sys/plugins/reload/:type/:name (#24878) 2024-01-17 15:46:27 +00:00
sys_plugins_runtimes.go Support rootless plugin containers (#24236) 2023-11-28 14:07:07 +00:00
sys_plugins_runtimes_test.go add plugin runtime API (#22469) 2023-08-31 13:37:04 -07:00
sys_plugins_test.go Vault 18538 reference runtime on plugin register (#22744) 2023-09-06 23:37:10 -07:00
sys_policy.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_raft.go CE changes for https://github.com/hashicorp/vault-enterprise/pull/5695 (#26449) 2024-04-16 18:26:26 +00:00
sys_rekey.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_rotate.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_seal.go Correct the post-unseal meaning of the seal status type (#23022) 2023-10-09 12:53:13 -05:00
sys_stepdown.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_ui_custom_message.go VAULT-22504: Support Custom Messages in api Package (#24959) 2024-01-23 13:20:58 -05:00
sys_ui_custom_message_test.go VAULT-22504: Support Custom Messages in api Package (#24959) 2024-01-23 13:20:58 -05:00

Vault API

This provides the github.com/hashicorp/vault/api package which contains code useful for interacting with a Vault server.

For examples of how to use this module, see the vault-examples repo. For a step-by-step walkthrough on using these client libraries, see the developer quickstart.

GoDoc