postgres

package
v0.0.0-...-8982ac9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgres

func NewPostgres(settings settings.Settings) storage.Storage

Types

type PostgresClient

type PostgresClient struct {
	Client PostgresClientInterface
}

func (PostgresClient) DeleteMeetup

func (p PostgresClient) DeleteMeetup(meetup models.Meetup) error

func (PostgresClient) DeleteSpeaker

func (p PostgresClient) DeleteSpeaker(speaker models.Speaker) error

func (PostgresClient) DeleteSponsor

func (p PostgresClient) DeleteSponsor(sponsor models.Sponsor) error

func (PostgresClient) GetMeetup

func (p PostgresClient) GetMeetup(meetupUUID string) (models.Meetup, bool, error)

func (PostgresClient) GetMeetups

func (p PostgresClient) GetMeetups() ([]models.Meetup, bool, error)

func (PostgresClient) GetSpeaker

func (p PostgresClient) GetSpeaker(meetupUUID string, speakerUUID string) (models.Speaker, bool, error)

func (PostgresClient) GetSpeakers

func (p PostgresClient) GetSpeakers(meetupUUID string) ([]models.Speaker, bool, error)

func (PostgresClient) GetSponsor

func (p PostgresClient) GetSponsor(sponsorUUID string) (models.Sponsor, bool, error)

func (PostgresClient) GetSponsors

func (p PostgresClient) GetSponsors() ([]models.Sponsor, bool, error)

func (PostgresClient) MigrateMeetup

func (p PostgresClient) MigrateMeetup() error

func (PostgresClient) MigrateSpeaker

func (p PostgresClient) MigrateSpeaker() error

func (PostgresClient) MigrateSponsor

func (p PostgresClient) MigrateSponsor() error

func (PostgresClient) WriteMeetup

func (p PostgresClient) WriteMeetup(meetup models.Meetup) error

func (PostgresClient) WriteSpeaker

func (p PostgresClient) WriteSpeaker(speaker models.Speaker) error

func (PostgresClient) WriteSponsor

func (p PostgresClient) WriteSponsor(sponsor models.Sponsor) error

type PostgresClientInterface

type PostgresClientInterface interface {
	Clauses(conds ...clause.Expression) (tx *gorm.DB)
	Create(value interface{}) (tx *gorm.DB)
	Where(query interface{}, args ...interface{}) (tx *gorm.DB)
	First(dest interface{}, conds ...interface{}) (tx *gorm.DB)
	Find(dest interface{}, conds ...interface{}) (tx *gorm.DB)
	Save(value interface{}) (tx *gorm.DB)
	AutoMigrate(dst ...interface{}) error
}

Directories

Path Synopsis
Package postgres_mock is a generated GoMock package.
Package postgres_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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