Help us shape the future of Go! Take the 2026 Go Developer Survey

archinisis

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchAthleteResponse added in v1.3.6

type ArchAthleteResponse struct {
	NationalID  string   `json:"national_id"`
	FirstName   *string  `json:"first_name,omitempty"`
	LastName    *string  `json:"last_name,omitempty"`
	Initials    *string  `json:"initials,omitempty"`
	DateOfBirth *string  `json:"date_of_birth,omitempty"`
	Height      *float64 `json:"height,omitempty"`
	Weight      *float64 `json:"weight,omitempty"`
}

type ArchDataPayload

type ArchDataPayload struct {
	Athlete      archsqlc.UpsertAthleteParams
	Measurements []archsqlc.UpsertMeasurementParams
}

type ArchDataResponse

type ArchDataResponse struct {
	ArchAthleteResponse
	Measurements []ArchMeasurementResponse `json:"measurements"`
}

type ArchMeasurementResponse

type ArchMeasurementResponse struct {
	MeasurementGroupID *int32  `json:"measurement_group_id,omitempty"`
	MeasurementID      int32   `json:"measurement_id"`
	Discipline         *string `json:"discipline,omitempty"`
	SessionName        *string `json:"session_name,omitempty"`
	Place              *string `json:"place,omitempty"`
	RaceID             *int32  `json:"race_id,omitempty"`
	StartTime          *string `json:"start_time,omitempty"`
	StopTime           *string `json:"stop_time,omitempty"`
	NbSegments         *int32  `json:"nb_segments,omitempty"`
	Comment            *string `json:"comment,omitempty"`
}

type ArchinisisStorage

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

ArchinisisStorage

func NewArchinisisStorage

func NewArchinisisStorage(db *sql.DB) *ArchinisisStorage

NewArchinisisStorage creates a new ArchinisisStorage instance

func (*ArchinisisStorage) Data

func (s *ArchinisisStorage) Data() Data

func (*ArchinisisStorage) Ping

func (s *ArchinisisStorage) Ping(ctx context.Context) error

Methods

func (*ArchinisisStorage) Users

func (s *ArchinisisStorage) Users() Users

type Data

type Data interface {
	// Race reports
	GetRaceReportSessions(ctx context.Context, sporttiID string) ([]int32, error)
	GetRaceReport(ctx context.Context, sporttiID string, sessionID int32) (string, error)
	UpsertRaceReport(ctx context.Context, sporttiID string, sessionID int32, raceReport string) error
	// Combined athlete + measurements (POST/GET /archinisis/data)
	UpsertData(ctx context.Context, payload ArchDataPayload) error
	GetDataBySporttiID(ctx context.Context, sporttiID string) (*ArchDataResponse, error)
	// Athlete
	UpsertAthleteOnly(ctx context.Context, athlete archsqlc.UpsertAthleteParams) error
	GetAthleteByID(ctx context.Context, sporttiID string) (*ArchAthleteResponse, error)
	// Measurements
	UpsertMeasurements(ctx context.Context, sporttiID string, measurements []archsqlc.UpsertMeasurementParams) error
	GetMeasurementsByID(ctx context.Context, sporttiID string) ([]ArchMeasurementResponse, error)
	GetMeasurementByMeasurementID(ctx context.Context, measurementID int32) (*ArchMeasurementResponse, error)
	DeleteMeasurementByMeasurementID(ctx context.Context, measurementID int32) (string, error)
}

type DataStore

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

func (*DataStore) DeleteMeasurementByMeasurementID added in v1.3.6

func (s *DataStore) DeleteMeasurementByMeasurementID(ctx context.Context, measurementID int32) (string, error)

func (*DataStore) GetAthleteByID added in v1.3.6

func (s *DataStore) GetAthleteByID(ctx context.Context, sporttiID string) (*ArchAthleteResponse, error)

func (*DataStore) GetDataBySporttiID

func (s *DataStore) GetDataBySporttiID(ctx context.Context, sporttiID string) (*ArchDataResponse, error)

func (*DataStore) GetMeasurementByMeasurementID added in v1.3.6

func (s *DataStore) GetMeasurementByMeasurementID(ctx context.Context, measurementID int32) (*ArchMeasurementResponse, error)

func (*DataStore) GetMeasurementsByID added in v1.3.6

func (s *DataStore) GetMeasurementsByID(ctx context.Context, sporttiID string) ([]ArchMeasurementResponse, error)

func (*DataStore) GetRaceReport

func (s *DataStore) GetRaceReport(ctx context.Context, sporttiID string, sessionID int32) (string, error)

func (*DataStore) GetRaceReportSessions

func (s *DataStore) GetRaceReportSessions(ctx context.Context, sporttiID string) ([]int32, error)

func (*DataStore) UpsertAthleteOnly added in v1.3.6

func (s *DataStore) UpsertAthleteOnly(ctx context.Context, athlete archsqlc.UpsertAthleteParams) error

func (*DataStore) UpsertData

func (s *DataStore) UpsertData(ctx context.Context, payload ArchDataPayload) error

func (*DataStore) UpsertMeasurements added in v1.3.6

func (s *DataStore) UpsertMeasurements(ctx context.Context, sporttiID string, measurements []archsqlc.UpsertMeasurementParams) error

func (*DataStore) UpsertRaceReport

func (s *DataStore) UpsertRaceReport(ctx context.Context, sporttiID string, sessionID int32, raceReport string) error

UpsertRaceReport stores one report row per (sportti_id, session_id). The report table has no unique constraint on that pair, so the upsert is an UPDATE followed by an INSERT when no row was updated, inside one transaction.

type Users

type Users interface {
	DeleteUserBySporttiID(ctx context.Context, sporttiID string) (string, error)
}

Interfaces

type UsersStore

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

func (*UsersStore) DeleteUserBySporttiID

func (s *UsersStore) DeleteUserBySporttiID(ctx context.Context, sporttiID string) (string, error)

Jump to

Keyboard shortcuts

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