Documentation ¶
Overview ¶
Creates a service account token for access without requiring basic authentication.
Index ¶
- Variables
- type CreateServiceToken
- func (r CreateServiceToken) Do(ctx context.Context) (*http.Response, error)
- func (r *CreateServiceToken) Header(key, value string) *CreateServiceToken
- func (r *CreateServiceToken) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r CreateServiceToken) IsSuccess(ctx context.Context) (bool, error)
- func (r *CreateServiceToken) Name(v string) *CreateServiceToken
- func (r *CreateServiceToken) Namespace(v string) *CreateServiceToken
- func (r *CreateServiceToken) Refresh(enum refresh.Refresh) *CreateServiceToken
- func (r *CreateServiceToken) Service(v string) *CreateServiceToken
- type NewCreateServiceToken
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 CreateServiceToken ¶
type CreateServiceToken struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *CreateServiceToken
Creates a service account token for access without requiring basic authentication.
func (*CreateServiceToken) Header ¶
func (r *CreateServiceToken) Header(key, value string) *CreateServiceToken
Header set a key, value pair in the CreateServiceToken headers map.
func (*CreateServiceToken) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (CreateServiceToken) IsSuccess ¶
func (r CreateServiceToken) IsSuccess(ctx context.Context) (bool, error)
IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.
func (*CreateServiceToken) Name ¶
func (r *CreateServiceToken) Name(v string) *CreateServiceToken
Name An identifier for the token name API Name: name
func (*CreateServiceToken) Namespace ¶
func (r *CreateServiceToken) Namespace(v string) *CreateServiceToken
Namespace An identifier for the namespace API Name: namespace
func (*CreateServiceToken) Refresh ¶
func (r *CreateServiceToken) Refresh(enum refresh.Refresh) *CreateServiceToken
Refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. API name: refresh
func (*CreateServiceToken) Service ¶
func (r *CreateServiceToken) Service(v string) *CreateServiceToken
Service An identifier for the service name API Name: service
type NewCreateServiceToken ¶
type NewCreateServiceToken func(namespace, service string) *CreateServiceToken
NewCreateServiceToken type alias for index.
func NewCreateServiceTokenFunc ¶
func NewCreateServiceTokenFunc(tp elastictransport.Interface) NewCreateServiceToken
NewCreateServiceTokenFunc returns a new instance of CreateServiceToken with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.