mock

package
v1.7.13 Latest Latest
Warning

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

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

Documentation

Overview

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	DebugFunc  func(vals ...any)
	DebugfFunc func(format string, vals ...any)
	InfoFunc   func(vals ...any)
	InfofFunc  func(format string, vals ...any)
	WarnFunc   func(vals ...any)
	WarnfFunc  func(format string, vals ...any)
	ErrorFunc  func(vals ...any)
	ErrorfFunc func(format string, vals ...any)
	FatalFunc  func(vals ...any)
	FatalfFunc func(format string, vals ...any)
}

Logger represents struct of each log level function.

func (*Logger) Close added in v1.0.0

func (*Logger) Close() error

func (*Logger) Debug

func (l *Logger) Debug(vals ...any)

Debug calls DebugFunc of Logger.

func (*Logger) Debugd added in v1.0.0

func (l *Logger) Debugd(msg string, details ...any)

Debugd calls DebugfFunc of Logger.

func (*Logger) Debugf

func (l *Logger) Debugf(format string, vals ...any)

Debugf calls DebugfFunc of Logger.

func (*Logger) Error

func (l *Logger) Error(vals ...any)

Error calls ErrorFunc of Logger.

func (*Logger) Errord added in v1.0.0

func (l *Logger) Errord(msg string, details ...any)

Errord calls ErrorfFunc of Logger.

func (*Logger) Errorf

func (l *Logger) Errorf(format string, vals ...any)

Errorf calls ErrorfFunc of Logger.

func (*Logger) Fatal

func (l *Logger) Fatal(vals ...any)

Fatal calls FatalFunc of Logger.

func (*Logger) Fatald added in v1.0.0

func (l *Logger) Fatald(msg string, details ...any)

Fatald calls FatalfFunc of Logger.

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, vals ...any)

Fatalf calls FatalfFunc of Logger.

func (*Logger) Info

func (l *Logger) Info(vals ...any)

Info calls InfoFunc of Logger.

func (*Logger) Infod added in v1.0.0

func (l *Logger) Infod(msg string, details ...any)

Infod calls InfofFunc of Logger.

func (*Logger) Infof

func (l *Logger) Infof(format string, vals ...any)

Infof calls InfofFunc of Logger.

func (*Logger) Warn

func (l *Logger) Warn(vals ...any)

Warn calls WarnFunc of Logger.

func (*Logger) Warnd added in v1.0.0

func (l *Logger) Warnd(msg string, details ...any)

Warnd calls WarnfFunc of Logger.

func (*Logger) Warnf

func (l *Logger) Warnf(format string, vals ...any)

Warnf calls WarnfFunc of Logger.

type Retry

type Retry struct {
	OutFunc func(
		fn func(vals ...any) error,
		vals ...any,
	)

	OutfFunc func(
		fn func(format string, vals ...any) error,
		format string,
		vals ...any,
	)
}

Retry represents struct of mock retry structure.

func (*Retry) Out

func (r *Retry) Out(fn func(vals ...any) error, vals ...any)

Out calls OutFunc.

func (*Retry) Outf

func (r *Retry) Outf(fn func(format string, vals ...any) error, format string, vals ...any)

Outf calls OutfFunc.

Jump to

Keyboard shortcuts

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