storage

package
v0.0.0-...-73b1491 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SnippetStore

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

func NewSnippetStore

func NewSnippetStore(db *dynamodb.Client, tableName string, s3 *blob.S3Bucket) *SnippetStore

func (*SnippetStore) DeleteFileFromS3

func (store *SnippetStore) DeleteFileFromS3(fileID string) error

func (*SnippetStore) DeletePost

func (store *SnippetStore) DeletePost(pk string, sk string) error

func (*SnippetStore) GetFileContentFromS3

func (store *SnippetStore) GetFileContentFromS3(fileID string) (string, error)

func (*SnippetStore) GetPost

func (store *SnippetStore) GetPost(postSK string) models.Post

func (*SnippetStore) GetPostsByUser

func (store *SnippetStore) GetPostsByUser(postPK string) ([]models.Post, error)

func (*SnippetStore) GetUser

func (store *SnippetStore) GetUser(pk string, sk string) models.User

func (*SnippetStore) PutPost

func (store *SnippetStore) PutPost(post models.Post) error

func (*SnippetStore) PutUser

func (store *SnippetStore) PutUser(user models.User) error

func (*SnippetStore) UploadFileToS3

func (store *SnippetStore) UploadFileToS3(file io.Reader, key string) error

Jump to

Keyboard shortcuts

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