api

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 18 Imported by: 3

Documentation

Overview

Package api contains the api used by scribe

Index

Constants

View Source
const HealthCheck string = "/health-check"

HealthCheck is the health check endpoint.

Variables

This section is empty.

Functions

func InitDB added in v0.0.23

func InitDB(ctx context.Context, database string, path string) (db.EventDB, error)

InitDB initializes a database given a database type and path.

func Start

func Start(ctx context.Context, cfg Config) error

Start starts the api server.

Types

type Config

type Config struct {
	// HTTPPort is the http port for the api
	HTTPPort uint16
	// Database is the database type
	// TODO: should be enum
	Database string
	// Path is the path to the database or db connection
	// TODO: should be renamed
	Path string
	// GRPCPort is the path to the grpc service
	GRPCPort uint16
}

Config contains the config for the api.

Jump to

Keyboard shortcuts

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