dutystations

package
v0.0.0-...-bc01b9c Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InsertTemplate is the query insert template for duty stations
	InsertTemplate string = `` /* 485-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type DutyStationMigration

type DutyStationMigration struct {
	Address       models.Address
	To            models.TransportationOffice
	Stations      StationData
	AddressID     uuid.UUID
	DutyStationID uuid.UUID
}

DutyStationMigration represents a duty station migration

type MigrationBuilder

type MigrationBuilder struct {
}

MigrationBuilder has methods that assist in building a DutyLocation INSERT migration

func NewMigrationBuilder

func NewMigrationBuilder() MigrationBuilder

NewMigrationBuilder returns a new instance of a MigrationBuilder

func (*MigrationBuilder) Build

func (b *MigrationBuilder) Build(appCtx appcontext.AppContext, dutyStationsFilePath string) ([]DutyStationMigration, error)

Build builds a migration for loading duty stations

func (MigrationBuilder) ParseStations

func (b MigrationBuilder) ParseStations(filename string) ([]StationData, error)

ParseStations parses a spreadsheet of duty stations into DutyStationRow structs

type StationData

type StationData struct {
	Unit string
	Name string
	Zip  string
}

StationData represents Duty Station data

Jump to

Keyboard shortcuts

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