Documentation
¶
Index ¶
- func NewArchiverAdapter() interfaces.Archiver
- func NewConsulAdapter() (interfaces.ConsulClient, error)
- func NewFileSystemAdapter() interfaces.FileSystem
- func NewGCSAdapter() (interfaces.StorageClient, error)
- func NewLoggerAdapter() interfaces.Logger
- func NewS3Adapter(region, endpoint, encryption, kmsKeyID string) interfaces.StorageClient
- type ArchiverAdapter
- type ConsulAdapter
- func (c *ConsulAdapter) CreateACL(acl *consulapi.ACLEntry) error
- func (c *ConsulAdapter) CreatePQ(pq *consulapi.PreparedQueryDefinition) error
- func (c *ConsulAdapter) ListACLs() ([]*consulapi.ACLEntry, error)
- func (c *ConsulAdapter) ListKeys() (consulapi.KVPairs, error)
- func (c *ConsulAdapter) ListPQs() ([]*consulapi.PreparedQueryDefinition, error)
- func (c *ConsulAdapter) PutKV(key string, value []byte) error
- type FileSystemAdapter
- func (f *FileSystemAdapter) MkdirAll(path string, perm int) error
- func (f *FileSystemAdapter) ReadFile(filename string) ([]byte, error)
- func (f *FileSystemAdapter) Remove(path string) error
- func (f *FileSystemAdapter) RemoveAll(path string) error
- func (f *FileSystemAdapter) WriteFile(filename string, data []byte, perm int) error
- type GCSAdapter
- type LoggerAdapter
- type S3Adapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewArchiverAdapter ¶
func NewArchiverAdapter() interfaces.Archiver
NewArchiverAdapter creates a new archiver adapter
func NewConsulAdapter ¶
func NewConsulAdapter() (interfaces.ConsulClient, error)
NewConsulAdapter creates a new consul adapter
func NewFileSystemAdapter ¶
func NewFileSystemAdapter() interfaces.FileSystem
NewFileSystemAdapter creates a new filesystem adapter
func NewGCSAdapter ¶
func NewGCSAdapter() (interfaces.StorageClient, error)
NewGCSAdapter creates a new GCS adapter
func NewLoggerAdapter ¶
func NewLoggerAdapter() interfaces.Logger
NewLoggerAdapter creates a new logger adapter
func NewS3Adapter ¶
func NewS3Adapter(region, endpoint, encryption, kmsKeyID string) interfaces.StorageClient
NewS3Adapter creates a new S3 adapter
Types ¶
type ArchiverAdapter ¶
type ArchiverAdapter struct{}
ArchiverAdapter implements the Archiver interface
func (*ArchiverAdapter) TarGz ¶
func (a *ArchiverAdapter) TarGz(destination string, sources []string) error
TarGz creates a tar.gz archive
func (*ArchiverAdapter) UnTarGz ¶
func (a *ArchiverAdapter) UnTarGz(source, destination string) error
UnTarGz extracts a tar.gz archive
type ConsulAdapter ¶
ConsulAdapter implements the ConsulClient interface
func (*ConsulAdapter) CreateACL ¶
func (c *ConsulAdapter) CreateACL(acl *consulapi.ACLEntry) error
CreateACL creates an ACL in consul
func (*ConsulAdapter) CreatePQ ¶
func (c *ConsulAdapter) CreatePQ(pq *consulapi.PreparedQueryDefinition) error
CreatePQ creates a prepared query in consul
func (*ConsulAdapter) ListACLs ¶
func (c *ConsulAdapter) ListACLs() ([]*consulapi.ACLEntry, error)
ListACLs lists all ACLs from consul
func (*ConsulAdapter) ListKeys ¶
func (c *ConsulAdapter) ListKeys() (consulapi.KVPairs, error)
ListKeys lists all keys from consul
func (*ConsulAdapter) ListPQs ¶
func (c *ConsulAdapter) ListPQs() ([]*consulapi.PreparedQueryDefinition, error)
ListPQs lists all prepared queries from consul
type FileSystemAdapter ¶
type FileSystemAdapter struct{}
FileSystemAdapter implements the FileSystem interface
func (*FileSystemAdapter) MkdirAll ¶
func (f *FileSystemAdapter) MkdirAll(path string, perm int) error
MkdirAll creates directories
func (*FileSystemAdapter) ReadFile ¶
func (f *FileSystemAdapter) ReadFile(filename string) ([]byte, error)
ReadFile reads data from a file
func (*FileSystemAdapter) Remove ¶
func (f *FileSystemAdapter) Remove(path string) error
Remove removes a file
func (*FileSystemAdapter) RemoveAll ¶
func (f *FileSystemAdapter) RemoveAll(path string) error
RemoveAll removes a directory and all its contents
type GCSAdapter ¶
type GCSAdapter struct {
// contains filtered or unexported fields
}
GCSAdapter implements StorageClient for Google Cloud Storage
type LoggerAdapter ¶
type LoggerAdapter struct{}
LoggerAdapter implements the Logger interface
func (*LoggerAdapter) Fatal ¶
func (l *LoggerAdapter) Fatal(args ...interface{})
Fatal logs and exits
func (*LoggerAdapter) Fatalf ¶
func (l *LoggerAdapter) Fatalf(format string, args ...interface{})
Fatalf logs with format and exits
func (*LoggerAdapter) Print ¶
func (l *LoggerAdapter) Print(args ...interface{})
Print logs without format
func (*LoggerAdapter) Printf ¶
func (l *LoggerAdapter) Printf(format string, args ...interface{})
Printf logs with format