Documentation ¶
Index ¶
- type ApiClient
- type DataClient
- func (d *DataClient) GetMembre(membreID string) (models.Membre, error)
- func (d *DataClient) InsertMembres(membres []models.Membre) (int64, error)
- func (d *DataClient) InsertProgrammes(programmes []models.Programme) (int64, error)
- func (d *DataClient) Seed() (int64, error)
- func (d *DataClient) UpdateMembreName(membreID, newName string) (int64, error)
- type PostgresConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataClient ¶
type DataClient struct { PostgresConnection PostgresConnection DB sqlx.DB }
DataClient is a postgres client based on sqlx
func NewDataClient ¶
func NewDataClient(connection PostgresConnection) (*DataClient, error)
func (*DataClient) GetMembre ¶
func (d *DataClient) GetMembre(membreID string) (models.Membre, error)
func (*DataClient) InsertMembres ¶
func (d *DataClient) InsertMembres(membres []models.Membre) (int64, error)
InsertMembres inserts a slice of Membre into a database, returning the amount inserted and any error encountered
func (*DataClient) InsertProgrammes ¶
func (d *DataClient) InsertProgrammes(programmes []models.Programme) (int64, error)
func (*DataClient) Seed ¶
func (d *DataClient) Seed() (int64, error)
func (*DataClient) UpdateMembreName ¶
func (d *DataClient) UpdateMembreName(membreID, newName string) (int64, error)
Click to show internal directories.
Click to hide internal directories.