dogma

package module
v0.0.0-...-862cbf9 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 6 Imported by: 0

README

go-dogma

A library & tool for generating web interface definition code from documentation.

Supported output languages & roadmap

  • Golang
    • generate type definition code & data validation code
    • typed service definition (use with gorilla/mux)
  • Typescript
    • generate type definition code & data validation code
    • typed request method (based on fetch)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRestFunc

func HandleRestFunc[T func(Context, PU, PC) (R, error), PU any, PC any, R any](s *Server, handle T)

Types

type Context

type Context = echo.Context

type Method

type Method struct {
	Name   string `json:"name"`
	Method string `json:"method"`
}

type ResultBase

type ResultBase struct {
	Message string `json:"message"`
}

type Server

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

func New

func New(router *echo.Group, desc map[reflect.Type]Method, logger *log.Logger) *Server

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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