Documentation ¶
Overview ¶
Determines whether the users associated with the specified profile IDs have all the requested privileges.
Index ¶
- Variables
- type HasPrivilegesUserProfile
- func (r HasPrivilegesUserProfile) Do(ctx context.Context) (*Response, error)
- func (r *HasPrivilegesUserProfile) Header(key, value string) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r HasPrivilegesUserProfile) Perform(ctx context.Context) (*http.Response, error)
- func (r *HasPrivilegesUserProfile) Raw(raw io.Reader) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) Request(req *Request) *HasPrivilegesUserProfile
- type NewHasPrivilegesUserProfile
- 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 HasPrivilegesUserProfile ¶
type HasPrivilegesUserProfile struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *HasPrivilegesUserProfile
Determines whether the users associated with the specified profile IDs have all the requested privileges.
func (HasPrivilegesUserProfile) Do ¶
func (r HasPrivilegesUserProfile) Do(ctx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a hasprivilegesuserprofile.Response
func (*HasPrivilegesUserProfile) Header ¶
func (r *HasPrivilegesUserProfile) Header(key, value string) *HasPrivilegesUserProfile
Header set a key, value pair in the HasPrivilegesUserProfile headers map.
func (*HasPrivilegesUserProfile) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (HasPrivilegesUserProfile) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*HasPrivilegesUserProfile) Raw ¶
func (r *HasPrivilegesUserProfile) Raw(raw io.Reader) *HasPrivilegesUserProfile
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 ¶
func (r *HasPrivilegesUserProfile) Request(req *Request) *HasPrivilegesUserProfile
Request allows to set the request property with the appropriate payload.
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
type Response ¶
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"` }