app

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package app wraps the storage layer with application logic and provides an interface for API layer.

Index

Constants

View Source
const ErrServiceNotHealthy = srvc.ErrStr("service not healthy")

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	api.UnimplementedHandler
	// contains filtered or unexported fields
}

func New

func New(s Store) *App

func (*App) Healthz

func (a *App) Healthz(ctx context.Context) (*api.Healthy, error)

func (*App) NewError

func (a *App) NewError(ctx context.Context, err error) *api.ErrorRespStatusCode

NewError can be used to provide custom error responses based on the error.

type Store

type Store interface {
	Healthy(context.Context) error
}

Jump to

Keyboard shortcuts

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