myapi

package
v1.9.7 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: BSD-3-Clause Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiInfo

type ApiInfo[TYPE any] struct {
	Method string `json:"method"`
	Path   string `json:"path"`
	Module TYPE   `json:"module"`
}

type ApiManager

type ApiManager[TYPE any] interface {
	SetGroup(group string) ApiManager[TYPE]
	AddGET(path string, module TYPE) ApiManager[TYPE]
	AddPOST(path string, module TYPE) ApiManager[TYPE]
	AddPUT(path string, module TYPE) ApiManager[TYPE]
	AddDELETE(path string, module TYPE) ApiManager[TYPE]
	ValueBy(method string, path string) (ApiInfo[TYPE], bool)
	List() []ApiInfo[TYPE]
}

func NewApiGroup

func NewApiGroup[DATA any]() ApiManager[DATA]

Jump to

Keyboard shortcuts

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