mock

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Copyright (C) 2019-2021 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-2021 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 ...interface{})
	DebugfFunc func(format string, vals ...interface{})
	InfoFunc   func(vals ...interface{})
	InfofFunc  func(format string, vals ...interface{})
	WarnFunc   func(vals ...interface{})
	WarnfFunc  func(format string, vals ...interface{})
	ErrorFunc  func(vals ...interface{})
	ErrorfFunc func(format string, vals ...interface{})
	FatalFunc  func(vals ...interface{})
	FatalfFunc func(format string, vals ...interface{})
}

Logger represents struct of each log level function.

func (*Logger) Close added in v1.0.0

func (l *Logger) Close() error

func (*Logger) Debug

func (l *Logger) Debug(vals ...interface{})

Debug calls DebugFunc of Logger.

func (*Logger) Debugd added in v1.0.0

func (l *Logger) Debugd(msg string, details ...interface{})

Debugd calls DebugfFunc of Logger.

func (*Logger) Debugf

func (l *Logger) Debugf(format string, vals ...interface{})

Debugf calls DebugfFunc of Logger.

func (*Logger) Error

func (l *Logger) Error(vals ...interface{})

Error calls ErrorFunc of Logger.

func (*Logger) Errord added in v1.0.0

func (l *Logger) Errord(msg string, details ...interface{})

Errord calls ErrorfFunc of Logger.

func (*Logger) Errorf

func (l *Logger) Errorf(format string, vals ...interface{})

Errorf calls ErrorfFunc of Logger.

func (*Logger) Fatal

func (l *Logger) Fatal(vals ...interface{})

Fatal calls FatalFunc of Logger.

func (*Logger) Fatald added in v1.0.0

func (l *Logger) Fatald(msg string, details ...interface{})

Fatald calls FatalfFunc of Logger.

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, vals ...interface{})

Fatalf calls FatalfFunc of Logger.

func (*Logger) Info

func (l *Logger) Info(vals ...interface{})

Info calls InfoFunc of Logger.

func (*Logger) Infod added in v1.0.0

func (l *Logger) Infod(msg string, details ...interface{})

Infod calls InfofFunc of Logger.

func (*Logger) Infof

func (l *Logger) Infof(format string, vals ...interface{})

Infof calls InfofFunc of Logger.

func (*Logger) Warn

func (l *Logger) Warn(vals ...interface{})

Warn calls WarnFunc of Logger.

func (*Logger) Warnd added in v1.0.0

func (l *Logger) Warnd(msg string, details ...interface{})

Warnd calls WarnfFunc of Logger.

func (*Logger) Warnf

func (l *Logger) Warnf(format string, vals ...interface{})

Warnf calls WarnfFunc of Logger.

type Retry

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

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

Retry represents struct of mock retry structure.

func (*Retry) Out

func (r *Retry) Out(
	fn func(vals ...interface{}) error,
	vals ...interface{},
)

Out calls OutFunc.

func (*Retry) Outf

func (r *Retry) Outf(
	fn func(format string, vals ...interface{}) error,
	format string, vals ...interface{},
)

Outf calls OutfFunc.

Jump to

Keyboard shortcuts

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