chore: make tools & make gen
This commit is contained in:
1 parent
ac78ee6315
commit
61fe77572e
45 files changed
+168
-63
No files matched your search
@@ -42,10 +42,8 @@ func (n AccountReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
AccountCreateResult = AccountReadResult
|
||||
AccountUpdateResult = AccountReadResult
|
||||
)
|
||||
type AccountCreateResult = AccountReadResult
|
||||
type AccountUpdateResult = AccountReadResult
|
||||
|
||||
type AccountDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -43,10 +43,8 @@ func (n AuthMethodReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
AuthMethodCreateResult = AuthMethodReadResult
|
||||
AuthMethodUpdateResult = AuthMethodReadResult
|
||||
)
|
||||
type AuthMethodCreateResult = AuthMethodReadResult
|
||||
type AuthMethodUpdateResult = AuthMethodReadResult
|
||||
|
||||
type AuthMethodDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -41,10 +41,8 @@ func (n AuthTokenReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
AuthTokenCreateResult = AuthTokenReadResult
|
||||
AuthTokenUpdateResult = AuthTokenReadResult
|
||||
)
|
||||
type AuthTokenCreateResult = AuthTokenReadResult
|
||||
type AuthTokenUpdateResult = AuthTokenReadResult
|
||||
|
||||
type AuthTokenDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -43,10 +43,8 @@ func (n CredentialLibraryReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
CredentialLibraryCreateResult = CredentialLibraryReadResult
|
||||
CredentialLibraryUpdateResult = CredentialLibraryReadResult
|
||||
)
|
||||
type CredentialLibraryCreateResult = CredentialLibraryReadResult
|
||||
type CredentialLibraryUpdateResult = CredentialLibraryReadResult
|
||||
|
||||
type CredentialLibraryDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -42,10 +42,8 @@ func (n CredentialStoreReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
CredentialStoreCreateResult = CredentialStoreReadResult
|
||||
CredentialStoreUpdateResult = CredentialStoreReadResult
|
||||
)
|
||||
type CredentialStoreCreateResult = CredentialStoreReadResult
|
||||
type CredentialStoreUpdateResult = CredentialStoreReadResult
|
||||
|
||||
type CredentialStoreDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -41,10 +41,8 @@ func (n GroupReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
GroupCreateResult = GroupReadResult
|
||||
GroupUpdateResult = GroupReadResult
|
||||
)
|
||||
type GroupCreateResult = GroupReadResult
|
||||
type GroupUpdateResult = GroupReadResult
|
||||
|
||||
type GroupDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -47,10 +47,8 @@ func (n HostCatalogReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
HostCatalogCreateResult = HostCatalogReadResult
|
||||
HostCatalogUpdateResult = HostCatalogReadResult
|
||||
)
|
||||
type HostCatalogCreateResult = HostCatalogReadResult
|
||||
type HostCatalogUpdateResult = HostCatalogReadResult
|
||||
|
||||
type HostCatalogDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -47,10 +47,8 @@ func (n HostReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
HostCreateResult = HostReadResult
|
||||
HostUpdateResult = HostReadResult
|
||||
)
|
||||
type HostCreateResult = HostReadResult
|
||||
type HostUpdateResult = HostReadResult
|
||||
|
||||
type HostDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -46,10 +46,8 @@ func (n HostSetReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
HostSetCreateResult = HostSetReadResult
|
||||
HostSetUpdateResult = HostSetReadResult
|
||||
)
|
||||
type HostSetCreateResult = HostSetReadResult
|
||||
type HostSetUpdateResult = HostSetReadResult
|
||||
|
||||
type HostSetDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -42,10 +42,8 @@ func (n ManagedGroupReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
ManagedGroupCreateResult = ManagedGroupReadResult
|
||||
ManagedGroupUpdateResult = ManagedGroupReadResult
|
||||
)
|
||||
type ManagedGroupCreateResult = ManagedGroupReadResult
|
||||
type ManagedGroupUpdateResult = ManagedGroupReadResult
|
||||
|
||||
type ManagedGroupDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -44,10 +44,8 @@ func (n RoleReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
RoleCreateResult = RoleReadResult
|
||||
RoleUpdateResult = RoleReadResult
|
||||
)
|
||||
type RoleCreateResult = RoleReadResult
|
||||
type RoleUpdateResult = RoleReadResult
|
||||
|
||||
type RoleDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -41,10 +41,8 @@ func (n ScopeReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
ScopeCreateResult = ScopeReadResult
|
||||
ScopeUpdateResult = ScopeReadResult
|
||||
)
|
||||
type ScopeCreateResult = ScopeReadResult
|
||||
type ScopeUpdateResult = ScopeReadResult
|
||||
|
||||
type ScopeDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -50,10 +50,8 @@ func (n SessionReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
SessionCreateResult = SessionReadResult
|
||||
SessionUpdateResult = SessionReadResult
|
||||
)
|
||||
type SessionCreateResult = SessionReadResult
|
||||
type SessionUpdateResult = SessionReadResult
|
||||
|
||||
type SessionDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -54,10 +54,8 @@ func (n TargetReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
TargetCreateResult = TargetReadResult
|
||||
TargetUpdateResult = TargetReadResult
|
||||
)
|
||||
type TargetCreateResult = TargetReadResult
|
||||
type TargetUpdateResult = TargetReadResult
|
||||
|
||||
type TargetDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -45,10 +45,8 @@ func (n UserReadResult) GetResponse() *api.Response {
|
||||
return n.response
|
||||
}
|
||||
|
||||
type (
|
||||
UserCreateResult = UserReadResult
|
||||
UserUpdateResult = UserReadResult
|
||||
)
|
||||
type UserCreateResult = UserReadResult
|
||||
type UserUpdateResult = UserReadResult
|
||||
|
||||
type UserDeleteResult struct {
|
||||
response *api.Response
|
||||
|
||||
@@ -144,11 +144,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "auth-method-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagAuthMethodId == "" {
|
||||
c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *OidcCommand) Help() string {
|
||||
helpMap := common.HelpMap("account")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraOidcHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -104,6 +106,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "oidc-type account"
|
||||
@@ -128,11 +131,13 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsOidcMap[c.Func], "auth-method-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagAuthMethodId == "" {
|
||||
c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +171,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -173,6 +179,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraOidcFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -214,6 +221,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *PasswordCommand) Help() string {
|
||||
helpMap := common.HelpMap("account")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraPasswordHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -104,6 +106,7 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "password-type account"
|
||||
@@ -128,11 +131,13 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsPasswordMap[c.Func], "auth-method-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagAuthMethodId == "" {
|
||||
c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +171,7 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -173,6 +179,7 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraPasswordFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -214,6 +221,7 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -142,11 +142,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *OidcCommand) Help() string {
|
||||
helpMap := common.HelpMap("auth method")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraOidcHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -104,6 +106,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "oidc-type auth method"
|
||||
@@ -128,11 +131,13 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsOidcMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,6 +234,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *PasswordCommand) Help() string {
|
||||
helpMap := common.HelpMap("auth method")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraPasswordHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -104,6 +106,7 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "password-type auth method"
|
||||
@@ -128,11 +131,13 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsPasswordMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +176,7 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -178,6 +184,7 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraPasswordFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -219,6 +226,7 @@ func (c *PasswordCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -114,6 +114,7 @@ func (c *Command) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "auth token"
|
||||
@@ -133,11 +134,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,11 +142,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "credential-store-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagCredentialStoreId == "" {
|
||||
c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *VaultCommand) Help() string {
|
||||
helpMap := common.HelpMap("credential library")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraVaultHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -104,6 +106,7 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "vault-type credential library"
|
||||
@@ -128,11 +131,13 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsVaultMap[c.Func], "credential-store-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagCredentialStoreId == "" {
|
||||
c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +171,7 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -173,6 +179,7 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraVaultFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -216,6 +223,7 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -142,11 +142,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *VaultCommand) Help() string {
|
||||
helpMap := common.HelpMap("credential store")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraVaultHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -104,6 +106,7 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "vault-type credential store"
|
||||
@@ -128,11 +131,13 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsVaultMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +176,7 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -178,6 +184,7 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraVaultFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -221,6 +228,7 @@ func (c *VaultCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -126,6 +126,7 @@ func (c *Command) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "group"
|
||||
|
||||
@@ -142,11 +142,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,9 +65,11 @@ func (c *PluginCommand) Help() string {
|
||||
helpMap := common.HelpMap("host catalog")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraPluginHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -108,6 +110,7 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "plugin-type host catalog"
|
||||
@@ -132,11 +135,13 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsPluginMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +191,7 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -193,6 +199,7 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if err := common.HandleAttributeFlags(
|
||||
@@ -264,6 +271,7 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -65,9 +65,11 @@ func (c *StaticCommand) Help() string {
|
||||
helpMap := common.HelpMap("host catalog")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraStaticHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -102,6 +104,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "static-type host catalog"
|
||||
@@ -126,11 +129,13 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsStaticMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,6 +174,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -176,6 +182,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraStaticFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -217,6 +224,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -142,11 +142,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "host-catalog-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagHostCatalogId == "" {
|
||||
c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *StaticCommand) Help() string {
|
||||
helpMap := common.HelpMap("host")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraStaticHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -104,6 +106,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "static-type host"
|
||||
@@ -128,11 +131,13 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsStaticMap[c.Func], "host-catalog-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagHostCatalogId == "" {
|
||||
c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +171,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -173,6 +179,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraStaticFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -214,6 +221,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -144,11 +144,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "host-catalog-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagHostCatalogId == "" {
|
||||
c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *PluginCommand) Help() string {
|
||||
helpMap := common.HelpMap("host set")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraPluginHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -107,6 +109,7 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "plugin-type host set"
|
||||
@@ -131,11 +134,13 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsPluginMap[c.Func], "host-catalog-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagHostCatalogId == "" {
|
||||
c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,6 +174,7 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -176,6 +182,7 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if err := common.HandleAttributeFlags(
|
||||
@@ -232,6 +239,7 @@ func (c *PluginCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -65,9 +65,11 @@ func (c *StaticCommand) Help() string {
|
||||
helpMap := common.HelpMap("host set")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraStaticHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -102,6 +104,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "static-type host set"
|
||||
@@ -126,11 +129,13 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsStaticMap[c.Func], "host-catalog-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagHostCatalogId == "" {
|
||||
c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,6 +169,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -171,6 +177,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraStaticFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -212,6 +219,7 @@ func (c *StaticCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -142,11 +142,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "auth-method-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagAuthMethodId == "" {
|
||||
c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *OidcCommand) Help() string {
|
||||
helpMap := common.HelpMap("managed group")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraOidcHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -104,6 +106,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "oidc-type managed group"
|
||||
@@ -128,11 +131,13 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsOidcMap[c.Func], "auth-method-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagAuthMethodId == "" {
|
||||
c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +171,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -173,6 +179,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraOidcFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -214,6 +221,7 @@ func (c *OidcCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -126,6 +126,7 @@ func (c *Command) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "role"
|
||||
|
||||
@@ -126,6 +126,7 @@ func (c *Command) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "scope"
|
||||
@@ -201,6 +202,7 @@ func (c *Command) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -208,6 +210,7 @@ func (c *Command) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
|
||||
@@ -109,6 +109,7 @@ func (c *Command) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "session"
|
||||
@@ -133,11 +134,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +163,7 @@ func (c *Command) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "cancel":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -167,6 +171,7 @@ func (c *Command) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -210,6 +215,7 @@ func (c *Command) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
switch base.Format(c.UI) {
|
||||
case "json":
|
||||
@@ -223,6 +229,7 @@ func (c *Command) Run(args []string) int {
|
||||
}
|
||||
|
||||
return base.CommandSuccess
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -145,11 +145,13 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "list":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ func (c *TcpCommand) Help() string {
|
||||
helpMap := common.HelpMap("target")
|
||||
|
||||
switch c.Func {
|
||||
|
||||
default:
|
||||
|
||||
helpStr = c.extraTcpHelpFunc(helpMap)
|
||||
|
||||
}
|
||||
|
||||
// Keep linter from complaining if we don't actually generate code using it
|
||||
@@ -104,6 +106,7 @@ func (c *TcpCommand) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "tcp-type target"
|
||||
@@ -128,11 +131,13 @@ func (c *TcpCommand) Run(args []string) int {
|
||||
|
||||
if strutil.StrListContains(flagsTcpMap[c.Func], "scope-id") {
|
||||
switch c.Func {
|
||||
|
||||
case "create":
|
||||
if c.FlagScopeId == "" {
|
||||
c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID"))
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +176,7 @@ func (c *TcpCommand) Run(args []string) int {
|
||||
var version uint32
|
||||
|
||||
switch c.Func {
|
||||
|
||||
case "update":
|
||||
switch c.FlagVersion {
|
||||
case 0:
|
||||
@@ -178,6 +184,7 @@ func (c *TcpCommand) Run(args []string) int {
|
||||
default:
|
||||
version = uint32(c.FlagVersion)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ok := extraTcpFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
@@ -219,6 +226,7 @@ func (c *TcpCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
switch c.Func {
|
||||
|
||||
}
|
||||
|
||||
switch base.Format(c.UI) {
|
||||
|
||||
@@ -126,6 +126,7 @@ func (c *Command) Run(args []string) int {
|
||||
switch c.Func {
|
||||
case "":
|
||||
return cli.RunResultHelp
|
||||
|
||||
}
|
||||
|
||||
c.plural = "user"
|
||||
|
||||
@@ -519,7 +519,6 @@ func TestRepository_UpdateCredentialLibrary(t *testing.T) {
|
||||
wantCount int
|
||||
wantErr errors.Code
|
||||
}{
|
||||
|
||||
{
|
||||
name: "nil-credential-library",
|
||||
orig: &CredentialLibrary{
|
||||
|
||||
+2
-2
@@ -344,8 +344,8 @@ func (s Service) updateInRepo(
|
||||
masks []string,
|
||||
in *pb.CredentialLibrary,
|
||||
currentCredentialType credential.Type,
|
||||
currentMapping vault.MappingOverride) (credential.Library, error) {
|
||||
|
||||
currentMapping vault.MappingOverride) (credential.Library, error,
|
||||
) {
|
||||
const op = "credentiallibraries.(Service).updateInRepo"
|
||||
|
||||
var dbMasks []string
|
||||
|
||||
Reference in new issue
Block a user