api

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0, MIT Imports: 9 Imported by: 26

Documentation

Index

Constants

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

Variables

View Source
var (
	FullAPIVersion0 = NewVer(1, 5, 0)
	FullAPIVersion1 = NewVer(2, 2, 0)
)

semver versions of the rpc api exposed

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 uint32

func NewVer

func NewVer(major, minor, patch uint8) Version

func (Version) EqMajorMinor

func (ve Version) EqMajorMinor(v2 Version) bool

func (Version) Ints

func (ve Version) Ints() (uint32, uint32, uint32)

Ints returns (major, minor, patch) versions

func (Version) String

func (ve Version) String() string

Directories

Path Synopsis
chain
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.
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