Documentation ¶
Overview ¶
Creates a service account token for access without requiring basic authentication.
Index ¶
- Variables
- type CreateServiceToken
- func (r CreateServiceToken) Do(providedCtx context.Context) (*Response, error)
- func (r *CreateServiceToken) Header(key, value string) *CreateServiceToken
- func (r *CreateServiceToken) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r CreateServiceToken) IsSuccess(providedCtx context.Context) (bool, error)
- func (r *CreateServiceToken) Name(name string) *CreateServiceToken
- func (r CreateServiceToken) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *CreateServiceToken) Refresh(refresh refresh.Refresh) *CreateServiceToken
- type NewCreateServiceToken
- 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 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) Do ¶
func (r CreateServiceToken) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a createservicetoken.Response
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(providedCtx 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(name string) *CreateServiceToken
Name An identifier for the token name API Name: name
func (CreateServiceToken) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*CreateServiceToken) Refresh ¶
func (r *CreateServiceToken) Refresh(refresh 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
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.
type Response ¶
type Response struct { Created bool `json:"created"` Token types.ServiceToken `json:"token"` }
Response holds the response body struct for the package createservicetoken