ogen

package
v0.0.0-...-1f5b4f5 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Page    = 0
	PerPage = 20
)

Default pagination

Variables

This section is empty.

Functions

func TestMidleware

func TestMidleware(next http.Handler) http.Handler

Types

type Auth

type Auth interface {
	HandleBearerAuth(ctx context.Context, operationName string, t api.BearerAuth) (context.Context, error)
}

type Category

type Category interface {
	V1AdminCategoriesGet(ctx context.Context, params api.V1AdminCategoriesGetParams) (api.V1AdminCategoriesGetRes, error)
	V1AdminCategoriesPost(ctx context.Context, req *api.CategoryPost) (api.V1AdminCategoriesPostRes, error)
	V1AdminCategoriesIDDelete(ctx context.Context, params api.V1AdminCategoriesIDDeleteParams) (api.V1AdminCategoriesIDDeleteRes, error)
	V1AdminCategoriesIDPut(ctx context.Context, req *api.CategoryPut, params api.V1AdminCategoriesIDPutParams) (api.V1AdminCategoriesIDPutRes, error)
}

type Error

type Error interface {
	NewError(ctx context.Context, err error) *api.ErrorStatusCode
}

type Handler

type Handler struct {
	Auth
	Error
	Category
}

func NewHandler

func NewHandler(params HandlerParams) *Handler

type HandlerParams

type HandlerParams struct {
	Auth
	Error
	Category
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(h *Handler, addr string) (*Server, error)

func (*Server) Run

func (s *Server) Run() error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Directories

Path Synopsis
handler

Jump to

Keyboard shortcuts

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