invalidateapikey

package
v8.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Overview

Invalidates one or more API keys.

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 InvalidateApiKey

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

func (InvalidateApiKey) Do

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

func (*InvalidateApiKey) Header

func (r *InvalidateApiKey) Header(key, value string) *InvalidateApiKey

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

func (*InvalidateApiKey) HttpRequest

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

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

func (*InvalidateApiKey) Id added in v8.9.0

API name: id

func (*InvalidateApiKey) Ids added in v8.9.0

func (r *InvalidateApiKey) Ids(ids ...string) *InvalidateApiKey

API name: ids

func (*InvalidateApiKey) Name added in v8.9.0

func (r *InvalidateApiKey) Name(name string) *InvalidateApiKey

API name: name

func (*InvalidateApiKey) Owner added in v8.9.0

func (r *InvalidateApiKey) Owner(owner bool) *InvalidateApiKey

API name: owner

func (InvalidateApiKey) Perform added in v8.7.0

func (r InvalidateApiKey) Perform(ctx context.Context) (*http.Response, error)

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

func (*InvalidateApiKey) 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 (*InvalidateApiKey) RealmName added in v8.9.0

func (r *InvalidateApiKey) RealmName(realmname string) *InvalidateApiKey

API name: realm_name

func (*InvalidateApiKey) Request

func (r *InvalidateApiKey) Request(req *Request) *InvalidateApiKey

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

func (*InvalidateApiKey) Username added in v8.9.0

func (r *InvalidateApiKey) Username(username string) *InvalidateApiKey

API name: username

type NewInvalidateApiKey

type NewInvalidateApiKey func() *InvalidateApiKey

NewInvalidateApiKey type alias for index.

func NewInvalidateApiKeyFunc

func NewInvalidateApiKeyFunc(tp elastictransport.Interface) NewInvalidateApiKey

NewInvalidateApiKeyFunc returns a new instance of InvalidateApiKey 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 {
	Id        *string  `json:"id,omitempty"`
	Ids       []string `json:"ids,omitempty"`
	Name      *string  `json:"name,omitempty"`
	Owner     *bool    `json:"owner,omitempty"`
	RealmName *string  `json:"realm_name,omitempty"`
	Username  *string  `json:"username,omitempty"`
}

Request holds the request body struct for the package invalidateapikey

https://github.com/elastic/elasticsearch-specification/blob/656080dee792f93a849cd7fbf566f528f858a5ea/specification/security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L37

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 {
	ErrorCount                   int                `json:"error_count"`
	ErrorDetails                 []types.ErrorCause `json:"error_details,omitempty"`
	InvalidatedApiKeys           []string           `json:"invalidated_api_keys"`
	PreviouslyInvalidatedApiKeys []string           `json:"previously_invalidated_api_keys"`
}

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