boards

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	ApplicationService application.BoardApplicationService
	DataStore          domain.BoardDataStore
	Endpoints          transport.EndpointSet
}

Contains all the necessary elements for running the boards service, i.e. the boards part of the API.

func NewComponent

func NewComponent(config Config) (*Component, error)

func (*Component) RegisterHttpHandlers

func (c *Component) RegisterHttpHandlers(router *mux.Router, httpOpts []http.ServerOption)

type Config

type Config struct {
	Logger *log.Logger

	// If true, use an in-memory data store.
	UseInmemDataStore bool
	// Used to create a firestore data store if UseInmemDataStore is set to false.
	FirestoreConfig *FirestoreConfig
	// AuthorizationStore used to perform authorization in the application service.
	AuthorizationStore auth.AuthorizationStore

	// Middlewares that should be applied to all endpoints
	Middlewares []endpoint.Middleware
	// Authentication middleware for endpoints.
	AuthMiddleware endpoint.Middleware
	// Whether to add the logging middleware from the "internal/pkg/endpoint" package to every endpoint.
	// It logs errors from the underlying application service, not any errors produced by endpoint middlewares.
	UseLoggingMiddleware bool
}

Configures a boards component.

type FirestoreConfig

type FirestoreConfig struct {
	Client *firestore.Client
}

Directories

Path Synopsis
inmem
Package inmem provides an in-memory implementation of BoardDataStore, that can be used for development/testing.
Package inmem provides an in-memory implementation of BoardDataStore, that can be used for development/testing.
Package domain implements the business logic for working with boards, users and invites:
Package domain implements the business logic for working with boards, users and invites:
generated code, do not modify
generated code, do not modify

Jump to

Keyboard shortcuts

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