contract

package
v0.1.1116 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 65 Imported by: 118

Documentation

Index

Constants

View Source
const (
	ExtImageJPEG = ".jpg"
	ExtImagePNG  = ".png"
	ExtVideoMP4  = ".mp4"
	ExtAudioM4A  = ".m4a"
)
View Source
const (
	CountKey                  ResultKey          = "total"
	UnionWithColl             UnionWithField     = "coll"
	UnionWithPipeline         UnionWithField     = "pipeline"
	MongoLookupFullDocument   MongoLookupTarget  = "fullDocument"
	MongoLookupDocumentKey    MongoLookupTarget  = "documentKey"
	MongoLookupOperationType  MongoLookupTarget  = "operationType"
	MongoOperationTypeInsert  MongoOperationType = "insert"
	MongoOperationTypeReplace MongoOperationType = "replace"
	TypeArray                 AtlasDataType      = "array"
	TypeBoolean               AtlasDataType      = "boolean"
	TypeDate                  AtlasDataType      = "date"
	TypeFacetDate             AtlasDataType      = "dateFacet"
	TypeNumber                AtlasDataType      = "number"
	TypeFacetNumber           AtlasDataType      = "numberFacet"
	TypeGeo                   AtlasDataType      = "geo"
	TypeDocument              AtlasDataType      = "document"
	TypeEmbeddedDoc           AtlasDataType      = "embeddedDocument"
	TypeObjectID              AtlasDataType      = "objectId"
	TypeString                AtlasDataType      = "string"
	TypeFacetString           AtlasDataType      = "stringFacet"
	TypeAutocomplete          AtlasDataType      = "autocomplete"
	TypeToken                 AtlasDataType      = "token"
	VerbElemMatch             MongoVerb          = "$elemMatch"
	VerbMatch                 MongoVerb          = "$match"
	VerbSkip                  MongoVerb          = "$skip"
	VerbLimit                 MongoVerb          = "$limit"
	VerbSort                  MongoVerb          = "$sort"
	VerbCount                 MongoVerb          = "$count"
	VerbSearch                MongoVerb          = "$search"
	VerbVectorSearch          MongoVerb          = "$vectorSearch"
	VerbUnionWith             MongoVerb          = "$unionWith"
	OpAnd                     BSONOperator       = "$and"
	OpOr                      BSONOperator       = "$or"
	OpNor                     BSONOperator       = "$nor"
	OpGT                      BSONOperator       = "$gt"
	OpGTE                     BSONOperator       = "$gte"
	OpLT                      BSONOperator       = "$lt"
	OpLTE                     BSONOperator       = "$lte"
	OpNE                      BSONOperator       = "$ne"
	OpIn                      BSONOperator       = "$in"
	OpNin                     BSONOperator       = "$nin"
	Ascending                 SortDirection      = 1
	Descending                SortDirection      = -1
	MatchAll                  MatchBehavior      = "$all"
	MatchIn                   MatchBehavior      = "$in"
	MatchEqual                MatchBehavior      = "$eq"
	FieldQueryVector          VectorSearchField  = "queryVector"
	FieldIndex                VectorSearchField  = "index"
	FieldPath                 VectorSearchField  = "path"
	FieldExact                VectorSearchField  = "exact"
	FieldNumCandidates        VectorSearchField  = "numCandidates"
	FieldLimit                VectorSearchField  = "limit"
	FieldFilter               VectorSearchField  = "filter"
)
View Source
const (
	SearchQueryKey   = "q"
	SearchPageKey    = "page"
	SearchPerPageKey = "per_page"
)
View Source
const (
	TMapBillCompanyKey                   = "Company"
	TMapBillInvoiceNumberKey             = "Invoice Number"
	TMapBillEstimateNumberKey            = "Offer Number"
	TMapBillInvoiceDateKey               = "Date"
	TMapBillDueDateKey                   = "Due Date"
	TMapBillBilledToKey                  = "For"
	TMapBillInvoiceKey                   = "Invoice"
	TMapBillEstimateKey                  = "Offer"
	TMapBillProductNameKey               = "Product Name"
	TMapBillItemKey                      = "Item"
	TMapBillAppliedTaxesKey              = "Applied Taxes"
	TMapBillQuantityKey                  = "Quantity"
	TMapBillQuantifierKey                = "Unit"
	TMapBillUnitPriceKey                 = "Unit Price"
	TMapBillSubtotalKey                  = "Sub Total"
	TMapBillTaxTotalKey                  = "Tax Total"
	TMapBillTotalKey                     = "Total"
	TMapBillTotalsKey                    = "Totals"
	TMapBillDetailsKey                   = "Details"
	TMapBillSalariesKey                  = "Salaries"
	TMapBillTransportationKey            = "Transportation"
	TMapBillSupplierInvoicesKey          = "Suppliers' invoices"
	TMapBillChargesCreditsKey            = "Charges and credits"
	TMapBillCreditedKey                  = "Credited"
	TMapBillSectionKey                   = "Section"
	TMapBillTaxNameKey                   = "Tax Name"
	TMapBillDepositKey                   = "Payment terms"
	TMapBillMomentKey                    = "Moment of payment"
	TMapBillStartKey                     = "At the start of the work"
	TMapBillEndKey                       = "At the end of the work"
	TMapBillPercentageKey                = "Percentage of total"
	TMapBillBillingMethodKey             = "Billing method"
	TMapBillFixedPriceKey                = "Fixed price billing"
	TMapBillHourlyKey                    = "Hourly and dynamic billing"
	TMapBillFixedExplainationKey         = "" /* 285-byte string literal not displayed */
	TMapBillHourlyExplainationKey        = "" /* 540-byte string literal not displayed */
	TMapBillCanceledKey                  = "Canceled"
	TMapBillAdministrationFeesKey        = "Administration Fees"
	TMapBillAdministrationFeesContentKey = "Each subtotal in this section has had the following rate applied:"
	TMapBillHourlyRateKey                = "Hourly Rate"
	TMapBillEmployeeKey                  = "Employee"
	TMapBillWeekKey                      = "Week"
	TMapBillSupplierKey                  = "Supplier"
	TMapBillAmountKey                    = "Amount"
	TMapBillHourQuantifierKey            = "Hour"
	TMapBillDayQuantifierKey             = "Day"
)
View Source
const (
	TMapPayrollPayrollKey                         = "Payroll"
	TMapPayrollPayrollDateKey                     = "Payroll Date"
	TMapPayrollCurrencyKey                        = "Currency"
	TMapPayrollForKey                             = "For"
	TMapPayrollGeneralDetailsKey                  = "General Details"
	TMapPayrollPayrollPeriodsKey                  = "Payroll Periods"
	TMapPayrollPayrollPeriodKey                   = "Payroll Period"
	TMapPayrollBankingWarningKey                  = "Some hours in this payroll have been banked in your hour bank."
	TMapPayrollProblemWarningKey                  = "Your employer misconfigured the deductions applied to your payroll."
	TMapPayrollGrossPayKey                        = "Gross Pay"
	TMapPayrollAmountCategoryKey                  = "Amount Category"
	TMapPayrollTotalKey                           = "Total"
	TMapPayrollWorkKey                            = "Work"
	TMapPayrollTransportationKey                  = "Transportation"
	TMapPayrollNetPayKey                          = "Net Pay"
	TMapPayrollDeductionsKey                      = "Deductions"
	TMapPayrollEmployerPayrollContributionsKey    = "Employer Payroll Contributions"
	TMapPayrollEmployerPayrollContributionNoteKey = "Your employer has made a payroll contribution totaling"
	TMapPayrollDeductionsAndContributionsKey      = "Deductions and Contributions"
	TMapPayrollDeductionsTotalAmountKey           = "Deductions Total Amount"
	TMapPayrollContributionsTotalAmountKey        = "Contributions Total Amount"
	TMapPayrollDeductionsDetailsKey               = "Deductions Details"
	TMapPayrollContributionsDetailsKey            = "Contributions Details"
	TMapPayrollNameKey                            = "Name"
	TMapPayrollIsSubContributionKey               = "Is a Sub-Contribution"
	TMapPayrollEmployerContributionsKey           = "Employer Contributions Total"
	TMapPayrollNoKey                              = "No"
	TMapPayrollYesKey                             = "Yes"
	TMapPayrollPayrollAmountKey                   = "Payroll Amount"
)
View Source
const (
	TMapAdjustmentAggregateNumberOfEmployeesKey                 = "Number Of Employees"
	TMapAdjustmentAggregateGenerationDateKey                    = "Generation Date"
	TMapAdjustmentAggregateIncludedPeriodsKey                   = "Included Periods"
	TMapAdjustmentAggregateTotalKey                             = TMapPayrollTotalKey
	TMapAdjustmentAggregateCurrencyKey                          = TMapPayrollCurrencyKey
	TMapAdjustmentAggregateGeneralDetailsKey                    = TMapPayrollGeneralDetailsKey
	TMapAdjustmentAggregateDeductionsTotalKey                   = TMapPayrollDeductionsTotalAmountKey
	TMapAdjustmentAggregateContributionsTotalKey                = TMapPayrollContributionsTotalAmountKey
	TMapAdjustmentAggregateTotalOfDeductionsAndContributionsKey = "Total of Deductions and Contributions"
	TMapAdjustmentAggregateDeductionsPerNameKey                 = "Deductions per Name"
	TMapAdjustmentAggregateNameKey                              = "Name"
	TMapAdjustmentAggregateContributionsPerNameKey              = "Contributions per Name"
	TMapAdjustmentAggregateDeductionsPerPeriodKey               = "Deductions per Period"
	TMapAdjustmentAggregateContributionsPerPeriodKey            = "Contributions per Period"
	TMapAdjustmentAggregateIsSubContributionKey                 = TMapPayrollIsSubContributionKey
	TMapAdjustmentAggregateReportKey                            = "Report"
	TMapAdjustmentAggregateAmountCategoryKey                    = TMapPayrollAmountCategoryKey
	TMapAdjustmentAggregatePeriodNumberKey                      = "Period Number"
	TMapAdjustmentAggregatePeriodKey                            = "Period"
	TMapAdjustmentAggregateAllDeductionsForAllPeriodsKey        = "All Deductions for All Periods"
	TMapAdjustmentAggregateAllContributionsForAllPeriodsKey     = "All Contributions for All Periods"
	TMapAdjustmentAggregateTotalAmountKey                       = "Total Amount"
	TMapAdjustmentAggregateTotalPerGroupKey                     = "Grouped Totals"
	TMapAdjustmentAggregateYesKey                               = TMapPayrollYesKey
	TMapAdjustmentAggregateNoKey                                = TMapPayrollNoKey
)
View Source
const (
	WebSocketSessionDefaultIngressBufSize = 10
	WebSocketSessionDefaultEgressBufSize  = 10
	WebSocketSessionDefaultPongWait       = 10 * time.Second
	WebSocketSessionDefaultShutdownWait   = 2 * time.Second
	WebSocketSessionDefaultPingPeriod     = 0
)
View Source
const DefaultIndent = "  "
View Source
const (
	IDKey = "id"
)
View Source
const (
	SessionTokenKey = "session_token"
)
View Source
const (
	StripeTestPaymentMethodID = "pm_card_visa"
)
View Source
const TMapAllRightsReservedKey = "All rights reserved. This document layout is proprietary and protected by copyright."

Variables

View Source
var (
	// AdjustmentTypeRate represents an adjustment computed as a percentage of gross pay.
	AdjustmentTypeRate = adjustmentType("rate")
	// AdjustmentTypePerPeriod represents an adjustment applied once per period.
	AdjustmentTypePerPeriod = adjustmentType("perperiod")
	// AdjustmentTypePerHour represents an adjustment computed from an hourly amount.
	AdjustmentTypePerHour = adjustmentType("perhour")
)
View Source
var (
	ReembedNamespace             = claimRunNamespace("reembed")
	StatsPopNamespace            = claimRunNamespace("statspop")
	AbsorbLoadNamespace          = claimRunNamespace("absorbload")
	UpdateItemQuantityNamespace  = claimRunNamespace("updateitemquantity")
	PSPWebhookSyncNamespace      = claimRunNamespace("pspwebhooksync")
	ReactNamespace               = claimRunNamespace("react")
	SyncChatRoomNamespace        = claimRunNamespace("syncchatroom")
	EnsureMembershipNamespace    = claimRunNamespace("ensuremembership")
	ChatRoomSeenNamespace        = claimRunNamespace("chatroomseen")
	PmtPublicSessionPayNamespace = claimRunNamespace("pmtpublicsessionpay")
)
View Source
var (
	BillFixed   = billType("fixed")
	BillDynamic = billType("dynamic")
)
View Source
var (
	BucketLocations = bucket(ColStorageLocations)
	BucketJobs      = bucket(ColStorageJobs)
	BucketCalls     = bucket(ColStorageCalls)
	BucketReports   = bucket(ColStorageReports)
	BucketTickets   = bucket(ColStorageTickets)
	BucketContacts  = bucket(ColStorageContacts)
	BucketUsers     = bucket(ColStorageUsers)
	BucketChat      = bucket(ColStorageChat)
	BucketQR        = bucket(ColStorageQR)
	BucketMemos     = bucket(ColStorageMemos)
)
View Source
var (
	ChargeItem      = chargeType("item")
	ChargeEquipment = chargeType("equipment")
)
View Source
var (
	ColAuthorizationEntities           = col("entities")
	ColAuthorizationDelegations        = col("delegations")
	ColBillableBills                   = col("bills")
	ColBillableItems                   = col("items")
	ColBillableTaxes                   = col("taxes")
	ColBillableCharges                 = col("charges")
	ColBillableWarehouses              = col("warehouses")
	ColBillableLaborRates              = col("labor", "rates")
	ColBillableEquipments              = col("equipments")
	ColBillableQuantifiers             = col("quantifiers")
	ColBillableMeterReadings           = col("meter", "readings")
	ColBillableVendorInvoices          = col("vendor", "invoices")
	ColBillableFolders                 = col("billable", "folders")
	ColBillableTmpBillNumbers          = col("tmp", "bill", "numbers")
	ColChatChats                       = col("chats")
	ColChatChatRooms                   = col("chat", "rooms")
	ColChatChatRoomMembers             = col("chat", "room", "members")
	ColConnectionsConnections          = col("connections")
	ColCallsEvents                     = col("events")
	ColContactsContacts                = col("contacts")
	ColContactsSignals                 = col("signals")
	ColFeedFeedFavorites               = col("feed", "favorites")
	ColFeedFeedPosts                   = col("feed", "posts")
	ColFeedFeedSessions                = col("feed", "sessions")
	ColFeedFeedInterests               = col("feed", "interests")
	ColFeedFeedReactions               = col("feed", "reactions")
	ColFeedFeedViews                   = col("feed", "views")
	ColJobsJobs                        = col("jobs")
	ColJobsJobPrograms                 = col("job", "programs")
	ColJobsLocations                   = col("locations")
	ColMarketplaceMarketplaceFavorites = col("marketplace", "favorites")
	ColMarketplaceMarketplacePosts     = col("marketplace", "posts")
	ColMarketplaceMarketplaceSessions  = col("marketplace", "sessions")
	ColMemosMemos                      = col("memos")
	ColMemosMemoFolders                = col("memo", "folders")
	ColNotificationsDToks              = col("dtoks")
	ColPaymentsPayments                = col("payments")
	ColPaymentsPmtAccounts             = col("pmt", "accounts")
	ColPaymentsPmtBankAccounts         = col("pmt", "bank", "accounts")
	ColPaymentsPmtCards                = col("pmt", "cards")
	ColPaymentsPmtRefunds              = col("pmt", "refunds")
	ColPaymentsPmtCustomers            = col("pmt", "customers")
	ColPaymentsPmtPublicSessions       = col("pmt", "public", "sessions")
	ColPaymentsCreditLedger            = col("credit", "ledger")
	ColPayrollsPayables                = col("payables")
	ColPayrollsPayrolls                = col("payrolls")
	ColPayrollsPayConfigs              = col("pay", "configs")
	ColPayrollsHourBanks               = col("hour", "banks")
	ColPayrollsAdjustments             = col("adjustments")
	ColPayrollsAdjustmentFolders       = col("adjustment", "folders")
	ColPayrollsAdjustmentRecords       = col("adjustment", "records")
	ColPayrollsAdjustmentAggregates    = col("adjustment", "aggregates")
	ColPayrollsEmployeePayConfigs      = col("employee", "pay", "configs")
	ColPayrollsPayrollPrograms         = col("payroll", "programs")
	ColPreferencesClients              = col("clients")
	ColPreferencesCompanies            = col("companies")
	ColPreferencesEmployees            = col("employees")
	ColPreferencesLanguages            = col("languages")
	ColPreferencesPayments             = col("payments")
	ColPreferencesVisibilities         = col("visibilities")
	ColPreferencesNotif                = col("notif")
	ColPreferencesEmails               = col("emails")
	ColRoutesRoutes                    = col("routes")
	ColRoutesTags                      = col("tags")
	ColRoutesClientAvailabilities      = col("client", "availabilities")
	ColRoutesTracking                  = col("tracking")
	ColRoutesRouteTeams                = col("route", "teams")
	ColStorageCalls                    = col("calls")
	ColStorageChat                     = col("chat")
	ColStorageContacts                 = col("contacts")
	ColStorageJobs                     = col("jobs")
	ColStorageLocations                = col("locations")
	ColStorageReports                  = col("reports")
	ColStorageTickets                  = col("tickets")
	ColStorageUsers                    = col("users")
	ColStorageQR                       = col("qr")
	ColStorageMemos                    = col("memos")
	ColTimesheetsWeekSheets            = col("weeksheets")
	ColTimesheetsSummaries             = col("summaries")
	ColUsersUsers                      = col("users")
	ColUsersTmpPhones                  = col("tmp", "phones")
	ColUsersTmpUsernames               = col("tmp", "usernames")
	ColPrivacyDeletionRequests         = col("deletion", "requests")
	ColPrivacyAccountLocks             = col("account", "locks")
)
View Source
var (
	CreditLedgerPurchase = creditLedgerOperation("purchase")
	CreditLedgerConsume  = creditLedgerOperation("consume")
)
View Source
var (
	CreditLedgerSourceStripe     = creditLedgerSource("stripe")
	CreditLedgerSourceAppleIAP   = creditLedgerSource("apple_iap")
	CreditLedgerSourceAndroidIAP = creditLedgerSource("android_iap")
)
View Source
var (
	CreditPackage500   = creditPackage(500)
	CreditPackage1000  = creditPackage(1000)
	CreditPackage2500  = creditPackage(2500)
	CreditPackage5000  = creditPackage(5000)
	CreditPackage10000 = creditPackage(10000)
)
View Source
var (
	CreditOpRoutesRoutesOptimize           = creditOp(SvcRoutes, ColRoutesRoutes, "optimize")
	CreditOpProcessesProcessesSpeechToText = creditOp(SvcProcesses, SvcProcesses, "speech", "to", "text")
	CreditOpStorageUpload                  = creditOp(SvcStorage, "upload")
)
View Source
var (
	EmailTemplateWelcome                 = emailTemplateType("welcome")
	EmailTemplateSupport                 = emailTemplateType("support")
	EmailTemplateDeletion                = emailTemplateType("deletion")
	EmailTemplateForbidden               = emailTemplateType("forbidden")
	EmailTemplateWarning                 = emailTemplateType("warning")
	EmailTemplateSuspension              = emailTemplateType("suspension")
	EmailTemplateConnection              = emailTemplateType("connection")
	EmailTemplateCensor                  = emailTemplateType("censor")
	EmailTemplateLowCredits              = emailTemplateType("low_credits")
	EmailTemplateExternalPaymentReceipt  = emailTemplateType("external_payment_receipt")
	EmailTemplateExternalPaymentNotice   = emailTemplateType("external_payment_notice")
	EmailTemplateInternalPaymentReceipt  = emailTemplateType("internal_payment_receipt")
	EmailTemplateInternalPaymentNotice   = emailTemplateType("internal_payment_notice")
	EmailTemplateTransactionFeeReceipt   = emailTemplateType("transaction_fee_receipt")
	EmailTemplateInvalidTaxIDsWarning    = emailTemplateType("invalid_tax_ids_warning")
	EmailTemplateExternalDocumentPayment = emailTemplateType("external_document_payment")
	EmailTemplatePasswordReset           = emailTemplateType("password_reset")
)
View Source
var (
	StoreProviderApple  = storeProvider("apple")
	StoreProviderGoogle = storeProvider("google")
)
View Source
var (
	PurchaseKindProduct      = purchaseKind("product")
	PurchaseKindSubscription = purchaseKind("subscription")
)
View Source
var (
	LocationTypeScheduled  = locationType("scheduled")
	LocationTypePersistent = locationType("persistent")
)
View Source
var (
	LockReasonDeletionRequest = lockReason("deletion_request")
	LockReasonAdminBlock      = lockReason("admin_block")
)
View Source
var (
	PathSearch = NewPath("search")
	PathPull   = NewPath("pull")
)
View Source
var (
	PSPEventTypeAccountUpdated              = pspEventType(string(stripeApi.EventTypeAccountUpdated))
	PSPEventTypePaymentIntentPaymentFailed  = pspEventType(string(stripeApi.EventTypePaymentIntentPaymentFailed))
	PSPEventTypePaymentIntentProcessing     = pspEventType(string(stripeApi.EventTypePaymentIntentProcessing))
	PSPEventTypePaymentIntentRequiresAction = pspEventType(string(stripeApi.EventTypePaymentIntentRequiresAction))
	PSPEventTypePaymentIntentSucceeded      = pspEventType(string(stripeApi.EventTypePaymentIntentSucceeded))
	PSPEventTypePaymentIntentCanceled       = pspEventType(string(stripeApi.EventTypePaymentIntentCanceled))
	PSPEventTypeRefundUpdated               = pspEventType(string(stripeApi.EventTypeRefundUpdated))
	PSPEventTypeSetupIntentCanceled         = pspEventType(string(stripeApi.EventTypeSetupIntentCanceled))
	PSPEventTypeSetupIntentSucceeded        = pspEventType(string(stripeApi.EventTypeSetupIntentSucceeded))
	PSPEventTypeSetupIntentRequiresAction   = pspEventType(string(stripeApi.EventTypeSetupIntentRequiresAction))
	PSPEventTypeSetupIntentFailed           = pspEventType(string(stripeApi.EventTypeSetupIntentSetupFailed))
	PSPEventTypeBankAccountCreated          = pspEventType(string(stripeApi.EventTypeAccountExternalAccountCreated))
)
View Source
var (
	PSPExpiryStatusActive      = pspExpiryStatus("active")
	PSPExpiryStatusPending     = pspExpiryStatus("pending")
	PSPExpiryStatusExpired     = pspExpiryStatus("expired")
	PSPExpiryStatusExpiresSoon = pspExpiryStatus("expires_soon")
)
View Source
var (
	PSPActionableStatusFailed                = pspActionableStatus("failed")
	PSPActionableStatusRequiresPaymentMethod = pspActionableStatus("requires_payment_method")
	PSPActionableStatusRequiresConfirmation  = pspActionableStatus("requires_confirmation")
	PSPActionableStatusRequiresAction        = pspActionableStatus("requires_action")
	PSPActionableStatusProcessing            = pspActionableStatus("processing")
	PSPActionableStatusRequiresCapture       = pspActionableStatus("requires_capture")
	PSPActionableStatusCanceled              = pspActionableStatus("canceled")
	PSPActionableStatusSucceeded             = pspActionableStatus("succeeded")
)
View Source
var (
	PSPRefundReasonDuplicate           = pspRefundReason(string(stripeApi.RefundReasonDuplicate))
	PSPRefundReasonRequestedByCustomer = pspRefundReason(string(stripeApi.RefundReasonRequestedByCustomer))
)
View Source
var (
	PSPPaymentStatusPending = pspPaymentStatus("pending")
	PSPPaymentStatusPartial = pspPaymentStatus("partial")
	PSPPaymentStatusFull    = pspPaymentStatus("full")
)
View Source
var (
	PSPFeesPayerSender   = pspFeesPayer("sender")
	PSPFeesPayerReceiver = pspFeesPayer("receiver")
)
View Source
var (
	PaymentEntityTypeBill    = paymentEntityType("bill")
	PaymentEntityTypePayroll = paymentEntityType("payroll")
	PaymentEntityTypeCredit  = paymentEntityType("credit")
)
View Source
var (
	PSPBankAccountHolderTypeIndividual = pspBankAccountHolderType(string(stripeApi.BankAccountAccountHolderTypeIndividual))
	PSPBankAccountHolderTypeCompany    = pspBankAccountHolderType(string(stripeApi.BankAccountAccountHolderTypeCompany))
)
View Source
var (
	PaymentKindMain = paymentKind("main")
	PaymentKindFee  = paymentKind("fee")
)
View Source
var (
	PayTypePerHour = payType("perhour")
	PayTypeFixed   = payType("fixed")
)
View Source
var (
	PostTypeEmployment = postType("employment")
	PostTypeJob        = postType("job")
)
View Source
var (
	RecurrenceTypeDaily               = recurrenceType("daily")
	RecurrenceTypeWeekly              = recurrenceType("weekly")
	RecurrenceTypeMonthly             = recurrenceType("monthly")
	RecurrenceTypeYearly              = recurrenceType("yearly")
	RecurrenceEndTypeIndefinite       = recurrenceEndType("indefinite")
	RecurrenceEndTypeAfterOccurrences = recurrenceEndType("after_occurrences")
	RecurrenceEndTypeAfterDate        = recurrenceEndType("after_date")
)
View Source
var (
	ReportPayroll             = reportType("payroll")
	ReportBill                = reportType("bill")
	ReportAdjustmentAggregate = reportType("adjustmentaggregate")
)
View Source
var (
	Pending    = status("pending")
	Started    = status("started")
	Terminated = status("terminated")
)
View Source
var (
	StripeMetaBankAccountFromApp  = stripeMetadataKey("bank_account_from_app")
	StripeMetaWebhookSyncToken    = stripeMetadataKey("webhook_sync_token")
	StripeMetaTaxCalculationPSPID = stripeMetadataKey("tax_calculation_psp_id")
)
View Source
var (
	SvcSink          = svc("sink")
	SvcAuthorization = svc("authorization")
	SvcBillable      = svc("billable")
	SvcCalls         = svc("calls")
	SvcChat          = svc("chat")
	SvcConnections   = svc("connections")
	SvcContacts      = svc("contacts")
	SvcEmails        = svc("emails")
	SvcFeed          = svc("feed")
	SvcFilehub       = svc("filehub")
	SvcJobs          = svc("jobs")
	SvcMarketplace   = svc("marketplace")
	SvcMemos         = svc("memos")
	SvcNotifications = svc("notifications")
	SvcPayments      = svc("payments")
	SvcPayrolls      = svc("payrolls")
	SvcPreferences   = svc("preferences")
	SvcProcesses     = svc("processes")
	SvcReports       = svc("reports")
	SvcRoutes        = svc("routes")
	SvcSMS           = svc("sms")
	SvcStorage       = svc("storage")
	SvcTimesheets    = svc("timesheets")
	SvcUsers         = svc("users")
	SvcFulFillments  = svc("fulfillments")
	SvcPrivacy       = svc("privacy")
)
View Source
var (
	SysboxPathTemplates   = SysboxPathFn("src", "template", "*.html")
	SysboxPathQRWatermark = SysboxPathFn("src", "watermark", "white-head.png")
)
View Source
var (
	PunchTypeIn         = punchType("in")
	PunchTypeOut        = punchType("out")
	PunchTypeRideIn     = punchType("ride_in")
	PunchTypeRideOut    = punchType("ride_out")
	PunchStatusWorking  = punchStatus("working")
	PunchStatusPending  = punchStatus("pending")
	PunchStatusApproved = punchStatus("approved")
	PunchModeDefault    = punchMode("default")
	PunchModeReplace    = punchMode("replace")
	PunchModeDelete     = punchMode("delete")
	PunchModeWeekSheet  = punchMode("weeksheet")
)
View Source
var (
	DelegationKContacts   = delegationK(SvcContacts)
	DelegationKChat       = delegationK(SvcChat)
	DelegationKBillable   = delegationK(SvcBillable)
	DelegationKTimesheets = delegationK(SvcTimesheets)
	DelegationKJobs       = delegationK(SvcJobs)
)
View Source
var (
	EmailKTest                    = emailK("test")
	EmailKWelcome                 = emailK(EmailTemplateWelcome)
	EmailKSupport                 = emailK(EmailTemplateSupport)
	EmailKDeletion                = emailK(EmailTemplateDeletion)
	EmailKForbidden               = emailK(EmailTemplateForbidden)
	EmailKWarning                 = emailK(EmailTemplateWarning)
	EmailKSuspension              = emailK(EmailTemplateSuspension)
	EmailKConnection              = emailK(EmailTemplateConnection)
	EmailKCensor                  = emailK(EmailTemplateCensor)
	EmailKLowCredits              = emailK(EmailTemplateLowCredits)
	EmailKExternalPaymentReceipt  = emailK(EmailTemplateExternalPaymentReceipt)
	EmailKExternalPaymentNotice   = emailK(EmailTemplateExternalPaymentNotice)
	EmailKInternalPaymentReceipt  = emailK(EmailTemplateInternalPaymentReceipt)
	EmailKInternalPaymentNotice   = emailK(EmailTemplateInternalPaymentNotice)
	EmailKTransactionFeeReceipt   = emailK(EmailTemplateTransactionFeeReceipt)
	EmailKInvalidTaxIDsWarning    = emailK(EmailTemplateInvalidTaxIDsWarning)
	EmailKExternalDocumentPayment = emailK(EmailTemplateExternalDocumentPayment)
	EmailKPasswordReset           = emailK(EmailTemplatePasswordReset)
)
View Source
var (
	NotifKJobsJobsTest         = notifK(SvcJobs, ColJobsJobs, notifRTest)
	NotifKChatChatsReceived    = notifK(SvcChat, ColChatChats, notifRReceived)
	NotifKJobsJobsStarted      = notifK(SvcJobs, ColJobsJobs, notifRStarted)
	NotifKJobsLocationsStarted = notifK(SvcJobs, ColJobsLocations, notifRStarted)
)
View Source
var (
	TranslateFormatText = translateFormat("text")
	TranslateFormatHTML = translateFormat("html")
)
View Source
var (
	CallEventConnected    = callEvent("connected")
	CallEventDisconnected = callEvent("disconnected")
	CallEventCallEnded    = callEvent("ended")
)
View Source
var (
	UserTypeEmployer = userType("employer")
	UserTypeEmployee = userType("employee")
	UserTypeClient   = userType("client")
	UserTypeExternal = userType("external")
)
View Source
var (
	ModText  = modality("text")
	ModImage = modality("image")
	ModVideo = modality("video")
	ModNA    = modality("N/A")
)
View Source
var (
	WebSocketCloseErrNormalClosure  = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrGoingAway      = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrProtocolError  = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrUnsupported    = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrNoStatusRcvd   = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrAbnormal       = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrInvalid        = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrPolicy         = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrMessageTooBig  = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrMandatoryExt   = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrInternalError  = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrServiceRestart = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrTryAgainLater  = WebSocketCloseError{/* contains filtered or unexported fields */}
	WebSocketCloseErrTLSHandshake   = WebSocketCloseError{/* contains filtered or unexported fields */}
)
View Source
var (
	WebSocketSessionIngressPolicyBlock = webSocketSessionIngressPolicy("block")
	WebSocketSessionIngressPolicyDrop  = webSocketSessionIngressPolicy("drop")
	WebSocketSessionIngressPolicyFail  = webSocketSessionIngressPolicy("fail")
)
View Source
var CreditConsumeR = map[CreditOp]uint16{
	CreditOpRoutesRoutesOptimize:           3,
	CreditOpProcessesProcessesSpeechToText: 2,
	CreditOpStorageUpload:                  2,
}

CreditConsumeR maps a CreditOp to the number of credits consumed.

View Source
var CreditPurchaseR = map[CreditPackage]int64{
	CreditPackage500:   500,
	CreditPackage1000:  1000,
	CreditPackage2500:  2500,
	CreditPackage5000:  5000,
	CreditPackage10000: 10000,
}

CreditPurchaseR maps a CreditPackage to the number of credits purchased.

View Source
var CreditPurchaseUSDAmountR = map[CreditPackage]int64{
	CreditPackage500:   7500,
	CreditPackage1000:  14000,
	CreditPackage2500:  32500,
	CreditPackage5000:  60000,
	CreditPackage10000: 110000,
}

CreditPurchaseUSDAmountR maps a CreditPackage to the USD amount of credits purchased.

View Source
var SearchRules = QueryParamRules{
	{
		Key:                   SearchQueryKey,
		DefaultValue:          "",
		MultipleValuesAllowed: false,
		Optional:              true,
	},
	{
		Key:                   SearchPageKey,
		DefaultValue:          "",
		MultipleValuesAllowed: false,
		Optional:              false,
	},
	{
		Key:                   SearchPerPageKey,
		DefaultValue:          "",
		MultipleValuesAllowed: false,
		Optional:              false,
	},
}

SearchRules defines validation rules for search queries.

View Source
var TMapAdjustmentAggregate = TMap{
	TMapAdjustmentAggregateNumberOfEmployeesKey:                 TMapAdjustmentAggregateNumberOfEmployeesKey,
	TMapAdjustmentAggregateGenerationDateKey:                    TMapAdjustmentAggregateGenerationDateKey,
	TMapAdjustmentAggregateIncludedPeriodsKey:                   TMapAdjustmentAggregateIncludedPeriodsKey,
	TMapAdjustmentAggregateTotalKey:                             TMapAdjustmentAggregateTotalKey,
	TMapAdjustmentAggregateTotalAmountKey:                       TMapAdjustmentAggregateTotalAmountKey,
	TMapAdjustmentAggregateCurrencyKey:                          TMapAdjustmentAggregateCurrencyKey,
	TMapAdjustmentAggregateGeneralDetailsKey:                    TMapAdjustmentAggregateGeneralDetailsKey,
	TMapAdjustmentAggregateDeductionsTotalKey:                   TMapAdjustmentAggregateDeductionsTotalKey,
	TMapAdjustmentAggregateContributionsTotalKey:                TMapAdjustmentAggregateContributionsTotalKey,
	TMapAdjustmentAggregateTotalOfDeductionsAndContributionsKey: TMapAdjustmentAggregateTotalOfDeductionsAndContributionsKey,
	TMapAdjustmentAggregateDeductionsPerNameKey:                 TMapAdjustmentAggregateDeductionsPerNameKey,
	TMapAdjustmentAggregateNameKey:                              TMapAdjustmentAggregateNameKey,
	TMapAdjustmentAggregateContributionsPerNameKey:              TMapAdjustmentAggregateContributionsPerNameKey,
	TMapAdjustmentAggregateDeductionsPerPeriodKey:               TMapAdjustmentAggregateDeductionsPerPeriodKey,
	TMapAdjustmentAggregateContributionsPerPeriodKey:            TMapAdjustmentAggregateContributionsPerPeriodKey,
	TMapAdjustmentAggregateIsSubContributionKey:                 TMapAdjustmentAggregateIsSubContributionKey,
	TMapAllRightsReservedKey:                                    TMapAllRightsReservedKey,
	TMapAdjustmentAggregateReportKey:                            TMapAdjustmentAggregateReportKey,
	TMapAdjustmentAggregateAmountCategoryKey:                    TMapAdjustmentAggregateAmountCategoryKey,
	TMapAdjustmentAggregatePeriodNumberKey:                      TMapAdjustmentAggregatePeriodNumberKey,
	TMapAdjustmentAggregatePeriodKey:                            TMapAdjustmentAggregatePeriodKey,
	TMapAdjustmentAggregateAllDeductionsForAllPeriodsKey:        TMapAdjustmentAggregateAllDeductionsForAllPeriodsKey,
	TMapAdjustmentAggregateAllContributionsForAllPeriodsKey:     TMapAdjustmentAggregateAllContributionsForAllPeriodsKey,
	TMapAdjustmentAggregateYesKey:                               TMapAdjustmentAggregateYesKey,
	TMapAdjustmentAggregateNoKey:                                TMapAdjustmentAggregateNoKey,
	TMapAdjustmentAggregateTotalPerGroupKey:                     TMapAdjustmentAggregateTotalPerGroupKey,
}
View Source
var TMapBill = TMap{
	TMapBillProductNameKey:               TMapBillProductNameKey,
	TMapBillItemKey:                      TMapBillItemKey,
	TMapBillAppliedTaxesKey:              TMapBillAppliedTaxesKey,
	TMapBillQuantityKey:                  TMapBillQuantityKey,
	TMapBillQuantifierKey:                TMapBillQuantifierKey,
	TMapBillUnitPriceKey:                 TMapBillUnitPriceKey,
	TMapBillSubtotalKey:                  TMapBillSubtotalKey,
	TMapBillTaxTotalKey:                  TMapBillTaxTotalKey,
	TMapBillTotalKey:                     TMapBillTotalKey,
	TMapBillTotalsKey:                    TMapBillTotalsKey,
	TMapBillDetailsKey:                   TMapBillDetailsKey,
	TMapBillHourlyRateKey:                TMapBillHourlyRateKey,
	TMapBillEmployeeKey:                  TMapBillEmployeeKey,
	TMapBillWeekKey:                      TMapBillWeekKey,
	TMapBillSupplierKey:                  TMapBillSupplierKey,
	TMapBillAmountKey:                    TMapBillAmountKey,
	TMapBillInvoiceNumberKey:             TMapBillInvoiceNumberKey,
	TMapBillEstimateNumberKey:            TMapBillEstimateNumberKey,
	TMapBillInvoiceDateKey:               TMapBillInvoiceDateKey,
	TMapBillDueDateKey:                   TMapBillDueDateKey,
	TMapBillBilledToKey:                  TMapBillBilledToKey,
	TMapBillInvoiceKey:                   TMapBillInvoiceKey,
	TMapBillEstimateKey:                  TMapBillEstimateKey,
	TMapBillSectionKey:                   TMapBillSectionKey,
	TMapBillSalariesKey:                  TMapBillSalariesKey,
	TMapBillTransportationKey:            TMapBillTransportationKey,
	TMapBillSupplierInvoicesKey:          TMapBillSupplierInvoicesKey,
	TMapBillChargesCreditsKey:            TMapBillChargesCreditsKey,
	TMapAllRightsReservedKey:             TMapAllRightsReservedKey,
	TMapBillCreditedKey:                  TMapBillCreditedKey,
	TMapBillTaxNameKey:                   TMapBillTaxNameKey,
	TMapBillDepositKey:                   TMapBillDepositKey,
	TMapBillMomentKey:                    TMapBillMomentKey,
	TMapBillStartKey:                     TMapBillStartKey,
	TMapBillEndKey:                       TMapBillEndKey,
	TMapBillPercentageKey:                TMapBillPercentageKey,
	TMapBillBillingMethodKey:             TMapBillBillingMethodKey,
	TMapBillFixedPriceKey:                TMapBillFixedPriceKey,
	TMapBillHourlyKey:                    TMapBillHourlyKey,
	TMapBillFixedExplainationKey:         TMapBillFixedExplainationKey,
	TMapBillHourlyExplainationKey:        TMapBillHourlyExplainationKey,
	TMapBillCanceledKey:                  TMapBillCanceledKey,
	TMapBillAdministrationFeesKey:        TMapBillAdministrationFeesKey,
	TMapBillAdministrationFeesContentKey: TMapBillAdministrationFeesContentKey,
	TMapBillHourQuantifierKey:            TMapBillHourQuantifierKey,
	TMapBillDayQuantifierKey:             TMapBillDayQuantifierKey,
	TMapBillCompanyKey:                   TMapBillCompanyKey,
}
View Source
var TMapPayroll = TMap{
	TMapPayrollPayrollKey:                         TMapPayrollPayrollKey,
	TMapPayrollPayrollDateKey:                     TMapPayrollPayrollDateKey,
	TMapPayrollCurrencyKey:                        TMapPayrollCurrencyKey,
	TMapPayrollForKey:                             TMapPayrollForKey,
	TMapPayrollGeneralDetailsKey:                  TMapPayrollGeneralDetailsKey,
	TMapPayrollPayrollPeriodsKey:                  TMapPayrollPayrollPeriodsKey,
	TMapPayrollPayrollPeriodKey:                   TMapPayrollPayrollPeriodKey,
	TMapPayrollBankingWarningKey:                  TMapPayrollBankingWarningKey,
	TMapPayrollProblemWarningKey:                  TMapPayrollProblemWarningKey,
	TMapPayrollGrossPayKey:                        TMapPayrollGrossPayKey,
	TMapPayrollAmountCategoryKey:                  TMapPayrollAmountCategoryKey,
	TMapPayrollTotalKey:                           TMapPayrollTotalKey,
	TMapPayrollWorkKey:                            TMapPayrollWorkKey,
	TMapPayrollTransportationKey:                  TMapPayrollTransportationKey,
	TMapPayrollNetPayKey:                          TMapPayrollNetPayKey,
	TMapPayrollDeductionsKey:                      TMapPayrollDeductionsKey,
	TMapPayrollContributionsDetailsKey:            TMapPayrollContributionsDetailsKey,
	TMapPayrollEmployerPayrollContributionsKey:    TMapPayrollEmployerPayrollContributionsKey,
	TMapPayrollEmployerPayrollContributionNoteKey: TMapPayrollEmployerPayrollContributionNoteKey,
	TMapPayrollDeductionsAndContributionsKey:      TMapPayrollDeductionsAndContributionsKey,
	TMapPayrollDeductionsTotalAmountKey:           TMapPayrollDeductionsTotalAmountKey,
	TMapPayrollContributionsTotalAmountKey:        TMapPayrollContributionsTotalAmountKey,
	TMapPayrollDeductionsDetailsKey:               TMapPayrollDeductionsDetailsKey,
	TMapPayrollNameKey:                            TMapPayrollNameKey,
	TMapPayrollIsSubContributionKey:               TMapPayrollIsSubContributionKey,
	TMapAllRightsReservedKey:                      TMapAllRightsReservedKey,
	TMapPayrollEmployerContributionsKey:           TMapPayrollEmployerContributionsKey,
	TMapPayrollNoKey:                              TMapPayrollNoKey,
	TMapPayrollYesKey:                             TMapPayrollYesKey,
	TMapPayrollPayrollAmountKey:                   TMapPayrollPayrollAmountKey,
}
View Source
var Unscoped = Scope{
	K:  "",
	ID: *NewZeroID(),
}

Functions

func Apply added in v0.1.795

func Apply[T any](o *T, mods ...Opt[T]) T

func DefaultGRPCClientOptions added in v0.1.561

func DefaultGRPCClientOptions(credentialsJSON []byte) []option.ClientOption

DefaultGRPCClientOptions returns safe gRPC dial options for long-lived connections.

func ExtractAuthToken added in v0.1.178

func ExtractAuthToken(r *http.Request, opts AuthOptions) (string, error)

ExtractAuthToken extracts the auth token from the request header.

func IDRegistrar added in v0.1.317

func IDRegistrar(reg *bson.Registry)

func IsBucket added in v0.1.1017

func IsBucket(s string) bool

IsBucket checks if a name belongs to a registered bucket.

func NewIDKey added in v0.1.772

func NewIDKey(prefix string) string

func ParseOperationResultToSingle added in v0.1.358

func ParseOperationResultToSingle[T any](ctx context.Context, res *OperationResult, recv T, m Marshaler, u Unmarshaler) (T, error)

ParseOperationResultToSingle unmarshals a single item from the operation result into receiver (must be a pointer).

func ParseOperationResultToSlice added in v0.1.358

func ParseOperationResultToSlice[T any](ctx context.Context, res *OperationResult, recv *[]T, m Marshaler, u Unmarshaler) ([]T, error)

ParseOperationResultToSlice unmarshals a slice of items from the operation result into receiver (must be a pointer to a slice).

func ParseOperationResultToSliceDynamic added in v0.1.416

func ParseOperationResultToSliceDynamic(ctx context.Context, res *OperationResult, recv any, m Marshaler, u Unmarshaler) ([]any, error)

ParseOperationResultToSliceDynamic unmarshals a slice of items from the operation result using reflection (receiver must be pointer to a slice of pointers).

func PathKey added in v0.1.838

func PathKey(sep string, parts ...string) string

PathKey joins non-empty trimmed parts with the given separator.

func PathKeyDot added in v0.1.838

func PathKeyDot(parts ...string) string

PathKeyDot joins non-empty trimmed parts with a dot.

func PathKeyFn added in v0.1.838

func PathKeyFn(key string) func(...string) string

PathKeyFn creates a dotted field-path function that appends key after any given prefixes.

Types

type AcceptWebSocketOption added in v0.1.940

type AcceptWebSocketOption = Opt[AcceptWebSocketOptions]

func WithAcceptWebSocketCheckOriginFn added in v0.1.940

func WithAcceptWebSocketCheckOriginFn(x func(r *http.Request) bool) AcceptWebSocketOption

func WithAcceptWebSocketHeaders added in v0.1.940

func WithAcceptWebSocketHeaders(x http.Header) AcceptWebSocketOption

func WithAcceptWebSocketR added in v0.1.940

func WithAcceptWebSocketR(x *http.Request) AcceptWebSocketOption

func WithAcceptWebSocketReadBufferSize added in v0.1.940

func WithAcceptWebSocketReadBufferSize(x int) AcceptWebSocketOption

func WithAcceptWebSocketSubprotocols added in v0.1.940

func WithAcceptWebSocketSubprotocols(x []string) AcceptWebSocketOption

func WithAcceptWebSocketW added in v0.1.940

func WithAcceptWebSocketW(x http.ResponseWriter) AcceptWebSocketOption

func WithAcceptWebSocketWriteBufferSize added in v0.1.940

func WithAcceptWebSocketWriteBufferSize(x int) AcceptWebSocketOption

type AcceptWebSocketOptions added in v0.1.940

type AcceptWebSocketOptions struct {
	W               http.ResponseWriter
	R               *http.Request
	ReadBufferSize  int
	WriteBufferSize int
	Subprotocols    []string
	CheckOriginFn   func(r *http.Request) bool
	Headers         http.Header
}

func ApplyAcceptWebSocketOptions added in v0.1.940

func ApplyAcceptWebSocketOptions(opts *AcceptWebSocketOptions, modifiers ...AcceptWebSocketOption) AcceptWebSocketOptions

func (*AcceptWebSocketOptions) Val added in v0.1.1028

func (o *AcceptWebSocketOptions) Val() error

type AddStripeCardOption added in v0.1.843

type AddStripeCardOption = Opt[AddStripeCardOptions]

func WithAddStripeCardBillingDetailsEmail added in v0.1.843

func WithAddStripeCardBillingDetailsEmail(x string) AddStripeCardOption

func WithAddStripeCardBillingDetailsName added in v0.1.843

func WithAddStripeCardBillingDetailsName(x string) AddStripeCardOption

func WithAddStripeCardMetadata added in v0.1.923

func WithAddStripeCardMetadata(x map[string]string) AddStripeCardOption

func WithAddStripeCardPostalCode added in v0.1.843

func WithAddStripeCardPostalCode(x string) AddStripeCardOption

func WithAddStripeCardToken added in v0.1.843

func WithAddStripeCardToken(x string) AddStripeCardOption

type AddStripeCardOptions added in v0.1.843

type AddStripeCardOptions struct {
	Token               string
	BillingDetailsEmail string
	BillingDetailsName  string
	PostalCode          string
	Metadata            map[string]string
}

func ApplyAddStripeCardOptions added in v0.1.843

func ApplyAddStripeCardOptions(opts *AddStripeCardOptions, modifiers ...AddStripeCardOption) AddStripeCardOptions

func (*AddStripeCardOptions) Params added in v0.1.845

func (*AddStripeCardOptions) Val added in v0.1.1028

func (o *AddStripeCardOptions) Val() error

type Address added in v0.1.1065

type Address struct {
	Street     *string `json:"street" conform:"trim,lower" validate:"nnpt"`
	City       *string `json:"city" conform:"trim,lower" validate:"nnpt"`
	State      *string `json:"state" conform:"trim,lower" validate:"nnpt"`
	PostalCode *string `json:"postal_code" conform:"trim,upper" validate:"nnpt"`
	Country    *string `json:"country" conform:"trim,upper" validate:"nnpt"`
}

func NewAddress added in v0.1.1065

func NewAddress(opts ...AddressOptions) *Address

func (*Address) GetCity added in v0.1.1065

func (a *Address) GetCity() string

func (*Address) GetCountry added in v0.1.1065

func (a *Address) GetCountry() string

func (*Address) GetPostalCode added in v0.1.1065

func (a *Address) GetPostalCode() string

func (*Address) GetState added in v0.1.1065

func (a *Address) GetState() string

func (*Address) GetStreet added in v0.1.1065

func (a *Address) GetStreet() string

func (*Address) SetCity added in v0.1.1065

func (a *Address) SetCity(x string)

func (*Address) SetCountry added in v0.1.1065

func (a *Address) SetCountry(x string)

func (*Address) SetPostalCode added in v0.1.1065

func (a *Address) SetPostalCode(x string)

func (*Address) SetState added in v0.1.1065

func (a *Address) SetState(x string)

func (*Address) SetStreet added in v0.1.1065

func (a *Address) SetStreet(x string)

type AddressOptions added in v0.1.1065

type AddressOptions func(*Address)

func WithAddressCity added in v0.1.1065

func WithAddressCity(x string) AddressOptions

func WithAddressCountry added in v0.1.1065

func WithAddressCountry(x string) AddressOptions

func WithAddressPostalCode added in v0.1.1065

func WithAddressPostalCode(x string) AddressOptions

func WithAddressState added in v0.1.1065

func WithAddressState(x string) AddressOptions

func WithAddressStreet added in v0.1.1065

func WithAddressStreet(x string) AddressOptions

type AdjustmentType added in v0.1.829

type AdjustmentType string

func (*AdjustmentType) Val added in v0.1.1028

func (x *AdjustmentType) Val() error

type AppleIAPClient added in v0.1.1105

type AppleIAPClient interface {
	GetTransactionInfo(ctx context.Context, transactionID string) (*appstoreapi.TransactionInfoResponse, error)
	ParseSignedTransaction(transaction string) (*appstoreapi.JWSTransaction, error)
}

type ArbiterBillable added in v0.1.922

type ArbiterBillable interface {
	ClaimRunUpdateItemQuantity(ctx context.Context, opts ClaimRunUpdateItemQuantityOptions) (bool, error)
}

type ArbiterChat added in v0.1.945

type ArbiterChat interface {
	ClaimRunReact(ctx context.Context, opts ClaimRunReactOptions) (bool, error)
	ClaimRunSyncChatRoom(ctx context.Context, opts ClaimRunSyncChatRoomOptions) (bool, error)
}

type ArbiterFeed added in v0.1.922

type ArbiterFeed interface {
	ClaimRunReembed(ctx context.Context, opts ClaimRunReembedOptions) (bool, error)
	ClaimRunStatsPop(ctx context.Context, opts ClaimRunStatsPopOptions) (bool, error)
}

type ArbiterIDReembedding added in v0.1.726

type ArbiterIDReembedding struct {
	EntityID string
	M        Modality
}

func (ArbiterIDReembedding) String added in v0.1.726

func (a ArbiterIDReembedding) String() string

func (*ArbiterIDReembedding) Val added in v0.1.1028

func (a *ArbiterIDReembedding) Val() error

type ArbiterOperator added in v0.1.726

type ArbiterOperator interface {
	CloserWithCtx
	ArbiterFeed
	ArbiterBillable
	ArbiterPayments
	ArbiterTokenizer
	ArbiterChat
	Claim(ctx context.Context, c fmt.Stringer, owner string) (bool, error)
	Release(ctx context.Context, c fmt.Stringer, owner string) error
	Extend(ctx context.Context, c fmt.Stringer, owner string) (bool, error)
	ClaimRun(ctx context.Context, opts ClaimRunOptions) (bool, error)
	AbsorbLoad(ctx context.Context, c fmt.Stringer, ttl time.Duration) (bool, error)
}

type ArbiterPayments added in v0.1.922

type ArbiterPayments interface {
	ClaimRunPSPWebhookSync(ctx context.Context, opts ClaimRunPSPWebhookSyncOptions) (bool, error)
}

type ArbiterTokenizer added in v0.1.924

type ArbiterTokenizer interface {
	NewToken(ctx context.Context) (string, error)
}

type AtlasDataType added in v0.0.5

type AtlasDataType = string

AtlasDataType represents the data types recognized by MongoDB Atlas.

type AtlasIndexes added in v0.1.77

type AtlasIndexes map[string]string

AtlasIndexes is a map of field name to MongoDB Atlas data type.

type AttachStripePaymentMethodOption added in v0.1.930

type AttachStripePaymentMethodOption = Opt[AttachStripePaymentMethodOptions]

func WithAttachStripePaymentMethodCustomerPSPID added in v0.1.930

func WithAttachStripePaymentMethodCustomerPSPID(x *ID) AttachStripePaymentMethodOption

func WithAttachStripePaymentMethodPaymentMethodPSPID added in v0.1.930

func WithAttachStripePaymentMethodPaymentMethodPSPID(x *ID) AttachStripePaymentMethodOption

type AttachStripePaymentMethodOptions added in v0.1.930

type AttachStripePaymentMethodOptions struct {
	StripeCustomerPSPID
	PaymentMethodPSPID *ID
}

func ApplyAttachStripePaymentMethodOptions added in v0.1.930

func ApplyAttachStripePaymentMethodOptions(opts *AttachStripePaymentMethodOptions, modifiers ...AttachStripePaymentMethodOption) AttachStripePaymentMethodOptions

func (*AttachStripePaymentMethodOptions) Params added in v0.1.930

func (*AttachStripePaymentMethodOptions) Val added in v0.1.1028

type Atz added in v0.1.271

type Atz struct {
	Authorize bool
}

Atz controls whether the authorization step should be executed in the handler.

type AudioOptions added in v0.1.498

type AudioOptions struct {
	Name       string
	SampleRate uint32
	BitRate    string
}

type AuthOption added in v0.1.177

type AuthOption = Opt[AuthOptions]

func WithAuthorizationHeaderKey added in v0.1.178

func WithAuthorizationHeaderKey(x string) AuthOption

func WithPrefix added in v0.1.177

func WithPrefix(x string) AuthOption

type AuthOptions added in v0.1.177

type AuthOptions struct {
	AuthorizationHeaderKey string
	Prefix                 string
}

AuthOptions holds authentication-related configuration used across multiple systems, including OIDC & Firebase.

func ApplyAuthOptions added in v0.1.177

func ApplyAuthOptions(opts *AuthOptions, modifiers ...AuthOption) AuthOptions

type AuthenticationOperator added in v0.1.178

type AuthenticationOperator interface {
	FirebaseAuthenticator
	OIDCAuthenticator
	AuthenticateWithSecret(ctx context.Context, r *http.Request, opts AuthOptions) error
	AuthenticateAny(ctx context.Context, r *http.Request, opts AuthOptions) error
}

type Authorizable added in v0.1.54

type Authorizable interface {
	Readers() []*ID
	Writers() []*ID
	Owners() []*ID
}

type AuthorizationResult added in v0.1.56

type AuthorizationResult struct {
	UnallowedRecords []ID `json:"unallowed_records"`
}

AuthorizationResult represents an authorization response.

func NewAuthorizationResult added in v0.1.57

func NewAuthorizationResult(opts ...AuthorizationResultOption) *AuthorizationResult

type AuthorizationResultOption added in v0.1.56

type AuthorizationResultOption = Opt[AuthorizationResult]

func WithUnallowedRecords added in v0.1.233

func WithUnallowedRecords(x []ID) AuthorizationResultOption

type AutoCensorOption added in v0.1.764

type AutoCensorOption = Opt[AutoCensorOptions]

func WithAutoCensorCensorRLRPermille added in v0.1.768

func WithAutoCensorCensorRLRPermille(x int64) AutoCensorOption

func WithAutoCensorMaxReportsAbs added in v0.1.764

func WithAutoCensorMaxReportsAbs(x int64) AutoCensorOption

func WithAutoCensorMinLikesForAutoCensor added in v0.1.764

func WithAutoCensorMinLikesForAutoCensor(x int64) AutoCensorOption

func WithAutoCensorMinReportsForCheck added in v0.1.764

func WithAutoCensorMinReportsForCheck(x int64) AutoCensorOption

func WithAutoCensorOwnerID added in v0.1.1040

func WithAutoCensorOwnerID(x *ID) AutoCensorOption

func WithAutoCensorUncensorRLRPermille added in v0.1.768

func WithAutoCensorUncensorRLRPermille(x int64) AutoCensorOption

type AutoCensorOptions added in v0.1.764

type AutoCensorOptions struct {
	OwnerID               *ID
	MinLikesForAutoCensor int64
	MinReportsForCheck    int64
	MaxReportsAbs         int64
	CensorRLRPermille     int64
	UncensorRLRPermille   int64
}

func ApplyAutoCensorOptions added in v0.1.764

func ApplyAutoCensorOptions(opts *AutoCensorOptions, modifiers ...AutoCensorOption) AutoCensorOptions

func (*AutoCensorOptions) Val added in v0.1.1028

func (o *AutoCensorOptions) Val() error

type BSONOperator added in v0.0.5

type BSONOperator = string

BSONOperator represents BSON query operators in MongoDB.

type Base64Decoder added in v0.0.5

type Base64Decoder interface {
	DecodeString(enc *base64.Encoding, src string) ([]byte, error)
}

type BasisInt added in v0.1.10

type BasisInt = int

type BasisInt32 added in v0.1.10

type BasisInt32 = int32

type BasisInt64 added in v0.1.10

type BasisInt64 = int64

type BasisOperator added in v0.1.10

type BasisOperator interface {
	BasisIntToMajor(ctx context.Context, b BasisInt, c ConversionFactor) (MajorUnit, error)
	BasisInt32ToMajor(ctx context.Context, b BasisInt32, c ConversionFactor) (MajorUnit, error)
	BasisInt64ToMajor(ctx context.Context, b BasisInt64, c ConversionFactor) (MajorUnit, error)
	MajorToBasis(ctx context.Context, m MajorUnit, c ConversionFactor) (BasisInt64, error)
}

type BatchSendResult added in v0.1.583

type BatchSendResult struct {
	SuccessCount uint32
	FailureCount uint32
	Results      []SendResult
}

type BillType added in v0.1.809

type BillType string

BillType represents the nature of a bill.

func (*BillType) Val added in v0.1.1028

func (x *BillType) Val() error

type Billable added in v0.1.822

type Billable interface {
	SetIsBilled(x bool)
}

type Blob added in v0.1.699

type Blob struct{}

type Bucket added in v0.1.997

type Bucket = string

type BucketFile added in v0.1.477

type BucketFile struct {
	OriginalName string
	ObjectName   string
	MimePrefix   string
	MIME         string
	Extension    string
	Body         io.Reader
	FullQuality  bool
}

BucketFile represents a file to be uploaded to a bucket with its metadata.

func (*BucketFile) Val added in v0.1.1028

func (b *BucketFile) Val(allowEmptyObjectName bool) error

type BucketOperator added in v0.1.479

type BucketOperator interface {
	NewSignedURLOptions(ctx context.Context, expire bool) (*storage.SignedURLOptions, error)
	DefaultBucketAttrs(ctx context.Context, lc *storage.Lifecycle) (*storage.BucketAttrs, error)
	EnsureBucket(ctx context.Context, opts EnsureBucketOptions) (*storage.BucketAttrs, error)
	NewObjectQuery(ctx context.Context, parts ...string) (*storage.Query, error)
	BuildObjectPath(ctx context.Context, parts ...string) (string, error)
	UploadObject(ctx context.Context, opts UploadObjectOptions) error
	UploadObjects(ctx context.Context, opts UploadObjectsOptions) error
	DeleteObjectByName(ctx context.Context, b Bucket, objectName string) error
	DeleteObjectsByQuery(ctx context.Context, b Bucket, query *storage.Query) error
	FindObjects(ctx context.Context, opts FindObjectsOptions) ([]*storage.ObjectAttrs, error)
	GenerateSignedObjectURLs(ctx context.Context, opts GenerateSignedObjectURLsOptions) ([]string, error)
	GenerateBucketName(ctx context.Context, e EnvironmentOperator, suffix string) (Bucket, error)
	CloserWithCtx
}

type BucketScan added in v0.1.477

type BucketScan struct {
	// F is a reference to the scanned file.
	F           *BucketFile
	IsForbidden bool
}

BucketScan represents the result of a file scan.

type Bypass added in v0.1.359

type Bypass struct {
	InsertedID *ID
	PathID     *string
	Ressource  *string
	Compute    bool
	Cache      bool
	FillNil    bool
}

Bypass allows explicit override of default handler behavior such as skipping path extraction.

type CacheHit added in v0.0.5

type CacheHit struct {
	V string `json:"v"`
}

CacheHit represents a cache entry that holds a JSON string.

type CacheHitter added in v0.0.5

type CacheHitter interface {
	DecodeHit(ctx context.Context, c CacheHit, dst any) error
	HitFromValue(ctx context.Context, v any) (*CacheHit, error)
}

type CacheID added in v0.0.5

type CacheID string

func (CacheID) String added in v0.0.5

func (c CacheID) String() string

type CacheIdentifier added in v0.0.5

type CacheIdentifier interface {
	CacheID(ctx context.Context, id string) (CacheID, error)
}

type CacheKey added in v0.0.5

type CacheKey struct {
	ID           fmt.Stringer
	Microservice string
	Collection   string
	Multi        *CacheMulti
}

CacheKey represents a cache key. It is used to identify a cache entry & it can be used to generate a matching pattern using wildcards.

func AbsorbLoadKey added in v0.1.773

func AbsorbLoadKey(svc Svc, parts ...string) CacheKey

func (CacheKey) String added in v0.0.5

func (c CacheKey) String() string

String implements the Stringer interface for Key.

type CacheMulti added in v0.0.5

type CacheMulti struct {
	RawQuery string
}

type CacheOperator added in v0.0.5

type CacheOperator interface {
	CacheIdentifier
	CacheHitter
	Cacher
}

type Cacher added in v0.0.5

type Cacher interface {
	Get(ctx context.Context, c fmt.Stringer) (*CacheHit, error)
	Set(ctx context.Context, c fmt.Stringer, v CacheHit) error
	BatchGet(ctx context.Context, c []fmt.Stringer) ([]CacheHit, error)
	BatchSet(ctx context.Context, e map[fmt.Stringer]CacheHit) error
	Flush(ctx context.Context, c fmt.Stringer) error
	BatchFlush(ctx context.Context, c []fmt.Stringer) error
	FlushAll(ctx context.Context) error
	Exists(ctx context.Context, c fmt.Stringer) (bool, error)
}

type CallEvent added in v0.1.796

type CallEvent = string

type Captioner added in v0.1.756

type Captioner interface {
	CaptionImages(ctx context.Context, imgs []MediaInput) ([]string, error)
	DescribeVideos(ctx context.Context, vids []MediaInput) ([]string, error)
}

type CaptionerOperator added in v0.1.756

type CaptionerOperator interface {
	Captioner
}

type CardExpiryLead added in v0.1.911

type CardExpiryLead time.Duration

CardExpiryLead represents a lead duration applied before card expiration.

func (*CardExpiryLead) Val added in v0.1.1028

func (x *CardExpiryLead) Val() error

type CertGenerator added in v0.0.5

type CertGenerator interface {
	X509KeyPair(ctx context.Context, certPEMBlock []byte, keyPEMBlock []byte) (tls.Certificate, error)
	AppendCertsFromPEM(ctx context.Context, pool *x509.CertPool, pemCerts []byte) (bool, error)
}

type ChangeEvent added in v0.0.5

type ChangeEvent struct {
	OperationType string `json:"operation_type"`
	FullDocument  any    `json:"full_document"`
}

type ChargeType added in v0.1.807

type ChargeType string

ChargeType represents the nature of a charge.

func (*ChargeType) Val added in v0.1.1028

func (x *ChargeType) Val() error

type Chargeable added in v0.1.816

type Chargeable interface {
	GetPrice() int64
	GetName() string
	GetQuantifierID() ID
}

type ClaimFunc added in v0.1.726

type ClaimFunc func(context.Context) error

type ClaimRunNamespace added in v0.1.773

type ClaimRunNamespace = string

type ClaimRunOption added in v0.1.726

type ClaimRunOption = Opt[ClaimRunOptions]

func WithClaimRunFn added in v0.1.726

func WithClaimRunFn(x ClaimFunc) ClaimRunOption

func WithClaimRunKey added in v0.1.726

func WithClaimRunKey(x fmt.Stringer) ClaimRunOption

func WithClaimRunWait added in v0.1.922

func WithClaimRunWait(x bool) ClaimRunOption

func WithClaimRunWaitTimeout added in v0.1.922

func WithClaimRunWaitTimeout(x time.Duration) ClaimRunOption

type ClaimRunOptions added in v0.1.726

type ClaimRunOptions struct {
	Key         fmt.Stringer
	Fn          ClaimFunc
	Wait        bool
	WaitTimeout time.Duration
}

func ApplyClaimRunOptions added in v0.1.726

func ApplyClaimRunOptions(opts *ClaimRunOptions, modifiers ...ClaimRunOption) ClaimRunOptions

func (*ClaimRunOptions) Val added in v0.1.1028

func (c *ClaimRunOptions) Val() error

type ClaimRunPSPWebhookSyncOption added in v0.1.922

type ClaimRunPSPWebhookSyncOption = Opt[ClaimRunPSPWebhookSyncOptions]

func WithClaimRunPSPWebhookSyncFn added in v0.1.922

func WithClaimRunPSPWebhookSyncFn(x ClaimFunc) ClaimRunPSPWebhookSyncOption

func WithClaimRunPSPWebhookSyncSvc added in v0.1.1028

func WithClaimRunPSPWebhookSyncSvc(x Svc) ClaimRunPSPWebhookSyncOption

func WithClaimRunPSPWebhookSyncToken added in v0.1.922

func WithClaimRunPSPWebhookSyncToken(x *ID) ClaimRunPSPWebhookSyncOption

func WithClaimRunPSPWebhookSyncWait added in v0.1.922

func WithClaimRunPSPWebhookSyncWait(x bool) ClaimRunPSPWebhookSyncOption

func WithClaimRunPSPWebhookSyncWaitTimeout added in v0.1.922

func WithClaimRunPSPWebhookSyncWaitTimeout(x time.Duration) ClaimRunPSPWebhookSyncOption

type ClaimRunPSPWebhookSyncOptions added in v0.1.922

type ClaimRunPSPWebhookSyncOptions struct {
	Svc         Svc
	Token       *ID
	Fn          ClaimFunc
	Wait        bool
	WaitTimeout time.Duration
}

func ApplyClaimRunPSPWebhookSyncOptions added in v0.1.922

func ApplyClaimRunPSPWebhookSyncOptions(opts *ClaimRunPSPWebhookSyncOptions, modifiers ...ClaimRunPSPWebhookSyncOption) ClaimRunPSPWebhookSyncOptions

func (*ClaimRunPSPWebhookSyncOptions) Val added in v0.1.1028

type ClaimRunReactOption added in v0.1.945

type ClaimRunReactOption = Opt[ClaimRunReactOptions]

func WithClaimRunReactChatID added in v0.1.945

func WithClaimRunReactChatID(x *ID) ClaimRunReactOption

func WithClaimRunReactFn added in v0.1.945

func WithClaimRunReactFn(x ClaimFunc) ClaimRunReactOption

func WithClaimRunReactSvc added in v0.1.1028

func WithClaimRunReactSvc(x Svc) ClaimRunReactOption

func WithClaimRunReactWait added in v0.1.946

func WithClaimRunReactWait(x bool) ClaimRunReactOption

func WithClaimRunReactWaitTimeout added in v0.1.946

func WithClaimRunReactWaitTimeout(x time.Duration) ClaimRunReactOption

type ClaimRunReactOptions added in v0.1.945

type ClaimRunReactOptions struct {
	Svc         Svc
	ChatID      *ID
	Fn          ClaimFunc
	Wait        bool
	WaitTimeout time.Duration
}

func ApplyClaimRunReactOptions added in v0.1.945

func ApplyClaimRunReactOptions(opts *ClaimRunReactOptions, modifiers ...ClaimRunReactOption) ClaimRunReactOptions

func (*ClaimRunReactOptions) Val added in v0.1.1028

func (c *ClaimRunReactOptions) Val() error

type ClaimRunReembedOption added in v0.1.726

type ClaimRunReembedOption = Opt[ClaimRunReembedOptions]

func WithClaimRunReembedFn added in v0.1.726

func WithClaimRunReembedFn(x ClaimFunc) ClaimRunReembedOption

func WithClaimRunReembedID added in v0.1.726

func WithClaimRunReembedID(x ArbiterIDReembedding) ClaimRunReembedOption

func WithClaimRunReembedSvc added in v0.1.1028

func WithClaimRunReembedSvc(x Svc) ClaimRunReembedOption

type ClaimRunReembedOptions added in v0.1.726

type ClaimRunReembedOptions struct {
	Svc Svc
	ID  ArbiterIDReembedding
	Fn  ClaimFunc
}

func ApplyClaimRunReembedOptions added in v0.1.726

func ApplyClaimRunReembedOptions(opts *ClaimRunReembedOptions, modifiers ...ClaimRunReembedOption) ClaimRunReembedOptions

func (*ClaimRunReembedOptions) Val added in v0.1.1028

func (c *ClaimRunReembedOptions) Val() error

type ClaimRunStatsPopOption added in v0.1.773

type ClaimRunStatsPopOption = Opt[ClaimRunStatsPopOptions]

func WithClaimRunStatsPopFn added in v0.1.773

func WithClaimRunStatsPopFn(x ClaimFunc) ClaimRunStatsPopOption

func WithClaimRunStatsPopPostID added in v0.1.773

func WithClaimRunStatsPopPostID(x *ID) ClaimRunStatsPopOption

func WithClaimRunStatsPopSvc added in v0.1.1028

func WithClaimRunStatsPopSvc(x Svc) ClaimRunStatsPopOption

type ClaimRunStatsPopOptions added in v0.1.773

type ClaimRunStatsPopOptions struct {
	Svc    Svc
	PostID *ID
	Fn     ClaimFunc
}

func ApplyClaimRunStatsPopOptions added in v0.1.773

func ApplyClaimRunStatsPopOptions(opts *ClaimRunStatsPopOptions, modifiers ...ClaimRunStatsPopOption) ClaimRunStatsPopOptions

func (*ClaimRunStatsPopOptions) Val added in v0.1.1028

func (c *ClaimRunStatsPopOptions) Val() error

type ClaimRunSyncChatRoomOption added in v0.1.947

type ClaimRunSyncChatRoomOption = Opt[ClaimRunSyncChatRoomOptions]

func WithClaimRunSyncChatRoomChatRoomID added in v0.1.947

func WithClaimRunSyncChatRoomChatRoomID(x *ID) ClaimRunSyncChatRoomOption

func WithClaimRunSyncChatRoomFn added in v0.1.947

func WithClaimRunSyncChatRoomFn(x ClaimFunc) ClaimRunSyncChatRoomOption

func WithClaimRunSyncChatRoomSvc added in v0.1.1028

func WithClaimRunSyncChatRoomSvc(x Svc) ClaimRunSyncChatRoomOption

func WithClaimRunSyncChatRoomWait added in v0.1.947

func WithClaimRunSyncChatRoomWait(x bool) ClaimRunSyncChatRoomOption

func WithClaimRunSyncChatRoomWaitTimeout added in v0.1.947

func WithClaimRunSyncChatRoomWaitTimeout(x time.Duration) ClaimRunSyncChatRoomOption

type ClaimRunSyncChatRoomOptions added in v0.1.947

type ClaimRunSyncChatRoomOptions struct {
	Svc         Svc
	ChatRoomID  *ID
	Fn          ClaimFunc
	Wait        bool
	WaitTimeout time.Duration
}

func ApplyClaimRunSyncChatRoomOptions added in v0.1.947

func ApplyClaimRunSyncChatRoomOptions(opts *ClaimRunSyncChatRoomOptions, modifiers ...ClaimRunSyncChatRoomOption) ClaimRunSyncChatRoomOptions

func (*ClaimRunSyncChatRoomOptions) Val added in v0.1.1028

type ClaimRunUpdateItemQuantityOption added in v0.1.823

type ClaimRunUpdateItemQuantityOption = Opt[ClaimRunUpdateItemQuantityOptions]

func WithClaimRunUpdateItemQuantityFn added in v0.1.823

func WithClaimRunUpdateItemQuantityFn(x ClaimFunc) ClaimRunUpdateItemQuantityOption

func WithClaimRunUpdateItemQuantityItemID added in v0.1.823

func WithClaimRunUpdateItemQuantityItemID(x *ID) ClaimRunUpdateItemQuantityOption

func WithClaimRunUpdateItemQuantitySvc added in v0.1.1028

func WithClaimRunUpdateItemQuantitySvc(x Svc) ClaimRunUpdateItemQuantityOption

type ClaimRunUpdateItemQuantityOptions added in v0.1.823

type ClaimRunUpdateItemQuantityOptions struct {
	Svc    Svc
	ItemID *ID
	Fn     ClaimFunc
}

func ApplyClaimRunUpdateItemQuantityOptions added in v0.1.823

func ApplyClaimRunUpdateItemQuantityOptions(opts *ClaimRunUpdateItemQuantityOptions, modifiers ...ClaimRunUpdateItemQuantityOption) ClaimRunUpdateItemQuantityOptions

func (*ClaimRunUpdateItemQuantityOptions) Val added in v0.1.1028

type CloneStripePaymentMethodOption added in v0.1.932

type CloneStripePaymentMethodOption = Opt[CloneStripePaymentMethodOptions]

func WithCloneStripePaymentMethodConnectedAccountPSPID added in v0.1.932

func WithCloneStripePaymentMethodConnectedAccountPSPID(x *ID) CloneStripePaymentMethodOption

func WithCloneStripePaymentMethodCustomerPSPID added in v0.1.932

func WithCloneStripePaymentMethodCustomerPSPID(x *ID) CloneStripePaymentMethodOption

func WithCloneStripePaymentMethodPaymentMethodPSPID added in v0.1.932

func WithCloneStripePaymentMethodPaymentMethodPSPID(x *ID) CloneStripePaymentMethodOption

type CloneStripePaymentMethodOptions added in v0.1.932

type CloneStripePaymentMethodOptions struct {
	StripeConnectedAccountPSPID
	StripeCustomerPSPID
	PaymentMethodPSPID *ID
}

func ApplyCloneStripePaymentMethodOptions added in v0.1.932

func ApplyCloneStripePaymentMethodOptions(opts *CloneStripePaymentMethodOptions, modifiers ...CloneStripePaymentMethodOption) CloneStripePaymentMethodOptions

func (*CloneStripePaymentMethodOptions) Params added in v0.1.932

func (*CloneStripePaymentMethodOptions) Val added in v0.1.1028

type CloseWebSocketOption added in v0.1.940

type CloseWebSocketOption = Opt[CloseWebSocketOptions]

func WithCloseWebSocketC added in v0.1.940

func WithCloseWebSocketC(x *WebSocketConn) CloseWebSocketOption

type CloseWebSocketOptions added in v0.1.940

type CloseWebSocketOptions struct {
	C *WebSocketConn
}

func ApplyCloseWebSocketOptions added in v0.1.940

func ApplyCloseWebSocketOptions(opts *CloseWebSocketOptions, modifiers ...CloseWebSocketOption) CloseWebSocketOptions

func (*CloseWebSocketOptions) Val added in v0.1.1028

func (o *CloseWebSocketOptions) Val() error

type Closer added in v0.1.13

type Closer interface {
	Close() error
}

type CloserInOut added in v0.1.381

type CloserInOut interface {
	Close(ctx context.Context, c io.Closer) error
}

type CloserWithCtx added in v0.1.13

type CloserWithCtx interface {
	Close(ctx context.Context) error
}

type Col added in v0.1.996

type Col = string

type ComponentExtractor added in v0.1.10

type ComponentExtractor interface {
	GetComponent(skip int, withFullFn, withFile, withFilePath, withLine bool) string
}

type CompressAudioOption added in v0.1.498

type CompressAudioOption = Opt[CompressAudioOptions]

func WithCompressAudioAudio added in v0.1.498

func WithCompressAudioAudio(x AudioOptions) CompressAudioOption

func WithCompressAudioOutputMIME added in v0.1.736

func WithCompressAudioOutputMIME(x string) CompressAudioOption

func WithCompressAudioPathInput added in v0.1.498

func WithCompressAudioPathInput(x string) CompressAudioOption

func WithCompressAudioPathOutput added in v0.1.498

func WithCompressAudioPathOutput(x string) CompressAudioOption

type CompressAudioOptions added in v0.1.498

type CompressAudioOptions struct {
	PathInput  string
	PathOutput string
	Audio      AudioOptions
	OutputMIME string
}

func ApplyCompressAudioOptions added in v0.1.498

func ApplyCompressAudioOptions(opts *CompressAudioOptions, modifiers ...CompressAudioOption) CompressAudioOptions

type CompressImageOption added in v0.1.498

type CompressImageOption = Opt[CompressImageOptions]

func WithCompressImageCompressionType added in v0.1.498

func WithCompressImageCompressionType(x string) CompressImageOption

func WithCompressImageDecrementationFactor added in v0.1.498

func WithCompressImageDecrementationFactor(x uint32) CompressImageOption

func WithCompressImageIdealSize added in v0.1.498

func WithCompressImageIdealSize(x int64) CompressImageOption

func WithCompressImageMaxIterations added in v0.1.498

func WithCompressImageMaxIterations(x uint32) CompressImageOption

func WithCompressImageMinPercentSize added in v0.1.498

func WithCompressImageMinPercentSize(x uint32) CompressImageOption

func WithCompressImageMinQuality added in v0.1.498

func WithCompressImageMinQuality(x uint32) CompressImageOption

func WithCompressImageOutputMIME added in v0.1.736

func WithCompressImageOutputMIME(x string) CompressImageOption

func WithCompressImagePathInput added in v0.1.498

func WithCompressImagePathInput(x string) CompressImageOption

func WithCompressImagePathOutput added in v0.1.498

func WithCompressImagePathOutput(x string) CompressImageOption

func WithCompressImageQuality added in v0.1.498

func WithCompressImageQuality(x uint32) CompressImageOption

func WithCompressImageSizePercent added in v0.1.498

func WithCompressImageSizePercent(x uint32) CompressImageOption

type CompressImageOptions added in v0.1.498

type CompressImageOptions struct {
	PathInput            string
	PathOutput           string
	CompressionType      string
	ImageIdealSize       int64
	Quality              uint32
	SizePercent          uint32
	DecrementationFactor uint32
	MinQuality           uint32
	MinPercentSize       uint32
	MaxIterations        uint32
	OutputMIME           string
}

func ApplyCompressImageOptions added in v0.1.498

func ApplyCompressImageOptions(opts *CompressImageOptions, modifiers ...CompressImageOption) CompressImageOptions

type CompressVideoOption added in v0.1.498

type CompressVideoOption = Opt[CompressVideoOptions]

func WithCompressVideoAudio added in v0.1.498

func WithCompressVideoAudio(x AudioOptions) CompressVideoOption

func WithCompressVideoCodec added in v0.1.498

func WithCompressVideoCodec(x VideoCodec) CompressVideoOption

func WithCompressVideoCompressionRate added in v0.1.498

func WithCompressVideoCompressionRate(x uint32) CompressVideoOption

func WithCompressVideoOutputMIME added in v0.1.736

func WithCompressVideoOutputMIME(x string) CompressVideoOption

func WithCompressVideoPathInput added in v0.1.498

func WithCompressVideoPathInput(x string) CompressVideoOption

func WithCompressVideoPathOutput added in v0.1.498

func WithCompressVideoPathOutput(x string) CompressVideoOption

func WithCompressVideoScale added in v0.1.498

func WithCompressVideoScale(x string) CompressVideoOption

type CompressVideoOptions added in v0.1.498

type CompressVideoOptions struct {
	PathInput       string
	PathOutput      string
	Scale           string
	CompressionRate uint32
	VideoCodec      VideoCodec
	Audio           AudioOptions
	OutputMIME      string
}

func ApplyCompressVideoOptions added in v0.1.498

func ApplyCompressVideoOptions(opts *CompressVideoOptions, modifiers ...CompressVideoOption) CompressVideoOptions

type ComputedHours added in v0.1.699

type ComputedHours struct {
	// Adjusted is the capped value based on employer preferences.
	Adjusted float64
	// Excess is the amount of hours exceeding the allowed threshold.
	Excess float64
}

type ConfirmStripePaymentOption added in v0.1.843

type ConfirmStripePaymentOption = Opt[ConfirmStripePaymentOptions]

func WithConfirmStripePaymentConnectedAccountPSPID added in v0.1.930

func WithConfirmStripePaymentConnectedAccountPSPID(x *ID) ConfirmStripePaymentOption

func WithConfirmStripePaymentPaymentIntentPSPID added in v0.1.939

func WithConfirmStripePaymentPaymentIntentPSPID(x *ID) ConfirmStripePaymentOption

func WithConfirmStripePaymentReturnURL added in v0.1.935

func WithConfirmStripePaymentReturnURL(x string) ConfirmStripePaymentOption

type ConfirmStripePaymentOptions added in v0.1.843

type ConfirmStripePaymentOptions struct {
	StripeConnectedAccountPSPID
	PaymentIntentPSPID *ID
	ReturnURL          string
}

func ApplyConfirmStripePaymentOptions added in v0.1.843

func ApplyConfirmStripePaymentOptions(opts *ConfirmStripePaymentOptions, modifiers ...ConfirmStripePaymentOption) ConfirmStripePaymentOptions

func (*ConfirmStripePaymentOptions) Params added in v0.1.845

func (*ConfirmStripePaymentOptions) Val added in v0.1.1028

type ConfirmStripeSetupIntentOption added in v0.1.843

type ConfirmStripeSetupIntentOption = Opt[ConfirmStripeSetupIntentOptions]

func WithConfirmStripeSetupIntentReturnURL added in v0.1.935

func WithConfirmStripeSetupIntentReturnURL(x string) ConfirmStripeSetupIntentOption

func WithConfirmStripeSetupIntentSetupIntentID added in v0.1.843

func WithConfirmStripeSetupIntentSetupIntentID(x *ID) ConfirmStripeSetupIntentOption

type ConfirmStripeSetupIntentOptions added in v0.1.843

type ConfirmStripeSetupIntentOptions struct {
	SetupIntentID *ID
	ReturnURL     string
}

func ApplyConfirmStripeSetupIntentOptions added in v0.1.843

func ApplyConfirmStripeSetupIntentOptions(opts *ConfirmStripeSetupIntentOptions, modifiers ...ConfirmStripeSetupIntentOption) ConfirmStripeSetupIntentOptions

func (*ConfirmStripeSetupIntentOptions) Params added in v0.1.845

func (*ConfirmStripeSetupIntentOptions) Val added in v0.1.1028

type Conformer added in v0.1.336

type Conformer interface {
	Conform(ctx context.Context, v any) error
}

type ConversionFactor added in v0.1.10

type ConversionFactor = int64

type Copier added in v0.1.479

type Copier interface {
	Copy(ctx context.Context, dst io.Writer, src io.Reader) error
}

type CountFromPipelineOptions added in v0.1.771

type CountFromPipelineOptions struct {
	C        Col
	Pipeline MongoPipeliner
	CountKey ResultKey
}

type CreateCollectionsOptions added in v0.1.37

type CreateCollectionsOptions struct {
	C []Col
}

type CreateIndexesOptions added in v0.1.37

type CreateIndexesOptions struct {
	C       Col
	Indexes []IndexEntry
}

type CreateSearchIndexesOptions added in v0.1.37

type CreateSearchIndexesOptions struct {
	C       Col
	Indexes []SearchIndexEntry
}

type CreateStripeAccountLinkOption added in v0.1.843

type CreateStripeAccountLinkOption = Opt[CreateStripeAccountLinkOptions]

func WithCreateStripeAccountLinkA added in v0.1.843

func WithCreateStripeAccountLinkA(x stripeApi.Account) CreateStripeAccountLinkOption

func WithCreateStripeAccountLinkRefreshURL added in v0.1.843

func WithCreateStripeAccountLinkRefreshURL(x string) CreateStripeAccountLinkOption

func WithCreateStripeAccountLinkReturnURL added in v0.1.843

func WithCreateStripeAccountLinkReturnURL(x string) CreateStripeAccountLinkOption

func WithCreateStripeAccountLinkType added in v0.1.843

func WithCreateStripeAccountLinkType(x string) CreateStripeAccountLinkOption

type CreateStripeAccountLinkOptions added in v0.1.843

type CreateStripeAccountLinkOptions struct {
	A          stripeApi.Account
	ReturnURL  string
	RefreshURL string
	Type       string
}

func ApplyCreateStripeAccountLinkOptions added in v0.1.843

func ApplyCreateStripeAccountLinkOptions(opts *CreateStripeAccountLinkOptions, modifiers ...CreateStripeAccountLinkOption) CreateStripeAccountLinkOptions

func (*CreateStripeAccountLinkOptions) Params added in v0.1.845

func (*CreateStripeAccountLinkOptions) Val added in v0.1.1028

type CreateStripeCustomerOption added in v0.1.930

type CreateStripeCustomerOption = Opt[CreateStripeCustomerOptions]

func WithCreateStripeCustomerMetadata added in v0.1.930

func WithCreateStripeCustomerMetadata(x map[string]string) CreateStripeCustomerOption

type CreateStripeCustomerOptions added in v0.1.930

type CreateStripeCustomerOptions struct {
	Metadata map[string]string
}

func ApplyCreateStripeCustomerOptions added in v0.1.930

func ApplyCreateStripeCustomerOptions(opts *CreateStripeCustomerOptions, modifiers ...CreateStripeCustomerOption) CreateStripeCustomerOptions

func (*CreateStripeCustomerOptions) Params added in v0.1.930

func (*CreateStripeCustomerOptions) Val added in v0.1.1028

type CreateStripeTaxCalculationOption added in v0.1.1066

type CreateStripeTaxCalculationOption = Opt[CreateStripeTaxCalculationOptions]

func WithCreateStripeTaxCalculationAddress added in v0.1.1066

func WithCreateStripeTaxCalculationAddress(x Address) CreateStripeTaxCalculationOption

func WithCreateStripeTaxCalculationAmount added in v0.1.1066

func WithCreateStripeTaxCalculationAmount(x int64) CreateStripeTaxCalculationOption

func WithCreateStripeTaxCalculationCurrency added in v0.1.1066

func WithCreateStripeTaxCalculationCurrency(x string) CreateStripeTaxCalculationOption

func WithCreateStripeTaxCalculationReference added in v0.1.1078

func WithCreateStripeTaxCalculationReference(x string) CreateStripeTaxCalculationOption

func WithCreateStripeTaxCalculationTaxCode added in v0.1.1066

func WithCreateStripeTaxCalculationTaxCode(x string) CreateStripeTaxCalculationOption

func WithCreateStripeTaxCalculationTaxIDs added in v0.1.1066

func WithCreateStripeTaxCalculationTaxIDs(x []TaxID) CreateStripeTaxCalculationOption

type CreateStripeTaxCalculationOptions added in v0.1.1066

type CreateStripeTaxCalculationOptions struct {
	Address
	Currency  string
	Amount    int64
	TaxIDs    []TaxID
	TaxCode   string
	Reference string
}

func ApplyCreateStripeTaxCalculationOptions added in v0.1.1066

func ApplyCreateStripeTaxCalculationOptions(opts *CreateStripeTaxCalculationOptions, modifiers ...CreateStripeTaxCalculationOption) CreateStripeTaxCalculationOptions

func (*CreateStripeTaxCalculationOptions) Params added in v0.1.1066

func (*CreateStripeTaxCalculationOptions) Val added in v0.1.1066

type CreateStripeTaxTransactionFromCalculationOption added in v0.1.1066

type CreateStripeTaxTransactionFromCalculationOption = Opt[CreateStripeTaxTransactionFromCalculationOptions]

func WithCreateStripeTaxTransactionFromCalculationCalculationID added in v0.1.1066

func WithCreateStripeTaxTransactionFromCalculationCalculationID(x string) CreateStripeTaxTransactionFromCalculationOption

func WithCreateStripeTaxTransactionFromCalculationExpandLineItems added in v0.1.1066

func WithCreateStripeTaxTransactionFromCalculationExpandLineItems(x bool) CreateStripeTaxTransactionFromCalculationOption

func WithCreateStripeTaxTransactionFromCalculationReference added in v0.1.1066

func WithCreateStripeTaxTransactionFromCalculationReference(x string) CreateStripeTaxTransactionFromCalculationOption

type CreateStripeTaxTransactionFromCalculationOptions added in v0.1.1066

type CreateStripeTaxTransactionFromCalculationOptions struct {
	CalculationID   string
	Reference       string
	ExpandLineItems bool
}

func (*CreateStripeTaxTransactionFromCalculationOptions) Params added in v0.1.1066

func (*CreateStripeTaxTransactionFromCalculationOptions) Val added in v0.1.1066

type CreditLedgerOperation added in v0.1.1102

type CreditLedgerOperation string

CreditLedgerOperation represents the operation applied to a credit ledger entry.

func (*CreditLedgerOperation) Val added in v0.1.1102

func (x *CreditLedgerOperation) Val() error

type CreditLedgerOperator added in v0.1.1113

type CreditLedgerOperator interface {
}

type CreditLedgerSource added in v0.1.1103

type CreditLedgerSource string

CreditLedgerSource represents the origin of a credit ledger entry.

func (*CreditLedgerSource) Val added in v0.1.1103

func (x *CreditLedgerSource) Val() error

type CreditOp added in v0.1.1110

type CreditOp string

CreditOp represents an operation that consumes credits in Fabriktor.

func (*CreditOp) Val added in v0.1.1110

func (x *CreditOp) Val() error

type CreditPackage added in v0.1.1110

type CreditPackage string

CreditPackage represents a credit package available for purchase.

func (*CreditPackage) Val added in v0.1.1110

func (x *CreditPackage) Val() error

type Cx added in v0.1.1028

type Cx struct {
	Svc                    Svc
	C                      Col
	R                      *http.Request
	Receiver               any
	Mock                   any
	AuthenticateWithSecret bool
}

func (*Cx) Val added in v0.1.1028

func (o *Cx) Val() error

type DBOperator added in v0.0.5

type DBOperator interface {
	InsertOne(ctx context.Context, opts InsertOneOptions) error
	FindOne(ctx context.Context, opts FindOneOptions) error
	FindMany(ctx context.Context, opts FindManyOptions) ([]any, error)
	ReplaceOne(ctx context.Context, opts ReplaceOneOptions) error
	DeleteOne(ctx context.Context, opts DeleteOneOptions) error
	DeleteMany(ctx context.Context, opts DeleteManyOptions) (int64, error)
}

type DateFilterOptions added in v0.0.5

type DateFilterOptions struct {
	YearField  string
	MonthField string
	DayField   string
	RefYear    uint
	RefMonth   uint
	RefDay     uint
	IncludeDay bool
}

type DecodeCallbackOption added in v0.1.798

type DecodeCallbackOption = Opt[DecodeCallbackOptions]

func WithDecodeCallbackRequest added in v0.1.798

func WithDecodeCallbackRequest(x *http.Request) DecodeCallbackOption

type DecodeCallbackOptions added in v0.1.796

type DecodeCallbackOptions struct {
	R *http.Request
}

func ApplyDecodeCallbackOptions added in v0.1.802

func ApplyDecodeCallbackOptions(opts *DecodeCallbackOptions, modifiers ...DecodeCallbackOption) DecodeCallbackOptions

type DecodeCursorOptions added in v0.0.5

type DecodeCursorOptions struct {
	Cursor   MongoCursor
	Receiver any
}

type DecodeStripeEventDataOption added in v0.1.926

type DecodeStripeEventDataOption = Opt[DecodeStripeEventDataOptions]

func WithDecodeStripeEventDataE added in v0.1.926

func WithDecodeStripeEventDataE(x *stripeApi.Event) DecodeStripeEventDataOption

func WithDecodeStripeEventDataV added in v0.1.926

func WithDecodeStripeEventDataV(x any) DecodeStripeEventDataOption

type DecodeStripeEventDataOptions added in v0.1.926

type DecodeStripeEventDataOptions struct {
	E *stripeApi.Event
	V any
}

func ApplyDecodeStripeEventDataOptions added in v0.1.926

func ApplyDecodeStripeEventDataOptions(opts *DecodeStripeEventDataOptions, modifiers ...DecodeStripeEventDataOption) DecodeStripeEventDataOptions

func (*DecodeStripeEventDataOptions) Val added in v0.1.1028

type DecodeStripeEventOption added in v0.1.843

type DecodeStripeEventOption = Opt[DecodeStripeEventOptions]

func WithDecodeStripeEventR added in v0.1.843

func WithDecodeStripeEventR(x *http.Request) DecodeStripeEventOption

type DecodeStripeEventOptions added in v0.1.843

type DecodeStripeEventOptions struct {
	R *http.Request
}

func ApplyDecodeStripeEventOptions added in v0.1.843

func ApplyDecodeStripeEventOptions(opts *DecodeStripeEventOptions, modifiers ...DecodeStripeEventOption) DecodeStripeEventOptions

func (*DecodeStripeEventOptions) Val added in v0.1.1028

type DelegationK added in v0.1.1049

type DelegationK string

func (DelegationK) String added in v0.1.1049

func (x DelegationK) String() string

func (*DelegationK) Val added in v0.1.1049

func (x *DelegationK) Val() error

type DelegationKToggles added in v0.1.1049

type DelegationKToggles map[DelegationK]bool

func DefaultDelegationKToggles added in v0.1.1049

func DefaultDelegationKToggles(on bool) *DelegationKToggles

func NewDelegationKToggles added in v0.1.1049

func NewDelegationKToggles(on bool, ks ...DelegationK) *DelegationKToggles

func (*DelegationKToggles) Disable added in v0.1.1049

func (t *DelegationKToggles) Disable(k DelegationK)

func (*DelegationKToggles) Enable added in v0.1.1049

func (t *DelegationKToggles) Enable(k DelegationK)

func (*DelegationKToggles) Get added in v0.1.1049

func (*DelegationKToggles) Set added in v0.1.1049

func (t *DelegationKToggles) Set(k DelegationK, on bool)

type DeleteManyHandlerOptions added in v0.1.1004

type DeleteManyHandlerOptions struct {
	Atz
	Bypass
	Filter        bson.M
	ValidateQuery bool
	InjectQuery   map[string][]string
	DeleteAll     bool
}

type DeleteManyOptions added in v0.0.5

type DeleteManyOptions struct {
	C         Col
	Filter    bson.M
	DeleteAll bool
}

func (*DeleteManyOptions) Val added in v0.1.1028

func (o *DeleteManyOptions) Val() error

type DeleteOneHandlerOptions added in v0.1.270

type DeleteOneHandlerOptions struct {
	Atz
	Bypass
}

type DeleteOneOptions added in v0.0.5

type DeleteOneOptions struct {
	C     Col
	IDKey string
	ID    Identifier
}

func (*DeleteOneOptions) Val added in v0.1.1028

func (o *DeleteOneOptions) Val() error

type DeleteStripeAccountOption added in v0.1.843

type DeleteStripeAccountOption = Opt[DeleteStripeAccountOptions]

func WithDeleteStripeAccountConnectedAccountPSPID added in v0.1.930

func WithDeleteStripeAccountConnectedAccountPSPID(x *ID) DeleteStripeAccountOption

type DeleteStripeAccountOptions added in v0.1.843

type DeleteStripeAccountOptions struct {
	StripeConnectedAccountPSPID
}

func ApplyDeleteStripeAccountOptions added in v0.1.843

func ApplyDeleteStripeAccountOptions(opts *DeleteStripeAccountOptions, modifiers ...DeleteStripeAccountOption) DeleteStripeAccountOptions

func (*DeleteStripeAccountOptions) Params added in v0.1.845

func (*DeleteStripeAccountOptions) Val added in v0.1.1028

type DeleteStripeBankAccountOption added in v0.1.843

type DeleteStripeBankAccountOption = Opt[DeleteStripeBankAccountOptions]

func WithDeleteStripeBankAccountBankAccountID added in v0.1.843

func WithDeleteStripeBankAccountBankAccountID(x *ID) DeleteStripeBankAccountOption

func WithDeleteStripeBankAccountConnectedAccountPSPID added in v0.1.930

func WithDeleteStripeBankAccountConnectedAccountPSPID(x *ID) DeleteStripeBankAccountOption

type DeleteStripeBankAccountOptions added in v0.1.843

type DeleteStripeBankAccountOptions struct {
	StripeConnectedAccountPSPID
	BankAccountID *ID
}

func ApplyDeleteStripeBankAccountOptions added in v0.1.843

func ApplyDeleteStripeBankAccountOptions(opts *DeleteStripeBankAccountOptions, modifiers ...DeleteStripeBankAccountOption) DeleteStripeBankAccountOptions

func (*DeleteStripeBankAccountOptions) Params added in v0.1.845

func (*DeleteStripeBankAccountOptions) Val added in v0.1.1028

type DialWebSocketOption added in v0.1.940

type DialWebSocketOption = Opt[DialWebSocketOptions]

func WithDialWebSocketEnableCompression added in v0.1.940

func WithDialWebSocketEnableCompression(x bool) DialWebSocketOption

func WithDialWebSocketHandshakeTimeout added in v0.1.940

func WithDialWebSocketHandshakeTimeout(x time.Duration) DialWebSocketOption

func WithDialWebSocketHeaders added in v0.1.940

func WithDialWebSocketHeaders(x http.Header) DialWebSocketOption

func WithDialWebSocketReadBufferSize added in v0.1.940

func WithDialWebSocketReadBufferSize(x int) DialWebSocketOption

func WithDialWebSocketSubprotocols added in v0.1.940

func WithDialWebSocketSubprotocols(x []string) DialWebSocketOption

func WithDialWebSocketURL added in v0.1.940

func WithDialWebSocketURL(x *url.URL) DialWebSocketOption

func WithDialWebSocketWriteBufferSize added in v0.1.940

func WithDialWebSocketWriteBufferSize(x int) DialWebSocketOption

type DialWebSocketOptions added in v0.1.940

type DialWebSocketOptions struct {
	URL               *url.URL
	Headers           http.Header
	HandshakeTimeout  time.Duration
	Subprotocols      []string
	ReadBufferSize    int
	WriteBufferSize   int
	EnableCompression bool
}

func ApplyDialWebSocketOptions added in v0.1.940

func ApplyDialWebSocketOptions(opts *DialWebSocketOptions, modifiers ...DialWebSocketOption) DialWebSocketOptions

func (*DialWebSocketOptions) Val added in v0.1.1028

func (o *DialWebSocketOptions) Val() error

type DownloadOption added in v0.1.1024

type DownloadOption = Opt[DownloadOptions]

func WithDownloadBucket added in v0.1.1024

func WithDownloadBucket(x Bucket) DownloadOption

func WithDownloadExpectedStatus added in v0.1.1024

func WithDownloadExpectedStatus(x int) DownloadOption

func WithDownloadForwardHeaders added in v0.1.1024

func WithDownloadForwardHeaders(x []string) DownloadOption

func WithDownloadPL added in v0.1.1024

func WithDownloadPL(x PLDownload) DownloadOption

func WithDownloadReceiver added in v0.1.1024

func WithDownloadReceiver(x any) DownloadOption

func WithDownloadRequest added in v0.1.1024

func WithDownloadRequest(x *http.Request) DownloadOption

type DownloadOptions added in v0.1.1021

type DownloadOptions struct {
	PL             PLDownload
	Receiver       any
	B              Bucket
	R              *http.Request
	ForwardHeaders []string
	ExpectedStatus int
}

func ApplyDownloadOptions added in v0.1.1024

func ApplyDownloadOptions(opts *DownloadOptions, modifiers ...DownloadOption) DownloadOptions

func (*DownloadOptions) Val added in v0.1.1028

func (o *DownloadOptions) Val() error

type Dt added in v0.1.637

type Dt struct {
	Y   *int64      `json:"y" validate:"nnpt,nz"`
	M   *time.Month `json:"m" validate:"nnpt,monthrange"`
	D   *int64      `json:"d" validate:"nnpt,dayrange"`
	H   *int64      `json:"h" validate:"nnpt,hourrange"`
	Min *int64      `json:"min" validate:"nnpt,minuterange"`
	Tz  *string     `json:"tz" validate:"nnpt,tz"`
}

func NewDt added in v0.1.639

func NewDt(opts ...DtOptions) *Dt

func NewDtExample added in v0.1.826

func NewDtExample() *Dt

NewDtExample returns a deterministic Dt with all fields set to 1.

func NewDtFromTime added in v0.1.637

func NewDtFromTime(t time.Time) *Dt

func (Dt) AddDays added in v0.1.642

func (d Dt) AddDays(ctx context.Context, g Geocoder, days int64) (Dt, error)

func (Dt) AddDuration added in v0.1.642

func (d Dt) AddDuration(ctx context.Context, g Geocoder, dur time.Duration) (Dt, error)

func (Dt) AddMonths added in v0.1.642

func (d Dt) AddMonths(ctx context.Context, g Geocoder, months int64) (Dt, error)

func (Dt) AddWeeks added in v0.1.642

func (d Dt) AddWeeks(ctx context.Context, g Geocoder, weeks int64) (Dt, error)

func (Dt) AddYears added in v0.1.642

func (d Dt) AddYears(ctx context.Context, g Geocoder, years int64) (Dt, error)

func (Dt) After added in v0.1.639

func (d Dt) After(ctx context.Context, g Geocoder, o Dt) (bool, error)

After reports whether d occurs after o.

func (Dt) AsUTC added in v0.1.639

func (d Dt) AsUTC() Dt

AsUTC returns a copy of d with tz set to UTC.

func (Dt) Before added in v0.1.639

func (d Dt) Before(ctx context.Context, g Geocoder, o Dt) (bool, error)

Before reports whether d occurs before o.

func (Dt) Compare added in v0.1.639

func (d Dt) Compare(ctx context.Context, g Geocoder, o Dt) (int, error)

Compare tri-state compares d and o (-1 if d<o, 0 if equal, 1 if d>o).

func (Dt) CompareDay added in v0.1.791

func (d Dt) CompareDay(ctx context.Context, g Geocoder, o Dt) (int, error)

CompareDay compares d and o by day precision (-1 if d<o, 0 if equal, 1 if d>o), using each Dt's own local timezone.

func (Dt) CompareDayIn added in v0.1.794

func (d Dt) CompareDayIn(ctx context.Context, g Geocoder, o Dt, tz string) (int, error)

CompareDayIn compares d and o by day after converting both to the provided IANA tz.

func (Dt) DateOnly added in v0.1.985

func (d Dt) DateOnly() string

func (Dt) Diff added in v0.1.641

func (d Dt) Diff(ctx context.Context, g Geocoder, o Dt) (time.Duration, error)

Diff returns d - o as a duration (in absolute time), comparing both instants in UTC.

func (*Dt) ForceUTC added in v0.1.639

func (d *Dt) ForceUTC()

ForceUTC sets d.Tz to UTC in place.

func (*Dt) GetD added in v0.1.639

func (d *Dt) GetD() int64

func (*Dt) GetH added in v0.1.639

func (d *Dt) GetH() int64

func (*Dt) GetM added in v0.1.639

func (d *Dt) GetM() time.Month

func (*Dt) GetMin added in v0.1.639

func (d *Dt) GetMin() int64

func (*Dt) GetTz added in v0.1.639

func (d *Dt) GetTz() string

func (*Dt) GetY added in v0.1.639

func (d *Dt) GetY() int64

func (Dt) Midnight added in v0.1.639

func (d Dt) Midnight() Dt

func (Dt) Round added in v0.1.640

func (d Dt) Round(ctx context.Context, g Geocoder, dur time.Duration) (Dt, error)

func (*Dt) SetD added in v0.1.639

func (d *Dt) SetD(x int64)

func (*Dt) SetH added in v0.1.639

func (d *Dt) SetH(x int64)

func (*Dt) SetM added in v0.1.639

func (d *Dt) SetM(x time.Month)

func (*Dt) SetMin added in v0.1.639

func (d *Dt) SetMin(x int64)

func (*Dt) SetTz added in v0.1.639

func (d *Dt) SetTz(x string)

func (*Dt) SetY added in v0.1.639

func (d *Dt) SetY(x int64)

func (Dt) Since added in v0.1.641

func (d Dt) Since(ctx context.Context, g Geocoder, o Dt) (time.Duration, error)

Since returns the duration between d and o as d - o (alias of Diff).

func (Dt) SubDuration added in v0.1.642

func (d Dt) SubDuration(ctx context.Context, g Geocoder, dur time.Duration) (Dt, error)

func (Dt) TimeLocal added in v0.1.639

func (d Dt) TimeLocal(ctx context.Context, g Geocoder) (time.Time, error)

func (Dt) TimeUTC added in v0.1.637

func (d Dt) TimeUTC(ctx context.Context, g Geocoder) (time.Time, error)

func (Dt) Until added in v0.1.641

func (d Dt) Until(ctx context.Context, g Geocoder, o Dt) (time.Duration, error)

Until returns the duration from d to o as o - d.

func (Dt) Weekday added in v0.1.644

func (d Dt) Weekday(ctx context.Context, g Geocoder) (time.Weekday, error)

func (Dt) WithTz added in v0.1.639

func (d Dt) WithTz(x string) Dt

WithTz returns a copy of d with tz set to x (no shifting).

type DtOptions added in v0.1.639

type DtOptions func(*Dt)

func WithDtD added in v0.1.639

func WithDtD(x int64) DtOptions

func WithDtH added in v0.1.639

func WithDtH(x int64) DtOptions

func WithDtM added in v0.1.639

func WithDtM(x time.Month) DtOptions

func WithDtMin added in v0.1.639

func WithDtMin(x int64) DtOptions

func WithDtTz added in v0.1.639

func WithDtTz(x string) DtOptions

func WithDtY added in v0.1.639

func WithDtY(x int64) DtOptions

type ElemMatchFilterOptions added in v0.0.5

type ElemMatchFilterOptions struct {
	ArrayField string
	Element    any
	PrependStr string
	AppendStr  string
}

type ElemsInArrayFilterOptions added in v0.0.5

type ElemsInArrayFilterOptions struct {
	ArrayField string
	Elements   []any
	PrependStr string
	AppendStr  string
}

type EmailByter added in v0.1.381

type EmailByter interface {
	Bytes(ctx context.Context, e *email.Email) ([]byte, error)
}

type EmailK added in v0.1.1080

type EmailK EmailTemplateType

func (EmailK) String added in v0.1.1080

func (x EmailK) String() string

func (*EmailK) Val added in v0.1.1080

func (x *EmailK) Val() error

type EmailKToggles added in v0.1.1080

type EmailKToggles map[EmailK]bool

func DefaultEmailKToggles added in v0.1.1080

func DefaultEmailKToggles(on bool) *EmailKToggles

func NewEmailKToggles added in v0.1.1080

func NewEmailKToggles(on bool, ks ...EmailK) *EmailKToggles

func (*EmailKToggles) Disable added in v0.1.1080

func (t *EmailKToggles) Disable(k EmailK)

func (*EmailKToggles) Enable added in v0.1.1080

func (t *EmailKToggles) Enable(k EmailK)

func (*EmailKToggles) Get added in v0.1.1080

func (t *EmailKToggles) Get(k EmailK) bool

func (*EmailKToggles) Set added in v0.1.1080

func (t *EmailKToggles) Set(k EmailK, on bool)

type EmailOperator added in v0.1.381

type EmailOperator interface {
	EmailPubSub
	EmailSender
}

type EmailPubSub added in v0.1.381

type EmailPubSub interface {
	NewPubSubEmail(ctx context.Context, opts NewPubSubEmailOptions) (*pubsub.Message, error)
	EncodeSpecifics(ctx context.Context, s EmailSpecifics) (string, error)
	GetSuspensionSentence(ctx context.Context, enumVal int) (EmailSuspensionReason, error)
}

type EmailSender added in v0.1.381

type EmailSender interface {
	SendEmail(ctx context.Context, opts SendEmailOptions) error
}

type EmailSenderInfo added in v0.1.394

type EmailSenderInfo struct {
	Name        string
	FromAddress string
	UserID      string
	ReplyTo     string
}

type EmailSpecifics added in v0.1.396

type EmailSpecifics map[string]string

type EmailSuspensionReason added in v0.1.396

type EmailSuspensionReason = string

type EmailTemplateType added in v0.1.396

type EmailTemplateType = string

type Emailable added in v0.1.385

type Emailable interface {
	Init(ctx context.Context, opts InitOptions) error
	GetSubject() string
	GetTemplateType() EmailTemplateType
}

type EmbedC added in v0.1.671

type EmbedC struct {
	Text    *string `json:"text" validate:"nnpt"`
	File    *[]byte `json:"file" validate:"nnpt"`
	FileURL *string `json:"file_url" validate:"nnpt"`
	MIME    *string `json:"mime" validate:"nnpt"`
}

func NewEmbedC added in v0.1.671

func NewEmbedC(opts ...EmbedCOption) *EmbedC

func (*EmbedC) GetFile added in v0.1.671

func (c *EmbedC) GetFile() []byte

func (*EmbedC) GetFileURL added in v0.1.671

func (c *EmbedC) GetFileURL() string

func (*EmbedC) GetMIME added in v0.1.671

func (c *EmbedC) GetMIME() string

func (*EmbedC) GetText added in v0.1.671

func (c *EmbedC) GetText() string

func (EmbedC) IsZero added in v0.1.671

func (c EmbedC) IsZero() bool

func (*EmbedC) SetFile added in v0.1.671

func (c *EmbedC) SetFile(x []byte)

func (*EmbedC) SetFileURL added in v0.1.671

func (c *EmbedC) SetFileURL(x string)

func (*EmbedC) SetMIME added in v0.1.671

func (c *EmbedC) SetMIME(x string)

func (*EmbedC) SetText added in v0.1.671

func (c *EmbedC) SetText(x string)

func (EmbedC) Val added in v0.1.1028

func (c EmbedC) Val() error

type EmbedCOption added in v0.1.796

type EmbedCOption = Opt[EmbedC]

func WithEmbedCFile added in v0.1.671

func WithEmbedCFile(x []byte) EmbedCOption

func WithEmbedCFileURL added in v0.1.671

func WithEmbedCFileURL(x string) EmbedCOption

func WithEmbedCMIME added in v0.1.671

func WithEmbedCMIME(x string) EmbedCOption

func WithEmbedCText added in v0.1.671

func WithEmbedCText(x string) EmbedCOption

type EmbedInput added in v0.1.668

type EmbedInput struct {
	EmbedC
	Modality *Modality
}

func NewEmbedInputFile added in v0.1.668

func NewEmbedInputFile(b []byte, mime string, m Modality) EmbedInput

func NewEmbedInputFileURL added in v0.1.668

func NewEmbedInputFileURL(u string, mime string, m Modality) EmbedInput

func NewEmbedInputText added in v0.1.668

func NewEmbedInputText(s string) EmbedInput

func (EmbedInput) IsZero added in v0.1.668

func (e EmbedInput) IsZero() bool

func (EmbedInput) Val added in v0.1.1028

func (e EmbedInput) Val() error

type EmbedR added in v0.1.672

type EmbedR struct {
	V                *[][]float32 `bson:"-" json:"-"`
	EmbeddingVersion *string      `json:"embedding_version" validate:"nnpt"`
	Dim              *int         `json:"dim" validate:"nnpt"`
	Modality         *Modality    `json:"modality" validate:"nnpt"`
}

func NewEmbedR added in v0.1.672

func NewEmbedR(opts ...EmbedROption) *EmbedR

func (*EmbedR) GetDim added in v0.1.672

func (e *EmbedR) GetDim() int

func (*EmbedR) GetEmbeddingVersion added in v0.1.672

func (e *EmbedR) GetEmbeddingVersion() string

func (*EmbedR) GetModality added in v0.1.672

func (e *EmbedR) GetModality() Modality

func (*EmbedR) GetV added in v0.1.672

func (e *EmbedR) GetV() [][]float32

func (*EmbedR) IsZero added in v0.1.743

func (e *EmbedR) IsZero() bool

func (*EmbedR) SetDim added in v0.1.672

func (e *EmbedR) SetDim(x int)

func (*EmbedR) SetEmbeddingVersion added in v0.1.672

func (e *EmbedR) SetEmbeddingVersion(x string)

func (*EmbedR) SetModality added in v0.1.672

func (e *EmbedR) SetModality(x Modality)

func (*EmbedR) SetV added in v0.1.672

func (e *EmbedR) SetV(x [][]float32)

func (*EmbedR) Val added in v0.1.1028

func (e *EmbedR) Val(expectN int) error

type EmbedROption added in v0.1.672

type EmbedROption = Opt[EmbedR]

func WithDim added in v0.1.672

func WithDim(x int) EmbedROption

func WithEmbedRV added in v0.1.672

func WithEmbedRV(x [][]float32) EmbedROption

func WithEmbeddingVersion added in v0.1.672

func WithEmbeddingVersion(x string) EmbedROption

func WithModality added in v0.1.672

func WithModality(x Modality) EmbedROption

type EmbedderOperator added in v0.1.661

type EmbedderOperator interface {
	GetTextEmbeddings(ctx context.Context, docs []string) (*EmbedR, error)
	GetImageEmbeddings(ctx context.Context, imgs []MediaInput) (*EmbedR, error)
	GetVideoEmbeddings(ctx context.Context, vids []MediaInput) (*EmbedR, error)
}

type EmbeddingIndexOptions added in v0.1.674

type EmbeddingIndexOptions struct {
	Field       string
	Additionals []string
}

type EmbeddingOptions added in v0.1.665

type EmbeddingOptions struct {
	I             EmbeddingIndexOptions
	Model         string
	TaskType      string
	NumDimensions int
	Quantization  string
	Similarity    string
	Modality      Modality
}

func DefaultImageEmbeddingOptions added in v0.1.668

func DefaultImageEmbeddingOptions(opts EmbeddingIndexOptions) EmbeddingOptions

func DefaultTextEmbeddingOptions added in v0.1.668

func DefaultTextEmbeddingOptions(opts EmbeddingIndexOptions) EmbeddingOptions

func DefaultVideoEmbeddingOptions added in v0.1.668

func DefaultVideoEmbeddingOptions(opts EmbeddingIndexOptions) EmbeddingOptions

func (*EmbeddingOptions) Val added in v0.1.1028

func (o *EmbeddingOptions) Val() error

type EnsureBucketOption added in v0.1.479

type EnsureBucketOption = Opt[EnsureBucketOptions]

func WithEnsureBucketAttrs added in v0.1.479

func WithEnsureBucketAttrs(x storage.BucketAttrs) EnsureBucketOption

func WithEnsureBucketName added in v0.1.479

func WithEnsureBucketName(x Bucket) EnsureBucketOption

type EnsureBucketOptions added in v0.1.479

type EnsureBucketOptions struct {
	Name Bucket
	A    storage.BucketAttrs
}

func ApplyEnsureBucketOptions added in v0.1.479

func ApplyEnsureBucketOptions(opts *EnsureBucketOptions, modifiers ...EnsureBucketOption) EnsureBucketOptions

type EnsureMembershipOption added in v0.1.948

type EnsureMembershipOption = Opt[EnsureMembershipOptions]

func WithEnsureMembershipMMIDs added in v0.1.952

func WithEnsureMembershipMMIDs(x []*ID) EnsureMembershipOption

func WithEnsureMembershipStore added in v0.1.952

func WithEnsureMembershipStore(x MembershipStore) EnsureMembershipOption

func WithEnsureMembershipWait added in v0.1.951

func WithEnsureMembershipWait(x bool) EnsureMembershipOption

func WithEnsureMembershipWaitTimeout added in v0.1.951

func WithEnsureMembershipWaitTimeout(x time.Duration) EnsureMembershipOption

type EnsureMembershipOptions added in v0.1.948

type EnsureMembershipOptions struct {
	MMIDs       []*ID
	S           MembershipStore
	Wait        bool
	WaitTimeout time.Duration
}

func ApplyEnsureMembershipOptions added in v0.1.948

func ApplyEnsureMembershipOptions(opts *EnsureMembershipOptions, modifiers ...EnsureMembershipOption) EnsureMembershipOptions

func (*EnsureMembershipOptions) Val added in v0.1.1028

func (o *EnsureMembershipOptions) Val() error

type Entry added in v0.1.10

type Entry struct {
	Handler HandlerFunc
	Weight  uint
}

Entry maps an HTTP handler to a request weight.

type Env added in v0.1.80

type Env string
const (
	Noop    Env = "noop"
	NoStore Env = "nostore"
	Dev     Env = "dev"
	Staging Env = "staging"
	Prod    Env = "prod"
)

func (Env) Val added in v0.1.1028

func (e Env) Val() error

type EnvInfo added in v0.1.105

type EnvInfo struct {
	E            Env
	L            Level
	Project      string
	Addr         string
	MongoConnStr string
	MongoCluster string
	RedisHost    string
	RedisPort    int
}

func ExtractEnvInfo added in v0.1.106

func ExtractEnvInfo() (*EnvInfo, error)

ExtractEnvInfo returns the current environment information.

type EnvironmentOperator added in v0.1.105

type EnvironmentOperator interface {
	Info(ctx context.Context) (EnvInfo, error)
	RewriteHost(ctx context.Context, u *url.URL) error
	Resolve(ctx context.Context, t, p any) (any, error)
}

type FQDN added in v0.1.603

type FQDN string

FQDN explicitly marks a fully-qualified domain name.

func (FQDN) String added in v0.1.603

func (f FQDN) String() string

type FSysFileReader

type FSysFileReader interface {
	FSysReadFile(ctx context.Context, fsys fs.ReadFileFS, path string) ([]byte, error)
}

type FSysOperator added in v0.1.377

type FSysOperator interface {
	SysboxFS(ctx context.Context) (*Sysbox, error)
	FSysFileReader
	FSysSubFSOperator
	FSysReadDirOperator
}

type FSysReadDirOperator added in v0.1.516

type FSysReadDirOperator interface {
	FSysReadDir(ctx context.Context, fsys fs.FS, path string) ([]fs.DirEntry, error)
}

type FSysSubFSOperator added in v0.1.377

type FSysSubFSOperator interface {
	FSysSub(ctx context.Context, fsys fs.FS, path string) (fs.FS, error)
}

type FactoryOperator added in v0.1.10

type FactoryOperator interface {
	PullFactoryOperator
	New(ctx context.Context, name string) (any, error)
	NewDefault(ctx context.Context, name string) (any, error)
}

type FeeTaxLine added in v0.1.1072

type FeeTaxLine struct {
	Name   string `json:"name" validate:"nz"`
	Amount uint64 `json:"amount" validate:"nz"`
}

FeeTaxLine represents a tax line for a fee.

type FeedReactionType added in v0.1.747

type FeedReactionType int64
const (
	FeedReport FeedReactionType = iota
	FeedDislike
	FeedLike
)

func (*FeedReactionType) Score added in v0.1.763

func (o *FeedReactionType) Score() int

func (*FeedReactionType) Val added in v0.1.1028

func (o *FeedReactionType) Val() error

type FetchManyOption added in v0.1.416

type FetchManyOption = Opt[FetchManyOptions]

func WithFetchManyAuthenticateWithSecret added in v0.1.1061

func WithFetchManyAuthenticateWithSecret(x bool) FetchManyOption

func WithFetchManyC added in v0.1.1028

func WithFetchManyC(x Col) FetchManyOption

func WithFetchManyMock added in v0.1.417

func WithFetchManyMock(x any) FetchManyOption

func WithFetchManyQuery added in v0.1.416

func WithFetchManyQuery(x map[string][]string) FetchManyOption

func WithFetchManyReceiver added in v0.1.416

func WithFetchManyReceiver(x any) FetchManyOption

func WithFetchManyRequest added in v0.1.416

func WithFetchManyRequest(x *http.Request) FetchManyOption

func WithFetchManySvc added in v0.1.1028

func WithFetchManySvc(x string) FetchManyOption

type FetchManyOptions added in v0.1.416

type FetchManyOptions struct {
	Cx
	Q map[string][]string
}

func ApplyFetchManyOptions added in v0.1.416

func ApplyFetchManyOptions(opts *FetchManyOptions, modifiers ...FetchManyOption) FetchManyOptions

func (*FetchManyOptions) Val added in v0.1.1028

func (o *FetchManyOptions) Val() error

type FetchOneOption added in v0.1.416

type FetchOneOption = Opt[FetchOneOptions]

func WithFetchOneAuthenticateWithSecret added in v0.1.1061

func WithFetchOneAuthenticateWithSecret(x bool) FetchOneOption

func WithFetchOneC added in v0.1.1028

func WithFetchOneC(x Col) FetchOneOption

func WithFetchOneID added in v0.1.416

func WithFetchOneID(x fmt.Stringer) FetchOneOption

func WithFetchOneMock added in v0.1.417

func WithFetchOneMock(x any) FetchOneOption

func WithFetchOneReceiver added in v0.1.416

func WithFetchOneReceiver(x any) FetchOneOption

func WithFetchOneRequest added in v0.1.416

func WithFetchOneRequest(x *http.Request) FetchOneOption

func WithFetchOneSvc added in v0.1.1028

func WithFetchOneSvc(x string) FetchOneOption

type FetchOneOptions added in v0.1.416

type FetchOneOptions struct {
	Cx
	ID fmt.Stringer
}

func ApplyFetchOneOptions added in v0.1.416

func ApplyFetchOneOptions(opts *FetchOneOptions, modifiers ...FetchOneOption) FetchOneOptions

func (*FetchOneOptions) Val added in v0.1.1028

func (o *FetchOneOptions) Val() error

type FetcherOperator added in v0.1.416

type FetcherOperator interface {
	FetchOne(ctx context.Context, opts FetchOneOptions) (any, error)
	FetchMany(ctx context.Context, opts FetchManyOptions) ([]any, error)
}

type FieldInArrayFilterOptions added in v0.0.5

type FieldInArrayFilterOptions struct {
	Field    string
	Elements []any
}

type FilterOptions added in v0.0.5

type FilterOptions struct {
	ConvertValues  bool
	QueryParams    map[string][]string
	MatchBehavior  MatchBehavior
	PrependStr     string
	AppendStr      string
	ExcludedFields []string
}

type FindManyHandlerOptions added in v0.1.270

type FindManyHandlerOptions struct {
	Atz
	Bypass
	Filter        bson.M
	SortDirection SortDirection
	Skip          int64
	Limit         int64
	ValidateQuery bool
	InjectQuery   map[string][]string
}

type FindManyOptions added in v0.0.5

type FindManyOptions struct {
	FindManyHandlerOptions
	C         Col
	Receiver  any
	SortByKey string
}

func (*FindManyOptions) Val added in v0.1.1028

func (o *FindManyOptions) Val() error

type FindObjectsOption added in v0.1.479

type FindObjectsOption = Opt[FindObjectsOptions]

func WithFindObjectsBucketName added in v0.1.479

func WithFindObjectsBucketName(x Bucket) FindObjectsOption

func WithFindObjectsQuery added in v0.1.479

func WithFindObjectsQuery(x *storage.Query) FindObjectsOption

type FindObjectsOptions added in v0.1.479

type FindObjectsOptions struct {
	BucketName Bucket
	Q          *storage.Query
}

func ApplyFindObjectsOptions added in v0.1.479

func ApplyFindObjectsOptions(opts *FindObjectsOptions, modifiers ...FindObjectsOption) FindObjectsOptions

func (*FindObjectsOptions) Val added in v0.1.1028

func (o *FindObjectsOptions) Val() error

type FindOneHandlerOptions added in v0.1.360

type FindOneHandlerOptions struct {
	Bypass
}

type FindOneOptions added in v0.0.5

type FindOneOptions struct {
	C        Col
	Receiver any
	IDKey    string
	ID       Identifier
}

func (*FindOneOptions) Val added in v0.1.1028

func (o *FindOneOptions) Val() error

type FirebaseAuthenticator added in v0.1.178

type FirebaseAuthenticator interface {
	AuthenticateFirebaseIDToken(ctx context.Context, r *http.Request, opts AuthOptions) error
}

type FirebaseInitializer added in v0.1.583

type FirebaseInitializer interface {
	InitFirebase(ctx context.Context, credentialsJSON []byte) (*firebase.App, error)
}

type FirebaseMockUser added in v0.1.220

type FirebaseMockUser struct {
	Email    string
	Password string
}

type FirebaseTester added in v0.1.219

type FirebaseTester interface {
	CreateMockUser(ctx context.Context) (*FirebaseMockUser, error)
}

type FirebaseUser added in v0.1.1019

type FirebaseUser interface {
	DeleteUserByEmail(ctx context.Context, email string) error
}

type FirebaseUtil added in v0.1.178

type FirebaseUtil interface {
	FirebaseIDToken(ctx context.Context, u FirebaseMockUser, apiKey string) (string, error)
	GenerateMockFirebaseUID(ctx context.Context, length int) (string, error)
	GetAPIKey(ctx context.Context) (string, error)
}

type FormatWebSocketCloseMessageOption added in v0.1.940

type FormatWebSocketCloseMessageOption = Opt[FormatWebSocketCloseMessageOptions]

func WithFormatWebSocketCloseMessageCode added in v0.1.940

func WithFormatWebSocketCloseMessageCode(x int) FormatWebSocketCloseMessageOption

func WithFormatWebSocketCloseMessageText added in v0.1.940

func WithFormatWebSocketCloseMessageText(x string) FormatWebSocketCloseMessageOption

type FormatWebSocketCloseMessageOptions added in v0.1.940

type FormatWebSocketCloseMessageOptions struct {
	Code int
	Text string
}

func ApplyFormatWebSocketCloseMessageOptions added in v0.1.940

func ApplyFormatWebSocketCloseMessageOptions(opts *FormatWebSocketCloseMessageOptions, modifiers ...FormatWebSocketCloseMessageOption) FormatWebSocketCloseMessageOptions

func (*FormatWebSocketCloseMessageOptions) Val added in v0.1.1028

type GenerateSignedObjectURLsOption added in v0.1.479

type GenerateSignedObjectURLsOption = Opt[GenerateSignedObjectURLsOptions]

func WithGenerateSignedObjectURLsAttrs added in v0.1.479

func WithGenerateSignedObjectURLsAttrs(x []*storage.ObjectAttrs) GenerateSignedObjectURLsOption

func WithGenerateSignedObjectURLsBucketName added in v0.1.479

func WithGenerateSignedObjectURLsBucketName(x Bucket) GenerateSignedObjectURLsOption

func WithGenerateSignedObjectURLsOpts added in v0.1.479

func WithGenerateSignedObjectURLsOpts(x *storage.SignedURLOptions) GenerateSignedObjectURLsOption

type GenerateSignedObjectURLsOptions added in v0.1.479

type GenerateSignedObjectURLsOptions struct {
	BucketName Bucket
	Attrs      []*storage.ObjectAttrs
	Opts       *storage.SignedURLOptions
}

func ApplyGenerateSignedObjectURLsOptions added in v0.1.479

func ApplyGenerateSignedObjectURLsOptions(opts *GenerateSignedObjectURLsOptions, modifiers ...GenerateSignedObjectURLsOption) GenerateSignedObjectURLsOptions

func (*GenerateSignedObjectURLsOptions) Val added in v0.1.1028

type GenerateUsernameOption added in v0.1.426

type GenerateUsernameOption = Opt[GenerateUsernameOptions]

func WithBaseDigit added in v0.1.426

func WithBaseDigit(x int) GenerateUsernameOption

func WithLenUsernameMax added in v0.1.431

func WithLenUsernameMax(x int) GenerateUsernameOption

func WithLenUsernameMin added in v0.1.431

func WithLenUsernameMin(x int) GenerateUsernameOption

func WithMaxPerWord added in v0.1.456

func WithMaxPerWord(x int) GenerateUsernameOption

func WithWords added in v0.1.456

func WithWords(x []string) GenerateUsernameOption

type GenerateUsernameOptions added in v0.1.426

type GenerateUsernameOptions struct {
	LenUsernameMin int
	LenUsernameMax int
	BaseDigit      int
	MaxPerWord     int
	Words          []string
}

func ApplyGenerateUsernameOptions added in v0.1.426

func ApplyGenerateUsernameOptions(opts *GenerateUsernameOptions, modifiers ...GenerateUsernameOption) GenerateUsernameOptions

func (*GenerateUsernameOptions) Val added in v0.1.1028

func (o *GenerateUsernameOptions) Val() error

type Generator added in v0.1.426

type Generator interface {
	GenerateUsername(ctx context.Context, opts GenerateUsernameOptions) (string, error)
	ReverseString(ctx context.Context, s string) (string, error)
}

type Geocoder

type Geocoder interface {
	TimezoneFromCoordinates(ctx context.Context, latitude, longitude float64) (string, error)
	CityFromCoordinates(ctx context.Context, latitude, longitude float64) (string, error)
	TimezoneDataFromCoordinates(ctx context.Context, latitude, longitude float64) (*maps.TimezoneResult, error)
	GeocodeCoordinates(ctx context.Context, latitude, longitude float64) ([]maps.GeocodingResult, error)
	SwapTimezone(ctx context.Context, t time.Time, tz string, toUTC, toMidnight bool) (time.Time, error)
	LoadLocation(ctx context.Context, l string) (*time.Location, error)
	IsUTC(ctx context.Context, t time.Time) (bool, error)
}

type GmailMessager added in v0.1.381

type GmailMessager interface {
	Message(u *gmail.UsersMessagesSendCall, opts ...googleapi.CallOption) (*gmail.Message, error)
}

type GmailService added in v0.1.381

type GmailService any

type GmailUsersMessageService added in v0.1.381

type GmailUsersMessageService interface {
	Send(userID string, message *gmail.Message) *gmail.UsersMessagesSendCall
}

type GoogleIAPClient added in v0.1.1105

type GoogleIAPClient interface {
	VerifyProduct(ctx context.Context, packageName string, token string) (*androidpublisher.ProductPurchaseV2, error)
	VerifySubscription(ctx context.Context, packageName string, token string) (*androidpublisher.SubscriptionPurchaseV2, error)
}

type GoogleMaps added in v0.0.5

type GoogleMaps interface {
	Timezone(ctx context.Context, r *maps.TimezoneRequest) (*maps.TimezoneResult, error)
	Geocode(ctx context.Context, r *maps.GeocodingRequest) ([]maps.GeocodingResult, error)
}

type GoogleRouteOptimization added in v0.1.780

type GoogleRouteOptimization interface {
	Closer
	OptimizeTours(ctx context.Context, req *routeoptimizationpb.OptimizeToursRequest, opts ...gax.CallOption) (*routeoptimizationpb.OptimizeToursResponse, error)
}

type GoogleStorage added in v0.1.479

type GoogleStorage interface {
	Bucket(name string) *storage.BucketHandle
	Close() error
}

type GoogleVideoIntelligence added in v0.1.477

type GoogleVideoIntelligence interface {
	AnnotateVideo(ctx context.Context, req *videointelligencepb.AnnotateVideoRequest, opts ...gax.CallOption) (*videointelligence.AnnotateVideoOperation, error)
	Close() error
}

type GoogleVision added in v0.1.478

type GoogleVision interface {
	BatchAnnotateImages(ctx context.Context, req *visionpb.BatchAnnotateImagesRequest, opts ...gax.CallOption) (*visionpb.BatchAnnotateImagesResponse, error)
	Close() error
}

type GrokOperator added in v0.1.702

type GrokOperator interface{ GrokPrompter }

type GrokPrompter added in v0.1.702

type GrokPrompter interface {
	PrompterOperator
}

type GrokRequest added in v0.1.702

type GrokRequest struct {
	Model       string                `json:"model"`
	M           []PromptMessage       `json:"messages"`
	Stream      bool                  `json:"stream,omitempty"`
	Temperature float64               `json:"temperature,omitempty"`
	R           *PromptResponseFormat `json:"response_format,omitempty"`
}

type GrokResponse added in v0.1.702

type GrokResponse struct {
	ID      string `json:"id"`
	Object  string `json:"object"`
	Created int    `json:"created"`
	Model   string `json:"model"`
	Choices []struct {
		Index   int `json:"index"`
		Message struct {
			Role    string `json:"role"`
			Content string `json:"content"`
			Refusal string `json:"refusal,omitempty"`
		} `json:"message"`
		FinishReason string `json:"finish_reason"`
	} `json:"choices"`
	Usage struct {
		PromptTokens        int `json:"prompt_tokens"`
		CompletionTokens    int `json:"completion_tokens"`
		TotalTokens         int `json:"total_tokens"`
		PromptTokensDetails struct {
			TextTokens   int `json:"text_tokens"`
			AudioTokens  int `json:"audio_tokens"`
			ImageTokens  int `json:"image_tokens"`
			CachedTokens int `json:"cached_tokens"`
		} `json:"prompt_tokens_details"`
	} `json:"usage"`
	SystemFingerprint string `json:"system_fingerprint"`
}
type GrpLink interface {
	GrpID() *ID
}

type Guard added in v0.1.830

type Guard[T any] struct {
	G    func() T
	S    func(T)
	Cond func(T) bool
	Fix  T
}

Guard runs Cond on G() and, if true, calls S(Fix).

func NewGuard added in v0.1.832

func NewGuard[T any](g func() T, s func(T), cond func(T) bool, fix T) Guard[T]

func NewNegativeGuard added in v0.1.830

func NewNegativeGuard[T Signed](g func() T, s func(T)) Guard[T]

NewNegativeGuard builds a Guard that zeroes negative values.

func (Guard[T]) Apply added in v0.1.830

func (g Guard[T]) Apply()

type GuardRunner added in v0.1.830

type GuardRunner interface{ Apply() }

type GzipReader

type GzipReader interface {
	Read(ctx context.Context, r io.Reader) (io.Reader, error)
}

type GzipUtil

type GzipUtil interface {
	WriteGzip(ctx context.Context, w *gzip.Writer, r io.Reader) error
	CloseGzipWriter(ctx context.Context, w *gzip.Writer) error
	ReadGzip(ctx context.Context, r io.Reader) ([]byte, error)
	NewGzipReader(ctx context.Context, r io.Reader) (*gzip.Reader, error)
	CopyToBuffer(ctx context.Context, r *gzip.Reader, buf *bytes.Buffer) error
	CloseGzipReader(ctx context.Context, r *gzip.Reader) error
}

type GzipWriter

type GzipWriter interface {
	Write(ctx context.Context, r io.Reader) (io.Reader, int64, error)
}

type HTTPClient added in v0.0.5

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type HTTPDoer

type HTTPDoer interface {
	Do(ctx context.Context, r *http.Request) (*http.Response, error)
	DoWithTimeout(ctx context.Context, r *http.Request, t time.Duration) (*http.Response, error)
}

type HTTPFileOpener added in v0.1.377

type HTTPFileOpener interface {
	OpenFile(ctx context.Context, fsys http.FileSystem, name string) (http.File, error)
}

type HTTPFormParser added in v0.1.796

type HTTPFormParser interface {
	ParseForm(ctx context.Context, r *http.Request) error
}

type HTTPHTML added in v0.1.5

type HTTPHTML interface {
	ServeHTML(ctx context.Context, w http.ResponseWriter, body io.Reader, status int) error
}

type HTTPOperator added in v0.1.377

type HTTPOperator interface {
	HTTPResponder
	HTTPUtil
	HTTPHTML
	HTTPDoer
}

type HTTPRequester

type HTTPRequester interface {
	NewRequest(ctx context.Context, method, url string, opts RequestOptions) (*http.Request, error)
}

type HTTPResponder added in v0.1.5

type HTTPResponder interface {
	RespondJSON(ctx context.Context, w http.ResponseWriter, v any, status int, escapeHTML bool) error
}

type HTTPResponseWriter added in v0.1.14

type HTTPResponseWriter interface {
	Header() http.Header
	Write([]byte) (int, error)
	WriteHeader(statusCode int)
}

type HTTPServer added in v0.1.10

type HTTPServer interface {
	ListenAndServe() error
	ListenAndServeTLS(certFile string, keyFile string) error
	Shutdown(ctx context.Context) error
}

type HTTPUtil added in v0.1.5

type HTTPUtil interface {
	QueryString(ctx context.Context, pairs ...string) (string, error)
	ValidateQueryParams(ctx context.Context, q map[string][]string, rules ...QueryParamRule) error
	CopyHeaders(ctx context.Context, dst, src *http.Request, headers ...string) error
	GetHeaders(ctx context.Context, r *http.Request) (http.Header, error)
	DecodeBody(ctx context.Context, r *http.Request, v any) error
	SetQueryParams(ctx context.Context, r *http.Request, q map[string][]string, override bool) error
	ServeFile(ctx context.Context, opts ServeFileOptions) error
	ServeContent(ctx context.Context, opts ServeContentOptions) error
}

type HTTPWriter

type HTTPWriter interface {
	Write(ctx context.Context, w http.ResponseWriter, b []byte) (int, error)
}

type HandlerFunc added in v0.1.11

type HandlerFunc func(w http.ResponseWriter, r *http.Request) error

HandlerFunc defines a handler function.

func (HandlerFunc) Wrap added in v0.1.11

type IAPOperator added in v0.1.1104

type IAPOperator interface {
	VerifyApple(ctx context.Context, opts VerifyAppleOptions) (*VerifiedPurchase, error)
	VerifyGoogle(ctx context.Context, opts VerifyGoogleOptions) (*VerifiedPurchase, error)
}

type ID added in v0.0.8

type ID struct {
	V *string `json:"id" validate:"nnpt"`
}

ID is a custom type for database-agnostic unique IDs.

func NewID added in v0.0.8

func NewID() *ID

func NewIDFromQVals added in v0.1.61

func NewIDFromQVals(q config.QVals) *ID

func NewIDFromString added in v0.0.8

func NewIDFromString(v string) *ID

func NewIDsFromStrings added in v0.1.781

func NewIDsFromStrings(vs []string) []*ID

func NewZeroID added in v0.1.748

func NewZeroID() *ID

func (ID) Equal added in v0.1.628

func (id ID) Equal(other Identifier) bool

func (*ID) GetV added in v0.0.8

func (id *ID) GetV() string

func (*ID) IsEmpty added in v0.0.8

func (id *ID) IsEmpty() bool

func (*ID) MarshalJSON added in v0.1.40

func (id *ID) MarshalJSON() ([]byte, error)

func (*ID) SetV added in v0.0.8

func (id *ID) SetV(x string)

func (ID) String added in v0.0.8

func (id ID) String() string

func (*ID) UnmarshalJSON added in v0.1.40

func (id *ID) UnmarshalJSON(data []byte) error

type IDDecoder added in v0.1.317

type IDDecoder struct{}

func (IDDecoder) DecodeValue added in v0.1.317

func (IDDecoder) DecodeValue(_ bson.DecodeContext, vr bson.ValueReader, val reflect.Value) error

type IDEncoder added in v0.1.317

type IDEncoder struct{}

func (IDEncoder) EncodeValue added in v0.1.317

func (IDEncoder) EncodeValue(_ bson.EncodeContext, vw bson.ValueWriter, val reflect.Value) error

type Identifiable added in v0.0.5

type Identifiable interface {
	GetID() ID
	GetCreatedAt() time.Time
}

func ToIdentifiable added in v0.1.1014

func ToIdentifiable(v any) (Identifiable, error)

ToIdentifiable asserts a value to an Identifiable.

type Identifier added in v0.0.5

type Identifier interface {
	GetV() string
	SetV(string)
	IsEmpty() bool
	Equal(Identifier) bool
	fmt.Stringer
	json.Marshaler
	json.Unmarshaler
}

type ImageIntelOperator added in v0.1.478

type ImageIntelOperator interface {
	IntelOperator
}

type IndexEntry added in v0.0.5

type IndexEntry struct {
	Name               *string
	Field              string
	SortDirection      SortDirection
	ExpireAfterSeconds *int32
}

type Indexable added in v0.1.211

type Indexable interface {
	Idx(c Col) CreateIndexesOptions
	IdxSrch(c Col) CreateSearchIndexesOptions
}

type InitOption added in v0.1.385

type InitOption = Opt[InitOptions]

func WithInitUnmarshaler added in v0.1.392

func WithInitUnmarshaler(x Unmarshaler) InitOption

func WithRecipientEmail added in v0.1.385

func WithRecipientEmail(x string) InitOption

func WithRecipientUsername added in v0.1.385

func WithRecipientUsername(x string) InitOption

func WithRedirectURL added in v0.1.1099

func WithRedirectURL(x string) InitOption

func WithSpecifics added in v0.1.385

func WithSpecifics(x string) InitOption

func WithTargetLanguage added in v0.1.385

func WithTargetLanguage(x string) InitOption

type InitOptions added in v0.1.385

type InitOptions struct {
	U                 Unmarshaler
	TargetLanguage    string
	RecipientEmail    string
	RecipientUsername string
	RedirectURL       string
	Specifics         string
}

func ApplyInitOptions added in v0.1.385

func ApplyInitOptions(opts *InitOptions, modifiers ...InitOption) InitOptions

type InsertOneHandlerOptions added in v0.1.270

type InsertOneHandlerOptions struct {
	Atz
	Bypass
}

type InsertOneOptions added in v0.0.5

type InsertOneOptions struct {
	C        Col
	Document Identifiable
}

func (*InsertOneOptions) Val added in v0.1.1028

func (o *InsertOneOptions) Val() error

type IntelOperator added in v0.1.478

type IntelOperator interface {
	IsForbidden(ctx context.Context, r io.Reader) (bool, error)
	ScanMany(ctx context.Context, files []*BucketFile) ([]*BucketScan, error)
	CloserWithCtx
}

type IsFinishedOption added in v0.1.1052

type IsFinishedOption = Opt[IsFinishedOptions]

func WithIsFinishedCur added in v0.1.1052

func WithIsFinishedCur(x int64) IsFinishedOption

func WithIsFinishedEndDate added in v0.1.1052

func WithIsFinishedEndDate(x *Dt) IsFinishedOption

func WithIsFinishedEndType added in v0.1.1052

func WithIsFinishedEndType(x RecurrenceEndType) IsFinishedOption

func WithIsFinishedMax added in v0.1.1052

func WithIsFinishedMax(x int64) IsFinishedOption

func WithIsFinishedNow added in v0.1.1052

func WithIsFinishedNow(x *Dt) IsFinishedOption

type IsFinishedOptions added in v0.1.1052

type IsFinishedOptions struct {
	Now     *Dt
	EndType RecurrenceEndType
	EndDate *Dt
	Cur     int64
	Max     int64
}

func ApplyIsFinishedOptions added in v0.1.1052

func ApplyIsFinishedOptions(opts *IsFinishedOptions, modifiers ...IsFinishedOption) IsFinishedOptions

func (*IsFinishedOptions) Val added in v0.1.1052

func (o *IsFinishedOptions) Val() error

type IsUnexpectedWebSocketCloseErrorOption added in v0.1.940

type IsUnexpectedWebSocketCloseErrorOption = Opt[IsUnexpectedWebSocketCloseErrorOptions]

func WithIsUnexpectedWebSocketCloseErrorErr added in v0.1.940

func WithIsUnexpectedWebSocketCloseErrorErr(x error) IsUnexpectedWebSocketCloseErrorOption

func WithIsUnexpectedWebSocketCloseErrorExpectedCodes added in v0.1.940

func WithIsUnexpectedWebSocketCloseErrorExpectedCodes(x []int) IsUnexpectedWebSocketCloseErrorOption

type IsUnexpectedWebSocketCloseErrorOptions added in v0.1.940

type IsUnexpectedWebSocketCloseErrorOptions struct {
	Err           error
	ExpectedCodes []int
}

func (*IsUnexpectedWebSocketCloseErrorOptions) Val added in v0.1.1028

type JSONOption

type JSONOption = Opt[JSONOptions]

func WithJSONEscapeHTML

func WithJSONEscapeHTML(escape bool) JSONOption

func WithJSONIndent

func WithJSONIndent(indent string) JSONOption

func WithJSONUseNumber

func WithJSONUseNumber(use bool) JSONOption

type JSONOptions

type JSONOptions struct {
	Indent     string // Enables indentation if non-empty.
	EscapeHTML bool   // Determines if HTML characters should be escaped.
	UseNumber  bool   // If true, decodes numbers as `json.Number` instead of `float64`.
}

JSONOptions defines settings for encoding/decoding.

func ApplyJSONOptions

func ApplyJSONOptions(opts *JSONOptions, modifiers ...JSONOption) JSONOptions

type Level

type Level = slog.Level
const (
	Debug         Level = slog.LevelDebug
	Info          Level = slog.LevelInfo
	Warn          Level = slog.LevelWarn
	Error         Level = slog.LevelError
	Sep                 = "__________"
	DefaultMaxLen       = 1000
)

type LibraryOperator added in v0.1.45

type LibraryOperator interface {
	Svc(context.Context) (string, error)
	HeaderKeyUserID(context.Context) (string, error)
}

type LimiterInfo added in v0.1.11

type LimiterInfo interface {
	GetMaxScore(ctx context.Context) (uint, error)
	GetHeaderKey(ctx context.Context) (string, error)
	GetRateLimitingMode(ctx context.Context) (string, error)
}

type LimiterOperator added in v0.1.10

type LimiterOperator interface {
	Engage(next HandlerFunc) HandlerFunc
	LimiterInfo
}

type LinkStripeBankAccountOption added in v0.1.843

type LinkStripeBankAccountOption = Opt[LinkStripeBankAccountOptions]

func WithLinkStripeBankAccountAccountHolderName added in v0.1.843

func WithLinkStripeBankAccountAccountHolderName(x string) LinkStripeBankAccountOption

func WithLinkStripeBankAccountAccountHolderType added in v0.1.843

func WithLinkStripeBankAccountAccountHolderType(x string) LinkStripeBankAccountOption

func WithLinkStripeBankAccountAccountNumber added in v0.1.843

func WithLinkStripeBankAccountAccountNumber(x string) LinkStripeBankAccountOption

func WithLinkStripeBankAccountConnectedAccountPSPID added in v0.1.930

func WithLinkStripeBankAccountConnectedAccountPSPID(x *ID) LinkStripeBankAccountOption

func WithLinkStripeBankAccountCountry added in v0.1.844

func WithLinkStripeBankAccountCountry(x string) LinkStripeBankAccountOption

func WithLinkStripeBankAccountCurrency added in v0.1.844

func WithLinkStripeBankAccountCurrency(x string) LinkStripeBankAccountOption

func WithLinkStripeBankAccountMetadata added in v0.1.843

func WithLinkStripeBankAccountMetadata(x map[string]string) LinkStripeBankAccountOption

func WithLinkStripeBankAccountRoutingNumber added in v0.1.843

func WithLinkStripeBankAccountRoutingNumber(x string) LinkStripeBankAccountOption

type LinkStripeBankAccountOptions added in v0.1.843

type LinkStripeBankAccountOptions struct {
	StripeConnectedAccountPSPID
	AccountHolderName string
	AccountHolderType string
	AccountNumber     string
	RoutingNumber     string
	Country           string
	Currency          string
	Metadata          map[string]string
}

func ApplyLinkStripeBankAccountOptions added in v0.1.843

func ApplyLinkStripeBankAccountOptions(opts *LinkStripeBankAccountOptions, modifiers ...LinkStripeBankAccountOption) LinkStripeBankAccountOptions

func (*LinkStripeBankAccountOptions) Params added in v0.1.845

func (*LinkStripeBankAccountOptions) Val added in v0.1.1028

type LocationType added in v0.1.1049

type LocationType = string

type LockReason added in v0.1.1006

type LockReason string

LockReason defines the cause for which an account is locked.

func (*LockReason) Val added in v0.1.1028

func (x *LockReason) Val() error

type LogOperator added in v0.1.10

type LogOperator interface {
	Log(ctx context.Context, l Level, v any, prefix string, msg ...string)
	Wrap(ctx context.Context, fn func() (any, error)) error
	WrapHandler(h HandlerFunc) HandlerFunc
	WrapMiddleware(m MiddlewareFunc) MiddlewareFunc
}

type MajorUnit added in v0.1.10

type MajorUnit = float64

type Marshaler

type Marshaler interface {
	Marshal(ctx context.Context, v any, opts JSONOptions) ([]byte, error)
}

type MatchBehavior added in v0.0.5

type MatchBehavior = string

MatchBehavior defines different matching behaviors in MongoDB queries, such as in, all, and eq.

type MediaInput added in v0.1.756

type MediaInput struct {
	Bytes *[]byte
	URL   *string
	MIME  string
}

func NewEmbedderMediaBytes added in v0.1.668

func NewEmbedderMediaBytes(b []byte, mime string) MediaInput

func NewEmbedderMediaURL added in v0.1.668

func NewEmbedderMediaURL(u string, mime string) MediaInput

func (MediaInput) IsZero added in v0.1.756

func (e MediaInput) IsZero() bool

func (MediaInput) Val added in v0.1.1028

func (e MediaInput) Val() error

Val enforces that one (and only one) source is present and if Bytes is used, MIME must be non-empty.

type MediaOperator added in v0.1.498

type MediaOperator interface {
	CompressImage(ctx context.Context, opts CompressImageOptions) error
	CompressVideo(ctx context.Context, opts CompressVideoOptions) error
	CompressAudio(ctx context.Context, opts CompressAudioOptions) error
}

type MembershipOperator added in v0.1.948

type MembershipOperator interface {
	EnsureMembership(ctx context.Context, opts EnsureMembershipOptions) (*ID, error)
}

type MembershipStore added in v0.1.952

type MembershipStore interface {
	FindLinksByMMID(ctx context.Context, mmID ID) ([]GrpLink, error)
	GrpSize(ctx context.Context, grpID ID) (int, error)
	CreateGrp(ctx context.Context) (*ID, error)
	CreateLinks(ctx context.Context, grpID ID, mmIDs []ID) error
}

type MessageRole added in v0.1.245

type MessageRole = string

MessageRole represents the role of a message.

const (
	GrokDefaultModel = "grok-4-fast-reasoning"
	// MessageRoleSystem is the role for the system message.
	MessageRoleSystem MessageRole = "system"
	// MessageRoleUser is the role for the user message.
	MessageRoleUser MessageRole = "user"
	// MessageRoleAssistant is the role for the assistant message.
	MessageRoleAssistant MessageRole = "assistant"
	// GrokChatCompletionURL is the URL for the Grok LLM API.
	GrokChatCompletionURL = "https://api.x.ai/v1/chat/completions"
)

type MiddlewareFunc added in v0.1.10

type MiddlewareFunc func(HandlerFunc) HandlerFunc

MiddlewareFunc defines a composable middleware around a HandlerFunc.

type MiddlewareOperator added in v0.1.10

type MiddlewareOperator interface {
	Chain(fns ...MiddlewareFunc) MiddlewareFunc
	Gzip(next HandlerFunc) HandlerFunc
	EnforceHTTPS(next HandlerFunc) HandlerFunc
	CheckHeaders(next HandlerFunc) HandlerFunc
	CleanURLPath(next HandlerFunc) HandlerFunc
	EnforceIdempotency(next HandlerFunc) HandlerFunc
	RequireReader(next HandlerFunc) HandlerFunc
	RequireWriter(next HandlerFunc) HandlerFunc
	RequireOwner(next HandlerFunc) HandlerFunc
	AuthenticateFirebaseIDToken(next HandlerFunc) HandlerFunc
	AuthenticateFirebaseModIDToken(next HandlerFunc) HandlerFunc
	AuthenticateOIDCToken(next HandlerFunc) HandlerFunc
	AuthenticateWithSecret(next HandlerFunc) HandlerFunc
	AuthenticateAny(next HandlerFunc) HandlerFunc
	BridgePubSubIdempotency(next HandlerFunc) HandlerFunc
	ConsumeCredits(op CreditOp, cols ...Col) MiddlewareFunc
}

type MintVideoTokenOption added in v0.1.796

type MintVideoTokenOption = Opt[MintVideoTokenOptions]

func WithMintVideoTokenRoomID added in v0.1.796

func WithMintVideoTokenRoomID(x *ID) MintVideoTokenOption

func WithMintVideoTokenTTL added in v0.1.796

func WithMintVideoTokenTTL(x time.Duration) MintVideoTokenOption

func WithMintVideoTokenUserID added in v0.1.796

func WithMintVideoTokenUserID(x *ID) MintVideoTokenOption

type MintVideoTokenOptions added in v0.1.796

type MintVideoTokenOptions struct {
	TTL    time.Duration
	UserID *ID
	RoomID *ID
}

func ApplyMintVideoTokenOptions added in v0.1.796

func ApplyMintVideoTokenOptions(opts *MintVideoTokenOptions, modifiers ...MintVideoTokenOption) MintVideoTokenOptions

type Modality added in v0.1.668

type Modality string

func (Modality) EmbeddingOptions added in v0.1.725

func (m Modality) EmbeddingOptions(opts EmbeddingIndexOptions) EmbeddingOptions

func (Modality) IsUnset added in v0.1.743

func (m Modality) IsUnset() bool

func (Modality) Pointer added in v0.1.668

func (m Modality) Pointer() *Modality

func (Modality) String added in v0.1.730

func (m Modality) String() string

func (Modality) Val added in v0.1.1028

func (m Modality) Val() error

type Money added in v0.1.819

type Money struct{ *gm.Money }

Money is Fabriktor's curated wrapper around go-money.Money.

func NewMoney added in v0.1.819

func NewMoney(opts ...MoneyOption) *Money

func NewMoneyFrom added in v0.1.819

func NewMoneyFrom(m *gm.Money) *Money

type MoneyOperator added in v0.1.819

type MoneyOperator interface {
	BankersRound(ctx context.Context, a float64) (int64, error)
	Add(ctx context.Context, a, b *Money) (*Money, error)
	Subtract(ctx context.Context, a, b *Money) (*Money, error)
	Sum(ctx context.Context, a *Money, rest ...*Money) (*Money, error)
	SumSlice(ctx context.Context, s []*Money) (*Money, error)
	Amount(ctx context.Context, m *Money) (int64, error)
	Display(ctx context.Context, m *Money) (string, error)
}

type MoneyOption added in v0.1.819

type MoneyOption = Opt[moneyOptions]

func WithMoneyAmount added in v0.1.819

func WithMoneyAmount(x int64) MoneyOption

func WithMoneyCurrency added in v0.1.819

func WithMoneyCurrency(x string) MoneyOption

type MongoChangeStream added in v0.0.5

type MongoChangeStream interface {
	Close(ctx context.Context) error
	Next(ctx context.Context) bool
	Err() error
}

type MongoClient added in v0.0.5

type MongoClient interface {
	Database(name string, opts ...options.Lister[options.DatabaseOptions]) *mongo.Database
	StartSession(opts ...options.Lister[options.SessionOptions]) (*mongo.Session, error)
	Disconnect(ctx context.Context) error
}

type MongoCollection added in v0.0.5

type MongoCollection interface {
	Clone(opts ...options.Lister[options.CollectionOptions]) *mongo.Collection
	InsertOne(ctx context.Context, document any, opts ...options.Lister[options.InsertOneOptions]) (*mongo.InsertOneResult, error)
	FindOne(ctx context.Context, filter any, opts ...options.Lister[options.FindOneOptions]) *mongo.SingleResult
	Find(ctx context.Context, filter any, opts ...options.Lister[options.FindOptions]) (*mongo.Cursor, error)
	ReplaceOne(ctx context.Context, filter any, document any, opts ...options.Lister[options.ReplaceOptions]) (*mongo.UpdateResult, error)
	DeleteOne(ctx context.Context, filter any, opts ...options.Lister[options.DeleteOneOptions]) (*mongo.DeleteResult, error)
	DeleteMany(ctx context.Context, filter any, opts ...options.Lister[options.DeleteManyOptions]) (*mongo.DeleteResult, error)
	Aggregate(ctx context.Context, pipeline any, opts ...options.Lister[options.AggregateOptions]) (*mongo.Cursor, error)
	Watch(ctx context.Context, pipeline any, opts ...options.Lister[options.ChangeStreamOptions]) (*mongo.ChangeStream, error)
}

type MongoCursor added in v0.0.5

type MongoCursor interface {
	Next(ctx context.Context) bool
	Decode(receiver any) error
	Err() error
}

type MongoDatabase added in v0.0.5

type MongoDatabase interface {
	Watch(ctx context.Context, pipeline any, opts ...options.Lister[options.ChangeStreamOptions]) (*mongo.ChangeStream, error)
}

type MongoFilter added in v0.0.5

type MongoFilter interface {
	Filter(ctx context.Context, opts FilterOptions) (bson.M, error)
	FilterByFieldInArray(ctx context.Context, opts FieldInArrayFilterOptions) (bson.M, error)
	FilterByElemMatch(ctx context.Context, opts ElemMatchFilterOptions) (bson.M, error)
	FilterByElemsInArray(ctx context.Context, opts ElemsInArrayFilterOptions) (bson.M, error)
	FilterByAllElemsInArray(ctx context.Context, opts ElemsInArrayFilterOptions) (bson.M, error)
	FilterByFutureDate(ctx context.Context, opts DateFilterOptions) (bson.D, error)
	FilterByPastDate(ctx context.Context, opts DateFilterOptions) (bson.D, error)
	FilterByExactDate(ctx context.Context, opts DateFilterOptions) (bson.D, error)
	CombineM(ctx context.Context, op BSONOperator, m ...bson.M) (bson.M, error)
}

type MongoLookupTarget added in v0.0.5

type MongoLookupTarget = string

MongoLookupTarget specifies the target field for the lookup stage in a MongoDB aggregation pipeline.

type MongoOperationType added in v0.1.953

type MongoOperationType = string

MongoOperationType represents the operationType field of MongoDB change stream events.

type MongoOperator added in v0.0.5

type MongoOperator interface {
	MongoUtil
	MongoFilter
	MongoSpecialized
	CloserWithCtx
}

type MongoOutCSChan added in v0.0.5

type MongoOutCSChan = chan *ChangeEvent

MongoOutCSChan is a channel type used for sending decoded MongoDB change events.

type MongoPipeliner added in v0.0.5

type MongoPipeliner interface {
	Pipeline() mongo.Pipeline
}

func NewPipeline added in v0.1.334

func NewPipeline(p mongo.Pipeline) MongoPipeliner

func NewPipelineReembedding added in v0.1.723

func NewPipelineReembedding(opts ReembeddingOptions) MongoPipeliner

type MongoSpecialized added in v0.0.5

type MongoSpecialized interface {
	Search(ctx context.Context, opts SearchOptions) (*SearchResult, error)
	WatchCollection(ctx context.Context, opts WatchCollectionOptions) error
	WatchDB(ctx context.Context, opts WatchDBOptions) error
	ProcessChangeStream(ctx context.Context, opts ProcessChangeStreamOptions) error
	RunPipeline(ctx context.Context, opts RunPipelineOptions) ([]any, error)
	WalkPipeline(ctx context.Context, opts WalkPipelineOptions) error
	CountFromPipeline(ctx context.Context, opts CountFromPipelineOptions) (int64, error)
}

type MongoUtil added in v0.0.5

type MongoUtil interface {
	WithTransaction(ctx context.Context, fn func(ctx context.Context) error) error
	Collection(ctx context.Context, db string, c Col) (MongoCollection, error)
	Database(ctx context.Context, db string) (MongoDatabase, error)
}

type MongoVerb added in v0.0.5

type MongoVerb = string

MongoVerb defines a MongoDB operation keyword, such as match.

type MultipartBodyOption added in v0.1.515

type MultipartBodyOption = Opt[MultipartBodyOptions]

func WithMultipartBodyFiles added in v0.1.515

func WithMultipartBodyFiles(x []*MultipartFile) MultipartBodyOption

type MultipartBodyOptions added in v0.1.515

type MultipartBodyOptions struct {
	Files []*MultipartFile
}

func ApplyMultipartBodyOptions added in v0.1.515

func ApplyMultipartBodyOptions(opts *MultipartBodyOptions, modifiers ...MultipartBodyOption) MultipartBodyOptions

type MultipartFile added in v0.1.515

type MultipartFile struct {
	Data     []byte
	FileName string
}

type MultipartOperator added in v0.1.498

type MultipartOperator interface {
	NewMultipartBodySingle(ctx context.Context, f MultipartFile) (io.Reader, string, error)
	NewMultipartBodyMany(ctx context.Context, f []MultipartFile) (io.Reader, string, error)
	Store(ctx context.Context, r *http.Request, opts StoreOptions) error
	DecodeMultipartRequest(ctx context.Context, r *http.Request, fullQuality bool) ([]*BucketFile, error)
}

type NewAttributesOption added in v0.1.1054

type NewAttributesOption = Opt[NewAttributesOptions]

func WithNewAttributesAttrs added in v0.1.1054

func WithNewAttributesAttrs(x []string) NewAttributesOption

func WithNewAttributesWithIdempotency added in v0.1.1054

func WithNewAttributesWithIdempotency(x bool) NewAttributesOption

type NewAttributesOptions added in v0.1.1054

type NewAttributesOptions struct {
	Attrs           []string
	WithIdempotency bool
}

func ApplyNewAttributesOptions added in v0.1.1054

func ApplyNewAttributesOptions(opts *NewAttributesOptions, modifiers ...NewAttributesOption) NewAttributesOptions

func (*NewAttributesOptions) Val added in v0.1.1054

func (o *NewAttributesOptions) Val() error

type NewPubSubEmailOption added in v0.1.1084

type NewPubSubEmailOption = Opt[NewPubSubEmailOptions]

func WithNewPubSubEmailE added in v0.1.1084

func WithNewPubSubEmailE(x EmailTemplateType) NewPubSubEmailOption

func WithNewPubSubEmailRecipientEmail added in v0.1.1084

func WithNewPubSubEmailRecipientEmail(x string) NewPubSubEmailOption

func WithNewPubSubEmailRecipientID added in v0.1.1084

func WithNewPubSubEmailRecipientID(x string) NewPubSubEmailOption

func WithNewPubSubEmailRecipientUsername added in v0.1.1084

func WithNewPubSubEmailRecipientUsername(x string) NewPubSubEmailOption

func WithNewPubSubEmailS added in v0.1.1084

func WithNewPubSubEmailS(x EmailSpecifics) NewPubSubEmailOption

func WithNewPubSubEmailTargetLanguage added in v0.1.1084

func WithNewPubSubEmailTargetLanguage(x string) NewPubSubEmailOption

type NewPubSubEmailOptions added in v0.1.1084

type NewPubSubEmailOptions struct {
	E                 EmailTemplateType
	TargetLanguage    string
	RecipientEmail    string
	RecipientUsername string
	RecipientID       string
	S                 EmailSpecifics
}

func ApplyNewPubSubEmailOptions added in v0.1.1084

func ApplyNewPubSubEmailOptions(opts *NewPubSubEmailOptions, modifiers ...NewPubSubEmailOption) NewPubSubEmailOptions

type NextDateOption added in v0.1.1052

type NextDateOption = Opt[NextDateOptions]

func WithNextDateRT added in v0.1.1052

func WithNextDateRT(x RecurrenceType) NextDateOption

func WithNextDateRate added in v0.1.1052

func WithNextDateRate(x int64) NextDateOption

func WithNextDateStart added in v0.1.1052

func WithNextDateStart(x *Dt) NextDateOption

type NextDateOptions added in v0.1.1052

type NextDateOptions struct {
	Start *Dt
	RT    RecurrenceType
	Rate  int64
}

func ApplyNextDateOptions added in v0.1.1052

func ApplyNextDateOptions(opts *NextDateOptions, modifiers ...NextDateOption) NextDateOptions

func (*NextDateOptions) Val added in v0.1.1052

func (o *NextDateOptions) Val() error

type NormalizeOption added in v0.1.336

type NormalizeOption = Opt[NormalizeOptions]

func WithRemoveDiacritics added in v0.1.336

func WithRemoveDiacritics() NormalizeOption

func WithRemoveDigits added in v0.1.336

func WithRemoveDigits() NormalizeOption

func WithRemoveNonASCII added in v0.1.336

func WithRemoveNonASCII() NormalizeOption

func WithRemovePunctuation added in v0.1.336

func WithRemovePunctuation() NormalizeOption

func WithRemoveSymbols added in v0.1.336

func WithRemoveSymbols() NormalizeOption

func WithToLower added in v0.1.336

func WithToLower() NormalizeOption

func WithTrimSpace added in v0.1.336

func WithTrimSpace() NormalizeOption

type NormalizeOptions added in v0.1.336

type NormalizeOptions struct {
	ToLower        bool
	RemoveDiacs    bool
	TrimSpace      bool
	RemovePunct    bool
	RemoveSpec     bool
	RemoveDigits   bool
	RemoveNonASCII bool
}

func ApplyNormalizeOptions added in v0.1.336

func ApplyNormalizeOptions(opts *NormalizeOptions, modifiers ...NormalizeOption) NormalizeOptions

type Normalizer added in v0.1.336

type Normalizer interface {
	Normalize(ctx context.Context, s string, opts NormalizeOptions) (string, error)
}

type NotifK added in v0.1.1041

type NotifK string

func (NotifK) String added in v0.1.1041

func (x NotifK) String() string

func (*NotifK) Val added in v0.1.1046

func (x *NotifK) Val() error

type NotifKToggles added in v0.1.1043

type NotifKToggles map[NotifK]bool

func DefaultNotifKToggles added in v0.1.1043

func DefaultNotifKToggles(on bool) *NotifKToggles

func NewNotifKToggles added in v0.1.1043

func NewNotifKToggles(on bool, ks ...NotifK) *NotifKToggles

func (*NotifKToggles) Disable added in v0.1.1043

func (t *NotifKToggles) Disable(k NotifK)

func (*NotifKToggles) Enable added in v0.1.1043

func (t *NotifKToggles) Enable(k NotifK)

func (*NotifKToggles) Get added in v0.1.1043

func (t *NotifKToggles) Get(k NotifK) bool

func (*NotifKToggles) Set added in v0.1.1043

func (t *NotifKToggles) Set(k NotifK, on bool)

type NotifOperator added in v0.1.583

type NotifOperator interface{ Notifier }

type NotifR added in v0.1.1041

type NotifR string

func (NotifR) String added in v0.1.1041

func (x NotifR) String() string

type NotificationOptions added in v0.1.583

type NotificationOptions struct {
	TranslatedTitle string
	TranslatedBody  string
	Tokens          []string
	CustomData      map[string]string
	CustomSound     *string
	CustomImage     *string
	MaxTokensLen    int
}

func (*NotificationOptions) Val added in v0.1.1028

func (o *NotificationOptions) Val(max int) error

type Notifier added in v0.1.583

type Notifier interface {
	SendNotif(ctx context.Context, opts NotificationOptions) (*SendResult, error)
	BatchSendNotif(ctx context.Context, opts NotificationOptions) (*BatchSendResult, error)
}

type OIDCAuthenticator added in v0.1.178

type OIDCAuthenticator interface {
	AuthenticateOIDCToken(ctx context.Context, r *http.Request, opts AuthOptions) error
}

type OIDCCreator added in v0.1.178

type OIDCCreator interface {
	CreateOIDCToken(ctx context.Context) (*oauth2.Token, error)
}

type OIDCOperator added in v0.1.178

type OIDCOperator interface {
	OIDCAuthenticator
	OIDCCreator
}

type OpenStripeAccountOption added in v0.1.843

type OpenStripeAccountOption = Opt[OpenStripeAccountOptions]

func WithOpenStripeAccountCountry added in v0.1.843

func WithOpenStripeAccountCountry(x string) OpenStripeAccountOption

func WithOpenStripeAccountCurrency added in v0.1.843

func WithOpenStripeAccountCurrency(x string) OpenStripeAccountOption

func WithOpenStripeAccountEmail added in v0.1.843

func WithOpenStripeAccountEmail(x string) OpenStripeAccountOption

func WithOpenStripeAccountMetadata added in v0.1.923

func WithOpenStripeAccountMetadata(x map[string]string) OpenStripeAccountOption

type OpenStripeAccountOptions added in v0.1.843

type OpenStripeAccountOptions struct {
	Country  string
	Currency string
	Email    string
	Metadata map[string]string
}

func ApplyOpenStripeAccountOptions added in v0.1.843

func ApplyOpenStripeAccountOptions(opts *OpenStripeAccountOptions, modifiers ...OpenStripeAccountOption) OpenStripeAccountOptions

func (*OpenStripeAccountOptions) Params added in v0.1.845

func (*OpenStripeAccountOptions) Val added in v0.1.1028

type OpenStripePaymentOption added in v0.1.843

type OpenStripePaymentOption = Opt[OpenStripePaymentOptions]

func WithOpenStripePaymentAmount added in v0.1.843

func WithOpenStripePaymentAmount(x int64) OpenStripePaymentOption

func WithOpenStripePaymentAppFeesRate added in v0.1.845

func WithOpenStripePaymentAppFeesRate(x int64) OpenStripePaymentOption

func WithOpenStripePaymentBypass added in v0.1.843

func WithOpenStripePaymentBypass(x bool) OpenStripePaymentOption

func WithOpenStripePaymentConnectedAccountPSPID added in v0.1.930

func WithOpenStripePaymentConnectedAccountPSPID(x *ID) OpenStripePaymentOption

func WithOpenStripePaymentCurrency added in v0.1.843

func WithOpenStripePaymentCurrency(x string) OpenStripePaymentOption

func WithOpenStripePaymentCustomerPSPID added in v0.1.932

func WithOpenStripePaymentCustomerPSPID(x *ID) OpenStripePaymentOption

func WithOpenStripePaymentHasSeparateFees added in v0.1.1070

func WithOpenStripePaymentHasSeparateFees(x bool) OpenStripePaymentOption

func WithOpenStripePaymentMetadata added in v0.1.843

func WithOpenStripePaymentMetadata(x map[string]string) OpenStripePaymentOption

func WithOpenStripePaymentOffSession added in v0.1.843

func WithOpenStripePaymentOffSession(x bool) OpenStripePaymentOption

func WithOpenStripePaymentPaidToPlatform added in v0.1.936

func WithOpenStripePaymentPaidToPlatform(x bool) OpenStripePaymentOption

func WithOpenStripePaymentPaymentMethodPSPID added in v0.1.929

func WithOpenStripePaymentPaymentMethodPSPID(x *ID) OpenStripePaymentOption

func WithOpenStripePaymentReceiptEmail added in v0.1.843

func WithOpenStripePaymentReceiptEmail(x string) OpenStripePaymentOption

func WithOpenStripePaymentReturnURL added in v0.1.843

func WithOpenStripePaymentReturnURL(x string) OpenStripePaymentOption

func WithOpenStripePaymentUseStripeSDK added in v0.1.843

func WithOpenStripePaymentUseStripeSDK(x bool) OpenStripePaymentOption

type OpenStripePaymentOptions added in v0.1.843

type OpenStripePaymentOptions struct {
	StripeConnectedAccountPSPID
	StripeCustomerPSPID
	StripeBypass
	PaymentMethodPSPID *ID
	UseStripeSDK       bool
	OffSession         bool
	HasSeparateFees    bool
	PaidToPlatform     bool
	Currency           string
	ReturnURL          string
	ReceiptEmail       string
	Amount             int64
	Metadata           map[string]string
	// AppFeesRate is the application fee rate stored as a fraction of 1 scaled by 100000.
	AppFeesRate int64
}

func ApplyOpenStripePaymentOptions added in v0.1.843

func ApplyOpenStripePaymentOptions(opts *OpenStripePaymentOptions, modifiers ...OpenStripePaymentOption) OpenStripePaymentOptions

func (*OpenStripePaymentOptions) Params added in v0.1.845

func (*OpenStripePaymentOptions) Val added in v0.1.1028

type Opener added in v0.1.498

type Opener interface {
	Open(ctx context.Context, path string) (io.ReadCloser, error)
}

type OperationResult added in v0.1.56

type OperationResult struct {
	// Message is the optional operation message.
	Message string `json:"message,omitempty"`
	// ID is the optional ressource identifier.
	ID *ID `json:"id,omitempty"`
	// Value is an optional result object.
	Value any `json:"value,omitempty"`
}

OperationResult is a general-purpose response struct.

func NewOperationResult added in v0.1.57

func NewOperationResult(opts ...OperationResultOption) *OperationResult

type OperationResultOption added in v0.1.56

type OperationResultOption = Opt[OperationResult]

func WithID added in v0.1.56

func WithID(x *ID) OperationResultOption

func WithMessage added in v0.1.56

func WithMessage(x string) OperationResultOption

func WithValue added in v0.1.56

func WithValue(x any) OperationResultOption

type Opt added in v0.1.795

type Opt[T any] func(*T)

type PLDownload added in v0.1.1021

type PLDownload struct {
	OwnerID    *ID    `json:"owner_id" validate:"nz"`
	MimePrefix string `json:"mime_prefix"`
	Expire     bool   `json:"expire"`
}

type PLMembership added in v0.1.948

type PLMembership interface {
	MMIDs() []*ID
}

type PLPull added in v0.1.675

type PLPull interface {
	GetOwnerID() ID
	GetSessionToken() string
	GetIsNewSession() bool
	GetPullType() PullType
	GetEntityID() ID
}

type PSPActionableStatus added in v0.1.846

type PSPActionableStatus string

PSPActionableStatus represents the provider-reported execution state of an operation, including whether further action is required.

func (*PSPActionableStatus) Val added in v0.1.1028

func (x *PSPActionableStatus) Val() error

type PSPBankAccountHolderType added in v0.1.849

type PSPBankAccountHolderType string

PSPBankAccountHolderType represents the provider-reported type of bank account holder.

func (*PSPBankAccountHolderType) Val added in v0.1.1028

type PSPEventType added in v0.1.927

type PSPEventType string

PSPEventType represents the provider-reported webhook event type.

func (*PSPEventType) Val added in v0.1.1028

func (x *PSPEventType) Val() error

type PSPExpiryStatus added in v0.1.845

type PSPExpiryStatus string

PSPExpiryStatus represents the provider-reported expiration state of a payment instrument.

func (*PSPExpiryStatus) Val added in v0.1.1028

func (x *PSPExpiryStatus) Val() error

type PSPFeesPayer added in v0.1.848

type PSPFeesPayer string

PSPFeesPayer represents the provider-reported party responsible for paying fees.

func (*PSPFeesPayer) Val added in v0.1.1028

func (x *PSPFeesPayer) Val() error

type PSPPaymentStatus added in v0.1.848

type PSPPaymentStatus string

PSPPaymentStatus represents the provider-reported settlement state of a payment.

func (*PSPPaymentStatus) Val added in v0.1.1028

func (x *PSPPaymentStatus) Val() error

type PSPRefundReason added in v0.1.847

type PSPRefundReason string

PSPRefundReason represents the provider-reported reason for a refund.

func (*PSPRefundReason) Val added in v0.1.1028

func (x *PSPRefundReason) Val() error

type PState added in v0.1.699

type PState map[string]*Blob

func (PState) IDKeys added in v0.1.755

func (p PState) IDKeys() []*ID

func (PState) Keys added in v0.1.755

func (p PState) Keys() []string

type PaginationOptions added in v0.0.5

type PaginationOptions struct {
	PageNumber int32
	PageSize   int32
}

func (*PaginationOptions) Val added in v0.1.1028

func (p *PaginationOptions) Val() error

type Parser added in v0.1.336

type Parser interface {
	ParseDynamicType(ctx context.Context, s string) (any, error)
	ParseQueryString(ctx context.Context, s string) (map[string][]string, error)
}

type Path added in v0.1.684

type Path = string

func NewPath added in v0.1.998

func NewPath(s ...string) Path

type PayType added in v0.1.828

type PayType string

func (PayType) Equal added in v0.1.841

func (x PayType) Equal(other PayType) bool

func (*PayType) Val added in v0.1.1028

func (x *PayType) Val() error

type PaymentEntityType added in v0.1.848

type PaymentEntityType string

PaymentEntityType represents the application-level type of entity a payment is associated with.

func (*PaymentEntityType) HasSeparateFees added in v0.1.1070

func (x *PaymentEntityType) HasSeparateFees() (bool, error)

HasSeparateFees reports whether fees are charged in a distinct payment for this payment entity type.

func (*PaymentEntityType) Val added in v0.1.1028

func (x *PaymentEntityType) Val() error

type PaymentKind added in v0.1.1071

type PaymentKind string

PaymentKind represents the type of payment within a payment flow.

func (*PaymentKind) Val added in v0.1.1071

func (x *PaymentKind) Val() error

type PeriodOperator added in v0.1.10

type PeriodOperator interface {
	FirstPeriodStartDate(ctx context.Context, year int) (*Dt, error)
	LastDayOfLastPeriod(ctx context.Context, year int) (*Dt, error)
	FirstDayOfMonth(ctx context.Context, date *Dt) (*Dt, error)
	PeriodNumber(ctx context.Context, date *Dt) (int, error)
	TimeOfPeriodWeekday(ctx context.Context, date *Dt, w time.Weekday) (*Dt, error)
	PeriodBounds(ctx context.Context, date *Dt) (*Dt, *Dt, error)
	CloneWithOffset(ctx context.Context, x int) (PeriodOperator, error)
}

type PoolOperator added in v0.1.10

type PoolOperator interface {
	Acquire(ctx context.Context) error
	Release(ctx context.Context) error
	ActiveWorkers(ctx context.Context) (int, error)
	WaitAll(ctx context.Context) error
	Shutdown(ctx context.Context) error
	CloneWithConcurrency(ctx context.Context, x int) (PoolOperator, error)
}

type PostType added in v0.1.699

type PostType string

func (PostType) String added in v0.1.699

func (p PostType) String() string

func (*PostType) Val added in v0.1.1028

func (p *PostType) Val() error

type ProcessChangeStreamOptions added in v0.0.5

type ProcessChangeStreamOptions struct {
	ChangeStream MongoChangeStream
	LookupKey    string
	Receiver     any
	Output       MongoOutCSChan
}

type Prompt added in v0.1.721

type Prompt struct {
	SystemPrompt string
	UserPrompt   string
}

type PromptMessage added in v0.1.245

type PromptMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

PromptMessage represents a message in the conversation. For contextual messages, see:

type PromptOption added in v0.1.698

type PromptOption = Opt[PromptOptions]

func WithPromptAdditionalOpts added in v0.1.698

func WithPromptAdditionalOpts(x map[string]any) PromptOption

func WithPromptContext added in v0.1.698

func WithPromptContext(x []PromptMessage) PromptOption

func WithPromptResponseFormat added in v0.1.698

func WithPromptResponseFormat(x *PromptResponseFormat) PromptOption

func WithPromptSystemPrompt added in v0.1.698

func WithPromptSystemPrompt(x string) PromptOption

func WithPromptTemperature added in v0.1.698

func WithPromptTemperature(x float64) PromptOption

func WithPromptUserPrompt added in v0.1.698

func WithPromptUserPrompt(x string) PromptOption

type PromptOptions added in v0.1.698

type PromptOptions struct {
	Prompt
	Context        []PromptMessage
	Temperature    float64
	R              *PromptResponseFormat
	AdditionalOpts map[string]any
}

func ApplyPromptOptions added in v0.1.698

func ApplyPromptOptions(opts *PromptOptions, modifiers ...PromptOption) PromptOptions

type PromptResponseFormat added in v0.1.245

type PromptResponseFormat struct {
	Type       string        `json:"type"`
	JSONSchema *schemaFormat `json:"json_schema,omitempty"`
}

PromptResponseFormat represents the response format customization.

type PrompterOperator added in v0.1.702

type PrompterOperator interface {
	Prompt(ctx context.Context, opts PromptOptions) (string, error)
}

type PubSubAdminOperator added in v0.1.609

type PubSubAdminOperator interface {
	CreateTopic(ctx context.Context, req *pubsubpb.Topic) (*pubsubpb.Topic, error)
	CreateSubscription(ctx context.Context, req *pubsubpb.Subscription) (*pubsubpb.Subscription, error)
	GetTopic(ctx context.Context, req *pubsubpb.GetTopicRequest) (*pubsubpb.Topic, error)
	ListTopicSubscriptions(ctx context.Context, req *pubsubpb.ListTopicSubscriptionsRequest) *pubsubapiv1.StringIterator
}

type PubSubClient added in v0.1.162

type PubSubClient interface {
	Publisher(topicNameOrID string) *pubsub.Publisher
	Subscriber(subNameOrID string) *pubsub.Subscriber
	Closer
}

type PubSubFamily added in v0.1.162

type PubSubFamily struct {
	Topic             *PubSubTopic
	PushSubscriptions []*PubSubPushSubscription
	PullSubscriptions []*PubSubPullSubscription
}

type PubSubKey added in v0.1.366

type PubSubKey = string

func ToPubSubKey added in v0.1.366

func ToPubSubKey(s string) PubSubKey

ToPubSubKey converts a string to lowercase.

type PubSubMessage added in v0.0.5

type PubSubMessage interface {
	GetData() []byte
	GetAttributes() map[string]string
	GetMessageID() string
	GetPublishTime() time.Time
}

type PubSubOperator added in v0.1.10

type PubSubOperator interface {
	MockPayload(ctx context.Context, msg PubSubMessage, sub string) (*PubSubPayload, error)
	DecodePayload(ctx context.Context, r *http.Request) (PubSubMessage, error)
	Publish(ctx context.Context, topicID string, msg *pubsub.Message) error
	NewMessage(ctx context.Context, data string, attrs map[string]string) (*pubsub.Message, error)
	NewAttributes(ctx context.Context, opts NewAttributesOptions) (map[string]string, error)
	CloserWithCtx
}

type PubSubPayload added in v0.1.367

type PubSubPayload struct {
	Message      pubsub.Message `json:"message"`
	Subscription string         `json:"subscription,omitempty"`
}

type PubSubPullSubscription added in v0.1.162

type PubSubPullSubscription struct {
	ID string
}

type PubSubPushSubscription added in v0.1.162

type PubSubPushSubscription struct {
	ID           string
	PushEndpoint string
}

type PubSubTopic added in v0.1.162

type PubSubTopic struct {
	ID string
}

type PullFactoryOperator added in v0.1.676

type PullFactoryOperator interface {
	NewPullPayload(ctx context.Context, ressource string) (PLPull, error)
	NewPullSession(ctx context.Context, ressource string) (PullSession, error)
	NewPullSubFunc(ctx context.Context, ressource string, p PullType) (PullSubFunc, error)
}

type PullHandlerOptions added in v0.1.681

type PullHandlerOptions struct {
	SessionRessource string
}

type PullSession added in v0.1.680

type PullSession interface {
	SeedFromPull(p PLPull)
}

type PullSubFunc added in v0.1.676

type PullSubFunc func(ctx context.Context, opts PullSubFuncOptions) (any, error)

type PullSubFuncOption added in v0.1.685

type PullSubFuncOption = Opt[PullSubFuncOptions]

func WithPullSubFuncPayload added in v0.1.685

func WithPullSubFuncPayload(x PLPull) PullSubFuncOption

func WithPullSubFuncRequest added in v0.1.685

func WithPullSubFuncRequest(x *http.Request) PullSubFuncOption

func WithPullSubFuncSession added in v0.1.685

func WithPullSubFuncSession(x PullSession) PullSubFuncOption

func WithPullSubFuncToolbox added in v0.1.685

func WithPullSubFuncToolbox(x any) PullSubFuncOption

type PullSubFuncOptions added in v0.1.685

type PullSubFuncOptions struct {
	R       *http.Request
	Toolbox any
	S       PullSession
	PL      PLPull
}

func ApplyPullSubFuncOptions added in v0.1.685

func ApplyPullSubFuncOptions(opts *PullSubFuncOptions, modifiers ...PullSubFuncOption) PullSubFuncOptions

type PullType added in v0.1.687

type PullType uint
const (
	PullTypeBatch PullType = iota
	PullTypeSingle
	PullTypeKeepAlive
	PullTypeResearch
	PullTypeReactions
	PullTypeReferences
	PullTypeReplies
	PullTypeProfilePosts
	PullTypeProfileReplies
	PullTypeProfileMedias
)

type PunchMode added in v0.1.699

type PunchMode string

func (PunchMode) Val added in v0.1.1028

func (p PunchMode) Val() error

type PunchStatus added in v0.1.699

type PunchStatus string

func (PunchStatus) Val added in v0.1.1028

func (p PunchStatus) Val() error

type PunchType added in v0.1.699

type PunchType string

func (PunchType) Val added in v0.1.1028

func (p PunchType) Val() error

type PurchaseKind added in v0.1.1104

type PurchaseKind string

PurchaseKind defines the type of in-app purchase.

func (*PurchaseKind) Val added in v0.1.1104

func (x *PurchaseKind) Val() error

type PurgeOption added in v0.1.1011

type PurgeOption = Opt[PurgeOptions]

func WithPurgeC added in v0.1.1028

func WithPurgeC(x Col) PurgeOption

func WithPurgeRequest added in v0.1.1011

func WithPurgeRequest(x *http.Request) PurgeOption

func WithPurgeScope added in v0.1.1011

func WithPurgeScope(x Scope) PurgeOption

func WithPurgeSvc added in v0.1.1011

func WithPurgeSvc(x string) PurgeOption

type PurgeOptions added in v0.1.1011

type PurgeOptions struct {
	Svc string
	C   Col
	S   Scope
	R   *http.Request
}

func ApplyPurgeOptions added in v0.1.1012

func ApplyPurgeOptions(opts *PurgeOptions, modifiers ...PurgeOption) PurgeOptions

func (*PurgeOptions) Val added in v0.1.1028

func (o *PurgeOptions) Val() error

type PurgerOperator added in v0.1.1011

type PurgerOperator interface {
	Purge(ctx context.Context, opts PurgeOptions) (int64, error)
}

type QRCode added in v0.1.594

type QRCode struct {
	Content         io.Reader
	BgColor         color.Color
	FgColor         color.Color
	BorderWidth     uint8
	BlockWidth      uint8
	WithCircleShape bool
	WithWatermark   bool
}

type QROperator added in v0.1.594

type QROperator interface {
	Generate(ctx context.Context, x QRCode) ([]byte, error)
}

type QueryHandlerOptions added in v0.1.274

type QueryHandlerOptions struct {
	Atz
	Bypass
}

type QueryParamRule added in v0.1.5

type QueryParamRule struct {
	Key                   string   // Name of the query parameter.
	DefaultValue          string   // Default value if not provided in the request.
	AcceptedValues        []string // Accepted values; nil allows any value.
	MultipleValuesAllowed bool     // Whether multiple values are permitted.
	Optional              bool     // Whether the parameter is optional.
}

QueryParamRule defines validation rules for a query parameter. It specifies constraints such as key, default value, allowed values, and multiplicity.

type QueryParamRules added in v0.1.72

type QueryParamRules []QueryParamRule

func (*QueryParamRules) AppendMany added in v0.1.73

func (q *QueryParamRules) AppendMany(r QueryParamRules)

AppendMany appends multiple QueryParamRules to the QueryParamRules.

func (*QueryParamRules) AppendOne added in v0.1.73

func (q *QueryParamRules) AppendOne(r QueryParamRule)

AppendOne appends a QueryParamRule to the QueryParamRules.

type Queryable added in v0.1.68

type Queryable interface {
	Rules() QueryParamRules
}

type RangeOption added in v0.1.338

type RangeOption = Opt[RangeOptions]

func WithMax added in v0.1.338

func WithMax(x float64) RangeOption

func WithMin added in v0.1.338

func WithMin(x float64) RangeOption

type RangeOptions added in v0.1.338

type RangeOptions struct {
	Min float64
	Max float64
}

func ApplyRangeOptions added in v0.1.338

func ApplyRangeOptions(opts *RangeOptions, modifiers ...RangeOption) RangeOptions

type RawCacheKey added in v0.1.3

type RawCacheKey string

RawCacheKey wraps a string key to implement fmt.Stringer.

func (RawCacheKey) String added in v0.1.3

func (r RawCacheKey) String() string

String implements the Stringer interface for RawCacheKey.

type ReadWebSocketOption added in v0.1.940

type ReadWebSocketOption = Opt[ReadWebSocketOptions]

func WithReadWebSocketC added in v0.1.940

func WithReadWebSocketC(x *WebSocketConn) ReadWebSocketOption

type ReadWebSocketOptions added in v0.1.940

type ReadWebSocketOptions struct {
	C *WebSocketConn
}

func ApplyReadWebSocketOptions added in v0.1.940

func ApplyReadWebSocketOptions(opts *ReadWebSocketOptions, modifiers ...ReadWebSocketOption) ReadWebSocketOptions

func (*ReadWebSocketOptions) Val added in v0.1.1028

func (o *ReadWebSocketOptions) Val() error

type Reader

type Reader interface {
	Read(ctx context.Context, r io.Reader) ([]byte, error)
}

type ReaderWebSocketOption added in v0.1.940

type ReaderWebSocketOption = Opt[ReaderWebSocketOptions]

func WithReaderWebSocketC added in v0.1.940

func WithReaderWebSocketC(x *WebSocketConn) ReaderWebSocketOption

type ReaderWebSocketOptions added in v0.1.940

type ReaderWebSocketOptions struct {
	C *WebSocketConn
}

func ApplyReaderWebSocketOptions added in v0.1.940

func ApplyReaderWebSocketOptions(opts *ReaderWebSocketOptions, modifiers ...ReaderWebSocketOption) ReaderWebSocketOptions

func (*ReaderWebSocketOptions) Val added in v0.1.1028

func (o *ReaderWebSocketOptions) Val() error

type RecurrenceEndType added in v0.1.699

type RecurrenceEndType string

func (*RecurrenceEndType) Val added in v0.1.1052

func (x *RecurrenceEndType) Val() error

type RecurrenceOperator added in v0.1.1052

type RecurrenceOperator interface {
	NextDate(ctx context.Context, opts NextDateOptions) (*Dt, error)
	IsFinished(ctx context.Context, opts IsFinishedOptions) (bool, error)
}

type RecurrenceType added in v0.1.699

type RecurrenceType string

func (*RecurrenceType) Val added in v0.1.1052

func (x *RecurrenceType) Val() error

type RedisClient added in v0.0.5

type RedisClient interface {
	Closer
	Get(ctx context.Context, key string) *redis.StringCmd
	Set(ctx context.Context, key string, value any, expiration time.Duration) *redis.StatusCmd
	FlushAll(ctx context.Context) *redis.StatusCmd
	Scan(ctx context.Context, cursor uint64, match string, count int64) *redis.ScanCmd
	TxPipeline() redis.Pipeliner
	Exists(ctx context.Context, keys ...string) *redis.IntCmd
	Pipeline() redis.Pipeliner
	Eval(ctx context.Context, script string, keys []string, args ...any) *redis.Cmd
}

type RedisOperator added in v0.1.10

type RedisOperator interface {
	Cacher
	ArbiterOperator
	ArbiterTokenizer
	CloserWithCtx
}

type ReembeddingOption added in v0.1.723

type ReembeddingOption = Opt[ReembeddingOptions]

func WithReembeddingDimensionKey added in v0.1.723

func WithReembeddingDimensionKey(x string) ReembeddingOption

func WithReembeddingEmbeddingVersionKey added in v0.1.723

func WithReembeddingEmbeddingVersionKey(x string) ReembeddingOption

func WithReembeddingLimit added in v0.1.723

func WithReembeddingLimit(x int64) ReembeddingOption

func WithReembeddingModality added in v0.1.723

func WithReembeddingModality(x Modality) ReembeddingOption

func WithReembeddingModalityKey added in v0.1.733

func WithReembeddingModalityKey(x string) ReembeddingOption

type ReembeddingOptions added in v0.1.723

type ReembeddingOptions struct {
	Modality            Modality
	Limit               int64
	EmbeddingVersionKey string
	DimensionKey        string
	ModalityKey         string
}

func ApplyReembeddingOptions added in v0.1.723

func ApplyReembeddingOptions(opts *ReembeddingOptions, modifiers ...ReembeddingOption) ReembeddingOptions

func (*ReembeddingOptions) Val added in v0.1.1028

func (o *ReembeddingOptions) Val() error

type ReflectOperator added in v0.1.10

type ReflectOperator interface {
	FillNilPointers(ctx context.Context, to, from any) error
	PointerToInstance(ctx context.Context, ptr any) (any, error)
	PointerToSlice(ctx context.Context, ptr any) (any, error)
}

type RefundStripePaymentOption added in v0.1.843

type RefundStripePaymentOption = Opt[RefundStripePaymentOptions]

func WithRefundStripePaymentAmount added in v0.1.843

func WithRefundStripePaymentAmount(x int64) RefundStripePaymentOption

func WithRefundStripePaymentBypass added in v0.1.843

func WithRefundStripePaymentBypass(x bool) RefundStripePaymentOption

func WithRefundStripePaymentConnectedAccountPSPID added in v0.1.930

func WithRefundStripePaymentConnectedAccountPSPID(x *ID) RefundStripePaymentOption

func WithRefundStripePaymentMetadata added in v0.1.923

func WithRefundStripePaymentMetadata(x map[string]string) RefundStripePaymentOption

func WithRefundStripePaymentPaymentIntentPSPID added in v0.1.939

func WithRefundStripePaymentPaymentIntentPSPID(x *ID) RefundStripePaymentOption

func WithRefundStripePaymentReason added in v0.1.843

func WithRefundStripePaymentReason(x string) RefundStripePaymentOption

func WithRefundStripePaymentRefundApplicationFee added in v0.1.920

func WithRefundStripePaymentRefundApplicationFee(x bool) RefundStripePaymentOption

type RefundStripePaymentOptions added in v0.1.843

type RefundStripePaymentOptions struct {
	StripeConnectedAccountPSPID
	StripeBypass
	Amount               int64
	Reason               string
	RefundApplicationFee bool
	PaymentIntentPSPID   *ID
	Metadata             map[string]string
}

func ApplyRefundStripePaymentOptions added in v0.1.843

func ApplyRefundStripePaymentOptions(opts *RefundStripePaymentOptions, modifiers ...RefundStripePaymentOption) RefundStripePaymentOptions

func (*RefundStripePaymentOptions) Params added in v0.1.845

func (*RefundStripePaymentOptions) Val added in v0.1.1028

type RegisteredRoute added in v0.1.10

type RegisteredRoute struct {
	MethodMap map[string]Entry
}

RegisteredRoute holds a map of HTTP methods to route entries.

type Registry added in v0.1.10

type Registry map[*regexp.Regexp]*RegisteredRoute

Registry maps compiled regex patterns to registered routes.

func (*Registry) LenHandlers added in v0.1.10

func (r *Registry) LenHandlers() int

LenHandlers returns the total number of handlers across all routes.

func (*Registry) LenRoutes added in v0.1.10

func (r *Registry) LenRoutes() int

LenRoutes returns the number of registered routes.

type RegistryMutex added in v0.1.10

type RegistryMutex struct {
	sync.RWMutex
}

RegistryMutex provides thread-safe access to the route registry.

type Relation added in v0.1.699

type Relation = int64
const (
	Na      Relation = iota // Not applicable, for initial friend request only.
	Friend                  // Between all types of users.
	OldHire                 // Between employees and employers only, when the employee is fired.
	Hired                   // Between employees and employers only.
	Manager                 // Between employees and employers only.
)

type RenderOption added in v0.1.385

type RenderOption = Opt[RenderOptions]

func WithData added in v0.1.385

func WithData(x any) RenderOption

func WithEmailable added in v0.1.385

func WithEmailable(x Emailable) RenderOption

func WithFuncs added in v0.1.385

func WithFuncs(x template.FuncMap) RenderOption

func WithRenderWriter added in v0.1.385

func WithRenderWriter(x io.Writer) RenderOption

func WithTemplate added in v0.1.385

func WithTemplate(x string) RenderOption

type RenderOptions added in v0.1.385

type RenderOptions struct {
	Template string
	Data     any
	W        io.Writer
	Funcs    template.FuncMap
}

func ApplyRenderOptions added in v0.1.385

func ApplyRenderOptions(opts *RenderOptions, modifiers ...RenderOption) RenderOptions

type RentalType added in v0.1.806

type RentalType string

RentalType represents how equipment is billed over time.

const (
	RentalHourly RentalType = "hourly"
	RentalDaily  RentalType = "daily"
)

func (*RentalType) Val added in v0.1.1028

func (x *RentalType) Val() error

type ReplaceOneHandlerOptions added in v0.1.270

type ReplaceOneHandlerOptions struct {
	Atz
	Bypass
}

type ReplaceOneOptions added in v0.0.5

type ReplaceOneOptions struct {
	C        Col
	Document Identifiable
	IDKey    string
	ID       Identifier
}

func (*ReplaceOneOptions) Val added in v0.1.1028

func (o *ReplaceOneOptions) Val() error

type ReportBuilder added in v0.1.983

type ReportBuilder interface {
	Build() (ReportBytes, error)
}

type ReportBytes added in v0.1.983

type ReportBytes interface {
	GetBytes() []byte
}

type ReportOperator added in v0.1.982

type ReportOperator interface {
	Generate(ctx context.Context, x ReportBuilder) (io.ReadSeeker, error)
}

type ReportType added in v0.1.974

type ReportType string

ReportType represents the type of a generated report.

func (*ReportType) Val added in v0.1.1028

func (x *ReportType) Val() error

type RequestOption

type RequestOption = Opt[RequestOptions]

func WithRequestBody

func WithRequestBody(x io.Reader) RequestOption

func WithRequestHeader

func WithRequestHeader(x http.Header) RequestOption

type RequestOptions

type RequestOptions struct {
	Header http.Header
	Body   io.Reader
}

func ApplyRequestOptions

func ApplyRequestOptions(opts *RequestOptions, modifiers ...RequestOption) RequestOptions

type RequestWeight added in v0.1.10

type RequestWeight = uint

RequestWeight defines the relative cost of a request for rate limiting.

const (
	// Unlimited disables rate limiting for the request.
	Unlimited RequestWeight = 0
)

type RequireOption added in v0.1.338

type RequireOption = Opt[RequireOptions]

func WithNonNilPointer added in v0.1.338

func WithNonNilPointer() RequireOption

func WithNonZeroValue added in v0.1.338

func WithNonZeroValue() RequireOption

type RequireOptions added in v0.1.338

type RequireOptions struct {
	NonNilPointer bool
	NonZeroValue  bool
}

func ApplyRequireOptions added in v0.1.338

func ApplyRequireOptions(opts *RequireOptions, modifiers ...RequireOption) RequireOptions

type ResultKey added in v0.1.770

type ResultKey = string

ResultKey represents the key used to access the result in a MongoDB aggregation pipeline.

type Role added in v0.1.50

type Role int
const (
	NA Role = iota
	Rdr
	Wrtr
	Ownr
)

func (Role) Val added in v0.1.1028

func (r Role) Val() error

type Route added in v0.1.10

type Route struct {
	Svc         string
	Pairs       []string
	HandlerFunc HandlerFunc
	Weight      uint
	Methods     []string
}

Route holds route metadata to be compiled and registered.

func (Route) CompileRegex added in v0.1.10

func (r Route) CompileRegex(pathKey string) (*regexp.Regexp, error)

CompileRegex builds a compiled regex for matching the route.

func (*Route) Val added in v0.1.1028

func (r *Route) Val() error

type RouterKeyExtractor added in v0.1.198

type RouterKeyExtractor interface {
	SvcKey(ctx context.Context) (string, error)
	RKey(ctx context.Context) (string, error)
}

type RouterOperator added in v0.1.10

type RouterOperator interface {
	RouterParser
	RouterKeyExtractor
	Run(ctx context.Context) error
	Mount(ctx context.Context, r []*Route) error
	Stop(ctx context.Context) error
	Vars(ctx context.Context) (*config.Vars, error)
	AttachServer(ctx context.Context, s ServerOperator) error
}

type RouterParser added in v0.1.27

type RouterParser interface {
	ParsePath(ctx context.Context, r *http.Request, re *regexp.Regexp) (map[string]string, error)
	ParseQuery(ctx context.Context, r *http.Request) (map[string][]string, error)
}

type RunGuardsOption added in v0.1.830

type RunGuardsOption = Opt[RunGuardsOptions]

func WithRunGuardsG added in v0.1.831

func WithRunGuardsG(x []GuardRunner) RunGuardsOption

type RunGuardsOptions added in v0.1.830

type RunGuardsOptions struct {
	G []GuardRunner
}

func ApplyRunGuardsOptions added in v0.1.830

func ApplyRunGuardsOptions(opts *RunGuardsOptions, modifiers ...RunGuardsOption) RunGuardsOptions

type RunPipelineOptions added in v0.1.79

type RunPipelineOptions struct {
	C        Col
	Receiver any
	Pipeline MongoPipeliner
}

type SMS added in v0.1.795

type SMS interface {
	SendPlainSMS(ctx context.Context, s sms.SMS) ([]byte, error)
}

type SNum added in v0.1.833

type SNum[T Signed] struct {
	Raw  *T      `json:"raw" validate:"nnpt"`
	Text *string `json:"text" validate:"nnpt,nz"`
}

SNum stores a numeric value and its text form for searchable numerical fields.

func NewSNum added in v0.1.833

func NewSNum[T Signed](opts ...SNumOption[T]) *SNum[T]

func NewZeroSNum added in v0.1.836

func NewZeroSNum[T Signed]() *SNum[T]

func (*SNum[T]) FormatText added in v0.1.833

func (s *SNum[T]) FormatText() *SNum[T]

func (*SNum[T]) GetRaw added in v0.1.833

func (s *SNum[T]) GetRaw() T

func (*SNum[T]) GetText added in v0.1.833

func (s *SNum[T]) GetText() string

func (*SNum[T]) SetRaw added in v0.1.833

func (s *SNum[T]) SetRaw(x T)

func (*SNum[T]) SetText added in v0.1.833

func (s *SNum[T]) SetText(x string)

type SNumOption added in v0.1.837

type SNumOption[T Signed] func(*SNum[T])

func WithSNumRaw added in v0.1.833

func WithSNumRaw[T Signed](x T) SNumOption[T]

func WithSNumText added in v0.1.833

func WithSNumText[T Signed](x string) SNumOption[T]

type ScanManyOption added in v0.1.478

type ScanManyOption = Opt[ScanManyOptions]

func WithScanManyCheck added in v0.1.478

func WithScanManyCheck(x func(context.Context, io.Reader) (bool, error)) ScanManyOption

func WithScanManyConcurrency added in v0.1.558

func WithScanManyConcurrency(x *int) ScanManyOption

func WithScanManyCopier added in v0.1.758

func WithScanManyCopier(x Copier) ScanManyOption

func WithScanManyPool added in v0.1.478

func WithScanManyPool(x PoolOperator) ScanManyOption

func WithScanManyReader added in v0.1.478

func WithScanManyReader(x Reader) ScanManyOption

type ScanManyOptions added in v0.1.478

type ScanManyOptions struct {
	P           PoolOperator
	R           Reader
	CP          Copier
	Check       func(context.Context, io.Reader) (bool, error)
	Concurrency *int
}

func ApplyScanManyOptions added in v0.1.478

func ApplyScanManyOptions(opts *ScanManyOptions, modifiers ...ScanManyOption) ScanManyOptions

type Scopable added in v0.1.60

type Scopable interface {
	Scope() Scope
}

type Scope added in v0.1.66

type Scope struct {
	K  string
	ID ID
}

func (Scope) CacheID added in v0.1.970

func (s Scope) CacheID() fmt.Stringer

func (Scope) Filter added in v0.1.970

func (s Scope) Filter() (string, any, bool)

func (Scope) IsUnscoped added in v0.1.970

func (s Scope) IsUnscoped() bool

func (Scope) Query added in v0.1.1011

func (s Scope) Query() map[string][]string

func (*Scope) Seed added in v0.1.1013

func (s *Scope) Seed(id ID, ks ...string) bool

Seed sets the scope ID when the scope key matches one of the provided keys and the ID is empty.

type SearchIndexEntry added in v0.0.5

type SearchIndexEntry struct {
	Fields AtlasIndexes
	E      *EmbeddingOptions
}

SearchIndexEntry defines a MongoDB Atlas search index specification. INFO: Two modes:

  • Text search (E == nil): all Fields are indexed as text.
  • Vector search (E != nil): creates vector index; Fields is ignored.

type SearchManyHandlerOptions added in v0.1.270

type SearchManyHandlerOptions struct {
	Atz
	Filter        bson.M
	SortByKey     string
	SortDirection SortDirection
}

type SearchOptions added in v0.0.5

type SearchOptions struct {
	SearchManyHandlerOptions
	C        Col
	Receiver any
	T        *TextOptions
	P        *PaginationOptions
}

type SearchResult added in v0.1.56

type SearchResult struct {
	Results    []any `json:"results,omitempty"`
	TotalCount int64 `json:"total_count,omitempty"`
	LastPage   int32 `json:"last_page,omitempty"`
}

SearchResult represents the response from a search operation.

func NewSearchResult added in v0.1.57

func NewSearchResult(opts ...SearchResultOption) *SearchResult

type SearchResultOption added in v0.1.56

type SearchResultOption = Opt[SearchResult]

func WithSearchLastPage added in v0.1.56

func WithSearchLastPage(x int32) SearchResultOption

func WithSearchResults added in v0.1.56

func WithSearchResults(x []any) SearchResultOption

func WithSearchTotalCount added in v0.1.56

func WithSearchTotalCount(x int64) SearchResultOption

type Searchable added in v0.1.75

type Searchable interface {
	SearchIn() []string
}

type SecretInfo added in v0.1.13

type SecretInfo struct {
	SecretID  string
	VersionID string
}

SecretInfo holds the identifiers needed to access a secret.

func (SecretInfo) BuildSecretName added in v0.1.13

func (s SecretInfo) BuildSecretName(projectID string) string

BuildSecretName constructs the full secret name path for Secret Manager.

type SecretManagerClient added in v0.1.13

type SecretManagerClient interface {
	AccessSecretVersion(ctx context.Context, req *secretmanagerpb.AccessSecretVersionRequest, opts ...gax.CallOption) (*secretmanagerpb.AccessSecretVersionResponse, error)
	Close() error
}

type SecretOperator added in v0.1.13

type SecretOperator interface {
	GetSecret(ctx context.Context, s SecretInfo) ([]byte, error)
	CloserWithCtx
}

type SemaphoreInfo added in v0.1.11

type SemaphoreInfo interface {
	GetConcurrency(ctx context.Context) (int, error)
}

type SemaphoreOperator added in v0.1.10

type SemaphoreOperator interface {
	Acquire(ctx context.Context) error
	Release(ctx context.Context) error
	WaitAll(ctx context.Context) error
	SemaphoreInfo
}

type SendEmailOption added in v0.1.381

type SendEmailOption = Opt[SendEmailOptions]

func WithBcc added in v0.1.381

func WithBcc(x ...string) SendEmailOption

func WithCc added in v0.1.381

func WithCc(x ...string) SendEmailOption

func WithContent added in v0.1.381

func WithContent(x io.Reader) SendEmailOption

func WithSender added in v0.1.381

func WithSender(x *EmailSenderInfo) SendEmailOption

func WithSubject added in v0.1.381

func WithSubject(x string) SendEmailOption

func WithTo added in v0.1.381

func WithTo(x ...string) SendEmailOption

type SendEmailOptions added in v0.1.381

type SendEmailOptions struct {
	Sender  *EmailSenderInfo
	Subject string
	Content io.Reader
	To      []string
	Cc      []string
	Bcc     []string
}

func ApplySendEmailOptions added in v0.1.381

func ApplySendEmailOptions(opts *SendEmailOptions, modifiers ...SendEmailOption) SendEmailOptions

type SendResult added in v0.1.583

type SendResult struct {
	Token     string
	Success   bool
	MessageID string
	Error     string
}

type ServeContentOption added in v0.1.1022

type ServeContentOption = Opt[ServeContentOptions]

func WithServeContentBody added in v0.1.1022

func WithServeContentBody(x io.ReadSeeker) ServeContentOption

func WithServeContentContentType added in v0.1.1022

func WithServeContentContentType(x string) ServeContentOption

func WithServeContentModTime added in v0.1.1022

func WithServeContentModTime(x time.Time) ServeContentOption

func WithServeContentName added in v0.1.1022

func WithServeContentName(x string) ServeContentOption

func WithServeContentRequest added in v0.1.1022

func WithServeContentRequest(x *http.Request) ServeContentOption

func WithServeContentSize added in v0.1.1022

func WithServeContentSize(x int) ServeContentOption

func WithServeContentWriter added in v0.1.1022

func WithServeContentWriter(x http.ResponseWriter) ServeContentOption

type ServeContentOptions added in v0.1.1022

type ServeContentOptions struct {
	W           http.ResponseWriter
	R           *http.Request
	Name        string
	ContentType string
	ModTime     time.Time
	Body        io.ReadSeeker
	Size        int
}

func ApplyServeContentOptions added in v0.1.1022

func ApplyServeContentOptions(opts *ServeContentOptions, modifiers ...ServeContentOption) ServeContentOptions

func (*ServeContentOptions) Val added in v0.1.1028

func (o *ServeContentOptions) Val() error

type ServeFileOption added in v0.1.377

type ServeFileOption = Opt[ServeFileOptions]

func WithReplacePath added in v0.1.377

func WithReplacePath(x string) ServeFileOption

func WithRequest added in v0.1.377

func WithRequest(x *http.Request) ServeFileOption

func WithStripPrefix added in v0.1.377

func WithStripPrefix(x string) ServeFileOption

func WithWriter added in v0.1.377

func WithWriter(x http.ResponseWriter) ServeFileOption

type ServeFileOptions added in v0.1.377

type ServeFileOptions struct {
	W         http.ResponseWriter
	R         *http.Request
	ToStrip   string
	ToReplace string
}

func ApplyServeFileOptions added in v0.1.377

func ApplyServeFileOptions(opts *ServeFileOptions, modifiers ...ServeFileOption) ServeFileOptions

type ServeWebSocketSessionOption added in v0.1.943

type ServeWebSocketSessionOption = Opt[ServeWebSocketSessionOptions]

func WithServeWebSocketSessionDetachCancel added in v0.1.965

func WithServeWebSocketSessionDetachCancel(x bool) ServeWebSocketSessionOption

func WithServeWebSocketSessionEgressBufSize added in v0.1.943

func WithServeWebSocketSessionEgressBufSize(x int) ServeWebSocketSessionOption

func WithServeWebSocketSessionI added in v0.1.944

func WithServeWebSocketSessionI(x WebSocketSessionIngressPolicy) ServeWebSocketSessionOption

func WithServeWebSocketSessionIngressBufSize added in v0.1.943

func WithServeWebSocketSessionIngressBufSize(x int) ServeWebSocketSessionOption

func WithServeWebSocketSessionPingPeriod added in v0.1.943

func WithServeWebSocketSessionPingPeriod(x time.Duration) ServeWebSocketSessionOption

func WithServeWebSocketSessionPongWait added in v0.1.943

func WithServeWebSocketSessionPongWait(x time.Duration) ServeWebSocketSessionOption

func WithServeWebSocketSessionR added in v0.1.943

func WithServeWebSocketSessionR(x *http.Request) ServeWebSocketSessionOption

func WithServeWebSocketSessionReadLimit added in v0.1.943

func WithServeWebSocketSessionReadLimit(x int64) ServeWebSocketSessionOption

func WithServeWebSocketSessionShutdownWait added in v0.1.943

func WithServeWebSocketSessionShutdownWait(x time.Duration) ServeWebSocketSessionOption

func WithServeWebSocketSessionW added in v0.1.943

func WithServeWebSocketSessionW(x http.ResponseWriter) ServeWebSocketSessionOption

type ServeWebSocketSessionOptions added in v0.1.943

type ServeWebSocketSessionOptions struct {
	W              http.ResponseWriter
	R              *http.Request
	PongWait       time.Duration
	PingPeriod     time.Duration
	IngressBufSize int
	EgressBufSize  int
	ReadLimit      int64
	ShutdownWait   time.Duration
	I              WebSocketSessionIngressPolicy
	DetachCancel   bool
}

func ApplyServeWebSocketSessionOptions added in v0.1.943

func ApplyServeWebSocketSessionOptions(opts *ServeWebSocketSessionOptions, modifiers ...ServeWebSocketSessionOption) ServeWebSocketSessionOptions

func (*ServeWebSocketSessionOptions) Val added in v0.1.1028

type ServerInfo added in v0.1.11

type ServerInfo interface {
	GetUseHTTP2(ctx context.Context) (bool, error)
	GetUseH2C(ctx context.Context) (bool, error)
	GetBoundOn(ctx context.Context) (string, error)
	GetIdleTimeout(ctx context.Context) (time.Duration, error)
	GetReadTimeout(ctx context.Context) (time.Duration, error)
	GetWriteTimeout(ctx context.Context) (time.Duration, error)
}

type ServerOperator added in v0.1.11

type ServerOperator interface {
	http.Handler
	ServerRunner
	ServerInfo
}

type ServerRunner added in v0.1.11

type ServerRunner interface {
	Run(ctx context.Context) error
	Shutdown(ctx context.Context) error
	WithNotFoundHandler(ctx context.Context, x HandlerFunc) error
}

type ServiceAccountFile added in v0.1.479

type ServiceAccountFile struct {
	PrivateKey  string `json:"private_key"`
	ClientEmail string `json:"client_email"`
}

type SetWebSocketPongHandlerOption added in v0.1.940

type SetWebSocketPongHandlerOption = Opt[SetWebSocketPongHandlerOptions]

func WithSetWebSocketPongHandlerC added in v0.1.940

func WithSetWebSocketPongHandlerC(x *WebSocketConn) SetWebSocketPongHandlerOption

func WithSetWebSocketPongHandlerPH added in v0.1.940

func WithSetWebSocketPongHandlerPH(x WebSocketPongHandler) SetWebSocketPongHandlerOption

type SetWebSocketPongHandlerOptions added in v0.1.940

type SetWebSocketPongHandlerOptions struct {
	C  *WebSocketConn
	PH WebSocketPongHandler
}

func ApplySetWebSocketPongHandlerOptions added in v0.1.940

func ApplySetWebSocketPongHandlerOptions(opts *SetWebSocketPongHandlerOptions, modifiers ...SetWebSocketPongHandlerOption) SetWebSocketPongHandlerOptions

func (*SetWebSocketPongHandlerOptions) Val added in v0.1.1028

type SetWebSocketReadDeadlineOption added in v0.1.940

type SetWebSocketReadDeadlineOption = Opt[SetWebSocketReadDeadlineOptions]

func WithSetWebSocketReadDeadlineC added in v0.1.940

func WithSetWebSocketReadDeadlineC(x *WebSocketConn) SetWebSocketReadDeadlineOption

func WithSetWebSocketReadDeadlineDeadline added in v0.1.940

func WithSetWebSocketReadDeadlineDeadline(x time.Time) SetWebSocketReadDeadlineOption

type SetWebSocketReadDeadlineOptions added in v0.1.940

type SetWebSocketReadDeadlineOptions struct {
	C        *WebSocketConn
	Deadline time.Time
}

func ApplySetWebSocketReadDeadlineOptions added in v0.1.940

func ApplySetWebSocketReadDeadlineOptions(opts *SetWebSocketReadDeadlineOptions, modifiers ...SetWebSocketReadDeadlineOption) SetWebSocketReadDeadlineOptions

func (*SetWebSocketReadDeadlineOptions) Val added in v0.1.1028

type Signed added in v0.1.830

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 | ~float32 | ~float64
}

Signed is any numeric type that can be negative.

type SortDirection added in v0.0.5

type SortDirection int

SortDirection represents the sorting order for MongoDB queries.

type SortStripeBalanceOption added in v0.1.843

type SortStripeBalanceOption = Opt[SortStripeBalanceOptions]

func WithSortStripeBalanceB added in v0.1.843

func WithSortStripeBalanceB(x stripeApi.Balance) SortStripeBalanceOption

type SortStripeBalanceOptions added in v0.1.843

type SortStripeBalanceOptions struct {
	B stripeApi.Balance
}

func ApplySortStripeBalanceOptions added in v0.1.843

func ApplySortStripeBalanceOptions(opts *SortStripeBalanceOptions, modifiers ...SortStripeBalanceOption) SortStripeBalanceOptions

func (*SortStripeBalanceOptions) Val added in v0.1.1028

type SortStripeBalanceResult added in v0.1.843

type SortStripeBalanceResult struct {
	Available        []StripeBalanceDetails `json:"available"`
	Pending          []StripeBalanceDetails `json:"pending"`
	InstantAvailable []StripeBalanceDetails `json:"instant_available"`
}

func NewSortStripeBalanceResult added in v0.1.843

func NewSortStripeBalanceResult(opts ...SortStripeBalanceResultOption) *SortStripeBalanceResult

type SortStripeBalanceResultOption added in v0.1.843

type SortStripeBalanceResultOption = Opt[SortStripeBalanceResult]

func WithSortStripeBalanceResultAvailable added in v0.1.843

func WithSortStripeBalanceResultAvailable(x []StripeBalanceDetails) SortStripeBalanceResultOption

func WithSortStripeBalanceResultInstantAvailable added in v0.1.843

func WithSortStripeBalanceResultInstantAvailable(x []StripeBalanceDetails) SortStripeBalanceResultOption

func WithSortStripeBalanceResultPending added in v0.1.843

func WithSortStripeBalanceResultPending(x []StripeBalanceDetails) SortStripeBalanceResultOption

type Sortable added in v0.1.62

type Sortable interface {
	SortBy() string
}

type SpeechClient added in v0.1.458

type SpeechClient interface {
	Recognize(ctx context.Context, req *speechpb.RecognizeRequest, opts ...gax.CallOption) (*speechpb.RecognizeResponse, error)
	Close() error
}

type SpeechOperator added in v0.1.458

type SpeechOperator interface {
	Recognize(ctx context.Context, opts SpeechRecognizeOptions) (*SpeechToTextResponse, error)
	GetMatcher(ctx context.Context) (language.Matcher, error)
	CloserWithCtx
}

type SpeechRecognizeOption added in v0.1.458

type SpeechRecognizeOption = Opt[SpeechRecognizeOptions]

func WithSpeechModel added in v0.1.458

func WithSpeechModel(x string) SpeechRecognizeOption

func WithSpeechRecognizeAudioLanguageCode added in v0.1.458

func WithSpeechRecognizeAudioLanguageCode(x string) SpeechRecognizeOption

func WithSpeechRecognizeFileURI added in v0.1.458

func WithSpeechRecognizeFileURI(x string) SpeechRecognizeOption

func WithSpeechRecognizeMaxAlternatives added in v0.1.458

func WithSpeechRecognizeMaxAlternatives(x int32) SpeechRecognizeOption

func WithSpeechRecognizeRecognizerName added in v0.1.458

func WithSpeechRecognizeRecognizerName(x string) SpeechRecognizeOption

func WithSpeechRecognizeRelevanceThreshold added in v0.1.458

func WithSpeechRecognizeRelevanceThreshold(x float32) SpeechRecognizeOption

type SpeechRecognizeOptions added in v0.1.458

type SpeechRecognizeOptions struct {
	// The URI of the file to be recognized.
	FileURI string
	// The BCP-47 language code of the audio.
	AudioLanguageCode string
	// The maximum number of recognition alternatives to be returned.
	MaxAlternatives int32
	// The confidence threshold for filtering alternatives.
	RelevanceThreshold float32
	// The recognizer name (e.g., for specific model variants).
	RecognizerName string
	// The Google Speech-to-Text model to use.
	SpeechModel string
}

func ApplySpeechRecognizeOptions added in v0.1.458

func ApplySpeechRecognizeOptions(opts *SpeechRecognizeOptions, modifiers ...SpeechRecognizeOption) SpeechRecognizeOptions

func (*SpeechRecognizeOptions) ToRecognizerFQDN added in v0.1.603

func (o *SpeechRecognizeOptions) ToRecognizerFQDN(projectID string) FQDN

ToRecognizerFQDN constructs the fully-qualified recognizer path for the Speech-to-Text API.

func (SpeechRecognizeOptions) ToSpeechpbConfig added in v0.1.458

func (o SpeechRecognizeOptions) ToSpeechpbConfig() *speechpb.RecognitionConfig

ToSpeechpbConfig converts the SpeechRecognizeOptions to a speechpb.RecognitionConfig.

func (SpeechRecognizeOptions) Val added in v0.1.1028

func (o SpeechRecognizeOptions) Val() error

type SpeechToTextResponse added in v0.1.458

type SpeechToTextResponse struct {
	Transcriptions []SpeechToTextTranscription `json:"transcriptions"`
	Problem        bool                        `json:"problem"`
}

SpeechToTextResponse represents the structured output of a speech-to-text operation.

func NewSpeechToTextResponse added in v0.1.458

func NewSpeechToTextResponse(opts ...SpeechToTextResponseOption) *SpeechToTextResponse

type SpeechToTextResponseOption added in v0.1.458

type SpeechToTextResponseOption func(*SpeechToTextResponse)

func WithProblem added in v0.1.458

func WithProblem(x bool) SpeechToTextResponseOption

func WithTranscriptions added in v0.1.458

type SpeechToTextTranscription added in v0.1.458

type SpeechToTextTranscription struct {
	Text       string  `json:"text"`
	Confidence float32 `json:"confidence"`
}

SpeechToTextTranscription holds a single transcription and its confidence score.

type Status added in v0.1.699

type Status = string

type StorageOperator added in v0.1.595

type StorageOperator interface {
	Upload(ctx context.Context, opts UploadOptions) error
	Download(ctx context.Context, opts DownloadOptions) ([]any, error)
}

type StoreOption added in v0.1.498

type StoreOption = Opt[StoreOptions]

func WithStoreBaseURL added in v0.1.498

func WithStoreBaseURL(x *url.URL) StoreOption

func WithStoreBody added in v0.1.498

func WithStoreBody(x io.Reader) StoreOption

func WithStoreExpectedStatus added in v0.1.498

func WithStoreExpectedStatus(x int) StoreOption

func WithStoreFormDataContentType added in v0.1.498

func WithStoreFormDataContentType(x string) StoreOption

func WithStoreForwardHeaders added in v0.1.498

func WithStoreForwardHeaders(x ...string) StoreOption

func WithStoreQueryParams added in v0.1.498

func WithStoreQueryParams(x url.Values) StoreOption

type StoreOptions added in v0.1.498

type StoreOptions struct {
	BaseURL             *url.URL
	QueryParams         url.Values
	Body                io.Reader
	ForwardHeaders      []string
	FormDataContentType string
	ExpectedStatus      int
}

func ApplyStoreOptions added in v0.1.498

func ApplyStoreOptions(opts *StoreOptions, modifiers ...StoreOption) StoreOptions

func (*StoreOptions) Val added in v0.1.1028

func (o *StoreOptions) Val() error

type StoreProvider added in v0.1.1104

type StoreProvider string

StoreProvider identifies the purchase source platform.

func (*StoreProvider) Val added in v0.1.1104

func (x *StoreProvider) Val() error

type StringOperator added in v0.1.336

type StringOperator interface {
	Generator
	Normalizer
	Conformer
	Parser
}

type StripeAccount added in v0.1.843

type StripeAccount interface {
	Create(ctx context.Context, params *stripeApi.AccountCreateParams) (*stripeApi.Account, error)
	Delete(ctx context.Context, id string, params *stripeApi.AccountDeleteParams) (*stripeApi.Account, error)
}
type StripeAccountLink interface {
	Create(ctx context.Context, params *stripeApi.AccountLinkCreateParams) (*stripeApi.AccountLink, error)
}

type StripeBalance added in v0.1.843

type StripeBalance interface {
	Retrieve(ctx context.Context, params *stripeApi.BalanceRetrieveParams) (*stripeApi.Balance, error)
}

type StripeBalanceDetails added in v0.1.843

type StripeBalanceDetails struct {
	Currency string `json:"currency"`
	Balance  int64  `json:"balance"`
}

type StripeBalanceOption added in v0.1.843

type StripeBalanceOption = Opt[StripeBalanceOptions]

func WithStripeBalanceConnectedAccountPSPID added in v0.1.930

func WithStripeBalanceConnectedAccountPSPID(x *ID) StripeBalanceOption

type StripeBalanceOptions added in v0.1.843

type StripeBalanceOptions struct {
	StripeConnectedAccountPSPID
}

func ApplyStripeBalanceOptions added in v0.1.843

func ApplyStripeBalanceOptions(opts *StripeBalanceOptions, modifiers ...StripeBalanceOption) StripeBalanceOptions

func (*StripeBalanceOptions) Params added in v0.1.845

func (*StripeBalanceOptions) Val added in v0.1.1028

func (o *StripeBalanceOptions) Val() error

type StripeBankAccount added in v0.1.843

type StripeBypass added in v0.1.843

type StripeBypass struct {
	Bypass bool
}

type StripeClient added in v0.1.845

func (*StripeClient) Val added in v0.1.1028

func (c *StripeClient) Val() error

type StripeConnectedAccountPSPID added in v0.1.930

type StripeConnectedAccountPSPID struct {
	ConnectedAccountPSPID *ID
}

func (*StripeConnectedAccountPSPID) Val added in v0.1.1028

type StripeCustomer added in v0.1.930

type StripeCustomer interface {
	Create(ctx context.Context, params *stripeApi.CustomerCreateParams) (*stripeApi.Customer, error)
}

type StripeCustomerPSPID added in v0.1.930

type StripeCustomerPSPID struct {
	CustomerPSPID *ID
}

func (*StripeCustomerPSPID) Val added in v0.1.1028

func (o *StripeCustomerPSPID) Val() error

type StripeMetadataKey added in v0.1.845

type StripeMetadataKey = string

type StripeOperator added in v0.1.843

type StripeOperator interface {
	StripeSpecialized
}

type StripePaymentIntent added in v0.1.843

type StripePaymentIntentOption added in v0.1.843

type StripePaymentIntentOption = Opt[StripePaymentIntentOptions]

func WithStripePaymentIntentPaymentIntentPSPID added in v0.1.939

func WithStripePaymentIntentPaymentIntentPSPID(x *ID) StripePaymentIntentOption

type StripePaymentIntentOptions added in v0.1.843

type StripePaymentIntentOptions struct {
	PaymentIntentPSPID *ID
}

func ApplyStripePaymentIntentOptions added in v0.1.843

func ApplyStripePaymentIntentOptions(opts *StripePaymentIntentOptions, modifiers ...StripePaymentIntentOption) StripePaymentIntentOptions

func (*StripePaymentIntentOptions) Params added in v0.1.845

func (*StripePaymentIntentOptions) Val added in v0.1.1028

type StripePaymentMethodOption added in v0.1.843

type StripePaymentMethodOption = Opt[StripePaymentMethodOptions]

func WithStripePaymentMethodPaymentMethodPSPID added in v0.1.929

func WithStripePaymentMethodPaymentMethodPSPID(x *ID) StripePaymentMethodOption

type StripePaymentMethodOptions added in v0.1.843

type StripePaymentMethodOptions struct {
	PaymentMethodPSPID *ID
}

func ApplyStripePaymentMethodOptions added in v0.1.843

func ApplyStripePaymentMethodOptions(opts *StripePaymentMethodOptions, modifiers ...StripePaymentMethodOption) StripePaymentMethodOptions

func (*StripePaymentMethodOptions) Params added in v0.1.845

func (*StripePaymentMethodOptions) Val added in v0.1.1028

type StripeRefund added in v0.1.843

type StripeRefund interface {
	Create(ctx context.Context, params *stripeApi.RefundCreateParams) (*stripeApi.Refund, error)
}

type StripeSetupIntent added in v0.1.843

type StripeSetupIntent interface {
	Create(ctx context.Context, params *stripeApi.SetupIntentCreateParams) (*stripeApi.SetupIntent, error)
	Confirm(ctx context.Context, id string, params *stripeApi.SetupIntentConfirmParams) (*stripeApi.SetupIntent, error)
}

type StripeSpecialized added in v0.1.843

type StripeSpecialized interface {
	OpenStripeAccount(ctx context.Context, opts OpenStripeAccountOptions) (*stripeApi.Account, error)
	DeleteStripeAccount(ctx context.Context, opts DeleteStripeAccountOptions) (*stripeApi.Account, error)
	CreateStripeAccountLink(ctx context.Context, opts CreateStripeAccountLinkOptions) (*stripeApi.AccountLink, error)
	StripePaymentIntent(ctx context.Context, opts StripePaymentIntentOptions) (*stripeApi.PaymentIntent, error)
	OpenStripePayment(ctx context.Context, opts OpenStripePaymentOptions) (*stripeApi.PaymentIntent, int64, error)
	ConfirmStripePayment(ctx context.Context, opts ConfirmStripePaymentOptions) (*stripeApi.PaymentIntent, error)
	RefundStripePayment(ctx context.Context, opts RefundStripePaymentOptions) (*stripeApi.Refund, error)
	StripePaymentMethod(ctx context.Context, opts StripePaymentMethodOptions) (*stripeApi.PaymentMethod, error)
	AddStripeCard(ctx context.Context, opts AddStripeCardOptions) (*stripeApi.PaymentMethod, error)
	AttachStripePaymentMethod(ctx context.Context, opts AttachStripePaymentMethodOptions) (*stripeApi.PaymentMethod, error)
	CloneStripePaymentMethod(ctx context.Context, opts CloneStripePaymentMethodOptions) (*stripeApi.PaymentMethod, error)
	CreateStripeCustomer(ctx context.Context, opts CreateStripeCustomerOptions) (*stripeApi.Customer, error)
	VerifyStripeCard(ctx context.Context, opts VerifyStripeCardOptions) (*stripeApi.SetupIntent, error)
	ConfirmStripeSetupIntent(ctx context.Context, opts ConfirmStripeSetupIntentOptions) (*stripeApi.SetupIntent, error)
	LinkStripeBankAccount(ctx context.Context, opts LinkStripeBankAccountOptions) (*stripeApi.BankAccount, error)
	UpdateStripeBankAccount(ctx context.Context, opts UpdateStripeBankAccountOptions) (*stripeApi.BankAccount, error)
	DeleteStripeBankAccount(ctx context.Context, opts DeleteStripeBankAccountOptions) error
	StripeBalance(ctx context.Context, opts StripeBalanceOptions) (*stripeApi.Balance, error)
	SortStripeBalance(ctx context.Context, opts SortStripeBalanceOptions) (*SortStripeBalanceResult, error)
	DecodeStripeEvent(ctx context.Context, opts DecodeStripeEventOptions) (*stripeApi.Event, error)
	DecodeStripeEventData(ctx context.Context, opts DecodeStripeEventDataOptions) error
	ExtractNextActionURL(ctx context.Context, v any) (string, error)
	CreateStripeTaxCalculation(ctx context.Context, opts CreateStripeTaxCalculationOptions) (*stripeApi.TaxCalculation, error)
	CreateStripeTaxTransactionFromCalculation(ctx context.Context, opts CreateStripeTaxTransactionFromCalculationOptions) (*stripeApi.TaxTransaction, error)
}

type StripeTaxCalculation added in v0.1.1065

type StripeTaxCalculation interface {
	Create(ctx context.Context, params *stripeApi.TaxCalculationCreateParams) (*stripeApi.TaxCalculation, error)
}

type StripeTaxTransaction added in v0.1.1066

type StripeTaxTransaction interface {
	CreateFromCalculation(ctx context.Context, params *stripeApi.TaxTransactionCreateFromCalculationParams) (*stripeApi.TaxTransaction, error)
}

type Svc added in v0.1.996

type Svc = string

type Sysbox added in v0.1.884

type Sysbox struct {
	Local   fs.ReadFileFS
	Private fs.ReadFileFS
}

func (*Sysbox) Val added in v0.1.1028

func (s *Sysbox) Val() error

type SysboxPath added in v0.1.885

type SysboxPath = string

func SysboxPathFn added in v0.1.885

func SysboxPathFn(parts ...string) SysboxPath

type TMap added in v0.1.977

type TMap = map[string]string

TMap represents a map of translatable content keys to their default text values.

type TaxID added in v0.1.1066

type TaxID struct {
	Type  string `json:"type" validate:"nz"`
	Value string `json:"value" validate:"nz"`
}

TaxID represents an optional employer tax identifier with a standardized type code and its value.

type TemplateOperator added in v0.1.385

type TemplateOperator interface {
	TemplateRenderer
}

type TemplateRenderer added in v0.1.385

type TemplateRenderer interface {
	Render(ctx context.Context, opts RenderOptions) error
}

type TextOptions added in v0.0.5

type TextOptions struct {
	Query  string
	Fields []string
}

type Tool

type Tool[C any] struct {
	Client C
	Logger LogOperator
}

func NewTool

func NewTool[C any](client C, opts ToolOptions[C]) *Tool[C]

type ToolOption

type ToolOption[C any] = Opt[ToolOptions[C]]

func WithLogger

func WithLogger[C any](x LogOperator) ToolOption[C]

type ToolOptions

type ToolOptions[C any] struct {
	Logger LogOperator
}

func ApplyToolOptions added in v0.1.12

func ApplyToolOptions[C any](opts *ToolOptions[C], modifiers ...ToolOption[C]) ToolOptions[C]

type TranslateClient added in v0.1.384

type TranslateClient interface {
	Translate(ctx context.Context, inputs []string, target language.Tag, opts *translate.Options) ([]translate.Translation, error)
	SupportedLanguages(ctx context.Context, target language.Tag) ([]translate.Language, error)
	Close() error
}

type TranslateCommonOption added in v0.1.393

type TranslateCommonOption func(*TranslateCommonOptions)

func WithTranslateBaseOnly added in v0.1.981

func WithTranslateBaseOnly(x bool) TranslateCommonOption

func WithTranslateFormat added in v0.1.981

func WithTranslateFormat(x TranslateFormat) TranslateCommonOption

func WithTranslateSourceTag added in v0.1.981

func WithTranslateSourceTag(x language.Tag) TranslateCommonOption

func WithTranslateTargetTag added in v0.1.981

func WithTranslateTargetTag(x language.Tag) TranslateCommonOption

type TranslateCommonOptions added in v0.1.384

type TranslateCommonOptions struct {
	SourceTag language.Tag
	Target    language.Tag
	BaseOnly  bool
	Format    TranslateFormat
}

func (*TranslateCommonOptions) Params added in v0.1.981

func (*TranslateCommonOptions) Val added in v0.1.1028

func (o *TranslateCommonOptions) Val() error

type TranslateFormat added in v0.1.981

type TranslateFormat string

func (*TranslateFormat) Or added in v0.1.981

func (*TranslateFormat) Val added in v0.1.1028

func (x *TranslateFormat) Val() error

type TranslateHTMLOption added in v0.1.393

type TranslateHTMLOption = Opt[TranslateHTMLOptions]

func WithTranslateHTMLReader added in v0.1.981

func WithTranslateHTMLReader(x io.Reader) TranslateHTMLOption

func WithTranslateHTMLSelector added in v0.1.981

func WithTranslateHTMLSelector(x string) TranslateHTMLOption

type TranslateHTMLOptions added in v0.1.384

type TranslateHTMLOptions struct {
	TranslateCommonOptions
	R        io.Reader
	Selector string
}

func ApplyTranslateHTMLOptions added in v0.1.393

func ApplyTranslateHTMLOptions(base *TranslateHTMLOptions, htmlModifiers []TranslateHTMLOption, commonModifiers ...TranslateCommonOption) TranslateHTMLOptions

func (*TranslateHTMLOptions) Val added in v0.1.1028

func (o *TranslateHTMLOptions) Val() error

type TranslateMapOption added in v0.1.976

type TranslateMapOption = Opt[TranslateMapOptions]

func WithTranslateMapBatchSize added in v0.1.976

func WithTranslateMapBatchSize(x int) TranslateMapOption

func WithTranslateMapConvertLineBreaks added in v0.1.976

func WithTranslateMapConvertLineBreaks(x bool) TranslateMapOption

func WithTranslateMapM added in v0.1.976

func WithTranslateMapM(x TMap) TranslateMapOption

func WithTranslateMapSortKeys added in v0.1.976

func WithTranslateMapSortKeys(x bool) TranslateMapOption

type TranslateMapOptions added in v0.1.976

type TranslateMapOptions struct {
	TranslateCommonOptions
	M                 TMap
	ConvertLineBreaks bool
	BatchSize         int
	SortKeys          bool
}

func ApplyTranslateMapOptions added in v0.1.976

func ApplyTranslateMapOptions(base *TranslateMapOptions, mapModifiers []TranslateMapOption, commonModifiers ...TranslateCommonOption) TranslateMapOptions

func (*TranslateMapOptions) Val added in v0.1.1028

func (o *TranslateMapOptions) Val() error

type TranslateTextOption added in v0.1.393

type TranslateTextOption = Opt[TranslateTextOptions]

func WithTranslateConvertLineBreaks added in v0.1.981

func WithTranslateConvertLineBreaks(x bool) TranslateTextOption

func WithTranslateText added in v0.1.981

func WithTranslateText(x string) TranslateTextOption

type TranslateTextOptions added in v0.1.384

type TranslateTextOptions struct {
	TranslateCommonOptions
	Text              string
	ConvertLineBreaks bool
}

func ApplyTranslateTextOptions added in v0.1.393

func ApplyTranslateTextOptions(base *TranslateTextOptions, textModifiers []TranslateTextOption, commonModifiers ...TranslateCommonOption) TranslateTextOptions

func (*TranslateTextOptions) Val added in v0.1.1028

func (o *TranslateTextOptions) Val() error

type TranslationOperator added in v0.1.384

type TranslationOperator interface {
	TranslateText(ctx context.Context, opts TranslateTextOptions) (string, error)
	TranslateHTML(ctx context.Context, opts TranslateHTMLOptions) (io.Reader, error)
	TranslateMap(ctx context.Context, opts TranslateMapOptions) error
	ParseLanguage(ctx context.Context, BCP47Code string) (*language.Tag, error)
	SuggestBestMatch(ctx context.Context, userLanguage, fallback language.Tag, matcher ...language.Matcher) (*language.Tag, error)
	CloserWithCtx
}

type TwilioAPIService added in v0.1.364

type TwilioAPIService interface {
	CreateMessage(params *twilioApi.CreateMessageParams) (*twilioApi.ApiV2010Message, error)
}

type TwilioDecoder added in v0.1.796

type TwilioDecoder interface {
	DecodeCallback(ctx context.Context, opts DecodeCallbackOptions) (*TwilioEvent, error)
}

type TwilioEvent added in v0.1.796

type TwilioEvent struct {
	Timestamp *time.Time `json:"timestamp" validate:"nnpt"`
	Event     *CallEvent `json:"event" validate:"nnpt,nz"`
	RoomSID   *ID        `json:"room_sid" validate:"nnpt"`
	RoomID    *ID        `json:"room_id" validate:"nnpt"`
	UserSID   *ID        `json:"user_sid" validate:"nnpt"`
	UserID    *ID        `json:"user_id" validate:"nnpt"`
}

func NewTwilioEvent added in v0.1.796

func NewTwilioEvent(opts ...TwilioEventOption) *TwilioEvent

func (*TwilioEvent) GetEvent added in v0.1.796

func (e *TwilioEvent) GetEvent() CallEvent

func (*TwilioEvent) GetRoomID added in v0.1.796

func (e *TwilioEvent) GetRoomID() ID

func (*TwilioEvent) GetRoomSID added in v0.1.796

func (e *TwilioEvent) GetRoomSID() ID

func (*TwilioEvent) GetTimestamp added in v0.1.796

func (e *TwilioEvent) GetTimestamp() time.Time

func (*TwilioEvent) GetUserID added in v0.1.796

func (e *TwilioEvent) GetUserID() ID

func (*TwilioEvent) GetUserSID added in v0.1.796

func (e *TwilioEvent) GetUserSID() ID

func (*TwilioEvent) SetEvent added in v0.1.796

func (e *TwilioEvent) SetEvent(x CallEvent)

func (*TwilioEvent) SetRoomID added in v0.1.796

func (e *TwilioEvent) SetRoomID(x ID)

func (*TwilioEvent) SetRoomSID added in v0.1.796

func (e *TwilioEvent) SetRoomSID(x ID)

func (*TwilioEvent) SetTimestamp added in v0.1.796

func (e *TwilioEvent) SetTimestamp(x time.Time)

func (*TwilioEvent) SetUserID added in v0.1.796

func (e *TwilioEvent) SetUserID(x ID)

func (*TwilioEvent) SetUserSID added in v0.1.796

func (e *TwilioEvent) SetUserSID(x ID)

type TwilioEventOption added in v0.1.796

type TwilioEventOption = Opt[TwilioEvent]

func WithTwilioEventEvent added in v0.1.796

func WithTwilioEventEvent(x CallEvent) TwilioEventOption

func WithTwilioEventRoomID added in v0.1.796

func WithTwilioEventRoomID(x ID) TwilioEventOption

func WithTwilioEventRoomSID added in v0.1.796

func WithTwilioEventRoomSID(x ID) TwilioEventOption

func WithTwilioEventTimestamp added in v0.1.796

func WithTwilioEventTimestamp(x time.Time) TwilioEventOption

func WithTwilioEventUserID added in v0.1.796

func WithTwilioEventUserID(x ID) TwilioEventOption

func WithTwilioEventUserSID added in v0.1.796

func WithTwilioEventUserSID(x ID) TwilioEventOption

type TwilioOperator added in v0.1.364

type TwilioOperator interface {
	SMS
	TwilioTokenMinter
	TwilioDecoder
}

type TwilioTokenMinter added in v0.1.796

type TwilioTokenMinter interface {
	MintVideoToken(ctx context.Context, opts MintVideoTokenOptions) (*string, error)
}

type UnionWithField added in v0.1.750

type UnionWithField = string

UnionWithField represents the field used for unions in MongoDB Atlas.

type Unmarshaler

type Unmarshaler interface {
	Unmarshal(ctx context.Context, data io.Reader, v any, opts JSONOptions) error
}

type UpdateStripeBankAccountOption added in v0.1.843

type UpdateStripeBankAccountOption = Opt[UpdateStripeBankAccountOptions]

func WithUpdateStripeBankAccountBankAccountID added in v0.1.843

func WithUpdateStripeBankAccountBankAccountID(x *ID) UpdateStripeBankAccountOption

func WithUpdateStripeBankAccountConnectedAccountPSPID added in v0.1.930

func WithUpdateStripeBankAccountConnectedAccountPSPID(x *ID) UpdateStripeBankAccountOption

func WithUpdateStripeBankAccountDefaultForCurrency added in v0.1.921

func WithUpdateStripeBankAccountDefaultForCurrency(x bool) UpdateStripeBankAccountOption

type UpdateStripeBankAccountOptions added in v0.1.843

type UpdateStripeBankAccountOptions struct {
	StripeConnectedAccountPSPID
	BankAccountID      *ID
	DefaultForCurrency bool
}

func ApplyUpdateStripeBankAccountOptions added in v0.1.843

func ApplyUpdateStripeBankAccountOptions(opts *UpdateStripeBankAccountOptions, modifiers ...UpdateStripeBankAccountOption) UpdateStripeBankAccountOptions

func (*UpdateStripeBankAccountOptions) Params added in v0.1.845

func (*UpdateStripeBankAccountOptions) Val added in v0.1.1028

type UploadObjectOption added in v0.1.479

type UploadObjectOption = Opt[UploadObjectOptions]

func WithUploadObjectBucketName added in v0.1.479

func WithUploadObjectBucketName(x Bucket) UploadObjectOption

func WithUploadObjectFile added in v0.1.479

func WithUploadObjectFile(x *BucketFile) UploadObjectOption

type UploadObjectOptions added in v0.1.479

type UploadObjectOptions struct {
	BucketName Bucket
	F          *BucketFile
}

func ApplyUploadObjectOptions added in v0.1.479

func ApplyUploadObjectOptions(opts *UploadObjectOptions, modifiers ...UploadObjectOption) UploadObjectOptions

func (*UploadObjectOptions) Val added in v0.1.1028

func (o *UploadObjectOptions) Val() error

type UploadObjectsOption added in v0.1.479

type UploadObjectsOption = Opt[UploadObjectsOptions]

func WithUploadObjectsBucketName added in v0.1.479

func WithUploadObjectsBucketName(x Bucket) UploadObjectsOption

func WithUploadObjectsFiles added in v0.1.479

func WithUploadObjectsFiles(x []*BucketFile) UploadObjectsOption

type UploadObjectsOptions added in v0.1.479

type UploadObjectsOptions struct {
	BucketName Bucket
	F          []*BucketFile
}

func ApplyUploadObjectsOptions added in v0.1.479

func ApplyUploadObjectsOptions(opts *UploadObjectsOptions, modifiers ...UploadObjectsOption) UploadObjectsOptions

func (*UploadObjectsOptions) Val added in v0.1.1028

func (o *UploadObjectsOptions) Val() error

type UploadOption added in v0.1.595

type UploadOption = Opt[UploadOptions]

func WithUploadCollection added in v0.1.595

func WithUploadCollection(x string) UploadOption

func WithUploadFiles added in v0.1.595

func WithUploadFiles(x []MultipartFile) UploadOption

func WithUploadFullQuality added in v0.1.595

func WithUploadFullQuality(x bool) UploadOption

func WithUploadOwnerID added in v0.1.595

func WithUploadOwnerID(x *ID) UploadOption

func WithUploadRequest added in v0.1.595

func WithUploadRequest(x *http.Request) UploadOption

func WithUploadUploaderID added in v0.1.595

func WithUploadUploaderID(x *ID) UploadOption

type UploadOptions added in v0.1.595

type UploadOptions struct {
	OwnerID     *ID
	UploaderID  *ID
	FullQuality bool
	Collection  string
	R           *http.Request
	Files       []MultipartFile
}

func ApplyUploadOptions added in v0.1.595

func ApplyUploadOptions(opts *UploadOptions, modifiers ...UploadOption) UploadOptions

func (*UploadOptions) Val added in v0.1.1028

func (o *UploadOptions) Val() error

type UpsertOneHandlerOptions added in v0.1.584

type UpsertOneHandlerOptions struct {
	Atz
	Bypass
	InjectQuery map[string][]string
	InsertOnly  bool
}

type UpsertResult added in v0.1.584

type UpsertResult struct {
	ID       *ID  `json:"id,omitempty"`
	Inserted bool `json:"inserted,omitempty"`
}

UpsertResult represents the response of an upsert operation.

func NewUpsertResult added in v0.1.584

func NewUpsertResult(opts ...UpsertResultOption) *UpsertResult

type UpsertResultOption added in v0.1.584

type UpsertResultOption = Opt[UpsertResult]

func WithUpsertID added in v0.1.584

func WithUpsertID(x *ID) UpsertResultOption

func WithUpsertInserted added in v0.1.584

func WithUpsertInserted(x bool) UpsertResultOption

type UserType added in v0.1.699

type UserType string

func (UserType) String added in v0.1.699

func (u UserType) String() string

func (*UserType) Val added in v0.1.1028

func (u *UserType) Val() error

type ValidationOperator added in v0.1.338

type ValidationOperator interface {
	Validate(ctx context.Context, k string, v any) error
	RunGuards(ctx context.Context, opts RunGuardsOptions) error
}

type VectorSearchField added in v0.0.5

type VectorSearchField = string

VectorSearchField represents the field used for vector search in MongoDB Atlas.

type VerifiedPurchase added in v0.1.1104

type VerifiedPurchase struct {
	Provider              StoreProvider
	Kind                  PurchaseKind
	ProductID             string
	TransactionID         string
	OriginalTransactionID string
	PurchaseToken         string
	OrderID               string
	BundleID              string
	PackageName           string
	Environment           string
	PurchaseMS            int64
	ExpiresMS             int64
	RevokedMS             int64
	Quantity              int64
	Valid                 bool
	Raw                   any
}

func ApplyVerifiedPurchaseOptions added in v0.1.1104

func ApplyVerifiedPurchaseOptions(opts *VerifiedPurchase, modifiers ...VerifiedPurchaseOption) VerifiedPurchase

func (*VerifiedPurchase) Val added in v0.1.1104

func (x *VerifiedPurchase) Val() error

type VerifiedPurchaseOption added in v0.1.1104

type VerifiedPurchaseOption = Opt[VerifiedPurchase]

func WithVerifiedPurchaseBundleID added in v0.1.1104

func WithVerifiedPurchaseBundleID(x string) VerifiedPurchaseOption

func WithVerifiedPurchaseEnvironment added in v0.1.1104

func WithVerifiedPurchaseEnvironment(x string) VerifiedPurchaseOption

func WithVerifiedPurchaseExpiresMS added in v0.1.1104

func WithVerifiedPurchaseExpiresMS(x int64) VerifiedPurchaseOption

func WithVerifiedPurchaseKind added in v0.1.1104

func WithVerifiedPurchaseKind(x PurchaseKind) VerifiedPurchaseOption

func WithVerifiedPurchaseOrderID added in v0.1.1104

func WithVerifiedPurchaseOrderID(x string) VerifiedPurchaseOption

func WithVerifiedPurchaseOriginalTransactionID added in v0.1.1104

func WithVerifiedPurchaseOriginalTransactionID(x string) VerifiedPurchaseOption

func WithVerifiedPurchasePackageName added in v0.1.1104

func WithVerifiedPurchasePackageName(x string) VerifiedPurchaseOption

func WithVerifiedPurchaseProductID added in v0.1.1104

func WithVerifiedPurchaseProductID(x string) VerifiedPurchaseOption

func WithVerifiedPurchaseProvider added in v0.1.1104

func WithVerifiedPurchaseProvider(x StoreProvider) VerifiedPurchaseOption

func WithVerifiedPurchasePurchaseMS added in v0.1.1104

func WithVerifiedPurchasePurchaseMS(x int64) VerifiedPurchaseOption

func WithVerifiedPurchasePurchaseToken added in v0.1.1104

func WithVerifiedPurchasePurchaseToken(x string) VerifiedPurchaseOption

func WithVerifiedPurchaseQuantity added in v0.1.1104

func WithVerifiedPurchaseQuantity(x int64) VerifiedPurchaseOption

func WithVerifiedPurchaseRaw added in v0.1.1104

func WithVerifiedPurchaseRaw(x any) VerifiedPurchaseOption

func WithVerifiedPurchaseRevokedMS added in v0.1.1104

func WithVerifiedPurchaseRevokedMS(x int64) VerifiedPurchaseOption

func WithVerifiedPurchaseTransactionID added in v0.1.1104

func WithVerifiedPurchaseTransactionID(x string) VerifiedPurchaseOption

func WithVerifiedPurchaseValid added in v0.1.1104

func WithVerifiedPurchaseValid(x bool) VerifiedPurchaseOption

type VerifyAppleOption added in v0.1.1104

type VerifyAppleOption = Opt[VerifyAppleOptions]

func WithVerifyAppleTransactionID added in v0.1.1104

func WithVerifyAppleTransactionID(x string) VerifyAppleOption

type VerifyAppleOptions added in v0.1.1104

type VerifyAppleOptions struct {
	TransactionID string `json:"transaction_id"`
}

func ApplyVerifyAppleOptions added in v0.1.1104

func ApplyVerifyAppleOptions(opts *VerifyAppleOptions, modifiers ...VerifyAppleOption) VerifyAppleOptions

func (*VerifyAppleOptions) Val added in v0.1.1104

func (o *VerifyAppleOptions) Val() error

type VerifyGoogleOption added in v0.1.1104

type VerifyGoogleOption = Opt[VerifyGoogleOptions]

func WithVerifyGoogleKind added in v0.1.1104

func WithVerifyGoogleKind(x PurchaseKind) VerifyGoogleOption

func WithVerifyGoogleProductID added in v0.1.1104

func WithVerifyGoogleProductID(x string) VerifyGoogleOption

func WithVerifyGooglePurchaseToken added in v0.1.1104

func WithVerifyGooglePurchaseToken(x string) VerifyGoogleOption

type VerifyGoogleOptions added in v0.1.1104

type VerifyGoogleOptions struct {
	ProductID     string       `json:"product_id"`
	PurchaseToken string       `json:"purchase_token"`
	Kind          PurchaseKind `json:"kind"`
}

func ApplyVerifyGoogleOptions added in v0.1.1104

func ApplyVerifyGoogleOptions(opts *VerifyGoogleOptions, modifiers ...VerifyGoogleOption) VerifyGoogleOptions

func (*VerifyGoogleOptions) Val added in v0.1.1104

func (o *VerifyGoogleOptions) Val() error

type VerifyStripeCardOption added in v0.1.843

type VerifyStripeCardOption = Opt[VerifyStripeCardOptions]

func WithVerifyStripeCardCustomerPSPID added in v0.1.930

func WithVerifyStripeCardCustomerPSPID(x *ID) VerifyStripeCardOption

func WithVerifyStripeCardPaymentMethodPSPID added in v0.1.929

func WithVerifyStripeCardPaymentMethodPSPID(x *ID) VerifyStripeCardOption

type VerifyStripeCardOptions added in v0.1.843

type VerifyStripeCardOptions struct {
	StripeCustomerPSPID
	PaymentMethodPSPID *ID
}

func ApplyVerifyStripeCardOptions added in v0.1.843

func ApplyVerifyStripeCardOptions(opts *VerifyStripeCardOptions, modifiers ...VerifyStripeCardOption) VerifyStripeCardOptions

func (*VerifyStripeCardOptions) Params added in v0.1.845

func (*VerifyStripeCardOptions) Val added in v0.1.1028

func (o *VerifyStripeCardOptions) Val() error

type VertexEmbedder added in v0.1.668

type VertexEmbedder interface {
	EmbedderOperator
	GetEmbeddings(ctx context.Context, in []EmbedInput) (*EmbedR, error)
}

type VertexGenerativeModels added in v0.1.756

type VertexGenerativeModels interface {
	GenerateContent(ctx context.Context, model string, contents []*genai.Content, config *genai.GenerateContentConfig) (*genai.GenerateContentResponse, error)
}

type VertexModels added in v0.1.661

type VertexModels interface {
	EmbedContent(ctx context.Context, model string, contents []*genai.Content, config *genai.EmbedContentConfig) (*genai.EmbedContentResponse, error)
}

type VertexOperator added in v0.1.661

type VertexOperator interface {
	VertexEmbedder
	Captioner
}

type VideoCodec added in v0.1.498

type VideoCodec struct {
	Name     string
	MinValue uint32
	MaxValue uint32
}

type VideoIntelOperator added in v0.1.477

type VideoIntelOperator interface {
	IntelOperator
}

type Visibility added in v0.1.409

type Visibility uint
const (
	Private Visibility = iota
	Contacts
	All
)

func (Visibility) Val added in v0.1.1028

func (v Visibility) Val() error

type WalkCursorOptions added in v0.1.1059

type WalkCursorOptions struct {
	Cursor   MongoCursor
	Receiver any
	Fn       func(v any) error
}

type WalkPipelineOptions added in v0.1.1059

type WalkPipelineOptions struct {
	C        Col
	Receiver any
	Pipeline MongoPipeliner
	Fn       func(v any) error
}

type WatchCollectionOptions added in v0.0.5

type WatchCollectionOptions struct {
	ReadConcern string
	C           string
	Receiver    any
	Pipeline    MongoPipeliner
	Options     *options.ChangeStreamOptionsBuilder
	LookupKey   string
	Output      MongoOutCSChan
}

type WatchDBOptions added in v0.0.5

type WatchDBOptions struct {
	Receiver  any
	Pipeline  MongoPipeliner
	Options   *options.ChangeStreamOptionsBuilder
	LookupKey string
	Output    MongoOutCSChan
}

type WebSocketBytesMessage added in v0.1.940

type WebSocketBytesMessage struct {
	T WebSocketMessageType
	B []byte
}

func (*WebSocketBytesMessage) Val added in v0.1.1028

func (w *WebSocketBytesMessage) Val() error

type WebSocketCloseError added in v0.1.940

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

func (WebSocketCloseError) Code added in v0.1.940

func (e WebSocketCloseError) Code() int

func (WebSocketCloseError) Error added in v0.1.940

func (e WebSocketCloseError) Error() string

type WebSocketConn added in v0.1.940

type WebSocketConn struct {
	C *websocket.Conn
}

func (*WebSocketConn) Val added in v0.1.1028

func (c *WebSocketConn) Val() error

type WebSocketMessageType added in v0.1.940

type WebSocketMessageType int
const (
	WebSocketTextMessage      WebSocketMessageType = websocket.TextMessage
	WebSocketBinaryMessage    WebSocketMessageType = websocket.BinaryMessage
	WebSocketCloseMessage     WebSocketMessageType = websocket.CloseMessage
	WebSocketPingMessage      WebSocketMessageType = websocket.PingMessage
	WebSocketPongMessage      WebSocketMessageType = websocket.PongMessage
	WebSocketDefaultReadLimit                      = (1 << 20)
)

func (*WebSocketMessageType) Val added in v0.1.1028

func (w *WebSocketMessageType) Val() error

type WebSocketOperator added in v0.1.940

type WebSocketOperator interface {
	AcceptWebSocket(ctx context.Context, opts AcceptWebSocketOptions) (*WebSocketConn, error)
	DialWebSocket(ctx context.Context, opts DialWebSocketOptions) (*WebSocketConn, *http.Response, error)
	CloseWebSocket(ctx context.Context, opts CloseWebSocketOptions) error
	ReadWebSocket(ctx context.Context, opts ReadWebSocketOptions) (*WebSocketBytesMessage, error)
	ReaderWebSocket(ctx context.Context, opts ReaderWebSocketOptions) (*WebSocketReaderMessage, error)
	WriteWebSocket(ctx context.Context, opts WriteWebSocketOptions) error
	SetWebSocketReadDeadline(ctx context.Context, opts SetWebSocketReadDeadlineOptions) error
	SetWebSocketPongHandler(ctx context.Context, opts SetWebSocketPongHandlerOptions) error
	IsUnexpectedWebSocketCloseError(ctx context.Context, opts IsUnexpectedWebSocketCloseErrorOptions) (bool, error)
	FormatWebSocketCloseMessage(ctx context.Context, opts FormatWebSocketCloseMessageOptions) ([]byte, error)
}

type WebSocketPongHandler added in v0.1.940

type WebSocketPongHandler func(appData string) error

type WebSocketReaderMessage added in v0.1.940

type WebSocketReaderMessage struct {
	T WebSocketMessageType
	R io.Reader
}

func (*WebSocketReaderMessage) Val added in v0.1.1028

func (w *WebSocketReaderMessage) Val() error

type WebSocketSession added in v0.1.943

type WebSocketSession struct {
	IG       WebSocketSessionIngress
	EG       WebSocketSessionEgress
	Ctx      context.Context
	CancelFn context.CancelFunc
}

WebSocketSession is a live session that owns the connection lifecycle.

type WebSocketSessionEgress added in v0.1.943

type WebSocketSessionEgress chan *WebSocketBytesMessage

type WebSocketSessionIngress added in v0.1.943

type WebSocketSessionIngress chan *WebSocketReaderMessage

type WebSocketSessionIngressPolicy added in v0.1.944

type WebSocketSessionIngressPolicy string

WebSocketSessionIngressPolicy controls what happens when ingress is full.

func (*WebSocketSessionIngressPolicy) Val added in v0.1.1028

type WebSocketSessionOperator added in v0.1.943

type WebSocketSessionOperator interface {
	ServeWebSocketSession(ctx context.Context, opts ServeWebSocketSessionOptions) (*WebSocketSession, error)
}

type WrapperWriteCloser added in v0.1.594

type WrapperWriteCloser interface {
	WrapWriteCloser(ctx context.Context, w io.Writer) (io.WriteCloser, error)
}

type WriteWebSocketOption added in v0.1.940

type WriteWebSocketOption = Opt[WriteWebSocketOptions]

func WithWriteWebSocketC added in v0.1.940

func WithWriteWebSocketC(x *WebSocketConn) WriteWebSocketOption

func WithWriteWebSocketM added in v0.1.940

func WithWriteWebSocketM(x *WebSocketBytesMessage) WriteWebSocketOption

type WriteWebSocketOptions added in v0.1.940

type WriteWebSocketOptions struct {
	C *WebSocketConn
	M *WebSocketBytesMessage
}

func ApplyWriteWebSocketOptions added in v0.1.940

func ApplyWriteWebSocketOptions(opts *WriteWebSocketOptions, modifiers ...WriteWebSocketOption) WriteWebSocketOptions

func (*WriteWebSocketOptions) Val added in v0.1.1028

func (o *WriteWebSocketOptions) Val() error

type Writer added in v0.1.381

type Writer interface {
	Write(ctx context.Context, w io.Writer, data []byte) error
}

Jump to

Keyboard shortcuts

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