handler

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add[I, O any](srv *server.Server, method string, path string, f func(context.Context, *I) (*O, error), configs ...Config)

func AddHealthCheck added in v0.0.10

func AddHealthCheck(srv *server.Server)

Types

type Config

type Config struct {
	Summary      string
	Description  string
	Tags         []string
	Authenticate bool
	SuperAdmin   bool
	Permission   string
}

type Endpoint

type Endpoint[I, O any] struct {
	Server      *server.Server
	Method      string
	Path        string
	Func        func(context.Context, *I) (*O, error)
	Summary     string
	Description string
	Tags        []string
}

type Health added in v0.0.10

type Health struct {
	Status string `json:"status" example:"ok"`
}

func HealthCheck added in v0.0.10

func HealthCheck(ctx context.Context, req *model.Empty) (*Health, error)

Jump to

Keyboard shortcuts

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