endpoint

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEndpoint

func NewEndpoint(scheme, host string) *url.URL

NewEndpoint 创建一个新的端点URL

func NormalizeEndpoint

func NormalizeEndpoint(endpoint string, defaultScheme string) (string, error)

NormalizeEndpoint 标准化端点URL 确保端点有scheme,默认使用defaultScheme

func ParseEndpoint

func ParseEndpoint(endpoints []string, scheme string) (string, error)

ParseEndpoint 从多个端点中解析出指定scheme的端点

func ParseEndpoints

func ParseEndpoints(endpoints []string) ([]*url.URL, error)

ParseEndpoints 解析多个端点URLs

func Scheme

func Scheme(scheme string, isSecure bool) string

Scheme 获取端点URL的scheme,可选择是否使用安全连接 例如:scheme="http",isSecure=true 将得到 "https"

Types

This section is empty.

Jump to

Keyboard shortcuts

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