trackmsgdb

package
v0.0.0-...-4109721 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package trackmsgdb contains tracking message related CRUD functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store manages the set of APIs for track messages database access.

func NewStore

func NewStore(logger *slog.Logger, db *sqlx.DB) *Store

NewStore constructs the api for data access.

func (*Store) Create

func (s *Store) Create(ctx context.Context, tmDB TrackMsgDB) error

Create creates a track message to the database.

func (*Store) RetrieveByMsgID

func (s *Store) RetrieveByMsgID(ctx context.Context, tmID string) (TrackMsgDB, error)

RetrieveByMsgID retrives a track message from the database.

func (*Store) Update

func (s *Store) Update(ctx context.Context, tmDB TrackMsgDB) error

Update updates a track message to the database.

type TrackMsgDB

type TrackMsgDB struct {
	ID          string    `db:"message_id"`
	DataType    string    `db:"data_type"`
	StatusCode  int       `db:"status_code"`
	DateCreated time.Time `db:"date_created"`
	DateUpdated time.Time `db:"date_updated"`
}

Jump to

Keyboard shortcuts

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