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) (*http.Response, error)
- func (r *HasPrivilegesUserProfile) Header(key, value string) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *HasPrivilegesUserProfile) Raw(raw json.RawMessage) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) Request(req *Request) *HasPrivilegesUserProfile
- type NewHasPrivilegesUserProfile
- type Request
- type RequestBuilder
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) 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) Raw ¶
func (r *HasPrivilegesUserProfile) Raw(raw json.RawMessage) *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 []types.UserProfileId `json:"uids"` }
Request holds the request body struct for the package hasprivilegesuserprofile
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the hasprivilegesuserprofile.Request
func NewRequestBuilder ¶
func NewRequestBuilder() *RequestBuilder
NewRequest returns a RequestBuilder which can be chained and built to retrieve a RequestBuilder
func (*RequestBuilder) Build ¶
func (rb *RequestBuilder) Build() *Request
Build finalize the chain and returns the Request struct.
func (*RequestBuilder) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) Privileges ¶
func (rb *RequestBuilder) Privileges(privileges *types.PrivilegesCheckBuilder) *RequestBuilder
func (*RequestBuilder) Uids ¶
func (rb *RequestBuilder) Uids(uids ...types.UserProfileId) *RequestBuilder