hasprivilegesuserprofile

package
v8.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Overview

Determines whether the users associated with the specified profile IDs have all the requested privileges.

Index

Constants

This section is empty.

Variables

View Source
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 HasPrivilegesUserProfile

type HasPrivilegesUserProfile struct {
	// contains filtered or unexported fields
}

func New

Determines whether the users associated with the specified profile IDs have all the requested privileges.

https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html

func (HasPrivilegesUserProfile) Do

func (r HasPrivilegesUserProfile) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a hasprivilegesuserprofile.Response

func (*HasPrivilegesUserProfile) Header

Header set a key, value pair in the HasPrivilegesUserProfile headers map.

func (*HasPrivilegesUserProfile) HttpRequest

func (r *HasPrivilegesUserProfile) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (HasPrivilegesUserProfile) Perform added in v8.7.0

func (r HasPrivilegesUserProfile) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*HasPrivilegesUserProfile) Privileges added in v8.9.0

API name: privileges

func (*HasPrivilegesUserProfile) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*HasPrivilegesUserProfile) Request

Request allows to set the request property with the appropriate payload.

func (*HasPrivilegesUserProfile) Uids added in v8.9.0

Uids A list of profile IDs. The privileges are checked for associated users of the profiles. API name: uids

type NewHasPrivilegesUserProfile

type NewHasPrivilegesUserProfile func() *HasPrivilegesUserProfile

NewHasPrivilegesUserProfile type alias for index.

func NewHasPrivilegesUserProfileFunc

func NewHasPrivilegesUserProfileFunc(tp elastictransport.Interface) NewHasPrivilegesUserProfile

NewHasPrivilegesUserProfileFunc returns a new instance of HasPrivilegesUserProfile with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Request

type Request struct {
	Privileges types.PrivilegesCheck `json:"privileges"`
	// Uids A list of profile IDs. The privileges are checked for associated users of the
	// profiles.
	Uids []string `json:"uids"`
}

Request holds the request body struct for the package hasprivilegesuserprofile

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/security/has_privileges_user_profile/Request.ts#L24-L38

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

type Response added in v8.7.0

type Response struct {

	// Errors The subset of the requested profile IDs for which an error
	// was encountered. It does not include the missing profile IDs
	// or the profile IDs of the users that do not have all the
	// requested privileges. This field is absent if empty.
	Errors *types.HasPrivilegesUserProfileErrors `json:"errors,omitempty"`
	// HasPrivilegeUids The subset of the requested profile IDs of the users that
	// have all the requested privileges.
	HasPrivilegeUids []string `json:"has_privilege_uids"`
}

Response holds the response body struct for the package hasprivilegesuserprofile

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/security/has_privileges_user_profile/Response.ts#L23-L38

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL