sakeyrotator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultName = "sa-key-rotator"

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	Time     *time.Time
	Severity Severity
	Message  string
	Data     map[string]any
}

func (*LogEntry) MarshalJSON

func (l *LogEntry) MarshalJSON() ([]byte, error)

type Logger

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

func NewLogger

func NewLogger(level string, outw, errw io.Writer) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string, fields ...any)

func (*Logger) Error

func (l *Logger) Error(msg string, fields ...any)

func (*Logger) Fatal

func (l *Logger) Fatal(msg string, fields ...any)

func (*Logger) Info

func (l *Logger) Info(msg string, fields ...any)

func (*Logger) Warn

func (l *Logger) Warn(msg string, fields ...any)

type Rotator

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

func NewRotator

func NewRotator(ctx context.Context, logger *Logger) (*Rotator, error)

func (*Rotator) Rotate

func (r *Rotator) Rotate(ctx context.Context,
	serviceAccountEmail,
	name,
	bucket string,
	expiryInDays,
	renewalWindowInDays int,
	forceCreate,
	forceDelete bool) error

type Severity

type Severity uint8
const (
	SeverityDebug Severity = iota
	SeverityInfo
	SeverityWarn
	SeverityError
	SeverityFatal
)

Jump to

Keyboard shortcuts

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