Documentation ¶
Overview ¶
Creates and updates role mappings.
Index ¶
- Variables
- type NewPutRoleMapping
- type PutRoleMapping
- func (r PutRoleMapping) Do(ctx context.Context) (*http.Response, error)
- func (r *PutRoleMapping) Header(key, value string) *PutRoleMapping
- func (r *PutRoleMapping) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutRoleMapping) Name(v string) *PutRoleMapping
- func (r *PutRoleMapping) Raw(raw json.RawMessage) *PutRoleMapping
- func (r *PutRoleMapping) Refresh(enum refresh.Refresh) *PutRoleMapping
- func (r *PutRoleMapping) Request(req *Request) *PutRoleMapping
- type Request
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type NewPutRoleMapping ¶
type NewPutRoleMapping func(name string) *PutRoleMapping
NewPutRoleMapping type alias for index.
func NewPutRoleMappingFunc ¶
func NewPutRoleMappingFunc(tp elastictransport.Interface) NewPutRoleMapping
NewPutRoleMappingFunc returns a new instance of PutRoleMapping with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type PutRoleMapping ¶
type PutRoleMapping struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *PutRoleMapping
Creates and updates role mappings.
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html
func (*PutRoleMapping) Header ¶
func (r *PutRoleMapping) Header(key, value string) *PutRoleMapping
Header set a key, value pair in the PutRoleMapping headers map.
func (*PutRoleMapping) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*PutRoleMapping) Name ¶
func (r *PutRoleMapping) Name(v string) *PutRoleMapping
Name Role-mapping name API Name: name
func (*PutRoleMapping) Raw ¶
func (r *PutRoleMapping) Raw(raw json.RawMessage) *PutRoleMapping
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*PutRoleMapping) Refresh ¶
func (r *PutRoleMapping) Refresh(enum refresh.Refresh) *PutRoleMapping
Refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. API name: refresh
func (*PutRoleMapping) Request ¶
func (r *PutRoleMapping) Request(req *Request) *PutRoleMapping
Request allows to set the request property with the appropriate payload.
type Request ¶
type Request struct { Enabled *bool `json:"enabled,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Roles []string `json:"roles,omitempty"` Rules *types.RoleMappingRule `json:"rules,omitempty"` RunAs []string `json:"run_as,omitempty"` }
Request holds the request body struct for the package putrolemapping