db

package
v0.0.0-...-75ed8df Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MESSAGE = "MESSAGE"

Functions

This section is empty.

Types

type CacheItem

type CacheItem struct {
	PK string `json:"pk" dynamodbav:"PK"`
	SK string `json:"sk" dynamodbav:"SK"`
}

type CacheRepository

type CacheRepository struct {
	DBClient
}

func NewCacheRepository

func NewCacheRepository() (*CacheRepository, error)

func (*CacheRepository) DeleteItem

func (db *CacheRepository) DeleteItem(item string) error

func (*CacheRepository) GetItem

func (db *CacheRepository) GetItem(item string) (*string, error)

func (*CacheRepository) ItemExists

func (db *CacheRepository) ItemExists(item string) bool

func (*CacheRepository) SaveItem

func (db *CacheRepository) SaveItem(item *string) error

type DBClient

type DBClient struct {
	TableName *string
	Session   *session.Session
}

func NewDBClient

func NewDBClient(tableName string, config *aws.Config) (*DBClient, error)

Jump to

Keyboard shortcuts

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