jsonrpc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*rpcclient.JSONRPCClient
	// contains filtered or unexported fields
}

Client is a JSON-RPC client for the Kwil gateway service. It use the JSONRPCClient from the rpcclient package for the actual JSON-RPC communication, and implements gateway service methods.

func NewClient

func NewClient(target *url.URL, opts ...gateway.ClientOption) (*Client, error)

NewClient creates a new gateway json rpc client, target should be the base URL of the gateway server, and should not include "/rpc/v1" as that is appended automatically. If the client does not have a cookie jar, an error is returned.

func (*Client) Authn

func (g *Client) Authn(ctx context.Context, auth *gateway.AuthnRequest) error

Authn authenticates the client with the gateway. It sets the returned cookie in the client's cookie jar.

func (*Client) GetAuthnParameter

func (g *Client) GetAuthnParameter(ctx context.Context) (*gateway.AuthnParameterResponse, error)

GetAuthnParameter returns the auth parameter for the client.

Jump to

Keyboard shortcuts

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