mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2024-11-22 22:26:46 +01:00
26 lines
379 B
Go
26 lines
379 B
Go
package store
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Status string
|
|
|
|
func (s *PostgresStore) CreateDispatchStatus(ctx context.Context, dispatch DispatchStatus) (uint, error) {
|
|
var (
|
|
id uint
|
|
)
|
|
|
|
if err := s.db.QueryRow(
|
|
ctx,
|
|
s.queries.CreateDispatchStatus,
|
|
dispatch.OtxId,
|
|
dispatch.Status,
|
|
dispatch.TrackingId,
|
|
).Scan(&id); err != nil {
|
|
return id, err
|
|
}
|
|
|
|
return id, nil
|
|
}
|