api

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(db *storage.Database, msgProducer message.TopicProducer, cfg *config.ServerConfig) (*chi.Mux, error)

Initialize starts the database, kafka message producer, middleware, and endpoints

func LogOrigin

func LogOrigin(next http.Handler) http.Handler

LogOrigin log the origin of our httprequest

Types

type Server

type Server struct {
	GraphQL *graphql.Server
	Rest    *rest.Server
}

func New

func New(conn *storage.Database, msgProducer message.TopicProducer) (*Server, error)

func (*Server) CheckLiveness

func (s *Server) CheckLiveness() http.HandlerFunc

func (*Server) CheckReadiness

func (s *Server) CheckReadiness() http.HandlerFunc

func (*Server) CheckStatus

func (s *Server) CheckStatus(cfg *config.ServerConfig) http.HandlerFunc

Directories

Path Synopsis
schema
Portions of this file were taken from https://github.com/tonyghita/graphql-go-example/blob/main/schema/schema.go
Portions of this file were taken from https://github.com/tonyghita/graphql-go-example/blob/main/schema/schema.go
schema/types
Custom implementation of JSON type because graph-gophers/graphql-go does not support the custom JSON scalar type
Custom implementation of JSON type because graph-gophers/graphql-go does not support the custom JSON scalar type

Jump to

Keyboard shortcuts

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