Documentation ¶
Overview ¶
Adds and updates users in the native realm. These users are commonly referred to as native users.
Index ¶
- Variables
- type NewPutUser
- type PutUser
- func (r PutUser) Do(ctx context.Context) (*http.Response, error)
- func (r *PutUser) Header(key, value string) *PutUser
- func (r *PutUser) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutUser) Raw(raw json.RawMessage) *PutUser
- func (r *PutUser) Refresh(enum refresh.Refresh) *PutUser
- func (r *PutUser) Request(req *Request) *PutUser
- func (r *PutUser) Username(v string) *PutUser
- type Request
- type RequestBuilder
- func (rb *RequestBuilder) Build() *Request
- func (rb *RequestBuilder) Email(email string) *RequestBuilder
- func (rb *RequestBuilder) Enabled(enabled bool) *RequestBuilder
- func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
- func (rb *RequestBuilder) FullName(fullname string) *RequestBuilder
- func (rb *RequestBuilder) Metadata(metadata *types.MetadataBuilder) *RequestBuilder
- func (rb *RequestBuilder) Password(password types.Password) *RequestBuilder
- func (rb *RequestBuilder) PasswordHash(passwordhash string) *RequestBuilder
- func (rb *RequestBuilder) Roles(roles ...string) *RequestBuilder
- func (rb *RequestBuilder) Username(username types.Username) *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 NewPutUser ¶
NewPutUser type alias for index.
func NewPutUserFunc ¶
func NewPutUserFunc(tp elastictransport.Interface) NewPutUser
NewPutUserFunc returns a new instance of PutUser with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type PutUser ¶
type PutUser struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *PutUser
Adds and updates users in the native realm. These users are commonly referred to as native users.
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html
func (*PutUser) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*PutUser) Raw ¶
func (r *PutUser) Raw(raw json.RawMessage) *PutUser
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*PutUser) Refresh ¶
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
type Request ¶
type Request struct { Email string `json:"email,omitempty"` Enabled *bool `json:"enabled,omitempty"` FullName string `json:"full_name,omitempty"` Metadata *types.Metadata `json:"metadata,omitempty"` Password *types.Password `json:"password,omitempty"` PasswordHash *string `json:"password_hash,omitempty"` Roles []string `json:"roles,omitempty"` Username *types.Username `json:"username,omitempty"` }
Request holds the request body struct for the package putuser
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the putuser.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) Email ¶
func (rb *RequestBuilder) Email(email string) *RequestBuilder
func (*RequestBuilder) Enabled ¶
func (rb *RequestBuilder) Enabled(enabled bool) *RequestBuilder
func (*RequestBuilder) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) FullName ¶
func (rb *RequestBuilder) FullName(fullname string) *RequestBuilder
func (*RequestBuilder) Metadata ¶
func (rb *RequestBuilder) Metadata(metadata *types.MetadataBuilder) *RequestBuilder
func (*RequestBuilder) Password ¶
func (rb *RequestBuilder) Password(password types.Password) *RequestBuilder
func (*RequestBuilder) PasswordHash ¶
func (rb *RequestBuilder) PasswordHash(passwordhash string) *RequestBuilder
func (*RequestBuilder) Roles ¶
func (rb *RequestBuilder) Roles(roles ...string) *RequestBuilder
func (*RequestBuilder) Username ¶
func (rb *RequestBuilder) Username(username types.Username) *RequestBuilder