Documentation ¶
Index ¶
- type ApiClient
- type DataClient
- func (d *DataClient) GetMembre(membreID string) (models.Membre, error)
- func (d *DataClient) GetMembres() (membres []models.Membre, err 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 ApiClient ¶
type ApiClient struct {
Voki *voki.Voki
}
func NewApiClient ¶
func NewApiClientFromViper ¶
func (*ApiClient) ListMembres ¶
func (a *ApiClient) ListMembres() (r responses.ListMembresResponse, err error)
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 NewDataClientFromViper ¶
func NewDataClientFromViper() (*DataClient, error)
func (*DataClient) GetMembre ¶
func (d *DataClient) GetMembre(membreID string) (models.Membre, error)
func (*DataClient) GetMembres ¶
func (d *DataClient) GetMembres() (membres []models.Membre, err 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.