badger

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package badger is a generated GoMock package.

Package badger is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(configs Configs) *client

Types

type Configs

type Configs struct {
	DirPath string
}

type Health

type Health struct {
	Status  string         `json:"status,omitempty"`
	Details map[string]any `json:"details,omitempty"`
}

type Log

type Log struct {
	Type     string `json:"type"`
	Duration int64  `json:"duration"`
	Key      string `json:"key"`
	Value    string `json:"value,omitempty"`
}

func (*Log) PrettyPrint

func (l *Log) PrettyPrint(writer io.Writer)

type Logger

type Logger interface {
	Debug(args ...any)
	Debugf(pattern string, args ...any)
	Info(args ...any)
	Infof(pattern string, args ...any)
	Error(args ...any)
	Errorf(patter string, args ...any)
}

type Metrics

type Metrics interface {
	NewHistogram(name, desc string, buckets ...float64)

	RecordHistogram(ctx context.Context, name string, value float64, labels ...string)
}

type MockLogger

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

MockLogger is a mock of Logger interface.

func NewMockLogger

func NewMockLogger(ctrl *gomock.Controller) *MockLogger

NewMockLogger creates a new mock instance.

func (*MockLogger) Debug

func (m *MockLogger) Debug(args ...any)

Debug mocks base method.

func (*MockLogger) Debugf

func (m *MockLogger) Debugf(pattern string, args ...any)

Debugf mocks base method.

func (*MockLogger) EXPECT

func (m *MockLogger) EXPECT() *MockLoggerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockLogger) Error

func (m *MockLogger) Error(args ...any)

Error mocks base method.

func (*MockLogger) Errorf

func (m *MockLogger) Errorf(patter string, args ...any)

Errorf mocks base method.

func (*MockLogger) Info

func (m *MockLogger) Info(args ...any)

Info mocks base method.

func (*MockLogger) Infof

func (m *MockLogger) Infof(pattern string, args ...any)

Infof mocks base method.

type MockLoggerMockRecorder

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

MockLoggerMockRecorder is the mock recorder for MockLogger.

func (*MockLoggerMockRecorder) Debug

func (mr *MockLoggerMockRecorder) Debug(args ...any) *gomock.Call

Debug indicates an expected call of Debug.

func (*MockLoggerMockRecorder) Debugf

func (mr *MockLoggerMockRecorder) Debugf(pattern any, args ...any) *gomock.Call

Debugf indicates an expected call of Debugf.

func (*MockLoggerMockRecorder) Error

func (mr *MockLoggerMockRecorder) Error(args ...any) *gomock.Call

Error indicates an expected call of Error.

func (*MockLoggerMockRecorder) Errorf

func (mr *MockLoggerMockRecorder) Errorf(patter any, args ...any) *gomock.Call

Errorf indicates an expected call of Errorf.

func (*MockLoggerMockRecorder) Info

func (mr *MockLoggerMockRecorder) Info(args ...any) *gomock.Call

Info indicates an expected call of Info.

func (*MockLoggerMockRecorder) Infof

func (mr *MockLoggerMockRecorder) Infof(pattern any, args ...any) *gomock.Call

Infof indicates an expected call of Infof.

type MockMetrics

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

MockMetrics is a mock of Metrics interface.

func NewMockMetrics

func NewMockMetrics(ctrl *gomock.Controller) *MockMetrics

NewMockMetrics creates a new mock instance.

func (*MockMetrics) EXPECT

func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMetrics) NewHistogram

func (m *MockMetrics) NewHistogram(name, desc string, buckets ...float64)

NewHistogram mocks base method.

func (*MockMetrics) RecordHistogram

func (m *MockMetrics) RecordHistogram(ctx context.Context, name string, value float64, labels ...string)

RecordHistogram mocks base method.

type MockMetricsMockRecorder

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

MockMetricsMockRecorder is the mock recorder for MockMetrics.

func (*MockMetricsMockRecorder) NewHistogram

func (mr *MockMetricsMockRecorder) NewHistogram(name, desc any, buckets ...any) *gomock.Call

NewHistogram indicates an expected call of NewHistogram.

func (*MockMetricsMockRecorder) RecordHistogram

func (mr *MockMetricsMockRecorder) RecordHistogram(ctx, name, value any, labels ...any) *gomock.Call

RecordHistogram indicates an expected call of RecordHistogram.

Jump to

Keyboard shortcuts

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