client

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: AGPL-3.0 Imports: 10 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 {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, addr string, key *keys.PrivateKey) (*Client, error)

func (*Client) GetPolicy

func (c *Client) GetPolicy(ctx context.Context, kind policycontract.Kind, name string, chainID chain.ID) (*chain.Chain, error)

func (*Client) Healthcheck

func (c *Client) Healthcheck(ctx context.Context) error

func (*Client) ListPolicies

func (c *Client) ListPolicies(ctx context.Context, kind policycontract.Kind, name string) ([]chain.ID, error)

func (*Client) PutPolicies

func (c *Client) PutPolicies(ctx context.Context, policies []PolicyData) error

func (*Client) RemovePolicies

func (c *Client) RemovePolicies(ctx context.Context, policies []PolicyInfo) error

type Config

type Config struct {
	Logger *zap.Logger
}

type PolicyData

type PolicyData struct {
	Kind  policycontract.Kind
	Name  string
	Chain *chain.Chain
}

type PolicyInfo

type PolicyInfo struct {
	Kind    policycontract.Kind
	Name    string
	ChainID chain.ID
}

Jump to

Keyboard shortcuts

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