pkg

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DYNAMO_TABLE_NAME = "pocketbook" //dynamo table name
	REGION            = "us-east-2"
)

Functions

This section is empty.

Types

type DB

type DB struct {
	DynamoClient *dynamodb.Client
}

func NewDynamoDB

func NewDynamoDB() *DB

func (*DB) AddUserRecord

func (d *DB) AddUserRecord(username string, userRecords []UserRecord) error

func (*DB) GetUserRecords

func (d *DB) GetUserRecords(user_name string) (UserRecord, error)

type FirestoreService

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

func NewFirestoreService

func NewFirestoreService() *FirestoreService

func (*FirestoreService) AddUserRecord

func (s *FirestoreService) AddUserRecord(docID, value string) error

func (*FirestoreService) CloseClient

func (s *FirestoreService) CloseClient()

func (*FirestoreService) DeleteRecord

func (s *FirestoreService) DeleteRecord(docID, value string) error

func (*FirestoreService) GetUserRecord

func (s *FirestoreService) GetUserRecord(docID string) (*firestore.DocumentSnapshot, error)

type Record

type Record struct {
	Key   string
	Value string
}

type UserRecord

type UserRecord struct {
	UserName string   `json:"user_name" dynamodbav:"username"`
	UserData []Record `json:"user_records" dynamodbav:"user_records"`
}

Jump to

Keyboard shortcuts

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