Documentation ¶
Index ¶
- func BuildApplication[TDocument any, TId Id](idReader ParamReader[TId], snapshotRetriever SnapshotRetriever[TId], ...) *fireworks.Application
- func BuildApplicationMapped[TDocument any, TResponse any, TId Id](idReader ParamReader[TId], snapshotRetriever SnapshotRetriever[TId], ...) *fireworks.Application
- func RunMapped[TDocument any, TResponse any, TId Id](idReader ParamReader[TId], snapshotRetriever SnapshotRetriever[TId], ...)
- func RunTyped[TDocument any, TId Id](idReader ParamReader[TId], snapshotRetriever SnapshotRetriever[TId], ...)
- type DataDecoder
- type DataHandler
- type DataMapper
- type DecodedDataHandler
- type DecodedDataHandlerMapped
- type DocumentRequestHandler
- type DocumentResponseResolver
- type ExistingDocumentDataHandler
- type Id
- type IdSnapshotRetriever
- type JsonResponseWriter
- type MapStructureDataDecoder
- type NoDataHandler
- type NonExistingDocumentHandler
- type ParamProvider
- type ParamReader
- type Response
- type ResponseResolver
- type ResponseWriter
- type SnapshotRetriever
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildApplication ¶
func BuildApplication[TDocument any, TId Id]( idReader ParamReader[TId], snapshotRetriever SnapshotRetriever[TId], configuration *fireworks.Configuration, ) *fireworks.Application
func BuildApplicationMapped ¶ added in v0.2.0
func BuildApplicationMapped[TDocument any, TResponse any, TId Id]( idReader ParamReader[TId], snapshotRetriever SnapshotRetriever[TId], documentToResponseMapper DataMapper[TDocument, TResponse], configuration *fireworks.Configuration, ) *fireworks.Application
func RunMapped ¶ added in v0.2.0
func RunMapped[TDocument any, TResponse any, TId Id]( idReader ParamReader[TId], snapshotRetriever SnapshotRetriever[TId], documentToResponseMapper DataMapper[TDocument, TResponse], configuration *fireworks.Configuration, )
func RunTyped ¶
func RunTyped[TDocument any, TId Id]( idReader ParamReader[TId], snapshotRetriever SnapshotRetriever[TId], configuration *fireworks.Configuration, )
Types ¶
type DataDecoder ¶ added in v0.1.2
type DataHandler ¶ added in v0.1.2
type DataMapper ¶ added in v0.2.0
type DecodedDataHandler ¶ added in v0.1.2
type DecodedDataHandler[T any] struct{}
func NewDecodedDataHandler ¶ added in v0.1.2
func NewDecodedDataHandler[T any]() *DecodedDataHandler[T]
func (DecodedDataHandler[T]) Handle ¶ added in v0.1.2
func (this DecodedDataHandler[T]) Handle(decodedData T) (int, any)
type DecodedDataHandlerMapped ¶ added in v0.2.0
type DecodedDataHandlerMapped[TDocument any, TResponse any] struct { // contains filtered or unexported fields }
func NewDecodedDataHandlerMapped ¶ added in v0.2.0
func NewDecodedDataHandlerMapped[TDocument any, TResponse any]( documentToResponseMapper DataMapper[TDocument, TResponse], ) *DecodedDataHandlerMapped[TDocument, TResponse]
func (DecodedDataHandlerMapped[TDocument, TResponse]) Handle ¶ added in v0.2.0
func (this DecodedDataHandlerMapped[TDocument, TResponse]) Handle(decodedData TDocument) (int, any)
type DocumentRequestHandler ¶
type DocumentRequestHandler[TDocument any, TId Id] struct { // contains filtered or unexported fields }
func NewDocumentRequestHandler ¶
func NewDocumentRequestHandler[TDocument any, TId Id]( paramReader ParamReader[TId], responseResolver ResponseResolver[TId], responseSetter ResponseWriter, ) *DocumentRequestHandler[TDocument, TId]
func (DocumentRequestHandler[TDocument, TId]) Handle ¶
func (this DocumentRequestHandler[TDocument, TId]) Handle(ginContext *gin.Context)
type DocumentResponseResolver ¶ added in v0.1.2
type DocumentResponseResolver[TId Id] struct { // contains filtered or unexported fields }
func NewDocumentResponseResolver ¶ added in v0.1.2
func NewDocumentResponseResolver[TId Id]( configuration *fireworks.Configuration, snapshotRetriever SnapshotRetriever[TId], existingDocumentDataHandler DataHandler[map[string]interface{}], nonExistingDocumentHandler NoDataHandler, ) *DocumentResponseResolver[TId]
func (DocumentResponseResolver[TId]) Resolve ¶ added in v0.1.2
func (this DocumentResponseResolver[TId]) Resolve(id TId) (int, any)
type ExistingDocumentDataHandler ¶ added in v0.1.2
type ExistingDocumentDataHandler[T any] struct { // contains filtered or unexported fields }
func NewExistingDocumentDataHandler ¶ added in v0.1.2
func NewExistingDocumentDataHandler[T any]( dataDecoder DataDecoder[T], decodedDataHandler DataHandler[T], ) *ExistingDocumentDataHandler[T]
type IdSnapshotRetriever ¶ added in v0.1.2
type IdSnapshotRetriever struct{}
func NewIdSnapshotRetriever ¶ added in v0.1.2
func NewIdSnapshotRetriever() *IdSnapshotRetriever
func (IdSnapshotRetriever) Retrieve ¶ added in v0.1.2
func (this IdSnapshotRetriever) Retrieve(collection *firestore.CollectionRef, id string) *firestore.DocumentSnapshot
type JsonResponseWriter ¶
type JsonResponseWriter struct{}
func NewJsonResponseWriter ¶
func NewJsonResponseWriter() *JsonResponseWriter
type MapStructureDataDecoder ¶ added in v0.1.2
type MapStructureDataDecoder[T any] struct{}
func NewMapStructureDataDecoder ¶ added in v0.1.2
func NewMapStructureDataDecoder[T any]() *MapStructureDataDecoder[T]
func (MapStructureDataDecoder[T]) Decode ¶ added in v0.1.2
func (this MapStructureDataDecoder[T]) Decode(data map[string]interface{}) T
type NoDataHandler ¶ added in v0.1.2
type NonExistingDocumentHandler ¶ added in v0.1.2
type NonExistingDocumentHandler struct{}
func NewNonExistingDocumentHandler ¶ added in v0.1.2
func NewNonExistingDocumentHandler() *NonExistingDocumentHandler
func (NonExistingDocumentHandler) Handle ¶ added in v0.1.2
func (this NonExistingDocumentHandler) Handle() (int, any)
type ParamProvider ¶
type ParamReader ¶
type ParamReader[T Id] interface { Read(paramProvider ParamProvider) T }
type ResponseResolver ¶ added in v0.1.2
type ResponseWriter ¶
type SnapshotRetriever ¶
type SnapshotRetriever[TId Id] interface { Retrieve(collection *firestore.CollectionRef, id TId) *firestore.DocumentSnapshot }
Source Files ¶
- build_application.go
- build_application_mapped.go
- data_decoder.go
- data_handler.go
- data_mapper.go
- decoded_data_handler.go
- decoded_data_handler_mapped.go
- document_request_handler.go
- document_response_resolver.go
- existing_document_data_handler.go
- id.go
- id_snapshot_retriever.go
- json_response_writer.go
- map_structure_data_decoder.go
- no_data_handler.go
- non_existing_document_handler.go
- param_provider.go
- param_reader.go
- response.go
- response_resolver.go
- response_writer.go
- run_mapped.go
- run_typed.go
- snapshot_retriever.go
Directories ¶
Path | Synopsis |
---|---|
int-id
module
|
|
integration-mapped
Module
|
|
integration-typed
Module
|
|
integration-untyped
Module
|
|
string-id
module
|
|
integration-typed
Module
|
|
integration-untyped
Module
|
Click to show internal directories.
Click to hide internal directories.