datasources

package
v0.0.0-...-54886a1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	BaseURL string
	PORT    int
}

type EnvironmentDataSource

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

func NewEnvironmentDataSource

func NewEnvironmentDataSource() *EnvironmentDataSource

func (EnvironmentDataSource) GetEnvironment

func (eds EnvironmentDataSource) GetEnvironment() *Environment

type MemDB

type MemDB[T entities.Entity] struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

func NewMemDB

func NewMemDB[T entities.Entity]() *MemDB[T]

func (MemDB[T]) Count

func (s MemDB[T]) Count() int

func (*MemDB[T]) Delete

func (s *MemDB[T]) Delete(id string) bool

func (MemDB[T]) FindAll

func (s MemDB[T]) FindAll() []T

func (MemDB[T]) FindById

func (s MemDB[T]) FindById(id string) (T, bool)

func (*MemDB[T]) Save

func (s *MemDB[T]) Save(entity T) T

type ShortcutDynamoDB

type ShortcutDynamoDB struct {
	TableName string
	// contains filtered or unexported fields
}

func NewShortcutDynamoDB

func NewShortcutDynamoDB() (*ShortcutDynamoDB, error)

func (ShortcutDynamoDB) Delete

func (s ShortcutDynamoDB) Delete(id string) bool

func (ShortcutDynamoDB) Find

func (s ShortcutDynamoDB) Find(
	limit int32,
) ([]entities.Shortcut, error)

func (ShortcutDynamoDB) FindById

func (s ShortcutDynamoDB) FindById(id string) (entities.Shortcut, bool)

func (ShortcutDynamoDB) Save

func (s ShortcutDynamoDB) Save(entity entities.Shortcut) (bool, error)

type ShortcutRedis

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

func NewShortcutRedis

func NewShortcutRedis() (*ShortcutRedis, error)

func (ShortcutRedis) Delete

func (s ShortcutRedis) Delete(id string) (bool, error)

func (ShortcutRedis) FindById

func (s ShortcutRedis) FindById(id string) (string, error)

func (ShortcutRedis) Save

func (s ShortcutRedis) Save(entity entities.Shortcut) (bool, error)

Jump to

Keyboard shortcuts

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