api

package
v0.0.105 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 17 Imported by: 3

Documentation

Overview

Package api contains the api used by scribe

Index

Constants

This section is empty.

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
	// OmniRPCURL is the url of the omnirpc service.
	OmniRPCURL string
}

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