Documentation ¶
Overview ¶
Adds or updates application privileges.
Index ¶
- Variables
- type NewPutPrivileges
- type PutPrivileges
- func (r PutPrivileges) Do(providedCtx context.Context) (Response, error)
- func (r *PutPrivileges) Header(key, value string) *PutPrivileges
- func (r *PutPrivileges) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r PutPrivileges) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *PutPrivileges) Raw(raw io.Reader) *PutPrivileges
- func (r *PutPrivileges) Refresh(refresh refresh.Refresh) *PutPrivileges
- func (r *PutPrivileges) Request(req *Request) *PutPrivileges
- type Request
- type Response
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 NewPutPrivileges ¶
type NewPutPrivileges func() *PutPrivileges
NewPutPrivileges type alias for index.
func NewPutPrivilegesFunc ¶
func NewPutPrivilegesFunc(tp elastictransport.Interface) NewPutPrivileges
NewPutPrivilegesFunc returns a new instance of PutPrivileges with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type PutPrivileges ¶
type PutPrivileges struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *PutPrivileges
Adds or updates application privileges.
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html
func (PutPrivileges) Do ¶
func (r PutPrivileges) Do(providedCtx context.Context) (Response, error)
Do runs the request through the transport, handle the response and returns a putprivileges.Response
func (*PutPrivileges) Header ¶
func (r *PutPrivileges) Header(key, value string) *PutPrivileges
Header set a key, value pair in the PutPrivileges headers map.
func (*PutPrivileges) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (PutPrivileges) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*PutPrivileges) Raw ¶
func (r *PutPrivileges) Raw(raw io.Reader) *PutPrivileges
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*PutPrivileges) Refresh ¶
func (r *PutPrivileges) Refresh(refresh refresh.Refresh) *PutPrivileges
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 (*PutPrivileges) Request ¶
func (r *PutPrivileges) Request(req *Request) *PutPrivileges
Request allows to set the request property with the appropriate payload.
type Request ¶
type Request = map[string]map[string]types.PrivilegesActions
Request holds the request body struct for the package putprivileges