Documentation
¶
Index ¶
- Variables
- type DatabaseMigration
- type DynamoDBAdapter
- func (s *DynamoDBAdapter) Create(item any) error
- func (s *DynamoDBAdapter) Delete(item any, filter map[string]any) error
- func (s *DynamoDBAdapter) Execute(statement string) error
- func (s *DynamoDBAdapter) Get(dest any, filter map[string]any) error
- func (s *DynamoDBAdapter) GetProvider() StorageProviders
- func (s *DynamoDBAdapter) GetSchemaName() string
- func (s *DynamoDBAdapter) GetType() StorageAdapterType
- func (s *DynamoDBAdapter) List(dest any, sortKey string, filter map[string]any, limit int, cursor string) (string, error)
- func (s *DynamoDBAdapter) OpenConnection()
- func (s *DynamoDBAdapter) Ping() error
- func (s *DynamoDBAdapter) Update(item any, filter map[string]any) error
- type MemoryAdapter
- func (m *MemoryAdapter) Create(item any) error
- func (m *MemoryAdapter) Delete(item any, filter map[string]any) error
- func (m *MemoryAdapter) Execute(s string) error
- func (m *MemoryAdapter) Get(dest any, filter map[string]any) error
- func (m *MemoryAdapter) GetProvider() StorageProviders
- func (m *MemoryAdapter) GetSchemaName() string
- func (m *MemoryAdapter) GetType() StorageAdapterType
- func (m *MemoryAdapter) List(dest any, sortKey string, filter map[string]any, limit int, cursor string) (string, error)
- func (m *MemoryAdapter) Ping() error
- func (m *MemoryAdapter) Update(item any, filter map[string]any) error
- type Migration
- type MigrationFile
- type SQLAdapter
- func (s *SQLAdapter) Create(item any) error
- func (s *SQLAdapter) Delete(item any, filter map[string]any) error
- func (s *SQLAdapter) Execute(statement string) error
- func (s *SQLAdapter) Get(dest any, filter map[string]any) error
- func (s *SQLAdapter) GetProvider() StorageProviders
- func (s *SQLAdapter) GetSchemaName() string
- func (s *SQLAdapter) GetType() StorageAdapterType
- func (s *SQLAdapter) List(dest any, sortKey string, filter map[string]any, limit int, cursor string) (string, error)
- func (s *SQLAdapter) OpenConnection()
- func (s *SQLAdapter) Ping() error
- func (s *SQLAdapter) Update(item any, filter map[string]any) error
- type StorageAdapter
- type StorageAdapterFactory
- type StorageAdapterType
- type StorageProviders
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigFs embed.FS
View Source
var ErrNotFound = errors.New("the requested resource was not found")
Functions ¶
This section is empty.
Types ¶
type DatabaseMigration ¶
type DatabaseMigration struct {
// contains filtered or unexported fields
}
func NewDatabaseMigration ¶
func NewDatabaseMigration(storageAdapter StorageAdapter) *DatabaseMigration
func (*DatabaseMigration) Migrate ¶
func (m *DatabaseMigration) Migrate()
type DynamoDBAdapter ¶
func GetDynamoDBAdapterInstance ¶
func GetDynamoDBAdapterInstance(config map[string]string) *DynamoDBAdapter
func (*DynamoDBAdapter) Create ¶
func (s *DynamoDBAdapter) Create(item any) error
func (*DynamoDBAdapter) Delete ¶
func (s *DynamoDBAdapter) Delete(item any, filter map[string]any) error
func (*DynamoDBAdapter) Execute ¶
func (s *DynamoDBAdapter) Execute(statement string) error
func (*DynamoDBAdapter) GetProvider ¶ added in v0.3.0
func (s *DynamoDBAdapter) GetProvider() StorageProviders
func (*DynamoDBAdapter) GetSchemaName ¶ added in v0.3.0
func (s *DynamoDBAdapter) GetSchemaName() string
func (*DynamoDBAdapter) GetType ¶ added in v0.3.0
func (s *DynamoDBAdapter) GetType() StorageAdapterType
func (*DynamoDBAdapter) OpenConnection ¶
func (s *DynamoDBAdapter) OpenConnection()
func (*DynamoDBAdapter) Ping ¶
func (s *DynamoDBAdapter) Ping() error
type MemoryAdapter ¶
type MemoryAdapter struct {
DB *SQLAdapter
}
func GetMemoryAdapterInstance ¶
func GetMemoryAdapterInstance() *MemoryAdapter
func (*MemoryAdapter) Create ¶
func (m *MemoryAdapter) Create(item any) error
func (*MemoryAdapter) Delete ¶
func (m *MemoryAdapter) Delete(item any, filter map[string]any) error
func (*MemoryAdapter) Execute ¶
func (m *MemoryAdapter) Execute(s string) error
func (*MemoryAdapter) GetProvider ¶ added in v0.3.0
func (m *MemoryAdapter) GetProvider() StorageProviders
func (*MemoryAdapter) GetSchemaName ¶ added in v0.3.0
func (m *MemoryAdapter) GetSchemaName() string
func (*MemoryAdapter) GetType ¶ added in v0.3.0
func (m *MemoryAdapter) GetType() StorageAdapterType
func (*MemoryAdapter) Ping ¶
func (m *MemoryAdapter) Ping() error
type MigrationFile ¶
type SQLAdapter ¶
func GetSQLAdapterInstance ¶
func GetSQLAdapterInstance(config map[string]string) *SQLAdapter
func (*SQLAdapter) Create ¶
func (s *SQLAdapter) Create(item any) error
func (*SQLAdapter) Execute ¶
func (s *SQLAdapter) Execute(statement string) error
func (*SQLAdapter) GetProvider ¶ added in v0.3.0
func (s *SQLAdapter) GetProvider() StorageProviders
func (*SQLAdapter) GetSchemaName ¶ added in v0.3.0
func (s *SQLAdapter) GetSchemaName() string
func (*SQLAdapter) GetType ¶ added in v0.3.0
func (s *SQLAdapter) GetType() StorageAdapterType
func (*SQLAdapter) OpenConnection ¶
func (s *SQLAdapter) OpenConnection()
func (*SQLAdapter) Ping ¶
func (s *SQLAdapter) Ping() error
type StorageAdapter ¶
type StorageAdapter interface { Execute(statement string) error Ping() error GetType() StorageAdapterType GetProvider() StorageProviders GetSchemaName() string Create(item any) error Get(dest any, filter map[string]any) error Update(item any, filter map[string]any) error Delete(item any, filter map[string]any) error List(dest any, sortKey string, filter map[string]any, limit int, cursor string) (string, error) }
type StorageAdapterFactory ¶
type StorageAdapterFactory struct{}
func (StorageAdapterFactory) GetInstance ¶
func (s StorageAdapterFactory) GetInstance(adapterType StorageAdapterType, config any) (StorageAdapter, error)
type StorageAdapterType ¶
type StorageAdapterType string
const ( MEMORY StorageAdapterType = "memory" SQL StorageAdapterType = "sql" DYNAMODB StorageAdapterType = "dynamodb" )
type StorageProviders ¶
type StorageProviders string
const ( POSTGRESQL StorageProviders = "postgresql" MYSQL StorageProviders = "mysql" SQLITE StorageProviders = "sqlite" )
Click to show internal directories.
Click to hide internal directories.