errs

package
v0.0.0-...-04d6450 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package errs defines error details

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidJSONType = errors.New(
		"invalid JSON type, possible values are [string, long, double, boolean, date]",
	)
	ErrNoMappingInDynamicTemplate = errors.New("dynamic template must have a mapping")
	ErrEmptySettings              = errors.New("empty settings")
	ErrEmptyMappings              = errors.New("empty mappings")
	ErrNoSegmentMatched           = errors.New("no segment matched")
	ErrIndexLibNotSupport         = errors.New("index lib not support")
	ErrSpecifyDirAsFile           = errors.New("specify directory as file")
	ErrSegmentReadonly            = errors.New("segment is readonly")
	ErrEmptyField                 = errors.New(
		"invalid field specified, must be non-null and non-empty",
	)
)

Functions

func IsIndexNotFound

func IsIndexNotFound(err error) bool

func IsIndexTemplateNotFound

func IsIndexTemplateNotFound(err error) bool

func IsInvalidResourceNameError

func IsInvalidResourceNameError(err error) bool

func IsShardNotFound

func IsShardNotFound(err error) bool

Types

type IndexNotFoundError

type IndexNotFoundError struct {
	Index string `json:"index"`
}

func IndexNotFound

func IndexNotFound(err error) (bool, *IndexNotFoundError)

func (*IndexNotFoundError) Error

func (e *IndexNotFoundError) Error() string

type IndexTemplateNotFoundError

type IndexTemplateNotFoundError struct {
	IndexTemplate string `json:"index_template"`
}

func IndexTemplateNotFound

func IndexTemplateNotFound(err error) (bool, *IndexTemplateNotFoundError)

func (*IndexTemplateNotFoundError) Error

type InvalidAggFieldTypeError

type InvalidAggFieldTypeError struct {
	Field           string `json:"field"`
	FieldType       string `json:"type"`
	AggregationType string `json:"aggregation_type"`
	AggregationName string `json:"aggregation_name"`
}

func (*InvalidAggFieldTypeError) Error

func (e *InvalidAggFieldTypeError) Error() string

type InvalidBulkError

type InvalidBulkError struct {
	Message string `json:"message"`
}

func (*InvalidBulkError) Error

func (e *InvalidBulkError) Error() string

type InvalidFieldError

type InvalidFieldError struct {
	Field   string `json:"field"`
	Message string `json:"message"`
}

func (*InvalidFieldError) Error

func (e *InvalidFieldError) Error() string

type InvalidFieldValError

type InvalidFieldValError struct {
	Field string `json:"field"`
	Type  string `json:"type"`
	Value any    `json:"value"`
}

func (*InvalidFieldValError) Error

func (e *InvalidFieldValError) Error() string

type InvalidQueryError

type InvalidQueryError struct {
	Message string `json:"message"`
	Query   any    `json:"query"`
}

func (*InvalidQueryError) Error

func (e *InvalidQueryError) Error() string

type InvalidRangeError

type InvalidRangeError struct {
	Desc         string `json:"desc"`
	Value        any    `json:"value"`
	Left         any    `json:"left"`
	LeftExclude  bool   `json:"left_exclude"`
	Right        any    `json:"right"`
	RightExclude bool   `json:"right_exclude"`
}

func (*InvalidRangeError) Error

func (e *InvalidRangeError) Error() string

type InvalidResourceNameError

type InvalidResourceNameError struct {
	Name    string `json:"name"`
	Message string `json:"message"`
}

func (*InvalidResourceNameError) Error

func (e *InvalidResourceNameError) Error() string

type NoSegmentError

type NoSegmentError struct {
	Index string `json:"index"`
	Shard int    `json:"shard"`
}

func (*NoSegmentError) Error

func (e *NoSegmentError) Error() string

type NoShardError

type NoShardError struct {
	Index string `json:"index"`
}

func (*NoShardError) Error

func (e *NoShardError) Error() string

type QueryLoadExceedError

type QueryLoadExceedError struct {
	Indexes []string `json:"indexes"`
	Message string   `json:"message"`
	Query   any      `json:"query"`
}

func (*QueryLoadExceedError) Error

func (e *QueryLoadExceedError) Error() string

type SegmentNotFoundError

type SegmentNotFoundError struct {
	Index   string `json:"index"`
	Shard   int    `json:"shard"`
	Segment int    `json:"segment"`
}

func (*SegmentNotFoundError) Error

func (e *SegmentNotFoundError) Error() string

type ShardNotFoundError

type ShardNotFoundError struct {
	Index string `json:"index"`
	Shard int    `json:"shard"`
}

func (*ShardNotFoundError) Error

func (e *ShardNotFoundError) Error() string

type UnsupportedError

type UnsupportedError struct {
	Desc  string `json:"desc"`
	Value any    `json:"value"`
}

func (*UnsupportedError) Error

func (e *UnsupportedError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL