endpoint

package
v4.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProtocolHTTPS is the https credential protocol.
	//
	// Deprecated: Moved to github.com/beyondstorage/go-endpoint
	ProtocolHTTPS = "https"
	// ProtocolHTTP is the http credential protocol.
	//
	// Deprecated: Moved to github.com/beyondstorage/go-endpoint
	ProtocolHTTP = "http"
)

Variables

View Source
var (
	// ErrUnsupportedProtocol will return if protocol is unsupported.
	//
	// Deprecated: Moved to github.com/beyondstorage/go-endpoint
	ErrUnsupportedProtocol = errors.New("unsupported protocol")
	// ErrInvalidValue means value is invalid.
	//
	// Deprecated: Moved to github.com/beyondstorage/go-endpoint
	ErrInvalidValue = errors.New("invalid value")
)

Functions

This section is empty.

Types

type Error deprecated

type Error struct {
	Op  string
	Err error

	Protocol string
	Values   []string
}

Error represents error related to endpoint.

Deprecated: Moved to github.com/beyondstorage/go-endpoint

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap implements xerrors.Wrapper

type Value deprecated

type Value struct {
	Protocol string
	Host     string
	Port     int
}

Value is the required info to connect a service.

Deprecated: Moved to github.com/beyondstorage/go-endpoint

func NewHTTP deprecated

func NewHTTP(host string, port int) Value

NewHTTP will create a static endpoint from parsed URL.

Deprecated: Moved to github.com/beyondstorage/go-endpoint

func NewHTTPS deprecated

func NewHTTPS(host string, port int) Value

NewHTTPS will create a static endpoint from parsed URL.

Deprecated: Moved to github.com/beyondstorage/go-endpoint

func Parse deprecated

func Parse(cfg string) (p Value, err error)

Parse will parse config string to create a endpoint Provider.

Deprecated: Moved to github.com/beyondstorage/go-endpoint

func (Value) String

func (v Value) String() string

String will compose all info into a valid URL.

Jump to

Keyboard shortcuts

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