You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/api/aliases/option.go

44 lines
1.1 KiB

// Code generated by "make api"; DO NOT EDIT.
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aliases
func WithTargetAliasAuthorizeSessionArgumentsHostId(hid string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
}
attrVal := raw.(map[string]interface{})
argRaw, ok := attrVal["authorize_session_arguments"]
if !ok {
argRaw = interface{}(map[string]interface{}{})
}
argVal := argRaw.(map[string]interface{})
argVal["host_id"] = hid
attrVal["authorize_session_arguments"] = argVal
o.postMap["attributes"] = attrVal
}
}
func DefaultTargetAliasAuthorizeSessionArgumentsHostId() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
}
attrVal := raw.(map[string]interface{})
argRaw, ok := attrVal["authorize_session_arguments"]
if !ok {
argRaw = interface{}(map[string]interface{}{})
}
argVal := argRaw.(map[string]interface{})
argVal["host_id"] = nil
attrVal["authorize_session_arguments"] = argVal
o.postMap["attributes"] = attrVal
}
}