api

package
v1.10.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0, MIT Imports: 12 Imported by: 26

Documentation

Index

Constants

View Source
const (
	VenusAPINamespaceHeader = "X-VENUS-API-NAMESPACE"
	AuthorizationHeader     = "Authorization"
)
View Source
const ProtoVersion = multiaddr.P_WSS + 1

Variables

View Source
var ErrNotSupported = errors.New("method not supported")

Functions

func DialArgs added in v1.2.2

func DialArgs(addr, version string) (string, error)

func Endpoint

func Endpoint(raw string, ver uint32) (string, error)

func GetInternalStructs

func GetInternalStructs(in interface{}) []interface{}

GetInternalStructs extracts all pointers to 'Internal' sub-structs from the provided pointer to a proxy struct

func VerString added in v1.2.2

func VerString(ver uint32) string

Types

type APIInfo added in v1.2.2

type APIInfo struct {
	Addr  string
	Token []byte
}

func NewAPIInfo added in v1.2.2

func NewAPIInfo(addr, token string) APIInfo

func ParseApiInfo added in v1.2.2

func ParseApiInfo(s string) APIInfo

func (APIInfo) AuthHeader added in v1.2.2

func (a APIInfo) AuthHeader() http.Header

func (APIInfo) DialArgs added in v1.2.2

func (a APIInfo) DialArgs(version string) (string, error)

DialArgs parser libp2p address to http/ws protocol, the version argument can be override by address in version

func (APIInfo) Host added in v1.2.2

func (a APIInfo) Host() (string, error)

func (APIInfo) SetAuthHeader added in v1.2.2

func (a APIInfo) SetAuthHeader(h http.Header)

type Version

type Version interface {
	// Version provides information about API provider
	Version(ctx context.Context) (types.Version, error) //perm:read
}

Directories

Path Synopsis
v0
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
v0/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
v1
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
v1/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
gateway
v0
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
v0/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
v1
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
v1/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
v2
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
v2/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
client
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
client/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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