Documentation
¶
Index ¶
- Constants
- Variables
- func GetPgNow() pgtype.Timestamp
- type IllRepo
- type IllTransactionData
- type PgIllRepo
- func (r *PgIllRepo) CallArchiveIllTransactionByDateAndStatus(ctx common.ExtendedContext, toDate time.Time, statuses []string) error
- func (r *PgIllRepo) CreateWithPgBaseRepo(base *repo.PgBaseRepo[IllRepo]) IllRepo
- func (r *PgIllRepo) DeleteBranchSymbolByPeerId(ctx common.ExtendedContext, peerId string) error
- func (r *PgIllRepo) DeleteIllTransaction(ctx common.ExtendedContext, id string) error
- func (r *PgIllRepo) DeleteLocatedSupplierByIllTransaction(ctx common.ExtendedContext, illTransId string) error
- func (r *PgIllRepo) DeletePeer(ctx common.ExtendedContext, id string) error
- func (r *PgIllRepo) DeleteSymbolByPeerId(ctx common.ExtendedContext, peerId string) error
- func (r *PgIllRepo) GetBranchSymbolsByPeerId(ctx common.ExtendedContext, peerId string) ([]BranchSymbol, error)
- func (r *PgIllRepo) GetCachedPeersBySymbols(ctx common.ExtendedContext, lookupSymbols []string, ...) ([]Peer, string, error)
- func (r *PgIllRepo) GetExclusiveBranchSymbolsByPeerId(ctx common.ExtendedContext, peerId string) ([]BranchSymbol, error)
- func (r *PgIllRepo) GetIllTransactionById(ctx common.ExtendedContext, id string) (IllTransaction, error)
- func (r *PgIllRepo) GetIllTransactionByIdForUpdate(ctx common.ExtendedContext, id string) (IllTransaction, error)
- func (r *PgIllRepo) GetIllTransactionByRequesterId(ctx common.ExtendedContext, peerId pgtype.Text) ([]IllTransaction, error)
- func (r *PgIllRepo) GetIllTransactionByRequesterRequestId(ctx common.ExtendedContext, requesterRequestID pgtype.Text) (IllTransaction, error)
- func (r *PgIllRepo) GetIllTransactionByRequesterRequestIdForUpdate(ctx common.ExtendedContext, requesterRequestID pgtype.Text) (IllTransaction, error)
- func (r *PgIllRepo) GetLocatedSupplierByIdForUpdate(ctx common.ExtendedContext, id string) (LocatedSupplier, error)
- func (r *PgIllRepo) GetLocatedSupplierByIllTransactionAndSupplierForUpdate(ctx common.ExtendedContext, ...) (LocatedSupplier, error)
- func (r *PgIllRepo) GetLocatedSupplierByIllTransactionAndSymbol(ctx common.ExtendedContext, illTransId, symbol string) (LocatedSupplier, error)
- func (r *PgIllRepo) GetLocatedSupplierByIllTransactionAndSymbolForUpdate(ctx common.ExtendedContext, illTransId, symbol string) (LocatedSupplier, error)
- func (r *PgIllRepo) GetLocatedSupplierByPeerId(ctx common.ExtendedContext, peerId string) ([]LocatedSupplier, error)
- func (r *PgIllRepo) GetLocatedSuppliersByIllTransaction(ctx common.ExtendedContext, id string) ([]LocatedSupplier, int64, error)
- func (r *PgIllRepo) GetLocatedSuppliersByIllTransactionAndStatus(ctx common.ExtendedContext, ...) ([]LocatedSupplier, error)
- func (r *PgIllRepo) GetPeerById(ctx common.ExtendedContext, id string) (Peer, error)
- func (r *PgIllRepo) GetPeerBySymbol(ctx common.ExtendedContext, symbol string) (Peer, error)
- func (r *PgIllRepo) GetRequesterByIllTransactionId(ctx common.ExtendedContext, illTransactionId string) (Peer, error)
- func (r *PgIllRepo) GetSelectedSupplierForIllTransaction(ctx common.ExtendedContext, illTransId string) (LocatedSupplier, error)
- func (r *PgIllRepo) GetSymbolsByPeerId(ctx common.ExtendedContext, peerId string) ([]Symbol, error)
- func (r *PgIllRepo) ListIllTransactions(ctx common.ExtendedContext, params ListIllTransactionsParams, cql *string, ...) ([]IllTransaction, int64, error)
- func (r *PgIllRepo) ListPeers(ctx common.ExtendedContext, params ListPeersParams, cql *string) ([]Peer, int64, error)
- func (r *PgIllRepo) SaveBranchSymbol(ctx common.ExtendedContext, params SaveBranchSymbolParams) (BranchSymbol, error)
- func (r *PgIllRepo) SaveIllTransaction(ctx common.ExtendedContext, params SaveIllTransactionParams) (IllTransaction, error)
- func (r *PgIllRepo) SaveLocatedSupplier(ctx common.ExtendedContext, params SaveLocatedSupplierParams) (LocatedSupplier, error)
- func (r *PgIllRepo) SavePeer(ctx common.ExtendedContext, params SavePeerParams) (Peer, error)
- func (r *PgIllRepo) SaveSymbol(ctx common.ExtendedContext, params SaveSymbolParams) (Symbol, error)
- func (r *PgIllRepo) WithTxFunc(ctx common.ExtendedContext, fn func(IllRepo) error) error
- type RefreshPolicy
- type SupplierState
Constants ¶
View Source
const ( SupplierStateNew = "new" SupplierStateSelected = "selected" SupplierStateSkipped = "skipped" )
View Source
const RequestAction = iso18626.TypeAction("Request")
Variables ¶
View Source
var PEER_REFRESH_INTERVAL = utils.GetEnv("PEER_REFRESH_INTERVAL", "5m")
View Source
var PeerRefreshInterval = utils.Must(time.ParseDuration(PEER_REFRESH_INTERVAL))
View Source
var SupplierStateNewPg = pgtype.Text{ String: SupplierStateNew, Valid: true, }
View Source
var SupplierStateSelectedPg = pgtype.Text{ String: SupplierStateSelected, Valid: true, }
View Source
var SupplierStateSkippedPg = pgtype.Text{ String: SupplierStateSkipped, Valid: true, }
Functions ¶
Types ¶
type IllRepo ¶
type IllRepo interface {
repo.Transactional[IllRepo]
SaveIllTransaction(ctx common.ExtendedContext, params SaveIllTransactionParams) (IllTransaction, error)
GetIllTransactionByRequesterRequestId(ctx common.ExtendedContext, requesterRequestID pgtype.Text) (IllTransaction, error)
GetIllTransactionByRequesterRequestIdForUpdate(ctx common.ExtendedContext, requesterRequestID pgtype.Text) (IllTransaction, error)
GetIllTransactionById(ctx common.ExtendedContext, id string) (IllTransaction, error)
GetIllTransactionByIdForUpdate(ctx common.ExtendedContext, id string) (IllTransaction, error)
ListIllTransactions(ctx common.ExtendedContext, params ListIllTransactionsParams, cql *string, symbols []string) ([]IllTransaction, int64, error)
DeleteIllTransaction(ctx common.ExtendedContext, id string) error
SavePeer(ctx common.ExtendedContext, params SavePeerParams) (Peer, error)
GetPeerById(ctx common.ExtendedContext, id string) (Peer, error)
GetRequesterByIllTransactionId(ctx common.ExtendedContext, illTransactionId string) (Peer, error)
GetPeerBySymbol(ctx common.ExtendedContext, symbol string) (Peer, error)
ListPeers(ctx common.ExtendedContext, params ListPeersParams, cql *string) ([]Peer, int64, error)
DeletePeer(ctx common.ExtendedContext, id string) error
SaveLocatedSupplier(ctx common.ExtendedContext, params SaveLocatedSupplierParams) (LocatedSupplier, error)
GetLocatedSuppliersByIllTransactionAndStatus(ctx common.ExtendedContext, params GetLocatedSuppliersByIllTransactionAndStatusParams) ([]LocatedSupplier, error)
GetLocatedSuppliersByIllTransaction(ctx common.ExtendedContext, id string) ([]LocatedSupplier, int64, error)
GetLocatedSupplierByIllTransactionAndSupplierForUpdate(ctx common.ExtendedContext, params GetLocatedSupplierByIllTransactionAndSupplierForUpdateParams) (LocatedSupplier, error)
GetLocatedSupplierByIdForUpdate(ctx common.ExtendedContext, id string) (LocatedSupplier, error)
GetLocatedSupplierByIllTransactionAndSymbol(ctx common.ExtendedContext, id, symbol string) (LocatedSupplier, error)
GetLocatedSupplierByIllTransactionAndSymbolForUpdate(ctx common.ExtendedContext, id, symbol string) (LocatedSupplier, error)
GetSelectedSupplierForIllTransaction(ctx common.ExtendedContext, illTransId string) (LocatedSupplier, error)
DeleteLocatedSupplierByIllTransaction(ctx common.ExtendedContext, illTransId string) error
GetLocatedSupplierByPeerId(ctx common.ExtendedContext, peerId string) ([]LocatedSupplier, error)
GetIllTransactionByRequesterId(ctx common.ExtendedContext, peerId pgtype.Text) ([]IllTransaction, error)
GetCachedPeersBySymbols(ctx common.ExtendedContext, symbols []string, directoryAdapter adapter.DirectoryLookupAdapter) ([]Peer, string, error)
SaveSymbol(ctx common.ExtendedContext, params SaveSymbolParams) (Symbol, error)
DeleteSymbolByPeerId(ctx common.ExtendedContext, peerId string) error
GetSymbolsByPeerId(ctx common.ExtendedContext, peerId string) ([]Symbol, error)
SaveBranchSymbol(ctx common.ExtendedContext, params SaveBranchSymbolParams) (BranchSymbol, error)
GetBranchSymbolsByPeerId(ctx common.ExtendedContext, peerId string) ([]BranchSymbol, error)
GetExclusiveBranchSymbolsByPeerId(ctx common.ExtendedContext, peerId string) ([]BranchSymbol, error)
DeleteBranchSymbolByPeerId(ctx common.ExtendedContext, peerId string) error
CallArchiveIllTransactionByDateAndStatus(ctx common.ExtendedContext, toDate time.Time, statuses []string) error
}
func CreateIllRepo ¶
type IllTransactionData ¶
type IllTransactionData struct {
BibliographicInfo iso18626.BibliographicInfo `json:"bibliographicInfo"`
PublicationInfo *iso18626.PublicationInfo `json:"publicationInfo,omitempty"`
ServiceInfo *iso18626.ServiceInfo `json:"serviceInfo,omitempty"`
SupplierInfo []iso18626.SupplierInfo `json:"supplierInfo,omitempty"`
RequestedDeliveryInfo []iso18626.RequestedDeliveryInfo `json:"requestedDeliveryInfo,omitempty"`
RequestingAgencyInfo *iso18626.RequestingAgencyInfo `json:"requestingAgencyInfo,omitempty"`
PatronInfo *iso18626.PatronInfo `json:"patronInfo,omitempty"`
BillingInfo *iso18626.BillingInfo `json:"billingInfo,omitempty"`
DeliveryInfo *iso18626.DeliveryInfo `json:"deliveryInfo,omitempty"`
ReturnInfo *iso18626.ReturnInfo `json:"returnInfo,omitempty"`
}
type PgIllRepo ¶
type PgIllRepo struct {
repo.PgBaseRepo[IllRepo]
// contains filtered or unexported fields
}
func (*PgIllRepo) CallArchiveIllTransactionByDateAndStatus ¶
func (*PgIllRepo) CreateWithPgBaseRepo ¶
func (r *PgIllRepo) CreateWithPgBaseRepo(base *repo.PgBaseRepo[IllRepo]) IllRepo
DerivedRepo
func (*PgIllRepo) DeleteBranchSymbolByPeerId ¶
func (r *PgIllRepo) DeleteBranchSymbolByPeerId(ctx common.ExtendedContext, peerId string) error
func (*PgIllRepo) DeleteIllTransaction ¶
func (r *PgIllRepo) DeleteIllTransaction(ctx common.ExtendedContext, id string) error
func (*PgIllRepo) DeleteLocatedSupplierByIllTransaction ¶
func (r *PgIllRepo) DeleteLocatedSupplierByIllTransaction(ctx common.ExtendedContext, illTransId string) error
func (*PgIllRepo) DeletePeer ¶
func (r *PgIllRepo) DeletePeer(ctx common.ExtendedContext, id string) error
func (*PgIllRepo) DeleteSymbolByPeerId ¶
func (r *PgIllRepo) DeleteSymbolByPeerId(ctx common.ExtendedContext, peerId string) error
func (*PgIllRepo) GetBranchSymbolsByPeerId ¶
func (r *PgIllRepo) GetBranchSymbolsByPeerId(ctx common.ExtendedContext, peerId string) ([]BranchSymbol, error)
func (*PgIllRepo) GetCachedPeersBySymbols ¶
func (r *PgIllRepo) GetCachedPeersBySymbols(ctx common.ExtendedContext, lookupSymbols []string, directoryAdapter adapter.DirectoryLookupAdapter) ([]Peer, string, error)
func (*PgIllRepo) GetExclusiveBranchSymbolsByPeerId ¶
func (r *PgIllRepo) GetExclusiveBranchSymbolsByPeerId(ctx common.ExtendedContext, peerId string) ([]BranchSymbol, error)
func (*PgIllRepo) GetIllTransactionById ¶
func (r *PgIllRepo) GetIllTransactionById(ctx common.ExtendedContext, id string) (IllTransaction, error)
func (*PgIllRepo) GetIllTransactionByIdForUpdate ¶
func (r *PgIllRepo) GetIllTransactionByIdForUpdate(ctx common.ExtendedContext, id string) (IllTransaction, error)
func (*PgIllRepo) GetIllTransactionByRequesterId ¶
func (*PgIllRepo) GetIllTransactionByRequesterRequestId ¶
func (*PgIllRepo) GetIllTransactionByRequesterRequestIdForUpdate ¶
func (*PgIllRepo) GetLocatedSupplierByIdForUpdate ¶
func (r *PgIllRepo) GetLocatedSupplierByIdForUpdate(ctx common.ExtendedContext, id string) (LocatedSupplier, error)
func (*PgIllRepo) GetLocatedSupplierByIllTransactionAndSupplierForUpdate ¶
func (r *PgIllRepo) GetLocatedSupplierByIllTransactionAndSupplierForUpdate(ctx common.ExtendedContext, params GetLocatedSupplierByIllTransactionAndSupplierForUpdateParams) (LocatedSupplier, error)
func (*PgIllRepo) GetLocatedSupplierByIllTransactionAndSymbol ¶
func (r *PgIllRepo) GetLocatedSupplierByIllTransactionAndSymbol(ctx common.ExtendedContext, illTransId, symbol string) (LocatedSupplier, error)
func (*PgIllRepo) GetLocatedSupplierByIllTransactionAndSymbolForUpdate ¶
func (r *PgIllRepo) GetLocatedSupplierByIllTransactionAndSymbolForUpdate(ctx common.ExtendedContext, illTransId, symbol string) (LocatedSupplier, error)
func (*PgIllRepo) GetLocatedSupplierByPeerId ¶
func (r *PgIllRepo) GetLocatedSupplierByPeerId(ctx common.ExtendedContext, peerId string) ([]LocatedSupplier, error)
func (*PgIllRepo) GetLocatedSuppliersByIllTransaction ¶
func (*PgIllRepo) GetLocatedSuppliersByIllTransactionAndStatus ¶
func (r *PgIllRepo) GetLocatedSuppliersByIllTransactionAndStatus(ctx common.ExtendedContext, params GetLocatedSuppliersByIllTransactionAndStatusParams) ([]LocatedSupplier, error)
func (*PgIllRepo) GetPeerById ¶
func (r *PgIllRepo) GetPeerById(ctx common.ExtendedContext, id string) (Peer, error)
func (*PgIllRepo) GetPeerBySymbol ¶
func (r *PgIllRepo) GetPeerBySymbol(ctx common.ExtendedContext, symbol string) (Peer, error)
func (*PgIllRepo) GetRequesterByIllTransactionId ¶
func (r *PgIllRepo) GetRequesterByIllTransactionId(ctx common.ExtendedContext, illTransactionId string) (Peer, error)
func (*PgIllRepo) GetSelectedSupplierForIllTransaction ¶
func (r *PgIllRepo) GetSelectedSupplierForIllTransaction(ctx common.ExtendedContext, illTransId string) (LocatedSupplier, error)
func (*PgIllRepo) GetSymbolsByPeerId ¶
func (r *PgIllRepo) GetSymbolsByPeerId(ctx common.ExtendedContext, peerId string) ([]Symbol, error)
func (*PgIllRepo) ListIllTransactions ¶
func (*PgIllRepo) SaveBranchSymbol ¶
func (r *PgIllRepo) SaveBranchSymbol(ctx common.ExtendedContext, params SaveBranchSymbolParams) (BranchSymbol, error)
func (*PgIllRepo) SaveIllTransaction ¶
func (r *PgIllRepo) SaveIllTransaction(ctx common.ExtendedContext, params SaveIllTransactionParams) (IllTransaction, error)
func (*PgIllRepo) SaveLocatedSupplier ¶
func (r *PgIllRepo) SaveLocatedSupplier(ctx common.ExtendedContext, params SaveLocatedSupplierParams) (LocatedSupplier, error)
func (*PgIllRepo) SavePeer ¶
func (r *PgIllRepo) SavePeer(ctx common.ExtendedContext, params SavePeerParams) (Peer, error)
func (*PgIllRepo) SaveSymbol ¶
func (r *PgIllRepo) SaveSymbol(ctx common.ExtendedContext, params SaveSymbolParams) (Symbol, error)
func (*PgIllRepo) WithTxFunc ¶
delegate transaction handling to Base
type RefreshPolicy ¶
type RefreshPolicy string
const ( RefreshPolicyNever RefreshPolicy = "never" RefreshPolicyTransaction RefreshPolicy = "transaction" )
type SupplierState ¶
type SupplierState string
Click to show internal directories.
Click to hide internal directories.