models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	Required bool `json:"required" yaml:"Required"`
	// if required is true, then Excepted path and methods does not require authentication
	// if required is false, then Excepted path and methods require authentication
	Except []struct {
		Path    string   `json:"path" yaml:"Path"`
		Methods []string `json:"methods" yaml:"Methods"`
	} `json:"except" yaml:"Except"`
}

func (*Authentication) IsAuthenticationRequired

func (auth *Authentication) IsAuthenticationRequired(path, method string) bool

type PingResponse

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

type ServiceRoute

type ServiceRoute struct {
	Name           string          `json:"name" yaml:"Name"`
	PathPrefix     string          `json:"pathPrefix" yaml:"PathPrefix"`
	TargetURL      string          `json:"targetURL" yaml:"TargetURL"`
	StripPrefix    bool            `json:"stripPrefix" yaml:"StripPrefix"`
	Authentication *Authentication `json:"authentication" yaml:"Authentication"`
	Middleware     []string        `json:"middleware" yaml:"Middleware"`
	Timeout        time.Duration   `json:"timeout" yaml:"Timeout"`
	UpdatedAt      int64           `json:"-" yaml:"-"` // Unix timestamp of last update
}

ServiceRoute represents a service route configuration

Jump to

Keyboard shortcuts

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