services

package
v0.0.0-...-0751cc3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 19 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 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.AdminUserUpdatePayload) (*models.AdminUser, *validate.Errors, error)
}

AdminUserUpdater is the exported interface for creating an admin user

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 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 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 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 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 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 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
}

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 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 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
	RequestedMoveDate       *string
	Status                  []string
	Page                    *int64
	PerPage                 *int64
	Sort                    *string
	Order                   *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 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, eTag string) (*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)
}

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) (*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 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 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
	SendToOfficeUser(appCtx appcontext.AppContext, move *models.Move) error
	Submit(appCtx appcontext.AppContext, move *models.Move) 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)
}

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
	ExcludeExternalShipments bool       // indicates if external vendor shipments should be returned
}

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)
}

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 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 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.OfficeUserUpdatePayload) (*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 PPMEstimator

type PPMEstimator interface {
	EstimateIncentiveWithDefaultChecks(appCtx appcontext.AppContext, oldPPMShipment models.PPMShipment, newPPMShipment *models.PPMShipment) (*unit.Cents, *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 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 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 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, officeUserID uuid.UUID, 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) (*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, postalCodeType PostalCodeType) (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 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 ReweighCreator

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

ReweighCreator creates a reweigh

type ReweighUpdater

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

ReweighUpdater updates a reweigh

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 SITExtensionApprover

type SITExtensionApprover interface {
	ApproveSITExtension(appCtx appcontext.AppContext, shipmentID uuid.UUID, sitExtensionID uuid.UUID, approvedDays int, 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.SITExtension) (*models.SITExtension, error)
}

SITExtensionCreator creates a SIT extension

type SITExtensionCreatorAsTOO

type SITExtensionCreatorAsTOO interface {
	CreateSITExtensionAsTOO(appCtx appcontext.AppContext, sitExtension *models.SITExtension, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error)
}

SITExtensionCreatorAsTOO is the service object interface to create an approved SIT extension

type SITExtensionDenier

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

SITExtensionDenier is the service object interface for denying a SIT extension

type SITStatus

type SITStatus struct {
	ShipmentID         uuid.UUID
	Location           string
	TotalSITDaysUsed   int
	TotalDaysRemaining int
	DaysInSIT          int
	SITEntryDate       time.Time
	SITDepartureDate   *time.Time
	PastSITs           []models.MTOServiceItem
}

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

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
}

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 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, error)
}

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
	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 ShipmentUpdater

type ShipmentUpdater interface {
	UpdateShipment(appCtx appcontext.AppContext, shipment *models.MTOShipment, eTag 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 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 TransportationServiceProviderPerformanceFetcher

type TransportationServiceProviderPerformanceFetcher interface {
	FetchTransportationServiceProviderPerformance(appCtx appcontext.AppContext, filters []QueryFilter) (models.TransportationServiceProviderPerformance, error)
}

TransportationServiceProviderPerformanceFetcher is the exported interface for fetching a single transportation service provider performance

type TransportationServiceProviderPerformanceListFetcher

type TransportationServiceProviderPerformanceListFetcher interface {
	FetchTransportationServiceProviderPerformanceList(appCtx appcontext.AppContext, filters []QueryFilter, associations QueryAssociations, pagination Pagination, ordering QueryOrder) (models.TransportationServiceProviderPerformances, error)
	FetchTransportationServiceProviderPerformanceCount(appCtx appcontext.AppContext, filters []QueryFilter) (int, error)
}

TransportationServiceProviderPerformanceListFetcher is the exported interface for fetching a list of transportation service provider performances

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"`
	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)
}

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 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.UserUpdatePayload, 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 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 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