interfaces

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(key string, dest interface{}) (bool, error)
	Set(key string, value interface{}, ttl time.Duration) error
	Delete(key string) error
	Clear() error
}

Cache defines the interface for caching functionality

type Config

type Config interface {
	GetAddr() string
	GetUser() string
	GetPassword() string
	GetRealm() string
	GetTokenID() string
	GetTokenSecret() string
	GetInsecure() bool
	IsUsingTokenAuth() bool
	GetAPIToken() string
}

Config defines the interface for configuration data needed by the API client

type Logger

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

Logger defines the interface for logging functionality

type NoOpCache

type NoOpCache struct{}

NoOpCache is a cache that does nothing (useful for testing or when caching is not needed)

func (*NoOpCache) Clear

func (n *NoOpCache) Clear() error

func (*NoOpCache) Delete

func (n *NoOpCache) Delete(key string) error

func (*NoOpCache) Get

func (n *NoOpCache) Get(key string, dest interface{}) (bool, error)

func (*NoOpCache) Set

func (n *NoOpCache) Set(key string, value interface{}, ttl time.Duration) error

type NoOpLogger

type NoOpLogger struct{}

NoOpLogger is a logger that does nothing (useful for testing or when logging is not needed)

func (*NoOpLogger) Debug

func (n *NoOpLogger) Debug(format string, args ...interface{})

func (*NoOpLogger) Error

func (n *NoOpLogger) Error(format string, args ...interface{})

func (*NoOpLogger) Info

func (n *NoOpLogger) Info(format string, args ...interface{})

Jump to

Keyboard shortcuts

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