persistence

package
v0.0.0-...-3ec3138 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAthenaQueryAdapter

func NewAthenaQueryAdapter(ctx context.Context, region, database, table, s3OutputLocation string) (repository.AthenaQueryRepository, error)

func NewPhotoImagePersistence

func NewPhotoImagePersistence(ctx context.Context, region, bucket string) (repository.PhotoImageRepository, error)

func NewPhotoMetadataPersistence

func NewPhotoMetadataPersistence(conn *gorm.DB) repository.PhotoMetadataRepository

func NewQueryAdapter

func NewQueryAdapter(conn *gorm.DB) repository.QueryRepository

func NewTripMetadataPersistence

func NewTripMetadataPersistence(conn *gorm.DB) repository.TripMetadataStoreRepository

func NewUserPersistence

func NewUserPersistence(conn *gorm.DB) repository.UserRepository

Types

type AthenaQueryAdapter

type AthenaQueryAdapter struct {
	*athena.Client
	// contains filtered or unexported fields
}

func (*AthenaQueryAdapter) Fetch

func (aa *AthenaQueryAdapter) Fetch(ctx context.Context, rawQuery string, args []interface{}) ([][]string, error)

type PhotoMetadataPersistence

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

func (*PhotoMetadataPersistence) Create

func (mp *PhotoMetadataPersistence) Create(photo *model.Photo) error

type QueryAdapter

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

func (*QueryAdapter) Fetch

func (qa *QueryAdapter) Fetch(rawQuery string, args []interface{}, scanType interface{}) (interface{}, error)

type TripMetadataPersistence

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

func (*TripMetadataPersistence) Create

func (tp *TripMetadataPersistence) Create(trip *model.Trip) error

func (*TripMetadataPersistence) FindByDateAndUnit

func (tp *TripMetadataPersistence) FindByDateAndUnit(year, month, day int, unit string) (*model.Trip, error)

type UserPersistence

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

func (*UserPersistence) Create

func (up *UserPersistence) Create(user *model.User) error

func (*UserPersistence) FindByEmail

func (up *UserPersistence) FindByEmail(email model.Email) (*model.User, error)

Jump to

Keyboard shortcuts

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