Documentation
¶
Index ¶
- Constants
- Variables
- func Apply[T any](o *T, mods ...Opt[T]) T
- func DefaultGRPCClientOptions(credentialsJSON []byte) []option.ClientOption
- func ExtractAuthToken(r *http.Request, opts AuthOptions) (string, error)
- func IDRegistrar(reg *bson.Registry)
- func NewIDKey(prefix string) string
- func ParseOperationResultToSingle[T any](ctx context.Context, res *OperationResult, recv T, m Marshaler, u Unmarshaler) (T, error)
- func ParseOperationResultToSlice[T any](ctx context.Context, res *OperationResult, recv *[]T, m Marshaler, ...) ([]T, error)
- func ParseOperationResultToSliceDynamic(ctx context.Context, res *OperationResult, recv any, m Marshaler, ...) ([]any, error)
- type ArbiterIDReembedding
- type ArbiterOperator
- type AtlasDataType
- type AtlasIndexes
- type Atz
- type AudioOptions
- type AuthOption
- type AuthOptions
- type AuthenticationOperator
- type Authorizable
- type AuthorizationResult
- type AuthorizationResultOption
- type AutoCensorOption
- func WithAutoCensorCensorRLRPermille(x int64) AutoCensorOption
- func WithAutoCensorMaxReportsAbs(x int64) AutoCensorOption
- func WithAutoCensorMinLikesForAutoCensor(x int64) AutoCensorOption
- func WithAutoCensorMinReportsForCheck(x int64) AutoCensorOption
- func WithAutoCensorUncensorRLRPermille(x int64) AutoCensorOption
- type AutoCensorOptions
- type BSONOperator
- type Base64Decoder
- type BasisInt
- type BasisInt32
- type BasisInt64
- type BasisOperator
- type BatchSendResult
- type Blob
- type BucketFile
- type BucketOperator
- type BucketScan
- type Bypass
- type C
- type CacheHit
- type CacheHitter
- type CacheID
- type CacheIdentifier
- type CacheKey
- type CacheMulti
- type CacheOperator
- type Cacher
- type CallEvent
- type Captioner
- type CaptionerOperator
- type CertGenerator
- type ChangeEvent
- type ClaimFunc
- type ClaimRunNamespace
- type ClaimRunOption
- type ClaimRunOptions
- type ClaimRunReembedOption
- type ClaimRunReembedOptions
- type ClaimRunStatsPopOption
- type ClaimRunStatsPopOptions
- type Closer
- type CloserInOut
- type CloserWithCtx
- type ComponentExtractor
- type CompressAudioOption
- type CompressAudioOptions
- type CompressImageOption
- func WithCompressImageCompressionType(x string) CompressImageOption
- func WithCompressImageDecrementationFactor(x uint32) CompressImageOption
- func WithCompressImageIdealSize(x int64) CompressImageOption
- func WithCompressImageMaxIterations(x uint32) CompressImageOption
- func WithCompressImageMinPercentSize(x uint32) CompressImageOption
- func WithCompressImageMinQuality(x uint32) CompressImageOption
- func WithCompressImageOutputMIME(x string) CompressImageOption
- func WithCompressImagePathInput(x string) CompressImageOption
- func WithCompressImagePathOutput(x string) CompressImageOption
- func WithCompressImageQuality(x uint32) CompressImageOption
- func WithCompressImageSizePercent(x uint32) CompressImageOption
- type CompressImageOptions
- type CompressVideoOption
- func WithCompressVideoAudio(x AudioOptions) CompressVideoOption
- func WithCompressVideoCodec(x VideoCodec) CompressVideoOption
- func WithCompressVideoCompressionRate(x uint32) CompressVideoOption
- func WithCompressVideoOutputMIME(x string) CompressVideoOption
- func WithCompressVideoPathInput(x string) CompressVideoOption
- func WithCompressVideoPathOutput(x string) CompressVideoOption
- func WithCompressVideoScale(x string) CompressVideoOption
- type CompressVideoOptions
- type ComputedHours
- type Conformer
- type ConversionFactor
- type Copier
- type CountFromPipelineOptions
- type CreateCollectionsOptions
- type CreateIndexesOptions
- type CreateSearchIndexesOptions
- type DBOperator
- type DateFilterOptions
- type DecodeCallbackOption
- type DecodeCallbackOptions
- type DecodeCursorOptions
- type DeleteManyOptions
- type DeleteOneHandlerOptions
- type DeleteOneOptions
- type Dt
- func (d Dt) AddDays(ctx context.Context, g Geocoder, days int64) (Dt, error)
- func (d Dt) AddDuration(ctx context.Context, g Geocoder, dur time.Duration) (Dt, error)
- func (d Dt) AddMonths(ctx context.Context, g Geocoder, months int64) (Dt, error)
- func (d Dt) AddWeeks(ctx context.Context, g Geocoder, weeks int64) (Dt, error)
- func (d Dt) AddYears(ctx context.Context, g Geocoder, years int64) (Dt, error)
- func (d Dt) After(ctx context.Context, g Geocoder, o Dt) (bool, error)
- func (d Dt) AsUTC() Dt
- func (d Dt) Before(ctx context.Context, g Geocoder, o Dt) (bool, error)
- func (d Dt) Compare(ctx context.Context, g Geocoder, o Dt) (int, error)
- func (d Dt) CompareDay(ctx context.Context, g Geocoder, o Dt) (int, error)
- func (d Dt) CompareDayIn(ctx context.Context, g Geocoder, o Dt, tz string) (int, error)
- func (d Dt) Diff(ctx context.Context, g Geocoder, o Dt) (time.Duration, error)
- func (d *Dt) ForceUTC()
- func (d *Dt) GetD() int64
- func (d *Dt) GetH() int64
- func (d *Dt) GetM() time.Month
- func (d *Dt) GetMin() int64
- func (d *Dt) GetTz() string
- func (d *Dt) GetY() int64
- func (d Dt) Midnight() Dt
- func (d Dt) Round(ctx context.Context, g Geocoder, dur time.Duration) (Dt, error)
- func (d *Dt) SetD(x int64)
- func (d *Dt) SetH(x int64)
- func (d *Dt) SetM(x time.Month)
- func (d *Dt) SetMin(x int64)
- func (d *Dt) SetTz(x string)
- func (d *Dt) SetY(x int64)
- func (d Dt) Since(ctx context.Context, g Geocoder, o Dt) (time.Duration, error)
- func (d Dt) SubDuration(ctx context.Context, g Geocoder, dur time.Duration) (Dt, error)
- func (d Dt) TimeLocal(ctx context.Context, g Geocoder) (time.Time, error)
- func (d Dt) TimeUTC(ctx context.Context, g Geocoder) (time.Time, error)
- func (d Dt) Until(ctx context.Context, g Geocoder, o Dt) (time.Duration, error)
- func (d Dt) Weekday(ctx context.Context, g Geocoder) (time.Weekday, error)
- func (d Dt) WithTz(x string) Dt
- type DtOptions
- type ElemMatchFilterOptions
- type ElemsInArrayFilterOptions
- type EmailByter
- type EmailOperator
- type EmailPubSub
- type EmailSender
- type EmailSenderInfo
- type EmailSpecifics
- type EmailSuspensionReason
- type EmailTemplateType
- type Emailable
- type EmbedC
- func (c *EmbedC) GetFile() []byte
- func (c *EmbedC) GetFileURL() string
- func (c *EmbedC) GetMIME() string
- func (c *EmbedC) GetText() string
- func (c EmbedC) IsZero() bool
- func (c *EmbedC) SetFile(x []byte)
- func (c *EmbedC) SetFileURL(x string)
- func (c *EmbedC) SetMIME(x string)
- func (c *EmbedC) SetText(x string)
- func (c EmbedC) Validate() error
- type EmbedCOption
- type EmbedInput
- type EmbedR
- func (e *EmbedR) GetDim() int
- func (e *EmbedR) GetEmbeddingVersion() string
- func (e *EmbedR) GetModality() Modality
- func (e *EmbedR) GetV() [][]float32
- func (e *EmbedR) IsZero() bool
- func (e *EmbedR) SetDim(x int)
- func (e *EmbedR) SetEmbeddingVersion(x string)
- func (e *EmbedR) SetModality(x Modality)
- func (e *EmbedR) SetV(x [][]float32)
- func (e *EmbedR) Validate(expectN int) error
- type EmbedROption
- type EmbedderOperator
- type EmbeddingIndexOptions
- type EmbeddingOptions
- type EnsureBucketOption
- type EnsureBucketOptions
- type Entry
- type Env
- type EnvInfo
- type EnvironmentOperator
- type FQDN
- type FSysFileReader
- type FSysOperator
- type FSysReadDirOperator
- type FSysSubFSOperator
- type FactoryOperator
- type FeedReactionType
- type FetchManyOption
- func WithFetchManyCollection(x string) FetchManyOption
- func WithFetchManyMock(x any) FetchManyOption
- func WithFetchManyQuery(x map[string][]string) FetchManyOption
- func WithFetchManyReceiver(x any) FetchManyOption
- func WithFetchManyRequest(x *http.Request) FetchManyOption
- func WithFetchManyService(x string) FetchManyOption
- type FetchManyOptions
- type FetchOneOption
- func WithFetchOneCollection(x string) FetchOneOption
- func WithFetchOneID(x fmt.Stringer) FetchOneOption
- func WithFetchOneMock(x any) FetchOneOption
- func WithFetchOneReceiver(x any) FetchOneOption
- func WithFetchOneRequest(x *http.Request) FetchOneOption
- func WithFetchOneService(x string) FetchOneOption
- type FetchOneOptions
- type FetcherOperator
- type FieldInArrayFilterOptions
- type FilterOptions
- type FindManyHandlerOptions
- type FindManyOptions
- type FindObjectsOption
- type FindObjectsOptions
- type FindOneHandlerOptions
- type FindOneOptions
- type FirebaseAuthenticator
- type FirebaseInitializer
- type FirebaseMockUser
- type FirebaseOperator
- type FirebaseTester
- type FirebaseUtil
- type GenerateSignedObjectURLsOption
- type GenerateSignedObjectURLsOptions
- type GenerateUsernameOption
- type GenerateUsernameOptions
- type Generator
- type Geocoder
- type GmailMessager
- type GmailService
- type GmailUsersMessageService
- type GoogleMaps
- type GoogleRouteOptimization
- type GoogleStorage
- type GoogleVideoIntelligence
- type GoogleVision
- type GrokOperator
- type GrokPrompter
- type GrokRequest
- type GrokResponse
- type GzipReader
- type GzipUtil
- type GzipWriter
- type HTTPClient
- type HTTPDoer
- type HTTPFileOpener
- type HTTPFormParser
- type HTTPHTML
- type HTTPOperator
- type HTTPRequester
- type HTTPResponder
- type HTTPResponseWriter
- type HTTPServer
- type HTTPUtil
- type HTTPWriter
- type HandlerFunc
- type ID
- type IDDecoder
- type IDEncoder
- type Identifiable
- type Identifier
- type ImageIntelOperator
- type IndexEntry
- type Indexable
- type InitOption
- type InitOptions
- type InsertOneHandlerOptions
- type InsertOneOptions
- type IntelOperator
- type JSONOption
- type JSONOptions
- type Level
- type LibraryOperator
- type LimiterInfo
- type LimiterOperator
- type LogOperator
- type MajorUnit
- type Marshaler
- type MatchBehavior
- type MediaInput
- type MediaOperator
- type MessageRole
- type MiddlewareFunc
- type MiddlewareOperator
- type MintVideoTokenOption
- type MintVideoTokenOptions
- type Modality
- type MongoChangeStream
- type MongoClient
- type MongoCollection
- type MongoCursor
- type MongoDatabase
- type MongoFilter
- type MongoLookupTarget
- type MongoOperator
- type MongoOutCSChan
- type MongoPipeliner
- type MongoSpecialized
- type MongoUtil
- type MongoVerb
- type MultipartBodyOption
- type MultipartBodyOptions
- type MultipartFile
- type MultipartOperator
- type NormalizeOption
- type NormalizeOptions
- type Normalizer
- type NotifOperator
- type NotificationOptions
- type Notifier
- type OIDCAuthenticator
- type OIDCCreator
- type OIDCOperator
- type Opener
- type OperationResult
- type OperationResultOption
- type Opt
- type PLPull
- type PState
- type PaginationOptions
- type Parser
- type Path
- type PeriodOperator
- type PoolOperator
- type PostType
- type ProcessChangeStreamOptions
- type Prompt
- type PromptMessage
- type PromptOption
- func WithPromptAdditionalOpts(x map[string]any) PromptOption
- func WithPromptContext(x []PromptMessage) PromptOption
- func WithPromptResponseFormat(x *PromptResponseFormat) PromptOption
- func WithPromptSystemPrompt(x string) PromptOption
- func WithPromptTemperature(x float64) PromptOption
- func WithPromptUserPrompt(x string) PromptOption
- type PromptOptions
- type PromptResponseFormat
- type PrompterOperator
- type PubSubAdminOperator
- type PubSubClient
- type PubSubFamily
- type PubSubKey
- type PubSubMessage
- type PubSubOperator
- type PubSubPayload
- type PubSubPullSubscription
- type PubSubPushSubscription
- type PubSubTopic
- type PullFactoryOperator
- type PullHandlerOptions
- type PullSession
- type PullSubFunc
- type PullSubFuncOption
- type PullSubFuncOptions
- type PullType
- type PunchMode
- type PunchStatus
- type PunchType
- type QRCode
- type QROperator
- type QueryHandlerOptions
- type QueryParamRule
- type QueryParamRules
- type Queryable
- type RangeOption
- type RangeOptions
- type RawCacheKey
- type Reader
- type RecurrenceEndType
- type RecurrenceType
- type RedisClient
- type RedisOperator
- type RedisTokenizer
- type ReembeddingOption
- func WithReembeddingDimensionKey(x string) ReembeddingOption
- func WithReembeddingEmbeddingVersionKey(x string) ReembeddingOption
- func WithReembeddingLimit(x int64) ReembeddingOption
- func WithReembeddingModality(x Modality) ReembeddingOption
- func WithReembeddingModalityKey(x string) ReembeddingOption
- type ReembeddingOptions
- type ReflectOperator
- type RegisteredRoute
- type Registry
- type RegistryMutex
- type Relation
- type RenderOption
- type RenderOptions
- type ReplaceOneHandlerOptions
- type ReplaceOneOptions
- type RequestOption
- type RequestOptions
- type RequestWeight
- type RequireOption
- type RequireOptions
- type ResultKey
- type Role
- type Route
- type RouterKeyExtractor
- type RouterOperator
- type RouterParser
- type RunPipelineOptions
- type SMS
- type ScanManyOption
- type ScanManyOptions
- type Scopable
- type Scope
- type SearchIndexEntry
- type SearchManyHandlerOptions
- type SearchOptions
- type SearchResult
- type SearchResultOption
- type Searchable
- type SecretInfo
- type SecretManagerClient
- type SecretOperator
- type SemaphoreInfo
- type SemaphoreOperator
- type SendEmailOption
- type SendEmailOptions
- type SendResult
- type ServeFileOption
- type ServeFileOptions
- type ServerInfo
- type ServerOperator
- type ServerRunner
- type ServiceAccountFile
- type SortDirection
- type Sortable
- type SpeechClient
- type SpeechOperator
- type SpeechRecognizeOption
- func WithSpeechModel(x string) SpeechRecognizeOption
- func WithSpeechRecognizeAudioLanguageCode(x string) SpeechRecognizeOption
- func WithSpeechRecognizeFileURI(x string) SpeechRecognizeOption
- func WithSpeechRecognizeMaxAlternatives(x int32) SpeechRecognizeOption
- func WithSpeechRecognizeRecognizerName(x string) SpeechRecognizeOption
- func WithSpeechRecognizeRelevanceThreshold(x float32) SpeechRecognizeOption
- type SpeechRecognizeOptions
- type SpeechToTextResponse
- type SpeechToTextResponseOption
- type SpeechToTextTranscription
- type Status
- type StorageOperator
- type StoreOption
- type StoreOptions
- type StringOperator
- type TemplateOperator
- type TemplateRenderer
- type TextOptions
- type Tool
- type ToolOption
- type ToolOptions
- type TranslateClient
- type TranslateCommonOption
- type TranslateCommonOptions
- type TranslateHTMLOption
- type TranslateHTMLOptions
- type TranslateTextOption
- type TranslateTextOptions
- type TranslationOperator
- type TwilioAPIService
- type TwilioDecoder
- type TwilioEvent
- func (e *TwilioEvent) GetEvent() CallEvent
- func (e *TwilioEvent) GetRoomID() ID
- func (e *TwilioEvent) GetRoomSID() ID
- func (e *TwilioEvent) GetTimestamp() time.Time
- func (e *TwilioEvent) GetUserID() ID
- func (e *TwilioEvent) GetUserSID() ID
- func (e *TwilioEvent) SetEvent(x CallEvent)
- func (e *TwilioEvent) SetRoomID(x ID)
- func (e *TwilioEvent) SetRoomSID(x ID)
- func (e *TwilioEvent) SetTimestamp(x time.Time)
- func (e *TwilioEvent) SetUserID(x ID)
- func (e *TwilioEvent) SetUserSID(x ID)
- type TwilioEventOption
- func WithTwilioEventEvent(x CallEvent) TwilioEventOption
- func WithTwilioEventRoomID(x ID) TwilioEventOption
- func WithTwilioEventRoomSID(x ID) TwilioEventOption
- func WithTwilioEventTimestamp(x time.Time) TwilioEventOption
- func WithTwilioEventUserID(x ID) TwilioEventOption
- func WithTwilioEventUserSID(x ID) TwilioEventOption
- type TwilioOperator
- type TwilioTokenMinter
- type UnionWithField
- type Unmarshaler
- type UploadObjectOption
- type UploadObjectOptions
- type UploadObjectsOption
- type UploadObjectsOptions
- type UploadOption
- type UploadOptions
- type UpsertOneHandlerOptions
- type UpsertResult
- type UpsertResultOption
- type UserType
- type ValidationOperator
- type VectorSearchField
- type VertexEmbedder
- type VertexGenerativeModels
- type VertexModels
- type VertexOperator
- type VideoCodec
- type VideoIntelOperator
- type Visibility
- type WatchCollectionOptions
- type WatchDBOptions
- type WorksiteType
- type WrapperWriteCloser
- type Writer
Constants ¶
const ( ExtImageJPEG = ".jpg" ExtImagePNG = ".png" ExtVideoMP4 = ".mp4" ExtAudioM4A = ".m4a" )
const ( CountKey ResultKey = "total" UnionWithColl UnionWithField = "coll" UnionWithPipeline UnionWithField = "pipeline" MongoLookupFullDocument MongoLookupTarget = "fullDocument" MongoLookupDocumentKey MongoLookupTarget = "documentKey" MongoLookupOperationType MongoLookupTarget = "operationType" 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" )
const ( SearchQueryKey = "q" SearchPageKey = "page" SearchPerPageKey = "per_page" )
const DefaultIndent = " "
const (
IDKey = "id"
)
const (
SessionTokenKey = "session_token"
)
Variables ¶
var ( ReembedNamespace = claimRunNamespace("reembed") StatsPopNamespace = claimRunNamespace("statspop") AbsorbLoadNamespace = claimRunNamespace("absorbload") )
var ( PathSearch = path("search") PathPull = path("pull") )
var ( PostTypeEmployment = postType("employment") PostTypeJob = postType("job") )
var ( Daily = recurrenceType("daily") Weekly = recurrenceType("weekly") Monthly = recurrenceType("monthly") Yearly = recurrenceType("yearly") Indefinite = recurrenceEndType("indefinite") AfterOccurrences = recurrenceEndType("after_occurrences") AfterDate = recurrenceEndType("after_date") )
var ( Pending = status("pending") Started = status("started") Terminated = status("terminated") )
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") )
var ( CallEventConnected = callEvent("connected") CallEventDisconnected = callEvent("disconnected") CallEventCallEnded = callEvent("ended") )
var ( UserTypeEmployer = userType("employer") UserTypeEmployee = userType("employee") UserTypeClient = userType("client") UserTypeExternal = userType("external") )
var ( ModText = modality("text") ModImage = modality("image") ModVideo = modality("video") ModNA = modality("N/A") )
var ( Fixed = worksiteType("fixed") Floating = worksiteType("floating") )
var SearchRules = QueryParamRules{ { Key: SearchQueryKey, DefaultValue: "", MultipleValuesAllowed: false, Optional: false, }, { Key: SearchPageKey, DefaultValue: "", MultipleValuesAllowed: false, Optional: false, }, { Key: SearchPerPageKey, DefaultValue: "", MultipleValuesAllowed: false, Optional: false, }, }
SearchRules defines validation rules for search queries.
Functions ¶
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 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).
Types ¶
type ArbiterIDReembedding ¶ added in v0.1.726
func (ArbiterIDReembedding) String ¶ added in v0.1.726
func (a ArbiterIDReembedding) String() string
func (*ArbiterIDReembedding) Validate ¶ added in v0.1.726
func (a *ArbiterIDReembedding) Validate() error
type ArbiterOperator ¶ added in v0.1.726
type ArbiterOperator interface {
CloserWithCtx
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)
ClaimRunReembed(ctx context.Context, opts ClaimRunReembedOptions) (bool, error)
ClaimRunStatsPop(ctx context.Context, opts ClaimRunStatsPopOptions) (bool, error)
AbsorbLoad(ctx context.Context, c fmt.Stringer, ttl time.Duration) (bool, 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
AtlasIndexes is a map of field name to MongoDB Atlas data type.
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 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
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 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 WithAutoCensorUncensorRLRPermille ¶ added in v0.1.768
func WithAutoCensorUncensorRLRPermille(x int64) AutoCensorOption
type AutoCensorOptions ¶ added in v0.1.764
type AutoCensorOptions struct {
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) Validate ¶ added in v0.1.764
func (o *AutoCensorOptions) Validate() 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 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 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) Validate ¶ added in v0.1.479
func (b *BucketFile) Validate(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, bucketName string, objectName string) error
DeleteObjectsByQuery(ctx context.Context, bucketName string, 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) (string, 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 CacheIdentifier ¶ added in v0.0.5
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 NewReembedJobKey ¶ added in v0.1.726
func NewReembedJobKey(service string, id ArbiterIDReembedding) CacheKey
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 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 CertGenerator ¶ added in v0.0.5
type ChangeEvent ¶ added in v0.0.5
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
type ClaimRunOptions ¶ added in v0.1.726
func ApplyClaimRunOptions ¶ added in v0.1.726
func ApplyClaimRunOptions(opts *ClaimRunOptions, modifiers ...ClaimRunOption) ClaimRunOptions
func (*ClaimRunOptions) Validate ¶ added in v0.1.726
func (c *ClaimRunOptions) Validate() 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 WithClaimRunReembedService ¶ added in v0.1.726
func WithClaimRunReembedService(x string) ClaimRunReembedOption
type ClaimRunReembedOptions ¶ added in v0.1.726
type ClaimRunReembedOptions struct {
Service string
ID ArbiterIDReembedding
Fn ClaimFunc
}
func ApplyClaimRunReembedOptions ¶ added in v0.1.726
func ApplyClaimRunReembedOptions(opts *ClaimRunReembedOptions, modifiers ...ClaimRunReembedOption) ClaimRunReembedOptions
func (*ClaimRunReembedOptions) Validate ¶ added in v0.1.726
func (c *ClaimRunReembedOptions) Validate() 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 WithClaimRunStatsPopService ¶ added in v0.1.773
func WithClaimRunStatsPopService(x string) ClaimRunStatsPopOption
type ClaimRunStatsPopOptions ¶ added in v0.1.773
func ApplyClaimRunStatsPopOptions ¶ added in v0.1.773
func ApplyClaimRunStatsPopOptions(opts *ClaimRunStatsPopOptions, modifiers ...ClaimRunStatsPopOption) ClaimRunStatsPopOptions
func (*ClaimRunStatsPopOptions) Validate ¶ added in v0.1.773
func (c *ClaimRunStatsPopOptions) Validate() error
type CloserInOut ¶ added in v0.1.381
type CloserWithCtx ¶ added in v0.1.13
type ComponentExtractor ¶ added in v0.1.10
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 ConversionFactor ¶ added in v0.1.10
type ConversionFactor = int64
type CountFromPipelineOptions ¶ added in v0.1.771
type CountFromPipelineOptions struct {
Collection string
Pipeline MongoPipeliner
CountKey ResultKey
}
type CreateCollectionsOptions ¶ added in v0.1.37
type CreateCollectionsOptions struct {
Collections []string
}
type CreateIndexesOptions ¶ added in v0.1.37
type CreateIndexesOptions struct {
Collection string
Indexes []IndexEntry
}
type CreateSearchIndexesOptions ¶ added in v0.1.37
type CreateSearchIndexesOptions struct {
Collection string
Indexes []SearchIndexEntry
}
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) error
}
type DateFilterOptions ¶ added in v0.0.5
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
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 DeleteManyOptions ¶ added in v0.0.5
type DeleteOneHandlerOptions ¶ added in v0.1.270
type DeleteOneOptions ¶ added in v0.0.5
type DeleteOneOptions struct {
Collection string
IDKey string
ID Identifier
}
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 NewDtFromTime ¶ added in v0.1.637
func (Dt) AddDuration ¶ added in v0.1.642
func (Dt) Compare ¶ added in v0.1.639
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
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
CompareDayIn compares d and o by day after converting both to the provided IANA tz.
func (Dt) Diff ¶ added in v0.1.641
Diff returns d - o as a duration (in absolute time), comparing both instants in UTC.
func (Dt) Since ¶ added in v0.1.641
Since returns the duration between d and o as d - o (alias of Diff).
func (Dt) SubDuration ¶ added in v0.1.642
type ElemMatchFilterOptions ¶ added in v0.0.5
type ElemsInArrayFilterOptions ¶ added in v0.0.5
type EmailByter ¶ added in v0.1.381
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, t EmailTemplateType, targetLanguage, recipientEmail, recipientUsername string, s EmailSpecifics) (*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 EmailSpecifics ¶ added in v0.1.396
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) GetFileURL ¶ added in v0.1.671
func (*EmbedC) SetFileURL ¶ added in v0.1.671
type EmbedCOption ¶ added in v0.1.796
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
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) Validate ¶ added in v0.1.668
func (e EmbedInput) Validate() 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) GetEmbeddingVersion ¶ added in v0.1.672
func (*EmbedR) GetModality ¶ added in v0.1.672
func (*EmbedR) SetEmbeddingVersion ¶ added in v0.1.672
func (*EmbedR) SetModality ¶ added in v0.1.672
type EmbedROption ¶ added in v0.1.672
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 EmbeddingIndexOptions ¶ added in v0.1.674
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) Validate ¶ added in v0.1.665
func (o *EmbeddingOptions) Validate() 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 string) EnsureBucketOption
type EnsureBucketOptions ¶ added in v0.1.479
type EnsureBucketOptions struct {
Name string
A storage.BucketAttrs
}
func ApplyEnsureBucketOptions ¶ added in v0.1.479
func ApplyEnsureBucketOptions(opts *EnsureBucketOptions, modifiers ...EnsureBucketOption) EnsureBucketOptions
type Entry ¶ added in v0.1.10
type Entry struct {
Handler HandlerFunc
Weight uint
}
Entry maps an HTTP handler to a request weight.
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
ExtractEnvInfo returns the current environment information.
type EnvironmentOperator ¶ added in v0.1.105
type FSysFileReader ¶
type FSysOperator ¶ added in v0.1.377
type FSysOperator interface {
FSysFileReader
FSysSubFSOperator
FSysReadDirOperator
}
type FSysReadDirOperator ¶ added in v0.1.516
type FSysSubFSOperator ¶ added in v0.1.377
type FactoryOperator ¶ added in v0.1.10
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) Validate ¶ added in v0.1.747
func (o *FeedReactionType) Validate() error
type FetchManyOption ¶ added in v0.1.416
type FetchManyOption = Opt[FetchManyOptions]
func WithFetchManyCollection ¶ added in v0.1.416
func WithFetchManyCollection(x string) 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 WithFetchManyService ¶ added in v0.1.416
func WithFetchManyService(x string) FetchManyOption
type FetchManyOptions ¶ added in v0.1.416
func ApplyFetchManyOptions ¶ added in v0.1.416
func ApplyFetchManyOptions(opts *FetchManyOptions, modifiers ...FetchManyOption) FetchManyOptions
func (*FetchManyOptions) Validate ¶ added in v0.1.416
func (o *FetchManyOptions) Validate() error
type FetchOneOption ¶ added in v0.1.416
type FetchOneOption = Opt[FetchOneOptions]
func WithFetchOneCollection ¶ added in v0.1.416
func WithFetchOneCollection(x string) 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 WithFetchOneService ¶ added in v0.1.416
func WithFetchOneService(x string) FetchOneOption
type FetchOneOptions ¶ added in v0.1.416
func ApplyFetchOneOptions ¶ added in v0.1.416
func ApplyFetchOneOptions(opts *FetchOneOptions, modifiers ...FetchOneOption) FetchOneOptions
func (*FetchOneOptions) Validate ¶ added in v0.1.416
func (o *FetchOneOptions) Validate() 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 FilterOptions ¶ added in v0.0.5
type FindManyHandlerOptions ¶ added in v0.1.270
type FindManyOptions ¶ added in v0.0.5
type FindManyOptions struct {
FindManyHandlerOptions
Collection string
Receiver any
SortByKey string
}
type FindObjectsOption ¶ added in v0.1.479
type FindObjectsOption = Opt[FindObjectsOptions]
func WithFindObjectsBucketName ¶ added in v0.1.479
func WithFindObjectsBucketName(x string) FindObjectsOption
func WithFindObjectsQuery ¶ added in v0.1.479
func WithFindObjectsQuery(x *storage.Query) FindObjectsOption
type FindObjectsOptions ¶ added in v0.1.479
func ApplyFindObjectsOptions ¶ added in v0.1.479
func ApplyFindObjectsOptions(opts *FindObjectsOptions, modifiers ...FindObjectsOption) FindObjectsOptions
func (*FindObjectsOptions) Validate ¶ added in v0.1.479
func (o *FindObjectsOptions) Validate() error
type FindOneHandlerOptions ¶ added in v0.1.360
type FindOneHandlerOptions struct {
Bypass
}
type FindOneOptions ¶ added in v0.0.5
type FindOneOptions struct {
Collection string
Receiver any
IDKey string
ID Identifier
}
type FirebaseAuthenticator ¶ added in v0.1.178
type FirebaseInitializer ¶ added in v0.1.583
type FirebaseMockUser ¶ added in v0.1.220
type FirebaseOperator ¶ added in v0.1.10
type FirebaseOperator interface {
FirebaseInitializer
FirebaseAuthenticator
FirebaseUtil
FirebaseTester
Notifier
}
type FirebaseTester ¶ added in v0.1.219
type FirebaseUtil ¶ added in v0.1.178
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 string) 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 string
Attrs []*storage.ObjectAttrs
Opts *storage.SignedURLOptions
}
func ApplyGenerateSignedObjectURLsOptions ¶ added in v0.1.479
func ApplyGenerateSignedObjectURLsOptions(opts *GenerateSignedObjectURLsOptions, modifiers ...GenerateSignedObjectURLsOption) GenerateSignedObjectURLsOptions
func (*GenerateSignedObjectURLsOptions) Validate ¶ added in v0.1.479
func (o *GenerateSignedObjectURLsOptions) Validate() error
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) Validate ¶ added in v0.1.457
func (o GenerateUsernameOptions) Validate() 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 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 GzipReader ¶
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 HTTPClient ¶ added in v0.0.5
type HTTPFileOpener ¶ added in v0.1.377
type HTTPFormParser ¶ added in v0.1.796
type HTTPOperator ¶ added in v0.1.377
type HTTPOperator interface {
HTTPResponder
HTTPUtil
HTTPHTML
HTTPDoer
}
type HTTPRequester ¶
type HTTPResponder ¶ added in v0.1.5
type HTTPResponseWriter ¶ added in v0.1.14
type HTTPServer ¶ added in v0.1.10
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
}
type HTTPWriter ¶
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
func (h HandlerFunc) Wrap(RS HTTPResponder) http.HandlerFunc
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 NewIDFromQVals ¶ added in v0.1.61
func NewIDFromString ¶ added in v0.0.8
func NewIDsFromStrings ¶ added in v0.1.781
func (ID) Equal ¶ added in v0.1.628
func (id ID) Equal(other Identifier) bool
func (*ID) MarshalJSON ¶ added in v0.1.40
func (*ID) UnmarshalJSON ¶ added in v0.1.40
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 Identifier ¶ added in v0.0.5
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(collection string) CreateIndexesOptions
IdxSrch(collection string) 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 WithSpecifics ¶ added in v0.1.385
func WithSpecifics(x string) InitOption
func WithSupportRedirectURL ¶ added in v0.1.390
func WithSupportRedirectURL(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
SupportRedirectURL 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 InsertOneOptions ¶ added in v0.0.5
type InsertOneOptions struct {
Collection string
Document Identifiable
}
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 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 LibraryOperator ¶ added in v0.1.45
type LimiterInfo ¶ added in v0.1.11
type LimiterOperator ¶ added in v0.1.10
type LimiterOperator interface {
Engage(next HandlerFunc) HandlerFunc
LimiterInfo
}
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 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
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) Validate ¶ added in v0.1.756
func (e MediaInput) Validate() error
Validate 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 MessageRole ¶ added in v0.1.245
type MessageRole = string
MessageRole represents the role of a message.
const ( // 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" // Grok2LatestModel is the latest model for the Grok LLM. Grok2LatestModel = "grok-2-latest" )
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
IdempotentPOST(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
}
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
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
type MongoChangeStream ¶ added in v0.0.5
type MongoClient ¶ added in v0.0.5
type MongoCollection ¶ added in v0.0.5
type MongoCollection interface {
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 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 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
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)
CountFromPipeline(ctx context.Context, opts CountFromPipelineOptions) (int64, 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 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 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 NotifOperator ¶ added in v0.1.583
type NotifOperator interface{ Notifier }
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) Validate ¶ added in v0.1.583
func (o *NotificationOptions) Validate(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 OIDCCreator ¶ added in v0.1.178
type OIDCOperator ¶ added in v0.1.178
type OIDCOperator interface {
OIDCAuthenticator
OIDCCreator
}
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 PaginationOptions ¶ added in v0.0.5
func (*PaginationOptions) Validate ¶ added in v0.1.498
func (p *PaginationOptions) Validate() 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 ProcessChangeStreamOptions ¶ added in v0.0.5
type ProcessChangeStreamOptions struct {
ChangeStream MongoChangeStream
LookupKey string
Receiver any
Output MongoOutCSChan
}
type PromptMessage ¶ added in v0.1.245
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 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
ToPubSubKey converts a string to lowercase.
type PubSubMessage ¶ added in v0.0.5
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, attrs ...string) (map[string]string, error)
CloserWithCtx
}
type PubSubPayload ¶ added in v0.1.367
type PubSubPullSubscription ¶ added in v0.1.162
type PubSubPullSubscription struct {
ID string
}
type PubSubPushSubscription ¶ added in v0.1.162
type PubSubTopic ¶ added in v0.1.162
type PubSubTopic struct {
ID string
}
type PullFactoryOperator ¶ added in v0.1.676
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 PunchStatus ¶ added in v0.1.699
type PunchStatus string
func (PunchStatus) Validate ¶ added in v0.1.699
func (p PunchStatus) Validate() error
type QROperator ¶ added in v0.1.594
type QueryHandlerOptions ¶ added in v0.1.274
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
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 RecurrenceEndType ¶ added in v0.1.699
type RecurrenceEndType = string
type RecurrenceType ¶ added in v0.1.699
type RecurrenceType = string
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
RedisTokenizer
CloserWithCtx
}
type RedisTokenizer ¶ added in v0.1.726
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) Validate ¶ added in v0.1.723
func (o *ReembeddingOptions) Validate() error
type ReflectOperator ¶ added in v0.1.10
type RegisteredRoute ¶ added in v0.1.10
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
LenHandlers returns the total number of handlers across all routes.
type RegistryMutex ¶ added in v0.1.10
RegistryMutex provides thread-safe access to the route registry.
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
func ApplyRenderOptions ¶ added in v0.1.385
func ApplyRenderOptions(opts *RenderOptions, modifiers ...RenderOption) RenderOptions
type ReplaceOneHandlerOptions ¶ added in v0.1.270
type ReplaceOneOptions ¶ added in v0.0.5
type ReplaceOneOptions struct {
Collection string
Document Identifiable
IDKey string
ID Identifier
}
type RequestOption ¶
type RequestOption = Opt[RequestOptions]
func WithRequestBody ¶
func WithRequestBody(x io.Reader) RequestOption
func WithRequestHeader ¶
func WithRequestHeader(x http.Header) RequestOption
type RequestOptions ¶
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
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 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
CompileRegex builds a compiled regex for matching the route.
type RouterKeyExtractor ¶ added in v0.1.198
type RouterOperator ¶ added in v0.1.10
type RouterParser ¶ added in v0.1.27
type RunPipelineOptions ¶ added in v0.1.79
type RunPipelineOptions struct {
Collection string
Receiver any
Pipeline MongoPipeliner
}
type ScanManyOption ¶ added in v0.1.478
type ScanManyOption = Opt[ScanManyOptions]
func WithScanManyCheck ¶ added in v0.1.478
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 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
Collection string
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
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 SemaphoreOperator ¶ added in v0.1.10
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 ServeFileOption ¶ added in v0.1.377
type ServeFileOption = Opt[ServeFileOptions]
func WithFS ¶ added in v0.1.377
func WithFS(x fs.FS) ServeFileOption
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
FS fs.FS
}
func ApplyServeFileOptions ¶ added in v0.1.377
func ApplyServeFileOptions(opts *ServeFileOptions, modifiers ...ServeFileOption) ServeFileOptions
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 ServiceAccountFile ¶ added in v0.1.479
type SortDirection ¶ added in v0.0.5
type SortDirection int
SortDirection represents the sorting order for MongoDB queries.
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) Validate ¶ added in v0.1.458
func (o SpeechRecognizeOptions) Validate() 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
func WithTranscriptions(x []SpeechToTextTranscription) SpeechToTextResponseOption
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 StorageOperator ¶ added in v0.1.595
type StorageOperator interface {
Upload(ctx context.Context, opts UploadOptions) 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) Validate ¶ added in v0.1.498
func (s *StoreOptions) Validate() error
type StringOperator ¶ added in v0.1.336
type StringOperator interface {
Generator
Normalizer
Conformer
Parser
}
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 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 TranslateCommonOption ¶ added in v0.1.393
type TranslateCommonOption func(*TranslateCommonOptions)
func WithBaseOnly ¶ added in v0.1.393
func WithBaseOnly(x bool) TranslateCommonOption
func WithSourceTag ¶ added in v0.1.393
func WithSourceTag(x language.Tag) TranslateCommonOption
func WithTargetTag ¶ added in v0.1.393
func WithTargetTag(x language.Tag) TranslateCommonOption
type TranslateCommonOptions ¶ added in v0.1.384
type TranslateHTMLOption ¶ added in v0.1.393
type TranslateHTMLOption = Opt[TranslateHTMLOptions]
func WithHTMLReader ¶ added in v0.1.393
func WithHTMLReader(x io.Reader) TranslateHTMLOption
func WithHTMLSelector ¶ added in v0.1.393
func WithHTMLSelector(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
type TranslateTextOption ¶ added in v0.1.393
type TranslateTextOption = Opt[TranslateTextOptions]
func WithConvertLineBreaks ¶ added in v0.1.393
func WithConvertLineBreaks(x bool) TranslateTextOption
func WithText ¶ added in v0.1.393
func WithText(x string) TranslateTextOption
func WithTranslateOpts ¶ added in v0.1.393
func WithTranslateOpts(x *translate.Options) TranslateTextOption
type TranslateTextOptions ¶ added in v0.1.384
type TranslateTextOptions struct {
TranslateCommonOptions
Text string
ConvertLineBreaks bool
Opts *translate.Options
}
func ApplyTranslateTextOptions ¶ added in v0.1.393
func ApplyTranslateTextOptions(base *TranslateTextOptions, textModifiers []TranslateTextOption, commonModifiers ...TranslateCommonOption) TranslateTextOptions
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)
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 UploadObjectOption ¶ added in v0.1.479
type UploadObjectOption = Opt[UploadObjectOptions]
func WithUploadObjectBucketName ¶ added in v0.1.479
func WithUploadObjectBucketName(x string) UploadObjectOption
func WithUploadObjectFile ¶ added in v0.1.479
func WithUploadObjectFile(x *BucketFile) UploadObjectOption
type UploadObjectOptions ¶ added in v0.1.479
type UploadObjectOptions struct {
BucketName string
F *BucketFile
}
func ApplyUploadObjectOptions ¶ added in v0.1.479
func ApplyUploadObjectOptions(opts *UploadObjectOptions, modifiers ...UploadObjectOption) UploadObjectOptions
func (*UploadObjectOptions) Validate ¶ added in v0.1.479
func (o *UploadObjectOptions) Validate() error
type UploadObjectsOption ¶ added in v0.1.479
type UploadObjectsOption = Opt[UploadObjectsOptions]
func WithUploadObjectsBucketName ¶ added in v0.1.479
func WithUploadObjectsBucketName(x string) UploadObjectsOption
func WithUploadObjectsFiles ¶ added in v0.1.479
func WithUploadObjectsFiles(x []*BucketFile) UploadObjectsOption
type UploadObjectsOptions ¶ added in v0.1.479
type UploadObjectsOptions struct {
BucketName string
F []*BucketFile
}
func ApplyUploadObjectsOptions ¶ added in v0.1.479
func ApplyUploadObjectsOptions(opts *UploadObjectsOptions, modifiers ...UploadObjectsOption) UploadObjectsOptions
func (*UploadObjectsOptions) Validate ¶ added in v0.1.479
func (o *UploadObjectsOptions) Validate() 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) Validate ¶ added in v0.1.595
func (o *UploadOptions) Validate() error
type UpsertOneHandlerOptions ¶ added in v0.1.584
type UpsertResult ¶ added in v0.1.584
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 ValidationOperator ¶ added in v0.1.338
type VectorSearchField ¶ added in v0.0.5
type VectorSearchField = string
VectorSearchField represents the field used for vector search in MongoDB Atlas.
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 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) Validate ¶ added in v0.1.411
func (v Visibility) Validate() error
type WatchCollectionOptions ¶ added in v0.0.5
type WatchCollectionOptions struct {
Collection 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 WorksiteType ¶ added in v0.1.699
type WorksiteType = string
type WrapperWriteCloser ¶ added in v0.1.594
Source Files
¶
- apply.go
- arbiter.go
- authentication.go
- authorization.go
- base64.go
- basis.go
- blob.go
- bucket.go
- cache.go
- captioner.go
- censor.go
- cert.go
- close.go
- credentials.go
- db.go
- dt.go
- email.go
- embedc.go
- embedder.go
- embedr.go
- env.go
- factory.go
- feed.go
- fetcher.go
- firebase.go
- fqdn.go
- fsys.go
- geocoder.go
- gmail.go
- googlemaps.go
- grok.go
- grpc.go
- gzip.go
- handler.go
- http.go
- id.go
- identifiable.go
- indexable.go
- inout.go
- intel.go
- json.go
- library.go
- limiter.go
- log.go
- media.go
- middleware.go
- mongo.go
- multipart.go
- notif.go
- oidc.go
- path.go
- period.go
- pipeliner.go
- pool.go
- post.go
- prompter.go
- pubsub.go
- pull.go
- qr.go
- queryable.go
- recurrence.go
- redis.go
- reflect.go
- registry.go
- relation.go
- result_authorization.go
- result_operation.go
- result_search.go
- result_upsert.go
- routeoptimization.go
- router.go
- scopable.go
- searchable.go
- secret.go
- semaphore.go
- server.go
- sortable.go
- speech.go
- status.go
- storage.go
- string.go
- template.go
- timesheet.go
- tool.go
- translation.go
- twilio.go
- user.go
- validation.go
- vertex.go
- visibility.go
- worksite.go