lastsync

package
v8.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Updates last sync stats in the connector document

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 LastSync

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

func (LastSync) Do

func (r LastSync) Do(providedCtx context.Context) (*Response, error)

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

func (*LastSync) ErrorTrace

func (r *LastSync) ErrorTrace(errortrace bool) *LastSync

ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace

func (*LastSync) FilterPath

func (r *LastSync) FilterPath(filterpaths ...string) *LastSync

FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path

func (*LastSync) Header

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

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

func (*LastSync) HttpRequest

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

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

func (*LastSync) Human

func (r *LastSync) Human(human bool) *LastSync

Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human

func (*LastSync) LastAccessControlSyncError

func (r *LastSync) LastAccessControlSyncError(lastaccesscontrolsyncerror string) *LastSync

API name: last_access_control_sync_error

func (*LastSync) LastAccessControlSyncScheduledAt

func (r *LastSync) LastAccessControlSyncScheduledAt(datetime types.DateTime) *LastSync

API name: last_access_control_sync_scheduled_at

func (*LastSync) LastAccessControlSyncStatus

func (r *LastSync) LastAccessControlSyncStatus(lastaccesscontrolsyncstatus syncstatus.SyncStatus) *LastSync

API name: last_access_control_sync_status

func (*LastSync) LastDeletedDocumentCount

func (r *LastSync) LastDeletedDocumentCount(lastdeleteddocumentcount int64) *LastSync

API name: last_deleted_document_count

func (*LastSync) LastIncrementalSyncScheduledAt

func (r *LastSync) LastIncrementalSyncScheduledAt(datetime types.DateTime) *LastSync

API name: last_incremental_sync_scheduled_at

func (*LastSync) LastIndexedDocumentCount

func (r *LastSync) LastIndexedDocumentCount(lastindexeddocumentcount int64) *LastSync

API name: last_indexed_document_count

func (*LastSync) LastSeen

func (r *LastSync) LastSeen(datetime types.DateTime) *LastSync

API name: last_seen

func (*LastSync) LastSyncError

func (r *LastSync) LastSyncError(lastsyncerror string) *LastSync

API name: last_sync_error

func (*LastSync) LastSyncScheduledAt

func (r *LastSync) LastSyncScheduledAt(datetime types.DateTime) *LastSync

API name: last_sync_scheduled_at

func (*LastSync) LastSyncStatus

func (r *LastSync) LastSyncStatus(lastsyncstatus syncstatus.SyncStatus) *LastSync

API name: last_sync_status

func (*LastSync) LastSynced

func (r *LastSync) LastSynced(datetime types.DateTime) *LastSync

API name: last_synced

func (LastSync) Perform

func (r LastSync) Perform(providedCtx context.Context) (*http.Response, error)

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

func (*LastSync) Pretty

func (r *LastSync) Pretty(pretty bool) *LastSync

Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty

func (*LastSync) Raw

func (r *LastSync) Raw(raw io.Reader) *LastSync

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*LastSync) Request

func (r *LastSync) Request(req *Request) *LastSync

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

func (*LastSync) SyncCursor

func (r *LastSync) SyncCursor(synccursor any) *LastSync

API name: sync_cursor

synccursor should be a json.RawMessage or a structure if a structure is provided, the client will defer a json serialization prior to sending the payload to Elasticsearch.

type NewLastSync

type NewLastSync func(connectorid string) *LastSync

NewLastSync type alias for index.

func NewLastSyncFunc

func NewLastSyncFunc(tp elastictransport.Interface) NewLastSync

NewLastSyncFunc returns a new instance of LastSync 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 {
	LastAccessControlSyncError       *string                `json:"last_access_control_sync_error,omitempty"`
	LastAccessControlSyncScheduledAt types.DateTime         `json:"last_access_control_sync_scheduled_at,omitempty"`
	LastAccessControlSyncStatus      *syncstatus.SyncStatus `json:"last_access_control_sync_status,omitempty"`
	LastDeletedDocumentCount         *int64                 `json:"last_deleted_document_count,omitempty"`
	LastIncrementalSyncScheduledAt   types.DateTime         `json:"last_incremental_sync_scheduled_at,omitempty"`
	LastIndexedDocumentCount         *int64                 `json:"last_indexed_document_count,omitempty"`
	LastSeen                         types.DateTime         `json:"last_seen,omitempty"`
	LastSyncError                    *string                `json:"last_sync_error,omitempty"`
	LastSyncScheduledAt              types.DateTime         `json:"last_sync_scheduled_at,omitempty"`
	LastSyncStatus                   *syncstatus.SyncStatus `json:"last_sync_status,omitempty"`
	LastSynced                       types.DateTime         `json:"last_synced,omitempty"`
	SyncCursor                       json.RawMessage        `json:"sync_cursor,omitempty"`
}

Request holds the request body struct for the package lastsync

https://github.com/elastic/elasticsearch-specification/blob/19027dbdd366978ccae41842a040a636730e7c10/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L57

func NewRequest

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

func (*Request) UnmarshalJSON

func (s *Request) UnmarshalJSON(data []byte) error

type Response

type Response struct {
	Result result.Result `json:"result"`
}

Response holds the response body struct for the package lastsync

https://github.com/elastic/elasticsearch-specification/blob/19027dbdd366978ccae41842a040a636730e7c10/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts#L22-L26

func NewResponse

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