types

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	OperationMetaFrom  = contextx.From[tCtxOperationMeta, *OperationMeta]
	WithOperationMeta  = contextx.With[tCtxOperationMeta, *OperationMeta]
	MustOperationMeta  = contextx.Must[tCtxOperationMeta, *OperationMeta]
	CarryOperationMeta = contextx.Carry[tCtxOperationMeta, *OperationMeta]

	RequestFrom  = contextx.From[tCtxRequest, *http.Request]
	WithRequest  = contextx.With[tCtxRequest, *http.Request]
	MustRequest  = contextx.Must[tCtxRequest, *http.Request]
	CarryRequest = contextx.Carry[tCtxRequest, *http.Request]

	OperationMetaProviderFrom  = contextx.From[tCtxOperationMetaProvider, OperationMetaProvider]
	WithOperationMetaProvider  = contextx.With[tCtxOperationMetaProvider, OperationMetaProvider]
	MustOperationMetaProvider  = contextx.Must[tCtxOperationMetaProvider, OperationMetaProvider]
	CarryOperationMetaProvider = contextx.Carry[tCtxOperationMetaProvider, OperationMetaProvider]
)
View Source
var (
	PkgRoot     string
	ExposedRoot string
)

Functions

This section is empty.

Types

type OperationMeta

type OperationMeta struct {
	ServerMeta
	RequestMeta
}

func (OperationMeta) UA

func (m OperationMeta) UA() string

type OperationMetaProvider

type OperationMetaProvider interface {
	GetOperation(id string) (OperationMeta, bool)
}

type RequestMeta

type RequestMeta struct {
	ID     string
	Method string
	Route  string
}

type ServerMeta

type ServerMeta struct {
	Name    string
	Version string
}
Example
sm := ServerMeta{
	Name: "server-name",
	// Version: "v0.0.1",
}
fmt.Println(sm.UA())
sm.Version = "v0.0.1"
fmt.Println(sm.UA())

rm := RequestMeta{
	Method: "GET",
	Route:  "/path/to/route",
}
om := OperationMeta{
	ServerMeta:  sm,
	RequestMeta: rm,
}
fmt.Println(om.UA())
om.ID = "OperatorX"
fmt.Println(om.UA())
Output:
server-name
server-name@v0.0.1
server-name@v0.0.1(unknown)
server-name@v0.0.1(OperatorX)

func (ServerMeta) UA

func (m ServerMeta) UA() string

Jump to

Keyboard shortcuts

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