protocol

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package protocol provides fundamentals for each protocols.

Index

Constants

View Source
const (
	// Small is special tag of nvgd.
	Small = "x-small-source"

	// ParsedKeys is special tag of nvgd.
	ParsedKeys = "x-parsed-keys"
)

Variables

This section is empty.

Functions

func MustRegister

func MustRegister(name string, p Protocol)

MustRegister registers a protocol, panic if failed.

func Register

func Register(name string, p Protocol) error

Register registers a protocol with name.

Types

type Postable

type Postable interface {
	Protocol
	Post(u *url.URL, r io.Reader) (*resource.Resource, error)
}

Postable is set of methods for POST acceptable source/protocol.

type Protocol

type Protocol interface {
	Open(u *url.URL) (*resource.Resource, error)
}

Protocol is abstraction of methods to get source stream.

func Find

func Find(name string) Protocol

Find finds a protocol.

type ProtocolFunc added in v1.3.0

type ProtocolFunc func(*url.URL) (*resource.Resource, error)

ProtocolFunc is Protocol wrapper for function.

func (ProtocolFunc) Open added in v1.3.0

func (f ProtocolFunc) Open(u *url.URL) (*resource.Resource, error)

Open opens URL as protocol.

Directories

Path Synopsis
Package aws provides AWS protocol for NVGD.
Package aws provides AWS protocol for NVGD.
Package configp provides config protocol for NGVD.
Package configp provides config protocol for NGVD.
Package db provides database protocol for NVGD.
Package db provides database protocol for NVGD.
Package echarts provides chart editor.
Package echarts provides chart editor.
Package examples provides examples resources.
Package examples provides examples resources.
Package file provides file protocol for NVGD.
Package file provides file protocol for NVGD.
Package help provides help protocol for NVGD.
Package help provides help protocol for NVGD.
Package redis provides redis protocol for NVGD.
Package redis provides redis protocol for NVGD.
Package trdsql provides TRDSQL's query editor
Package trdsql provides TRDSQL's query editor
Package version provides version protocol for NVGD.
Package version provides version protocol for NVGD.

Jump to

Keyboard shortcuts

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