Documentation ¶
Index ¶
- func NewPostgres(settings settings.Settings) storage.Storage
- type PostgresClient
- func (p PostgresClient) DeleteMeetup(meetup models.Meetup) error
- func (p PostgresClient) DeleteSpeaker(speaker models.Speaker) error
- func (p PostgresClient) DeleteSponsor(sponsor models.Sponsor) error
- func (p PostgresClient) GetMeetup(meetupUUID string) (models.Meetup, bool, error)
- func (p PostgresClient) GetMeetups() ([]models.Meetup, bool, error)
- func (p PostgresClient) GetSpeaker(meetupUUID string, speakerUUID string) (models.Speaker, bool, error)
- func (p PostgresClient) GetSpeakers(meetupUUID string) ([]models.Speaker, bool, error)
- func (p PostgresClient) GetSponsor(sponsorUUID string) (models.Sponsor, bool, error)
- func (p PostgresClient) GetSponsors() ([]models.Sponsor, bool, error)
- func (p PostgresClient) MigrateMeetup() error
- func (p PostgresClient) MigrateSpeaker() error
- func (p PostgresClient) MigrateSponsor() error
- func (p PostgresClient) WriteMeetup(meetup models.Meetup) error
- func (p PostgresClient) WriteSpeaker(speaker models.Speaker) error
- func (p PostgresClient) WriteSponsor(sponsor models.Sponsor) error
- type PostgresClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) GetMeetups ¶
func (p PostgresClient) GetMeetups() ([]models.Meetup, bool, error)
func (PostgresClient) GetSpeaker ¶
func (PostgresClient) GetSpeakers ¶
func (PostgresClient) GetSponsor ¶
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 }
Click to show internal directories.
Click to hide internal directories.