Documentation ΒΆ
Index ΒΆ
- type APIDocuments
- type APIHealth
- type APIIndexes
- type APIKeys
- type APISearch
- type APISettings
- type APIStats
- type APIUpdates
- type APIVersion
- type APIWithIndexID
- type AsyncUpdateID
- type ClientInterface
- type Config
- type CreateIndexRequest
- type CreateIndexResponse
- type ErrCode
- type Error
- type FastHttpClient
- func (c FastHttpClient) DefaultWaitForPendingUpdate(indexUID string, updateID *AsyncUpdateID) (UpdateStatus, error)
- func (c *FastHttpClient) Documents(indexID string) APIDocuments
- func (c *FastHttpClient) Health() APIHealth
- func (c *FastHttpClient) Indexes() APIIndexes
- func (c *FastHttpClient) Keys() APIKeys
- func (c *FastHttpClient) Search(indexID string) APISearch
- func (c *FastHttpClient) Settings(indexID string) APISettings
- func (c *FastHttpClient) Stats() APIStats
- func (c *FastHttpClient) Updates(indexID string) APIUpdates
- func (c *FastHttpClient) Version() APIVersion
- func (c FastHttpClient) WaitForPendingUpdate(ctx context.Context, interval time.Duration, indexID string, ...) (UpdateStatus, error)
- type Health
- type Index
- type Indexes
- type Keys
- type ListDocumentsRequest
- type Name
- type PrimaryKey
- type Query
- type RawType
- type Response
- type SearchRequest
- type SearchResponse
- type Settings
- type Stats
- type StatsIndex
- type Str
- type StrsArr
- type Synonyms
- type Unknown
- type Update
- type UpdateStatus
- type Updates
- type Version
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type APIDocuments ΒΆ
type APIDocuments interface { // Get one document using its unique identifier. // documentPtr should be a pointer. Get(identifier string, documentPtr json.Unmarshaler) error // Delete one document based on its unique identifier. Delete(identifier string) (*AsyncUpdateID, error) // Delete a selection of documents based on array of identifiers. Deletes(identifier StrsArr) (*AsyncUpdateID, error) // List the documents in an unordered way. List(request ListDocumentsRequest, documentsPtr json.Unmarshaler) error // AddOrReplace a list of documents, replace them if they already exist based on their unique identifiers. AddOrReplace(documentsPtr json.Marshaler) (*AsyncUpdateID, error) // AddOrReplaceWithPrimaryKey do the same as AddOrReplace but will specify during the update to primaryKey to use for indexing AddOrReplaceWithPrimaryKey(documentsPtr json.Marshaler, primaryKey string) (resp *AsyncUpdateID, err error) // AddOrUpdate a list of documents, update them if they already exist based on their unique identifiers. AddOrUpdate(documentsPtr json.Marshaler) (*AsyncUpdateID, error) // AddOrUpdateWithPrimaryKey do the same as AddOrUpdate but will specify during the update to primaryKey to use for indexing AddOrUpdateWithPrimaryKey(documentsPtr json.Marshaler, primaryKey string) (resp *AsyncUpdateID, err error) // DeleteAllDocuments in the specified index. DeleteAllDocuments() (*AsyncUpdateID, error) APIWithIndexID }
APIDocuments are objects composed of fields containing any data.
Documentation: https://docs.meilisearch.com/references/documents.html
type APIHealth ΒΆ
type APIHealth interface { // Get health of MeiliSearch server. Get() error // Update health of MeiliSearch server. Update(health bool) error }
APIHealth handle health of a MeiliSearch server.
Documentation: https://docs.meilisearch.com/references/health.html
type APIIndexes ΒΆ
type APIIndexes interface { // Get the index relative information. Get(uid string) (*Index, error) // List all indexes. List() (Indexes, error) // Create an index. // If no UID is specified in the request a randomly generated UID will be returned. // It's associated to the new index. This UID will be essential to make all request over the created index. // You can define your primary key during the index creation Create(request CreateIndexRequest) (*CreateIndexResponse, error) // Update an index name. UpdateName(uid string, name string) (*Index, error) // Update an index primary key. UpdatePrimaryKey(uid string, primaryKey string) (*Index, error) // Delete an index. Delete(uid string) (bool, error) }
APIIndexes index is an entity, like a table in SQL, with a specific schema definition. It gathers a collection of documents with the structure defined by the schema. An index is defined by an unique identifier uid that is generated by MeiliSearch (if none is given) on index creation. It also has a name to help you track your different indexes.
Documentation: https://docs.meilisearch.com/references/indexes.html
type APIKeys ΒΆ
APIKeys To communicate with MeiliSearch's RESTfull API most of the routes require an API key.
Documentation: https://docs.meilisearch.com/references/keys.html
type APISearch ΒΆ
type APISearch interface { // Search for documents matching a specific query in the given index. Search(params SearchRequest) (*SearchResponse, error) APIWithIndexID }
APISearch search through documents list in an index.
Documentation: https://docs.meilisearch.com/references/search.html
type APISettings ΒΆ
type APISettings interface { GetAll() (*Settings, error) UpdateAll(request Settings) (*AsyncUpdateID, error) ResetAll() (*AsyncUpdateID, error) GetRankingRules() (*StrsArr, error) UpdateRankingRules(arr StrsArr) (*AsyncUpdateID, error) ResetRankingRules() (*AsyncUpdateID, error) GetDistinctAttribute() (*Str, error) UpdateDistinctAttribute(Str) (*AsyncUpdateID, error) ResetDistinctAttribute() (*AsyncUpdateID, error) GetSearchableAttributes() (*StrsArr, error) UpdateSearchableAttributes(StrsArr) (*AsyncUpdateID, error) ResetSearchableAttributes() (*AsyncUpdateID, error) GetDisplayedAttributes() (*StrsArr, error) UpdateDisplayedAttributes(StrsArr) (*AsyncUpdateID, error) ResetDisplayedAttributes() (*AsyncUpdateID, error) GetStopWords() (*StrsArr, error) UpdateStopWords(StrsArr) (*AsyncUpdateID, error) ResetStopWords() (*AsyncUpdateID, error) GetSynonyms() (*Synonyms, error) UpdateSynonyms(synonyms Synonyms) (*AsyncUpdateID, error) ResetSynonyms() (*AsyncUpdateID, error) GetAttributesForFaceting() (*StrsArr, error) UpdateAttributesForFaceting(StrsArr) (*AsyncUpdateID, error) ResetAttributesForFaceting() (*AsyncUpdateID, error) }
APISettings allow to configure the MeiliSearch indexing & search behaviour.
Documentation: https://docs.meilisearch.com/references/settings.html
type APIStats ΒΆ
type APIStats interface { // Get stats of an index. Get(indexUID string) (*StatsIndex, error) GetAll() (*Stats, error) }
APIStats retrieve statistic over all indexes or a specific index id.
Documentation: https://docs.meilisearch.com/references/stats.html
type APIUpdates ΒΆ
type APIUpdates interface { // Get the status of an update in a given index. Get(id int64) (*Update, error) // Get the status of all updates in a given index. List() (Updates, error) APIWithIndexID }
APIUpdates MeiliSearch is an asynchronous API. It means that the API does not behave as you would typically expect when handling the request's responses.
Some actions are put in a queue and will be executed in turn (asynchronously). In this case, the server response contains the identifier to track the execution of the action.
This API permit to get the state of an update id.
Documentation: https://docs.meilisearch.com/references/updates.html
type APIVersion ΒΆ
APIVersion retrieve the version of MeiliSearch.
Documentation: https://docs.meilisearch.com/references/version.html
type APIWithIndexID ΒΆ
type APIWithIndexID interface { IndexID() string Client() ClientInterface }
APIWithIndexID is used to await an async update id response. Each apis that use an index internally implement this interface except APIUpdates.
type AsyncUpdateID ΒΆ
type AsyncUpdateID struct {
UpdateID int64 `json:"updateID"`
}
AsyncUpdateID is returned for asynchronous method
Documentation: https://docs.meilisearch.com/guides/advanced_guides/asynchronous_updates.html
func (AsyncUpdateID) MarshalEasyJSON ΒΆ
func (v AsyncUpdateID) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (AsyncUpdateID) MarshalJSON ΒΆ
func (v AsyncUpdateID) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*AsyncUpdateID) UnmarshalEasyJSON ΒΆ
func (v *AsyncUpdateID) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*AsyncUpdateID) UnmarshalJSON ΒΆ
func (v *AsyncUpdateID) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ClientInterface ΒΆ
type ClientInterface interface { Indexes() APIIndexes Version() APIVersion Documents(indexID string) APIDocuments Search(indexID string) APISearch Updates(indexID string) APIUpdates Settings(indexID string) APISettings Keys() APIKeys Stats() APIStats Health() APIHealth }
func NewFastHttpCustomClient ΒΆ
func NewFastHttpCustomClient(config Config, client *fasthttp.Client) ClientInterface
type Config ΒΆ
type Config struct { // Host is the host of your meilisearch database // Example: 'http://localhost:7700' Host string // APIKey is optional APIKey string }
Config configure the Client
type CreateIndexRequest ΒΆ
type CreateIndexRequest struct { Name string `json:"name,omitempty"` UID string `json:"uid,omitempty"` PrimaryKey string `json:"primaryKey,omitempty"` }
CreateIndexRequest is the request body for create index method
func (CreateIndexRequest) MarshalEasyJSON ΒΆ
func (v CreateIndexRequest) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CreateIndexRequest) MarshalJSON ΒΆ
func (v CreateIndexRequest) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CreateIndexRequest) UnmarshalEasyJSON ΒΆ
func (v *CreateIndexRequest) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CreateIndexRequest) UnmarshalJSON ΒΆ
func (v *CreateIndexRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type CreateIndexResponse ΒΆ
type CreateIndexResponse struct { Name string `json:"name"` UID string `json:"uid"` UpdateID int64 `json:"updateID,omitempty"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` PrimaryKey string `json:"primaryKey,omitempty"` }
CreateIndexResponse is the response body for create index method
func (CreateIndexResponse) MarshalEasyJSON ΒΆ
func (v CreateIndexResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CreateIndexResponse) MarshalJSON ΒΆ
func (v CreateIndexResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CreateIndexResponse) UnmarshalEasyJSON ΒΆ
func (v *CreateIndexResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CreateIndexResponse) UnmarshalJSON ΒΆ
func (v *CreateIndexResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ErrCode ΒΆ
type ErrCode int
ErrCode are all possible errors found during requests
const ( // ErrCodeUnknown default error code, undefined ErrCodeUnknown ErrCode = 0 // ErrCodeMarshalRequest impossible to serialize request body ErrCodeMarshalRequest ErrCode = iota + 1 // ErrCodeRequestCreation impossible create a request ErrCodeRequestCreation // ErrCodeRequestExecution impossible execute a request ErrCodeRequestExecution // ErrCodeResponseStatusCode the response status code is not conform ErrCodeResponseStatusCode // ErrCodeResponseReadBody impossible to read the response body ErrCodeResponseReadBody // ErrCodeResponseUnmarshalBody impossible deserialize the response body ErrCodeResponseUnmarshalBody // ErrCodeURLParsing impossible to parse url parameters ErrCodeURLParsing )
type Error ΒΆ
type Error struct { // Endpoint is the path of the request (host is not in) Endpoint string // Method is the HTTP verb of the request Method string // Function name used Function string // APIName is which part/module of the api APIName string // RequestToString is the raw request into string ('empty request' if not present) RequestToString string // RequestToString is the raw request into string ('empty response' if not present) ResponseToString string // MeilisearchMessage is the raw request into string ('empty meilisearch message' if not present) MeilisearchMessage string // StatusCode of the request StatusCode int // StatusCode expected by the endpoint to be considered as a success StatusCodeExpected []int // OriginError is the origin error that produce the current Error. It can be nil in case of a bad status code. OriginError error // ErrCode is the internal error code that represent the different step when executing a request that can produce // an error. ErrCode ErrCode // contains filtered or unexported fields }
Error is the internal error structure that all exposed method use. So ALL errors returned by this library can be cast to this struct (as a pointer)
func (*Error) WithErrCode ΒΆ
WithErrCode add an error code to an error
type FastHttpClient ΒΆ
type FastHttpClient struct {
// contains filtered or unexported fields
}
Client is a structure that give you the power for interacting with an high-level api with meilisearch.
func (FastHttpClient) DefaultWaitForPendingUpdate ΒΆ
func (c FastHttpClient) DefaultWaitForPendingUpdate(indexUID string, updateID *AsyncUpdateID) (UpdateStatus, error)
func (*FastHttpClient) Documents ΒΆ
func (c *FastHttpClient) Documents(indexID string) APIDocuments
func (*FastHttpClient) Health ΒΆ
func (c *FastHttpClient) Health() APIHealth
func (*FastHttpClient) Indexes ΒΆ
func (c *FastHttpClient) Indexes() APIIndexes
func (*FastHttpClient) Keys ΒΆ
func (c *FastHttpClient) Keys() APIKeys
func (*FastHttpClient) Search ΒΆ
func (c *FastHttpClient) Search(indexID string) APISearch
func (*FastHttpClient) Settings ΒΆ
func (c *FastHttpClient) Settings(indexID string) APISettings
func (*FastHttpClient) Stats ΒΆ
func (c *FastHttpClient) Stats() APIStats
func (*FastHttpClient) Updates ΒΆ
func (c *FastHttpClient) Updates(indexID string) APIUpdates
func (*FastHttpClient) Version ΒΆ
func (c *FastHttpClient) Version() APIVersion
func (FastHttpClient) WaitForPendingUpdate ΒΆ
func (c FastHttpClient) WaitForPendingUpdate( ctx context.Context, interval time.Duration, indexID string, updateID *AsyncUpdateID) (UpdateStatus, error)
WaitForPendingUpdate waits for the end of an update. The function will check by regular interval provided in parameter interval the UpdateStatus. If it is not UpdateStatusEnqueued or the ctx cancelled we return the UpdateStatus.
type Health ΒΆ
type Health struct {
Health bool
}
func (Health) MarshalEasyJSON ΒΆ
MarshalEasyJSON supports easyjson.Marshaler interface
func (Health) MarshalJSON ΒΆ
MarshalJSON supports json.Marshaler interface
func (*Health) UnmarshalEasyJSON ΒΆ
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Health) UnmarshalJSON ΒΆ
UnmarshalJSON supports json.Unmarshaler interface
type Index ΒΆ
type Index struct { Name string `json:"name"` UID string `json:"uid"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` PrimaryKey string `json:"primaryKey,omitempty"` }
Index is the type that represent an index in MeiliSearch
func (Index) MarshalEasyJSON ΒΆ
MarshalEasyJSON supports easyjson.Marshaler interface
func (Index) MarshalJSON ΒΆ
MarshalJSON supports json.Marshaler interface
func (*Index) UnmarshalEasyJSON ΒΆ
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Index) UnmarshalJSON ΒΆ
UnmarshalJSON supports json.Unmarshaler interface
type Keys ΒΆ
type Keys struct { Public string `json:"public,omitempty"` Private string `json:"private,omitempty"` }
Keys allow the user to connect to the MeiliSearch instance
Documentation: https://docs.meilisearch.com/guides/advanced_guides/asynchronous_updates.html
func (Keys) MarshalEasyJSON ΒΆ
MarshalEasyJSON supports easyjson.Marshaler interface
func (Keys) MarshalJSON ΒΆ
MarshalJSON supports json.Marshaler interface
func (*Keys) UnmarshalEasyJSON ΒΆ
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Keys) UnmarshalJSON ΒΆ
UnmarshalJSON supports json.Unmarshaler interface
type ListDocumentsRequest ΒΆ
type ListDocumentsRequest struct { Offset int64 `json:"offset,omitempty"` Limit int64 `json:"limit,omitempty"` AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` }
ListDocumentsRequest is the request body for list documents method
func (ListDocumentsRequest) MarshalEasyJSON ΒΆ
func (v ListDocumentsRequest) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ListDocumentsRequest) MarshalJSON ΒΆ
func (v ListDocumentsRequest) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ListDocumentsRequest) UnmarshalEasyJSON ΒΆ
func (v *ListDocumentsRequest) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ListDocumentsRequest) UnmarshalJSON ΒΆ
func (v *ListDocumentsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Name ΒΆ
type Name struct {
Name string
}
func (Name) MarshalEasyJSON ΒΆ
MarshalEasyJSON supports easyjson.Marshaler interface
func (Name) MarshalJSON ΒΆ
MarshalJSON supports json.Marshaler interface
func (*Name) UnmarshalEasyJSON ΒΆ
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Name) UnmarshalJSON ΒΆ
UnmarshalJSON supports json.Unmarshaler interface
type PrimaryKey ΒΆ
type PrimaryKey struct {
PrimaryKey string
}
func (PrimaryKey) MarshalEasyJSON ΒΆ
func (v PrimaryKey) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PrimaryKey) MarshalJSON ΒΆ
func (v PrimaryKey) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PrimaryKey) UnmarshalEasyJSON ΒΆ
func (v *PrimaryKey) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PrimaryKey) UnmarshalJSON ΒΆ
func (v *PrimaryKey) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Query ΒΆ
type Query struct { Query string `json:"q"` Offset int64 Limit int64 AttributesToRetrieve []string AttributesToCrop []string CropLength int64 AttributesToHighlight []string Filters string Matches bool FacetsDistribution []string FacetFilters interface{} PlaceholderSearch bool }
func (Query) MarshalEasyJSON ΒΆ
MarshalEasyJSON supports easyjson.Marshaler interface
func (Query) MarshalJSON ΒΆ
MarshalJSON supports json.Marshaler interface
func (*Query) UnmarshalEasyJSON ΒΆ
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Query) UnmarshalJSON ΒΆ
UnmarshalJSON supports json.Unmarshaler interface
type SearchRequest ΒΆ
type SearchRequest struct { Query string Offset int64 Limit int64 AttributesToRetrieve []string AttributesToCrop []string CropLength int64 AttributesToHighlight []string Filters string Matches bool FacetsDistribution []string FacetFilters interface{} PlaceholderSearch bool }
SearchRequest is the request url param needed for a search query. This struct will be converted to url param before sent.
Documentation: https://docs.meilisearch.com/guides/advanced_guides/search_parameters.html
func (SearchRequest) MarshalEasyJSON ΒΆ
func (v SearchRequest) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SearchRequest) MarshalJSON ΒΆ
func (v SearchRequest) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SearchRequest) UnmarshalEasyJSON ΒΆ
func (v *SearchRequest) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SearchRequest) UnmarshalJSON ΒΆ
func (v *SearchRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SearchResponse ΒΆ
type SearchResponse struct { Hits []interface{} `json:"hits"` NbHits int64 `json:"nbHits"` Offset int64 `json:"offset"` Limit int64 `json:"limit"` ProcessingTimeMs int64 `json:"processingTimeMs"` Query string `json:"query"` FacetsDistribution interface{} `json:"facetsDistribution,omitempty"` ExhaustiveFacetsCount interface{} `json:"exhaustiveFacetsCount,omitempty"` }
SearchResponse is the response body for search method
func (SearchResponse) MarshalEasyJSON ΒΆ
func (v SearchResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SearchResponse) MarshalJSON ΒΆ
func (v SearchResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SearchResponse) UnmarshalEasyJSON ΒΆ
func (v *SearchResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SearchResponse) UnmarshalJSON ΒΆ
func (v *SearchResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Settings ΒΆ
type Settings struct { RankingRules []string `json:"rankingRules,omitempty"` DistinctAttribute *string `json:"distinctAttribute,omitempty"` SearchableAttributes []string `json:"searchableAttributes,omitempty"` DisplayedAttributes []string `json:"displayedAttributes,omitempty"` StopWords []string `json:"stopWords,omitempty"` Synonyms map[string][]string `json:"synonyms,omitempty"` AttributesForFaceting []string `json:"attributesForFaceting,omitempty"` }
Settings is the type that represents the settings in MeiliSearch
func (Settings) MarshalEasyJSON ΒΆ
MarshalEasyJSON supports easyjson.Marshaler interface
func (Settings) MarshalJSON ΒΆ
MarshalJSON supports json.Marshaler interface
func (*Settings) UnmarshalEasyJSON ΒΆ
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Settings) UnmarshalJSON ΒΆ
UnmarshalJSON supports json.Unmarshaler interface
type Stats ΒΆ
type Stats struct { DatabaseSize int64 `json:"database_size"` LastUpdate time.Time `json:"last_update"` Indexes map[string]StatsIndex `json:"indexes"` }
Stats is the type that represent all stats
func (Stats) MarshalEasyJSON ΒΆ
MarshalEasyJSON supports easyjson.Marshaler interface
func (Stats) MarshalJSON ΒΆ
MarshalJSON supports json.Marshaler interface
func (*Stats) UnmarshalEasyJSON ΒΆ
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Stats) UnmarshalJSON ΒΆ
UnmarshalJSON supports json.Unmarshaler interface
type StatsIndex ΒΆ
type StatsIndex struct { NumberOfDocuments int64 `json:"numberOfDocuments"` IsIndexing bool `json:"isIndexing"` FieldsFrequency map[string]int64 `json:"fieldsFrequency"` }
StatsIndex is the type that represent the stats of an index in MeiliSearch
func (StatsIndex) MarshalEasyJSON ΒΆ
func (v StatsIndex) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (StatsIndex) MarshalJSON ΒΆ
func (v StatsIndex) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*StatsIndex) UnmarshalEasyJSON ΒΆ
func (v *StatsIndex) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*StatsIndex) UnmarshalJSON ΒΆ
func (v *StatsIndex) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type StrsArr ΒΆ
type StrsArr []string
func (StrsArr) MarshalJSON ΒΆ
func (*StrsArr) UnmarshalJSON ΒΆ
type Update ΒΆ
type Update struct { Status UpdateStatus `json:"status"` UpdateID int64 `json:"updateID"` Type Unknown `json:"type"` Error string `json:"error"` EnqueuedAt time.Time `json:"enqueuedAt"` ProcessedAt time.Time `json:"processedAt"` }
Update indicate information about an update
func (Update) MarshalEasyJSON ΒΆ
MarshalEasyJSON supports easyjson.Marshaler interface
func (Update) MarshalJSON ΒΆ
MarshalJSON supports json.Marshaler interface
func (*Update) UnmarshalEasyJSON ΒΆ
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Update) UnmarshalJSON ΒΆ
UnmarshalJSON supports json.Unmarshaler interface
type UpdateStatus ΒΆ
type UpdateStatus string
UpdateStatus is the status of an update.
const ( // UpdateStatusUnknown is the default UpdateStatus, should not exist UpdateStatusUnknown UpdateStatus = "unknown" // UpdateStatusEnqueued means the server know the update but didn't handle it yet UpdateStatusEnqueued UpdateStatus = "enqueued" // UpdateStatusProcessed means the server has processed the update and all went well UpdateStatusProcessed UpdateStatus = "processed" // UpdateStatusFailed means the server has processed the update and an error has been reported UpdateStatusFailed UpdateStatus = "failed" )
type Updates ΒΆ
type Updates []Update
func (Updates) MarshalJSON ΒΆ
func (*Updates) UnmarshalJSON ΒΆ
type Version ΒΆ
type Version struct { CommitSha string `json:"commitSha"` BuildDate time.Time `json:"buildDate"` PkgVersion string `json:"pkgVersion"` }
Version is the type that represents the versions in MeiliSearch
func (Version) MarshalEasyJSON ΒΆ
MarshalEasyJSON supports easyjson.Marshaler interface
func (Version) MarshalJSON ΒΆ
MarshalJSON supports json.Marshaler interface
func (*Version) UnmarshalEasyJSON ΒΆ
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Version) UnmarshalJSON ΒΆ
UnmarshalJSON supports json.Unmarshaler interface