services

package
v0.0.0-...-c407d37 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckValidationData

func CheckValidationData(checks []ValidationFunc) error

CheckValidationData runs through a list of ValidationFuncs to check for errors

func SetNoNNilOptionalInt32Field

func SetNoNNilOptionalInt32Field(newInt *int32, oldInt *int32) *int32

SetNoNNilOptionalInt32Field sets the correct new value for the updated int32 field.

func SetNoNilOptionalBoolField

func SetNoNilOptionalBoolField(newBool *bool, oldBool *bool) *bool

SetNoNilOptionalBoolField sets the correct new value for the updated bool field.

func SetNoNilOptionalCentField

func SetNoNilOptionalCentField(newCent *unit.Cents, oldCent *unit.Cents) *unit.Cents

SetNoNilOptionalCentField sets the correct new value for the updated cent field. Can be nil.

func SetNoNilOptionalPoundField

func SetNoNilOptionalPoundField(newWeight *unit.Pound, oldWeight *unit.Pound) *unit.Pound

SetNoNilOptionalPoundField sets the correct new value for the updated weight field.

func SetOptionalDateTimeField

func SetOptionalDateTimeField(newDate *time.Time, oldDate *time.Time) *time.Time

SetOptionalDateTimeField sets the correct new value for the updated date field. Can be nil.

func SetOptionalPoundField

func SetOptionalPoundField(newWeight *unit.Pound, oldWeight *unit.Pound) *unit.Pound

SetOptionalPoundField sets the correct new value for the updated weight field. Can be nil.

func SetOptionalStringField

func SetOptionalStringField(newString *string, oldString *string) *string

SetOptionalStringField sets the correct new value for the updated string field. Can be nil.

Types

type AOAPacketCreator

type AOAPacketCreator interface {
	VerifyAOAPacketInternal(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) error
	CreateAOAPacket(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (afero.File, error)
}

AOAPacketCreator creates an AOA packet for a PPM shipment

type AddressCreator

type AddressCreator interface {
	CreateAddress(appCtx appcontext.AppContext, address *models.Address) (*models.Address, error)
}

type AddressUpdater

type AddressUpdater interface {
	UpdateAddress(appCtx appcontext.AppContext, address *models.Address, eTag string) (*models.Address, error)
}

type AdminUserCreator

type AdminUserCreator interface {
	CreateAdminUser(appCtx appcontext.AppContext, user *models.AdminUser, organizationIDFilter []QueryFilter) (*models.AdminUser, *validate.Errors, error)
}

AdminUserCreator is the exported interface for creating an admin user

type AdminUserFetcher

type AdminUserFetcher interface {
	FetchAdminUser(appCtx appcontext.AppContext, filters []QueryFilter) (models.AdminUser, error)
}

AdminUserFetcher is the exported interface for fetching a single admin user

type AdminUserListFetcher

type AdminUserListFetcher interface {
	FetchAdminUserList(appCtx appcontext.AppContext, filters []QueryFilter, associations QueryAssociations, pagination Pagination, ordering QueryOrder) (models.AdminUsers, error)
	FetchAdminUserCount(appCtx appcontext.AppContext, filters []QueryFilter) (int, error)
}

AdminUserListFetcher is the exported interface for fetching multiple admin users

type AdminUserUpdater

type AdminUserUpdater interface {
	UpdateAdminUser(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.AdminUserUpdate) (*models.AdminUser, *validate.Errors, error)
}

AdminUserUpdater is the exported interface for creating an admin user

type ApprovedSITDurationUpdateCreator

type ApprovedSITDurationUpdateCreator interface {
	CreateApprovedSITDurationUpdate(appCtx appcontext.AppContext, sitDurationUpdate *models.SITDurationUpdate, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error)
}

ApprovedSITDurationUpdateCreator is the service object interface to create an approved SIT Duration Update

type BillableWeightInputs

type BillableWeightInputs struct {
	CalculatedBillableWeight *unit.Pound
	OriginalWeight           *unit.Pound
	ReweighWeight            *unit.Pound
	HadManualOverride        *bool
}

BillableWeightInputs is a type for capturing what should be returned when a shipments billable weight is calculated

type ClientCertCreator

type ClientCertCreator interface {
	CreateClientCert(appCtx appcontext.AppContext, email string, user *models.ClientCert) (*models.ClientCert, *validate.Errors, error)
}

ClientCertCreator is the exported interface for creating an client cert

type ClientCertFetcher

type ClientCertFetcher interface {
	FetchClientCert(appCtx appcontext.AppContext, filters []QueryFilter) (models.ClientCert, error)
}

ClientCertFetcher is the exported interface for fetching a single client cert

type ClientCertListFetcher

type ClientCertListFetcher interface {
	FetchClientCertList(appCtx appcontext.AppContext, filters []QueryFilter, associations QueryAssociations, pagination Pagination, ordering QueryOrder) (models.ClientCerts, error)
	FetchClientCertCount(appCtx appcontext.AppContext, filters []QueryFilter) (int, error)
}

ClientCertListFetcher is the exported interface for fetching multiple client certs

type ClientCertRemover

type ClientCertRemover interface {
	RemoveClientCert(appCtx appcontext.AppContext, id uuid.UUID) (*models.ClientCert, *validate.Errors, error)
}

ClientCertRemover is the exported interface for updating an client cert

type ClientCertUpdater

type ClientCertUpdater interface {
	UpdateClientCert(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.ClientCertificateUpdate) (*models.ClientCert, *validate.Errors, error)
}

ClientCertUpdater is the exported interface for updating an client cert

type CounselingServicesPricer

type CounselingServicesPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, mtoAvailableToPrimeAt time.Time) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

CounselingServicesPricer prices counseling services for a GHC move

type CurrentSIT

type CurrentSIT struct {
	ServiceItemID        uuid.UUID
	Location             string
	DaysInSIT            int
	SITEntryDate         time.Time
	SITDepartureDate     *time.Time
	SITAllowanceEndDate  time.Time
	SITCustomerContacted *time.Time
	SITRequestedDelivery *time.Time
}

type CustomerFetcher

type CustomerFetcher interface {
	FetchCustomer(appCtx appcontext.AppContext, customerID uuid.UUID) (*models.ServiceMember, error)
}

CustomerFetcher is the service object interface for FetchCustomer

type CustomerSupportRemarkDeleter

type CustomerSupportRemarkDeleter interface {
	DeleteCustomerSupportRemark(appCtx appcontext.AppContext, customerSupportRemarkID uuid.UUID) error
}

type CustomerSupportRemarkUpdater

type CustomerSupportRemarkUpdater interface {
	UpdateCustomerSupportRemark(appCtx appcontext.AppContext, params customersupportremarksop.UpdateCustomerSupportRemarkForMoveParams) (*models.CustomerSupportRemark, error)
}

type CustomerSupportRemarksCreator

type CustomerSupportRemarksCreator interface {
	CreateCustomerSupportRemark(appCtx appcontext.AppContext, customerSupportRemark *models.CustomerSupportRemark, moveCode string) (*models.CustomerSupportRemark, error)
}

type CustomerSupportRemarksFetcher

type CustomerSupportRemarksFetcher interface {
	ListCustomerSupportRemarks(appCtx appcontext.AppContext, moveCode string) (*models.CustomerSupportRemarks, error)
}

CustomerSupportRemarksFetcher is the exported interface for fetching office remarks for a move.

type CustomerUpdater

type CustomerUpdater interface {
	UpdateCustomer(appCtx appcontext.AppContext, eTag string, customer models.ServiceMember) (*models.ServiceMember, error)
}

CustomerUpdater is the service object interface for updating fields of a ServiceMember

type Dollar

type Dollar float64

Dollar represents a type for dollar monetary unit

type DomesticAdditionalDaysSITPricer

type DomesticAdditionalDaysSITPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, numberOfDaysInSIT int, disableWeightMinimum bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticAdditionalDaysSITPricer prices domestic origin or domestic additional days SIT for a GHC move

type DomesticCratingPricer

type DomesticCratingPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, billedCubicFeet unit.CubicFeet, servicesScheduleOrigin int) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticCratingPricer prices the domestic crating service for a GHC Move

type DomesticDestinationAdditionalDaysSITPricer

type DomesticDestinationAdditionalDaysSITPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, numberOfDaysInSIT int, disableWeightMinimum bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticDestinationAdditionalDaysSITPricer prices domestic destination additional days SIT for a GHC move

type DomesticDestinationFirstDaySITPricer

type DomesticDestinationFirstDaySITPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, disableWeightMinimum bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticDestinationFirstDaySITPricer prices domestic destination first day SIT for a GHC move

type DomesticDestinationPricer

type DomesticDestinationPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, isPPM bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticDestinationPricer prices the domestic destination price for a GHC Move

type DomesticDestinationSITDeliveryPricer

type DomesticDestinationSITDeliveryPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, sitSchedule int, zipDest string, zipSITDest string, distance unit.Miles) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticDestinationSITDeliveryPricer prices domestic destination SIT delivery for a GHC move

type DomesticDestinationSITFuelSurchargePricer

type DomesticDestinationSITFuelSurchargePricer interface {
	Price(appCtx appcontext.AppContext, actualPickupDate time.Time, distance unit.Miles, weight unit.Pound, fscWeightBasedDistanceMultiplier float64, eiaFuelPrice unit.Millicents, isPPM bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticDestinationSITFuelSurchargePricer prices domestic destination SIT fuel surcharge

type DomesticDestinationShuttlingPricer

type DomesticDestinationShuttlingPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleDest int) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticDestinationShuttlingPricer prices the domestic origin shuttling service for a GHC Move

type DomesticFirstDaySITPricer

type DomesticFirstDaySITPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, disableWeightMinimum bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticFirstDaySITPricer prices domestic origin or destination first day SIT for a GHC move

type DomesticLinehaulPricer

type DomesticLinehaulPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, distance unit.Miles, weight unit.Pound, serviceArea string, isPPM bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticLinehaulPricer prices domestic linehaul for a GHC move

type DomesticNTSPackPricer

type DomesticNTSPackPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleOrigin int, isPPM bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticNTSPackPricer prices the domestic packing for an NTS shipment of a GHC Move

type DomesticOriginAdditionalDaysSITPricer

type DomesticOriginAdditionalDaysSITPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, numberOfDaysInSIT int, disableWeightMinimum bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticOriginAdditionalDaysSITPricer prices domestic origin additional days SIT for a GHC move

type DomesticOriginFirstDaySITPricer

type DomesticOriginFirstDaySITPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, disableWeightMinimum bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticOriginFirstDaySITPricer prices domestic origin first day SIT for a GHC move

type DomesticOriginPricer

type DomesticOriginPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, isPPM bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticOriginPricer prices the domestic origin for a GHC Move

type DomesticOriginSITFuelSurchargePricer

type DomesticOriginSITFuelSurchargePricer interface {
	Price(
		appCtx appcontext.AppContext,
		actualPickupDate time.Time,
		distance unit.Miles,
		weight unit.Pound,
		fscWeightBasedDistanceMultiplier float64,
		eiaFuelPrice unit.Millicents,
		isPPM bool,
	) (
		unit.Cents,
		PricingDisplayParams,
		error,
	)
	ParamsPricer
}

DomesticOriginSITFuelSurchargePricer prices domestic origin SIT fuel surcharge

type DomesticOriginSITPickupPricer

type DomesticOriginSITPickupPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, sitSchedule int, zipSITOriginOriginal string, zipSITOriginActual string, distance unit.Miles) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticOriginSITPickupPricer prices domestic origin SIT pickup for a GHC move

type DomesticOriginShuttlingPricer

type DomesticOriginShuttlingPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleOrigin int) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticOriginShuttlingPricer prices the domestic origin shuttling service for a GHC Move

type DomesticPackPricer

type DomesticPackPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleOrigin int, isPPM bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticPackPricer prices the domestic packing for a GHC Move

type DomesticShorthaulPricer

type DomesticShorthaulPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, distance unit.Miles, weight unit.Pound, serviceArea string) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticShorthaulPricer prices the domestic shorthaul for a GHC Move

type DomesticUncratingPricer

type DomesticUncratingPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, billedCubicFeet unit.CubicFeet, servicesScheduleDest int) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticUncratingPricer prices the domestic uncrating service for a GHC Move

type DomesticUnpackPricer

type DomesticUnpackPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleDest int, isPPM bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

DomesticUnpackPricer prices the domestic unpacking for a GHC Move

type ElectronicOrderCategoryCountFetcher

type ElectronicOrderCategoryCountFetcher interface {
	FetchElectronicOrderCategoricalCounts(appCtx appcontext.AppContext, filters []QueryFilter, andFilters *[]QueryFilter) (map[interface{}]int, error)
}

ElectronicOrderCategoryCountFetcher is the exported interface for fetching counts of Electronic orders based on provided category QueryFilters.

type ElectronicOrderListFetcher

type ElectronicOrderListFetcher interface {
	FetchElectronicOrderList(appCtx appcontext.AppContext, filters []QueryFilter, associations QueryAssociations, pagination Pagination, ordering QueryOrder) (models.ElectronicOrders, error)
	FetchElectronicOrderCount(appCtx appcontext.AppContext, filters []QueryFilter) (int, error)
}

ElectronicOrderListFetcher is the exported interface for fetching multiple electronic orders

type EvaluationReportCreator

type EvaluationReportCreator interface {
	CreateEvaluationReport(appCtx appcontext.AppContext, evaluationReport *models.EvaluationReport, locator string) (*models.EvaluationReport, error)
}

type EvaluationReportDeleter

type EvaluationReportDeleter interface {
	DeleteEvaluationReport(appCtx appcontext.AppContext, reportID uuid.UUID) error
}

type EvaluationReportFetcher

type EvaluationReportFetcher interface {
	FetchEvaluationReports(appCtx appcontext.AppContext, reportType models.EvaluationReportType, moveID uuid.UUID, officeUserID uuid.UUID) (models.EvaluationReports, error)
	FetchEvaluationReportByID(appCtx appcontext.AppContext, reportID uuid.UUID, officeUserID uuid.UUID) (*models.EvaluationReport, error)
}

EvaluationReportFetcher is the service object interface for fetching all the evaluation reports for a move as a particular office user

type EvaluationReportUpdater

type EvaluationReportUpdater interface {
	UpdateEvaluationReport(appCtx appcontext.AppContext, evaluationReport *models.EvaluationReport, officeUserID uuid.UUID, eTag string) error
	SubmitEvaluationReport(appCtx appcontext.AppContext, evaluationReportID uuid.UUID, officeUserID uuid.UUID, eTag string) error
}

type ExcessWeightRiskManager

type ExcessWeightRiskManager interface {
	AcknowledgeExcessWeightRisk(appCtx appcontext.AppContext, moveID uuid.UUID, eTag string) (*models.Move, error)
	UpdateBillableWeightAsTOO(appCtx appcontext.AppContext, orderID uuid.UUID, weight *int, eTag string) (*models.Order, uuid.UUID, error)
	UpdateMaxBillableWeightAsTIO(appCtx appcontext.AppContext, orderID uuid.UUID, weight *int, remarks *string, eTag string) (*models.Order, uuid.UUID, error)
}

ExcessWeightRiskManager is the service object interface for updating the max billable weight for an Order's Entitlement

type FeatureFlag

type FeatureFlag struct {
	Entity    string
	Key       string
	Match     bool
	Variant   string
	Namespace string
}

Simplifed struct based on https://pkg.go.dev/go.flipt.io/flipt/rpc/flipt@v1.25.0/evaluation#VariantEvaluationResponse For boolean responses, Variant is the empty string and Match is the flag value

func (FeatureFlag) IsVariant

func (ff FeatureFlag) IsVariant(variant string) bool

type FeatureFlagFetcher

type FeatureFlagFetcher interface {
	GetBooleanFlagForUser(ctx context.Context, appCtx appcontext.AppContext, key string, flagContext map[string]string) (FeatureFlag, error)
	GetBooleanFlag(ctx context.Context, logger *zap.Logger, entityID string, key string, flagContext map[string]string) (FeatureFlag, error)
	GetVariantFlagForUser(ctx context.Context, appCtx appcontext.AppContext, key string, flagContext map[string]string) (FeatureFlag, error)
	GetVariantFlag(ctx context.Context, logger *zap.Logger, entityID string, key string, flagContext map[string]string) (FeatureFlag, error)
}

FeatureFlagFetcher is the exported interface for feature flags

This service is a thin wrapper around flipt, so it doesn't expose all of flipt's API. We can change/expand the API as we get experience.

type FetchMoveHistoryParams

type FetchMoveHistoryParams struct {
	Locator string
	Page    *int64
	PerPage *int64
}

type FetchPaymentRequestListParams

type FetchPaymentRequestListParams struct {
	Branch                  *string
	Locator                 *string
	DodID                   *string
	LastName                *string
	DestinationDutyLocation *string
	Status                  []string
	Page                    *int64
	PerPage                 *int64
	SubmittedAt             *time.Time
	Sort                    *string
	Order                   *string
	OriginDutyLocation      *string
	OrderType               *string
}

FetchPaymentRequestListParams is a public struct that's used to pass filter arguments to FetchPaymentRequestList

type Fetcher

type Fetcher interface {
	FetchRecord(appCtx appcontext.AppContext, model interface{}, filters []QueryFilter) error
}

Fetcher is the exported interface for fetching a record

type FileInfo

type FileInfo struct {
	*models.UserUpload
	OriginalUploadStream io.ReadCloser
	PDFStream            io.ReadCloser
}

FileInfo is a struct that holds information about a file that we'll be converting to a PDF. It's helpful to have this as a single argument for both the work we need to do and for writing better error messages & logs.

func NewFileInfo

func NewFileInfo(userUpload *models.UserUpload, stream io.ReadCloser) *FileInfo

NewFileInfo creates a new FileInfo struct.

type FormCreator

type FormCreator interface {
	CreateForm(template FormTemplate) (afero.File, error)
}

FormCreator is the service object interface for CreateForm

type FormTemplate

type FormTemplate struct {
	Buffer       *bytes.Reader
	FieldsLayout map[string]paperworkforms.FieldPos
	FormType
	FileName string
	Data     interface{}
}

FormTemplate are the struct fields defined to call CreateForm service object

type FormType

type FormType int

FormType defined as integer

const (
	GBL FormType = iota
	SSW FormType = iota
)

Form Types for CreateForm

func (FormType) String

func (ft FormType) String() string

String returns the string value of the Form Type

type FormattedMovingExpenses

type FormattedMovingExpenses struct {
	ContractedExpenseMemberPaid string
	ContractedExpenseGTCCPaid   string
	RentalEquipmentMemberPaid   string
	RentalEquipmentGTCCPaid     string
	PackingMaterialsMemberPaid  string
	PackingMaterialsGTCCPaid    string
	WeighingFeesMemberPaid      string
	WeighingFeesGTCCPaid        string
	GasMemberPaid               string
	GasGTCCPaid                 string
	TollsMemberPaid             string
	TollsGTCCPaid               string
	OilMemberPaid               string
	OilGTCCPaid                 string
	OtherMemberPaid             string
	OtherGTCCPaid               string
	TotalMemberPaid             string
	TotalGTCCPaid               string
	TotalMemberPaidRepeated     string
	TotalGTCCPaidRepeated       string
	TotalPaidNonSIT             string
	TotalMemberPaidSIT          string
	TotalGTCCPaidSIT            string
	TotalPaidSIT                string
}

FormattedMovingExpenses is an object representing the service member's moving expenses formatted for the SSW

type FormattedOtherExpenses

type FormattedOtherExpenses struct {
	Descriptions string
	AmountsPaid  string
}

FormattedOtherExpenses is an object representing the other moving expenses formatted for the SSW

type FuelSurchargePricer

type FuelSurchargePricer interface {
	Price(appCtx appcontext.AppContext, actualPickupDate time.Time, distance unit.Miles, weight unit.Pound, fscWeightBasedDistanceMultiplier float64, eiaFuelPrice unit.Millicents, isPPM bool) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

FuelSurchargePricer prices the fuel surcharge price for a GHC Move

type GEXChannel

type GEXChannel string

GEXChannel type to define constants for valid GEX Channels

const (
	// GEXChannelInvoice is the URL query parameter that we use when sending EDI invoices to US Bank via GEX
	GEXChannelInvoice GEXChannel = "TRANSCOM-DPS-MILMOVE-CPS-IN-USBANK-RCOM"
	// GEXChannelDataWarehouse is the URL query parameter that we use when sending data to the IGC data warehouse
	GEXChannelDataWarehouse GEXChannel = "TRANSCOM-DPS-MILMOVE-GHG-IN-IGC-RCOM"
)

type GHCPaymentRequestInvoiceGenerator

type GHCPaymentRequestInvoiceGenerator interface {
	Generate(appCtx appcontext.AppContext, paymentRequest models.PaymentRequest, sendProductionInvoice bool) (ediinvoice.Invoice858C, error)
}

GHCPaymentRequestInvoiceGenerator is the exported interface for generating an invoice

type GexSender

type GexSender interface {
	SendToGex(channel GEXChannel, edi string, filename string) (resp *http.Response, err error)
}

GexSender is an interface for sending and receiving a request

type HiddenMove

type HiddenMove struct {
	MTOID  uuid.UUID
	Reason string
}

HiddenMove struct used to store the MTO ID and the reason that the move is being hidden.

type HiddenMoves

type HiddenMoves []HiddenMove

HiddenMoves is the slice of HiddenMove to return in the handler call

type ListFetcher

type ListFetcher interface {
	FetchRecordList(appCtx appcontext.AppContext, model interface{}, filters []QueryFilter, associations QueryAssociations, pagination Pagination, ordering QueryOrder) error
	FetchRecordCount(appCtx appcontext.AppContext, model interface{}, filters []QueryFilter) (int, error)
}

ListFetcher is the exported interface for fetching multiple records

type ListOrderParams

type ListOrderParams struct {
	Branch                  *string
	Locator                 *string
	DodID                   *string
	LastName                *string
	DestinationDutyLocation *string
	OriginDutyLocation      *string
	OriginGBLOC             *string
	SubmittedAt             *time.Time
	AppearedInTOOAt         *time.Time
	RequestedMoveDate       *string
	Status                  []string
	Page                    *int64
	PerPage                 *int64
	Sort                    *string
	Order                   *string
	NeedsPPMCloseout        *bool
	PPMType                 *string
	CloseoutInitiated       *time.Time
	CloseoutLocation        *string
	OrderType               *string
}

ListOrderParams is a public struct that's used to pass filter arguments to the ListOrders

type MTOAgentCreator

type MTOAgentCreator interface {
	CreateMTOAgentPrime(appCtx appcontext.AppContext, mtoAgent *models.MTOAgent) (*models.MTOAgent, error)
}

MTOAgentCreator is the service object interface for CreateMTOAgent

type MTOAgentUpdater

type MTOAgentUpdater interface {
	UpdateMTOAgentBasic(appCtx appcontext.AppContext, mtoAgent *models.MTOAgent, eTag string) (*models.MTOAgent, error)
	UpdateMTOAgentPrime(appCtx appcontext.AppContext, mtoAgent *models.MTOAgent, eTag string) (*models.MTOAgent, error)
}

MTOAgentUpdater is the service object interface for UpdateMTOAgent

type MTOServiceItemCreator

type MTOServiceItemCreator interface {
	CreateMTOServiceItem(appCtx appcontext.AppContext, serviceItem *models.MTOServiceItem) (*models.MTOServiceItems, *validate.Errors, error)
}

MTOServiceItemCreator is the exported interface for creating a mto service item

type MTOServiceItemFetcher

type MTOServiceItemFetcher interface {
	GetServiceItem(appCtx appcontext.AppContext, serviceItemID uuid.UUID) (*models.MTOServiceItem, error)
}

MTOServiceItemFetcher is the exported interface for fetching a mto service item

type MTOServiceItemUpdater

type MTOServiceItemUpdater interface {
	ApproveOrRejectServiceItem(appCtx appcontext.AppContext, mtoServiceItemID uuid.UUID, status models.MTOServiceItemStatus, rejectionReason *string, eTag string) (*models.MTOServiceItem, error)
	UpdateMTOServiceItem(appCtx appcontext.AppContext, serviceItem *models.MTOServiceItem, eTag string, validator string) (*models.MTOServiceItem, error)
	UpdateMTOServiceItemBasic(appCtx appcontext.AppContext, serviceItem *models.MTOServiceItem, eTag string) (*models.MTOServiceItem, error)
	UpdateMTOServiceItemPrime(appCtx appcontext.AppContext, serviceItem *models.MTOServiceItem, planner route.Planner, shipment models.MTOShipment, eTag string) (*models.MTOServiceItem, error)
	ConvertItemToCustomerExpense(appCtx appcontext.AppContext, shipment *models.MTOShipment, customerExpenseReason *string, convertToCustomerExpense bool) (*models.MTOServiceItem, error)
}

MTOServiceItemUpdater is the exported interface for updating an mto service item

type MTOShipmentAddressUpdater

type MTOShipmentAddressUpdater interface {
	UpdateMTOShipmentAddress(appCtx appcontext.AppContext, newAddress *models.Address, mtoShipmentID uuid.UUID, eTag string, mustBeAvailableToPrime bool) (*models.Address, error)
}

MTOShipmentAddressUpdater is the exported interface for updating an address on an MTO Shipment

type MTOShipmentCreator

type MTOShipmentCreator interface {
	CreateMTOShipment(appCtx appcontext.AppContext, MTOShipment *models.MTOShipment) (*models.MTOShipment, error)
}

MTOShipmentCreator is the exported interface for creating a shipment

type MTOShipmentFetcher

type MTOShipmentFetcher interface {
	ListMTOShipments(appCtx appcontext.AppContext, moveID uuid.UUID) ([]models.MTOShipment, error)
	GetShipment(appCtx appcontext.AppContext, shipmentID uuid.UUID, eagerAssociations ...string) (*models.MTOShipment, error)
	GetDiversionChain(appCtx appcontext.AppContext, shipmentID uuid.UUID) (*[]models.MTOShipment, error)
}

MTOShipmentFetcher is the service object interface for fetching all shipments of a move

type MTOShipmentStatusUpdater

type MTOShipmentStatusUpdater interface {
	UpdateMTOShipmentStatus(appCtx appcontext.AppContext, shipmentID uuid.UUID, status models.MTOShipmentStatus, rejectionReason *string, eTag string) (*models.MTOShipment, error)
}

MTOShipmentStatusUpdater is the exported interface for updating an MTO shipment status

type MTOShipmentUpdater

type MTOShipmentUpdater interface {
	MTOShipmentsMTOAvailableToPrime(appCtx appcontext.AppContext, mtoShipmentID uuid.UUID) (bool, error)
	UpdateMTOShipment(appCtx appcontext.AppContext, mtoShipment *models.MTOShipment, eTag string, api string) (*models.MTOShipment, error)
}

MTOShipmentUpdater is the service object interface for UpdateMTOShipment

type ManagementServicesPricer

type ManagementServicesPricer interface {
	Price(appCtx appcontext.AppContext, contractCode string, mtoAvailableToPrimeAt time.Time) (unit.Cents, PricingDisplayParams, error)
	ParamsPricer
}

ManagementServicesPricer prices management services for a GHC move

type MoveCloseoutOfficeUpdater

type MoveCloseoutOfficeUpdater interface {
	UpdateCloseoutOffice(appCtx appcontext.AppContext, moveLocator string, closeoutOfficeID uuid.UUID, eTag string) (*models.Move, error)
}

type MoveExcessWeightUploader

type MoveExcessWeightUploader interface {
	CreateExcessWeightUpload(
		appCtx appcontext.AppContext,
		moveID uuid.UUID,
		file io.ReadCloser,
		uploadFilename string,
		uploadType models.UploadType,
	) (*models.Move, error)
}

MoveExcessWeightUploader is the exported interface for uploading an excess weight document for a move

type MoveFetcher

type MoveFetcher interface {
	FetchMove(appCtx appcontext.AppContext, locator string, searchParams *MoveFetcherParams) (*models.Move, error)
}

MoveFetcher is the exported interface for fetching a move by locator

type MoveFetcherParams

type MoveFetcherParams struct {
	IncludeHidden bool // indicates if a hidden/disabled move can be returned
}

MoveFetcherParams is public struct that's used to pass filter arguments to MoveFetcher queries

type MoveFinancialReviewFlagSetter

type MoveFinancialReviewFlagSetter interface {
	SetFinancialReviewFlag(appCtx appcontext.AppContext, moveID uuid.UUID, eTag string, flagForReview bool, remarks *string) (*models.Move, error)
}

MoveFinancialReviewFlagSetter is the exported interface for flagging a move for financial review

type MoveHistoryFetcher

type MoveHistoryFetcher interface {
	FetchMoveHistory(appCtx appcontext.AppContext, params *FetchMoveHistoryParams) (*models.MoveHistory, int64, error)
}

MoveHistoryFetcher is the exported interface for fetching a move by locator

type MoveListFetcher

type MoveListFetcher interface {
	FetchMoveList(appCtx appcontext.AppContext, filters []QueryFilter, associations QueryAssociations, pagination Pagination, ordering QueryOrder) (models.Moves, error)
	FetchMoveCount(appCtx appcontext.AppContext, filters []QueryFilter) (int, error)
}

MoveListFetcher is the exported interface for fetching multiple moves

type MoveOrderUploadType

type MoveOrderUploadType int

Prime move order upload to PDF generation for download

const (
	MoveOrderUploadAll MoveOrderUploadType = iota
	MoveOrderUpload
	MoveOrderAmendmentUpload
)

type MoveRouter

type MoveRouter interface {
	Approve(appCtx appcontext.AppContext, move *models.Move) error
	ApproveOrRequestApproval(appCtx appcontext.AppContext, move models.Move) (*models.Move, error)
	Cancel(appCtx appcontext.AppContext, reason string, move *models.Move) error
	CompleteServiceCounseling(appCtx appcontext.AppContext, move *models.Move) error
	RouteAfterAmendingOrders(appCtx appcontext.AppContext, move *models.Move) error
	SendToOfficeUser(appCtx appcontext.AppContext, move *models.Move) error
	Submit(appCtx appcontext.AppContext, move *models.Move, newSignedCertification *models.SignedCertification) error
}

MoveRouter is the exported interface for routing moves at different stages

type MoveSearcher

type MoveSearcher interface {
	SearchMoves(appCtx appcontext.AppContext, params *SearchMovesParams) (models.Moves, int, error)
}

type MoveTaskOrderChecker

type MoveTaskOrderChecker interface {
	MTOAvailableToPrime(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID) (bool, error)
}

MoveTaskOrderChecker is the service object interface for checking if a MoveTaskOrder is in a certain state

type MoveTaskOrderCreator

type MoveTaskOrderCreator interface {
	CreateMoveTaskOrder(appCtx appcontext.AppContext, moveTaskOrder *models.Move) (*models.Move, *validate.Errors, error)
}

MoveTaskOrderCreator is the service object interface for CreateMoveTaskOrder

type MoveTaskOrderFetcher

type MoveTaskOrderFetcher interface {
	FetchMoveTaskOrder(appCtx appcontext.AppContext, searchParams *MoveTaskOrderFetcherParams) (*models.Move, error)
	ListAllMoveTaskOrders(appCtx appcontext.AppContext, searchParams *MoveTaskOrderFetcherParams) (models.Moves, error)
	ListPrimeMoveTaskOrders(appCtx appcontext.AppContext, searchParams *MoveTaskOrderFetcherParams) (models.Moves, error)
	ListNewPrimeMoveTaskOrders(appCtx appcontext.AppContext, searchParams *MoveTaskOrderFetcherParams) (models.Moves, int, error)
	GetMove(appCtx appcontext.AppContext, searchParams *MoveTaskOrderFetcherParams, eagerAssociations ...string) (*models.Move, error)
}

MoveTaskOrderFetcher is the service object interface for FetchMoveTaskOrder

type MoveTaskOrderFetcherParams

type MoveTaskOrderFetcherParams struct {
	IsAvailableToPrime       bool       // indicates if all MTOs returned must be Prime-available
	IncludeHidden            bool       // indicates if hidden/disabled MTOs should be included in the output
	Since                    *time.Time // if filled, only MTOs that have been updated after this timestamp will be returned
	MoveTaskOrderID          uuid.UUID  // ID of the move task order
	Locator                  string     // the locator is a unique string that identifies the move
	MoveCode                 *string    // moveCode that is passed in when searching through prime moves
	ID                       *string    // id of the move that is sent in when searching through prime moves
	ExcludeExternalShipments bool       // indicates if external vendor shipments should be returned
	Page                     *int64
	PerPage                  *int64
}

MoveTaskOrderFetcherParams is a public struct that's used to pass filter arguments to ListAllMoveTaskOrders, and FetchMoveTaskOrder queries

type MoveTaskOrderHider

type MoveTaskOrderHider interface {
	Hide(appCtx appcontext.AppContext) (HiddenMoves, error)
}

MoveTaskOrderHider is the service object interface for Hide

type MoveTaskOrderUpdater

type MoveTaskOrderUpdater interface {
	MakeAvailableToPrime(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string, includeServiceCodeMS bool, includeServiceCodeCS bool) (*models.Move, error)
	UpdatePostCounselingInfo(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string) (*models.Move, error)
	UpdateStatusServiceCounselingCompleted(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string) (*models.Move, error)
	UpdateReviewedBillableWeightsAt(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string) (*models.Move, error)
	UpdateTIORemarks(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string, remarks string) (*models.Move, error)
	ShowHide(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, show *bool) (*models.Move, error)
	UpdatePPMType(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID) (*models.Move, error)
}

MoveTaskOrderUpdater is the service object interface for updating fields of a MoveTaskOrder

type MoveWeights

type MoveWeights interface {
	CheckExcessWeight(appCtx appcontext.AppContext, moveID uuid.UUID, updatedShipment models.MTOShipment) (*models.Move, *validate.Errors, error)
	CheckAutoReweigh(appCtx appcontext.AppContext, moveID uuid.UUID, updatedShipment *models.MTOShipment) (models.MTOShipments, error)
}

MoveWeights is the exported interface for flagging a move with an excess weight risk

type MovingExpenseCreator

type MovingExpenseCreator interface {
	CreateMovingExpense(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.MovingExpense, error)
}

MovingExpenseCreator creates a MovingExpense that is associated with a PPMShipment

type MovingExpenseDeleter

type MovingExpenseDeleter interface {
	DeleteMovingExpense(appCtx appcontext.AppContext, ppmID uuid.UUID, movingExpenseID uuid.UUID) error
}

MovingExpenseDeleter deletes a MovingExpense

type MovingExpenseUpdater

type MovingExpenseUpdater interface {
	UpdateMovingExpense(appCtx appcontext.AppContext, movingExpense models.MovingExpense, eTag string) (*models.MovingExpense, error)
}

MovingExpenseUpdater updates a MovingExpense

type NewPagination

type NewPagination func(page *int64, perPage *int64) Pagination

NewPagination creates a new Pagination interface

type NewQueryAssociation

type NewQueryAssociation func(field string) QueryAssociation

NewQueryAssociation is a function type definition for building a QueryAssociation Should allow services to pass associated data values for querying into QueryAssociations

type NewQueryAssociations

type NewQueryAssociations func(associations []QueryAssociation) QueryAssociations

NewQueryAssociations is a function type definition for building a QueryAssociations Should allow services to pass in query associations

type NewQueryFilter

type NewQueryFilter func(column string, comparator string, value interface{}) QueryFilter

NewQueryFilter is a function type definition for building a QueryFilter Should allow handlers to parse query params into QueryFilters for services

type NewQueryOrder

type NewQueryOrder func(column *string, sortOrder *bool) QueryOrder

NewQueryOrder describes a function that creates a new QueryOrder object

type Obligation

type Obligation struct {
	Gcc   unit.Cents
	SIT   unit.Cents
	Miles unit.Miles
}

Obligation an object representing the obligations section on the shipment summary worksheet

type Obligations

type Obligations struct {
	MaxObligation              Obligation
	ActualObligation           Obligation
	NonWinningMaxObligation    Obligation
	NonWinningActualObligation Obligation
}

Obligations is an object representing the winning and non-winning Max Obligation and Actual Obligation sections of the shipment summary worksheet

type OfficeFetcher

type OfficeFetcher interface {
	FetchOffice(appCtx appcontext.AppContext, filters []QueryFilter) (models.TransportationOffice, error)
}

OfficeFetcher is the exported interface for fetching a single transportation office

type OfficeListFetcher

type OfficeListFetcher interface {
	FetchOfficeList(appCtx appcontext.AppContext, filters []QueryFilter, associations QueryAssociations, pagination Pagination, ordering QueryOrder) (models.TransportationOffices, error)
	FetchOfficeCount(appCtx appcontext.AppContext, filters []QueryFilter) (int, error)
}

OfficeListFetcher is the exported interface for fetching multiple transportation offices

type OfficeUserCreator

type OfficeUserCreator interface {
	CreateOfficeUser(appCtx appcontext.AppContext, user *models.OfficeUser, transportationIDFilter []QueryFilter) (*models.OfficeUser, *validate.Errors, error)
}

OfficeUserCreator is the exported interface for creating an office user

type OfficeUserFetcher

type OfficeUserFetcher interface {
	FetchOfficeUser(appCtx appcontext.AppContext, filters []QueryFilter) (models.OfficeUser, error)
}

OfficeUserFetcher is the exported interface for fetching a single office user

type OfficeUserFetcherPop

type OfficeUserFetcherPop interface {
	FetchOfficeUserByID(appCtx appcontext.AppContext, id uuid.UUID) (models.OfficeUser, error)
}

OfficeUserFetcherPop is the exported interface for fetching a single office user

type OfficeUserGblocFetcher

type OfficeUserGblocFetcher interface {
	FetchGblocForOfficeUser(appCtx appcontext.AppContext, id uuid.UUID) (string, error)
}

OfficeUserGblocFetcher is the exported interface for fetching the GBLOC of the currently signed in office user

type OfficeUserUpdater

type OfficeUserUpdater interface {
	UpdateOfficeUser(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.OfficeUserUpdate) (*models.OfficeUser, *validate.Errors, error)
}

OfficeUserUpdater is the exported interface for creating an office user

type OrderFetcher

type OrderFetcher interface {
	FetchOrder(appCtx appcontext.AppContext, orderID uuid.UUID) (*models.Order, error)
	ListOrders(appCtx appcontext.AppContext, officeUserID uuid.UUID, params *ListOrderParams) ([]models.Move, int, error)
}

OrderFetcher is the service object interface for FetchOrder

type OrderUpdater

type OrderUpdater interface {
	UploadAmendedOrdersAsCustomer(appCtx appcontext.AppContext, userID uuid.UUID, orderID uuid.UUID, file io.ReadCloser, filename string, storer storage.FileStorer) (models.Upload, string, *validate.Errors, error)
	UpdateOrderAsTOO(appCtx appcontext.AppContext, orderID uuid.UUID, payload ghcmessages.UpdateOrderPayload, eTag string) (*models.Order, uuid.UUID, error)
	UpdateOrderAsCounselor(appCtx appcontext.AppContext, orderID uuid.UUID, payload ghcmessages.CounselingUpdateOrderPayload, eTag string) (*models.Order, uuid.UUID, error)
	UpdateAllowanceAsTOO(appCtx appcontext.AppContext, orderID uuid.UUID, payload ghcmessages.UpdateAllowancePayload, eTag string) (*models.Order, uuid.UUID, error)
	UpdateAllowanceAsCounselor(appCtx appcontext.AppContext, orderID uuid.UUID, payload ghcmessages.CounselingUpdateAllowancePayload, eTag string) (*models.Order, uuid.UUID, error)
}

OrderUpdater is the service object interface for updating fields of an Order

type OrganizationFetcher

type OrganizationFetcher interface {
	FetchOrganization(appCtx appcontext.AppContext, filters []QueryFilter) (models.Organization, error)
}

OrganizationFetcher is the exported interface for fetching a single organization

type OrganizationListFetcher

type OrganizationListFetcher interface {
	FetchOrganizationList(appCtx appcontext.AppContext, filters []QueryFilter, associations QueryAssociations, pagination Pagination, ordering QueryOrder) (models.Organizations, error)
	FetchOrganizationCount(appCtx appcontext.AppContext, filters []QueryFilter) (int, error)
}

OrganizationListFetcher is the exported interface for fetching multiple organizations

type PDFMerger

type PDFMerger interface {
	MergePDFs(appCtx appcontext.AppContext, pdfsToMerge []io.ReadCloser) (io.ReadCloser, error)
}

PDFMerger merges PDFs

type PPMCloseoutFetcher

type PPMCloseoutFetcher interface {
	GetPPMCloseout(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.PPMCloseout, error)
	GetActualWeight(ppmShipment *models.PPMShipment) (unit.Pound, error)
}

PPMCloseoutFetcher fetches all of the necessary calculations needed for display when the SC is reviewing a closeout

type PPMDocumentFetcher

type PPMDocumentFetcher interface {
	GetPPMDocuments(appCtx appcontext.AppContext, mtoShipmentID uuid.UUID) (*models.PPMDocuments, error)
}

PPMDocumentFetcher fetches all documents associated with a PPM shipment

type PPMEstimator

type PPMEstimator interface {
	EstimateIncentiveWithDefaultChecks(appCtx appcontext.AppContext, oldPPMShipment models.PPMShipment, newPPMShipment *models.PPMShipment) (*unit.Cents, *unit.Cents, error)
	FinalIncentiveWithDefaultChecks(appCtx appcontext.AppContext, oldPPMShipment models.PPMShipment, newPPMShipment *models.PPMShipment) (*unit.Cents, error)
}

PPMEstimator estimates the cost of a PPM shipment

type PPMShipmentCreator

type PPMShipmentCreator interface {
	CreatePPMShipmentWithDefaultCheck(appCtx appcontext.AppContext, ppmshipment *models.PPMShipment) (*models.PPMShipment, error)
}

PPMShipmentCreator creates a PPM shipment

type PPMShipmentFetcher

type PPMShipmentFetcher interface {
	GetPPMShipment(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, eagerPreloadAssociations []string, postloadAssociations []string) (*models.PPMShipment, error)
	PostloadAssociations(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment, postloadAssociations []string) error
}

PPMShipmentFetcher fetches a PPM shipment

type PPMShipmentNewSubmitter

type PPMShipmentNewSubmitter interface {
	SubmitNewCustomerCloseOut(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, signedCertification models.SignedCertification) (*models.PPMShipment, error)
}

PPMShipmentNewSubmitter handles a new submission for a PPM shipment

type PPMShipmentReviewDocuments

type PPMShipmentReviewDocuments interface {
	SubmitReviewedDocuments(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.PPMShipment, error)
}

PPMShipmentReviewDocuments handles a new submission for a PPM shipment

type PPMShipmentRouter

type PPMShipmentRouter interface {
	SetToDraft(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error
	Submit(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error
	SendToCustomer(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error
	SubmitCloseOutDocumentation(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error
	SubmitReviewedDocuments(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error
}

PPMShipmentRouter routes a PPM shipment

type PPMShipmentUpdatedSubmitter

type PPMShipmentUpdatedSubmitter interface {
	SubmitUpdatedCustomerCloseOut(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, signedCertification models.SignedCertification, eTag string) (*models.PPMShipment, error)
}

PPMShipmentUpdatedSubmitter handles a submission for a PPM shipment that has been submitted before

type PPMShipmentUpdater

type PPMShipmentUpdater interface {
	UpdatePPMShipmentWithDefaultCheck(appCtx appcontext.AppContext, ppmshipment *models.PPMShipment, mtoShipmentID uuid.UUID) (*models.PPMShipment, error)
}

PPMShipmentUpdater updates a PPM shipment

type PWSViolationsFetcher

type PWSViolationsFetcher interface {
	GetPWSViolations(appCtx appcontext.AppContext) (*models.PWSViolations, error)
}

PWSViolationsFetcher is the exported interface for fetching office remarks for a move.

type Page1Values

type Page1Values struct {
	CUIBanner                       string
	ServiceMemberName               string
	MaxSITStorageEntitlement        string
	PreferredPhoneNumber            string
	PreferredEmail                  string
	DODId                           string
	ServiceBranch                   string
	RankGrade                       string
	IssuingBranchOrAgency           string
	OrdersIssueDate                 string
	OrdersTypeAndOrdersNumber       string
	AuthorizedOrigin                string
	AuthorizedDestination           string
	NewDutyAssignment               string
	WeightAllotment                 string
	WeightAllotmentProGear          string
	WeightAllotmentProgearSpouse    string
	TotalWeightAllotment            string
	POVAuthorized                   string
	ShipmentNumberAndTypes          string
	ShipmentPickUpDates             string
	ShipmentWeights                 string
	ShipmentCurrentShipmentStatuses string
	SITNumberAndTypes               string
	SITEntryDates                   string
	SITEndDates                     string
	SITDaysInStorage                string
	PreparationDate                 string
	MaxObligationGCC100             string
	TotalWeightAllotmentRepeat      string
	MaxObligationGCC95              string
	MaxObligationSIT                string
	MaxObligationGCCMaxAdvance      string
	PPMRemainingEntitlement         string
	ActualObligationGCC100          string
	ActualObligationGCC95           string
	ActualObligationAdvance         string
	ActualObligationSIT             string
	MileageTotal                    string
	MailingAddressW2                string
}

Page1Values is an object representing a Shipment Summary Worksheet

type Page2Values

type Page2Values struct {
	CUIBanner                   string
	PreparationDate             string
	TAC                         string
	SAC                         string
	ContractedExpenseMemberPaid string
	ContractedExpenseGTCCPaid   string
	RentalEquipmentMemberPaid   string
	RentalEquipmentGTCCPaid     string
	PackingMaterialsMemberPaid  string
	PackingMaterialsGTCCPaid    string
	WeighingFeesMemberPaid      string
	WeighingFeesGTCCPaid        string
	GasMemberPaid               string
	GasGTCCPaid                 string
	TollsMemberPaid             string
	TollsGTCCPaid               string
	OilMemberPaid               string
	OilGTCCPaid                 string
	OtherMemberPaid             string
	OtherGTCCPaid               string
	TotalMemberPaid             string
	TotalGTCCPaid               string
	TotalMemberPaidRepeated     string
	TotalGTCCPaidRepeated       string
	TotalPaidNonSIT             string
	TotalMemberPaidSIT          string
	TotalGTCCPaidSIT            string
	TotalPaidSIT                string
	ShipmentPickupDates         string
	TrustedAgentName            string
	TrustedAgentDate            string
	TrustedAgentEmail           string
	TrustedAgentPhone           string
	FormattedMovingExpenses
	ServiceMemberSignature string
	SignatureDate          string
	FormattedOtherExpenses
}

Page2Values is an object representing a Shipment Summary Worksheet

type Pagination

type Pagination interface {
	Page() int
	PerPage() int
	Offset() int
}

Pagination represents an interface for pagination

type ParamsPricer

type ParamsPricer interface {
	PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, PricingDisplayParams, error)
}

ParamsPricer is an interface that all param-aware pricers implement

type PaymentPacketCreator

type PaymentPacketCreator interface {
	Generate(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, addBookmarks bool, addWaterMarks bool) (io.ReadCloser, error)
	GenerateDefault(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (io.ReadCloser, error)
}

PaymentPacketCreator creates a payment packet for a PPM shipment

type PaymentRequestCreator

type PaymentRequestCreator interface {
	CreatePaymentRequestCheck(appCtx appcontext.AppContext, paymentRequest *models.PaymentRequest) (*models.PaymentRequest, error)
}

PaymentRequestCreator is the exported interface for creating a payment request

type PaymentRequestFetcher

type PaymentRequestFetcher interface {
	FetchPaymentRequest(appCtx appcontext.AppContext, paymentRequestID uuid.UUID) (models.PaymentRequest, error)
}

PaymentRequestFetcher is the exported interface for fetching a payment request

type PaymentRequestListFetcher

type PaymentRequestListFetcher interface {
	FetchPaymentRequestList(appCtx appcontext.AppContext, officeUserID uuid.UUID, params *FetchPaymentRequestListParams) (*models.PaymentRequests, int, error)
	FetchPaymentRequestListByMove(appCtx appcontext.AppContext, locator string) (*models.PaymentRequests, error)
}

PaymentRequestListFetcher is the exported interface for fetching a list of payment requests

type PaymentRequestRecalculator

type PaymentRequestRecalculator interface {
	RecalculatePaymentRequest(appCtx appcontext.AppContext, paymentRequestID uuid.UUID) (*models.PaymentRequest, error)
}

PaymentRequestRecalculator is the exported interface for recalculating a payment request

type PaymentRequestReviewedFetcher

type PaymentRequestReviewedFetcher interface {
	FetchReviewedPaymentRequest(appCtx appcontext.AppContext) (models.PaymentRequests, error)
}

PaymentRequestReviewedFetcher is the exported interface for fetching all payment requests in 'reviewed' status

type PaymentRequestReviewedProcessor

type PaymentRequestReviewedProcessor interface {
	ProcessReviewedPaymentRequest(appCtx appcontext.AppContext)
	ProcessAndLockReviewedPR(appCtx appcontext.AppContext, pr models.PaymentRequest) error
}

PaymentRequestReviewedProcessor is the exported interface for processing reviewed payment requests

type PaymentRequestShipmentRecalculator

type PaymentRequestShipmentRecalculator interface {
	ShipmentRecalculatePaymentRequest(appCtx appcontext.AppContext, shipmentID uuid.UUID) (*models.PaymentRequests, error)
}

PaymentRequestShipmentRecalculator is the exported interface for recalculating payment requests for a shipment

type PaymentRequestStatusUpdater

type PaymentRequestStatusUpdater interface {
	UpdatePaymentRequestStatus(appCtx appcontext.AppContext, paymentRequest *models.PaymentRequest, eTag string) (*models.PaymentRequest, error)
}

PaymentRequestStatusUpdater is the exported interface for updating the status of a payment request

type PaymentRequestUploadCreator

type PaymentRequestUploadCreator interface {
	CreateUpload(appCtx appcontext.AppContext, file io.ReadCloser, paymentRequestID uuid.UUID, userID uuid.UUID, filename string, isWeightTicket bool) (*models.Upload, error)
}

PaymentRequestUploadCreator is the exported interface for creating a payment request upload

type PaymentServiceItemStatusUpdater

type PaymentServiceItemStatusUpdater interface {
	UpdatePaymentServiceItemStatus(appCtx appcontext.AppContext, paymentServiceItemID uuid.UUID,
		status models.PaymentServiceItemStatus, rejectionReason *string, eTag string) (models.PaymentServiceItem, *validate.Errors, error)
}

PaymentServiceItemStatusUpdater is the exported interface for updating a payment service item

type PostalCodeType

type PostalCodeType string

PostalCodeType is initialized as a string type

const (
	Origin      PostalCodeType = "origin"
	Destination PostalCodeType = "destination"
)

PostalCodeTypes

type PostalCodeValidator

type PostalCodeValidator interface {
	ValidatePostalCode(appCtx appcontext.AppContext, postalCode string) (bool, error)
}

PostalCodeValidator is the service object interface for ValidatePostalCode

type PricingDisplayParam

type PricingDisplayParam struct {
	Key   models.ServiceItemParamName
	Value string
}

PricingDisplayParam represents a parameter (key/value pair) returned from a pricer

type PricingDisplayParams

type PricingDisplayParams []PricingDisplayParam

PricingDisplayParams represents a slice of pricing parameters

type PrimeDownloadMoveUploadPDFGenerator

type PrimeDownloadMoveUploadPDFGenerator interface {
	GenerateDownloadMoveUserUploadPDF(appCtx appcontext.AppContext, moveOrderUploadType MoveOrderUploadType, move models.Move, addBookmarks bool) (afero.File, error)
}

type ProgearWeightTicketCreator

type ProgearWeightTicketCreator interface {
	CreateProgearWeightTicket(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.ProgearWeightTicket, error)
}

ProgearWeightTickerCreator creates a ProgearWeightTicket that is associated with a PPMShipment

type ProgearWeightTicketDeleter

type ProgearWeightTicketDeleter interface {
	DeleteProgearWeightTicket(appCtx appcontext.AppContext, ppmID uuid.UUID, progearWeightTicketID uuid.UUID) error
}

ProgearWeightTicketDeleter deletes a ProgearWeightTicket

type ProgearWeightTicketUpdater

type ProgearWeightTicketUpdater interface {
	UpdateProgearWeightTicket(appCtx appcontext.AppContext, progearWeightTicket models.ProgearWeightTicket, eTag string) (*models.ProgearWeightTicket, error)
}

ProgearWeightTicketUpdater updates a ProgearWeightTicket

type QueryAssociation

type QueryAssociation interface {
	Field() string
}

QueryAssociation is an interface to allow passing association values into query interfaces

type QueryAssociations

type QueryAssociations interface {
	StringGetAssociations() []string
	Preload() bool
}

QueryAssociations is an interface to allow

type QueryFilter

type QueryFilter interface {
	Column() string
	Comparator() string
	Value() interface{}
}

QueryFilter is an interface to allow passing filter values into query interfaces Ex `FetchMany` takes a list of filters

type QueryOrder

type QueryOrder interface {
	Column() *string
	SortOrder() *bool
}

QueryOrder describes the "order by" clause in a sql query

type ReportViolationFetcher

type ReportViolationFetcher interface {
	FetchReportViolationsByReportID(appCtx appcontext.AppContext, reportID uuid.UUID) (models.ReportViolations, error)
}

type ReportViolationsCreator

type ReportViolationsCreator interface {
	AssociateReportViolations(appCtx appcontext.AppContext, reportViolations *models.ReportViolations, reportID uuid.UUID) error
}

type RequestedOfficeUserFetcher

type RequestedOfficeUserFetcher interface {
	FetchRequestedOfficeUser(appCtx appcontext.AppContext, filters []QueryFilter) (models.OfficeUser, error)
}

RequestedOfficeUserFetcher is the exported interface for fetching a single requested office user

type RequestedOfficeUserListFetcher

type RequestedOfficeUserListFetcher interface {
	FetchRequestedOfficeUsersList(appCtx appcontext.AppContext, filters []QueryFilter, associations QueryAssociations, pagination Pagination, ordering QueryOrder) (models.OfficeUsers, error)
	FetchRequestedOfficeUsersCount(appCtx appcontext.AppContext, filters []QueryFilter) (int, error)
}

RequestedOfficeUserListFetcher is the exported interface for fetching multiple requested office users

type RequestedOfficeUserUpdater

type RequestedOfficeUserUpdater interface {
	UpdateRequestedOfficeUser(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.RequestedOfficeUserUpdate) (*models.OfficeUser, *validate.Errors, error)
}

RequestedOfficeUserFetcher is the exported interface for updating a requested office user

type ReweighCreator

type ReweighCreator interface {
	CreateReweighCheck(appCtx appcontext.AppContext, reweigh *models.Reweigh) (*models.Reweigh, error)
}

ReweighCreator creates a reweigh

type ReweighFetcher

type ReweighFetcher interface {
	ListReweighsByShipmentIDs(appCtx appcontext.AppContext, shipmentIDs []uuid.UUID) (map[uuid.UUID]models.Reweigh, error)
}

ReweighFetcher allows us to fetch reweights. This is primarily used during the reweigh update of a diverted shipment

type ReweighUpdater

type ReweighUpdater interface {
	UpdateReweighCheck(appCtx appcontext.AppContext, reweigh *models.Reweigh, eTag string) (*models.Reweigh, error)
}

ReweighUpdater updates a reweigh

type RoleAssociater

type RoleAssociater interface {
	FetchRoles(appCtx appcontext.AppContext, userID uuid.UUID) (roles.Roles, error)
}

RoleAssociater is the service object interface for fetching roles for a user id

type SFTPClient

type SFTPClient interface {
	ReadDir(p string) ([]os.FileInfo, error)
	Open(path string) (SFTPFiler, error)
	Remove(path string) error
}

SFTPClient is the exported interface for an SFTP client created for reading from and SFTP connection

type SFTPFiler

type SFTPFiler interface {
	Close() error
	WriteTo(w io.Writer) (int64, error)
}

SFTPFiler is the exported interface for an SFTP client file

type SITAddressUpdateRequestCreator

type SITAddressUpdateRequestCreator interface {
	CreateSITAddressUpdateRequest(appCtx appcontext.AppContext, sitAddressUpdate *models.SITAddressUpdate) (*models.SITAddressUpdate, error)
}

SITAddressUpdateRequestCreator creates a SIT Address Update Request with a distance greater than 50 miles

type SITExtensionApprover

type SITExtensionApprover interface {
	ApproveSITExtension(appCtx appcontext.AppContext, shipmentID uuid.UUID, sitExtensionID uuid.UUID, approvedDays int, requestReason models.SITDurationUpdateRequestReason, officeRemarks *string, eTag string) (*models.MTOShipment, error)
}

SITExtensionApprover is the service object interface for approving a SIT extension

type SITExtensionCreator

type SITExtensionCreator interface {
	CreateSITExtension(appCtx appcontext.AppContext, sitExtension *models.SITDurationUpdate) (*models.SITDurationUpdate, error)
}

SITExtensionCreator creates a SIT extension

type SITExtensionDenier

type SITExtensionDenier interface {
	DenySITExtension(appCtx appcontext.AppContext, shipmentID uuid.UUID, sitExtensionID uuid.UUID, officeRemarks *string, convertToCustomerExpense *bool, eTag string) (*models.MTOShipment, error)
}

SITExtensionDenier is the service object interface for denying a SIT extension

type SITStatus

type SITStatus struct {
	ShipmentID               uuid.UUID
	TotalSITDaysUsed         int
	TotalDaysRemaining       int
	CalculatedTotalDaysInSIT int
	CurrentSIT               *CurrentSIT
	PastSITs                 []models.MTOServiceItem
}

SITStatus is the summary of the current SIT service item days in storage remaining balance and dates

type SSWMaxWeightEntitlement

type SSWMaxWeightEntitlement struct {
	Entitlement   unit.Pound
	ProGear       unit.Pound
	SpouseProGear unit.Pound
	TotalWeight   unit.Pound
}

SSWMaxWeightEntitlement weight allotment for the shipment summary worksheet.

type SSWPPMComputer

type SSWPPMComputer interface {
	FetchDataShipmentSummaryWorksheetFormData(appCtx appcontext.AppContext, _ *auth.Session, ppmShipmentID uuid.UUID) (*ShipmentSummaryFormData, error)
	ComputeObligations(_ appcontext.AppContext, _ ShipmentSummaryFormData, _ route.Planner) (Obligations, error)
	FormatValuesShipmentSummaryWorksheet(shipmentSummaryFormData ShipmentSummaryFormData) (Page1Values, Page2Values)
}

type SSWPPMGenerator

type SSWPPMGenerator interface {
	FillSSWPDFForm(Page1Values, Page2Values) (afero.File, *pdfcpu.PDFInfo, error)
}

type SearchMovesParams

type SearchMovesParams struct {
	Branch                *string
	Locator               *string
	DodID                 *string
	CustomerName          *string
	DestinationPostalCode *string
	OriginPostalCode      *string
	Status                []string
	ShipmentsCount        *int64
	Page                  int64
	PerPage               int64
	Sort                  *string
	Order                 *string
	PickupDate            *time.Time
	DeliveryDate          *time.Time
}

type ServiceItemPricer

type ServiceItemPricer interface {
	PriceServiceItem(appCtx appcontext.AppContext, item models.PaymentServiceItem) (unit.Cents, models.PaymentServiceItemParams, error)
}

ServiceItemPricer prices a generic payment service item for a GHC move

type ServiceRequestDocumentUploadCreator

type ServiceRequestDocumentUploadCreator interface {
	CreateUpload(appCtx appcontext.AppContext, file io.ReadCloser, mtoServiceItemID uuid.UUID, userID uuid.UUID, filename string) (*models.Upload, error)
}

serviceRequestDocumentUploadCreator is the exported interface for creating a mto service item request upload

type ShipmentAddressUpdateRequester

type ShipmentAddressUpdateRequester interface {
	RequestShipmentDeliveryAddressUpdate(appCtx appcontext.AppContext, shipmentID uuid.UUID, newAddress models.Address, contractorRemarks string, eTag string) (*models.ShipmentAddressUpdate, error)
	ReviewShipmentAddressChange(appCtx appcontext.AppContext, shipmentID uuid.UUID, tooApprovalStatus models.ShipmentAddressUpdateStatus, tooRemarks string) (*models.ShipmentAddressUpdate, error)
}

ShipmentAddressUpdateRequester Interface for the service object that creates an approved SIT Address Update

type ShipmentApprover

type ShipmentApprover interface {
	ApproveShipment(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error)
}

ShipmentApprover is the service object interface for approving a shipment

type ShipmentBillableWeightCalculator

type ShipmentBillableWeightCalculator interface {
	CalculateShipmentBillableWeight(shipment *models.MTOShipment) BillableWeightInputs
}

ShipmentBillableWeightCalculator is the service object interface for approving a shipment diversion

type ShipmentCancellationRequester

type ShipmentCancellationRequester interface {
	RequestShipmentCancellation(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error)
}

ShipmentCancellationRequester is the service object interface for approving a shipment diversion

type ShipmentCreator

type ShipmentCreator interface {
	CreateShipment(appCtx appcontext.AppContext, shipment *models.MTOShipment) (*models.MTOShipment, error)
}

ShipmentCreator creates a shipment, taking into account different shipment types and their needs.

type ShipmentDeleter

type ShipmentDeleter interface {
	DeleteShipment(appCtx appcontext.AppContext, shipmentID uuid.UUID) (uuid.UUID, error)
}

ShipmentDeleter is the service object interface for deleting a shipment

type ShipmentDiversionApprover

type ShipmentDiversionApprover interface {
	ApproveShipmentDiversion(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error)
}

ShipmentDiversionApprover is the service object interface for approving a shipment diversion

type ShipmentDiversionRequester

type ShipmentDiversionRequester interface {
	RequestShipmentDiversion(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error)
}

ShipmentDiversionRequester is the service object interface for approving a shipment diversion

type ShipmentPaymentSITBalance

type ShipmentPaymentSITBalance struct {
	ShipmentID              uuid.UUID
	TotalSITDaysAuthorized  int
	TotalSITDaysRemaining   int
	TotalSITEndDate         time.Time
	PendingSITDaysInvoiced  int
	PendingBilledStartDate  time.Time
	PendingBilledEndDate    time.Time
	PreviouslyBilledDays    *int
	PreviouslyBilledEndDate *time.Time
}

ShipmentPaymentSITBalance is a public struct that's used to return current SIT balances to the TIO for a payment request

type ShipmentRejecter

type ShipmentRejecter interface {
	RejectShipment(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string, reason *string) (*models.MTOShipment, error)
}

ShipmentRejecter is the service object interface for approving a shipment

type ShipmentReweighRequester

type ShipmentReweighRequester interface {
	RequestShipmentReweigh(appCtx appcontext.AppContext, shipmentID uuid.UUID, requestor models.ReweighRequester) (*models.Reweigh, error)
}

ShipmentReweighRequester is the service object interface for approving a shipment diversion

type ShipmentRouter

type ShipmentRouter interface {
	Submit(appCtx appcontext.AppContext, shipment *models.MTOShipment) error
	Approve(appCtx appcontext.AppContext, shipment *models.MTOShipment) error
	RequestCancellation(appCtx appcontext.AppContext, shipment *models.MTOShipment) error
	Cancel(appCtx appcontext.AppContext, shipment *models.MTOShipment) error
	Reject(appCtx appcontext.AppContext, shipment *models.MTOShipment, rejectionReason *string) error
	RequestDiversion(appCtx appcontext.AppContext, shipment *models.MTOShipment) error
	ApproveDiversion(appCtx appcontext.AppContext, shipment *models.MTOShipment) error
}

ShipmentRouter is used for setting the status on shipments at different stages

type ShipmentSITStatus

type ShipmentSITStatus interface {
	CalculateShipmentsSITStatuses(appCtx appcontext.AppContext, shipments []models.MTOShipment) map[string]SITStatus
	CalculateShipmentSITStatus(appCtx appcontext.AppContext, shipment models.MTOShipment) (*SITStatus, error)
	CalculateShipmentSITAllowance(appCtx appcontext.AppContext, shipment models.MTOShipment) (int, error)
}

ShipmentSITStatus is the interface for calculating SIT service item summary balances of shipments

type ShipmentSummaryFormData

type ShipmentSummaryFormData struct {
	ServiceMember            models.ServiceMember
	Order                    models.Order
	Move                     models.Move
	CurrentDutyLocation      models.DutyLocation
	NewDutyLocation          models.DutyLocation
	WeightAllotment          SSWMaxWeightEntitlement
	PPMShipment              models.PPMShipment
	PPMShipments             models.PPMShipments
	W2Address                *models.Address
	PreparationDate          time.Time
	Obligations              Obligations
	MovingExpenses           models.MovingExpenses
	MTOAgents                models.MTOAgents
	PPMRemainingEntitlement  unit.Pound
	SignedCertification      models.SignedCertification
	MaxSITStorageEntitlement int
}

ShipmentSummaryFormData is a container for the various objects required for the a Shipment Summary Worksheet

type ShipmentUpdater

type ShipmentUpdater interface {
	UpdateShipment(appCtx appcontext.AppContext, shipment *models.MTOShipment, eTag string, api string) (*models.MTOShipment, error)
}

ShipmentUpdater updates a shipment, taking into account different shipment types and their needs.

type ShipmentsPaymentSITBalance

type ShipmentsPaymentSITBalance interface {
	ListShipmentPaymentSITBalance(appCtx appcontext.AppContext, paymentRequestID uuid.UUID) ([]ShipmentPaymentSITBalance, error)
}

ShipmentsPaymentSITBalance is the exported interface for returning SIT balances for all shipments of a payment request

type SignedCertificationCreator

type SignedCertificationCreator interface {
	CreateSignedCertification(appCtx appcontext.AppContext, signedCertification models.SignedCertification) (*models.SignedCertification, error)
}

SignedCertificationCreator creates a signed certification

type SignedCertificationUpdater

type SignedCertificationUpdater interface {
	UpdateSignedCertification(appCtx appcontext.AppContext, signedCertification models.SignedCertification, eTag string) (*models.SignedCertification, error)
}

SignedCertificationUpdater updates a signed certification

type SitEntryDateUpdater

type SitEntryDateUpdater interface {
	UpdateSitEntryDate(appCtx appcontext.AppContext, sitEntryDateUpdate *models.SITEntryDateUpdate) (*models.MTOServiceItem, error)
}

SitEntryDateUpdater is the exported interface for updating a service item's SIT entry date

type SyncadaFileProcessor

type SyncadaFileProcessor interface {
	ProcessFile(appCtx appcontext.AppContext, syncadaPath string, text string) error
	EDIType() models.EDIType
}

SyncadaFileProcessor is the exported interface for processing EDI files from Syncada

type SyncadaSFTPReader

type SyncadaSFTPReader interface {
	FetchAndProcessSyncadaFiles(appCtx appcontext.AppContext, pickupPath string, lastRead time.Time, processor SyncadaFileProcessor) (time.Time, error)
}

SyncadaSFTPReader is the exported interface for reading files from an SFTP connection

type SyncadaSFTPSender

type SyncadaSFTPSender interface {
	SendToSyncadaViaSFTP(appCtx appcontext.AppContext, localDataReader io.Reader, syncadaFileName string) (int64, error)
}

SyncadaSFTPSender is the exported interface for sending an EDI to Syncada

type TableFromSliceCreator

type TableFromSliceCreator interface {
	CreateTableFromSlice(appCtx appcontext.AppContext, slice interface{}) error
}

TableFromSliceCreator creates and populates a table based on a model slice

type TransportationOfficesFetcher

type TransportationOfficesFetcher interface {
	GetTransportationOffices(appCtx appcontext.AppContext, search string) (*models.TransportationOffices, error)
	GetTransportationOffice(appCtx appcontext.AppContext, transportationOfficeID uuid.UUID, includeOnlyPPMCloseoutOffices bool) (*models.TransportationOffice, error)
}

type UploadCreator

type UploadCreator interface {
	CreateUpload(appCtx appcontext.AppContext, file io.ReadCloser, uploadFilename string, uploadType models.UploadType) (*models.Upload, error)
}

UploadCreator is the service object interface for CreateUpload

type UploadInformation

type UploadInformation struct {
	UploadID               uuid.UUID `db:"upload_id"`
	ContentType            string    `db:"content_type"`
	CreatedAt              time.Time `db:"created_at"`
	Filename               string
	Bytes                  int64
	MoveLocator            *string            `db:"locator"`
	MoveStatus             *models.MoveStatus `db:"status"`
	ServiceMemberID        *uuid.UUID         `db:"service_member_id"`
	ServiceMemberFirstName *string            `db:"service_member_first_name"`
	ServiceMemberLastName  *string            `db:"service_member_last_name"`
	ServiceMemberPhone     *string            `db:"service_member_telephone"`
	ServiceMemberEmail     *string            `db:"service_member_email"`
	OfficeUserID           *uuid.UUID         `db:"office_user_id"`
	OfficeUserFirstName    *string            `db:"office_user_first_name"`
	OfficeUserLastName     *string            `db:"office_user_last_name"`
	OfficeUserPhone        *string            `db:"office_user_telephone"`
	OfficeUserEmail        *string            `db:"office_user_email"`
}

UploadInformation contains information for uploads

type UploadInformationFetcher

type UploadInformationFetcher interface {
	FetchUploadInformation(appCtx appcontext.AppContext, uuid uuid.UUID) (UploadInformation, error)
	FetchUploadInformationForDeletion(appCtx appcontext.AppContext, uuid uuid.UUID, moveLocator string) (UploadInformation, error)
}

UploadInformationFetcher is the service object interface for FetchUploadInformation

type UserFetcher

type UserFetcher interface {
	FetchUser(appCtx appcontext.AppContext, filters []QueryFilter) (models.User, error)
}

UserFetcher is the service object interface for FetchUser

type UserPrivilegeAssociator

type UserPrivilegeAssociator interface {
	UpdateUserPrivileges(appCtx appcontext.AppContext, userID uuid.UUID, privileges []models.PrivilegeType) ([]models.UsersPrivileges, error)
}

UserPrivilegeAssociator is the service object interface for UpdateUserPrivileges

type UserRoleAssociator

type UserRoleAssociator interface {
	UpdateUserRoles(appCtx appcontext.AppContext, userID uuid.UUID, roles []roles.RoleType) ([]models.UsersRoles, error)
}

UserRoleAssociator is the service object interface for UpdateUserRoles

type UserSessionRevocation

type UserSessionRevocation interface {
	RevokeUserSession(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.UserUpdate, sessionManagers auth.AppSessionManagers) (*models.User, *validate.Errors, error)
}

UserSessionRevocation is the exported interface for revoking a user session

type UserUpdater

type UserUpdater interface {
	UpdateUser(appCtx appcontext.AppContext, id uuid.UUID, user *models.User) (*models.User, *validate.Errors, error)
}

UserUpdater is the service object interface for UpdateUser

type UserUploadToPDFConverter

type UserUploadToPDFConverter interface {
	ConvertUserUploadsToPDF(appCtx appcontext.AppContext, userUploads models.UserUploads) ([]*FileInfo, error)
}

UserUploadToPDFConverter converts user uploads to PDFs

type ValidationFunc

type ValidationFunc func() error

ValidationFunc is a type representing the signature for a function that validates a service/model

type WebhookSubscriptionCreator

type WebhookSubscriptionCreator interface {
	CreateWebhookSubscription(appCtx appcontext.AppContext, subscription *models.WebhookSubscription) (*models.WebhookSubscription, *validate.Errors, error)
}

WebhookSubscriptionCreator is the exported interface for creating an admin user

type WebhookSubscriptionFetcher

type WebhookSubscriptionFetcher interface {
	FetchWebhookSubscription(appCtx appcontext.AppContext, filters []QueryFilter) (models.WebhookSubscription, error)
}

WebhookSubscriptionFetcher is the service object interface for FetchWebhookSubscription

type WebhookSubscriptionUpdater

type WebhookSubscriptionUpdater interface {
	UpdateWebhookSubscription(appCtx appcontext.AppContext, webhooksubscription *models.WebhookSubscription, severity *int64, eTag *string) (*models.WebhookSubscription, error)
}

WebhookSubscriptionUpdater is the service object interface for UpdateWebhookSubscription

type WeightTicketCreator

type WeightTicketCreator interface {
	CreateWeightTicket(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.WeightTicket, error)
}

WeightTicketCreator creates a WeightTicket that is associated with a PPMShipment

type WeightTicketDeleter

type WeightTicketDeleter interface {
	DeleteWeightTicket(appCtx appcontext.AppContext, ppmID uuid.UUID, weightTicketID uuid.UUID) error
}

WeightTicketDeleter deletes a WeightTicket

type WeightTicketFetcher

type WeightTicketFetcher interface {
	GetWeightTicket(appCtx appcontext.AppContext, weightTicketID uuid.UUID) (*models.WeightTicket, error)
}

WeightTicketFetcher fetches a WeightTicket that is associated with a PPMShipment

type WeightTicketUpdater

type WeightTicketUpdater interface {
	UpdateWeightTicket(appCtx appcontext.AppContext, weightTicket models.WeightTicket, eTag string) (*models.WeightTicket, error)
}

WeightTicketUpdater updates a WeightTicket

Jump to

Keyboard shortcuts

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