es

package
v0.26.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientV7

type ClientV7 struct {
	elasticsearch7.Client
}

func GetAwsClient

func GetAwsClient(logger Logger, url string) (*ClientV7, error)

func NewClient

func NewClient(config cfg.Config, logger Logger, name string) (*ClientV7, error)

func NewSimpleClient

func NewSimpleClient(logger Logger, url string, clientType string) (*ClientV7, error)

func ProvideClient

func ProvideClient(config cfg.Config, logger Logger, name string) (*ClientV7, error)

type DetailFields

type DetailFields map[string]interface{}

type Error

type Error struct {
	Message string
	Status  int
	Fields  DetailFields
}

func NewError

func NewError(message string) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) WithField

func (e *Error) WithField(name string, value interface{})

func (*Error) WithFields

func (e *Error) WithFields(fields DetailFields)

type Logger

type Logger interface {
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
}

Jump to

Keyboard shortcuts

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