server

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(url, description string, opts ...Option) *v3.Server

New creates a server entry with the provided URL, description, and options.

Types

type Option

type Option func(*v3.Server)

Option configures a server entry.

func Name

func Name(name string) Option

Name sets the server name (OpenAPI 3.2+).

func Variable

func Variable(name, defaultVal string, opts ...VariableOption) Option

Variable adds a URL template variable to the server.

type VariableOption

type VariableOption func(*v3.ServerVariable)

VariableOption configures a server variable.

func VariableDescription

func VariableDescription(description string) VariableOption

VariableDescription sets the description for the server variable.

func VariableEnum

func VariableEnum(enum ...string) VariableOption

VariableEnum sets the allowed values for the server variable.

Jump to

Keyboard shortcuts

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