Documentation ¶
Overview ¶
Returns information about a snapshot.
Index ¶
- Variables
- type Get
- func (r *Get) After(v string) *Get
- func (r Get) Do(ctx context.Context) (*Response, error)
- func (r *Get) FromSortValue(v string) *Get
- func (r *Get) Header(key, value string) *Get
- func (r *Get) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Get) IgnoreUnavailable(b bool) *Get
- func (r *Get) IncludeRepository(b bool) *Get
- func (r *Get) IndexDetails(b bool) *Get
- func (r *Get) IndexNames(b bool) *Get
- func (r Get) IsSuccess(ctx context.Context) (bool, error)
- func (r *Get) MasterTimeout(v string) *Get
- func (r *Get) Offset(i int) *Get
- func (r *Get) Order(enum sortorder.SortOrder) *Get
- func (r Get) Perform(ctx context.Context) (*http.Response, error)
- func (r *Get) Repository(v string) *Get
- func (r *Get) Size(i int) *Get
- func (r *Get) SlmPolicyFilter(v string) *Get
- func (r *Get) Snapshot(v string) *Get
- func (r *Get) Sort(enum snapshotsort.SnapshotSort) *Get
- func (r *Get) Verbose(b bool) *Get
- type NewGet
- 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 Get ¶
type Get struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Get
Returns information about a snapshot.
https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
func (*Get) After ¶
After Offset identifier to start pagination from as returned by the next field in the response body. API name: after
func (Get) Do ¶
Do runs the request through the transport, handle the response and returns a get.Response
func (*Get) FromSortValue ¶
FromSortValue Value of the current sort column at which to start retrieval. Can either be a string snapshot- or repository name when sorting by snapshot or repository name, a millisecond time value or a number when sorting by index- or shard count. API name: from_sort_value
func (*Get) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Get) IgnoreUnavailable ¶
IgnoreUnavailable If false, the request returns an error for any snapshots that are unavailable. API name: ignore_unavailable
func (*Get) IncludeRepository ¶
IncludeRepository If true, returns the repository name in each snapshot. API name: include_repository
func (*Get) IndexDetails ¶
IndexDetails If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. Defaults to false, meaning that this information is omitted. API name: index_details
func (*Get) IndexNames ¶
IndexNames If true, returns the name of each index in each snapshot. API name: index_names
func (Get) IsSuccess ¶
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 (*Get) MasterTimeout ¶
MasterTimeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout
func (*Get) Offset ¶
Offset Numeric offset to start pagination from based on the snapshots matching this request. Using a non-zero value for this parameter is mutually exclusive with using the after parameter. Defaults to 0. API name: offset
func (*Get) Order ¶
Order Sort order. Valid values are asc for ascending and desc for descending order. Defaults to asc, meaning ascending order. API name: order
func (Get) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*Get) Repository ¶
Repository Comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported. API Name: repository
func (*Get) Size ¶
Size Maximum number of snapshots to return. Defaults to 0 which means return all that match the request without limit. API name: size
func (*Get) SlmPolicyFilter ¶
SlmPolicyFilter Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Also accepts wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. To include snapshots not created by an SLM policy you can use the special pattern _none that will match all snapshots without an SLM policy. API name: slm_policy_filter
func (*Get) Snapshot ¶
Snapshot Comma-separated list of snapshot names to retrieve. Also accepts wildcards (*). - To get information about all snapshots in a registered repository, use a wildcard (*) or _all. - To get information about any snapshots that are currently running, use _current. API Name: snapshot
func (*Get) Sort ¶
func (r *Get) Sort(enum snapshotsort.SnapshotSort) *Get
Sort Allows setting a sort order for the result. Defaults to start_time, i.e. sorting by snapshot start time stamp. API name: sort
type NewGet ¶
NewGet type alias for index.
func NewGetFunc ¶
func NewGetFunc(tp elastictransport.Interface) NewGet
NewGetFunc returns a new instance of Get 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 { // Remaining The number of remaining snapshots that were not returned due to size limits // and that can be fetched by additional requests using the next field value. Remaining int `json:"remaining"` Responses []types.SnapshotResponseItem `json:"responses,omitempty"` Snapshots []types.SnapshotInfo `json:"snapshots,omitempty"` // Total The total number of snapshots that match the request when ignoring size limit // or after query parameter. Total int `json:"total"` }