fireworks

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 6 Imported by: 6

README

fireworks

Core library providing shared features and utilities of the fireworks libraries:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

func NewApplication

func NewApplication(router *gin.Engine) *Application

func (Application) Run

func (this Application) Run()

type ApplicationConfigurationLoader

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

func NewApplicationConfigurationLoader

func NewApplicationConfigurationLoader(
	projectIDProvider ValueProvider,
	collectionNameProvider ValueProvider,
) *ApplicationConfigurationLoader

func (ApplicationConfigurationLoader) Load

type Configuration

type Configuration struct {
	ProjectID      string
	CollectionName string
}

func GenerateConfiguration

func GenerateConfiguration(fileName string) Configuration

func NewConfiguration

func NewConfiguration(projectID string, collectionName string) *Configuration

type ConfigurationFilePathProvider

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

func NewConfigurationFilePathProvider

func NewConfigurationFilePathProvider(fileName string) *ConfigurationFilePathProvider

func (ConfigurationFilePathProvider) Get

type ConfigurationFileReader

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

func NewConfigurationFileReader

func NewConfigurationFileReader(filePathProvider FilePathProvider) *ConfigurationFileReader

func (ConfigurationFileReader) Read

func (this ConfigurationFileReader) Read() []byte

type ConfigurationJsonFileReader

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

func NewConfigurationJsonFileReader

func NewConfigurationJsonFileReader(configurationFileReader FileReader) *ConfigurationJsonFileReader

func (ConfigurationJsonFileReader) Read

func (this ConfigurationJsonFileReader) Read() map[string]interface{}

type ConfigurationLoader

type ConfigurationLoader interface {
	Load() Configuration
}

type ConfigurationValueProvider

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

func CreateConfigurationValueProvider

func CreateConfigurationValueProvider(
	jsonKey string,
	environmentKey string,
	configurationJson map[string]interface{}) ConfigurationValueProvider

func (ConfigurationValueProvider) Get

func (this ConfigurationValueProvider) Get() (string, bool)

type DataDeserialiser

type DataDeserialiser[T any] interface {
	Deserialise(data []byte) T
}

type DataReader

type DataReader[T any] interface {
	Read(ginContext *gin.Context) T
}

type EnvironmentValueProvider

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

func NewEnvironmentValueProvider

func NewEnvironmentValueProvider(key string) *EnvironmentValueProvider

func (EnvironmentValueProvider) Get

func (this EnvironmentValueProvider) Get() (string, bool)

type FilePathProvider

type FilePathProvider interface {
	Get() string
}

type FileReader

type FileReader interface {
	Read() []byte
}

type GinPubSubBodyReader

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

func NewGinPubSubBodyReader

func NewGinPubSubBodyReader(
	reader Reader,
	pubSubBodyDeserialiser DataDeserialiser[PubSubBody]) *GinPubSubBodyReader

func (GinPubSubBodyReader) Read

func (this GinPubSubBodyReader) Read(ginContext *gin.Context) PubSubBody

type GinRouterBuilder

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

func NewGinRouterBuilder

func NewGinRouterBuilder() *GinRouterBuilder

func (GinRouterBuilder) AddGet

func (this GinRouterBuilder) AddGet(routePath string, handler gin.HandlerFunc)

func (GinRouterBuilder) AddPost

func (this GinRouterBuilder) AddPost(routePath string, handler gin.HandlerFunc)

func (GinRouterBuilder) Build

func (this GinRouterBuilder) Build() *gin.Engine

type HttpRequestBodyDataReader

type HttpRequestBodyDataReader[T any] struct {
	// contains filtered or unexported fields
}

func NewHttpRequestBodyDataReader

func NewHttpRequestBodyDataReader[T any](
	pubSubBodyReader PubSubBodyReader,
	dataDeserialiser DataDeserialiser[T]) *HttpRequestBodyDataReader[T]

func (HttpRequestBodyDataReader[T]) Read

func (this HttpRequestBodyDataReader[T]) Read(ginContext *gin.Context) T

type IoutilReader

type IoutilReader struct{}

func (IoutilReader) Read

func (this IoutilReader) Read(ioReader io.Reader) []byte

type JsonDataDeserialiser

type JsonDataDeserialiser[T any] struct{}

func (JsonDataDeserialiser[T]) Deserialise

func (this JsonDataDeserialiser[T]) Deserialise(data []byte) T

type JsonValueProvider

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

func NewJsonValueProvider

func NewJsonValueProvider(key string) *JsonValueProvider

func (JsonValueProvider) Get

func (this JsonValueProvider) Get() (string, bool)

type PubSubBody

type PubSubBody struct {
	Message      pubsub.Message
	Subscription string
}

type PubSubBodyReader

type PubSubBodyReader interface {
	Read(ginContext *gin.Context) PubSubBody
}

type Reader

type Reader interface {
	Read(ioReader io.Reader) []byte
}

type RequestHandler

type RequestHandler[T any] interface {
	Handle(ginContext *gin.Context)
}

type ValueProvider

type ValueProvider interface {
	Get() (string, bool)
}

Jump to

Keyboard shortcuts

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