clients

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithClientID

func WithClientID(parent context.Context, client *Client) context.Context

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func ClientIDFrom

func ClientIDFrom(ctx context.Context) *Client

func (*Client) DID

func (c *Client) DID() string

func (*Client) Doc

func (c *Client) Doc() *ioconnect.Doc

func (*Client) KeyAgreementKID

func (c *Client) KeyAgreementKID() string

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(
	projectClientContractAddress string,
	ioIDRegisterContractAddress string,
	w3bstreamProjectContractAddress string,
	ioIDRegistryServiceEndpoint string,
	chainEndpoint string,
) (*Manager, error)

func (*Manager) ClientByIoID

func (mgr *Manager) ClientByIoID(id string) *Client

ClientByIoID get client from pool, if not hit, try fetch client from contract

func (*Manager) HasProjectPermission

func (mgr *Manager) HasProjectPermission(clientID string, projectID uint64) (bool, error)

Jump to

Keyboard shortcuts

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