github.com/blend/go-sdk@v1.20220411.3/vault/constants.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package vault 9 10 import "time" 11 12 const ( 13 // DefaultAddr is the default addr. 14 DefaultAddr = "http://127.0.0.1:8200" 15 // DefaultTimeout is the default timeout. 16 DefaultTimeout = time.Second 17 // DefaultMount is the default kv mount. 18 DefaultMount = "/secret" 19 ) 20 21 const ( 22 // EnvVarVaultAddr is the environment variable for the vault address. 23 EnvVarVaultAddr = "VAULT_ADDR" 24 // EnvVarVaultMount is the environment variable for the vault mount. 25 EnvVarVaultMount = "VAULT_MOUNT" 26 // EnvVarVaultToken is the environment variable for the vault token. 27 EnvVarVaultToken = "VAULT_TOKEN" 28 // EnvVarVaultCertAuthorityPath is the environment variable for the vault certificate authority. 29 EnvVarVaultCertAuthorityPath = "VAULT_CACERT" 30 // EnvVarVaultTimeout is the environment variable for how long to wait for vault to timeout. The values here 31 // are parsed by time.ParseDuration. Examples (5s = five seconds, 100ms = 100 milliseconds, etc.) 32 EnvVarVaultTimeout = "VAULT_TIMEOUT" 33 ) 34 35 const ( 36 // MethodGet is a request method. 37 MethodGet = "GET" 38 // MethodPost is a request method. 39 MethodPost = "POST" 40 // MethodPut is a request method. 41 MethodPut = "PUT" 42 // MethodDelete is a request method. 43 MethodDelete = "DELETE" 44 // MethodList is a request method. 45 MethodList = "LIST" 46 47 // HeaderVaultToken is the vault token header. 48 HeaderVaultToken = "X-Vault-Token" 49 // HeaderContentType is the content type header. 50 HeaderContentType = "Content-Type" 51 // ContentTypeApplicationJSON is a content type. 52 ContentTypeApplicationJSON = "application/json" 53 54 // DefaultBufferPoolSize is the default buffer pool size. 55 DefaultBufferPoolSize = 1024 56 57 // ReflectTagName is a reflect tag name. 58 ReflectTagName = "secret" 59 60 // Version1 is a constant. 61 Version1 = "1" 62 // Version2 is a constant. 63 Version2 = "2" 64 ) 65 66 // These types are encryption algorithms that can be used when creating a transit key 67 const ( 68 TypeAES256GCM96 = "aes256-gcm96" 69 TypeCHACHA20POLY1305 = "chacha20-poly1305" 70 TypeED25519 = "ed25519" 71 TypeECDSAP256 = "ecdsa-p256" 72 TypeRSA2048 = "rsa-2048" 73 TypeRSA4096 = "rsa-4096" 74 ) 75 76 // These constants are used to sign the get identity request 77 const ( 78 // STSURL is the url of the sts call 79 STSURL = "https://sts.amazonaws.com" 80 // STSGetIdentityBody is the body of the post request 81 STSGetIdentityBody = "Action=GetCallerIdentity&Version=2011-06-15" 82 ) 83 84 // constants required for login /v1/auth/aws/login 85 const ( 86 // AWSAuthLoginPath is the login path for aws iam auth 87 AWSAuthLoginPath = "/v1/auth/aws/login" 88 )